public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
* [PATCH 2/5] winsup/doc: Generate ANSI rather than K&R style function prototypes
  2015-06-17 12:37 [PATCH 0/5] Generate cygwin-api manpages Jon TURNEY
  2015-06-17 12:37 ` [PATCH 5/5] winsup/doc: Add man.xsl customization stylesheet Jon TURNEY
  2015-06-17 12:37 ` [PATCH 4/5] winsup/doc: Make and install cygwin-api function manpages Jon TURNEY
@ 2015-06-17 12:37 ` Jon TURNEY
  2015-06-17 12:37 ` [PATCH 3/5] winsup/doc: Convert cygwin-api function documentation to refentry elements Jon TURNEY
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Jon TURNEY @ 2015-06-17 12:37 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon TURNEY

Since K&R style prototypes appear to be the default for HTML and FO, customize
the stylesheets rendering of funcsynopsis elements to generate ANSI style
prototypes instead.

2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>

	* fo.xsl: Render funcsynopsis elements as ANSI style function
	prototypes.
	* html.xsl: Ditto.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
---
 winsup/doc/ChangeLog | 6 ++++++
 winsup/doc/fo.xsl    | 3 +++
 winsup/doc/html.xsl  | 3 +++
 3 files changed, 12 insertions(+)

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index 453de70..347adcb 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,5 +1,11 @@
 2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>
 
+	* fo.xsl: Render funcsynopsis elements as ANSI style function
+	prototypes.
+	* html.xsl: Ditto.
+
+2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>
+
 	* html.xsl: Renamed from cygwin.xsl.
 
 2015-06-17  Corinna Vinschen  <corinna@vinschen.de>
diff --git a/winsup/doc/fo.xsl b/winsup/doc/fo.xsl
index ba8e191..f3fee0b 100644
--- a/winsup/doc/fo.xsl
+++ b/winsup/doc/fo.xsl
@@ -65,4 +65,7 @@
   </xsl:if>
 </xsl:template>
 
+	<!-- generate ansi rather than k&r style function synopses -->
+	<xsl:param name="funcsynopsis.style" select="ansi" />
+
 </xsl:stylesheet>
diff --git a/winsup/doc/html.xsl b/winsup/doc/html.xsl
index 2b02ea8..59b7735 100644
--- a/winsup/doc/html.xsl
+++ b/winsup/doc/html.xsl
@@ -23,4 +23,7 @@
 <!-- suppress refentry in toc being annotated with refpurpose -->
 <xsl:param name="annotate.toc" select="0" />
 
+<!-- generate ansi rather than k&r style function synopses -->
+<xsl:param name="funcsynopsis.style" select="ansi" />
+
 </xsl:stylesheet>
-- 
2.1.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 5/5] winsup/doc: Add man.xsl customization stylesheet
  2015-06-17 12:37 [PATCH 0/5] Generate cygwin-api manpages Jon TURNEY
@ 2015-06-17 12:37 ` Jon TURNEY
  2015-06-17 12:37 ` [PATCH 4/5] winsup/doc: Make and install cygwin-api function manpages Jon TURNEY
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Jon TURNEY @ 2015-06-17 12:37 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon TURNEY

2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>

	* man.xsl: New file.
	* Makefile.in (utils2man.stamp, api2man.stamp): Use it.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
---
 winsup/doc/ChangeLog   |  5 +++++
 winsup/doc/Makefile.in |  8 ++++----
 winsup/doc/man.xsl     | 13 +++++++++++++
 3 files changed, 22 insertions(+), 4 deletions(-)
 create mode 100644 winsup/doc/man.xsl

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index 4c464b2..3693516 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,5 +1,10 @@
 2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>
 
+	* man.xsl: New file.
+	* Makefile.in (utils2man.stamp, api2man.stamp): Use it.
+
+2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>
+
 	* Makefile.in (api2man.stamp): Add rules to build and install
 	manpages for cygwin-api.
 
diff --git a/winsup/doc/Makefile.in b/winsup/doc/Makefile.in
index f308ab2..60b375a 100644
--- a/winsup/doc/Makefile.in
+++ b/winsup/doc/Makefile.in
@@ -97,8 +97,8 @@ cygwin-ug-net/cygwin-ug-net.html : $(cygwin-ug-net_SOURCES) html.xsl
 cygwin-ug-net/cygwin-ug-net.pdf : $(cygwin-ug-net_SOURCES) fo.xsl
 	-$(XMLTO) pdf -o cygwin-ug-net/ -m $(srcdir)/fo.xsl $<
 
-utils2man.stamp: $(cygwin-ug-net_SOURCES)
-	$(XMLTO) man $<
+utils2man.stamp: $(cygwin-ug-net_SOURCES) man.xsl
+	$(XMLTO) man -m ${srcdir}/man.xsl $<
 	@touch $@
 
 cygwin-api/cygwin-api.html : $(cygwin-api_SOURCES) html.xsl
@@ -107,8 +107,8 @@ cygwin-api/cygwin-api.html : $(cygwin-api_SOURCES) html.xsl
 cygwin-api/cygwin-api.pdf : $(cygwin-api_SOURCES) fo.xsl
 	-$(XMLTO) pdf -o cygwin-api/ -m $(srcdir)/fo.xsl $<
 
-api2man.stamp: $(cygwin-api_SOURCES)
-	$(XMLTO) man $<
+api2man.stamp: $(cygwin-api_SOURCES) man.xsl
+	$(XMLTO) man -m ${srcdir}/man.xsl $<
 	@touch $@
 
 faq/faq.html : $(FAQ_SOURCES)
diff --git a/winsup/doc/man.xsl b/winsup/doc/man.xsl
new file mode 100644
index 0000000..22e624f
--- /dev/null
+++ b/winsup/doc/man.xsl
@@ -0,0 +1,13 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'>
+
+<!-- don't truncate manpage titles for long function names -->
+<xsl:param name="man.th.title.max.length" select="33" />
+
+<!-- don't moan about missing metadata -->
+<xsl:param name="refentry.meta.get.quietly" select="1" />
+
+<!-- base URL for relative links -->
+<xsl:param name="man.base.url.for.relative.links">https://cygwin.com/cygwin-ug-net/</xsl:param>
+
+</xsl:stylesheet>
-- 
2.1.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/5] winsup/doc: Rename cygwin.xsl as html.xsl
  2015-06-17 12:37 [PATCH 0/5] Generate cygwin-api manpages Jon TURNEY
                   ` (3 preceding siblings ...)
  2015-06-17 12:37 ` [PATCH 3/5] winsup/doc: Convert cygwin-api function documentation to refentry elements Jon TURNEY
