upload tizen2.0 source 2.0alpha master 2.0_alpha submit/master/20120920.151132
authorBoram Park <boram1288.park@samsung.com>
Tue, 21 Aug 2012 09:04:27 +0000 (18:04 +0900)
committerBoram Park <boram1288.park@samsung.com>
Tue, 21 Aug 2012 09:04:27 +0000 (18:04 +0900)
54 files changed:
ChangeLog [changed mode: 0755->0644]
INSTALL [new file with mode: 0644]
Makefile.am [changed mode: 0755->0644]
NEWS [deleted file]
README [changed mode: 0755->0644]
autogen.sh [deleted file]
configure.ac [changed mode: 0755->0644]
debian/README.source [deleted file]
debian/changelog [deleted file]
debian/compat [deleted file]
debian/control [deleted file]
debian/copyright [deleted file]
debian/libice-dev.install [deleted file]
debian/libice6.install [deleted file]
debian/libice6.shlibs [deleted file]
debian/rules [deleted file]
debian/watch [deleted file]
debian/xsfbs/repack.sh [deleted file]
debian/xsfbs/xsfbs.mk [deleted file]
debian/xsfbs/xsfbs.sh [deleted file]
doc/ICElib.xml [changed mode: 0755->0644]
doc/Makefile.am [changed mode: 0755->0644]
docbook.am [new file with mode: 0644]
include/X11/ICE/ICE.h [changed mode: 0755->0644]
include/X11/ICE/ICEconn.h [changed mode: 0755->0644]
include/X11/ICE/ICElib.h [changed mode: 0755->0644]
include/X11/ICE/ICEmsg.h [changed mode: 0755->0644]
include/X11/ICE/ICEproto.h [changed mode: 0755->0644]
include/X11/ICE/ICEutil.h [changed mode: 0755->0644]
packaging/libICE.spec
specs/Makefile.am [changed mode: 0755->0644]
specs/ice.xml [changed mode: 0755->0644]
src/ICElibint.h [changed mode: 0755->0644]
src/Makefile.am [changed mode: 0755->0644]
src/accept.c [changed mode: 0755->0644]
src/authutil.c [changed mode: 0755->0644]
src/connect.c [changed mode: 0755->0644]
src/error.c [changed mode: 0755->0644]
src/getauth.c [changed mode: 0755->0644]
src/globals.h [changed mode: 0755->0644]
src/iceauth.c [changed mode: 0755->0644]
src/icetrans.c [changed mode: 0755->0644]
src/listen.c [changed mode: 0755->0644]
src/listenwk.c [changed mode: 0755->0644]
src/locking.c [changed mode: 0755->0644]
src/misc.c [changed mode: 0755->0644]
src/ping.c [changed mode: 0755->0644]
src/process.c [changed mode: 0755->0644]
src/protosetup.c [changed mode: 0755->0644]
src/register.c [changed mode: 0755->0644]
src/replywait.c [changed mode: 0755->0644]
src/setauth.c [changed mode: 0755->0644]
src/shutdown.c [changed mode: 0755->0644]
src/watch.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 8c91b64..ba78679
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,555 @@
+commit f166e8bbf16ec214fefdcf02ce81f80442899cb7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Mar 2 19:59:50 2012 -0800
+
+    libICE 1.0.8
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit c87ecd959d61ae97d8a2bd82efc761bb3e299061
+Author: Matt Dew <marcoz@osource.org>
+Date:   Mon Jan 9 21:25:18 2012 -0700
+
+    informaltable cleanup
+
+    On certain tables, add top and bottom borders to table header
+    and a bottom border to the table. This matches what those
+    tables in the old pdfs looked like.
+
+    the <?dbfo keep-together='always'> prevents tables from
+    splitting across pages. Useful for tiny tables.
+
+    Converting the colwidth to a floating point, IE, 1* -> 1.0*
+    cleans up these build errors:
+    WARNING: table-layout="fixed" and column-width unspecified =>
+    falling back to proportional-column-width(1)
+
+    Signed-off-by: Matt Dew <marcoz@osource.org>
+
+commit 8b4321a37a9fa2ad24bf87afabba6b08dcfded12
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Thu Nov 24 12:42:36 2011 -0800
+
+    Plug minor memory leak in unusual path through ProcessConnectionSetup
+
+    Error: Memory leak (CWE 401)
+       Memory leak of pointer 'release' allocated with malloc((_len + 1))
+            at line 1100 of src/process.c in function 'ProcessConnectionSetup'.
+              'release' allocated at line 920 with malloc((_len + 1)).
+              release leaks when _i >= hisAuthCount at line 925
+                  and i >= _IceAuthCount at line 973
+                  and found != 0 at line 998
+                  and status != 0 at line 1053
+                  and status != 1 at line 1070
+                  and accept_setup_now == 0 at line 1082
+                  and i >= hisAuthCount at line 1093.
+       Memory leak of pointer 'vendor' allocated with malloc((_len + 1))
+            at line 1100 of src/process.c in function 'ProcessConnectionSetup'.
+              'vendor' allocated at line 919 with malloc((_len + 1)).
+              vendor leaks when _i >= hisAuthCount at line 925
+                  and i >= _IceAuthCount at line 973
+                  and found != 0 at line 998
+                  and status != 0 at line 1053
+                  and status != 1 at line 1070
+                  and accept_setup_now == 0 at line 1082
+                  and i >= hisAuthCount at line 1093.
+
+    [ This bug was found by the Parfait 0.3.7 bug checking tool.
+      For more information see http://labs.oracle.com/projects/parfait/ ]
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit caf9e3393d5d517ea129392d001a2c46a7c1f325
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Nov 19 00:26:29 2011 -0800
+
+    Constify protocol, vendor & release string args to IceRegisterForProtocol*
+
+    Needed to resolve gcc -Wwrite-strings warnings in callers.
+    These functions only pass the strings to strcmp before calling
+    strdup to make their own private copy for storing away.
+
+    While fixing the API docs to match, also fix them to match the existing
+    function prototypes, where there were several errors before (including
+    just plain missing most of the args to IceRegisterForProtocolReply).
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 59c1555dff34804c78c7e7443ad13f27300927eb
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Nov 9 22:07:34 2011 -0800
+
+    Remove ancient workaround for System V/386 Release 4.2 compiler bug
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
+    Reviewed-by: walter <wharms@bfs.de>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit bec4e9c9089fa4cc5a50fc513a3544cf6fd59bf1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Nov 9 22:06:36 2011 -0800
+
+    Fix gcc -Wwrite-strings warnings in process.c
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit ffa659dd6dd1fb8847bfdcc5e1e2be353b6395b6
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Nov 9 21:37:48 2011 -0800
+
+    Fix gcc -Wwrite-strings warnings in AuthNames handling
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 902a52ea9d7b6e6f56f7023009859072854a0fc7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Nov 9 21:55:17 2011 -0800
+
+    constify arguments to IceGetAuthFileEntry
+
+    Needed to clear gcc -Wwrite-strings warnings in callers
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 9ff1f97e46903f8f83363f07cf021989bfa6a9f0
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Nov 9 21:43:59 2011 -0800
+
+    Fix gcc -Wwrite-strings warnings in _IceError* functions
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit e8a16534a9406d5096d9c0ea515d979c7c15e084
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Wed Nov 9 21:23:33 2011 -0800
+
+    Fix gcc -Wwrite-strings warnings in _IceDefaultErrorHandler
+
+    Had to split char *str into two variables, const char *str for the
+    string literals just being passed to fprintf etal.  and char *estr
+    for use by EXTRACT_STRING for the results of malloc calls that get
+    written to and then freed.
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 4fbcba4ee19a49c05440861e1278bc97d29048e0
+Author: Matt Dew <marcoz@osource.org>
+Date:   Tue Oct 4 23:32:02 2011 -0600
+
+    Cleanup IDs and links in doc
+
+    1 - fix the capitalization of the ID attributes to match either the
+         <title> or <funcdef> string it goes with.
+    2 - fix any <linkend>'s that were affected by 1.
+    3 - any <function> in the docs that has an actual funcdef,
+    will become an olink.
+
+    Signed-off-by: Matt Dew <marcoz@osource.org>
+
+commit d4e161e35335df82f412d2d2bb1ef95ff3e88401
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Mon Sep 19 15:34:47 2011 -0400
+
+    As of 1997, X Window System is a trademark of The Open Group.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit fc0fc948d25dfa0f6f445a3b55610ea5b864dd60
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Sep 16 22:09:18 2011 -0700
+
+    Strip trailing whitespace
+
+    Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
+    git diff -w & git diff -b show no diffs from this change
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 22601de3f38d035eb874d4bd9f649ddd2b3f0ae2
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Sep 11 17:20:20 2011 -0400
+
+    specs: remove <productnumber> which is not used by default
+
+    This element is not rendered by default on the title. A template
+    customization is required to display it.
+    X Window System does not have a product number.
+
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 7f330738f1f5862950b3baa35ff08446093bfd4e
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Sep 11 17:06:00 2011 -0400
+
+    specs: use DocBook suggested markup for Copyrights
+
+    Puts the statement on a single line, using commas to separate years
+       --> Copyright Â© 1993, 1994, 1996 X Consortium
+
+    As opposed to 3 double-spaced lines.
+
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit d68d2d2031f623a969784e702c97a07b8cd99010
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Sep 11 16:56:21 2011 -0400
+
+    specs: remove orphan <corpname>
+
+    It does not display on the title page and is redundant.
+    No visible change on the doc.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 87c934b9b7973a814763670e2dfad0579a8dcc78
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Sep 11 16:27:09 2011 -0400
+
+    specs: use the &fullrelvers; entity to set X11 release information
+
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 41f04fd8673db5c2d8e587ab2c169a694bd7528f
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Sep 11 14:13:35 2011 -0400
+
+    ice.xml: version number is 1.1, not 1.0
+
+    This is what it was before the conversion from roff to docbook.
+
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 9e2a596b4ff06fc9c70dfcd94506e536e351ee0b
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Sep 11 14:11:28 2011 -0400
+
+    ice.xml: fix orphan affiliation
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 1309d477a061d165345b602e122990eaab71a0d4
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Sep 9 21:21:57 2011 -0400
+
+    ICElib doc: remove empty revision list and specify the doc version number
+
+    Revision histories are not used, only 3 docs out of 63 have one.
+
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit e9d57773df26ad9440a49f58941b511e594605a4
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Thu Sep 8 20:00:00 2011 -0400
+
+    docbook.am: embed css styles inside the HTML HEAD element
+
+    Rather than referring to the external xorg.css stylesheet, embed the content
+    of the file in the html output produced. This is accomplished by using
+    version 1.10 of xorg-xhtml.xsl.
+
+    This makes the whole html docs tree much more relocatable.
+    In addition, it eliminates xorg.css as a runtime file which makes
+    xorg-sgml-doctools a build time only package.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit b83cbed755315f6300133f2621cbe99bdc06345a
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Sep 7 10:31:04 2011 -0400
+
+    docbook.am: global maintenance update - entities, images and olinking
+
+    Adding support in libX11 for html chunking caused a reorg of docbook.am
+    as well as the xorg-sgml-doctools masterdb for olinking.
+    The parameter img.src.path is added for pdf images.
+    A searchpath to the root builddir is added for local entities, if present.
+
+    The docbook.am makefile hides all the details and is identical for
+    all 22 modules having DocBook documentation. It is included by a thin
+    Makefile.am which requires no docbook knowledge.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit f35b8b8be16f1903beed34fe23fa53d102329342
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Jun 12 17:54:50 2011 -0400
+
+    Install xml versions of specs even if HAVE_XMLTO is false
+
+    DocBook/XML input source is also a usefull output format that can be viewed
+    with an XML viewer or editor and by some O/S help system.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 4c9cbdb1b40799121456c692d960135d741f13c7
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Jun 5 16:27:36 2011 -0400
+
+    Install target dbs alongside generated documents
+
+    This matches a change in xorg-sgml-docs whereby the masterdb will look for
+    the target dbs into the same location as the generated documents.
+
+    The target dbs are now installed alongside the generated documents.
+    Previously they are installed in $prefix/sgml/X11/dbs alongside masterdb which
+    has the potential of installing outside the package prefix and cause
+    distcheck to fail when user does not have write permission in this package.
+
+    Requires XORG_CHECK_SGML_DOCTOOLS(1.8) which was released 2011-06-11
+
+commit 72d668dd2ec4db9b75973ba24f42ab49851dbc6d
+Author: Matt Dew <marcoz@osource.org>
+Date:   Wed May 25 22:54:51 2011 -0600
+
+    add id attributes to funcsynopsis to allow other docs to olink to them
+
+    Signed-off-by: Matt Dew <marcoz@osource.org>
+    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit dd7f2beaa753541aefba499813f25de38cbd17b7
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Apr 19 18:36:58 2011 -0700
+
+    IceWritePad: Zero fill pad bytes used when buffer is full
+
+    Should be rarely hit, since it's only in the case where most of the
+    message fits in the buffer, but there's not room left for the padding
+    bytes, but better than sending uninitialized bytes off the stack when
+    it happens.
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 663782989be82e7893c99eaa7cbe98ec25a23c38
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Apr 19 18:19:19 2011 -0700
+
+    Fix reads outside array bounds in error handlers
+
+    Error: Buffer overrun
+       Read outside array bounds (CWE 125): In call to memcpy(<unknown>, &mOp, 8), (size(&mOp) < (unsigned) 8)
+          Array size is 1 bytes
+            at line 296 of src/error.c in function '_IceErrorMajorOpcodeDuplicate'.
+    Error: Buffer overrun
+       Read outside array bounds (CWE 125): In call to memcpy(<unknown>, &maj, 8), (size(&maj) < (unsigned) 8)
+          Array size is 1 bytes
+            at line 346 of src/error.c in function '_IceErrorBadMajor'.
+
+    [ This bug was found by the Parfait 0.3.7 bug checking tool.
+      For more information see http://labs.oracle.com/projects/parfait/ ]
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit daf686b7639919289b07a575a0d88efcb91d9732
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Mar 30 20:15:07 2011 -0400
+
+    doc: xorg-sgml-doctools package at version 1.7 is required
+
+    This version contains support for external references
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit fadb927532556adb471300c89de29d268aae9102
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Sun Feb 27 15:06:18 2011 -0500
+
+    Documentation: add Docbook external references support
+
+    When writing technical documentation, it is often necessary to cross
+    reference to other information. When that other information is not in the
+    current document, additional support is needed, namely <olink>.
+
+    A new feature with version 1.7 of xorg-sgml-doctools adds references to
+    other documents within or outside this package.
+
+    This patch adds technical support for this feature but does not change
+    the content of the documentation as seen by the end user.
+
+    Each book or article must generate a database containing the href
+    of sections that can be referred to from another document. This database
+    is installed in DATAROOTDIR/sgml/X11/dbs. There is a requirement that
+    the value of DATAROOTDIR for xorg-sgml-doctools and for the package
+    documentation is the same. This forms a virtual document tree.
+
+    This database is consulted by other documents while they are being generated
+    in order to fulfill the missing information for linking.
+    Refer to the xorg-sgml-doctools for further technical information.
+
+    Co-authored-by: Matt Dew <marcoz@osource.org>
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 483d32621c06bcba0c7aa7794633b46b151fd5bf
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Feb 25 08:58:54 2011 -0500
+
+    Docbook: change the book id to match the xml file basename
+
+    This is required for the up-coming external references support.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 4852c5bb1603fb6d401fe6895d9318555a8d4523
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Feb 2 19:13:54 2011 -0500
+
+    config: splitting ICE and XTRANS compiler options is not required
+
+    Simplify configuration by using a single PKG_CHECK_MODULES statement.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 87d34a2f04c9d920da01802cd9707c8107746fa5
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Wed Feb 2 11:43:40 2011 -0500
+
+    config: comment, minor upgrade, quote and layout configure.ac
+
+    Group statements per section as per Autoconf standard layout
+    Quote statements where appropriate.
+    Autoconf recommends not using dnl instead of # for comments
+
+    Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters.
+
+    This helps automated maintenance and release activities.
+    Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 548eded10385ccc336e66dac8bbabe05f3225ec2
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Fri Jan 28 14:42:12 2011 -0500
+
+    config: remove unrequired AC_HEADER_STDC
+
+    Autoconf says:
+    "This macro is obsolescent, as current systems have conforming
+    header files. New programs need not use this macro".
+
+commit 78b8e6b772685a2ed567ac2d30f96116f050dad5
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Fri Jan 7 19:29:03 2011 -0800
+
+    Resync fallback asprintf with updated version put into xrdb
+
+    Fixes issues found during xrdb review on xorg-devel
+    Also make sure <stdarg.h> is #included for varargs macros
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit dc63c253e33b1012c08cd274e6e37bf0fa87c624
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Tue Dec 21 18:28:36 2010 -0800
+
+    Add AC_USE_SYSTEM_EXTENSIONS to make asprintf() visible in GNU libc
+
+    asprintf is considered a GNU extension and thus one needs to define
+    _GNU_SOURCE before including stdio.h.
+
+    Reported-by: Cyril Brulebois <kibi@debian.org>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
+    Reviewed-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 4b4ec3aeaa7cf5f5a6490ad2ddc2b07d090214cb
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Dec 19 09:57:05 2010 -0800
+
+    Use correct string pointer in asprintf() fallback
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 308c8d3d5fbf96c1d4f313def50d4b001ac0d685
+Author: Paulo Zanoni <przanoni@gmail.com>
+Date:   Fri Dec 17 14:59:22 2010 -0200
+
+    Remove useless line from a table in specs/ice.xml
+
+    This seems to be a leftover from a manpage/groff conversion.
+
+    Signed-off-by: Paulo Zanoni <pzanoni@mandriva.com>
+    Reviewed-by: Matt Dew
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a72467b21662a63c81418731b540a8843d138750
+Author: Paulo Zanoni <pzanoni@mandriva.com>
+Date:   Thu Dec 16 13:59:52 2010 -0200
+
+    Use docbookx.dtd version 4.3 for all docs
+
+    Signed-off-by: Paulo Zanoni <pzanoni@mandriva.com>
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit e0280caf7cc9d0e1c2df3ab7c5a4fbe4e42696a9
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sun Dec 5 01:15:42 2010 -0800
+
+    Convert src/process.c from malloc + sprintf to asprintf
+
+    Includes simple local implemenation of asprintf if configure doesn't
+    find one in system libraries
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+    Reviewed-by: Julien Cristau <jcristau@debian.org>
+
+commit a5669dcb488db19b1ba4f1ef4d4565b6c3d1ea09
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Nov 20 19:47:53 2010 -0800
+
+    config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
+
+    Regroup AC statements under the Autoconf initialization section.
+    Regroup AM statements under the Automake initialization section.
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d902a9f27369fc8388774e73f4bee6ab0ad86ef5
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date:   Sat Nov 20 19:45:42 2010 -0800
+
+    config: Remove unnecessary calls from configure.ac
+
+    AC_PROG_CC is provided by XORG_DEFAULT_OPTIONS now
+    PKG_CONFIG_MODULES handles AC_SUBST of the CFLAGS & LIBS variables
+
+    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit fd56c4e00a564d6385ccb2f8fadf10de201ae411
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date:   Tue Nov 9 11:28:48 2010 -0500
+
+    config: HTML file generation: use the installed copy of xorg.css
+
+    Currenlty the xorg.css file is copied in each location
+    where a DocBook/XML file resides. This produces about
+    70 copies in the $(docdir) install tree.
+
+    Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit 9856f5679b2b2d458cf830c1e8fdd206c724dfc5
+Author: Adam Jackson <ajax@redhat.com>
+Date:   Tue Oct 19 11:19:08 2010 -0400
+
+    libICE 1.0.7
+
+    Signed-off-by: Adam Jackson <ajax@redhat.com>
+
 commit 59a8d5609398824c81b72deb82735a55332ca239
 Author: Jeremy Huddleston <jeremyhu@apple.com>
 Date:   Sun Oct 17 21:26:31 2010 -0700
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..c9fd2c0
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,290 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
+2006, 2007, 2008 Free Software Foundation, Inc.
+
+   This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+   Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.
+
+  5. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  6. Often, you can also type `make uninstall' to remove the installed
+     files again.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX'.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf bug.  Until the bug is fixed you can use this workaround:
+
+     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/NEWS b/NEWS
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/README b/README
old mode 100755 (executable)
new mode 100644 (file)
index 1ed24f2..0b6ffac
--- a/README
+++ b/README
@@ -3,7 +3,7 @@ libICE - Inter-Client Exchange Library
 Documentation for this API can be found in the doc directory of the source
 code, or online at:
 
-       http://xorg.freedesktop.org/releases/X11R7.0/doc/PDF/ICElib.pdf 
+       http://xorg.freedesktop.org/releases/X11R7.0/doc/PDF/ICElib.pdf
 
 All questions regarding this software should be directed at the
 Xorg mailing list:
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100644 (file)
index 904cd67..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#! /bin/sh
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-
-ORIGDIR=`pwd`
-cd $srcdir
-
-autoreconf -v --install || exit 1
-cd $ORIGDIR || exit $?
-
-$srcdir/configure --enable-maintainer-mode "$@"
old mode 100755 (executable)
new mode 100644 (file)
index 172b885..ad42a56
@@ -1,57 +1,53 @@
-#                                               -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
 
+# Initialize Autoconf
 AC_PREREQ([2.60])
-AC_INIT([libICE],
-        [1.0.7],
-        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
-        [libICE])
-
+AC_INIT([libICE], [1.0.8],
+        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libICE])
 AC_CONFIG_SRCDIR([Makefile.am])
-AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AC_CONFIG_HEADERS([config.h])
+
+# Set common system defines for POSIX extensions, such as _GNU_SOURCE
+# Must be called before any macros that run the compiler (like
+# AC_PROG_LIBTOOL or XORG_DEFAULT_OPTIONS) to avoid autoconf errors.
+AC_USE_SYSTEM_EXTENSIONS
 
+# Initialize Automake
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
 AM_MAINTAINER_MODE
-AM_CONFIG_HEADER([config.h])
 
-# Require xorg-macros minimum of 1.10 for DocBook XML documentation
+# Initialize libtool
+AC_PROG_LIBTOOL
+
+# Require xorg-macros minimum of 1.12 for DocBook external references
 m4_ifndef([XORG_MACROS_VERSION],
-          [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.10)
+          [m4_fatal([must install xorg-macros 1.12 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.12)
 XORG_DEFAULT_OPTIONS
 XORG_ENABLE_DOCS
 XORG_ENABLE_SPECS
-XORG_WITH_XMLTO(0.0.20)
+XORG_WITH_XMLTO(0.0.22)
 XORG_WITH_FOP
-XORG_CHECK_SGML_DOCTOOLS(1.5)
+XORG_WITH_XSLTPROC
+XORG_CHECK_SGML_DOCTOOLS(1.8)
 
-# Checks for programs.
-AC_PROG_LIBTOOL
-AC_PROG_CC
-
-# Checks for pkg-config packages
-PKG_CHECK_MODULES(ICE, xproto)
-
-PKG_CHECK_MODULES(XTRANS, xtrans)
-AC_SUBST(XTRANS_CFLAGS)
-AC_SUBST(XTRANS_LIBS)
+# Obtain compiler/linker options for depedencies
+PKG_CHECK_MODULES(ICE, xproto xtrans)
 
 # Transport selection macro from xtrans.m4
 XTRANS_CONNECTION_FLAGS
 AC_DEFINE(ICE_t, 1, [Xtrans transport type])
 
-# Checks for libraries.
+# Checks for library functions.
+AC_CHECK_FUNCS([asprintf])
 
-# Checks for header files.
-AC_HEADER_STDC
-
-dnl Allow checking code with lint, sparse, etc.
+# Allow checking code with lint, sparse, etc.
 XORG_WITH_LINT
 XORG_LINT_LIBRARY([ICE])
 LINT_FLAGS="${LINT_FLAGS} ${ICE_CFLAGS} ${XTRANS_CFLAGS}"
 
-
-AC_OUTPUT([Makefile
-          doc/Makefile
-          specs/Makefile
-          src/Makefile
-          ice.pc])
+AC_CONFIG_FILES([Makefile
+               doc/Makefile
+               specs/Makefile
+               src/Makefile
+               ice.pc])
+AC_OUTPUT
diff --git a/debian/README.source b/debian/README.source
deleted file mode 100644 (file)
index 34ab4bf..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-------------------------------------------------------
-Quick Guide To Patching This Package For The Impatient
-------------------------------------------------------
-
-1. Make sure you have quilt installed
-2. Unpack the package as usual with "dpkg-source -x"
-3. Run the "patch" target in debian/rules
-4. Create a new patch with "quilt new" (see quilt(1))
-5. Edit all the files you want to include in the patch with "quilt edit" 
-   (see quilt(1)).
-6. Write the patch with "quilt refresh" (see quilt(1))
-7. Run the "clean" target in debian/rules
-
-Alternatively, instead of using quilt directly, you can drop the patch in to 
-debian/patches and add the name of the patch to debian/patches/series.
-
-------------------------------------
-Guide To The X Strike Force Packages
-------------------------------------
-
-The X Strike Force team maintains X packages in git repositories on
-git.debian.org in the pkg-xorg subdirectory. Most upstream packages
-are actually maintained in git repositories as well, so they often
-just need to be pulled into git.debian.org in a "upstream-*" branch.
-Otherwise, the upstream sources are manually installed in the Debian
-git repository.
-
-The .orig.tar.gz upstream source file could be generated this
-"upstream-*" branch in the Debian git repository but it is actually
-copied from upstream tarballs directly.
-
-Due to X.org being highly modular, packaging all X.org applications
-as their own independent packages would have created too many Debian
-packages. For this reason, some X.org applications have been grouped
-into larger packages: xutils, xutils-dev, x11-apps, x11-session-utils,
-x11-utils, x11-xfs-utils, x11-xkb-utils, x11-xserver-utils.
-Most packages, including the X.org server itself and all libraries
-and drivers are, however maintained independently.
-
-The Debian packaging is added by creating the "debian-*" git branch
-which contains the aforementioned "upstream-*" branch plus the debian/
-repository files.
-When a patch has to be applied to the Debian package, two solutions
-are involved:
-* If the patch is available in one of the upstream branches, it
-  may be git'cherry-picked into the Debian repository. In this
-  case, it appears directly in the .diff.gz.
-* Otherwise, the patch is added to debian/patches/ which is managed
-  with quilt as documented in /usr/share/doc/quilt/README.source.
-
-quilt is actually invoked by the Debian X packaging through a larger
-set of scripts called XSFBS. XSFBS brings some other X specific
-features such as managing dependencies and conflicts due to the video
-and input driver ABIs.
-XSFBS itself is maintained in a separate repository at
-  git://git.debian.org/pkg-xorg/xsfbs.git
-and it is pulled inside the other Debian X repositories when needed.
-
-The XSFBS patching system requires a build dependency on quilt. Also
-a dependency on $(STAMP_DIR)/patch has to be added to debian/rules
-so that the XSFBS patching occurs before the actual build. So the
-very first target of the build (likely the one running autoreconf)
-should depend on $(STAMP_DIR)/patch. It should also not depend on
-anything so that parallel builds are correctly supported (nothing
-should probably run while patching is being done). And finally, the
-clean target should depend on the xsfclean target so that patches
-are unapplied on clean.
-
-When the upstream sources contain some DFSG-nonfree files, they are
-listed in text files in debian/prune/ in the "debian-*" branch of
-the Debian repository. XSFBS' scripts then take care of removing
-these listed files during the build so as to generate a modified
-DFSG-free .orig.tar.gz tarball.
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100755 (executable)
index 9bd53a4..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-libice (2:1.0.7-1slp2) unstable; urgency=low
-
-  * [X11R7.6] upgrade package
-  * Git: 165.213.180.234:slp/pkgs/xorg/lib/libice
-  * Tag: libice_1.0.7-1slp2
-
- -- SooChan Lim <sc1.lim@samsung.com>  Mon, 03 Jan 2011 21:57:16 +0900
-
-libice (2:1.0.6-6slp2) unstable; urgency=low
-
-  * Fix Git info and modify package maintainer information
-  * Git: 165.213.180.234:/git/slp/pkgs/xorg/lib/libice
-  * Tag: libice_1.0.6-6slp2
-
- -- Sung-Jin Park <sj76.park@samsung.com>  Thu, 02 Dec 2010 10:56:19 +0900
-
-libice (2:1.0.6-5slp2) unstable; urgency=low
-
-  * Update maintainer
-  * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11
-  * Tag: libice_1.0.6-5slp2
-
- -- Sung-Jin Park <sj76.park@samsung.com>  Wed, 21 Apr 2010 14:32:06 +0900
-
-libice (2:1.0.6-4slp2) unstable; urgency=low
-
-  * modify the package name
-
- -- SooChan Lim <sc1.lim@samsung.com>  Thu, 25 Mar 2010 17:34:52 +0900
-
-libice (2:1.0.6-3) unstable; urgency=low
-
-  * Fix debian/rules to install .la file properly
-
- -- Sung-Jin Park <sj76.park@samsung.com>  Mon, 07 Dec 2009 14:33:14 +0900
-
-libice (2:1.0.6-2) unstable; urgency=low
-
-  * Import debian package
-  * Install .la files
-
- -- Sung-Jin Park <sj76.park@samsung.com>  Mon, 07 Dec 2009 10:29:59 +0900
-
-libice (2:1.0.6-1) unstable; urgency=low
-
-  [ Julien Cristau ]
-  * libice6-dbg doesn't need to depend on x11-common.
-  * Remove the debian revision from the xtrans-dev build-dep.
-  * Move -dbg package to the debug section.
-
-  [ Timo Aaltonen ]
-  * New upstream release.
-  * Bump Standards-Version to 3.8.3.
-
- -- Julien Cristau <jcristau@debian.org>  Mon, 23 Nov 2009 17:41:57 +0100
-
-libice (2:1.0.5-1) unstable; urgency=low
-
-  [ Brice Goglin ]
-  * Bump Standards-Version to 3.7.3 (no changes).
-  * Drop the XS- prefix from Vcs-Git and Vcs-Browser fields in debian/control.
-  * Add a link to www.X.org and a reference to the upstream module
-    in the long description.
-
-  [ Julien Cristau ]
-  * New upstream release.
-  * Run autoreconf on build.  Build-depend on automake, libtool and xutils-dev
-    (>= 1:7.4+4).
-  * Handle parallel builds.
-
- -- Julien Cristau <jcristau@debian.org>  Thu, 19 Feb 2009 17:34:32 +0100
-
-libice (2:1.0.4-1) unstable; urgency=low
-
-  [ Julien Cristau ]
-  * Sync package sections with the override.
-
-  [ Brice Goglin ]
-  * New upstream release.
-  * Fix typo in long descriptions, thanks Philippe Cloutier
-    (closes: #436009).
-
- -- Brice Goglin <bgoglin@debian.org>  Tue, 21 Aug 2007 09:16:11 +0200
-
-libice (2:1.0.3-3) unstable; urgency=low
-
-  [ Julien Cristau ]
-  * Fix the name of the XS-Vcs-Browser field.
-  * Add the upstream URL to debian/copyright.
-  * Add myself to Uploaders, and remove Fabio and Branden with their
-    permission.
-  * s/Source-Version/binary:Version/ in debian/control.
-
-  [ Timo Aaltonen ]
-  * Bump the epoch so that this can be synced to Ubuntu in the future.
-
- -- Julien Cristau <jcristau@debian.org>  Mon, 23 Jul 2007 18:26:56 +0200
-
-libice (1:1.0.3-2) unstable; urgency=low
-
-  * Remove outdated cvs information from the package descriptions, and add
-    XS-Vcs-* headers.
-  * Upload to unstable.
-
- -- Julien Cristau <jcristau@debian.org>  Tue, 10 Apr 2007 19:00:04 +0200
-
-libice (1:1.0.3-1) experimental; urgency=low
-
-  * New upstream release.
-  * Install the upstream ChangeLog.
-
- -- Julien Cristau <jcristau@debian.org>  Fri,  9 Feb 2007 17:10:45 +0100
-
-libice (1:1.0.1-2) unstable; urgency=low
-
-  [ David Nusinow ]
-  * Add shlibs file to the package, and have it require libice from modular.
-    Thanks Daniel Stone. (closes: #374775)
-
-  [ Andres Salomon ]
-  * Test for obj-$(DEB_BUILD_GNU_TYPE) before creating it during build;
-    idempotency fix.
-
-  [ Drew Parsons ]
-  * dbg package has priority extra.
-  * exclude libICE.la from dh_install
-  * upload to unstable (X11R7.1)
-
- -- Drew Parsons <dparsons@debian.org>  Fri,  8 Sep 2006 22:26:27 +1000
-
-libice (1:1.0.1-1) experimental; urgency=low
-
-  * New upstream release
-  * Run dh_install with --list-missing
-  * Bump debhelper compat to 5
-  * Remove extra x11-common dep in -dev package
-  * Version x11-common pre-dep in -dev package to use 1:7.0.0 to match the
-    rest of Debian and shut lintian up
-  * Bump build-dep version on xtrans-dev to 1.0.1-1 to make sure we get the
-    security fix
-  * Bump standards version to 3.7.2.0
-  * Don't look to install manpages for the -dev package, there aren't any
-
- -- David Nusinow <dnusinow@debian.org>  Mon,  3 Jul 2006 16:54:13 -0400
-
-libice (1:1.0.0-3) unstable; urgency=low
-
-  * Reorder makeshlib command in rules file so that ldconfig is run
-    properly. Thanks Drew Parsons and Steve Langasek.
-
- -- David Nusinow <dnusinow@debian.org>  Tue, 18 Apr 2006 21:49:55 -0400
-
-libice (1:1.0.0-2) unstable; urgency=low
-
-  * Upload to unstable
-
- -- David Nusinow <dnusinow@debian.org>  Thu, 23 Mar 2006 22:44:24 -0500
-
-libice (1:1.0.0-1) experimental; urgency=low
-
-  * First upload to Debian
-  * Remove 016_ICE_subprotocol_reply_fix.diff as it is now obsolete. Thanks
-    Eugene Konev.
-
- -- David Nusinow <dnusinow@debian.org>  Thu,  5 Jan 2006 01:19:13 -0500
-
-libice (1:6.3.5-4) breezy; urgency=low
-
-  * Implicit deps are bad, mmmk?
-    Fixed those, so ICE nolonger SEGV's on ia64.
-
- -- LaMont Jones <lamont@ubuntu.com>  Tue,  4 Oct 2005 04:52:10 -0600
-
-libice (1:6.3.5-3) breezy; urgency=low
-
-  * Add 016_ICE_subprotocol_reply_fix.diff, from the monolithic tree.
-  * Remove pointless <X11/Xlib.h> #include in ICEutil.h.
-  * Make Build-Depend xtrans versioned to a fixed one, to keep buildds a
-    little bit happier.
-
- -- Daniel Stone <daniel.stone@ubuntu.com>  Wed,  1 Jun 2005 12:34:51 +1000
-
-libice (1:6.3.5-2) breezy; urgency=low
-
-  * Fix Build-Depends-Indep vs B-D hilary/stupidity.
-
- -- Daniel Stone <daniel.stone@ubuntu.com>  Wed,  1 Jun 2005 00:33:36 +1000
-
-libice (1:6.3.5-1) breezy; urgency=low
-
-  * First libice release.
-
- -- Daniel Stone <daniel.stone@ubuntu.com>  Mon, 16 May 2005 22:10:17 +1000
diff --git a/debian/compat b/debian/compat
deleted file mode 100644 (file)
index 7ed6ff8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/debian/control b/debian/control
deleted file mode 100755 (executable)
index 6be4a14..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-Source: libice
-Section: x11
-Priority: optional
-Maintainer: Sung-Jin Park <sj76.park@samsung.com>, Sangjin Lee <lsj119@samsung.com>, Debian X Strike Force <debian-x@lists.debian.org>
-Uploaders: Sung-Jin Park <sj76.park@samsung.com>, David Nusinow <dnusinow@debian.org>, Drew Parsons <dparsons@debian.org>, Julien Cristau <jcristau@debian.org>
-Build-Depends: debhelper (>= 5.0.0), quilt, pkg-config, x11proto-core-dev, xtrans-dev (>= 1.0.1), automake, libtool, xutils-dev (>= 1:7.4+4)
-Standards-Version: 3.8.3
-Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/libice
-Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/libice.git
-
-Package: libice6
-Section: libs
-Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, x11-common
-Description: X11 Inter-Client Exchange library
- This package provides the main interface to the X11 Inter-Client Exchange
- library, which allows for communication of data between X clients.
- .
- More information about X.Org can be found at:
- <URL:http://www.X.org>
- <URL:http://xorg.freedesktop.org>
- <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
- .
- This module can be found at
- git://anongit.freedesktop.org/git/xorg/lib/libICE
-
-Package: libice6-dbg
-Architecture: any
-Section: debug
-Priority: extra
-Depends: ${shlibs:Depends}, ${misc:Depends}, libice6 (= ${binary:Version})
-Description: X11 Inter-Client Exchange library (debug package)
- This package provides the main interface to the X11 Inter-Client Exchange
- library, which allows for communication of data between X clients.
- .
- This package contains the debug versions of the library found in libice6.
- Non-developers likely have little use for this package.
- .
- More information about X.Org can be found at:
- <URL:http://www.X.org>
- <URL:http://xorg.freedesktop.org>
- <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
- .
- This module can be found at
- git://anongit.freedesktop.org/git/xorg/lib/libICE
-
-Package: libice-dev
-Architecture: any
-Section: libdevel
-Depends: ${shlibs:Depends}, ${misc:Depends}, libice6 (= ${binary:Version}), x11proto-core-dev
-Pre-Depends: x11-common (>= 1:7.0.0)
-Description: X11 Inter-Client Exchange library (development headers)
- This package provides the main interface to the X11 Inter-Client Exchange
- library, which allows for communication of data between X clients.
- .
- This package contains the development headers for the library found in libice6.
- Non-developers likely have little use for this package.
- .
- More information about X.Org can be found at:
- <URL:http://www.X.org>
- <URL:http://xorg.freedesktop.org>
- <URL:http://lists.freedesktop.org/mailman/listinfo/xorg>
- .
- This module can be found at
- git://anongit.freedesktop.org/git/xorg/lib/libICE
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644 (file)
index 29dba2f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-This package was downloaded from
-http://xorg.freedesktop.org/releases/individual/lib/
-
-Copyright 1993, 1998  The Open Group
-
-Permission to use, copy, modify, distribute, and sell this software and its
-documentation for any purpose is hereby granted without fee, provided that
-the above copyright notice appear in all copies and that both that
-copyright notice and this permission notice appear in supporting
-documentation.
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
-OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-Except as contained in this notice, the name of The Open Group shall not be
-used in advertising or otherwise to promote the sale, use or other dealings
-in this Software without prior written authorization from The Open Group.
-
-Author: Ralph Mor, X Consortium
diff --git a/debian/libice-dev.install b/debian/libice-dev.install
deleted file mode 100755 (executable)
index 91e7591..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-usr/include/X11/*
-usr/lib/libICE.a
-usr/lib/libICE.la
-usr/lib/libICE.so
-usr/lib/pkgconfig/ice.pc
diff --git a/debian/libice6.install b/debian/libice6.install
deleted file mode 100644 (file)
index 5f5d14d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/libICE.so.6*
diff --git a/debian/libice6.shlibs b/debian/libice6.shlibs
deleted file mode 100644 (file)
index 27bb03d..0000000
+++ /dev/null
@@ -1 +0,0 @@
-libICE 6 libice6 (>= 1:1.0.0)
diff --git a/debian/rules b/debian/rules
deleted file mode 100755 (executable)
index 9aac7a6..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-#!/usr/bin/make -f
-# debian/rules for the Debian libice package.
-# Copyright Â© 2004 Scott James Remnant <scott@netsplit.com>
-# Copyright Â© 2005 Daniel Stone <daniel@fooishbar.org>
-# Copyright Â© 2005 David Nusinow <dnusinow@debian.org>
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# set this to the name of the main shlib's binary package
-PACKAGE = libice6
-
-include debian/xsfbs/xsfbs.mk
-
-CFLAGS = -Wall -g
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -O0
-else
-       CFLAGS += -O2
-endif
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-       NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-       MAKEFLAGS += -j$(NUMJOBS)
-endif
-
-DEB_HOST_ARCH      ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
-DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
-       confflags += --build=$(DEB_HOST_GNU_TYPE)
-else
-       confflags += --build=$(DEB_HOST_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
-#      confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
-endif
-
-configure: $(STAMP_DIR)/patch
-       dh_testdir
-       autoreconf -vfi
-
-build: build-stamp
-build-stamp: configure
-       dh_testdir
-
-       test -d obj-$(DEB_BUILD_GNU_TYPE) || mkdir obj-$(DEB_BUILD_GNU_TYPE)
-       cd obj-$(DEB_BUILD_GNU_TYPE) && \
-       ../configure --prefix=/usr --mandir=\$${prefix}/share/man \
-                    --infodir=\$${prefix}/share/info $(confflags) \
-                    CFLAGS="$(CFLAGS)" 
-       cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE)
-       >$@
-
-clean: xsfclean
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp
-
-       rm -f config.cache config.log config.status
-       rm -f */config.cache */config.log */config.status
-       rm -f conftest* */conftest*
-       rm -rf autom4te.cache */autom4te.cache
-       rm -rf obj-*
-       rm -f aclocal.m4 config.guess config.sub config.h.in configure
-       rm -f depcomp install-sh ltmain.sh missing mkinstalldirs INSTALL
-       rm -f $$(find -name Makefile.in)
-
-       dh_clean
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_clean -k
-       dh_installdirs
-
-       cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
-
-# Build architecture-dependent files here.
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-
-#      dh_installdocs
-       dh_install --sourcedir=debian/tmp --list-missing
-       #dh_install --sourcedir=debian/tmp --list-missing --exclude=libICE.la
-#      dh_installchangelogs ChangeLog
-       dh_link
-       dh_strip --dbg-package=$(PACKAGE)-dbg
-       dh_compress
-       dh_fixperms
-       dh_makeshlibs
-       dh_shlibdeps
-       dh_installdeb
-       dh_gencontrol
-       dh_md5sums
-       dh_builddeb
-
-# Build architecture-independent files here.
-binary-indep: build install
-# Nothing to do
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
diff --git a/debian/watch b/debian/watch
deleted file mode 100644 (file)
index 9541a03..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-version=3
-http://xorg.freedesktop.org/releases/individual/lib/ libICE-(.*)\.tar\.gz
diff --git a/debian/xsfbs/repack.sh b/debian/xsfbs/repack.sh
deleted file mode 100644 (file)
index 5935cc9..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if ! [ -d debian/prune ]; then
-       exit 0
-fi
-
-if [ "x$1" != x--upstream-version ]; then
-       exit 1
-fi
-
-version="$2"
-filename="$3"
-
-if [ -z "$version" ] || ! [ -f "$filename" ]; then
-       exit 1
-fi
-
-dir="$(pwd)"
-tempdir="$(mktemp -d)"
-
-cd "$tempdir"
-tar xf "$dir/$filename"
-cat "$dir"/debian/prune/* | while read file; do rm -f */$file; done
-
-tar czf "$dir/$filename" *
-cd "$dir"
-rm -rf "$tempdir"
-echo "Done pruning upstream tarball"
-
-exit 0
diff --git a/debian/xsfbs/xsfbs.mk b/debian/xsfbs/xsfbs.mk
deleted file mode 100644 (file)
index 5e16b10..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-#!/usr/bin/make -f
-
-# Debian X Strike Force Build System (XSFBS): Make portion
-
-# Copyright 1996 Stephen Early
-# Copyright 1997 Mark Eichin
-# Copyright 1998-2005, 2007 Branden Robinson
-# Copyright 2005 David Nusinow
-#
-# Licensed under the GNU General Public License, version 2.  See the file
-# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
-
-# Originally by Stephen Early <sde1000@debian.org>
-# Modified by Mark W. Eichin <eichin@kitten.gen.ma.us>
-# Modified by Adam Heath <doogie@debian.org>
-# Modified by Branden Robinson <branden@debian.org>
-# Modified by Fabio Massimo Di Nitto <fabbione@fabbione.net>
-# Modified by David Nusinow <dnusinow@debian.org>
-# Acknowledgements to Manoj Srivastava.
-
-# Pass $(DH_OPTIONS) into the environment for debhelper's benefit.
-export DH_OPTIONS
-
-# force quilt to not use ~/.quiltrc and to use debian/patches
-QUILT = QUILT_PATCHES=debian/patches quilt --quiltrc /dev/null
-
-# Set up parameters for the upstream build environment.
-
-# Determine (source) package name from Debian changelog.
-SOURCE_NAME:=$(shell dpkg-parsechangelog -ldebian/changelog \
-                        | grep '^Source:' | awk '{print $$2}')
-
-# Determine package version from Debian changelog.
-SOURCE_VERSION:=$(shell dpkg-parsechangelog -ldebian/changelog \
-                        | grep '^Version:' | awk '{print $$2}')
-
-# Determine upstream version number.
-UPSTREAM_VERSION:=$(shell echo $(SOURCE_VERSION) | sed 's/-.*//')
-
-# Determine the source version without the epoch for make-orig-tar-gz
-NO_EPOCH_VER:=$(shell echo $(UPSTREAM_VERSION) | sed 's/^.://')
-
-# Figure out who's building this package.
-BUILDER:=$(shell echo $${DEBEMAIL:-$${EMAIL:-$$(echo $$LOGNAME@$$(cat /etc/mailname 2>/dev/null))}})
-
-# Find out if this is an official build; an official build has nothing but
-# digits, dots, and/or the codename of a release in the Debian part of the
-# version number.  Anything else indicates an unofficial build.
-OFFICIAL_BUILD:=$(shell VERSION=$(SOURCE_VERSION); if ! expr "$$(echo $${VERSION\#\#*-} | sed 's/\(woody\|sarge\|etch\|lenny\)//g')" : ".*[^0-9.].*" >/dev/null 2>&1; then echo yes; fi)
-
-# Set up parameters for the Debian build environment.
-
-# Determine our architecture.
-BUILD_ARCH:=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
-# Work around some old-time dpkg braindamage.
-BUILD_ARCH:=$(subst i486,i386,$(BUILD_ARCH))
-# The DEB_HOST_ARCH variable may be set per the Debian cross-compilation policy.
-ifdef DEB_HOST_ARCH
- ARCH:=$(DEB_HOST_ARCH)
-else
- # dpkg-cross sets the ARCH environment variable; if set, use it.
- ifdef ARCH
-  ARCH:=$(ARCH)
- else
-  ARCH:=$(BUILD_ARCH)
- endif
-endif
-
-# $(STAMP_DIR) houses stamp files for complex targets.
-STAMP_DIR:=stampdir
-
-# $(DEBTREEDIR) is where all install rules are told (via $(DESTDIR)) to place
-# their files.
-DEBTREEDIR:=$(CURDIR)/debian/tmp
-
-# All "important" targets have four lines:
-#   1) A target name that is invoked by a package-building tool or the user.
-#      This consists of a dependency on a "$(STAMP_DIR)/"-prefixed counterpart.
-#   2) A line delcaring 1) as a phony target (".PHONY:").
-#   3) A "$(STAMP_DIR)/"-prefixed target which does the actual work, and may
-#   depend on other targets.
-#   4) A line declaring 3) as a member of the $(stampdir_targets) variable; the
-#   "$(STAMP_DIR)/" prefix is omitted.
-#
-# This indirection is needed so that the "stamp" files that signify when a rule
-# is done can be located in a separate "stampdir".  Recall that make has no way
-# to know when a goal has been met for a phony target (like "build" or
-# "install").
-#
-# At the end of each "$(STAMP_DIR)/" target, be sure to run the command ">$@"
-# so that the target will not be run again.  Removing the file will make Make
-# run the target over.
-
-# All phony targets should be declared as dependencies of .PHONY, even if they
-# do not have "($STAMP_DIR)/"-prefixed counterparts.
-
-# Define a harmless default rule to keep things from going nuts by accident.
-.PHONY: default
-default:
-
-# Set up the $(STAMP_DIR) directory.
-.PHONY: stampdir
-stampdir_targets+=stampdir
-stampdir: $(STAMP_DIR)/stampdir
-$(STAMP_DIR)/stampdir:
-       mkdir $(STAMP_DIR)
-       >$@
-
-# Set up the package build directory as quilt expects to find it.
-.PHONY: prepare
-stampdir_targets+=prepare
-prepare: $(STAMP_DIR)/prepare
-$(STAMP_DIR)/prepare: $(STAMP_DIR)/log $(STAMP_DIR)/genscripts
-       >$@
-
-.PHONY: log
-stampdir_targets+=log
-log: $(STAMP_DIR)/log
-$(STAMP_DIR)/log: $(STAMP_DIR)/stampdir
-       mkdir -p $(STAMP_DIR)/log
-
-# Apply all patches to the upstream source.
-.PHONY: patch
-stampdir_targets+=patch
-patch: $(STAMP_DIR)/patch
-$(STAMP_DIR)/patch: $(STAMP_DIR)/prepare
-       if ! [ `which quilt` ]; then \
-               echo "Couldn't find quilt. Please install it or add it to the build-depends for this package."; \
-               exit 1; \
-       fi; \
-       if $(QUILT) next >/dev/null 2>&1; then \
-         echo -n "Applying patches..."; \
-         if $(QUILT) push -a -v >$(STAMP_DIR)/log/patch 2>&1; then \
-           cat $(STAMP_DIR)/log/patch; \
-           echo "successful."; \
-         else \
-           cat $(STAMP_DIR)/log/patch; \
-           echo "failed! (check $(STAMP_DIR)/log/patch for details)"; \
-           exit 1; \
-         fi; \
-       else \
-         echo "No patches to apply"; \
-       fi; \
-       >$@
-
-# Revert all patches to the upstream source.
-.PHONY: unpatch
-unpatch: $(STAMP_DIR)/log
-       rm -f $(STAMP_DIR)/patch
-       @echo -n "Unapplying patches..."; \
-       if $(QUILT) applied >/dev/null 2>/dev/null; then \
-         if $(QUILT) pop -a -v >$(STAMP_DIR)/log/unpatch 2>&1; then \
-           cat $(STAMP_DIR)/log/unpatch; \
-           echo "successful."; \
-         else \
-           cat $(STAMP_DIR)/log/unpatch; \
-           echo "failed! (check $(STAMP_DIR)/log/unpatch for details)"; \
-           exit 1; \
-         fi; \
-       else \
-         echo "nothing to do."; \
-       fi
-
-# Clean the generated maintainer scripts.
-.PHONY: cleanscripts
-cleanscripts:
-       rm -f $(STAMP_DIR)/genscripts
-       rm -f debian/*.config \
-             debian/*.postinst \
-             debian/*.postrm \
-             debian/*.preinst \
-             debian/*.prerm
-
-# Clean the package build tree.
-.PHONY: xsfclean
-xsfclean: cleanscripts unpatch
-       dh_testdir
-       rm -rf .pc
-       rm -rf $(STAMP_DIR)
-       dh_clean
-
-# Remove files from the upstream source tree that we don't need, or which have
-# licensing problems.  It must be run before creating the .orig.tar.gz.
-#
-# Note: This rule is for Debian package maintainers' convenience, and is not
-# needed for conventional build scenarios.
-.PHONY: prune-upstream-tree
-prune-upstream-tree:
-       # Ensure we're in the correct directory.
-       dh_testdir
-       grep -rvh '^#' debian/prune/ | xargs --no-run-if-empty rm -rf
-
-# Verify that there are no offsets or fuzz in the patches we apply.
-#
-# Note: This rule is for Debian package maintainers' convenience, and is not
-# needed for conventional build scenarios.
-.PHONY: patch-audit
-patch-audit: prepare unpatch
-       @echo -n "Auditing patches..."; \
-       >$(STAMP_DIR)/log/patch; \
-       FUZZY=; \
-       while [ -n "$$($(QUILT) next)" ]; do \
-         RESULT=$$($(QUILT) push -v | tee -a $(STAMP_DIR)/log/patch | grep ^Hunk | sed 's/^Hunk.*\(succeeded\|FAILED\).*/\1/');\
-         case "$$RESULT" in \
-           succeeded) \
-             echo "fuzzy patch: $$($(QUILT) top)" \
-               | tee -a $(STAMP_DIR)/log/$$($(QUILT) top); \
-             FUZZY=yes; \
-             ;; \
-           FAILED) \
-             echo "broken patch: $$($(QUILT) next)" \
-               | tee -a $(STAMP_DIR)/log/$$($(QUILT) next); \
-             exit 1; \
-             ;; \
-         esac; \
-       done; \
-       if [ -n "$$FUZZY" ]; then \
-         echo "there were fuzzy patches; please fix."; \
-         exit 1; \
-       else \
-         echo "done."; \
-       fi
-
-# Generate the maintainer scripts.
-.PHONY: genscripts
-stampdir_targets+=genscripts
-genscripts: $(STAMP_DIR)/genscripts
-$(STAMP_DIR)/genscripts: $(STAMP_DIR)/stampdir
-       for FILE in debian/*.config.in \
-                   debian/*.postinst.in \
-                   debian/*.postrm.in \
-                   debian/*.preinst.in \
-                   debian/*.prerm.in; do \
-         if [ -e "$$FILE" ]; then \
-           MAINTSCRIPT=$$(echo $$FILE | sed 's/.in$$//'); \
-           sed -n '1,/^#INCLUDE_SHELL_LIB#$$/p' <$$FILE \
-             | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >$$MAINTSCRIPT.tmp; \
-           cat debian/xsfbs/xsfbs.sh >>$$MAINTSCRIPT.tmp; \
-           sed -n '/^#INCLUDE_SHELL_LIB#$$/,$$p' <$$FILE \
-             | sed -e '/^#INCLUDE_SHELL_LIB#$$/d' >>$$MAINTSCRIPT.tmp; \
-           sed -e 's/@SOURCE_VERSION@/$(SOURCE_VERSION)/' \
-               -e 's/@OFFICIAL_BUILD@/$(OFFICIAL_BUILD)/' \
-             <$$MAINTSCRIPT.tmp >$$MAINTSCRIPT; \
-           rm $$MAINTSCRIPT.tmp; \
-         fi; \
-       done
-       # Validate syntax of generated shell scripts.
-       #sh debian/scripts/validate-posix-sh debian/*.config \
-       #                                    debian/*.postinst \
-       #                                    debian/*.postrm \
-       #                                    debian/*.preinst \
-       #                                    debian/*.prerm
-       >$@
-
-SERVERMINVERS = $(shell cat /usr/share/xserver-xorg/serverminver 2>/dev/null)
-VIDEOABI = $(shell cat /usr/share/xserver-xorg/videoabiver 2>/dev/null)
-INPUTABI = $(shell cat /usr/share/xserver-xorg/inputabiver 2>/dev/null)
-SERVER_DEPENDS = xserver-xorg-core (>= $(SERVERMINVERS))
-VIDDRIVER_PROVIDES = xserver-xorg-video-$(VIDEOABI)
-INPDRIVER_PROVIDES = xserver-xorg-input-$(INPUTABI)
-ifeq ($(PACKAGE),)
-PACKAGE=$(shell awk '/^Package:/ { print $$2; exit }' < debian/control)
-endif
-
-.PHONY: serverabi
-serverabi: install
-ifeq ($(SERVERMINVERS),)
-       @echo error: xserver-xorg-dev needs to be installed
-       @exit 1
-else
-       echo "xserver:Depends=$(SERVER_DEPENDS)" >> debian/$(PACKAGE).substvars
-       echo "xviddriver:Provides=$(VIDDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
-       echo "xinpdriver:Provides=$(INPDRIVER_PROVIDES)" >> debian/$(PACKAGE).substvars
-endif
-
-# vim:set noet ai sts=8 sw=8 tw=0:
diff --git a/debian/xsfbs/xsfbs.sh b/debian/xsfbs/xsfbs.sh
deleted file mode 100644 (file)
index 813fd8d..0000000
+++ /dev/null
@@ -1,622 +0,0 @@
-# This is the X Strike Force shell library for X Window System package
-# maintainer scripts.  It serves to define shell functions commonly used by
-# such packages, and performs some error checking necessary for proper operation
-# of those functions.  By itself, it does not "do" much; the maintainer scripts
-# invoke the functions defined here to accomplish package installation and
-# removal tasks.
-
-# If you are reading this within a Debian package maintainer script (e.g.,
-# /var/lib/dpkg/info/PACKAGE.{config,preinst,postinst,prerm,postrm}), you can
-# skip past this library by scanning forward in this file to the string
-# "GOBSTOPPER".
-
-SOURCE_VERSION=@SOURCE_VERSION@
-OFFICIAL_BUILD=@OFFICIAL_BUILD@
-
-# Use special abnormal exit codes so that problems with this library are more
-# easily tracked down.
-SHELL_LIB_INTERNAL_ERROR=86
-SHELL_LIB_THROWN_ERROR=74
-SHELL_LIB_USAGE_ERROR=99
-
-# old -> new variable names
-if [ -z "$DEBUG_XORG_PACKAGE" ] && [ -n "$DEBUG_XFREE86_PACKAGE" ]; then
-  DEBUG_XORG_PACKAGE="$DEBUG_XFREE86_PACKAGE"
-fi
-if [ -z "$DEBUG_XORG_DEBCONF" ] && [ -n "$DEBUG_XFREE86_DEBCONF" ]; then
-  DEBUG_XORG_DEBCONF="$DEBUG_XFREE86_DEBCONF"
-fi
-
-# initial sanity checks
-if [ -z "$THIS_PACKAGE" ]; then
-  cat >&2 <<EOF
-Error: package maintainer script attempted to use shell library without
-definining \$THIS_PACKAGE shell variable.  Please report the package name,
-version, and the text of this error message to the Debian Bug Tracking System.
-Visit <http://www.debian.org/Bugs/Reporting> on the World Wide Web for
-instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the
-"doc-debian" package, or install the "reportbug" package and use the command of
-the same name to file a report against version $SOURCE_VERSION of this package.
-EOF
-  exit $SHELL_LIB_USAGE_ERROR
-fi
-
-if [ -z "$THIS_SCRIPT" ]; then
-  cat >&2 <<EOF
-Error: package maintainer script attempted to use shell library without
-definining \$THIS_SCRIPT shell variable.  Please report the package name,
-version, and the text of this error message to the Debian Bug Tracking System.
-Visit <http://www.debian.org/Bugs/Reporting> on the World Wide Web for
-instructions, read the file /usr/share/doc/debian/bug-reporting.txt from the
-"doc-debian" package, or install the "reportbug" package and use the command of
-the same name to file a report against version $SOURCE_VERSION of the
-"$THIS_PACKAGE" package.
-EOF
-  exit $SHELL_LIB_USAGE_ERROR
-fi
-
-if [ "$1" = "reconfigure" ] || [ -n "$DEBCONF_RECONFIGURE" ]; then
-  RECONFIGURE="true"
-else
-  RECONFIGURE=
-fi
-
-if ([ "$1" = "install" ] || [ "$1" = "configure" ]) && [ -z "$2" ]; then
-  FIRSTINST="yes"
-fi
-
-if [ -z "$RECONFIGURE" ] && [ -z "$FIRSTINST" ]; then
-  UPGRADE="yes"
-fi
-
-trap "message;\
-      message \"Received signal.  Aborting $THIS_PACKAGE package $THIS_SCRIPT script.\";\
-      message;\
-      exit 1" HUP INT QUIT TERM
-
-reject_nondigits () {
-  # syntax: reject_nondigits [ operand ... ]
-  #
-  # scan operands (typically shell variables whose values cannot be trusted) for
-  # characters other than decimal digits and barf if any are found
-  while [ -n "$1" ]; do
-    # does the operand contain anything but digits?
-    if ! expr "$1" : "[[:digit:]]\+$" > /dev/null 2>&1; then
-      # can't use die(), because it wraps message() which wraps this function
-      echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_nondigits() encountered" \
-           "possibly malicious garbage \"$1\"" >&2
-      exit $SHELL_LIB_THROWN_ERROR
-    fi
-    shift
-  done
-}
-
-reject_unlikely_path_chars () {
-  # syntax: reject_unlikely_path_chars [ operand ... ]
-  #
-  # scan operands (typically shell variables whose values cannot be trusted) for
-  # characters unlikely to be seen in a path and which the shell might
-  # interpret and barf if any are found
-  while [ -n "$1" ]; do
-    # does the operand contain any funny characters?
-    if expr "$1" : '.*[!$&()*;<>?|].*' > /dev/null 2>&1; then
-      # can't use die(), because I want to avoid forward references
-      echo "$THIS_PACKAGE $THIS_SCRIPT error: reject_unlikely_path_chars()" \
-           "encountered possibly malicious garbage \"$1\"" >&2
-      exit $SHELL_LIB_THROWN_ERROR
-    fi
-    shift
-  done
-}
-
-# Query the terminal to establish a default number of columns to use for
-# displaying messages to the user.  This is used only as a fallback in the
-# event the COLUMNS variable is not set.  ($COLUMNS can react to SIGWINCH while
-# the script is running, and this cannot, only being calculated once.)
-DEFCOLUMNS=$(stty size 2> /dev/null | awk '{print $2}') || true
-if ! expr "$DEFCOLUMNS" : "[[:digit:]]\+$" > /dev/null 2>&1; then
-  DEFCOLUMNS=80
-fi
-
-message () {
-  # pretty-print messages of arbitrary length
-  reject_nondigits "$COLUMNS"
-  echo "$*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} >&2
-}
-
-observe () {
-  # syntax: observe message ...
-  #
-  # issue observational message suitable for logging someday when support for
-  # it exists in dpkg
-  if [ -n "$DEBUG_XORG_PACKAGE" ]; then
-    message "$THIS_PACKAGE $THIS_SCRIPT note: $*"
-  fi
-}
-
-warn () {
-  # syntax: warn message ...
-  #
-  # issue warning message suitable for logging someday when support for
-  # it exists in dpkg; also send to standard error
-  message "$THIS_PACKAGE $THIS_SCRIPT warning: $*"
-}
-
-die () {
-  # syntax: die message ...
-  #
-  # exit script with error message
-  message "$THIS_PACKAGE $THIS_SCRIPT error: $*"
-  exit $SHELL_LIB_THROWN_ERROR
-}
-
-internal_error () {
-  # exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message
-  message "internal error: $*"
-  if [ -n "$OFFICIAL_BUILD" ]; then
-    message "Please report a bug in the $THIS_SCRIPT script of the" \
-            "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \
-            "Tracking System.  Include all messages above that mention the" \
-            "$THIS_PACKAGE package.  Visit " \
-            "<http://www.debian.org/Bugs/Reporting> on the World Wide Web for" \
-            "instructions, read the file" \
-            "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \
-            "package, or install the reportbug package and use the command of" \
-            "the same name to file a report."
-  fi
-  exit $SHELL_LIB_INTERNAL_ERROR
-}
-
-usage_error () {
-  message "usage error: $*"
-  message "Please report a bug in the $THIS_SCRIPT script of the" \
-          "$THIS_PACKAGE package, version $SOURCE_VERSION to the Debian Bug" \
-          "Tracking System.  Include all messages above that mention the" \
-          "$THIS_PACKAGE package.  Visit " \
-          "<http://www.debian.org/Bugs/Reporting> on the World Wide Web for" \
-          "instructions, read the file" \
-          "/usr/share/doc/debian/bug-reporting.txt from the doc-debian" \
-          "package, or install the reportbug package and use the command of" \
-          "the same name to file a report."
-  exit $SHELL_LIB_USAGE_ERROR
-}
-
-font_update () {
-  # run $UPDATECMDS in $FONTDIRS
-
-  local dir cmd shortcmd x_font_dir_prefix
-
-  x_font_dir_prefix="/usr/share/fonts/X11"
-
-  if [ -z "$UPDATECMDS" ]; then
-    usage_error "font_update() called but \$UPDATECMDS not set"
-  fi
-  if [ -z "$FONTDIRS" ]; then
-    usage_error "font_update() called but \$FONTDIRS not set"
-  fi
-
-  reject_unlikely_path_chars "$UPDATECMDS"
-  reject_unlikely_path_chars "$FONTDIRS"
-
-  for dir in $FONTDIRS; do
-    if [ -d "$x_font_dir_prefix/$dir" ]; then
-      for cmd in $UPDATECMDS; do
-        if which "$cmd" > /dev/null 2>&1; then
-          shortcmd=${cmd##*/}
-          observe "running $shortcmd in $dir font directory"
-         cmd_opts=
-          if [ "$shortcmd" = "update-fonts-alias" ]; then
-            cmd_opts=--x11r7-layout
-          fi
-          if [ "$shortcmd" = "update-fonts-dir" ]; then
-            cmd_opts=--x11r7-layout
-          fi
-          if [ "$shortcmd" = "update-fonts-scale" ]; then
-            cmd_opts=--x11r7-layout
-          fi
-          $cmd $cmd_opts $dir || warn "$cmd $cmd_opts $dir" \
-                              "failed; font directory data may not" \
-                              "be up to date"
-        else
-          warn "$cmd not found; not updating corresponding $dir font" \
-               "directory data"
-        fi
-      done
-    else
-      warn "$dir is not a directory; not updating font directory data"
-    fi
-  done
-}
-
-remove_conffile_prepare () {
-  # syntax: remove_conffile_prepare filename official_md5sum ...
-  #
-  # Check a conffile "filename" against a list of canonical MD5 checksums.
-  # If the file's current MD5 checksum matches one of the "official_md5sum"
-  # operands provided, then prepare the conffile for removal from the system.
-  # We defer actual deletion until the package is configured so that we can
-  # roll this operation back if package installation fails.
-  #
-  # Call this function from a preinst script in the event $1 is "upgrade" or
-  # "install" and verify $2 to ensure the package is being upgraded from a
-  # version (or installed over a version removed-but-not-purged) prior to the
-  # one in which the conffile was obsoleted.
-
-  local conffile current_checksum
-
-  # validate arguments
-  if [ $# -lt 2 ]; then
-    usage_error "remove_conffile_prepare() called with wrong number of" \
-                "arguments; expected at least 2, got $#"
-    exit $SHELL_LIB_USAGE_ERROR
-  fi
-
-  conffile="$1"
-  shift
-
-  # does the conffile even exist?
-  if [ -e "$conffile" ]; then
-    # calculate its checksum
-    current_checksum=$(md5sum < "$conffile" | sed 's/[[:space:]].*//')
-    # compare it to each supplied checksum
-    while [ -n "$1" ]; do
-      if [ "$current_checksum" = "$1" ]; then
-        # we found a match; move the confffile and stop looking
-        observe "preparing obsolete conffile $conffile for removal"
-        mv "$conffile" "$conffile.$THIS_PACKAGE-tmp"
-        break
-      fi
-      shift
-    done
-  fi
-}
-
-remove_conffile_lookup () {
-  # syntax: remove_conffile_lookup package filename
-  #
-  # Lookup the md5sum of a conffile in dpkg's database, and prepare for removal
-  # if it matches the actual file's md5sum.
-  #
-  # Call this function when you would call remove_conffile_prepare but only
-  # want to check against dpkg's status database instead of known checksums.
-
-  local package conffile old_md5sum
-
-  # validate arguments
-  if [ $# -ne 2 ]; then
-    usage_error "remove_conffile_lookup() called with wrong number of" \
-                "arguments; expected 1, got $#"
-    exit $SHELL_LIB_USAGE_ERROR
-  fi
-
-  package="$1"
-  conffile="$2"
-
-  if ! [ -e "$conffile" ]; then
-    return
-  fi
-  old_md5sum="$(dpkg-query -W -f='${Conffiles}' "$package" | \
-    awk '{ if (match($0, "^ '"$conffile"' ")) print $2}')"
-  if [ -n "$old_md5sum" ]; then
-    remove_conffile_prepare "$conffile" "$old_md5sum"
-  fi
-}
-
-remove_conffile_commit () {
-  # syntax: remove_conffile_commit filename
-  #
-  # Complete the removal of a conffile "filename" that has become obsolete.
-  #
-  # Call this function from a postinst script after having used
-  # remove_conffile_prepare() in the preinst.
-
-  local conffile
-
-  # validate arguments
-  if [ $# -ne 1 ]; then
-    usage_error "remove_conffile_commit() called with wrong number of" \
-                "arguments; expected 1, got $#"
-    exit $SHELL_LIB_USAGE_ERROR
-  fi
-
-  conffile="$1"
-
-  # if the temporary file created by remove_conffile_prepare() exists, remove it
-  if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then
-    observe "committing removal of obsolete conffile $conffile"
-    rm "$conffile.$THIS_PACKAGE-tmp"
-  fi
-}
-
-remove_conffile_rollback () {
-  # syntax: remove_conffile_rollback filename
-  #
-  # Roll back the removal of a conffile "filename".
-  #
-  # Call this function from a postrm script in the event $1 is "abort-upgrade"
-  # or "abort-install" is  after having used remove_conffile_prepare() in the
-  # preinst.
-
-  local conffile
-
-  # validate arguments
-  if [ $# -ne 1 ]; then
-    usage_error "remove_conffile_rollback() called with wrong number of" \
-                "arguments; expected 1, got $#"
-    exit $SHELL_LIB_USAGE_ERROR
-  fi
-
-  conffile="$1"
-
-  # if the temporary file created by remove_conffile_prepare() exists, move it
-  # back
-  if [ -e "$conffile.$THIS_PACKAGE-tmp" ]; then
-    observe "rolling back removal of obsolete conffile $conffile"
-    mv "$conffile.$THIS_PACKAGE-tmp" "$conffile"
-  fi
-}
-
-replace_conffile_with_symlink_prepare () {
-  # syntax: replace_conffile_with_symlink_prepare oldfilename newfilename \
-  # official_md5sum ...
-  #
-  # Check a conffile "oldfilename" against a list of canonical MD5 checksums.
-  # If the file's current MD5 checksum matches one of the "official_md5sum"
-  # operands provided, then prepare the conffile for removal from the system.
-  # We defer actual deletion until the package is configured so that we can
-  # roll this operation back if package installation fails. Otherwise copy it
-  # to newfilename and let dpkg handle it through conffiles mechanism.
-  #
-  # Call this function from a preinst script in the event $1 is "upgrade" or
-  # "install" and verify $2 to ensure the package is being upgraded from a
-  # version (or installed over a version removed-but-not-purged) prior to the
-  # one in which the conffile was obsoleted.
-
-  local conffile current_checksum
-
-  # validate arguments
-  if [ $# -lt 3 ]; then
-    usage_error "replace_conffile_with_symlink_prepare() called with wrong" \
-                " number of arguments; expected at least 3, got $#"
-    exit $SHELL_LIB_USAGE_ERROR
-  fi
-
-  oldconffile="$1"
-  shift
-  newconffile="$1"
-  shift
-
-  remove_conffile_prepare "$_oldconffile" "$@"
-  # If $oldconffile still exists, then md5sums didn't match.
-  # Copy it to new one.
-  if [ -f "$oldconffile" ]; then
-    cp "$oldconffile" "$newconffile"
-  fi
-
-}
-
-replace_conffile_with_symlink_commit () {
-  # syntax: replace_conffile_with_symlink_commit oldfilename
-  #
-  # Complete the removal of a conffile "oldfilename" that has been
-  # replaced by a symlink.
-  #
-  # Call this function from a postinst script after having used
-  # replace_conffile_with_symlink_prepare() in the preinst.
-
-  local conffile
-
-  # validate arguments
-  if [ $# -ne 1 ]; then
-    usage_error "replace_conffile_with_symlink_commit() called with wrong" \
-                "number of arguments; expected 1, got $#"
-    exit $SHELL_LIB_USAGE_ERROR
-  fi
-
-  conffile="$1"
-
-  remove_conffile_commit "$conffile"
-}
-
-replace_conffile_with_symlink_rollback () {
-  # syntax: replace_conffile_with_symlink_rollback oldfilename newfilename
-  #
-  # Roll back the replacing of a conffile "oldfilename" with symlink to
-  # "newfilename".
-  #
-  # Call this function from a postrm script in the event $1 is "abort-upgrade"
-  # or "abort-install" and verify $2 to ensure the package failed to upgrade
-  # from a version (or install over a version removed-but-not-purged) prior
-  # to the one in which the conffile was obsoleted.
-  # You should have  used replace_conffile_with_symlink_prepare() in the
-  # preinst.
-
-  local conffile
-
-  # validate arguments
-  if [ $# -ne 2 ]; then
-    usage_error "replace_conffile_with_symlink_rollback() called with wrong" \
-                "number of arguments; expected 2, got $#"
-    exit $SHELL_LIB_USAGE_ERROR
-  fi
-
-  oldconffile="$1"
-  newconffile="$2"
-
-  remove_conffile_rollback "$_oldconffile"
-  if [ -f "$newconffile" ]; then
-    rm "$newconffile"
-  fi
-}
-
-run () {
-  # syntax: run command [ argument ... ]
-  #
-  # Run specified command with optional arguments and report its exit status.
-  # Useful for commands whose exit status may be nonzero, but still acceptable,
-  # or commands whose failure is not fatal to us.
-  #
-  # NOTE: Do *not* use this function with db_get or db_metaget commands; in
-  # those cases the return value of the debconf command *must* be checked
-  # before the string returned by debconf is used for anything.
-
-  local retval
-
-  # validate arguments
-  if [ $# -lt 1 ]; then
-    usage_error "run() called with wrong number of arguments; expected at" \
-                "least 1, got $#"
-    exit $SHELL_LIB_USAGE_ERROR
-  fi
-
-  "$@" || retval=$?
-
-  if [ ${retval:-0} -ne 0 ]; then
-    observe "command \"$*\" exited with status $retval"
-  fi
-}
-
-make_symlink_sane () {
-  # syntax: make_symlink_sane symlink target
-  #
-  # Ensure that the symbolic link symlink exists, and points to target.
-  #
-  # If symlink does not exist, create it and point it at target.
-  #
-  # If symlink exists but is not a symbolic link, back it up.
-  #
-  # If symlink exists, is a symbolic link, but points to the wrong location, fix
-  # it.
-  #
-  # If symlink exists, is a symbolic link, and already points to target, do
-  # nothing.
-  #
-  # This function wouldn't be needed if ln had an -I, --idempotent option.
-
-  # Validate arguments.
-  if [ $# -ne 2 ]; then
-    usage_error "make_symlink_sane() called with wrong number of arguments;" \
-      "expected 2, got $#"
-    exit $SHELL_LIB_USAGE_ERROR
-  fi
-
-  # We could just use the positional parameters as-is, but that makes things
-  # harder to follow.
-  local symlink target
-
-  symlink="$1"
-  target="$2"
-
-  if [ -L "$symlink" ] && [ "$(readlink "$symlink")" = "$target" ]; then
-      observe "link from $symlink to $target already exists"
-  else
-    observe "creating symbolic link from $symlink to $target"
-    mkdir -p "${target%/*}" "${symlink%/*}"
-    ln -s -b -S ".dpkg-old" "$target" "$symlink"
-  fi
-}
-
-migrate_dir_to_symlink () {
-  # syntax: migrate_dir_to_symlink old_location new_location
-  #
-  # Per Debian Policy section 6.5.4, "A directory will never be replaced by a
-  # symbolic link to a directory or vice versa; instead, the existing state
-  # (symlink or not) will be left alone and dpkg will follow the symlink if
-  # there is one."
-  #
-  # We have to do it ourselves.
-  #
-  # This function moves the contents of old_location, a directory, into
-  # new_location, a directory, then makes old_location a symbolic link to
-  # new_location.
-  #
-  # old_location need not exist, but if it does, it must be a directory (or a
-  # symlink to a directory).  If it is not, it is backed up.  If new_location
-  # exists already and is not a directory, it is backed up.
-  #
-  # This function should be called from a package's preinst so that other
-  # packages unpacked after this one --- but before this package's postinst runs
-  # --- are unpacked into new_location even if their payloads contain
-  # old_location filespecs.
-
-  # Validate arguments.
-  if [ $# -ne 2 ]; then
-    usage_error "migrate_dir_to_symlink() called with wrong number of"
-                "arguments; expected 2, got $#"
-    exit $SHELL_LIB_USAGE_ERROR
-  fi
-
-  # We could just use the positional parameters as-is, but that makes things
-  # harder to follow.
-  local new old
-
-  old="$1"
-  new="$2"
-
-  # Is old location a symlink?
-  if [ -L "$old" ]; then
-    # Does it already point to new location?
-    if [ "$(readlink "$old")" = "$new" ]; then
-      # Nothing to do; migration has already been done.
-      observe "migration of $old to $new already done"
-      return 0
-    else
-      # Back it up.
-      warn "backing up symbolic link $old as $old.dpkg-old"
-      mv -b "$old" "$old.dpkg-old"
-    fi
-  fi
-
-  # Does old location exist, but is not a directory?
-  if [ -e "$old" ] && ! [ -d "$old" ]; then
-      # Back it up.
-      warn "backing up non-directory $old as $old.dpkg-old"
-      mv -b "$old" "$old.dpkg-old"
-  fi
-
-  observe "migrating $old to $new"
-
-  # Is new location a symlink?
-  if [ -L "$new" ]; then
-    # Does it point the wrong way, i.e., back to where we're migrating from?
-    if [ "$(readlink "$new")" = "$old" ]; then
-      # Get rid of it.
-      observe "removing symbolic link $new which points to $old"
-      rm "$new"
-    else
-      # Back it up.
-      warn "backing up symbolic link $new as $new.dpkg-old"
-      mv -b "$new" "$new.dpkg-old"
-    fi
-  fi
-
-  # Does new location exist, but is not a directory?
-  if [ -e "$new" ] && ! [ -d "$new" ]; then
-    warn "backing up non-directory $new as $new.dpkg-old"
-    mv -b "$new" "$new.dpkg-old"
-  fi
-
-  # Create new directory if it does not yet exist.
-  if ! [ -e "$new" ]; then
-    observe "creating $new"
-    mkdir -p "$new"
-  fi
-
-  # Copy files in old location to new location.  Back up any filenames that
-  # already exist in the new location with the extension ".dpkg-old".
-  observe "copying files from $old to $new"
-  if ! (cd "$old" && cp -a -b -S ".dpkg-old" . "$new"); then
-    die "error(s) encountered while copying files from $old to $new"
-  fi
-
-  # Remove files at old location.
-  observe "removing $old"
-  rm -r "$old"
-
-  # Create symlink from old location to new location.
-  make_symlink_sane "$old" "$new"
-}
-
-# vim:set ai et sw=2 ts=2 tw=80:
-
-# GOBSTOPPER: The X Strike Force shell library ends here.
old mode 100755 (executable)
new mode 100644 (file)
index 27f3f0d..5837e89
@@ -1,26 +1,28 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+                   "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+<!ENTITY % defs SYSTEM "defs.ent"> %defs;
+]>
 
 
-
-<book id="icelib">
+<book id="ICElib">
 
 <bookinfo>
    <title>Inter-Client Exchange Library</title>
    <subtitle>X Consortium Standard</subtitle>
-   <releaseinfo>X Version 11, Release 6.4</releaseinfo>
+   <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
+   <releaseinfo>Version 1.0</releaseinfo>
    <authorgroup>
      <author>
        <firstname>Ralph</firstname><surname>Mor</surname>
        <affiliation><orgname>X Consortium</orgname></affiliation>
      </author>
    </authorgroup>
-   <corpname>X Consortium Standard</corpname>
-   <copyright><year>1993</year><holder>X Consortium</holder></copyright>
-   <copyright><year>1994</year><holder>X Consortium</holder></copyright>
-   <copyright><year>1996</year><holder>X Consortium</holder></copyright>
-   <revhistory><revision><revnumber>1.0</revnumber><date></date></revision></revhistory>
+   <copyright>
+     <year>1993</year><year>1994</year><year>1996</year>
+     <holder>X Consortium</holder>
+   </copyright>
 
 <legalnotice>
 <para>
@@ -55,7 +57,7 @@ in this Software without prior written authorization from the X Consortium.
 </legalnotice>
 </bookinfo>
 
-<chapter id='overview_of_ice'>
+<chapter id='Overview_of_ICE'>
 <title>Overview of ICE</title>
 
 <para>
@@ -68,7 +70,7 @@ mechanisms and to be multiplexed over a single transport connection.
 </para>
 </chapter>
 
-<chapter id='the_ice_library__c_language_interface_to'>
+<chapter id='The_ICE_Library___C_Language_Interface_to_ICE'>
 <title>The ICE Library - C Language Interface to ICE</title>
 
 <para>
@@ -105,7 +107,7 @@ particular message.
 </para>
 </chapter>
 
-<chapter id='intended_audience'>
+<chapter id='Intended_Audience'>
 <title>Intended Audience</title>
 
 <para>This document is intended primarily for implementors of protocol libraries
@@ -118,7 +120,7 @@ clients).  But in general, protocol libraries should be designed to hide
 the inner details of ICE from applications.</para>
 </chapter>
 
-<chapter id='header_files_and_library_name'>
+<chapter id='Header_Files_and_Library_Name'>
 <title>Header Files and Library Name</title>
 
 
@@ -136,7 +138,7 @@ the header file
 <para>Applications should link against ICElib using -lICE.</para>
 </chapter>
 
-<chapter id='note_on_prefixes'>
+<chapter id='Note_on_Prefixes'>
 <title>Note on Prefixes</title>
 
 
@@ -159,7 +161,7 @@ responds with a
 </itemizedlist>
 </chapter>
 
-<chapter id='protocol_registration'>
+<chapter id='Protocol_Registration'>
 <title>Protocol Registration</title>
 
 <para>
@@ -198,24 +200,23 @@ condition.
 
 
 <para>
-The <function>IceRegisterForProtocolSetup</function>
+The <xref linkend='IceRegisterForProtocolSetup' xrefstyle='select: title'/>
 function should be called for the client that initiates a
 <function>ProtocolSetup</function>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceRegisterForProtocolSetup'>
 <funcprototype>
   <funcdef>int <function>IceRegisterForProtocolSetup</function></funcdef>
-    <paramdef>char<parameter> *protocol_name</parameter></paramdef>
-    <paramdef>char<parameter> *vendor</parameter></paramdef>
-    <paramdef>char<parameter> *release</parameter></paramdef>
-    <paramdef>int<parameter> *version_count</parameter></paramdef>
-    <paramdef>int<parameter> *version_count</parameter></paramdef>
+    <paramdef>const char<parameter> *protocol_name</parameter></paramdef>
+    <paramdef>const char<parameter> *vendor</parameter></paramdef>
+    <paramdef>const char<parameter> *release</parameter></paramdef>
+    <paramdef>int<parameter> version_count</parameter></paramdef>
     <paramdef>IcePoVersionRec<parameter> *version_recs</parameter></paramdef>
-    <paramdef>int<parameter> auth_names</parameter></paramdef>
+    <paramdef>int<parameter> auth_count</parameter></paramdef>
     <paramdef>char<parameter> **auth_names</parameter></paramdef>
     <paramdef>IcePoAuthProc<parameter> *auth_procs</parameter></paramdef>
-    <paramdef>IceIOErrorProc<parameter> *io_error_proc</parameter></paramdef>
+    <paramdef>IceIOErrorProc<parameter> io_error_proc</parameter></paramdef>
 </funcprototype>
 </funcsynopsis>
 
@@ -283,9 +284,9 @@ The list of authentication callbacks, one for each authentication method.
 
 
 <para>
-<function>IceRegisterForProtocolSetup</function> returns the major
+<xref linkend='IceRegisterForProtocolSetup' xrefstyle='select: title'/> returns the major
 opcode reserved or -1 if an error occurred.  In order to actually activate
-the protocol, the <function>IceProtocolSetup</function>
+the protocol, the <xref linkend='IceProtocolSetup' xrefstyle='select: title'/>
 function needs to be called with this major opcode.  Once the protocol is
 activated, all messages for the protocol should be sent using this major
 opcode.
@@ -315,8 +316,8 @@ received by the client that initiated the
 <function>ProtocolSetup</function>
 For further information,
 see
-<link linkend="callbacks_for_processing_messages">
-<xref linkend="callbacks_for_processing_messages"></xref></link>.</para>
+<xref linkend='Callbacks_for_Processing_Messages' xrefstyle='select: title'/>
+</para>
 
 <para>Authentication may be required before the protocol can become active.
 The protocol library must register the authentication methods that it
@@ -326,32 +327,41 @@ and callbacks that are  prioritized in decreasing order of preference.
 For information on the
 <function>IcePoAuthProc</function>
 callback, see
-<link linkend="authentication_methods">
-<xref linkend="authentication_methods"></xref></link>
+<xref linkend='Authentication_Methods' xrefstyle='select: title'/>
 </para>
 
 <para>The
-<function>IceIOErrorProc</function>
+<xref linkend='IceIOErrorProc' xrefstyle='select: title'/>
 callback is invoked if the ICE connection unexpectedly breaks.
 You should pass NULL for io_error_proc if not interested in being notified.
 For further information,
-<link linkend="error_handling">
-<xref linkend="error_handling"></xref></link>
+<xref linkend='Error_Handling' xrefstyle='select: title'/>
 </para>
 
 
 <para>The
-<function>IceRegisterForProtocolReply</function>
+<xref linkend='IceRegisterForProtocolReply' xrefstyle='select: title'/>
 function should be called for the client that responds to a
 <function>ProtocolSetup</function>
 with a
 <function>ProtocolReply</function></para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IceRegisterForProtocolReply'>
 <funcprototype>
   <funcdef>Bool <function>IceRegisterForProtocolReply</function></funcdef>
-    <paramdef>char<parameter> *host_name</parameter></paramdef>
+    <paramdef>const char<parameter> *protocol_name</parameter></paramdef>
+    <paramdef>const char<parameter> *vendor</parameter></paramdef>
+    <paramdef>const char<parameter> *release</parameter></paramdef>
+    <paramdef>int<parameter> version_count</parameter></paramdef>
+    <paramdef>IcePoVersionRec<parameter> *version_recs</parameter></paramdef>
+    <paramdef>int<parameter> auth_count</parameter></paramdef>
+    <paramdef>const char<parameter> **auth_names</parameter></paramdef>
+    <paramdef>IcePoAuthProc<parameter> *auth_procs</parameter></paramdef>
+    <paramdef>IceHostBasedAuthProc<parameter> host_based_auth_proc</parameter></paramdef>
+    <paramdef>IceProtocolSetupProc<parameter> protocol_setup_proc</parameter></paramdef>
+    <paramdef>IceProtocolActivateProc<parameter> protocol_activate_proc</parameter></paramdef>
+    <paramdef>IceIOErrorProc<parameter> io_error_proc</parameter></paramdef>
 </funcprototype>
 </funcsynopsis>
 
@@ -435,7 +445,7 @@ is sent.</para>
 </variablelist>
 
 
-<para><function>IceRegisterForProtocolReply</function>
+<para><xref linkend='IceRegisterForProtocolReply' xrefstyle='select: title'/>
 returns the major opcode reserved or -1 if an error occurred.  The major
 opcode should be used in all subsequent messages sent for this protocol.</para>
 
@@ -456,14 +466,13 @@ typedef struct {
 
 
 <para>The
-<function>IcePaProcessMsgProc</function>
+<xref linkend='IcePaProcessMsgProc' xrefstyle='select: title'/>
 callback is responsible for processing the set of messages that can be
 received by the client that accepted the
 <function>ProtocolSetup</function>
 For further information,
 see
-<link linkend="callbacks_for_processing_messages">
-<xref linkend="callbacks_for_processing_messages"></xref></link>
+<xref linkend='Callbacks_for_Processing_Messages' xrefstyle='select: title'/>
 </para>
 
 <para>Authentication may be required before the protocol can become active.
@@ -474,8 +483,7 @@ and callbacks that are prioritized in decreasing order of preference.
 For information on the
 <function>IcePaAuthProc</function>,
 See
-<link linkend="authentication_methods">
-<xref linkend="authentication_methods"></xref></link>
+<xref linkend='Authentication_Methods' xrefstyle='select: title'/>
 
 </para>
 
@@ -548,7 +556,7 @@ library intends to generate a message immediately following the
 You should pass NULL for protocol_activate_proc if not interested
 in this callback.</para>
 
-<funcsynopsis>
+<funcsynopsis id='ProtocolSetupProc'>
 <funcprototype>
   <funcdef>Status <function>ProtocolSetupProc</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -608,7 +616,7 @@ in this callback.</para>
 
 <para>The pointer stored in the client_data_ret argument will be passed
 to the
-<function>IcePaProcessMsgProc</function>
+<xref linkend='IcePaProcessMsgProc' xrefstyle='select: title'/>
 callback whenever a message has arrived for this protocol on the
 ICE connection.</para>
 
@@ -626,7 +634,7 @@ The ICE library will be responsible for freeing this memory.</para>
 <function>IceProtocolActivateProc</function>
 callback is defined as follows:</para>
 
-<funcsynopsis>
+<funcsynopsis id='ProtocolActivateProc'>
 <funcprototype>
   <funcdef>void <function>ProtocolActivateProc</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -651,29 +659,27 @@ The client data set in the <function>IceProtocolSetupProc</function> callback.
 
 
 <para>The
-<function>IceIOErrorProc</function>
+<xref linkend='IceIOErrorProc' xrefstyle='select: title'/>
 callback is invoked if the ICE connection unexpectedly breaks.
 You should pass NULL for io_error_proc if not interested in being notified.
 For further information,
 see
-<link linkend="error_handling">
-<xref linkend="error_handling"></xref></link>
+<xref linkend='Error_Handling' xrefstyle='select: title'/>
 </para>
 
-<sect1 id='callbacks_for_processing_messages'>
+<sect1 id='Callbacks_for_Processing_Messages'>
 <title>Callbacks for Processing Messages</title>
 
 <para>When an application detects that there is new data to read on an ICE
 connection (via
 <function>select</function>
 it calls the
-<function>IceProcessMessages</function>
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/>
 function
-<link linkend="processing_messages">
-<xref linkend="processing_messages"></xref></link>.
+<xref linkend='Processing_Messages' xrefstyle='select: title'/>
 
 When
-<function>IceProcessMessages</function>
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/>
 reads an ICE message header with a major opcode other than
 zero (reserved for the ICE protocol), it needs to call a function that will
 read the rest of the message, unpack it, and process it accordingly.</para>
@@ -684,7 +690,7 @@ the
 <function>IcePoProcessMsgProc</function>
 callback is invoked.</para>
 
-<funcsynopsis>
+<funcsynopsis id='PoProcessMsgProc'>
 <funcprototype>
   <funcdef>void <function>PoProcessMsgProc</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -746,11 +752,11 @@ a reply is ready.</para>
 <para>If the message arrives at the client that accepted the
 <function>ProtocolSetup</function>
 the
-<function>IcePaProcessMsgProc</function>
+<xref linkend='IcePaProcessMsgProc' xrefstyle='select: title'/>
 callback is invoked.</para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IcePaProcessMsgProc'>
 <funcprototype>
   <funcdef>void <function>IcePaProcessMsgProc</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -795,8 +801,7 @@ callback is invoked.</para>
 
 <para>In order to read the message, both of these callbacks should use the
 macros defined for this purpose (see
-<link linkend="reading_ice_messages">
-<xref linkend="reading_ice_messages"></xref></link>.).
+<xref linkend='Reading_ICE_Messages' xrefstyle='select: title'/>.).
 Note that byte swapping may be necessary.
 As a convenience, the length field in the ICE header will be swapped by ICElib
 if necessary.</para>
@@ -808,9 +813,9 @@ time.
 In the case of
 <function>IcePoProcessMsgProc</function>
 the client data was set in the call to
-<function>IceProtocolSetup</function>
+<xref linkend='IceProtocolSetup' xrefstyle='select: title'/>
 In the case of
-<function>IcePaProcessMsgProc</function>
+<xref linkend='IcePaProcessMsgProc' xrefstyle='select: title'/>
 the client data was set in the
 <function>IceProtocolSetupProc</function>
 callback.</para>
@@ -881,14 +886,14 @@ then care must be taken not to store any value in reply_ready_ret,
 because this pointer may also be NULL.</para>
 
 <para>The
-<function>IcePaProcessMsgProc</function>
+<xref linkend='IcePaProcessMsgProc' xrefstyle='select: title'/>
 callback, on the other hand, should always pass
 the message to the client via a callback.  For example, if this is a Session
 Management "Interact Request" message, this function should notify the
 client of the "Interact Request" via a callback.</para>
 
 <para>The reason the
-<function>IcePaProcessMsgProc</function>
+<xref linkend='IcePaProcessMsgProc' xrefstyle='select: title'/>
 callback does not have a reply_wait, like
 <function>IcePoProcessMsgProc</function>
 does, is because a process that is acting as
@@ -897,7 +902,7 @@ occur if the connecting client does not act properly, denying access
 to other clients).</para>
 </sect1>
 
-<sect1 id='authentication_methods'>
+<sect1 id='Authentication_Methods'>
 <title>Authentication Methods</title>
 
 <para>As already stated, a protocol library must register the authentication
@@ -924,7 +929,7 @@ to the initial "Authentication Required" message or subsequent
 "Authentication Next Phase" messages sent by the other client.</para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IcePoAuthStatus'>
 <funcprototype>
   <funcdef>IcePoAuthStatus <function>IcePoAuthStatus </function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -1051,7 +1056,7 @@ should return one of four values:</para>
 is the callback invoked for the client that received the
 <function>ProtocolSetup</function></para>
 
-<funcsynopsis>
+<funcsynopsis id='PoAuthStatus'>
 <funcprototype>
   <funcdef>IcePoAuthStatus <function>PoAuthStatus </function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -1177,7 +1182,7 @@ The <function>IcePaAuthProc</function> should return one of four values:
 
 </chapter>
 
-<chapter id='ice_connections'>
+<chapter id='ICE_Connections'>
 <title>ICE Connections</title>
 
 <para>
@@ -1186,16 +1191,16 @@ waiting for connections, and the other client has to initiate the connection.
 Most clients will initiate connections, so we discuss that first.
 </para>
 
-<sect1 id='opening_an_ice_connection'>
+<sect1 id='Opening_an_ICE_Connection'>
 <title>Opening an ICE Connection</title>
 
 
 <para>
 To open an ICE connection with another client (that is, waiting
-for connections), use <function>IceOpenConnection</function>
+for connections), use <xref linkend='IceOpenConnection' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceOpenConnection'>
 <funcprototype>
   <funcdef>IceConn <function>IceOpenConnection</function></funcdef>
     <paramdef>char<parameter> *network_ids_list</parameter></paramdef>
@@ -1261,7 +1266,7 @@ are used.
 
 
 <para>
-<function>IceOpenConnection</function>
+<xref linkend='IceOpenConnection' xrefstyle='select: title'/>
 returns an opaque ICE connection object if it succeeds;
 otherwise, it returns NULL.
 </para>
@@ -1273,26 +1278,23 @@ that fails, an attempt will be made using the second network ID, and so on.
 Each network ID has the following format:
 </para>
 
-<informaltable pgwide='0' frame='none'>
-  <tgroup cols='3' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
-    <colspec colname='c3'/>
+<informaltable frame='none'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='2.0*'/>
     <tbody>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>tcp/&lt;hostname&gt;:&lt;portnumber&gt;</entry>
-        <entry align='left'>or</entry>
+        <entry>tcp/&lt;hostname&gt;:&lt;portnumber&gt;</entry>
+        <entry>or</entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>decnet/&lt;hostname&gt;::&lt;objname&gt;</entry>
-        <entry align='left'>or</entry>
+        <entry>decnet/&lt;hostname&gt;::&lt;objname&gt;</entry>
+        <entry>or</entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>local/&lt;hostname&gt;:&lt;path&gt;</entry>
-        <entry align='left'></entry>
+        <entry>local/&lt;hostname&gt;:&lt;path&gt;</entry>
+        <entry></entry>
       </row>
     </tbody>
   </tgroup>
@@ -1301,9 +1303,9 @@ Each network ID has the following format:
 
 <para>Most protocol libraries will have some sort of open function that should
 internally make a call into
-<function>IceOpenConnection</function>
+<xref linkend='IceOpenConnection' xrefstyle='select: title'/>
 When
-<function>IceOpenConnection</function>
+<xref linkend='IceOpenConnection' xrefstyle='select: title'/>
 is called, it may be possible to use a previously opened ICE connection (if
 the target client is the same).  However, there are cases in which shared
 ICE connections are not desired.</para>
@@ -1330,40 +1332,40 @@ Appendix A).
   </para></footnote> </para>
 
 <para>After
-<function>IceOpenConnection</function>
+<xref linkend='IceOpenConnection' xrefstyle='select: title'/>
 is called, the client is ready to send a
 <function>ProtocolSetup</function>
 (provided that
-<function>IceRegisterForProtocolSetup</function>
+<xref linkend='IceRegisterForProtocolSetup' xrefstyle='select: title'/>
 was called) or receive a
 <function>ProtocolSetup</function>
 (provided that
-<function>IceRegisterForProtocolReply</function>
+<xref linkend='IceRegisterForProtocolReply' xrefstyle='select: title'/>
 was called).</para>
 </sect1>
 
-<sect1 id='listening_for_ice_connections'>
+<sect1 id='Listening_for_ICE_Connections'>
 <title>Listening for ICE Connections</title>
 
 <para>Clients wishing to accept ICE connections must first call
-<function>IceListenForConnections</function>
+<xref linkend='IceListenForConnections' xrefstyle='select: title'/>
 or
-<function>IceListenForWellKnownConnections</function>
+<xref linkend='IceListenForWellKnownConnections' xrefstyle='select: title'/>
 so that they can listen for connections.  A list of opaque "listen" objects are
 returned, one for each type of transport method that is available
 (for example, Unix Domain, TCP, DECnet, and so on).</para>
 
 <para>Normally clients will let ICElib allocate an available name in each
 transport and return listen objects.  Such a client will then use
-<function>IceComposeNetworkIdList</function>
+<xref linkend='IceComposeNetworkIdList' xrefstyle='select: title'/>
 to extract the chosen names and make them
 available to other clients for opening the connection.  In certain
 cases it may be necessary for a client to listen for connections
 on pre-arranged transport object names.  Such a client may use
-<function>IceListenForWellKnownConnections</function>
+<xref linkend='IceListenForWellKnownConnections' xrefstyle='select: title'/>
 to specify the names for the listen objects.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceListenForConnections'>
 <funcprototype>
   <funcdef>Status <function>IceListenForConnections</function></funcdef>
     <paramdef>int<parameter> *count_ret</parameter></paramdef>
@@ -1400,10 +1402,10 @@ No more than error_length bytes are used.</para>
 
 
 <para>The return value of
-<function>IceListenForConnections</function>
+<xref linkend='IceListenForConnections' xrefstyle='select: title'/>
 is zero for failure and a positive value for success.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceListenForWellKnownConnections'>
 <funcprototype>
   <funcdef>Status <function>IceListenForWellKnownConnections</function></funcdef>
     <paramdef>char<parameter> *port_id</parameter></paramdef>
@@ -1467,27 +1469,27 @@ points to user supplied memory.  No more than error_length bytes are used.
 </variablelist>
 
 <para>
-<function>IceListenForWellKnownConnections</function> constructs a list
+<xref linkend='IceListenForWellKnownConnections' xrefstyle='select: title'/> constructs a list
 of network IDs by prepending each known transport to port_id and then
 attempts to create listen objects for the result.  Port_id is the portnumber,
 objname, or path portion of the ICE network ID. If a listen object for
 a particular network ID cannot be created the network ID is ignored.
 If no listen objects are created
-<function>IceListenForWellKnownConnections</function>
+<xref linkend='IceListenForWellKnownConnections' xrefstyle='select: title'/>
 returns failure.
 </para>
 
 <para>
-The return value of <function>IceListenForWellKnownConnections</function>
+The return value of <xref linkend='IceListenForWellKnownConnections' xrefstyle='select: title'/>
 is zero for failure and a positive value for success.
 </para>
 
 <para>
 To close and free the listen objects, use
-<function>IceFreeListenObjs</function>
+<xref linkend='IceFreeListenObjs' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceFreeListenObjs'>
 <funcprototype>
   <funcdef>void <function>IceFreeListenObjs</function></funcdef>
     <paramdef>int<parameter> count</parameter></paramdef>
@@ -1519,10 +1521,10 @@ the listen object.
 
 <para>
 To obtain the descriptor, use
-<function>IceGetListenConnectionNumber</function>
+<xref linkend='IceGetListenConnectionNumber' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceGetListenConnectionNumber'>
 <funcprototype>
   <funcdef>int <function>IceGetListenConnectionNumber</function></funcdef>
     <paramdef>IceListenObj<parameter> *listen_objs</parameter></paramdef>
@@ -1540,11 +1542,11 @@ To obtain the descriptor, use
 
 <para>
 To obtain the network ID string associated with a listen object, use
-<function>IceGetListenConnectionString</function>
+<xref linkend='IceGetListenConnectionString' xrefstyle='select: title'/>
 </para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IceGetListenConnectionString'>
 <funcprototype>
   <funcdef>char <function>IceGetListenConnectionString</function></funcdef>
     <paramdef>IceListenObj<parameter> listen_obj</parameter></paramdef>
@@ -1562,26 +1564,23 @@ To obtain the network ID string associated with a listen object, use
 
 <para>A network ID has the following format:</para>
 
-<informaltable pgwide='0' frame='none'>
-  <tgroup cols='3' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
-    <colspec colname='c3'/>
+<informaltable frame='none'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='2.0*'/>
     <tbody>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>tcp/&lt;hostname&gt;:&lt;portnumber&gt;</entry>
-        <entry align='left'>or</entry>
+        <entry>tcp/&lt;hostname&gt;:&lt;portnumber&gt;</entry>
+        <entry>or</entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>decnet/&lt;hostname&gt;::&lt;objname&gt;</entry>
-        <entry align='left'>or</entry>
+        <entry>decnet/&lt;hostname&gt;::&lt;objname&gt;</entry>
+        <entry>or</entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>local/&lt;hostname&gt;:&lt;path&gt;</entry>
-        <entry align='left'></entry>
+        <entry>local/&lt;hostname&gt;:&lt;path&gt;</entry>
+        <entry></entry>
       </row>
     </tbody>
   </tgroup>
@@ -1589,11 +1588,11 @@ To obtain the network ID string associated with a listen object, use
 
 <para>
 To compose a string containing a list of network IDs separated by commas
-(the format recognized by <function>IceOpenConnection</function>
-use <function>IceComposeNetworkIdList</function>
+(the format recognized by <xref linkend='IceOpenConnection' xrefstyle='select: title'/>
+use <xref linkend='IceComposeNetworkIdList' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceComposeNetworkIdList'>
 <funcprototype>
   <funcdef>char <function>IceComposeNetworkIdList</function></funcdef>
     <paramdef>int<parameter> count</parameter></paramdef>
@@ -1618,7 +1617,7 @@ use <function>IceComposeNetworkIdList</function>
 
 </sect1>
 
-<sect1 id='host_based_authentication_for_ice_connec'>
+<sect1 id='Host_Based_Authentication_for_ICE_Connections'>
 <title>Host Based Authentication for ICE Connections</title>
 
 <para>
@@ -1627,11 +1626,11 @@ ICE connection and the initiating client has not required authentication,
 a host based authentication procedure may be invoked to provide
 a last chance for the client to connect.  Each listen object has such a
 callback associated with it, and this callback is set using the
-<function>IceSetHostBasedAuthProc</function>
+<xref linkend='IceSetHostBasedAuthProc' xrefstyle='select: title'/>
 function.
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceSetHostBasedAuthProc'>
 <funcprototype>
   <funcdef>void <function>IceSetHostBasedAuthProc</function></funcdef>
     <paramdef>IceListenObj<parameter> listen_obj</parameter></paramdef>
@@ -1662,7 +1661,7 @@ host based authentication if it was previously set.
 </para>
 
 
-<funcsynopsis>
+<funcsynopsis id='HostBasedAuthProc'>
 <funcprototype>
   <funcdef>Bool <function>HostBasedAuthProc</function></funcdef>
     <paramdef>char<parameter> *host_name</parameter></paramdef>
@@ -1702,25 +1701,24 @@ which always returns <function>True</function>
 Host based authentication is also allowed at
 <function>ProtocolSetup</function> time.
 The callback is specified in the
-<function>IceRegisterForProtocolReply</function>
+<xref linkend='IceRegisterForProtocolReply' xrefstyle='select: title'/>
 function (see
-<link linkend="protocol_registration">
-<xref linkend="protocol_registration"></xref></link>).
+<xref linkend='Protocol_Registration' xrefstyle='select: title'/>).
 </para>
 </sect1>
 
-<sect1 id='accepting_ice_connections'>
+<sect1 id='Accepting_ICE_Connections'>
 <title>Accepting ICE Connections</title>
 
 
 <para>
 After a connection attempt is detected on a listen object returned by
-<function>IceListenForConnections</function>
-you should call <function>IceAcceptConnection</function>
+<xref linkend='IceListenForConnections' xrefstyle='select: title'/>
+you should call <xref linkend='IceAcceptConnection' xrefstyle='select: title'/>
 This returns a new opaque ICE connection object.
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceAcceptConnection'>
 <funcprototype>
   <funcdef>IceConn <function>IceAcceptConnection</function></funcdef>
     <paramdef>IceListenObj<parameter> listen_obj</parameter></paramdef>
@@ -1768,9 +1766,9 @@ and the function returns a new connection object.</para>
 <function>select</function>
 on the file descriptors associated with the listen objects.
 When a new connection is detected, the
-<function>IceAcceptConnection</function>
+<xref linkend='IceAcceptConnection' xrefstyle='select: title'/>
 function should be called.
-<function>IceAcceptConnection</function>
+<xref linkend='IceAcceptConnection' xrefstyle='select: title'/>
 may return a new ICE connection that is in a pending state.  This is because
 before the connection can become valid, authentication may be necessary.
 Because the ICE library cannot block and wait for the connection to
@@ -1831,31 +1829,31 @@ else
 </literallayout>
 
 <para>After
-<function>IceAcceptConnection</function>
+<xref linkend='IceAcceptConnection' xrefstyle='select: title'/>
 is called and the connection has been
 validated, the client is ready to receive a
 <function>ProtocolSetup</function>
 (provided
 that
-<function>IceRegisterForProtocolReply</function>
+<xref linkend='IceRegisterForProtocolReply' xrefstyle='select: title'/>
 was called) or send a
 <function>ProtocolSetup</function>
 (provided that
-<function>IceRegisterForProtocolSetup</function>
+<xref linkend='IceRegisterForProtocolSetup' xrefstyle='select: title'/>
 was called).</para>
 </sect1>
 
-<sect1 id='closing_ice_connections'>
+<sect1 id='Closing_ICE_Connections'>
 <title>Closing ICE Connections</title>
 
 <para>To close an ICE connection created with
-<function>IceOpenConnection</function>
+<xref linkend='IceOpenConnection' xrefstyle='select: title'/>
 or
-<function>IceAcceptConnection</function>
+<xref linkend='IceAcceptConnection' xrefstyle='select: title'/>
 use
-<function>IceCloseConnection</function></para>
+<xref linkend='IceCloseConnection' xrefstyle='select: title'/></para>
 
-<funcsynopsis>
+<funcsynopsis id='IceCloseConnection'>
 <funcprototype>
   <funcdef>IceCloseStatus <function>IceCloseConnection</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -1878,17 +1876,17 @@ must be met:</para>
   <listitem>
 <para>The <emphasis remap='I'>open reference count</emphasis> must have reached zero on this ICE connection.
 When
-<function>IceOpenConnection</function>
+<xref linkend='IceOpenConnection' xrefstyle='select: title'/>
 is called, it tries to use a previously opened
 ICE connection.  If it is able to use an existing connection, it increments
 the open reference count on the connection by one.
 So, to close an ICE connection, each call to
-<function>IceOpenConnection</function>
+<xref linkend='IceOpenConnection' xrefstyle='select: title'/>
 must be matched with a call to
-<function>IceCloseConnection</function>
+<xref linkend='IceCloseConnection' xrefstyle='select: title'/>
 The connection can be closed only
 on the last call to
-<function>IceCloseConnection</function></para>
+<xref linkend='IceCloseConnection' xrefstyle='select: title'/></para>
   </listitem>
   <listitem>
 <para>The <emphasis remap='I'>active protocol count</emphasis> must have reached zero.  Each time a
@@ -1896,18 +1894,17 @@ on the last call to
 succeeds on the connection, the active protocol count
 is incremented by one.  When the client no longer expects to use the
 protocol on the connection, the
-<function>IceProtocolShutdown</function>
+<xref linkend='IceProtocolShutdown' xrefstyle='select: title'/>
 function should be called, which decrements the active protocol count
 by one (see
-<link linkend="protocol_setup_and_shutdown">
-<xref linkend="protocol_setup_and_shutdown"></xref></link>).
+<xref linkend='Protocol_Setup_and_Shutdown' xrefstyle='select: title'/>).
 </para>
   </listitem>
   <listitem>
 <para>If shutdown negotiation is enabled on the connection, the client on the other
 side of the ICE connection must agree to have the connection closed.</para>
 
-<para><function>IceCloseConnection</function>
+<para><xref linkend='IceCloseConnection' xrefstyle='select: title'/>
 returns one of the following values:</para>
   </listitem>
   <listitem>
@@ -1918,12 +1915,12 @@ invoked and the connection was freed.</para>
   <listitem>
 <para><function>IceClosedASAP</function>
 - an IO error had occurred on the connection, but
-<function>IceCloseConnection</function>
+<xref linkend='IceCloseConnection' xrefstyle='select: title'/>
 is being called within a nested
-<function>IceProcessMessages</function>
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/>
 The watch procedures have been invoked at this time, but the connection
 will be freed as soon as possible (when the nesting level reaches zero and
-<function>IceProcessMessages</function>
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/>
 returns a status of
 <function>IceProcessMessagesConnectionClosed</function></para>
   </listitem>
@@ -1937,7 +1934,7 @@ other active protocols.</para>
 - the connection was not closed at this time and shutdown negotiation started
 with the client on the other side of the ICE connection.  When the connection
 is actually closed,
-<function>IceProcessMessages</function>
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/>
 will return a status of
 <function>IceProcessMessagesConnectionClosed</function></para>
   </listitem>
@@ -1945,12 +1942,12 @@ will return a status of
 
 <para>When it is known that the client on the other side of the ICE connection
 has terminated the connection without initiating shutdown negotiation, the
-<function>IceSetShutdownNegotiation</function>
+<xref linkend='IceSetShutdownNegotiation' xrefstyle='select: title'/>
 function should be called to turn off shutdown negotiation.  This will prevent
-<function>IceCloseConnection</function>
+<xref linkend='IceCloseConnection' xrefstyle='select: title'/>
 from writing to a broken connection.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceSetShutdownNegotiation'>
 <funcprototype>
   <funcdef>void <function>IceSetShutdownNegotiation</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -1976,9 +1973,9 @@ shutdown negotiating will be turned off.</para>
 </variablelist>
 
 <para>To check the shutdown negotiation status of an ICE connection, use
-<function>IceCheckShutdownNegotiation</function></para>
+<xref linkend='IceCheckShutdownNegotiation' xrefstyle='select: title'/></para>
 
-<funcsynopsis>
+<funcsynopsis id='IceCheckShutdownNegotiation'>
 <funcprototype>
   <funcdef>Bool <function>IceCheckShutdownNegotiation</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -1995,7 +1992,7 @@ shutdown negotiating will be turned off.</para>
 </variablelist>
 
 
-<para><function>IceCheckShutdownNegotiation</function>
+<para><xref linkend='IceCheckShutdownNegotiation' xrefstyle='select: title'/>
 returns
 <function>True</function>
 if shutdown negotiation will take place on the connection;
@@ -2003,24 +2000,24 @@ otherwise, it returns
 <function>False</function>
 Negotiation is on by default for a connection.  It
 can only be changed with the
-<function>IceSetShutdownNegotiation</function>
+<xref linkend='IceSetShutdownNegotiation' xrefstyle='select: title'/>
 function.</para>
 </sect1>
 
-<sect1 id='connection_watch_procedures'>
+<sect1 id='Connection_Watch_Procedures'>
 <title>Connection Watch Procedures</title>
 
 <para>To add a watch procedure that will be called
 each time ICElib opens a new connection via
-<function>IceOpenConnection</function>
+<xref linkend='IceOpenConnection' xrefstyle='select: title'/>
 or
-<function>IceAcceptConnection</function>
+<xref linkend='IceAcceptConnection' xrefstyle='select: title'/>
 or closes a connection via
-<function>IceCloseConnection</function>
+<xref linkend='IceCloseConnection' xrefstyle='select: title'/>
 use
-<function>IceAddConnectionWatch</function></para>
+<xref linkend='IceAddConnectionWatch' xrefstyle='select: title'/></para>
 
-<funcsynopsis>
+<funcsynopsis id='IceAddConnectionWatch'>
 <funcprototype>
   <funcdef>Status <function>IceAddConnectionWatch</function></funcdef>
     <paramdef>IceWatchProc<parameter> watch_proc</parameter></paramdef>
@@ -2047,16 +2044,16 @@ The watch procedure to invoke when ICElib opens or closes a connection.
 
 
 <para>
-The return value of <function>IceAddConnectionWatch</function>
+The return value of <xref linkend='IceAddConnectionWatch' xrefstyle='select: title'/>
 is zero for failure, and a positive value for success.
 </para>
 
 <para>
-Note that several calls to <function>IceOpenConnection</function>
+Note that several calls to <xref linkend='IceOpenConnection' xrefstyle='select: title'/>
 might share the same ICE connection.  In such a case, the watch procedure
 is only invoked when the connection is first created (after authentication
 succeeds).  Similarly, because connections might be shared, the
-watch procedure is called only if <function>IceCloseConnection</function>
+watch procedure is called only if <xref linkend='IceCloseConnection' xrefstyle='select: title'/>
 actually closes the connection (right before the IceConn is freed).
 </para>
 
@@ -2085,7 +2082,7 @@ set to <function>True</function>
 The watch procedure is of type <function>IceWatchProc</function>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='WatchProc'>
 <funcprototype>
   <funcdef>void <function>WatchProc</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2111,7 +2108,7 @@ to get the file descriptor associated with this connection.
     <listitem>
       <para>
 Client data specified in the call to
-<function>IceAddConnectionWatch</function>
+<xref linkend='IceAddConnectionWatch' xrefstyle='select: title'/>
       </para>
     </listitem>
   </varlistentry>
@@ -2141,10 +2138,10 @@ is closed and the watch procedure is invoked again with opening set to
 
 <para>
 To remove a watch procedure, use
-<function>IceRemoveConnectionWatch</function>
+<xref linkend='IceRemoveConnectionWatch' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceRemoveConnectionWatch'>
 <funcprototype>
   <funcdef>void <function>IceRemoveConnectionWatch</function></funcdef>
     <paramdef>IceWatchProc<parameter> watch_proc</parameter></paramdef>
@@ -2158,7 +2155,7 @@ To remove a watch procedure, use
     <listitem>
       <para>
 The watch procedure that was passed to
-<function>IceAddConnectionWatch</function>
+<xref linkend='IceAddConnectionWatch' xrefstyle='select: title'/>
       </para>
     </listitem>
   </varlistentry>
@@ -2167,7 +2164,7 @@ The watch procedure that was passed to
     <listitem>
       <para>
 The client_data pointer that was passed to
-<function>IceAddConnectionWatch</function>
+<xref linkend='IceAddConnectionWatch' xrefstyle='select: title'/>
       </para>
     </listitem>
   </varlistentry>
@@ -2176,15 +2173,15 @@ The client_data pointer that was passed to
 </sect1>
 </chapter>
 
-<chapter id='protocol_setup_and_shutdown'>
+<chapter id='Protocol_Setup_and_Shutdown'>
 <title>Protocol Setup and Shutdown</title>
 
 <para>
 To activate a protocol on a given ICE connection, use
-<function>IceProtocolSetup</function>
+<xref linkend='IceProtocolSetup' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceProtocolSetup'>
 <funcprototype>
   <funcdef>IceProtocolSetupStatus <function>IceProtocolSetup</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2212,7 +2209,7 @@ To activate a protocol on a given ICE connection, use
     <listitem>
       <para>
 The major opcode of the protocol to be set up, as returned by
-<function>IceRegisterForProtocolSetup</function>
+<xref linkend='IceRegisterForProtocolSetup' xrefstyle='select: title'/>
       </para>
     </listitem>
   </varlistentry>
@@ -2284,7 +2281,7 @@ The vendor_ret and release_ret strings should be freed with
 </para>
 
 <para>
-<function>IceProtocolSetup</function> returns one of the following values:
+<xref linkend='IceProtocolSetup' xrefstyle='select: title'/> returns one of the following values:
 </para>
 
 <itemizedlist>
@@ -2314,10 +2311,10 @@ are not set.
 
 <para>
 To notify the ICE library when a given protocol will no longer be used
-on an ICE connection, use <function>IceProtocolShutdown</function>
+on an ICE connection, use <xref linkend='IceProtocolShutdown' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceProtocolShutdown'>
 <funcprototype>
   <funcdef>Status <function>IceProtocolShutdown</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2342,7 +2339,7 @@ on an ICE connection, use <function>IceProtocolShutdown</function>
 
 
 <para>
-The return value of <function>IceProtocolShutdown</function>
+The return value of <xref linkend='IceProtocolShutdown' xrefstyle='select: title'/>
 is zero for failure and a positive value for success.
 </para>
 
@@ -2355,14 +2352,14 @@ protocol shutdown.
 </para>
 </chapter>
 
-<chapter id='processing_messages'>
+<chapter id='Processing_Messages'>
 <title>Processing Messages</title>
 
 
 <para>To process incoming messages on an ICE connection, use
-<function>IceProcessMessages</function></para>
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/></para>
 
-<funcsynopsis>
+<funcsynopsis id='IceProcessMessages'>
 <funcprototype>
   <funcdef>IceProcessMessagesStatus <function>IceProcessMessages</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2395,19 +2392,19 @@ If set to <function>True</function> on return, a reply is ready.
 </variablelist>
 
 <para>
-<function>IceProcessMessages</function> is used in two ways:
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/> is used in two ways:
 </para>
 
 <itemizedlist>
   <listitem>
     <para>
 In the first, a client may generate a message and block by calling
-<function>IceProcessMessages</function> repeatedly until it gets its reply.
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/> repeatedly until it gets its reply.
     </para>
   </listitem>
   <listitem>
     <para>
-In the second, a client calls <function>IceProcessMessages</function>
+In the second, a client calls <xref linkend='IceProcessMessages' xrefstyle='select: title'/>
 with reply_wait set to NULL in response to <function>select</function>
 showing that there is data to read on the ICE connection.
 The ICE library may process zero or more complete messages.
@@ -2450,7 +2447,7 @@ typedef struct {
 
 <para>
 If reply_wait is not NULL and
-<function>IceProcessMessages</function>
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/>
 has a reply or error to return in response to this reply_wait
 (that is, no callback was generated), then the reply_ready_ret argument
 will be set to <function>True</function>
@@ -2463,7 +2460,7 @@ this pointer.
 </para>
 
 <para>
-<function>IceProcessMessages</function> returns one of the following values:
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/> returns one of the following values:
 </para>
 
 <itemizedlist>
@@ -2476,7 +2473,7 @@ this pointer.
     <para>
 <function>IceProcessMessagesIOError</function> - an IO error occurred,
 and the caller must explicitly close the connection by calling
-<function>IceCloseConnection</function>
+<xref linkend='IceCloseConnection' xrefstyle='select: title'/>
     </para>
   </listitem>
   <listitem>
@@ -2484,7 +2481,7 @@ and the caller must explicitly close the connection by calling
 <function>IceProcessMessagesConnectionClosed</function>
 - the ICE connection has been closed (closing of the connection was deferred
 because of shutdown negotiation, or because the
-<function>IceProcessMessages</function>
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/>
 nesting level was not zero).  Do not attempt
 to access the ICE connection at this point, since it has been freed.
     </para>
@@ -2493,15 +2490,15 @@ to access the ICE connection at this point, since it has been freed.
 
 </chapter>
 
-<chapter id='ping'>
+<chapter id='Ping'>
 <title>Ping</title>
 
 <para>
 To send a "Ping" message to the client on the other side of the
-ICE connection, use <function>IcePing</function>
+ICE connection, use <xref linkend='IcePing' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IcePing'>
 <funcprototype>
   <funcdef>Status <function>IcePing</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2527,7 +2524,7 @@ ICE connection, use <function>IcePing</function>
     <term><emphasis remap='I'>client_data</emphasis></term>
     <listitem>
       <para>
-This pointer will be passed to the <function>IcePingReplyProc</function>
+This pointer will be passed to the <olink targetdoc='SMlib' targetptr='IcePingReplyProc'><function>IcePingReplyProc</function></olink>
 callback.
       </para>
     </listitem>
@@ -2535,16 +2532,16 @@ callback.
 </variablelist>
 
 
-<para><function>IcePing</function>
+<para><xref linkend='IcePing' xrefstyle='select: title'/>
 returns zero for failure and a positive value for success.</para>
 
 <para>When
-<function>IceProcessMessages</function>
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/>
 processes the Ping reply, it will invoke the
-<function>IcePingReplyProc</function>
+<olink targetdoc='SMlib' targetptr='IcePingReplyProc'><function>IcePingReplyProc</function></olink>
 callback.</para>
 
-<funcsynopsis>
+<funcsynopsis id='PingReplyProc'>
 <funcprototype>
   <funcdef>void <function>PingReplyProc</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2563,24 +2560,24 @@ callback.</para>
   <term><emphasis remap='I'>client_data</emphasis></term>
   <listitem>
 <para>The client data specified in the call to
-<function>IcePing</function></para>
+<xref linkend='IcePing' xrefstyle='select: title'/></para>
   </listitem>
   </varlistentry>
 </variablelist>
 
 </chapter>
 
-<chapter id='using_icelib_informational_functions'>
+<chapter id='Using_ICElib_Informational_Functions'>
 <title>Using ICElib Informational Functions</title>
 
-<funcsynopsis>
+<funcsynopsis id='IceConnectionStatus'>
 <funcprototype>
   <funcdef>IceConnectStatus <function>IceConnectionStatus</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
 </funcprototype>
 </funcsynopsis>
 
-<para><function>IceConnectionStatus</function>
+<para><xref linkend='IceConnectionStatus' xrefstyle='select: title'/>
 returns the status of an ICE connection.  The possible return values are:</para>
 
 <itemizedlist>
@@ -2588,19 +2585,19 @@ returns the status of an ICE connection.  The possible return values are:</para>
 <para><function>IceConnectPending</function>
 - the connection is not valid yet (that is, authentication is taking place).
 This is only relevant to connections created by
-<function>IceAcceptConnection</function></para>
+<xref linkend='IceAcceptConnection' xrefstyle='select: title'/></para>
   </listitem>
   <listitem>
 <para><function>IceConnectAccepted</function>
 - the connection has been accepted.
 This is only relevant to connections created by
-<function>IceAcceptConnection</function></para>
+<xref linkend='IceAcceptConnection' xrefstyle='select: title'/></para>
   </listitem>
   <listitem>
 <para><function>IceConnectRejected</function>
 - the connection had been rejected  (that is, authentication failed).
 This is only relevant to connections created by
-<function>IceAcceptConnection</function></para>
+<xref linkend='IceAcceptConnection' xrefstyle='select: title'/></para>
   </listitem>
   <listitem>
 <para><function>IceConnectIOError</function>
@@ -2608,7 +2605,7 @@ This is only relevant to connections created by
   </listitem>
 </itemizedlist>
 
-<funcsynopsis>
+<funcsynopsis id='IceVendor'>
 <funcprototype>
   <funcdef>char <function> *IceVendor</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2622,7 +2619,7 @@ The string should be freed with a call to
 <function>free</function>
 when no longer needed.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceRelease'>
 <funcprototype>
   <funcdef>char <function> *IceRelease</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2636,17 +2633,17 @@ The string should be freed with a call to
 <function>free</function>
 when no longer needed.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceProtocolVersion'>
 <funcprototype>
   <funcdef>int <function> IceProtocolVersion</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
 </funcprototype>
 </funcsynopsis>
 
-<para><function>IceProtocolVersion</function>
+<para><xref linkend='IceProtocolVersion' xrefstyle='select: title'/>
 returns the major version of the ICE protocol on this connection.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceProtocolRevision'>
 <funcprototype>
   <funcdef>int <function> IceProtocolRevision</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2654,7 +2651,7 @@ returns the major version of the ICE protocol on this connection.</para>
 </funcsynopsis>
 
 
-<para><function>IceProtocolRevision</function>
+<para><xref linkend='IceProtocolRevision' xrefstyle='select: title'/>
 returns the minor version of the ICE protocol on this connection.</para>
 
 <funcsynopsis>
@@ -2668,7 +2665,7 @@ returns the minor version of the ICE protocol on this connection.</para>
 <para><function>IceConnectionNumber</function>
 returns the file descriptor of this ICE connection.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceConnectionString'>
 <funcprototype>
   <funcdef>char <function> *IceConnectionString</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2681,7 +2678,7 @@ accepted this connection.  The string should be freed with a call to
 <function>free</function>
 when no longer needed.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceLastSentSequenceNumber'>
 <funcprototype>
   <funcdef>unsigned long <function> IceLastSentSequenceNumber</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2689,7 +2686,7 @@ when no longer needed.</para>
 </funcsynopsis>
 
 
-<para><function>IceLastSentSequenceNumber</function>
+<para><xref linkend='IceLastSentSequenceNumber' xrefstyle='select: title'/>
 returns the sequence number of the last message sent on this ICE connection.</para>
 
 <funcsynopsis>
@@ -2703,7 +2700,7 @@ returns the sequence number of the last message sent on this ICE connection.</pa
 returns the sequence number of the last message received on this
 ICE connection.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceSwapping'>
 <funcprototype>
   <funcdef>Bool <function> IceSwapping</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2711,24 +2708,24 @@ ICE connection.</para>
 </funcsynopsis>
 
 
-<para><function>IceSwapping</function>
+<para><xref linkend='IceSwapping' xrefstyle='select: title'/>
 returns
 <function>True</function>
 if byte swapping is necessary when reading messages on the ICE connection.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceGetContext'>
 <funcprototype>
   <funcdef>IcePointer <function> IceGetContext</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
 </funcprototype>
 </funcsynopsis>
 
-<para><function>IceGetContext</function>
+<para><xref linkend='IceGetContext' xrefstyle='select: title'/>
 returns the context associated with a connection created by
-<function>IceOpenConnection</function></para>
+<xref linkend='IceOpenConnection' xrefstyle='select: title'/></para>
 </chapter>
 
-<chapter id='ice_messages'>
+<chapter id='ICE_Messages'>
 <title>ICE Messages</title>
 
 <para>
@@ -2749,7 +2746,7 @@ The 3rd and 4th bytes of the message header can be used as needed.
 The length field is specified in units of 8 bytes.
 </para>
 
-<sect1 id='sending_ice_messages'>
+<sect1 id='Sending_ICE_Messages'>
 <title>Sending ICE Messages</title>
 
 <para>
@@ -2761,17 +2758,16 @@ together and flush the output buffer at appropriate times.
 <para>
 If an IO error has occurred on an ICE connection, all write operations
 will be ignored.  For further information, see
-<link linkend="error_handling">
-<xref linkend="error_handling"></xref></link>.
+<xref linkend='Error_Handling' xrefstyle='select: title'/>.
 </para>
 
 
 <para>
 To get the size of the ICE output buffer, use
-<function>IceGetOutBufSize</function>
+<xref linkend='IceGetOutBufSize' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceGetOutBufSize'>
 <funcprototype>
   <funcdef>int <function> IceGetOutBufSize</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2789,10 +2785,10 @@ To get the size of the ICE output buffer, use
 
 
 <para>
-To flush the ICE output buffer, use <function>IceFlush</function>
+To flush the ICE output buffer, use <xref linkend='IceFlush' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceFlush'>
 <funcprototype>
   <funcdef>int <function> IceFlush</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2815,7 +2811,7 @@ insufficient space to generate a message.
 
 <para>The following macros can be used to generate ICE messages:</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceGetHeader'>
 <funcprototype>
   <funcdef><function> IceGetHeader</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2870,7 +2866,7 @@ library can store data in the message header.
 
 
 <para>
-<function>IceGetHeader</function>
+<xref linkend='IceGetHeader' xrefstyle='select: title'/>
 is used to set up a message header on an ICE connection.
 It sets the major and minor opcodes of the message, and initializes
 the message's length to the length of the header.  If additional
@@ -2879,7 +2875,7 @@ updated.
 </para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IceGetHeaderExtra'>
 <funcprototype>
   <funcdef><function> IceGetHeaderExtra</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2955,13 +2951,13 @@ in the ICE output buffer, pdata is set to NULL.
 
 
 <para>
-<function>IceGetHeaderExtra</function>
+<xref linkend='IceGetHeaderExtra' xrefstyle='select: title'/>
 is used to generate a message with a fixed (and relatively small) amount
 of variable length data.  The complete message must fit in the ICE output
 buffer.
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceSimpleMessage'>
 <funcprototype>
   <funcdef><function> IceSimpleMessage</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -2992,12 +2988,12 @@ buffer.
 </variablelist>
 
 <para>
-<function>IceSimpleMessage</function>
+<xref linkend='IceSimpleMessage' xrefstyle='select: title'/>
 is used to generate a message that is identical
 in size to the ICE header message, and has no additional data.
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceErrorHeader'>
 <funcprototype>
   <funcdef><function> IceErrorHeader</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3067,7 +3063,7 @@ Length of data (in 8-byte units) to be written after the header.
 </variablelist>
 
 <para>
-<function>IceErrorHeader</function> sets up an error message header.
+<xref linkend='IceErrorHeader' xrefstyle='select: title'/> sets up an error message header.
 </para>
 
 <para>
@@ -3084,26 +3080,27 @@ See the <emphasis remap='I'>Inter-Client Exchange Protocol</emphasis>
 standard for more details.
 </para>
 
-<informaltable pgwide='0' frame='none'>
-  <tgroup cols='2' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
+<informaltable frame='none'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='2.0*'/>
     <tbody>
       <row>
-        <entry align='left'>IceBadMinor</entry>
-        <entry align='left'>0x8000</entry>
+        <entry>IceBadMinor</entry>
+        <entry>0x8000</entry>
       </row>
       <row>
-        <entry align='left'>IceBadState</entry>
-        <entry align='left'>0x8001</entry>
+        <entry>IceBadState</entry>
+        <entry>0x8001</entry>
       </row>
       <row>
-        <entry align='left'>IceBadLength</entry>
-        <entry align='left'>0x8002</entry>
+        <entry>IceBadLength</entry>
+        <entry>0x8002</entry>
       </row>
       <row>
-        <entry align='left'>IceBadValue</entry>
-        <entry align='left'>0x8003</entry>
+        <entry>IceBadValue</entry>
+        <entry>0x8003</entry>
       </row>
     </tbody>
   </tgroup>
@@ -3113,18 +3110,18 @@ standard for more details.
 
 <para>
 To write data to an ICE connection, use the
-<function>IceWriteData</function> macro.  If the data fits into the
+<xref linkend='IceWriteData' xrefstyle='select: title'/> macro.  If the data fits into the
 ICE output buffer, it is copied there.  Otherwise, the ICE output buffer
 is flushed and the data is directly sent.
 </para>
 
 <para>
 This macro is used in conjunction with
-<function>IceGetHeader</function> and
-<function>IceErrorHeader</function>
+<xref linkend='IceGetHeader' xrefstyle='select: title'/> and
+<xref linkend='IceErrorHeader' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceWriteData'>
 <funcprototype>
   <funcdef><function> IceWriteData</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3156,10 +3153,10 @@ This macro is used in conjunction with
 
 
 <para>
-To write data as 16-bit quantities, use <function>IceWriteData16</function>
+To write data as 16-bit quantities, use <xref linkend='IceWriteData16' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceWriteData16'>
 <funcprototype>
   <funcdef><function> IceWriteData16</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3190,11 +3187,11 @@ To write data as 16-bit quantities, use <function>IceWriteData16</function>
 </variablelist>
 
 <para>
-To write data as 32-bit quantities, use <function>IceWriteData32</function>
+To write data as 32-bit quantities, use <xref linkend='IceWriteData32' xrefstyle='select: title'/>
 </para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IceWriteData32'>
 <funcprototype>
   <funcdef><function> IceWriteData32</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3225,16 +3222,16 @@ To write data as 32-bit quantities, use <function>IceWriteData32</function>
 </variablelist>
 
 <para>
-To write data as 32-bit quantities, use <function>IceWriteData32</function>
+To write data as 32-bit quantities, use <xref linkend='IceWriteData32' xrefstyle='select: title'/>
 </para>
 
 <para>
 To bypass copying data to the ICE output buffer, use
-<function>IceSendData</function> to directly send data over the network
+<xref linkend='IceSendData' xrefstyle='select: title'/> to directly send data over the network
 connection.  If necessary, the ICE output buffer is first flushed.
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceSendData'>
 <funcprototype>
   <funcdef><function> IceSendData</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3266,11 +3263,11 @@ connection.  If necessary, the ICE output buffer is first flushed.
 
 
 <para>
-To force 32-bit or 64-bit alignment, use <function>IceWritePad</function>
+To force 32-bit or 64-bit alignment, use <xref linkend='IceWritePad' xrefstyle='select: title'/>
 A maximum of 7 pad bytes can be specified.
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceWritePad'>
 <funcprototype>
   <funcdef><function> IceWritePad</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3302,7 +3299,7 @@ A maximum of 7 pad bytes can be specified.
 
 </sect1>
 
-<sect1 id='reading_ice_messages'>
+<sect1 id='Reading_ICE_Messages'>
 <title>Reading ICE Messages</title>
 
 
@@ -3319,10 +3316,10 @@ the data is not already present in the input buffer.
 
 <para>
 To get the size of the ICE input buffer, use
-<function>IceGetInBufSize</function>
+<xref linkend='IceGetInBufSize' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceGetInBufSize'>
 <funcprototype>
   <funcdef>int<function> IceGetInBufSize</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3342,16 +3339,15 @@ To get the size of the ICE input buffer, use
 When reading messages, care must be taken to check for IO errors.  If
 any IO error occurs in reading any part of a message, the message should
 be thrown out.  After using any of the macros described below for reading
-messages, the <function>IceValidIO</function>
+messages, the <xref linkend='IceValidIO' xrefstyle='select: title'/>
 macro can be used to check if an IO error occurred on the
 connection.  After an IO error has occurred on an ICE connection, all
 read operations will be ignored.  For further information, see
-<link linkend="error_handling">
-<xref linkend="error_handling"></xref></link>.
+<xref linkend='Error_Handling' xrefstyle='select: title'/>.
 </para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IceValidIO'>
 <funcprototype>
   <funcdef>Bool<function> IceValidIO</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3369,7 +3365,7 @@ read operations will be ignored.  For further information, see
 
 <para>The following macros can be used to read ICE messages.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceReadSimpleMessage'>
 <funcprototype>
   <funcdef><function> IceReadSimpleMessage</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3399,11 +3395,11 @@ read operations will be ignored.  For further information, see
 </variablelist>
 
 <para>
-<function>IceReadSimpleMessage</function>
+<xref linkend='IceReadSimpleMessage' xrefstyle='select: title'/>
 is used for messages that are identical in size to the 8-byte ICE header, but
 use the spare 2 bytes in the header to encode additional data.  Note that the
 ICE library always reads in these first 8 bytes, so it can obtain the major
-opcode of the message.  <function>IceReadSimpleMessage</function>
+opcode of the message.  <xref linkend='IceReadSimpleMessage' xrefstyle='select: title'/>
 simply returns a pointer to these 8 bytes; it does not actually read any data
 into the input buffer.
 </para>
@@ -3411,16 +3407,16 @@ into the input buffer.
 <para>
 For a message with variable length data, there are two ways of reading
 the message.  One method involves reading the complete message in one
-pass using <function>IceReadCompleteMessage</function>
+pass using <xref linkend='IceReadCompleteMessage' xrefstyle='select: title'/>
 The second method involves reading the message header (note that this may
 be larger than the 8-byte ICE header), then reading
 the variable length data in chunks (see
-<function>IceReadMessageHeader</function> and
-<function>IceReadData</function>
+<xref linkend='IceReadMessageHeader' xrefstyle='select: title'/> and
+<xref linkend='IceReadData' xrefstyle='select: title'/>
 </para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IceReadCompleteMessage'>
 <funcprototype>
   <funcdef><function> IceReadCompleteMessage</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3467,7 +3463,7 @@ This pointer is set to the variable length data of the message.
 
 <para>
 If the ICE input buffer has sufficient space,
-<function>IceReadCompleteMessage</function>
+<xref linkend='IceReadCompleteMessage' xrefstyle='select: title'/>
 will read the complete message into the
 ICE input buffer.  Otherwise, a buffer will be allocated to hold the
 variable length data.  After the call, the pdata argument should
@@ -3476,13 +3472,13 @@ to allocate the buffer.
 </para>
 
 <para>
-After calling <function>IceReadCompleteMessage</function>
-and processing the message, <function>IceDisposeCompleteMessage</function>
+After calling <xref linkend='IceReadCompleteMessage' xrefstyle='select: title'/>
+and processing the message, <xref linkend='IceDisposeCompleteMessage' xrefstyle='select: title'/>
 should be called.
 </para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IceDisposeCompleteMessage'>
 <funcprototype>
   <funcdef><function> IceDisposeCompleteMessage</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3502,7 +3498,7 @@ should be called.
     <listitem>
       <para>
 The pointer to the variable length data returned in
-<function>IceReadCompleteMessage</function>
+<xref linkend='IceReadCompleteMessage' xrefstyle='select: title'/>
       </para>
     </listitem>
   </varlistentry>
@@ -3514,7 +3510,7 @@ it did not fit in the ICE input buffer), it is freed here by ICElib.
 </para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IceReadMessageHeader'>
 <funcprototype>
   <funcdef><function> IceReadMessageHeader</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3551,9 +3547,9 @@ it did not fit in the ICE input buffer), it is freed here by ICElib.
 </variablelist>
 
 <para>
-<function>IceReadMessageHeader</function> reads just the message header.
+<xref linkend='IceReadMessageHeader' xrefstyle='select: title'/> reads just the message header.
 The rest of the data should be read with the
-<function>IceReadData</function>
+<xref linkend='IceReadData' xrefstyle='select: title'/>
 family of macros.  This method of reading a message should be used when the
 variable length data must be read in chunks.
 </para>
@@ -3561,10 +3557,10 @@ variable length data must be read in chunks.
 
 <para>
 To read data directly into a user supplied buffer, use
-<function>IceReadData</function>
+<xref linkend='IceReadData' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceReadData'>
 <funcprototype>
   <funcdef><function> IceReadData</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3596,10 +3592,10 @@ To read data directly into a user supplied buffer, use
 
 
 <para>
-To read data as 16-bit quantities, use <function>IceReadData16</function>
+To read data as 16-bit quantities, use <xref linkend='IceReadData16' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceReadData16'>
 <funcprototype>
   <funcdef><function> IceReadData16</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3640,10 +3636,10 @@ If <function>True,</function> the values will be byte swapped.
 
 
 <para>
-To read data as 32-bit quantities, use <function>IceReadData32</function>
+To read data as 32-bit quantities, use <xref linkend='IceReadData32' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceReadData32'>
 <funcprototype>
   <funcdef><function> IceReadData32</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3683,10 +3679,10 @@ If <function>True,</function> the values will be byte swapped.
 </variablelist>
 
 <para>To force 32-bit or 64-bit alignment, use
-<function>IceReadPad</function>
+<xref linkend='IceReadPad' xrefstyle='select: title'/>
 A maximum of 7 pad bytes can be specified.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceReadPad'>
 <funcprototype>
   <funcdef><function> IceReadPad</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3712,7 +3708,7 @@ A maximum of 7 pad bytes can be specified.</para>
 </sect1>
 </chapter>
 
-<chapter id='error_handling'>
+<chapter id='Error_Handling'>
 <title>Error Handling</title>
 
 
@@ -3737,10 +3733,10 @@ prefer your own error handling and can be changed as often as you like.
 
 
 <para>
-To set the ICE error handler, use <function>IceSetErrorHandler</function>
+To set the ICE error handler, use <xref linkend='IceSetErrorHandler' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceSetErrorHandler'>
 <funcprototype>
   <funcdef><function> IceSetErrorHandler</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3760,7 +3756,7 @@ The ICE error handler.  You should pass NULL to restore the default handler.
 </variablelist>
 
 <para>
-<function>IceSetErrorHandler</function> returns the previous error handler.
+<xref linkend='IceSetErrorHandler' xrefstyle='select: title'/> returns the previous error handler.
 </para>
 
 <para>
@@ -3781,10 +3777,10 @@ should have their own error handlers).
 </para>
 
 <para>
-An ICE error handler has the type of <function>IceErrorHandler</function>
+An ICE error handler has the type of <xref linkend='IceErrorHandler' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceErrorHandler'>
 <funcprototype>
   <funcdef>void<function> IceErrorHandler</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3875,11 +3871,11 @@ the <emphasis remap='I'>Inter-Client Exchange Protocol</emphasis> standard.
 
 
 <para>
-To handle fatal I/O errors, use <function>IceSetIOErrorHandler</function>
+To handle fatal I/O errors, use <xref linkend='IceSetIOErrorHandler' xrefstyle='select: title'/>
 </para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IceSetIOErrorHandler'>
 <funcprototype>
   <funcdef>IceIOErrorHandler<function> IceSetIOErrorHandler</function></funcdef>
     <paramdef>IceIOErrorHandler<parameter> handler</parameter></paramdef>
@@ -3898,16 +3894,16 @@ The I/O error handler.  You should pass NULL to restore the default handler.
 </variablelist>
 
 <para>
-<function>IceSetIOErrorHandler</function> returns the previous
+<xref linkend='IceSetIOErrorHandler' xrefstyle='select: title'/> returns the previous
 IO error handler.
 </para>
 
 <para>
 An ICE I/O error handler has the type of
-<function>IceIOErrorHandler</function>
+<xref linkend='IceIOErrorHandler' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceIOErrorHandler'>
 <funcprototype>
   <funcdef>void<function> IceIOErrorHandler</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3929,20 +3925,20 @@ An ICE I/O error handler has the type of
     <para>
 In the first, the IO error handler does whatever is necessary
 to respond to the IO error and then returns, but it does not call
-<function>IceCloseConnection</function>
+<xref linkend='IceCloseConnection' xrefstyle='select: title'/>
 The ICE connection is given a "bad IO" status, and all future reads
 and writes to the connection are ignored.  The next time
-<function>IceProcessMessages</function>
+<xref linkend='IceProcessMessages' xrefstyle='select: title'/>
 is called it will return a status of
 <function>IceProcessMessagesIOError</function>
 At that time, the application should call
-<function>IceCloseConnection</function>
+<xref linkend='IceCloseConnection' xrefstyle='select: title'/>
     </para>
   </listitem>
   <listitem>
     <para>
 In the second, the IO error handler does call
-<function>IceCloseConnection</function>
+<xref linkend='IceCloseConnection' xrefstyle='select: title'/>
 and then uses the <function>longjmp</function>
 call to get back to the application's main event loop.  The
 <function>setjmp</function> and
@@ -3957,15 +3953,15 @@ Therefore, this second model is less desirable.
 <para>
 Before the application I/O error handler is invoked, protocol libraries
 that were interested in being notified of I/O errors will have their
-<function>IceIOErrorProc</function>
+<xref linkend='IceIOErrorProc' xrefstyle='select: title'/>
 handlers invoked.  This handler is set up in the protocol registration
-functions (see <function>IceRegisterForProtocolSetup</function> and
-<function>IceRegisterForProtocolReply</function>
+functions (see <xref linkend='IceRegisterForProtocolSetup' xrefstyle='select: title'/> and
+<xref linkend='IceRegisterForProtocolReply' xrefstyle='select: title'/>
 and could be used to clean up state specific to the protocol.
 </para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IceIOErrorProc'>
 <funcprototype>
   <funcdef>void<function> IceIOErrorProc</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -3980,14 +3976,14 @@ and could be used to clean up state specific to the protocol.
 </variablelist>
 
 <para>
-Note that every <function>IceIOErrorProc</function>
+Note that every <xref linkend='IceIOErrorProc' xrefstyle='select: title'/>
 callback must return.  This is required
 because each active protocol must be notified of the broken connection,
 and the application IO error handler must be invoked afterwards.
 </para>
 </chapter>
 
-<chapter id='multithreading_support'>
+<chapter id='Multi_Threading_Support'>
 <title>Multi-Threading Support</title>
 
 
@@ -4017,14 +4013,14 @@ sections of code that access an ICE connection (for example, when
 generating messages).  Two calls, which are generally implemented as
 macros, are provided:</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceLockConn'>
 <funcprototype>
   <funcdef>void<function> IceLockConn</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
 </funcprototype>
 </funcsynopsis>
 
-<funcsynopsis>
+<funcsynopsis id='IceUnlockConn'>
 <funcprototype>
   <funcdef>void<function> IceUnlockConn</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -4039,11 +4035,11 @@ macros, are provided:</para>
 </variablelist>
 
 <para>To keep an ICE connection locked across several ICElib calls, applications use
-<function>IceAppLockConn</function>
+<xref linkend='IceAppLockConn' xrefstyle='select: title'/>
 and
-<function>IceAppUnlockConn</function></para>
+<xref linkend='IceAppUnlockConn' xrefstyle='select: title'/></para>
 
-<funcsynopsis>
+<funcsynopsis id='IceAppLockConn'>
 <funcprototype>
   <funcdef>void<function> IceAppLockConn</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -4059,18 +4055,18 @@ and
 
 
 <para>The
-<function>IceAppLockConn</function>
+<xref linkend='IceAppLockConn' xrefstyle='select: title'/>
 function completely locks out other threads using the connection
 until
-<function>IceAppUnlockConn</function>
+<xref linkend='IceAppUnlockConn' xrefstyle='select: title'/>
 is called.  Other threads attempting to use ICElib
 calls on the connection will block.
 If the program has not previously called
 <function>IceInitThreads</function>
-<function>IceAppLockConn</function>
+<xref linkend='IceAppLockConn' xrefstyle='select: title'/>
 has no effect.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceAppUnlockConn'>
 <funcprototype>
   <funcdef>void<function> IceAppUnlockConn</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -4085,17 +4081,17 @@ has no effect.</para>
 </variablelist>
 
 <para>The
-<function>IceAppUnlockConn</function>
+<xref linkend='IceAppUnlockConn' xrefstyle='select: title'/>
 function allows other threads to complete ICElib
 calls on the connection that were blocked by a previous call to
-<function>IceAppLockConn</function>
+<xref linkend='IceAppLockConn' xrefstyle='select: title'/>
 from this thread.  If the program has not previously called
 <function>IceInitThreads</function>
-<function>IceAppUnlockConn</function>
+<xref linkend='IceAppUnlockConn' xrefstyle='select: title'/>
 has no effect.</para>
 </chapter>
 
-<chapter id='miscellaneous_functions'>
+<chapter id='Miscellaneous_Functions'>
 <title>Miscellaneous Functions</title>
 
 
@@ -4110,7 +4106,7 @@ The contents of the scratch space is not guaranteed to be preserved
 after any ICElib function is called.</para>
 
 
-<funcsynopsis>
+<funcsynopsis id='IceAllocScratch'>
 <funcprototype>
   <funcdef>char<function> *IceAllocScratch</function></funcdef>
     <paramdef>IceConn<parameter> ice_conn</parameter></paramdef>
@@ -4135,7 +4131,7 @@ should not be freed by the caller.
 The ICE library will free the memory when the ICE connection is closed.</para>
 </chapter>
 
-<chapter id='acknowledgements'>
+<chapter id='Acknowledgements'>
 <title>Acknowledgements</title>
 
 
@@ -4235,26 +4231,23 @@ authentication (for example, the network ID of a session manager).
 A network ID has the following form:
 </para>
 
-<informaltable pgwide='0' frame='none'>
-  <tgroup cols='3' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
-    <colspec colname='c3'/>
+<informaltable frame='none'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='2.0*'/>
     <tbody>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>tcp/&lt;hostname&gt;:&lt;portnumber&gt;</entry>
-        <entry align='left'>or</entry>
+        <entry>tcp/&lt;hostname&gt;:&lt;portnumber&gt;</entry>
+        <entry>or</entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>decnet/&lt;hostname&gt;::&lt;objname&gt;</entry>
-        <entry align='left'>or</entry>
+        <entry>decnet/&lt;hostname&gt;::&lt;objname&gt;</entry>
+        <entry>or</entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>local/&lt;hostname&gt;:&lt;path&gt;</entry>
-        <entry align='left'></entry>
+        <entry>local/&lt;hostname&gt;:&lt;path&gt;</entry>
+        <entry></entry>
       </row>
     </tbody>
   </tgroup>
@@ -4284,13 +4277,13 @@ This name is statically allocated and should not be freed.
 <para>
 To synchronously update the authorization file, the file must
 be locked with a call to
-<function>IceLockAuthFile</function>
+<xref linkend='IceLockAuthFile' xrefstyle='select: title'/>
 This function takes advantage of the fact that the
 <function>link</function>
 system call will fail if the name of the new link already exists.
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceLockAuthFile'>
 <funcprototype>
   <funcdef>int<function> IceLockAuthFile</function></funcdef>
     <paramdef>char<parameter> *file_name</parameter></paramdef>
@@ -4352,10 +4345,10 @@ retries failed.
 </itemizedlist>
 
 <para>
-To unlock an authorization file, use <function>IceUnlockAuthFile</function>
+To unlock an authorization file, use <xref linkend='IceUnlockAuthFile' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceUnlockAuthFile'>
 <funcprototype>
   <funcdef>int<function> IceUnlockAuthFile</function></funcdef>
     <paramdef>char<parameter> *file_name</parameter></paramdef>
@@ -4374,7 +4367,7 @@ To read the next entry in an authorization file, use
 <function>IceReadAuthFileEntry</function>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceReadAuthFileEntry'>
 <funcprototype>
   <funcdef>IceAuthFileEntry<function> *IceReadAuthFileEntry</function></funcdef>
     <paramdef>FILE<parameter> *auth_file</parameter></paramdef>
@@ -4396,15 +4389,15 @@ or there are no more entries to read, NULL is returned.
 
 <para>
 Entries should be free with a call to
-<function>IceFreeAuthFileEntry</function>
+<xref linkend='IceFreeAuthFileEntry' xrefstyle='select: title'/>
 </para>
 
 <para>
 To write an entry in an authorization file, use
-<function>IceWriteAuthFileEntry</function>
+<xref linkend='IceWriteAuthFileEntry' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceWriteAuthFileEntry'>
 <funcprototype>
   <funcdef>Status<function> IceWriteAuthFileEntry</function></funcdef>
     <paramdef>FILE<parameter> *auth_file</parameter></paramdef>
@@ -4436,12 +4429,12 @@ protocol_name/network_id/auth_name tuple, use
 <function>IceGetAuthFileEntry</function>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceGetAuthFileEntry'>
 <funcprototype>
   <funcdef>IceAuthFileEntry<function> *IceGetAuthFileEntry</function></funcdef>
-    <paramdef>char<parameter> *protocol_name</parameter></paramdef>
-    <paramdef>char<parameter> *network_id</parameter></paramdef>
-    <paramdef>char<parameter> *auth_name</parameter></paramdef>
+    <paramdef>const char *<parameter>protocol_name</parameter></paramdef>
+    <paramdef>const char *<parameter>network_id</parameter></paramdef>
+    <paramdef>const char *<parameter>auth_name</parameter></paramdef>
 </funcprototype>
 </funcsynopsis>
 
@@ -4474,10 +4467,10 @@ fails to find such an entry, NULL is returned.
 To free an entry returned by
 <function>IceReadAuthFileEntry</function> or
 <function>IceGetAuthFileEntry</function> use
-<function>IceFreeAuthFileEntry</function>
+<xref linkend='IceFreeAuthFileEntry' xrefstyle='select: title'/>
 </para>
 
-<funcsynopsis>
+<funcsynopsis id='IceFreeAuthFileEntry'>
 <funcprototype>
   <funcdef>void<function> IceFreeAuthFileEntry</function></funcdef>
     <paramdef>IceAuthFileEntry<parameter> *entry</parameter></paramdef>
@@ -4511,13 +4504,13 @@ magic cookie in the user's .ICEauthority file on a remote machine.</para>
 
 <para>In addition to storing the magic cookie in the .ICEauthority file, the
 application needs to call the
-<function>IceSetPaAuthData</function>
+<xref linkend='IceSetPaAuthData' xrefstyle='select: title'/>
 function in order to store the magic cookie in memory.  When it comes time
 for the MIT-MAGIC-COOKIE-1 authentication procedure to accept or reject the
 connection, it will compare the magic cookie presented by the requestor to
 the magic cookie in memory.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceGenerateMagicCookie'>
 <funcprototype>
   <funcdef>char<function> *IceGenerateMagicCookie</function></funcdef>
     <paramdef>int<parameter> length</parameter></paramdef>
@@ -4539,12 +4532,12 @@ Otherwise, the magic cookie should be freed with a call to
 
 
 <para>To store the authentication data in memory, use
-<function>IceSetPaAuthData</function>
+<xref linkend='IceSetPaAuthData' xrefstyle='select: title'/>
 Currently, this function is only used for MIT-MAGIC-COOKIE-1
 authentication, but it may be used for additional authentication
 methods in the future.</para>
 
-<funcsynopsis>
+<funcsynopsis id='IceSetPaAuthData'>
 <funcprototype>
   <funcdef>void<function> IceSetPaAuthData</function></funcdef>
     <paramdef>int<parameter> num_entries</parameter></paramdef>
old mode 100755 (executable)
new mode 100644 (file)
index 23ed84a..3d1b0ba
@@ -1,64 +1,13 @@
-#
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-#
 
 if ENABLE_DOCS
-doc_sources = ICElib.xml
-dist_doc_DATA = $(doc_sources)
 
-if HAVE_XMLTO
-doc_DATA = $(doc_sources:.xml=.html)
+# Main DocBook/XML files (DOCTYPE book)
+docbook = ICElib.xml
 
-if HAVE_FOP
-doc_DATA += $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf)
-endif
+# The location where the DocBook/XML files and their generated formats are installed
+shelfdir = $(docdir)
 
-if HAVE_XMLTO_TEXT
-doc_DATA += $(doc_sources:.xml=.txt)
-endif
+# Generate DocBook/XML output formats with or without stylesheets
+include $(top_srcdir)/docbook.am
 
-if HAVE_STYLESHEETS
-XMLTO_FLAGS = -m $(XSL_STYLESHEET)
-
-doc_DATA += xorg.css
-xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
-       $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@
-endif
-
-CLEANFILES = $(doc_DATA)
-
-SUFFIXES = .xml .ps .pdf .txt .html
-
-.xml.txt:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
-
-.xml.html:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
-
-.xml.pdf:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
-
-.xml.ps:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $<
-
-endif HAVE_XMLTO
 endif ENABLE_DOCS
diff --git a/docbook.am b/docbook.am
new file mode 100644 (file)
index 0000000..bba4d54
--- /dev/null
@@ -0,0 +1,105 @@
+#
+# Generate output formats for a single DocBook/XML with/without chapters
+#
+# Variables set by the calling Makefile:
+# shelfdir: the location where the docs/specs are installed. Typically $(docdir)
+# docbook:  the main DocBook/XML file, no chapters, appendix or image files
+# chapters: all files pulled in by an XInclude statement and images.
+#
+
+#
+# This makefile is intended for Users Documentation and Functional Specifications.
+# Do not use for Developer Documentation which is not installed and does not require olink.
+# Refer to http://www.x.org/releases/X11R7.6/doc/xorg-docs/ReleaseNotes.html#id2584393
+# for an explanation on documents classification.
+#
+
+# DocBook/XML generated output formats to be installed
+shelf_DATA =
+
+# DocBook/XML file with chapters, appendix and images it includes
+dist_shelf_DATA = $(docbook) $(chapters)
+
+if HAVE_XMLTO
+if HAVE_STYLESHEETS
+
+XMLTO_SEARCHPATH_FLAGS =                               \
+       --searchpath "$(XORG_SGML_PATH)/X11"            \
+       --searchpath "$(abs_top_builddir)"
+XMLTO_HTML_OLINK_FLAGS = \
+       --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.html.xml \
+       --stringparam current.docid="$(<:.xml=)"
+XMLTO_HTML_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XMLTO_HTML_FLAGS =                                     \
+       $(XMLTO_SEARCHPATH_FLAGS)                       \
+       $(XMLTO_HTML_STYLESHEET_FLAGS)                  \
+       $(XMLTO_HTML_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.html)
+%.html: %.xml $(chapters)
+       $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) xhtml-nochunks $<
+
+if HAVE_XMLTO_TEXT
+
+shelf_DATA += $(docbook:.xml=.txt)
+%.txt: %.xml $(chapters)
+       $(AM_V_GEN)$(XMLTO) $(XMLTO_HTML_FLAGS) txt $<
+endif HAVE_XMLTO_TEXT
+
+if HAVE_FOP
+XMLTO_FO_IMAGEPATH_FLAGS = --stringparam img.src.path=$(abs_builddir)/
+XMLTO_PDF_OLINK_FLAGS = \
+       --stringparam target.database.document=$(XORG_SGML_PATH)/X11/dbs/masterdb.pdf.xml \
+       --stringparam current.docid="$(<:.xml=)"
+XMLTO_FO_STYLESHEET_FLAGS = -x $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+XMLTO_FO_FLAGS =                                       \
+       $(XMLTO_SEARCHPATH_FLAGS)                       \
+       $(XMLTO_FO_STYLESHEET_FLAGS)                    \
+       $(XMLTO_FO_IMAGEPATH_FLAGS)                     \
+       $(XMLTO_PDF_OLINK_FLAGS)
+
+shelf_DATA += $(docbook:.xml=.pdf)
+%.pdf: %.xml $(chapters)
+       $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop pdf $<
+
+shelf_DATA += $(docbook:.xml=.ps)
+%.ps: %.xml $(chapters)
+       $(AM_V_GEN)$(XMLTO) $(XMLTO_FO_FLAGS) --with-fop ps $<
+endif HAVE_FOP
+
+# Generate documents cross-reference target databases
+if HAVE_XSLTPROC
+
+XSLT_SEARCHPATH_FLAGS =                                \
+       --path "$(XORG_SGML_PATH)/X11"                  \
+       --path "$(abs_top_builddir)"
+XSLT_OLINK_FLAGS =                                     \
+       --stringparam targets.filename "$@"             \
+       --stringparam collect.xref.targets "only"       \
+       --stringparam olink.base.uri "$(@:.db=)"
+
+XSLT_HTML_FLAGS =                                      \
+       $(XSLT_SEARCHPATH_FLAGS)                        \
+       $(XSLT_OLINK_FLAGS)                             \
+       --nonet --xinclude                              \
+       $(STYLESHEET_SRCDIR)/xorg-xhtml.xsl
+XSLT_PDF_FLAGS =                                       \
+       $(XSLT_SEARCHPATH_FLAGS)                        \
+       $(XSLT_OLINK_FLAGS)                             \
+       --nonet --xinclude                              \
+       $(STYLESHEET_SRCDIR)/xorg-fo.xsl
+
+shelf_DATA += $(docbook:.xml=.html.db)
+%.html.db: %.xml  $(chapters)
+       $(AM_V_GEN)$(XSLTPROC) $(XSLT_HTML_FLAGS) $<
+
+shelf_DATA += $(docbook:.xml=.pdf.db)
+%.pdf.db: %.xml $(chapters)
+       $(AM_V_GEN)$(XSLTPROC) $(XSLT_PDF_FLAGS) $<
+
+endif HAVE_XSLTPROC
+endif HAVE_STYLESHEETS
+endif HAVE_XMLTO
+
+CLEANFILES = $(shelf_DATA)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index f169b6c..e5d493a
@@ -32,7 +32,7 @@ Author: Ralph Mor, X Consortium
 #include <X11/ICE/ICElib.h>
 
 /*
- * Data structures for ICE connection object 
+ * Data structures for ICE connection object
  */
 
 typedef struct _IceSavedReplyWait {
old mode 100755 (executable)
new mode 100644 (file)
index ba42119..402cbc8
@@ -206,9 +206,9 @@ typedef void (*IceIOErrorHandler) (
 _XFUNCPROTOBEGIN
 
 extern int IceRegisterForProtocolSetup (
-    char *                     /* protocolName */,
-    char *                     /* vendor */,
-    char *                     /* release */,
+    const char *               /* protocolName */,
+    const char *               /* vendor */,
+    const char *               /* release */,
     int                                /* versionCount */,
     IcePoVersionRec *          /* versionRecs */,
     int                                /* authCount */,
@@ -218,9 +218,9 @@ extern int IceRegisterForProtocolSetup (
 );
 
 extern int IceRegisterForProtocolReply (
-    char *                     /* protocolName */,
-    char *                     /* vendor */,
-    char *                     /* release */,
+    const char *               /* protocolName */,
+    const char *               /* vendor */,
+    const char *               /* release */,
     int                                /* versionCount */,
     IcePaVersionRec *          /* versionRecs */,
     int                                /* authCount */,
old mode 100755 (executable)
new mode 100644 (file)
index 6a60f1c..8ca3e5f
@@ -217,15 +217,15 @@ extern IcePaAuthStatus _IcePaMagicCookie1Proc (
 
 /*
  * Write pad bytes.  Used to force 32 or 64 bit alignment.
- * A maxium of 7 pad bytes can be specified.
+ * A maximum of 7 pad bytes can be specified.
  */
 
 #define IceWritePad(_iceConn, _bytes) \
 { \
     if ((_iceConn->outbufptr + (_bytes)) > _iceConn->outbufmax) \
     { \
-        char _dummy[7]; \
-       IceFlush (_iceConn); \
+        char _dummy[7] = { 0 }; \
+        IceFlush (_iceConn); \
         _IceWrite (_iceConn, (unsigned long) (_bytes), _dummy); \
     } \
     else \
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 2852931..9c6b12f
@@ -105,9 +105,9 @@ extern Status IceWriteAuthFileEntry (
 );
 
 extern IceAuthFileEntry *IceGetAuthFileEntry (
-    char *             /* protocol_name */,
-    char *             /* network_id */,
-    char *             /* auth_name */
+    const char *       /* protocol_name */,
+    const char *       /* network_id */,
+    const char *       /* auth_name */
 );
 
 extern char *IceGenerateMagicCookie (
index c893baf..7fadb81 100644 (file)
@@ -1,73 +1,62 @@
+Summary: X.Org X11 ICE runtime library
+Name: libICE
+Version: 1.0.8
+Release: 1
+License: MIT
+Group: System Environment/Libraries
+URL: http://www.x.org
 
-Name:       libICE
-Summary:    X.Org X11 libICE runtime library
-Version:    1.0.7
-Release:    2.25
-Group:      System/Libraries
-License:    MIT/X11
-URL:        http://www.x.org
-Source0:    http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.bz2
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
+Source0: %{name}-%{version}.tar.gz
+
+BuildRequires: pkgconfig
 BuildRequires:  pkgconfig(xproto)
-BuildRequires:  pkgconfig(xtrans)
 BuildRequires:  pkgconfig(xorg-macros)
-
+BuildRequires: xorg-x11-xtrans-devel >= 1.0.3-5
 
 %description
 The X.Org X11 ICE (Inter-Client Exchange) runtime library.
 
-
 %package devel
-Summary:    X.Org X11 libICE development package
-Group:      System/Libraries
-Requires:   %{name} = %{version}-%{release}
-Requires:   xorg-x11-filesystem
+Summary: X.Org X11 ICE development package
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
 
 %description devel
 The X.Org X11 ICE (Inter-Client Exchange) development package.
 
-
 %prep
-%setup -q -n %{name}-%{version}
-
+%setup -q
 
 %build
-
-%reconfigure --disable-static
+%reconfigure --disable-static \
+           LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
 make %{?jobs:-j%jobs}
 
 %install
-rm -rf %{buildroot}
-%make_install
+rm -rf $RPM_BUILD_ROOT
 
+make install DESTDIR=$RPM_BUILD_ROOT
 
+# We intentionally don't ship *.la files
+rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
 
+%remove_docs
 
-%post -p /sbin/ldconfig
+%clean
+rm -rf $RPM_BUILD_ROOT
 
+%post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
 
-
-
-
-
-
-
 %files
 %defattr(-,root,root,-)
-%doc AUTHORS COPYING README ChangeLog
+%doc AUTHORS COPYING ChangeLog
 %{_libdir}/libICE.so.6
 %{_libdir}/libICE.so.6.3.0
-%exclude /usr/share/doc/libICE/ICElib.xml
-%exclude /usr/share/doc/libICE/ice.xml
-
 
 %files devel
 %defattr(-,root,root,-)
-%dir %{_includedir}/X11
-%dir %{_includedir}/X11/ICE
-%{_includedir}/X11/ICE/*.h
+#%{_docdir}/%{name}
+%{_includedir}/X11/ICE
 %{_libdir}/libICE.so
 %{_libdir}/pkgconfig/ice.pc
-
old mode 100755 (executable)
new mode 100644 (file)
index 4b7bef5..2937cb7
@@ -1,64 +1,13 @@
-#
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# the rights to use, copy, modify, merge, publish, distribute, sublicense,
-# and/or sell copies of the Software, and to permit persons to whom the
-# Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-# DEALINGS IN THE SOFTWARE.
-#
 
 if ENABLE_SPECS
-doc_sources = ice.xml
-dist_doc_DATA = $(doc_sources)
 
-if HAVE_XMLTO
-doc_DATA = $(doc_sources:.xml=.html)
+# Main DocBook/XML files (DOCTYPE book)
+docbook = ice.xml
 
-if HAVE_FOP
-doc_DATA += $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf)
-endif
+# The location where the DocBook/XML files and their generated formats are installed
+shelfdir = $(docdir)
 
-if HAVE_XMLTO_TEXT
-doc_DATA += $(doc_sources:.xml=.txt)
-endif
+# Generate DocBook/XML output formats with or without stylesheets
+include $(top_srcdir)/docbook.am
 
-if HAVE_STYLESHEETS
-XMLTO_FLAGS = -m $(XSL_STYLESHEET)
-
-doc_DATA += xorg.css
-xorg.css: $(STYLESHEET_SRCDIR)/xorg.css
-       $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@
-endif
-
-CLEANFILES = $(doc_DATA)
-
-SUFFIXES = .xml .ps .pdf .txt .html
-
-.xml.txt:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $<
-
-.xml.html:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $<
-
-.xml.pdf:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $<
-
-.xml.ps:
-       $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $<
-
-endif HAVE_XMLTO
 endif ENABLE_SPECS
old mode 100755 (executable)
new mode 100644 (file)
index 64e24ca..439c2f6
@@ -1,6 +1,9 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
-                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+                   "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+<!ENTITY % defs SYSTEM "defs.ent"> %defs;
+]>
 
 
 <!-- lifted from troff+ms+XMan by doclifter -->
 <bookinfo>
    <title>Inter-Client Exchange (ICE) Protocol</title>
    <subtitle>X Consortium Standard</subtitle>
-   <releaseinfo>X Version 11, Release 6.4</releaseinfo>
+   <releaseinfo>X Version 11, Release &fullrelvers;</releaseinfo>
    <authorgroup>
       <author>
          <firstname>Robert</firstname><surname>Scheifler</surname>
+         <affiliation><orgname>X Consortium</orgname></affiliation>
       </author>
       <othercredit>
          <firstname>Jordan</firstname><surname>Brown</surname>
          <affiliation><orgname>Quarterdeck Office Systems</orgname></affiliation>
       </othercredit>
    </authorgroup>
-   <corpname>X Consortium Standard</corpname>
-   <copyright><year>1993</year><holder>X Consortium</holder></copyright>
-   <copyright><year>1994</year><holder>X Consortium</holder></copyright>
-   <releaseinfo>Version 1.0</releaseinfo>
-   <affiliation><orgname>X Consortium</orgname></affiliation>
-   <productnumber>X Version 11, Release 7</productnumber>
+   <releaseinfo>Version 1.1</releaseinfo>
+   <copyright>
+     <year>1993</year><year>1994</year>
+     <holder>X Consortium</holder>
+   </copyright>
 
 <legalnotice>
 <para>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &ldquo;Software&rdquo;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</para>
 
 <para>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</para>
 
-<para>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</para>
+<para>THE SOFTWARE IS PROVIDED &ldquo;AS IS&rdquo;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</para>
 
 <para>Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium.</para>
 
-<para>X Window System is a trademark of X Consortium, Inc.</para>
+<para>X Window System is a trademark of The Open Group.</para>
 </legalnotice>
 
 <abstract>
@@ -50,7 +53,7 @@ allows the sharing of many aspects of the implementation.
 </abstract>
 </bookinfo>
 
-<chapter id="purpose_and_goals">
+<chapter id='Purpose_and_Goals'>
 <title>Purpose and Goals</title>
 
 <para>
@@ -85,7 +88,7 @@ allow them to share the same transport layer connection.</para>
 
 </chapter>
 
-<chapter id="overview_of_the_protocol">
+<chapter id='Overview_of_the_Protocol'>
 <title>Overview of the Protocol</title>
 
 
@@ -216,7 +219,7 @@ from party A.</para>
 <!--  .nH 1 "Data Types" -->
 </chapter>
 
-<chapter id="data_types">
+<chapter id='Data_Types'>
 <title>Data Types</title>
 
 <para>ICE messages contain several types of data.  Byte order is negotiated in
@@ -233,41 +236,42 @@ to pad <emphasis remap='I'>E</emphasis> bytes to the next multiple of
 pad(<emphasis remap='I'>E</emphasis>, <emphasis remap='I'>b</emphasis>) = (<emphasis remap='I'>b</emphasis> - (<emphasis remap='I'>E</emphasis> mod <emphasis remap='I'>b</emphasis>)) mod <emphasis remap='I'>b</emphasis>
 </literallayout>
 
-<sect1 id="primitive_types">
+<sect1 id='Primitive_Types'>
 <title>Primitive Types</title>
 
-<informaltable pgwide='1' frame='none'>
-  <tgroup cols='2' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
+<informaltable frame='topbot'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='3.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Type Name</entry>
-        <entry align='left'>Description</entry>
+      <row rowsep='1'>
+        <entry>Type Name</entry>
+        <entry>Description</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>CARD8</entry>
-        <entry align='left'>8-bit unsigned integer</entry>
+        <entry>CARD8</entry>
+        <entry>8-bit unsigned integer</entry>
       </row>
       <row>
-        <entry align='left'>CARD16</entry>
-        <entry align='left'>16-bit unsigned integer</entry>
+        <entry>CARD16</entry>
+        <entry>16-bit unsigned integer</entry>
       </row>
       <row>
-        <entry align='left'>CARD32</entry>
-        <entry align='left'>32-bit unsigned integer</entry>
+        <entry>CARD32</entry>
+        <entry>32-bit unsigned integer</entry>
       </row>
       <row>
-        <entry align='left'>BOOL</entry>
-        <entry align='left'><para><function>False</function>
+        <entry>BOOL</entry>
+        <entry><para><function>False</function>
 or
 <function>True</function></para></entry>
       </row>
       <row>
-        <entry align='left'>LPCE</entry>
-        <entry align='left'>A character from the X Portable Character Set in Latin Portable Character
+        <entry>LPCE</entry>
+        <entry>A character from the X Portable Character Set in Latin Portable Character
 Encoding</entry>
       </row>
     </tbody>
@@ -276,31 +280,28 @@ Encoding</entry>
 
 </sect1>
 
-<sect1 id="complex_types">
+<sect1 id='Complex_Types'>
 <title>Complex Types</title>
 
-<informaltable pgwide='1' frame='none'>
-  <tgroup cols='2' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
+<informaltable frame='topbot'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='3.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Type Name</entry>
-        <entry align='left'>Type</entry>
-      </row>
-      <row>
-        <entry align='left'>.TH</entry>
-        <entry align='left'></entry>
+      <row rowsep='1'>
+        <entry>Type Name</entry>
+        <entry>Type</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>VERSION</entry>
-        <entry align='left'>[Major, minor: CARD16]</entry>
+        <entry>VERSION</entry>
+        <entry>[Major, minor: CARD16]</entry>
       </row>
       <row>
-        <entry align='left'>STRING</entry>
-        <entry align='left'>LISTofLPCE</entry>
+        <entry>STRING</entry>
+        <entry>LISTofLPCE</entry>
       </row>
     </tbody>
   </tgroup>
@@ -312,33 +313,34 @@ varies depending on the context; see the encoding section.</para>
 <!--  .nH 1 "Message Format" -->
 </sect1>
 
-<sect1 id="message_format">
+<sect1 id='Message_Format'>
 <title>Message Format</title>
 
 <para>All ICE messages include the following information:</para>
 
-<informaltable pgwide='1' frame='none'>
-  <tgroup cols='2' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
+<informaltable frame='topbot'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='3.0*'/>
     <thead>
-      <row>
+      <row rowsep='1'>
         <entry>Field Type</entry>
         <entry>Description</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>CARD8</entry>
-        <entry align='left'>protocol major opcode</entry>
+        <entry>CARD8</entry>
+        <entry>protocol major opcode</entry>
       </row>
       <row>
-        <entry align='left'>CARD8</entry>
-        <entry align='left'>protocol minor opcode</entry>
+        <entry>CARD8</entry>
+        <entry>protocol minor opcode</entry>
       </row>
       <row>
-        <entry align='left'>CARD32</entry>
-        <entry align='left'>length of remaining data in 8-byte units</entry>
+        <entry>CARD32</entry>
+        <entry>length of remaining data in 8-byte units</entry>
       </row>
     </tbody>
   </tgroup>
@@ -387,7 +389,7 @@ error.
 
 </chapter>
 
-<chapter id="overall_protocol_description">
+<chapter id='Overall_Protocol_Description'>
 <title>Overall Protocol Description</title>
 
 <para>
@@ -461,10 +463,8 @@ indicates the sender is unwilling to accept any further
 messages for any protocols on the connection.  The sender
 is required to conform to specified severity conditions
 for generic and ICE (major opcode 0) errors; see
-<link linkend="generic_error_classes">
-<xref linkend="generic_error_classes"></xref></link> and
-<link linkend="ice_error_classes">
-<xref linkend="ice_error_classes"></xref></link>.
+<xref linkend='Generic_Error_Classes' xrefstyle='select: title'/>
+<xref linkend='ICE_Error_Classes' xrefstyle='select: title'/>
 .
 The class defines the generic class of
 error.  Classes are specified separately for each protocol (numeric
@@ -474,7 +474,7 @@ for the protocol.
 </para>
 </chapter>
 
-<chapter id="ice_control_subprotocol__major_opcode_0">
+<chapter id='ICE_Control_Subprotocol____Major_Opcode_0_0'>
 <title>ICE Control Subprotocol -- Major Opcode 0</title>
 
 <para>
@@ -1073,7 +1073,7 @@ connection.  Either party may again initiate
 <function>WantToClose</function> at some future time.
 </para>
 
-<sect1 id="generic_error_classes">
+<sect1 id='Generic_Error_Classes'>
 <title>Generic Error Classes</title>
 
 <para>
@@ -1205,7 +1205,7 @@ CARD32 Length of offending value.
 
 </sect1>
 
-<sect1 id="ice_error_classes">
+<sect1 id='ICE_Error_Classes'>
 <title>ICE Error Classes</title>
 
 <para>These errors are all major opcode 0 errors.</para>
@@ -1497,7 +1497,7 @@ existing registration.
 </sect1>
 </chapter>
 
-<chapter id="state_diagrams">
+<chapter id='State_Diagrams'>
 <title>State Diagrams</title>
 
 <para>
@@ -1637,7 +1637,7 @@ Here are the state transitions for shutting down the connection:
      connection close -&gt; <emphasis remap='C'>quit</emphasis>
 </literallayout>
 </chapter>
-<chapter id="protocol_encoding">
+<chapter id='Protocol_Encoding'>
 <title>Protocol Encoding</title>
 
 <para>
@@ -1660,41 +1660,42 @@ additional padding.  The number of repetitions must be specified elsewhere
 in the message.
 </para>
 
-<sect1 id="primitives">
+<sect1 id='Primitives'>
 <title>Primitives</title>
 
-<informaltable pgwide='1' frame='none'>
-  <tgroup cols='3' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
-    <colspec colname='c3'/>
+<informaltable frame='topbot'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='1.0*'/>
+    <colspec colname='c3' colwidth='3.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Type Name</entry>
-        <entry align='left'>Length (bytes)</entry>
-        <entry align='left'>Description</entry>
+      <row rowsep='1'>
+        <entry>Type Name</entry>
+        <entry>Length (bytes)</entry>
+        <entry>Description</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>CARD8</entry>
-        <entry align='left'>1</entry>
-        <entry align='left'>8-bit unsigned integer</entry>
+        <entry>CARD8</entry>
+        <entry>1</entry>
+        <entry>8-bit unsigned integer</entry>
       </row>
       <row>
-        <entry align='left'>CARD16</entry>
-        <entry align='left'>2</entry>
-        <entry align='left'>16-bit unsigned integer</entry>
+        <entry>CARD16</entry>
+        <entry>2</entry>
+        <entry>16-bit unsigned integer</entry>
       </row>
       <row>
-        <entry align='left'>CARD32</entry>
-        <entry align='left'>4</entry>
-        <entry align='left'>32-bit unsigned integer</entry>
+        <entry>CARD32</entry>
+        <entry>4</entry>
+        <entry>32-bit unsigned integer</entry>
       </row>
       <row>
-        <entry align='left'>LPCE</entry>
-        <entry align='left'>1</entry>
-        <entry align='left'><para>A character from the X Portable Character Set in Latin Portable Character
+        <entry>LPCE</entry>
+        <entry>1</entry>
+        <entry><para>A character from the X Portable Character Set in Latin Portable Character
 Encoding</para></entry>
       </row>
     </tbody>
@@ -1703,32 +1704,33 @@ Encoding</para></entry>
 
 </sect1>
 
-<sect1 id="enumerations">
+<sect1 id='Enumerations'>
 <title>Enumerations</title>
 
 
-<informaltable pgwide='1' frame='none'>
-  <tgroup cols='3' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
-    <colspec colname='c3'/>
+<informaltable frame='topbot'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='1.0*'/>
+    <colspec colname='c3' colwidth='3.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Type Name</entry>
-        <entry align='left'>Value</entry>
-        <entry align='left'>Description</entry>
+      <row rowsep='1'>
+        <entry>Type Name</entry>
+        <entry>Value</entry>
+        <entry>Description</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>BOOL</entry>
-        <entry align='left'>0</entry>
-        <entry align='left'>False</entry>
+        <entry>BOOL</entry>
+        <entry>0</entry>
+        <entry>False</entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>1</entry>
-        <entry align='left'>True</entry>
+        <entry></entry>
+        <entry>1</entry>
+        <entry>True</entry>
       </row>
     </tbody>
   </tgroup>
@@ -1736,65 +1738,66 @@ Encoding</para></entry>
 
 </sect1>
 
-<sect1 id="compound_types">
+<sect1 id='Compound_Types'>
 <title>Compound Types</title>
 
-<informaltable pgwide='1' frame='none'>
-  <tgroup cols='4' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
-    <colspec colname='c3'/>
-    <colspec colname='c4'/>
+<informaltable frame='topbot'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='4' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='1.0*'/>
+    <colspec colname='c3' colwidth='1.0*'/>
+    <colspec colname='c4' colwidth='2.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Type Name</entry>
-        <entry align='left'>Length (bytes)</entry>
-        <entry align='left'>Type</entry>
-        <entry align='left'>Description</entry>
+      <row rowsep='1'>
+        <entry>Type Name</entry>
+        <entry>Length (bytes)</entry>
+        <entry>Type</entry>
+        <entry>Description</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>VERSION</entry>
-        <entry align='left'></entry>
-        <entry align='left'></entry>
-        <entry align='left'></entry>
+        <entry>VERSION</entry>
+        <entry></entry>
+        <entry></entry>
+        <entry></entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>2</entry>
-        <entry align='left'>CARD16</entry>
-        <entry align='left'>Major version number</entry>
+        <entry></entry>
+        <entry>2</entry>
+        <entry>CARD16</entry>
+        <entry>Major version number</entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>2</entry>
-        <entry align='left'>CARD16</entry>
-        <entry align='left'>Minor version number</entry>
+        <entry></entry>
+        <entry>2</entry>
+        <entry>CARD16</entry>
+        <entry>Minor version number</entry>
       </row>
       <row>
-        <entry align='left'>STRING</entry>
-        <entry align='left'></entry>
-        <entry align='left'></entry>
-        <entry align='left'></entry>
+        <entry>STRING</entry>
+        <entry></entry>
+        <entry></entry>
+        <entry></entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>2</entry>
-        <entry align='left'>CARD16</entry>
-        <entry align='left'>length of string in bytes</entry>
+        <entry></entry>
+        <entry>2</entry>
+        <entry>CARD16</entry>
+        <entry>length of string in bytes</entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>n</entry>
-        <entry align='left'>LISTofLPCE</entry>
-        <entry align='left'>string</entry>
+        <entry></entry>
+        <entry>n</entry>
+        <entry>LISTofLPCE</entry>
+        <entry>string</entry>
       </row>
       <row>
-        <entry align='left'></entry>
-        <entry align='left'>p</entry>
-        <entry align='left'></entry>
-        <entry align='left'>unused, p = pad(n+2, 4)</entry>
+        <entry></entry>
+        <entry>p</entry>
+        <entry></entry>
+        <entry>unused, p = pad(n+2, 4)</entry>
       </row>
     </tbody>
   </tgroup>
@@ -1802,71 +1805,71 @@ Encoding</para></entry>
 
 </sect1>
 
-<sect1 id="ice_minor_opcodes">
+<sect1 id='ICE_Minor_opcodes'>
 <title>ICE Minor opcodes</title>
 
-<informaltable pgwide='0' frame='none'>
-  <tgroup cols='2' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
+<informaltable frame='topbot'>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='1.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Message Name</entry>
-        <entry align='right'>Encoding</entry>
+      <row rowsep='1'>
+        <entry>Message Name</entry>
+        <entry>Encoding</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>Error</entry>
-        <entry align='right'>0</entry>
+        <entry>Error</entry>
+        <entry>0</entry>
       </row>
       <row>
-        <entry align='left'>ByteOrder</entry>
-        <entry align='right'>1</entry>
+        <entry>ByteOrder</entry>
+        <entry>1</entry>
       </row>
       <row>
-        <entry align='left'>ConnectionSetup</entry>
-        <entry align='right'>2</entry>
+        <entry>ConnectionSetup</entry>
+        <entry>2</entry>
       </row>
       <row>
-        <entry align='left'>AuthenticationRequired</entry>
-        <entry align='right'>3</entry>
+        <entry>AuthenticationRequired</entry>
+        <entry>3</entry>
       </row>
       <row>
-        <entry align='left'>AuthenticationReply</entry>
-        <entry align='right'>4</entry>
+        <entry>AuthenticationReply</entry>
+        <entry>4</entry>
       </row>
       <row>
-        <entry align='left'>AuthenticationNextPhase</entry>
-        <entry align='right'>5</entry>
+        <entry>AuthenticationNextPhase</entry>
+        <entry>5</entry>
       </row>
       <row>
-        <entry align='left'>ConnectionReply</entry>
-        <entry align='right'>6</entry>
+        <entry>ConnectionReply</entry>
+        <entry>6</entry>
       </row>
       <row>
-        <entry align='left'>ProtocolSetup</entry>
-        <entry align='right'>7</entry>
+        <entry>ProtocolSetup</entry>
+        <entry>7</entry>
       </row>
       <row>
-        <entry align='left'>ProtocolReply</entry>
-        <entry align='right'>8</entry>
+        <entry>ProtocolReply</entry>
+        <entry>8</entry>
       </row>
       <row>
-        <entry align='left'>Ping</entry>
-        <entry align='right'>9</entry>
+        <entry>Ping</entry>
+        <entry>9</entry>
       </row>
       <row>
-        <entry align='left'>PingReply</entry>
-        <entry align='right'>10</entry>
+        <entry>PingReply</entry>
+        <entry>10</entry>
       </row>
       <row>
-        <entry align='left'>WantToClose</entry>
-        <entry align='right'>11</entry>
+        <entry>WantToClose</entry>
+        <entry>11</entry>
       </row>
       <row>
-        <entry align='left'>NoClose</entry>
-        <entry align='right'>12</entry>
+        <entry>NoClose</entry>
+        <entry>12</entry>
       </row>
     </tbody>
   </tgroup>
@@ -1874,7 +1877,7 @@ Encoding</para></entry>
 
 </sect1>
 
-<sect1 id="message_encoding">
+<sect1 id='Message_Encoding'>
 <title>Message Encoding</title>
 
 <literallayout class="monospaced">
@@ -2035,7 +2038,7 @@ Encoding</para></entry>
 
 </sect1>
 
-<sect1 id="error_class_encoding">
+<sect1 id='Error_Class_Encoding'>
 <title>Error Class Encoding</title>
 
 <para>
@@ -2043,90 +2046,92 @@ Generic errors have classes in the range 0x8000-0xFFFF, and
 subprotocol-specific errors are in the range 0x0000-0x7FFF.
 </para>
 
-<sect2 id="generic_error_class_encoding">
+<sect2 id='Generic_Error_Class_Encoding'>
 <title>Generic Error Class Encoding</title>
 
-<informaltable pgwide='0' frame='none'>
-  <tgroup cols='2' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
+<informaltable frame='topbot'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='3.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Class</entry>
-        <entry align='center'>Encoding</entry>
+      <row rowsep='1'>
+        <entry>Class</entry>
+        <entry>Encoding</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>BadMinor</entry>
-        <entry align='right'>0x8000</entry>
+        <entry>BadMinor</entry>
+        <entry>0x8000</entry>
       </row>
       <row>
-        <entry align='left'>BadState</entry>
-        <entry align='right'>0x8001</entry>
+        <entry>BadState</entry>
+        <entry>0x8001</entry>
       </row>
       <row>
-        <entry align='left'>BadLength</entry>
-        <entry align='right'>0x8002</entry>
+        <entry>BadLength</entry>
+        <entry>0x8002</entry>
       </row>
       <row>
-        <entry align='left'>BadValue</entry>
-        <entry align='right'>0x8003</entry>
+        <entry>BadValue</entry>
+        <entry>0x8003</entry>
       </row>
     </tbody>
   </tgroup>
 </informaltable>
 
 </sect2>
-<sect2 id="ice_specific_error_class_encoding">
+<sect2 id='ICE_specific_Error_Class_Encoding'>
 <title>ICE-specific Error Class Encoding</title>
 
-<informaltable pgwide='0' frame='none'>
-  <tgroup cols='2' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
+<informaltable frame='topbot'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='3.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Class</entry>
-        <entry align='center'>Encoding</entry>
+      <row rowsep='1'>
+        <entry>Class</entry>
+        <entry>Encoding</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>BadMajor</entry>
-        <entry align='right'>0</entry>
+        <entry>BadMajor</entry>
+        <entry>0</entry>
       </row>
       <row>
-        <entry align='left'>NoAuthentication</entry>
-        <entry align='right'>1</entry>
+        <entry>NoAuthentication</entry>
+        <entry>1</entry>
       </row>
       <row>
-        <entry align='left'>NoVersion</entry>
-        <entry align='right'>2</entry>
+        <entry>NoVersion</entry>
+        <entry>2</entry>
       </row>
       <row>
-        <entry align='left'>SetupFailed</entry>
-        <entry align='right'>3</entry>
+        <entry>SetupFailed</entry>
+        <entry>3</entry>
       </row>
       <row>
-        <entry align='left'>AuthenticationRejected</entry>
-        <entry align='right'>4</entry>
+        <entry>AuthenticationRejected</entry>
+        <entry>4</entry>
       </row>
       <row>
-        <entry align='left'>AuthenticationFailed</entry>
-        <entry align='right'>5</entry>
+        <entry>AuthenticationFailed</entry>
+        <entry>5</entry>
       </row>
       <row>
-        <entry align='left'>ProtocolDuplicate</entry>
-        <entry align='right'>6</entry>
+        <entry>ProtocolDuplicate</entry>
+        <entry>6</entry>
       </row>
       <row>
-        <entry align='left'>MajorOpcodeDuplicate</entry>
-        <entry align='right'>7</entry>
+        <entry>MajorOpcodeDuplicate</entry>
+        <entry>7</entry>
       </row>
       <row>
-        <entry align='left'>UnknownProtocol</entry>
-        <entry align='right'>8</entry>
+        <entry>UnknownProtocol</entry>
+        <entry>8</entry>
       </row>
     </tbody>
   </tgroup>
@@ -2140,7 +2145,7 @@ subprotocol-specific errors are in the range 0x0000-0x7FFF.
 
 <title>Modification History</title>
 
-<sect1 id="release_6_to_release_6_1">
+<sect1 id='Release_6_to_Release_61_1'>
 <title>Release 6 to Release 6.1</title>
 <para>
 Release 6.1 added the ICE X rendezvous protocol (Appendix B) and
@@ -2148,7 +2153,7 @@ updated the document version to 1.1.
 </para>
 </sect1>
 
-<sect1 id="release_6_1_to_release_6_3">
+<sect1 id='Release_61_to_Release_63_3'>
 <title>Release 6.1 to Release 6.3</title>
 <para>Release 6.3 added the listen on well known ports feature.</para>
 </sect1>
@@ -2158,7 +2163,7 @@ updated the document version to 1.1.
 <appendix id="ice_x_rendezvous_protocol">
 <title>ICE X Rendezvous Protocol</title>
 
-<sect1 id="introduction">
+<sect1 id='Introduction'>
 <title>Introduction</title>
 <para>
 The ICE X rendezvous protocol is designed to answer the need posed
@@ -2169,7 +2174,7 @@ connections to the same X server.
 </para>
 </sect1>
 
-<sect1 id="overview_of_ice_x_rendezvous">
+<sect1 id='Overview_of_ICE_X_Rendezvous'>
 <title>Overview of ICE X Rendezvous</title>
 
 <para>
@@ -2188,7 +2193,7 @@ with the ICE answering party.
 </para>
 </sect1>
 
-<sect1 id="registering_known_protocols">
+<sect1 id='Registering_Known_Protocols'>
 <title>Registering Known Protocols</title>
 
 <para>
@@ -2217,7 +2222,7 @@ or remove the ICE_PROTOCOLS property entirely.
 </para>
 </sect1>
 
-<sect1 id="initiating_the_rendezvoud">
+<sect1 id='Initiating_the_Rendezvous'>
 <title>Initiating the Rendezvous</title>
 
 <para>
@@ -2245,28 +2250,29 @@ name of the ICE answering party's choosing.  The format for this text
 property is as follows:
 </para>
 
-<informaltable pgwide='0' frame='none'>
-  <tgroup cols='2' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
+<informaltable frame='topbot'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='3.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Field</entry>
-        <entry align='left'>Value</entry>
+      <row rowsep='1'>
+        <entry>Field</entry>
+        <entry>Value</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>type</entry>
-        <entry align='left'>XA_STRING</entry>
+        <entry>type</entry>
+        <entry>XA_STRING</entry>
       </row>
       <row>
-        <entry align='left'>format</entry>
-        <entry align='left'>8</entry>
+        <entry>format</entry>
+        <entry>8</entry>
       </row>
       <row>
-        <entry align='left'>value</entry>
-        <entry align='left'>comma-separated list of ICE network IDs</entry>
+        <entry>value</entry>
+        <entry>comma-separated list of ICE network IDs</entry>
       </row>
     </tbody>
   </tgroup>
@@ -2285,46 +2291,47 @@ and must only be sent to windows that have pre-registered the ICE
 subprotocol in an ICE_PROTOCOLS property on their top-level window.
 </para>
 
-<informaltable pgwide='0' frame='none'>
-  <tgroup cols='2' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
+<informaltable frame='topbot'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='3.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Field</entry>
-        <entry align='left'>Value</entry>
+      <row rowsep='1'>
+        <entry>Field</entry>
+        <entry>Value</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>message_type</entry>
-        <entry align='left'>Atom = "ICE_PROTOCOLS"</entry>
+        <entry>message_type</entry>
+        <entry>Atom = "ICE_PROTOCOLS"</entry>
       </row>
       <row>
-        <entry align='left'>format</entry>
-        <entry align='left'>32</entry>
+        <entry>format</entry>
+        <entry>32</entry>
       </row>
       <row>
-        <entry align='left'>data.l[0]</entry>
-        <entry align='left'>Atom identifying the ICE subprotocol to speak</entry>
+        <entry>data.l[0]</entry>
+        <entry>Atom identifying the ICE subprotocol to speak</entry>
       </row>
       <row>
-        <entry align='left'>data.l[1]</entry>
-        <entry align='left'>Timestamp</entry>
+        <entry>data.l[1]</entry>
+        <entry>Timestamp</entry>
       </row>
       <row>
-        <entry align='left'>data.l[2]</entry>
-        <entry align='left'><para>ICE answering party's window ID with
+        <entry>data.l[2]</entry>
+        <entry><para>ICE answering party's window ID with
 ICE network IDs text property</para></entry>
       </row>
       <row>
-        <entry align='left'>data.l[3]</entry>
-        <entry align='left'>Atom naming text property containing the ICE
+        <entry>data.l[3]</entry>
+        <entry>Atom naming text property containing the ICE
 answering party's ICE network IDs</entry>
       </row>
       <row>
-        <entry align='left'>data.l[4]</entry>
-        <entry align='left'>Reserved.  Must be 0.</entry>
+        <entry>data.l[4]</entry>
+        <entry>Reserved.  Must be 0.</entry>
       </row>
     </tbody>
   </tgroup>
@@ -2357,45 +2364,46 @@ event to the window specified in data.l[2].  This return
 event has the following format:
 </para>
 
-<informaltable pgwide='0' frame='none'>
-  <tgroup cols='2' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
+<informaltable frame='topbot'>
+  <?dbfo keep-together="always" ?>
+  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.0*'/>
+    <colspec colname='c2' colwidth='3.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Field</entry>
-        <entry align='left'>Value</entry>
+      <row rowsep='1'>
+        <entry>Field</entry>
+        <entry>Value</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>message_type</entry>
-        <entry align='left'>Atom = "ICE_INITIATE_FAILED"</entry>
+        <entry>message_type</entry>
+        <entry>Atom = "ICE_INITIATE_FAILED"</entry>
       </row>
       <row>
-        <entry align='left'>format</entry>
-        <entry align='left'>32</entry>
+        <entry>format</entry>
+        <entry>32</entry>
       </row>
       <row>
-        <entry align='left'>data.l[0]</entry>
-        <entry align='left'>Atom identifying the ICE subprotocol requested</entry>
+        <entry>data.l[0]</entry>
+        <entry>Atom identifying the ICE subprotocol requested</entry>
       </row>
       <row>
-        <entry align='left'>data.l[1]</entry>
-        <entry align='left'>Timestamp</entry>
+        <entry>data.l[1]</entry>
+        <entry>Timestamp</entry>
       </row>
       <row>
-        <entry align='left'>data.l[2]</entry>
-        <entry align='left'><para>Initiating party's window ID
+        <entry>data.l[2]</entry>
+        <entry><para>Initiating party's window ID
 (holding ICE_PROTOCOLS)</para></entry>
       </row>
       <row>
-        <entry align='left'>data.l[3]</entry>
-        <entry align='left'>int: reason for failure</entry>
+        <entry>data.l[3]</entry>
+        <entry>int: reason for failure</entry>
       </row>
       <row>
-        <entry align='left'>data.l[4]</entry>
-        <entry align='left'>Reserved, must be 0</entry>
+        <entry>data.l[4]</entry>
+        <entry>Reserved, must be 0</entry>
       </row>
     </tbody>
   </tgroup>
@@ -2418,23 +2426,23 @@ client message event was sent.
 
 <!-- .ne 21 -->
 
-<informaltable pgwide='0' frame='none'>
-  <tgroup cols='3' align='center'>
-    <colspec colname='c1'/>
-    <colspec colname='c2'/>
-    <colspec colname='c3'/>
+<informaltable frame='topbot'>
+  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
+    <colspec colname='c1' colwidth='1.5*'/>
+    <colspec colname='c2' colwidth='1.0*'/>
+    <colspec colname='c3' colwidth='3.0*'/>
     <thead>
-      <row>
-        <entry align='left'>Value</entry>
-        <entry align='left'>Encoding</entry>
-        <entry align='left'>Description</entry>
+      <row rowsep='1'>
+        <entry>Value</entry>
+        <entry>Encoding</entry>
+        <entry>Description</entry>
       </row>
     </thead>
     <tbody>
       <row>
-        <entry align='left'>OpenFailed</entry>
-        <entry align='center'>1</entry>
-        <entry align='left'>
+        <entry>OpenFailed</entry>
+        <entry>1</entry>
+        <entry>
 The client was unable to open the connection
 (e.g. a call to IceOpenConnection() failed).  If the
 client is able to distinguish authentication or
@@ -2444,9 +2452,9 @@ for authorization errors.
           </entry>
       </row>
       <row>
-        <entry align='left'>AuthenticationFailed</entry>
-        <entry align='center'>2</entry>
-        <entry align='left'>Authentication or authorization of the
+        <entry>AuthenticationFailed</entry>
+        <entry>2</entry>
+        <entry>Authentication or authorization of the
 connection or protocol setup was refused.
 This reply will be given only if the client is
 able to distinguish it from
@@ -2456,23 +2464,23 @@ otherwise
 will be returned.</entry>
       </row>
       <row>
-        <entry align='left'>SetupFailed</entry>
-        <entry align='center'>3</entry>
-        <entry align='left'>The client was unable to initiate the specified
+        <entry>SetupFailed</entry>
+        <entry>3</entry>
+        <entry>The client was unable to initiate the specified
 protocol on the connection (e.g. a call to
 IceProtocolSetup() failed).</entry>
       </row>
       <row>
-        <entry align='left'>UnknownProtocol</entry>
-        <entry align='center'>4</entry>
-        <entry align='left'>The client does not recognize the requested
+        <entry>UnknownProtocol</entry>
+        <entry>4</entry>
+        <entry>The client does not recognize the requested
 protocol.  (This represents a semantic error
 on the part of the answering party.)</entry>
       </row>
       <row>
-        <entry align='left'>Refused</entry>
-        <entry align='center'>5</entry>
-        <entry align='left'>
+        <entry>Refused</entry>
+        <entry>5</entry>
+        <entry>
 The client was in the process of removing
 ICE_INITIATE_<emphasis remap='I'>pname</emphasis>
 from its ICE_PROTOCOLS list
@@ -2535,7 +2543,7 @@ for ICE subprotocol <emphasis remap='I'>pname</emphasis>.
 </note>
 </sect1>
 
-<sect1 id="ice_subprotocol_versioning">
+<sect1 id='ICE_Subprotocol_Versioning'>
 <title>ICE Subprotocol Versioning</title>
 
 <para>
old mode 100755 (executable)
new mode 100644 (file)
index 3df59d6..0638fb0
@@ -289,7 +289,7 @@ typedef struct {
     if (_pBuf > _end) { \
        _bail; \
     } \
-} 
+}
 
 #define SKIP_LISTOF_STRING(_pBuf, _swap, _count, _end, _bail) \
 { \
@@ -397,7 +397,7 @@ extern _IceProtocol _IceProtocols[];
 extern int             _IceLastMajorOpcode;
 
 extern int             _IceAuthCount;
-extern char            *_IceAuthNames[];
+extern const char      *_IceAuthNames[];
 extern IcePoAuthProc   _IcePoAuthProcs[];
 extern IcePaAuthProc   _IcePaAuthProcs[];
 
@@ -432,24 +432,24 @@ extern void _IceErrorNoVersion (
 extern void _IceErrorSetupFailed (
     IceConn            /* iceConn */,
     int                        /* offendingMinor */,
-    char *             /* reason */
+    const char *       /* reason */
 );
 
 extern void _IceErrorAuthenticationRejected (
     IceConn            /* iceConn */,
     int                        /* offendingMinor */,
-    char *             /* reason */
+    const char *       /* reason */
 );
 
 extern void _IceErrorAuthenticationFailed (
     IceConn            /* iceConn */,
     int                        /* offendingMinor */,
-    char *             /* reason */
+    const char *       /* reason */
 );
 
 extern void _IceErrorProtocolDuplicate (
     IceConn            /* iceConn */,
-    char *             /* protocolName */
+    const char *       /* protocolName */
 );
 
 extern void _IceErrorMajorOpcodeDuplicate (
@@ -459,7 +459,7 @@ extern void _IceErrorMajorOpcodeDuplicate (
 
 extern void _IceErrorUnknownProtocol (
     IceConn            /* iceConn */,
-    char *             /* protocolName */
+    const char *       /* protocolName */
 );
 
 extern void _IceAddOpcodeMapping (
@@ -505,35 +505,35 @@ extern void _IceConnectionClosed (
 );
 
 extern void _IceGetPoAuthData (
-    char *             /* protocol_name */,
-    char *             /* address */,
-    char *             /* auth_name */,
+    const char *       /* protocol_name */,
+    const char *       /* address */,
+    const char *       /* auth_name */,
     unsigned short *   /* auth_data_length_ret */,
     char **            /* auth_data_ret */
 );
 
 extern void _IceGetPaAuthData (
-    char *             /* protocol_name */,
-    char *             /* address */,
-    char *             /* auth_name */,
+    const char *       /* protocol_name */,
+    const char *       /* address */,
+    const char *       /* auth_name */,
     unsigned short *   /* auth_data_length_ret */,
     char **            /* auth_data_ret */
 );
 
 extern void _IceGetPoValidAuthIndices (
-    char *             /* protocol_name */,
-    char *             /* address */,
+    const char *       /* protocol_name */,
+    const char *       /* address */,
     int                        /* num_auth_names */,
-    char **            /* auth_names */,
+    const char **      /* auth_names */,
     int        *               /* num_indices_ret */,
     int        *               /* indices_ret */
 );
 
 extern void _IceGetPaValidAuthIndices (
-    char *             /* protocol_name */,
-    char *             /* address */,
+    const char *       /* protocol_name */,
+    const char *       /* address */,
     int                        /* num_auth_names */,
-    char **            /* auth_names */,
+    const char **      /* auth_names */,
     int        *               /* num_indices_ret */,
     int        *               /* indices_ret */
 );
old mode 100755 (executable)
new mode 100644 (file)
index a5dd7d4..3cbe9c6
@@ -4,13 +4,12 @@ AM_CPPFLAGS = -I${top_srcdir}/include
 
 AM_CFLAGS = \
        $(ICE_CFLAGS) \
-       $(XTRANS_CFLAGS) \
        $(CWARNFLAGS) \
        -DICE_t -DTRANS_CLIENT -DTRANS_SERVER
 
 libICE_la_LDFLAGS = -version-number 6:3:0 -no-undefined
 
-libICE_la_LIBADD = $(ICE_LIBS) $(XTRANS_LIBS)
+libICE_la_LIBADD = $(ICE_LIBS)
 
 libICE_la_SOURCES = \
        ICElibint.h \
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index fd0a77d..6c00482
@@ -171,7 +171,7 @@ IceLockAuthFile (
            unlink (link_name);
        }
     }
-    
+
     while (retries > 0)
     {
        if (creat_fd == -1)
@@ -338,9 +338,9 @@ IceWriteAuthFileEntry (
 \f
 IceAuthFileEntry *
 IceGetAuthFileEntry (
-       char    *protocol_name,
-       char    *network_id,
-       char    *auth_name
+       const char      *protocol_name,
+       const char      *network_id,
+       const char      *auth_name
 )
 {
     FILE               *auth_file;
@@ -406,18 +406,18 @@ read_string (FILE *file, char **stringp)
        return (0);
 
     data = malloc ((unsigned) len + 1);
-    
+
     if (!data)
            return (0);
-    
-    if (len != 0) 
+
+    if (len != 0)
     {
        if (fread (data, (int) sizeof (char), (int) len, file) != len)
        {
            free (data);
            return (0);
        }
-       
+
     }
     data[len] = '\0';
 
old mode 100755 (executable)
new mode 100644 (file)
index 2542a0c..b59e94c
@@ -83,7 +83,7 @@ IceOpenConnection (
      * connection if the specified 'context' is equal to the context
      * associated with the ICE connection, or if the context associated
      * with the ICE connection is NULL.
-     * 
+     *
      * If 'majorOpcodeCheck' is non-zero, it will contain a protocol major
      * opcode that we should make sure is not already active on the ICE
      * connection.  Some clients will want two seperate connections for the
@@ -471,7 +471,7 @@ ConnectToPeer (char *networkIdsList, char **actualConnectionRet)
     {
        address = malloc (len + 1);
        address_size = len;
-    }    
+    }
 
     while (ptr < endptr && !madeConnection)
     {
@@ -513,18 +513,18 @@ ConnectToPeer (char *networkIdsList, char **actualConnectionRet)
        }
     }
 
-    if (madeConnection) 
+    if (madeConnection)
     {
        /*
         * We need to return the actual network connection string
         */
 
        *actualConnectionRet = strdup(address);
-       
+
        /*
         * Return the file descriptor
         */
-    } 
+    }
     else trans_conn = NULL;
 
     if (address != addrbuf) free (address);
old mode 100755 (executable)
new mode 100644 (file)
index 5c9aa51..3e5e5e9
@@ -116,7 +116,7 @@ _IceErrorBadValue (
 
     if (PAD64 (length))
        IceWritePad (iceConn, PAD64 (length));
-    
+
     IceFlush (iceConn);
 }
 
@@ -165,7 +165,7 @@ void
 _IceErrorSetupFailed (
        IceConn iceConn,
        int     offendingMinor,
-       char    *reason
+       const char      *reason
 )
 {
     char *pBuf, *pStart;
@@ -196,7 +196,7 @@ void
 _IceErrorAuthenticationRejected (
        IceConn iceConn,
        int     offendingMinor,
-       char    *reason
+       const char      *reason
 )
 {
     char *pBuf, *pStart;
@@ -225,7 +225,7 @@ void
 _IceErrorAuthenticationFailed (
        IceConn iceConn,
        int     offendingMinor,
-       char    *reason
+       const char      *reason
 )
 {
     char *pBuf, *pStart;
@@ -253,7 +253,7 @@ _IceErrorAuthenticationFailed (
 void
 _IceErrorProtocolDuplicate (
        IceConn iceConn,
-       char    *protocolName
+       const char      *protocolName
 )
 {
     char *pBuf, *pStart;
@@ -284,7 +284,7 @@ _IceErrorMajorOpcodeDuplicate (
        int     majorOpcode
 )
 {
-    char mOp = (char) majorOpcode;
+    char mOp[8] = { (char) majorOpcode };
 
     IceErrorHeader (iceConn,
        0, ICE_ProtocolSetup,
@@ -293,7 +293,7 @@ _IceErrorMajorOpcodeDuplicate (
        IceMajorOpcodeDuplicate,
        1 /* length */);
 
-    IceWriteData (iceConn, 8, &mOp);
+    IceWriteData (iceConn, 8, mOp);
     IceFlush (iceConn);
 }
 
@@ -301,7 +301,7 @@ _IceErrorMajorOpcodeDuplicate (
 void
 _IceErrorUnknownProtocol (
        IceConn iceConn,
-       char    *protocolName
+       const char      *protocolName
 )
 {
     char *pBuf, *pStart;
@@ -334,7 +334,7 @@ _IceErrorBadMajor (
        int     severity
 )
 {
-    char maj = (char) offendingMajor;
+    char maj[8] = { (char) offendingMajor };
 
     IceErrorHeader (iceConn,
        0, offendingMinor,
@@ -343,7 +343,7 @@ _IceErrorBadMajor (
        IceBadMajor,
        1 /* length */);
 
-    IceWriteData (iceConn, 8, &maj);
+    IceWriteData (iceConn, 8, maj);
     IceFlush (iceConn);
 }
 
@@ -364,7 +364,8 @@ _IceDefaultErrorHandler (
        IcePointer      values
 )
 {
-    char *str;
+    const char *str;
+    char *estr;
     char *pData = (char *) values;
 
     switch (offendingMinorOpcode)
@@ -512,42 +513,42 @@ _IceDefaultErrorHandler (
 
         case IceSetupFailed:
 
-           EXTRACT_STRING (pData, swap, str);
-           fprintf (stderr, "Reason : %s\n", str);
-           free(str);
+            EXTRACT_STRING (pData, swap, estr);
+            fprintf (stderr, "Reason : %s\n", estr);
+            free(estr);
             break;
 
         case IceAuthRejected:
 
-           EXTRACT_STRING (pData, swap, str);
-           fprintf (stderr, "Reason : %s\n", str);
-           free(str);
+            EXTRACT_STRING (pData, swap, estr);
+            fprintf (stderr, "Reason : %s\n", estr);
+            free(estr);
             break;
 
         case IceAuthFailed:
 
-           EXTRACT_STRING (pData, swap, str);
-           fprintf (stderr, "Reason : %s\n", str);
-           free(str);
+            EXTRACT_STRING (pData, swap, estr);
+            fprintf (stderr, "Reason : %s\n", estr);
+            free(estr);
             break;
 
         case IceProtocolDuplicate:
 
-           EXTRACT_STRING (pData, swap, str);
-           fprintf (stderr, "Protocol name : %s\n", str);
-           free(str);
+            EXTRACT_STRING (pData, swap, estr);
+            fprintf (stderr, "Protocol name : %s\n", estr);
+            free(estr);
             break;
 
         case IceMajorOpcodeDuplicate:
 
-           fprintf (stderr, "Major opcode : %d\n", (int) *pData);
+            fprintf (stderr, "Major opcode : %d\n", (int) *pData);
             break;
 
         case IceUnknownProtocol:
 
-           EXTRACT_STRING (pData, swap, str);
-           fprintf (stderr, "Protocol name : %s\n", str);
-           free(str);
+            EXTRACT_STRING (pData, swap, estr);
+            fprintf (stderr, "Protocol name : %s\n", estr);
+            free(estr);
             break;
 
        default:
@@ -563,12 +564,12 @@ _IceDefaultErrorHandler (
 IceErrorHandler   _IceErrorHandler   = _IceDefaultErrorHandler;
 
 \f
-/* 
+/*
  * This procedure sets the ICE error handler to be the specified
  * routine.  If NULL is passed in the default error handler is restored.
  * The function's return value is the previous error handler.
  */
+
 IceErrorHandler
 IceSetErrorHandler (
        IceErrorHandler handler
@@ -605,13 +606,13 @@ _IceDefaultIOErrorHandler (
 IceIOErrorHandler _IceIOErrorHandler = _IceDefaultIOErrorHandler;
 
 \f
-/* 
+/*
  * This procedure sets the ICE fatal I/O error handler to be the
  * specified routine.  If NULL is passed in the default error
  * handler is restored.   The function's return value is the
  * previous error handler.
  */
+
 IceIOErrorHandler
 IceSetIOErrorHandler (
        IceIOErrorHandler handler
old mode 100755 (executable)
new mode 100644 (file)
index aa5d72d..e127206
@@ -33,7 +33,7 @@ Author: Ralph Mor, X Consortium
 #include "ICElibint.h"
 
 static Bool auth_valid (const char *auth_name, int num_auth_names,
-                       char **auth_names, int *index_ret);
+                       const char **auth_names, int *index_ret);
 
 \f
 /*
@@ -55,9 +55,9 @@ static Bool auth_valid (const char *auth_name, int num_auth_names,
 
 void
 _IceGetPoAuthData (
-       char            *protocolName,
-       char            *networkId,
-       char            *authName,
+       const char      *protocolName,
+       const char      *networkId,
+       const char      *authName,
        unsigned short  *authDataLenRet,
        char            **authDataRet
 )
@@ -86,9 +86,9 @@ _IceGetPoAuthData (
 \f
 void
 _IceGetPaAuthData (
-       char            *protocolName,
-       char            *networkId,
-       char            *authName,
+       const char      *protocolName,
+       const char      *networkId,
+       const char      *authName,
        unsigned short  *authDataLenRet,
        char            **authDataRet
 )
@@ -125,12 +125,12 @@ _IceGetPaAuthData (
 \f
 void
 _IceGetPoValidAuthIndices (
-       char    *protocol_name,
-       char    *network_id,
-       int     num_auth_names,
-       char    **auth_names,
-       int     *num_indices_ret,
-       int     *indices_ret            /* in/out arg */
+       const char      *protocol_name,
+       const char      *network_id,
+       int             num_auth_names,
+       const char      **auth_names,
+       int             *num_indices_ret,
+       int             *indices_ret            /* in/out arg */
 )
 {
     FILE               *auth_file;
@@ -184,12 +184,12 @@ _IceGetPoValidAuthIndices (
 \f
 void
 _IceGetPaValidAuthIndices (
-       char    *protocol_name,
-       char    *network_id,
-       int     num_auth_names,
-       char    **auth_names,
-       int     *num_indices_ret,
-       int     *indices_ret            /* in/out arg */
+       const char      *protocol_name,
+       const char      *network_id,
+       int             num_auth_names,
+       const char      **auth_names,
+       int             *num_indices_ret,
+       int             *indices_ret            /* in/out arg */
 )
 {
     int                        index_ret;
@@ -232,7 +232,7 @@ _IceGetPaValidAuthIndices (
 
 static Bool
 auth_valid (const char *auth_name, int num_auth_names,
-           char **auth_names, int *index_ret)
+           const char **auth_names, int *index_ret)
 
 {
     /*
@@ -246,7 +246,7 @@ auth_valid (const char *auth_name, int num_auth_names,
        {
            break;
        }
-   
+
     if (i < num_auth_names)
     {
        *index_ret = i;
old mode 100755 (executable)
new mode 100644 (file)
index 2102384..965386f
@@ -40,6 +40,6 @@ int           _IceConnectionCount = 0;
 int            _IceLastMajorOpcode = 0;
 
 int            _IceAuthCount = 1;
-char           *_IceAuthNames[] = {"MIT-MAGIC-COOKIE-1"};
+const char     *_IceAuthNames[] = {"MIT-MAGIC-COOKIE-1"};
 
 _IceWatchProc  *_IceWatchProcs = NULL;
old mode 100755 (executable)
new mode 100644 (file)
index 7dc46da..14370e2
@@ -54,7 +54,7 @@ IceGenerateMagicCookie (
     int            seed;
     int            value;
     int            i;
-    
+
     if ((auth = (char *) malloc (len + 1)) == NULL)
        return (NULL);
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 22602d4..0348fec
@@ -83,7 +83,7 @@ IceListenForConnections (
        {
            listenObjs[*countRet].trans_conn = transConns[i];
            listenObjs[*countRet].network_id = networkId;
-               
+
            (*countRet)++;
        }
     }
@@ -140,7 +140,7 @@ IceListenForConnections (
     {
        if (errorStringRet && errorLength > 0)
            *errorStringRet = '\0';
-       
+
        for (i = 0; i < *countRet; i++)
        {
            (*listenObjsRet)[i]->host_based_auth_proc = NULL;
old mode 100755 (executable)
new mode 100644 (file)
index 7747af6..06b56a3
@@ -83,7 +83,7 @@ IceListenForWellKnownConnections (
        {
            listenObjs[*countRet].trans_conn = transConns[i];
            listenObjs[*countRet].network_id = networkId;
-               
+
            (*countRet)++;
        }
     }
@@ -140,7 +140,7 @@ IceListenForWellKnownConnections (
     {
        if (errorStringRet && errorLength > 0)
            *errorStringRet = '\0';
-       
+
        for (i = 0; i < *countRet; i++)
        {
            (*listenObjsRet)[i]->host_based_auth_proc = NULL;
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 890da9a..e201fda
@@ -246,7 +246,7 @@ _IceRead (
 
                return (0);
            }
-           else 
+           else
            {
                /*
                 * Fatal IO error.  First notify each protocol's IceIOErrorProc
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 583ea1d..2708ee8
@@ -66,6 +66,51 @@ Author: Ralph Mor, X Consortium
     IceDisposeCompleteMessage (_iceConn, _pStart);\
     return (0);\
 }
+
+#ifndef HAVE_ASPRINTF
+# include <stdarg.h>
+
+/* sprintf variant found in newer libc's which allocates string to print to */
+static int _X_ATTRIBUTE_PRINTF(2,3)
+asprintf(char ** ret, const char *format, ...)
+{
+    char buf[256];
+    int len;
+    va_list ap;
+
+    va_start(ap, format);
+    len = vsnprintf(buf, sizeof(buf), format, ap);
+    va_end(ap);
+
+    if (len < 0)
+       return -1;
+
+    if (len < sizeof(buf))
+    {
+       *ret = strdup(buf);
+    }
+    else
+    {
+       *ret = malloc(len + 1); /* snprintf doesn't count trailing '\0' */
+       if (*ret != NULL)
+       {
+           va_start(ap, format);
+           len = vsnprintf(*ret, len + 1, format, ap);
+           va_end(ap);
+           if (len < 0) {
+               free(*ret);
+               *ret = NULL;
+           }
+       }
+    }
+
+    if (*ret == NULL)
+       return -1;
+
+    return len;
+}
+#endif
+
 \f
 /*
  * IceProcessMessages:
@@ -259,7 +304,7 @@ IceProcessMessages (
         * to use message replies unless we translate opcodes before
         * comparing them.
         */
-       
+
        {
            int op;
 
@@ -605,8 +650,8 @@ ProcessError (
            _IceConnectionError *errorReply =
                &(((_IceReply *) (replyWait->reply))->connection_error);
            char *errorStr = NULL;
-           const char *tempstr;
-           char *prefix, *temp;
+           const char *tempstr, *prefix;
+           char *temp;
 
            invokeHandler = 0;
            errorReturned = True;
@@ -632,9 +677,8 @@ ProcessError (
                prefix = "Connection Setup Failed, reason : ";
 
                EXTRACT_STRING (pData, swap, temp);
-               errorStr = (char *) malloc (
-                   strlen (prefix) + strlen (temp) + 1);
-               sprintf (errorStr, "%s%s", prefix, temp);
+               if (asprintf (&errorStr, "%s%s", prefix, temp) == -1)
+                   errorStr = NULL;
                free (temp);
                break;
 
@@ -642,9 +686,8 @@ ProcessError (
 
                prefix = "Authentication Rejected, reason : ";
                EXTRACT_STRING (pData, swap, temp);
-               errorStr = (char *) malloc (
-                   strlen (prefix) + strlen (temp) + 1);
-               sprintf (errorStr, "%s%s", prefix, temp);
+               if (asprintf (&errorStr, "%s%s", prefix, temp) == -1)
+                   errorStr = NULL;
                free (temp);
                break;
 
@@ -652,9 +695,8 @@ ProcessError (
 
                prefix = "Authentication Failed, reason : ";
                EXTRACT_STRING (pData, swap, temp);
-               errorStr = (char *) malloc (
-                   strlen (prefix) + strlen (temp) + 1);
-               sprintf (errorStr, "%s%s", prefix, temp);
+               if (asprintf (&errorStr, "%s%s", prefix, temp) == -1)
+                   errorStr = NULL;
                free (temp);
                break;
 
@@ -674,7 +716,8 @@ ProcessError (
            _IceProtocolError *errorReply =
                &(((_IceReply *) (replyWait->reply))->protocol_error);
            char *errorStr = "";
-           char *prefix, *temp;
+           const char *prefix;
+           char *temp;
 
            invokeHandler = 0;
            errorReturned = True;
@@ -683,16 +726,15 @@ ProcessError (
            {
            case IceNoVersion:
 
-               temp =
-                   "None of the protocol versions specified are supported";
-               errorStr = strdup(temp);
+               errorStr = strdup(
+                   "None of the protocol versions specified are supported");
                break;
 
            case IceNoAuth:
 
-               temp =
-                   "None of the authentication protocols specified are supported";
-               errorStr = strdup(temp);
+               errorStr = strdup(
+                   "None of the authentication protocols specified are supported");
+
                break;
 
            case IceSetupFailed:
@@ -700,9 +742,8 @@ ProcessError (
                prefix = "Protocol Setup Failed, reason : ";
 
                EXTRACT_STRING (pData, swap, temp);
-               errorStr = (char *) malloc (
-                   strlen (prefix) + strlen (temp) + 1);
-               sprintf (errorStr, "%s%s", prefix, temp);
+               if (asprintf (&errorStr, "%s%s", prefix, temp) == -1)
+                   errorStr = NULL;
                free (temp);
                break;
 
@@ -710,9 +751,8 @@ ProcessError (
 
                prefix = "Authentication Rejected, reason : ";
                EXTRACT_STRING (pData, swap, temp);
-               errorStr = (char *) malloc (
-                   strlen (prefix) + strlen (temp) + 1);
-               sprintf (errorStr, "%s%s", prefix, temp);
+               if (asprintf (&errorStr, "%s%s", prefix, temp) == -1)
+                   errorStr = NULL;
                free (temp);
                break;
 
@@ -720,9 +760,8 @@ ProcessError (
 
                prefix = "Authentication Failed, reason : ";
                EXTRACT_STRING (pData, swap, temp);
-               errorStr = (char *) malloc (
-                   strlen (prefix) + strlen (temp) + 1);
-               sprintf (errorStr, "%s%s", prefix, temp);
+               if (asprintf (&errorStr, "%s%s", prefix, temp) == -1)
+                   errorStr = NULL;
                free (temp);
                break;
 
@@ -730,26 +769,24 @@ ProcessError (
 
                prefix = "Protocol was already registered : ";
                EXTRACT_STRING (pData, swap, temp);
-               errorStr = (char *) malloc (
-                   strlen (prefix) + strlen (temp) + 1);
-               sprintf (errorStr, "%s%s", prefix, temp);
+               if (asprintf (&errorStr, "%s%s", prefix, temp) == -1)
+                   errorStr = NULL;
                free (temp);
                break;
 
            case IceMajorOpcodeDuplicate:
 
                prefix = "The major opcode was already used : ";
-               errorStr = (char *) malloc (strlen (prefix) + 2);
-               sprintf (errorStr, "%s%d", prefix, (int) *pData);
+               if (asprintf (&errorStr, "%s%d", prefix, (int) *pData) == -1)
+                   errorStr = NULL;
                break;
 
            case IceUnknownProtocol:
 
                prefix = "Unknown Protocol : ";
                EXTRACT_STRING (pData, swap, temp);
-               errorStr = (char *) malloc (
-                   strlen (prefix) + strlen (temp) + 1);
-               sprintf (errorStr, "%s%s", prefix, temp);
+               if (asprintf (&errorStr, "%s%s", prefix, temp) == -1)
+                   errorStr = NULL;
                free (temp);
                break;
 
@@ -824,7 +861,7 @@ ProcessConnectionSetup (
     int  hisMajorVersion, hisMinorVersion;
     int         myAuthCount, hisAuthCount;
     int         found, i, j;
-    char *myAuthName, **hisAuthNames = NULL;
+    char **hisAuthNames = NULL;
     char *pData, *pStart, *pEnd;
     char *vendor = NULL;
     char *release = NULL;
@@ -850,17 +887,17 @@ ProcessConnectionSetup (
 
     pData = pStart;
     pEnd = pStart + (length << 3);
-    
-    SKIP_STRING (pData, swap, pEnd, 
+
+    SKIP_STRING (pData, swap, pEnd,
                 BAIL_STRING(iceConn, ICE_ConnectionSetup,
                             pStart));                         /* vendor */
-    SKIP_STRING (pData, swap, pEnd, 
+    SKIP_STRING (pData, swap, pEnd,
                 BAIL_STRING(iceConn, ICE_ConnectionSetup,
                            pStart));                          /* release */
-    SKIP_LISTOF_STRING (pData, swap, (int) message->authCount, pEnd, 
+    SKIP_LISTOF_STRING (pData, swap, (int) message->authCount, pEnd,
                        BAIL_STRING(iceConn, ICE_ConnectionSetup,
                                   pStart));                   /* auth names */
-    
+
     pData += (message->versionCount * 4);                     /* versions */
 
     CHECK_COMPLETE_SIZE (iceConn, ICE_ConnectionSetup,
@@ -922,7 +959,7 @@ ProcessConnectionSetup (
        {
            for (i = 0; i < hisAuthCount; i++)
                free (hisAuthNames[i]);
-       
+
            free ((char *) hisAuthNames);
        }
 
@@ -946,7 +983,7 @@ ProcessConnectionSetup (
     {
        if (authUsableFlags[i])
        {
-           myAuthName = _IceAuthNames[i];
+           const char *myAuthName = _IceAuthNames[i];
 
            for (j = 0; j < hisAuthCount && !found; j++)
                if (strcmp (myAuthName, hisAuthNames[j]) == 0)
@@ -981,7 +1018,7 @@ ProcessConnectionSetup (
            {
                accept_setup_now = 1;
            }
-           else 
+           else
            {
                _IceErrorAuthenticationRejected (iceConn,
                    ICE_ConnectionSetup, "None of the authentication protocols specified are supported and host-based authentication failed");
@@ -1034,6 +1071,11 @@ ProcessConnectionSetup (
        {
            accept_setup_now = 1;
        }
+       else
+       {
+           free (vendor);
+           free (release);
+       }
 
        if (authData && authDataLen > 0)
            free ((char *) authData);
@@ -1041,7 +1083,7 @@ ProcessConnectionSetup (
        if (errorString)
            free (errorString);
     }
-    
+
     if (accept_setup_now)
     {
        AcceptConnection (iceConn, hisVersionIndex);
@@ -1055,7 +1097,7 @@ ProcessConnectionSetup (
     {
        for (i = 0; i < hisAuthCount; i++)
            free (hisAuthNames[i]);
-       
+
        free ((char *) hisAuthNames);
     }
 
@@ -1209,7 +1251,8 @@ ProcessAuthRequired (
     }
     else if (status == IcePoAuthRejected || status == IcePoAuthFailed)
     {
-       char *prefix, *returnErrorString;
+       const char *prefix;
+       char *returnErrorString;
 
        if (status == IcePoAuthRejected)
        {
@@ -1226,11 +1269,10 @@ ProcessAuthRequired (
            prefix = "Authentication Failed, reason : ";
        }
 
-       returnErrorString = (char *) malloc (strlen (prefix) +
-           strlen (errorString) + 1);
-       sprintf (returnErrorString, "%s%s", prefix, errorString);
+       if (asprintf (&returnErrorString, "%s%s", prefix, errorString) == -1)
+           returnErrorString = NULL;
        free (errorString);
-       
+
        if (iceConn->connect_to_you)
        {
            _IceConnectionError *errorReply =
@@ -1636,7 +1678,8 @@ ProcessAuthNextPhase (
     }
     else if (status == IcePoAuthRejected || status == IcePoAuthFailed)
     {
-       char *prefix = NULL, *returnErrorString;
+       const char *prefix = NULL;
+       char *returnErrorString;
 
        if (status == IcePoAuthRejected)
        {
@@ -1653,9 +1696,8 @@ ProcessAuthNextPhase (
            prefix = "Authentication Failed, reason : ";
        }
 
-       returnErrorString = (char *) malloc (strlen (prefix) +
-           strlen (errorString) + 1);
-       sprintf (returnErrorString, "%s%s", prefix, errorString);
+       if (asprintf (&returnErrorString, "%s%s", prefix, errorString) == -1)
+           returnErrorString = NULL;
        free (errorString);
 
        if (iceConn->connect_to_you)
@@ -1752,7 +1794,7 @@ ProcessConnectionReply (
 
            _IceErrorBadValue (iceConn, 0,
                ICE_ConnectionReply, 2, 1, &errIndex);
-           
+
            errorReply->type = ICE_CONNECTION_ERROR;
            errorReply->error_message =
                "Received bad version index in Connection Reply";
@@ -1803,7 +1845,7 @@ ProcessProtocolSetup (
     int                        myAuthCount, hisAuthCount;
     int                myOpcode, hisOpcode;
     int                        found, i, j;
-    char               *myAuthName, **hisAuthNames = NULL;
+    char               **hisAuthNames = NULL;
     char               *protocolName;
     char               *pData, *pStart, *pEnd;
     char               *vendor = NULL;
@@ -1843,16 +1885,16 @@ ProcessProtocolSetup (
     pEnd = pStart + (length << 3);
 
     SKIP_STRING (pData, swap, pEnd,
-                BAIL_STRING(iceConn, ICE_ProtocolSetup, 
+                BAIL_STRING(iceConn, ICE_ProtocolSetup,
                             pStart));                         /* proto name */
     SKIP_STRING (pData, swap, pEnd,
-                BAIL_STRING(iceConn, ICE_ProtocolSetup, 
+                BAIL_STRING(iceConn, ICE_ProtocolSetup,
                             pStart));                         /* vendor */
     SKIP_STRING (pData, swap, pEnd,
-                BAIL_STRING(iceConn, ICE_ProtocolSetup, 
+                BAIL_STRING(iceConn, ICE_ProtocolSetup,
                             pStart));                         /* release */
     SKIP_LISTOF_STRING (pData, swap, (int) message->authCount, pEnd,
-                       BAIL_STRING(iceConn, ICE_ProtocolSetup, 
+                       BAIL_STRING(iceConn, ICE_ProtocolSetup,
                                    pStart));                  /* auth names */
     pData += (message->versionCount * 4);                     /* versions */
 
@@ -1962,7 +2004,7 @@ ProcessProtocolSetup (
        {
            for (i = 0; i < hisAuthCount; i++)
                free (hisAuthNames[i]);
-       
+
            free ((char *) hisAuthNames);
        }
 
@@ -1974,7 +2016,8 @@ ProcessProtocolSetup (
 
     _IceGetPaValidAuthIndices (
        _IceProtocols[myOpcode - 1].protocol_name,
-       iceConn->connection_string, myAuthCount, myProtocol->auth_names,
+       iceConn->connection_string, myAuthCount,
+       (const char **) myProtocol->auth_names,
         &authUsableCount, authIndices);
 
     for (i = 0; i < myAuthCount; i++)
@@ -1988,7 +2031,7 @@ ProcessProtocolSetup (
     {
        if (authUsableFlags[i])
        {
-           myAuthName = myProtocol->auth_names[i];
+           const char *myAuthName = myProtocol->auth_names[i];
 
            for (j = 0; j < hisAuthCount && !found; j++)
                if (strcmp (myAuthName, hisAuthNames[j]) == 0)
@@ -2022,7 +2065,7 @@ ProcessProtocolSetup (
            {
                accept_setup_now = 1;
            }
-           else 
+           else
            {
                _IceErrorAuthenticationRejected (iceConn,
                    ICE_ProtocolSetup, "None of the authentication protocols specified are supported and host-based authentication failed");
@@ -2052,7 +2095,7 @@ ProcessProtocolSetup (
            _IceProtoSetupToMeInfo *setupInfo;
 
            AuthRequired (iceConn, hisAuthIndex, authDataLen, authData);
-        
+
            iceConn->protosetup_to_me = setupInfo =
                (_IceProtoSetupToMeInfo *) malloc (
                sizeof (_IceProtoSetupToMeInfo));
@@ -2241,17 +2284,7 @@ ProcessProtocolReply (
            IcePoAuthProc authProc = myProtocol->auth_procs[(int)
                (iceConn->protosetup_to_you->my_auth_index)];
 
-#ifdef SVR4
-
-/*
- * authProc is never NULL, but the cc compiler on UNIX System V/386
- * Release 4.2 Version 1 screws up an optimization.  Unless there is
- * some sort of reference to authProc before the function call, the
- * function call will seg fault.
- */
-           if (authProc)
-#endif
-               (*authProc) (iceConn,
+           (*authProc) (iceConn,
                &iceConn->protosetup_to_you->my_auth_state,
                True /* clean up */, False /* swap */,
                0, NULL, NULL, NULL, NULL);
@@ -2265,14 +2298,14 @@ ProcessProtocolReply (
 
            _IceErrorBadValue (iceConn, 0,
                ICE_ProtocolReply, 2, 1, &errIndex);
-           
+
            errorReply->type = ICE_PROTOCOL_ERROR;
            errorReply->error_message =
                "Received bad version index in Protocol Reply";
        }
        else
        {
-           _IceProtocolReply *reply = 
+           _IceProtocolReply *reply =
                &(((_IceReply *) (replyWait->reply))->protocol_reply);
 
            reply->type = ICE_PROTOCOL_REPLY;
@@ -2327,7 +2360,7 @@ ProcessPingReply (
     if (iceConn->ping_waits)
     {
        _IcePingWait *next = iceConn->ping_waits->next;
-       
+
        (*iceConn->ping_waits->ping_reply_proc) (iceConn,
            iceConn->ping_waits->client_data);
 
old mode 100755 (executable)
new mode 100644 (file)
index 2aab6d9..255b912
@@ -118,7 +118,7 @@ IceProtocolSetup (
        _IceGetPoValidAuthIndices (myProtocol->protocol_name,
            iceConn->connection_string,
            myProtocol->orig_client->auth_count,
-           myProtocol->orig_client->auth_names,
+           (const char **) myProtocol->orig_client->auth_names,
             &authCount, authIndices);
 
     }
@@ -229,7 +229,7 @@ IceProtocolSetup (
            else /* reply.type == ICE_PROTOCOL_ERROR */
            {
                /* Protocol Setup failed */
-               
+
                strncpy (errorStringRet, reply.protocol_error.error_message,
                    errorLength);
 
@@ -251,7 +251,7 @@ IceProtocolSetup (
        *minorVersionRet = versionRec->minor_version;
        *vendorRet = reply.protocol_reply.vendor;
        *releaseRet = reply.protocol_reply.release;
-       
+
 
        /*
         * Increase the reference count for the number of active protocols.
old mode 100755 (executable)
new mode 100644 (file)
index 5b67bf2..20a6ad0
@@ -34,9 +34,9 @@ Author: Ralph Mor, X Consortium
 
 int
 IceRegisterForProtocolSetup (
-       char                    *protocolName,
-       char                    *vendor,
-       char                    *release,
+       const char              *protocolName,
+       const char              *vendor,
+       const char              *release,
        int                     versionCount,
        IcePoVersionRec         *versionRecs,
        int                     authCount,
@@ -56,7 +56,7 @@ IceRegisterForProtocolSetup (
                /*
                 * We've already registered this protocol.
                 */
-               
+
                return (i);
            }
            else
@@ -64,7 +64,7 @@ IceRegisterForProtocolSetup (
                break;
            }
        }
-           
+
     if (i <= _IceLastMajorOpcode)
     {
        p = _IceProtocols[i - 1].orig_client =
@@ -131,9 +131,9 @@ IceRegisterForProtocolSetup (
 \f
 int
 IceRegisterForProtocolReply (
-       char                            *protocolName,
-       char                            *vendor,
-       char                            *release,
+       const char                      *protocolName,
+       const char                      *vendor,
+       const char                      *release,
        int                             versionCount,
        IcePaVersionRec                 *versionRecs,
        int                             authCount,
@@ -156,7 +156,7 @@ IceRegisterForProtocolReply (
                /*
                 * We've already registered this protocol.
                 */
-               
+
                return (i);
            }
            else
@@ -164,7 +164,7 @@ IceRegisterForProtocolReply (
                break;
            }
        }
-           
+
 
     if (i <= _IceLastMajorOpcode)
     {
old mode 100755 (executable)
new mode 100644 (file)
index e29f019..eb3a814
@@ -58,7 +58,7 @@ _IceAddReplyWait (
        prev = last;
        last = last->next;
     }
-       
+
     savedReplyWait = (_IceSavedReplyWait *) malloc (
        sizeof (_IceSavedReplyWait));
 
@@ -148,7 +148,7 @@ _IceCheckReplyReady (
            iceConn->saved_reply_waits = savedReplyWait->next;
        else
            prev->next = savedReplyWait->next;
-       
+
        free ((char *) savedReplyWait);
     }
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index da80e1f..14874a0
@@ -145,7 +145,7 @@ IceCloseConnection (
     IO        free-      dispatch   protocol   shutdown
     error      asap bit   level      refcount   negotiation     ACTION
     occured    set        reached 0  reached 0
-    
+
         0          0          0          0          0          N
         0          0          0          0          1          N
         0          0          0          1          0          AB
old mode 100755 (executable)
new mode 100644 (file)
index b197a50..e414e19
@@ -71,7 +71,7 @@ IceAddConnectionWatch (
     /*
      * Invoke the watch proc with any previously opened ICE connections.
      */
-     
+
     for (i = 0; i < _IceConnectionCount; i++)
     {
        _IceWatchedConnection *newWatchedConn = (_IceWatchedConnection *)