@ 2015-06-17 12:37 ` Jon TURNEY
  2015-06-17 13:49 ` [PATCH 0/5] Generate cygwin-api manpages Corinna Vinschen
  5 siblings, 0 replies; 12+ messages in thread
From: Jon TURNEY @ 2015-06-17 12:37 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon TURNEY

For clarity, rename cygwin.xsl as html.xsl, because that's what it is

2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>

	* html.xsl: Renamed from cygwin.xsl.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
---
 winsup/doc/ChangeLog                |  4 ++++
 winsup/doc/Makefile.in              | 14 +++++++-------
 winsup/doc/{cygwin.xsl => html.xsl} |  2 +-
 3 files changed, 12 insertions(+), 8 deletions(-)
 rename winsup/doc/{cygwin.xsl => html.xsl} (95%)

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index 02bf22e..453de70 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>
+
+	* html.xsl: Renamed from cygwin.xsl.
+
 2015-06-17  Corinna Vinschen  <corinna@vinschen.de>
 
 	* new-features.xml (ov-new): Rename from ov-new1.7.
diff --git a/winsup/doc/Makefile.in b/winsup/doc/Makefile.in
index 14b4588..c9e32c8 100644
--- a/winsup/doc/Makefile.in
+++ b/winsup/doc/Makefile.in
@@ -79,15 +79,15 @@ install-man: utils2man.stamp
 	@$(MKDIRP) $(DESTDIR)$(man1dir)
 	$(INSTALL_DATA) *.1 $(DESTDIR)$(man1dir)
 
-cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : $(cygwin-ug-net_SOURCES) cygwin.xsl
-	-$(XMLTO) html-nochunks -m $(srcdir)/cygwin.xsl $<
+cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : $(cygwin-ug-net_SOURCES) html.xsl
+	-$(XMLTO) html-nochunks -m $(srcdir)/html.xsl $<
 	-@$(MKDIRP) cygwin-ug-net
 	-cp cygwin-ug-net.html cygwin-ug-net/cygwin-ug-net-nochunks.html
 	-rm -f cygwin-ug-net/cygwin-ug-net-nochunks.html.gz
 	-gzip cygwin-ug-net/cygwin-ug-net-nochunks.html
 
-cygwin-ug-net/cygwin-ug-net.html : $(cygwin-ug-net_SOURCES) cygwin.xsl
-	-$(XMLTO) html -o cygwin-ug-net/ -m $(srcdir)/cygwin.xsl $<
+cygwin-ug-net/cygwin-ug-net.html : $(cygwin-ug-net_SOURCES) html.xsl
+	-$(XMLTO) html -o cygwin-ug-net/ -m $(srcdir)/html.xsl $<
 
 cygwin-ug-net/cygwin-ug-net.pdf : $(cygwin-ug-net_SOURCES) fo.xsl
 	-$(XMLTO) pdf -o cygwin-ug-net/ -m $(srcdir)/fo.xsl $<
@@ -96,14 +96,14 @@ utils2man.stamp: $(cygwin-ug-net_SOURCES)
 	$(XMLTO) man $<
 	@touch $@
 
-cygwin-api/cygwin-api.html : $(cygwin-api_SOURCES) cygwin.xsl
-	-$(XMLTO) html -o cygwin-api/ -m $(srcdir)/cygwin.xsl $<
+cygwin-api/cygwin-api.html : $(cygwin-api_SOURCES) html.xsl
+	-$(XMLTO) html -o cygwin-api/ -m $(srcdir)/html.xsl $<
 
 cygwin-api/cygwin-api.pdf : $(cygwin-api_SOURCES) fo.xsl
 	-$(XMLTO) pdf -o cygwin-api/ -m $(srcdir)/fo.xsl $<
 
 faq/faq.html : $(FAQ_SOURCES)
-	-$(XMLTO) html -o faq -m $(srcdir)/cygwin.xsl $(srcdir)/faq.xml
+	-$(XMLTO) html -o faq -m $(srcdir)/html.xsl $(srcdir)/faq.xml
 	-sed -i 's;<a name="id[mp][0-9]*"></a>;;g' faq/faq.html
 
 Makefile.dep: cygwin-ug-net.xml cygwin-api.xml
diff --git a/winsup/doc/cygwin.xsl b/winsup/doc/html.xsl
similarity index 95%
rename from winsup/doc/cygwin.xsl
rename to winsup/doc/html.xsl
index df12555..2b02ea8 100644
--- a/winsup/doc/cygwin.xsl
+++ b/winsup/doc/html.xsl
@@ -3,7 +3,7 @@
                 xmlns:fo="http://www.w3.org/1999/XSL/Format"
                 version='1.0'>
 
-<xsl:param name="chunker.output.doctype-public" 
+<xsl:param name="chunker.output.doctype-public"
   select="'-//W3C//DTD HTML 4.01 Transitional//EN'" />
 <xsl:param name="html.stylesheet" select="'docbook.css'"/>
 <xsl:param name="use.id.as.filename" select="1" />
-- 
2.1.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 3/5] winsup/doc: Convert cygwin-api function documentation to refentry elements
  2015-06-17 12:37 [PATCH 0/5] Generate cygwin-api manpages Jon TURNEY
                   ` (2 preceding siblings ...)
  2015-06-17 12:37 ` [PATCH 2/5] winsup/doc: Generate ANSI rather than K&R style function prototypes Jon TURNEY
@ 2015-06-17 12:37 ` Jon TURNEY
  2015-06-17 12:37 ` [PATCH 1/5] winsup/doc: Rename cygwin.xsl as html.xsl Jon TURNEY
  2015-06-17 13:49 ` [PATCH 0/5] Generate cygwin-api manpages Corinna Vinschen
  5 siblings, 0 replies; 12+ messages in thread
From: Jon TURNEY @ 2015-06-17 12:37 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon TURNEY

Convert cygwin-api from using a sect2 element to using a refentry element for
each function.  This makes it possible to generate manpage-style output for
those elements.

Note that the chunked html now generates a page for each function, rather than
one containing all functions.

Also:

Remove pointless and incorrect date

Move introductory paragraph from the first section to the start of the chapter

Add a funcsynopsisino element with the header file to be included to each
function prototype

Remove extern "C" which doesn't process into all formats successfully

2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>

	* cygwin-api.xml: Move introductory paragraph here.
	* logon-funcs.xml: Convert from using a sect2 element to using a
	refentry element for each function.
	* misc-funcs.xml: Ditto.
	* path.xml: Ditto.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
---
 winsup/doc/ChangeLog       |   8 +++
 winsup/doc/cygwin-api.xml  |   6 +-
 winsup/doc/logon-funcs.xml |  59 +++++++++++++---
 winsup/doc/misc-funcs.xml  |  81 ++++++++++++++++-----
 winsup/doc/path.xml        | 172 ++++++++++++++++++++++++++++++++++-----------
 5 files changed, 258 insertions(+), 68 deletions(-)

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index 347adcb..ddee4e9 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,5 +1,13 @@
 2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>
 
+	* cygwin-api.xml: Move introductory paragraph here.
+	* logon-funcs.xml: Convert from using a sect2 element to using a
+	refentry element for each function.
+	* misc-funcs.xml: Ditto.
+	* path.xml: Ditto.
+
+2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>
+
 	* fo.xsl: Render funcsynopsis elements as ANSI style function
 	prototypes.
 	* html.xsl: Ditto.
diff --git a/winsup/doc/cygwin-api.xml b/winsup/doc/cygwin-api.xml
index ac98c00..7b831d9 100644
--- a/winsup/doc/cygwin-api.xml
+++ b/winsup/doc/cygwin-api.xml
@@ -5,7 +5,6 @@
 <book id="cygwin-api" xmlns:xi="http://www.w3.org/2001/XInclude">
 
   <bookinfo>
-    <date>1998-08-31</date>
     <title>Cygwin API Reference</title>
       <xi:include href="legal.xml"/>
   </bookinfo>
@@ -17,6 +16,11 @@
   <chapter id="cygwin-functions" xmlns:xi="http://www.w3.org/2001/XInclude">
   <title>Cygwin Functions</title>
 
+  <para>
+    These functions are specific to Cygwin itself, and probably won't be
+    found anywhere else.
+  </para>
+
     <xi:include href="path.xml"/>
     <xi:include href="logon-funcs.xml"/>
     <xi:include href="misc-funcs.xml"/>
diff --git a/winsup/doc/logon-funcs.xml b/winsup/doc/logon-funcs.xml
index 9e32ad6..084b0c7 100644
--- a/winsup/doc/logon-funcs.xml
+++ b/winsup/doc/logon-funcs.xml
@@ -5,52 +5,91 @@
 <sect1 id="func-cygwin-login">
 <title>Helper functions to change user context</title>
 
-<sect2 id="func-cygwin-logon_user">
-<title>cygwin_logon_user</title>
+<refentry id="func-cygwin-logon_user">
+  <refmeta>
+    <refentrytitle>cygwin_logon_user</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+  </refmeta>
 
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" HANDLE
+  <refnamediv>
+    <refname>cygwin_logon_user</refname>
+  </refnamediv>
+
+  <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>HANDLE
 <function>cygwin_logon_user</function></funcdef>
 <paramdef>const struct passwd *<parameter>passwd_entry</parameter></paramdef>
 <paramdef>const char *<parameter>password</parameter></paramdef>
 </funcprototype></funcsynopsis>
+  </refsynopsisdiv>
 
+  <refsect1>
+    <title>Description</title>
 <para>Given a pointer to a passwd entry of a user and a cleartext password,
 returns a HANDLE to an impersonation token for this user which can be used
 in a subsequent call to <function>cygwin_set_impersonation_token</function>
 to impersonate that user.  This function can only be called from a process
 which has the required NT user rights to perform a logon.</para>
+  </refsect1>
 
+  <refsect1>
+    <title>See also</title>
 <para>See also the chapter
 <ulink url="../cygwin-ug-net/ntsec.html#ntsec-setuid-overview">Switching the user context</ulink>
 in the Cygwin User's guide.</para>
 
 <para>See also <link linkend="func-cygwin-set-impersonation-token">cygwin_set_impersonation_token</link></para>
+  </refsect1>
+</refentry>
 
-</sect2>
+<refentry id="func-cygwin-set-impersonation-token">
+  <refmeta>
+    <refentrytitle>cygwin_set_impersonation_token</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+  </refmeta>
 
-<sect2 id="func-cygwin-set-impersonation-token">
-<title>cygwin_set_impersonation_token</title>
+  <refnamediv>
+    <refname>cygwin_set_impersonation_token</refname>
+  </refnamediv>
 
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void
+  <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void
 <function>cygwin_set_impersonation_token</function></funcdef>
 <paramdef>const HANDLE <parameter>token</parameter></paramdef>
 </funcprototype></funcsynopsis>
+  </refsynopsisdiv>
 
+  <refsect1>
+    <title>Description</title>
 <para>Use this function to enable the token given as parameter as
 impersonation token for the next call to <function>setuid</function> or
 <function>seteuid</function>.  Use
 <function>cygwin_set_impersonation_token</function> together with
 <function>cygwin_logon_user</function> to impersonate users using
 password authentication.</para>
+  </refsect1>
 
+  <refsect1>
+    <title>See also</title>
 <para>See also the chapter
 <ulink url="../cygwin-ug-net/ntsec.html#ntsec-setuid-overview">Switching the user context</ulink>
 in the Cygwin User's guide.</para>
 
 <para>See also <link linkend="func-cygwin-logon_user">cygwin_logon_user</link></para>
+  </refsect1>
 
-</sect2>
+</refentry>
 
 </sect1>
diff --git a/winsup/doc/misc-funcs.xml b/winsup/doc/misc-funcs.xml
index b164341..16b3d61 100644
--- a/winsup/doc/misc-funcs.xml
+++ b/winsup/doc/misc-funcs.xml
@@ -5,11 +5,24 @@
 <sect1 id="func-cygwin-misc">
 <title>Miscellaneous functions</title>
 
-<sect2 id="func-cygwin-attach-handle-to-fd">
-<title>cygwin_attach_handle_to_fd</title>
+<refentry id="func-cygwin-attach-handle-to-fd">
+  <refmeta>
+    <refentrytitle>cygwin_attach_handle_to_fd</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+  </refmeta>
 
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" int
+  <refnamediv>
+    <refname>cygwin_attach_handle_to_fd</refname>
+  </refnamediv>
+
+  <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>int
 <function>cygwin_attach_handle_to_fd</function></funcdef>
 <paramdef>char *<parameter>name</parameter></paramdef>
 <paramdef>int <parameter>fd</parameter></paramdef>
@@ -17,7 +30,10 @@
 <paramdef>int <parameter>bin</parameter></paramdef>
 <paramdef>int <parameter>access</parameter></paramdef>
 </funcprototype></funcsynopsis>
+  </refsynopsisdiv>
 
+  <refsect1>
+    <title>Description</title>
 <para>This function can be used to turn a Win32 "handle" into a
 posix-style file handle. <parameter>fd</parameter> may be -1 to
 make cygwin allocate a handle; the actual handle is returned
@@ -27,38 +43,71 @@ in all cases.</para>
 underlying file or device.  It just tries to supply the typical file
 functions on a "best-effort" basis.  Use with care.  Don't expect too
 much.</para>
+  </refsect1>
+</refentry>
 
-</sect2>
+<refentry id="func-cygwin-internal">
+  <refmeta>
+    <refentrytitle>cygwin_internal</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+  </refmeta>
 
-<sect2 id="func-cygwin-internal">
-<title>cygwin_internal</title>
+  <refnamediv>
+    <refname>cygwin_internal</refname>
+  </refnamediv>
 
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" uintptr_t
+  <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>uintptr_t
 <function>cygwin_internal</function></funcdef>
 <paramdef>cygwin_getinfo_types <parameter>t</parameter></paramdef>
 <paramdef><parameter>...</parameter></paramdef>
 </funcprototype></funcsynopsis>
+  </refsynopsisdiv>
 
+  <refsect1>
+    <title>Description</title>
 <para>This function gives you access to various internal data and functions.
 It takes two arguments.  The first argument is a type from the 'cygwin_getinfo_types'
 enum.  The second is an optional pointer.</para>
 <para>Stay away unless you know what you're doing.</para>
+  </refsect1>
+</refentry>
+
 
-</sect2>
+<refentry id="func-cygwin-stackdump">
+  <refmeta>
+    <refentrytitle>cygwin_stackdump</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+  </refmeta>
 
-<sect2 id="func-cygwin-stackdump">
-<title>cygwin_stackdump</title>
+  <refnamediv>
+    <refname>cygwin_stackdump</refname>
+  </refnamediv>
 
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void
+  <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void
 <function>cygwin_stackdump</function></funcdef>
 <void />
 </funcprototype></funcsynopsis>
+  </refsynopsisdiv>
 
+  <refsect1>
+    <title>Description</title>
 <para> Outputs a stackdump to stderr from the called location.
 </para>
-
-</sect2>
+  </refsect1>
+</refentry>
 
 </sect1>
diff --git a/winsup/doc/path.xml b/winsup/doc/path.xml
index 06a252b..bea6798 100644
--- a/winsup/doc/path.xml
+++ b/winsup/doc/path.xml
@@ -5,21 +5,34 @@
 <sect1 id="func-cygwin-path">
 <title>Path conversion functions</title>
 
-<para>These functions are specific to Cygwin itself, and probably
-won't be found anywhere else.  </para>
-
-<sect2 id="func-cygwin-conv-path">
-<title>cygwin_conv_path</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" ssize_t
+<refentry id="func-cygwin-conv-path">
+  <refmeta>
+    <refentrytitle>cygwin_conv_path</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>cygwin_conv_path</refname>
+  </refnamediv>
+
+  <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>ssize_t
 <function>cygwin_conv_path</function></funcdef>
 <paramdef>cygwin_conv_path_t <parameter>what</parameter></paramdef>
 <paramdef>const void * <parameter>from</parameter></paramdef>
 <paramdef>void * <parameter>to</parameter></paramdef>
 <paramdef>size_t <parameter>size</parameter></paramdef>
 </funcprototype></funcsynopsis>
+  </refsynopsisdiv>
 
+  <refsect1>
+    <title>Description</title>
 <para>Use this function to convert POSIX paths in
 <parameter>from</parameter> to Win32 paths in <parameter>to</parameter>
 or, vice versa, Win32 paths in <parameter>from</parameter> to POSIX paths
@@ -58,7 +71,10 @@ error and errno is set to one of the below values.</para>
                   of what == CCP_POSIX_TO_WIN_A, longer than MAX_PATH.
     ENOSPC        size is less than required for the conversion.
 </programlisting>
+  </refsect1>
 
+  <refsect1>
+    <title>Example</title>
 <example>
 <title>Example use of cygwin_conv_path</title>
 <programlisting>
@@ -83,21 +99,37 @@ else
 ]]>
 </programlisting>
 </example>
-
-</sect2>
-
-<sect2 id="func-cygwin-conv-path-list">
-<title>cygwin_conv_path_list</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" ssize_t
+  </refsect1>
+</refentry>
+
+<refentry id="func-cygwin-conv-path-list">
+  <refmeta>
+    <refentrytitle>cygwin_conv_path_list</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>cygwin_conv_path_list</refname>
+  </refnamediv>
+
+  <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>ssize_t
 <function>cygwin_conv_path_list</function></funcdef>
 <paramdef>cygwin_conv_path_t <parameter>what</parameter></paramdef>
 <paramdef>const void * <parameter>from</parameter></paramdef>
 <paramdef>void * <parameter>to</parameter></paramdef>
 <paramdef>size_t <parameter>size</parameter></paramdef>
 </funcprototype></funcsynopsis>
+  </refsynopsisdiv>
 
+  <refsect1>
+    <title>Description</title>
 <para>This is the same as <function>cygwin_conv_path</function>, but the
 input is treated as a path list in $PATH or %PATH% notation.</para>
 <para>If <parameter>what</parameter> is CCP_POSIX_TO_WIN_A or
@@ -108,21 +140,40 @@ CCP_WIN_W_TO_POSIX, given a Win32 %PATH%-style string (i.e. d:\;e:\bar)
 convert it to the equivalent POSIX $PATH-style string (i.e. /foo:/bar).</para>
 <para><parameter>size</parameter> is the size of the buffer pointed to by
 <parameter>to</parameter> in bytes.</para>
+  </refsect1>
 
+<refsect1>
+  <title>See also</title>
 <para>See also <link linkend="func-cygwin-conv-path">cygwin_conv_path</link></para>
-
-</sect2>
-
-<sect2 id="func-cygwin-create-path">
-<title>cygwin_create_path</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void *
+  </refsect1>
+</refentry>
+
+<refentry id="func-cygwin-create-path">
+  <refmeta>
+    <refentrytitle>cygwin_create_path</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>cygwin_create_path</refname>
+  </refnamediv>
+
+  <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void *
 <function>cygwin_create_path</function></funcdef>
 <paramdef>cygwin_conv_path_t <parameter>what</parameter></paramdef>
 <paramdef>const void * <parameter>from</parameter></paramdef>
 </funcprototype></funcsynopsis>
+  </refsynopsisdiv>
 
+  <refsect1>
+    <title>Description</title>
 <para>This is equivalent to the <function>cygwin_conv_path</function>, except
 that <function>cygwin_create_path</function> does not take a buffer pointer
 for the result of the conversion as input.  Rather it allocates the buffer
@@ -137,20 +188,39 @@ errno can be set to the below value.</para>
 
 <para>When you don't need the returned buffer anymore, use
 <function>free</function>(3) to deallocate it.</para>
+  </refsect1>
 
+<refsect1>
+  <title>See also</title>
 <para>See also <link linkend="func-cygwin-conv-path">cygwin_conv_path</link></para>
-
-</sect2>
-
-<sect2 id="func-cygwin-posix-path-list-p">
-<title>cygwin_posix_path_list_p</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" int
+  </refsect1>
+</refentry>
+
+<refentry id="func-cygwin-posix-path-list-p">
+  <refmeta>
+    <refentrytitle>cygwin_posix_path_list_p</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>cygwin_posix_path_list_p</refname>
+  </refnamediv>
+
+  <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>int
 <function>cygwin_posix_path_list_p</function></funcdef>
 <paramdef>const char *<parameter>path</parameter></paramdef>
 </funcprototype></funcsynopsis>
+  </refsynopsisdiv>
 
+  <refsect1>
+    <title>Description</title>
 <para>This function tells you if the supplied
 <parameter>path</parameter> is a POSIX-style path (i.e. posix names,
 forward slashes, colon delimiters) or a Win32-style path (drive
@@ -158,25 +228,44 @@ letters, reverse slashes, semicolon delimiters.  The return value is
 true if the path is a POSIX path.  Note that "_p" means "predicate", a
 lisp term meaning that the function tells you something about the
 parameter.</para>
-
-</sect2>
-
-<sect2 id="func-cygwin-split-path">
-<title>cygwin_split_path</title>
-
-<funcsynopsis><funcprototype>
-<funcdef>extern "C" void
+  </refsect1>
+</refentry>
+
+<refentry id="func-cygwin-split-path">
+  <refmeta>
+    <refentrytitle>cygwin_split_path</refentrytitle>
+    <manvolnum>3</manvolnum>
+    <refmiscinfo class="manual">Cygwin API Reference</refmiscinfo>
+  </refmeta>
+
+  <refnamediv>
+    <refname>cygwin_split_path</refname>
+  </refnamediv>
+
+  <refsynopsisdiv>
+<funcsynopsis>
+<funcsynopsisinfo>
+#include &lt;sys/cygwin.h&gt;
+</funcsynopsisinfo>
+<funcprototype>
+<funcdef>void
 <function>cygwin_split_path</function>
 </funcdef>
 <paramdef>const char * <parameter>path</parameter></paramdef>
 <paramdef>char * <parameter>dir</parameter></paramdef>
 <paramdef>char * <parameter>file</parameter></paramdef>
 </funcprototype></funcsynopsis>
+  </refsynopsisdiv>
 
+  <refsect1>
+    <title>Description</title>
 <para>Split a path into the directory and the file portions.  Both
 <parameter>dir</parameter> and <parameter>file</parameter> are
 expected to point to buffers of sufficient size.  </para>
+  </refsect1>
 
+  <refsect1>
+    <title>Example</title>
 <example>
 <title>Example use of cygwin_split_path</title>
 <programlisting>
@@ -185,6 +274,7 @@ cygwin_split_path("c:/foo/bar.c", dir, file);
 printf("dir=%s, file=%s\n", dir, file);
 </programlisting>
 </example>
-</sect2>
+  </refsect1>
+</refentry>
 
 </sect1>
-- 
2.1.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 0/5] Generate cygwin-api manpages
@ 2015-06-17 12:37 Jon TURNEY
  2015-06-17 12:37 ` [PATCH 5/5] winsup/doc: Add man.xsl customization stylesheet Jon TURNEY
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Jon TURNEY @ 2015-06-17 12:37 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon TURNEY

This patch set changes the DocBook source XML for the Cygwin API reference to 
use refentry elements, and also generates man pages from that.

Again, note that after this, the chunked html now has a page for each function, 
rather than one containing all functions.

Jon TURNEY (5):
  winsup/doc: Rename cygwin.xsl as html.xsl
  winsup/doc: Generate ANSI rather than K&R style function prototypes
  winsup/doc: Convert cygwin-api function documentation to refentry
    elements
  winsup/doc: Make and install cygwin-api function manpages
  winsup/doc: Add man.xsl customization stylesheet

 winsup/doc/ChangeLog                |  28 ++++++
 winsup/doc/Makefile.in              |  31 ++++---
 winsup/doc/cygwin-api.xml           |   6 +-
 winsup/doc/fo.xsl                   |   3 +
 winsup/doc/{cygwin.xsl => html.xsl} |   5 +-
 winsup/doc/logon-funcs.xml          |  59 ++++++++++---
 winsup/doc/man.xsl                  |  13 +++
 winsup/doc/misc-funcs.xml           |  81 +++++++++++++----
 winsup/doc/path.xml                 | 172 +++++++++++++++++++++++++++---------
 9 files changed, 318 insertions(+), 80 deletions(-)
 rename winsup/doc/{cygwin.xsl => html.xsl} (85%)
 create mode 100644 winsup/doc/man.xsl

-- 
2.1.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 4/5] winsup/doc: Make and install cygwin-api function manpages
  2015-06-17 12:37 [PATCH 0/5] Generate cygwin-api manpages Jon TURNEY
  2015-06-17 12:37 ` [PATCH 5/5] winsup/doc: Add man.xsl customization stylesheet Jon TURNEY
@ 2015-06-17 12:37 ` Jon TURNEY
  2015-06-19 14:05   ` Jon TURNEY
  2015-06-17 12:37 ` [PATCH 2/5] winsup/doc: Generate ANSI rather than K&R style function prototypes Jon TURNEY
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Jon TURNEY @ 2015-06-17 12:37 UTC (permalink / raw)
  To: cygwin-patches; +Cc: Jon TURNEY

Use 'xmlto man' to make manpages for utils

This will generate multiple .1 files as an output, but we don't know what they
will be called, so use a timestamp for build avoidance

2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>

	* Makefile.in (api2man.stamp): Add rules to build and install
	manpages for cygwin-api.

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
---
 winsup/doc/ChangeLog   |  5 +++++
 winsup/doc/Makefile.in | 13 +++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog
index ddee4e9..4c464b2 100644
--- a/winsup/doc/ChangeLog
+++ b/winsup/doc/ChangeLog
@@ -1,5 +1,10 @@
 2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>
 
+	* Makefile.in (api2man.stamp): Add rules to build and install
+	manpages for cygwin-api.
+
+2015-06-17  Jon Turney  <jon.turney@dronecode.org.uk>
+
 	* cygwin-api.xml: Move introductory paragraph here.
 	* logon-funcs.xml: Convert from using a sect2 element to using a
 	refentry element for each function.
diff --git a/winsup/doc/Makefile.in b/winsup/doc/Makefile.in
index c9e32c8..f308ab2 100644
--- a/winsup/doc/Makefile.in
+++ b/winsup/doc/Makefile.in
@@ -18,6 +18,7 @@ docdir = @docdir@
 htmldir = @htmldir@
 mandir = @mandir@
 man1dir = $(mandir)/man1
+man3dir = $(mandir)/man3
 
 override INSTALL:=@INSTALL@
 override INSTALL_DATA:=@INSTALL_DATA@
@@ -48,7 +49,8 @@ all: Makefile Makefile.dep \
 	faq/faq.body faq/faq.html \
 	cygwin-ug-net/cygwin-ug-net.pdf \
 	cygwin-api/cygwin-api.pdf \
-	utils2man.stamp
+	utils2man.stamp \
+	api2man.stamp
 
 Makefile: $(srcdir)/Makefile.in
 	/bin/sh ./config.status
@@ -58,6 +60,7 @@ clean:
 	rm -f *.html *.html.gz
 	rm -Rf cygwin-api cygwin-ug cygwin-ug-net faq
 	rm -f *.1 utils2man.stamp
+	rm -f *.3 api2man.stamp
 
 install: install-all
 
@@ -75,9 +78,11 @@ install-html: cygwin-ug-net/cygwin-ug-net.html cygwin-api/cygwin-api.html
 	$(INSTALL_DATA) cygwin-api/*.html $(DESTDIR)$(htmldir)/cygwin-api
 	$(INSTALL_DATA) cygwin-api/cygwin-api.html $(DESTDIR)$(htmldir)/cygwin-api/index.html
 
-install-man: utils2man.stamp
+install-man: utils2man.stamp api2man.stamp
 	@$(MKDIRP) $(DESTDIR)$(man1dir)
 	$(INSTALL_DATA) *.1 $(DESTDIR)$(man1dir)
+	@$(MKDIRP) $(DESTDIR)$(man1dir)
+	$(INSTALL_DATA) *.3 $(DESTDIR)$(man3dir)
 
 cygwin-ug-net/cygwin-ug-net-nochunks.html.gz : $(cygwin-ug-net_SOURCES) html.xsl
 	-$(XMLTO) html-nochunks -m $(srcdir)/html.xsl $<
@@ -102,6 +107,10 @@ cygwin-api/cygwin-api.html : $(cygwin-api_SOURCES) html.xsl
 cygwin-api/cygwin-api.pdf : $(cygwin-api_SOURCES) fo.xsl
 	-$(XMLTO) pdf -o cygwin-api/ -m $(srcdir)/fo.xsl $<
 
+api2man.stamp: $(cygwin-api_SOURCES)
+	$(XMLTO) man $<
+	@touch $@
+
 faq/faq.html : $(FAQ_SOURCES)
 	-$(XMLTO) html -o faq -m $(srcdir)/html.xsl $(srcdir)/faq.xml
 	-sed -i 's;<a name="id[mp][0-9]*"></a>;;g' faq/faq.html
-- 
2.1.4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/5] Generate cygwin-api manpages
  2015-06-17 12:37 [PATCH 0/5] Generate cygwin-api manpages Jon TURNEY
                   ` (4 preceding siblings ...)
  2015-06-17 12:37 ` [PATCH 1/5] winsup/doc: Rename cygwin.xsl as html.xsl Jon TURNEY
@ 2015-06-17 13:49 ` Corinna Vinschen
  2015-06-17 15:59   ` Jon TURNEY
  5 siblings, 1 reply; 12+ messages in thread
From: Corinna Vinschen @ 2015-06-17 13:49 UTC (permalink / raw)
  To: cygwin-patches

[-- Attachment #1: Type: text/plain, Size: 938 bytes --]

Hi JOn,

On Jun 17 13:37, Jon TURNEY wrote:
> This patch set changes the DocBook source XML for the Cygwin API reference to 
> use refentry elements, and also generates man pages from that.
> 
> Again, note that after this, the chunked html now has a page for each function, 
> rather than one containing all functions.

Patchset approved, basically, except...

The next cygwin.cygport file will explicitely exclude the man pages
section 1.  But it won't exclude section 3, and I'm rather not hot
on excluding each newly generated API file explicitely.

Do you have an idea how far away we are from including the cygwin-doc
package into the cygwin package set?  I'm not planning a new release
very soon, so we can coordinate that without pressure.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/5] Generate cygwin-api manpages
  2015-06-17 13:49 ` [PATCH 0/5] Generate cygwin-api manpages Corinna Vinschen
@ 2015-06-17 15:59   ` Jon TURNEY
  2015-06-17 16:28     ` Corinna Vinschen
  0 siblings, 1 reply; 12+ messages in thread
From: Jon TURNEY @ 2015-06-17 15:59 UTC (permalink / raw)
  To: cygwin-patches

On 17/06/2015 14:49, Corinna Vinschen wrote:
> On Jun 17 13:37, Jon TURNEY wrote:
>> This patch set changes the DocBook source XML for the Cygwin API reference to
>> use refentry elements, and also generates man pages from that.
>>
>> Again, note that after this, the chunked html now has a page for each function,
>> rather than one containing all functions.
>
> Patchset approved, basically, except...
>
> The next cygwin.cygport file will explicitly exclude the man pages
> section 1.  But it won't exclude section 3, and I'm rather not hot
> on excluding each newly generated API file explicitly.

Yes, I hadn't noticed that regex.3 manpage, which makes things a bit of 
a pain.

But maybe you write in cygwin_devel_CONTENTS something like 
"--exclude=usr/share/man/ usr/share/man/man3/regex.3.gz 
usr/share/man/man7/regex.7.gz" ?

> Do you have an idea how far away we are from including the cygwin-doc
> package into the cygwin package set?  I'm not planning a new release
> very soon, so we can coordinate that without pressure.

After this patch set, the remaining things are:

* newlib libc and libm .info documentation

I think this just needs 'make info' adding to the .cygport, as newlib 
doesn't build this on 'make all'

* intro.1 and intro.3 man pages for Cygwin, handwritten

If these are worth keeping, this is straightforward

* Cygwin User's Guide and API reference texinfo, generated from the 
DocBook XML

as is this

* man pages for newlib functions

But this is a substantial piece of work.  Currently, I'm not even sure 
how this can be done in an upstreamable way.

I am experimenting with building an alternative to the makedoc tool, 
which generates DocBook XML rather than .texinfo, which can then be 
processed into manpages and other formats, but this is far from complete.


If the suggestion above doesn't work, I guess possible approaches to 
coordination are:

* Move regex.[37] from cygwin-devel to cygwin-doc, and exclude 
/usr/share/man

* Assuming I can finish the first 3 items on that list before the next 
cygwin release, move the newlib manpages to a new package 
(man-pages-newlib?) and make that a dependency of cygwin-doc.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/5] Generate cygwin-api manpages
  2015-06-17 15:59   ` Jon TURNEY
@ 2015-06-17 16:28     ` Corinna Vinschen
  2015-06-18 10:46       ` Jon TURNEY
  0 siblings, 1 reply; 12+ messages in thread
From: Corinna Vinschen @ 2015-06-17 16:28 UTC (permalink / raw)
  To: cygwin-patches

[-- Attachment #1: Type: text/plain, Size: 3031 bytes --]

On Jun 17 16:59, Jon TURNEY wrote:
> On 17/06/2015 14:49, Corinna Vinschen wrote:
> >On Jun 17 13:37, Jon TURNEY wrote:
> >>This patch set changes the DocBook source XML for the Cygwin API reference to
> >>use refentry elements, and also generates man pages from that.
> >>
> >>Again, note that after this, the chunked html now has a page for each function,
> >>rather than one containing all functions.
> >
> >Patchset approved, basically, except...
> >
> >The next cygwin.cygport file will explicitly exclude the man pages
> >section 1.  But it won't exclude section 3, and I'm rather not hot
> >on excluding each newly generated API file explicitly.
> 
> Yes, I hadn't noticed that regex.3 manpage, which makes things a bit of a
> pain.
> 
> But maybe you write in cygwin_devel_CONTENTS something like
> "--exclude=usr/share/man/ usr/share/man/man3/regex.3.gz
> usr/share/man/man7/regex.7.gz" ?

exclude?  This would require to move both files to cygwin-doc
as you outlined below.  It would essentially remove all man pages
from the cygwin core packages and then we exclude usr/share/man,
as you outlined below as well.

So...

> >Do you have an idea how far away we are from including the cygwin-doc
> >package into the cygwin package set?  I'm not planning a new release
> >very soon, so we can coordinate that without pressure.
> 
> After this patch set, the remaining things are:
> 
> * newlib libc and libm .info documentation
> 
> I think this just needs 'make info' adding to the .cygport, as newlib
> doesn't build this on 'make all'

  libc.info and libm.info are built by default, but they are not
  installed with `make install'

> * intro.1 and intro.3 man pages for Cygwin, handwritten
> 
> If these are worth keeping, this is straightforward
> 
> * Cygwin User's Guide and API reference texinfo, generated from the DocBook
> XML
> 
> as is this

  Isn't the HTML documentation sufficient?  I'm not opposed to
  keeping the texinfo's, just wondering.
> 
> * man pages for newlib functions
> 
> But this is a substantial piece of work.  Currently, I'm not even sure how
> this can be done in an upstreamable way.
> 
> I am experimenting with building an alternative to the makedoc tool, which
> generates DocBook XML rather than .texinfo, which can then be processed into
> manpages and other formats, but this is far from complete.
> 
> 
> If the suggestion above doesn't work, I guess possible approaches to
> coordination are:
> 
> * Move regex.[37] from cygwin-devel to cygwin-doc, and exclude
> /usr/share/man

... this sounds good to me.

> * Assuming I can finish the first 3 items on that list before the next
> cygwin release, move the newlib manpages to a new package
> (man-pages-newlib?) and make that a dependency of cygwin-doc.

As I wrote, no stress.


Thanks,
Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/5] Generate cygwin-api manpages
  2015-06-17 16:28     ` Corinna Vinschen
@ 2015-06-18 10:46       ` Jon TURNEY
  2015-06-18 20:05         ` Corinna Vinschen
  0 siblings, 1 reply; 12+ messages in thread
From: Jon TURNEY @ 2015-06-18 10:46 UTC (permalink / raw)
  To: cygwin-patches

On 17/06/2015 17:27, Corinna Vinschen wrote:
> On Jun 17 16:59, Jon TURNEY wrote:
>> On 17/06/2015 14:49, Corinna Vinschen wrote:
>>> On Jun 17 13:37, Jon TURNEY wrote:
>>>> This patch set changes the DocBook source XML for the Cygwin API reference to
>>>> use refentry elements, and also generates man pages from that.
>>>>
>>>> Again, note that after this, the chunked html now has a page for each function,
>>>> rather than one containing all functions.
>>>
>>> Patchset approved, basically, except...
>>>
>>> The next cygwin.cygport file will explicitly exclude the man pages
>>> section 1.  But it won't exclude section 3, and I'm rather not hot
>>> on excluding each newly generated API file explicitly.
>>
>> Yes, I hadn't noticed that regex.3 manpage, which makes things a bit of a
>> pain.
>>
>> But maybe you write in cygwin_devel_CONTENTS something like
>> "--exclude=usr/share/man/ usr/share/man/man3/regex.3.gz
>> usr/share/man/man7/regex.7.gz" ?
>
> exclude?  This would require to move both files to cygwin-doc
> as you outlined below.  It would essentially remove all man pages
> from the cygwin core packages and then we exclude usr/share/man,
> as you outlined below as well.

Hmm?  I thought perhaps this would exclude everything under 
usr/share/man, then include regex.3 and regex.7

But I don't think tar processes it's options left-to-right like that, so 
never mind.

>>> Do you have an idea how far away we are from including the cygwin-doc
>>> package into the cygwin package set?  I'm not planning a new release
>>> very soon, so we can coordinate that without pressure.
>>
>> After this patch set, the remaining things are:
>>
>> * newlib libc and libm .info documentation
>>
>> I think this just needs 'make info' adding to the .cygport, as newlib
>> doesn't build this on 'make all'
>
>    libc.info and libm.info are built by default, but they are not
>    installed with `make install'

That seems a little odd.

>> * intro.1 and intro.3 man pages for Cygwin, handwritten
>>
>> If these are worth keeping, this is straightforward
>>
>> * Cygwin User's Guide and API reference texinfo, generated from the DocBook
>> XML
>>
>> as is this
>
>    Isn't the HTML documentation sufficient?  I'm not opposed to
>    keeping the texinfo's, just wondering.

It's there currently and it's really not much work to keep it.

>> * man pages for newlib functions
>>
>> But this is a substantial piece of work.  Currently, I'm not even sure how
>> this can be done in an upstreamable way.
>>
>> I am experimenting with building an alternative to the makedoc tool, which
>> generates DocBook XML rather than .texinfo, which can then be processed into
>> manpages and other formats, but this is far from complete.
>>
>>
>> If the suggestion above doesn't work, I guess possible approaches to
>> coordination are:
>>
>> * Move regex.[37] from cygwin-devel to cygwin-doc, and exclude
>> /usr/share/man
>
> ... this sounds good to me.

Let's do things that way, then.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/5] Generate cygwin-api manpages
  2015-06-18 10:46       ` Jon TURNEY
@ 2015-06-18 20:05         ` Corinna Vinschen
  0 siblings, 0 replies; 12+ messages in thread
From: Corinna Vinschen @ 2015-06-18 20:05 UTC (permalink / raw)
  To: cygwin-patches

[-- Attachment #1: Type: text/plain, Size: 2448 bytes --]

On Jun 18 11:46, Jon TURNEY wrote:
> On 17/06/2015 17:27, Corinna Vinschen wrote:
> >On Jun 17 16:59, Jon TURNEY wrote:
> >>On 17/06/2015 14:49, Corinna Vinschen wrote:
> >>>On Jun 17 13:37, Jon TURNEY wrote:
> >>>>This patch set changes the DocBook source XML for the Cygwin API reference to
> >>>>use refentry elements, and also generates man pages from that.
> >>>>
> >>>>Again, note that after this, the chunked html now has a page for each function,
> >>>>rather than one containing all functions.
> >>>
> >>>Patchset approved, basically, except...
> >>>
> >>>The next cygwin.cygport file will explicitly exclude the man pages
> >>>section 1.  But it won't exclude section 3, and I'm rather not hot
> >>>on excluding each newly generated API file explicitly.
> >>
> >>Yes, I hadn't noticed that regex.3 manpage, which makes things a bit of a
> >>pain.
> >>
> >>But maybe you write in cygwin_devel_CONTENTS something like
> >>"--exclude=usr/share/man/ usr/share/man/man3/regex.3.gz
> >>usr/share/man/man7/regex.7.gz" ?
> >
> >exclude?  This would require to move both files to cygwin-doc
> >as you outlined below.  It would essentially remove all man pages
> >from the cygwin core packages and then we exclude usr/share/man,
> >as you outlined below as well.
> 
> Hmm?  I thought perhaps this would exclude everything under usr/share/man,
> then include regex.3 and regex.7

I just tried it and it works.  So that's an option for the time being,
I guess.  Btw., I added a tweak to Makefile.in to skip *.3 and *.7 files
in the release dir :)

> >>I think this just needs 'make info' adding to the .cygport, as newlib
> >>doesn't build this on 'make all'
> >
> >   libc.info and libm.info are built by default, but they are not
> >   installed with `make install'
> 
> That seems a little odd.

Indeed, but that could be done manually in the cygport file if required.
I'm not that close to the newlib build system...

> >>If the suggestion above doesn't work, I guess possible approaches to
> >>coordination are:
> >>
> >>* Move regex.[37] from cygwin-devel to cygwin-doc, and exclude
> >>/usr/share/man
> >
> >... this sounds good to me.
> 
> Let's do things that way, then.

Or the above, whatever is easier for the start.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 4/5] winsup/doc: Make and install cygwin-api function manpages
  2015-06-17 12:37 ` [PATCH 4/5] winsup/doc: Make and install cygwin-api function manpages Jon TURNEY
@ 2015-06-19 14:05   ` Jon TURNEY
  0 siblings, 0 replies; 12+ messages in thread
From: Jon TURNEY @ 2015-06-19 14:05 UTC (permalink / raw)
  To: Cygwin Patches

On 17/06/2015 13:37, Jon TURNEY wrote:
> Use 'xmlto man' to make manpages for utils

> -install-man: utils2man.stamp
> +install-man: utils2man.stamp api2man.stamp
>   	@$(MKDIRP) $(DESTDIR)$(man1dir)
>   	$(INSTALL_DATA) *.1 $(DESTDIR)$(man1dir)
> +	@$(MKDIRP) $(DESTDIR)$(man1dir)
> +	$(INSTALL_DATA) *.3 $(DESTDIR)$(man3dir)

I made a cut and paste errror here.  I've pushed the obvious fix.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-06-19 14:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17 12:37 [PATCH 0/5] Generate cygwin-api manpages Jon TURNEY
2015-06-17 12:37 ` [PATCH 5/5] winsup/doc: Add man.xsl customization stylesheet Jon TURNEY
2015-06-17 12:37 ` [PATCH 4/5] winsup/doc: Make and install cygwin-api function manpages Jon TURNEY
2015-06-19 14:05   ` Jon TURNEY
2015-06-17 12:37 ` [PATCH 2/5] winsup/doc: Generate ANSI rather than K&R style function prototypes Jon TURNEY
2015-06-17 12:37 ` [PATCH 3/5] winsup/doc: Convert cygwin-api function documentation to refentry elements Jon TURNEY
2015-06-17 12:37 ` [PATCH 1/5] winsup/doc: Rename cygwin.xsl as html.xsl Jon TURNEY
2015-06-17 13:49 ` [PATCH 0/5] Generate cygwin-api manpages Corinna Vinschen
2015-06-17 15:59   ` Jon TURNEY
2015-06-17 16:28     ` Corinna Vinschen
2015-06-18 10:46       ` Jon TURNEY
2015-06-18 20:05         ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).