From: Boram Park Date: Tue, 21 Aug 2012 09:04:27 +0000 (+0900) Subject: upload tizen2.0 source X-Git-Tag: 2.0_alpha^0 X-Git-Url: http://review.tizen.org/git/?p=framework%2Fuifw%2Fxorg%2Flib%2Flibice.git;a=commitdiff_plain;h=2d0f4674481669fea5bde77e596532aa4308fd05 upload tizen2.0 source --- diff --git a/ChangeLog b/ChangeLog old mode 100755 new mode 100644 index 8c91b64..ba78679 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,555 @@ +commit f166e8bbf16ec214fefdcf02ce81f80442899cb7 +Author: Alan Coopersmith +Date: Fri Mar 2 19:59:50 2012 -0800 + + libICE 1.0.8 + + Signed-off-by: Alan Coopersmith + +commit c87ecd959d61ae97d8a2bd82efc761bb3e299061 +Author: Matt Dew +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 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 + +commit 8b4321a37a9fa2ad24bf87afabba6b08dcfded12 +Author: Alan Coopersmith +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 + Reviewed-by: Jeremy Huddleston + +commit caf9e3393d5d517ea129392d001a2c46a7c1f325 +Author: Alan Coopersmith +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 + Reviewed-by: Jeremy Huddleston + +commit 59c1555dff34804c78c7e7443ad13f27300927eb +Author: Alan Coopersmith +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 + Reviewed-by: Matthieu Herrb + Reviewed-by: walter + Reviewed-by: Jeremy Huddleston + +commit bec4e9c9089fa4cc5a50fc513a3544cf6fd59bf1 +Author: Alan Coopersmith +Date: Wed Nov 9 22:06:36 2011 -0800 + + Fix gcc -Wwrite-strings warnings in process.c + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit ffa659dd6dd1fb8847bfdcc5e1e2be353b6395b6 +Author: Alan Coopersmith +Date: Wed Nov 9 21:37:48 2011 -0800 + + Fix gcc -Wwrite-strings warnings in AuthNames handling + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit 902a52ea9d7b6e6f56f7023009859072854a0fc7 +Author: Alan Coopersmith +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 + Reviewed-by: Jeremy Huddleston + +commit 9ff1f97e46903f8f83363f07cf021989bfa6a9f0 +Author: Alan Coopersmith +Date: Wed Nov 9 21:43:59 2011 -0800 + + Fix gcc -Wwrite-strings warnings in _IceError* functions + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jeremy Huddleston + +commit e8a16534a9406d5096d9c0ea515d979c7c15e084 +Author: Alan Coopersmith +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 + Reviewed-by: Jeremy Huddleston + +commit 4fbcba4ee19a49c05440861e1278bc97d29048e0 +Author: Matt Dew +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 + 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 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. diff --git a/Makefile.am b/Makefile.am old mode 100755 new mode 100644 diff --git a/NEWS b/NEWS deleted file mode 100644 index e69de29..0000000 diff --git a/README b/README old mode 100755 new mode 100644 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 index 904cd67..0000000 --- a/autogen.sh +++ /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 "$@" diff --git a/configure.ac b/configure.ac old mode 100755 new mode 100644 index 172b885..ad42a56 --- a/configure.ac +++ b/configure.ac @@ -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 index 34ab4bf..0000000 --- a/debian/README.source +++ /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 index 9bd53a4..0000000 --- a/debian/changelog +++ /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 index 7ed6ff8..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/debian/control b/debian/control deleted file mode 100755 index 6be4a14..0000000 --- a/debian/control +++ /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 index 29dba2f..0000000 --- a/debian/copyright +++ /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 index 91e7591..0000000 --- a/debian/libice-dev.install +++ /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 index 5f5d14d..0000000 --- a/debian/libice6.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/libICE.so.6* diff --git a/debian/libice6.shlibs b/debian/libice6.shlibs deleted file mode 100644 index 27bb03d..0000000 --- a/debian/libice6.shlibs +++ /dev/null @@ -1 +0,0 @@ -libICE 6 libice6 (>= 1:1.0.0) diff --git a/debian/rules b/debian/rules deleted file mode 100755 index 9aac7a6..0000000 --- a/debian/rules +++ /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 index 9541a03..0000000 --- a/debian/watch +++ /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 index 5935cc9..0000000 --- a/debian/xsfbs/repack.sh +++ /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 index 5e16b10..0000000 --- a/debian/xsfbs/xsfbs.mk +++ /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 index 813fd8d..0000000 --- a/debian/xsfbs/xsfbs.sh +++ /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. diff --git a/doc/ICElib.xml b/doc/ICElib.xml old mode 100755 new mode 100644 index 27f3f0d..5837e89 --- a/doc/ICElib.xml +++ b/doc/ICElib.xml @@ -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 X Consortium Standard - X Version 11, Release 6.4 + X Version 11, Release &fullrelvers; + Version 1.0 RalphMor X Consortium - X Consortium Standard - 1993X Consortium - 1994X Consortium - 1996X Consortium - 1.0 + + 199319941996 + X Consortium + @@ -55,7 +57,7 @@ in this Software without prior written authorization from the X Consortium. - + Overview of ICE @@ -68,7 +70,7 @@ mechanisms and to be multiplexed over a single transport connection. - + The ICE Library - C Language Interface to ICE @@ -105,7 +107,7 @@ particular message. - + Intended Audience 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. - + Header Files and Library Name @@ -136,7 +138,7 @@ the header file Applications should link against ICElib using -lICE. - + Note on Prefixes @@ -159,7 +161,7 @@ responds with a - + Protocol Registration @@ -198,24 +200,23 @@ condition. -The IceRegisterForProtocolSetup +The function should be called for the client that initiates a ProtocolSetup - + int IceRegisterForProtocolSetup - char *protocol_name - char *vendor - char *release - int *version_count - int *version_count + const char *protocol_name + const char *vendor + const char *release + int version_count IcePoVersionRec *version_recs - int auth_names + int auth_count char **auth_names IcePoAuthProc *auth_procs - IceIOErrorProc *io_error_proc + IceIOErrorProc io_error_proc @@ -283,9 +284,9 @@ The list of authentication callbacks, one for each authentication method. -IceRegisterForProtocolSetup returns the major + returns the major opcode reserved or -1 if an error occurred. In order to actually activate -the protocol, the IceProtocolSetup +the protocol, the 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 ProtocolSetup For further information, see - -. + + 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 IcePoAuthProc callback, see - - + The -IceIOErrorProc + 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, - - + The -IceRegisterForProtocolReply + function should be called for the client that responds to a ProtocolSetup with a ProtocolReply - + Bool IceRegisterForProtocolReply - char *host_name + const char *protocol_name + const char *vendor + const char *release + int version_count + IcePoVersionRec *version_recs + int auth_count + const char **auth_names + IcePoAuthProc *auth_procs + IceHostBasedAuthProc host_based_auth_proc + IceProtocolSetupProc protocol_setup_proc + IceProtocolActivateProc protocol_activate_proc + IceIOErrorProc io_error_proc @@ -435,7 +445,7 @@ is sent. -IceRegisterForProtocolReply + 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. @@ -456,14 +466,13 @@ typedef struct { The -IcePaProcessMsgProc + callback is responsible for processing the set of messages that can be received by the client that accepted the ProtocolSetup For further information, see - - + 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 IcePaAuthProc, See - - + @@ -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. - + Status ProtocolSetupProc IceConn ice_conn @@ -608,7 +616,7 @@ in this callback. The pointer stored in the client_data_ret argument will be passed to the -IcePaProcessMsgProc + callback whenever a message has arrived for this protocol on the ICE connection. @@ -626,7 +634,7 @@ The ICE library will be responsible for freeing this memory. IceProtocolActivateProc callback is defined as follows: - + void ProtocolActivateProc IceConn ice_conn @@ -651,29 +659,27 @@ The client data set in the IceProtocolSetupProc callback. The -IceIOErrorProc + 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 - - + - + Callbacks for Processing Messages When an application detects that there is new data to read on an ICE connection (via select it calls the -IceProcessMessages + function - -. + When -IceProcessMessages + 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. @@ -684,7 +690,7 @@ the IcePoProcessMsgProc callback is invoked. - + void PoProcessMsgProc IceConn ice_conn @@ -746,11 +752,11 @@ a reply is ready. If the message arrives at the client that accepted the ProtocolSetup the -IcePaProcessMsgProc + callback is invoked. - + void IcePaProcessMsgProc IceConn ice_conn @@ -795,8 +801,7 @@ callback is invoked. In order to read the message, both of these callbacks should use the macros defined for this purpose (see - -.). +.). Note that byte swapping may be necessary. As a convenience, the length field in the ICE header will be swapped by ICElib if necessary. @@ -808,9 +813,9 @@ time. In the case of IcePoProcessMsgProc the client data was set in the call to -IceProtocolSetup + In the case of -IcePaProcessMsgProc + the client data was set in the IceProtocolSetupProc callback. @@ -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. The -IcePaProcessMsgProc + 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. The reason the -IcePaProcessMsgProc + callback does not have a reply_wait, like IcePoProcessMsgProc 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). - + Authentication Methods 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. - + IcePoAuthStatus IcePoAuthStatus IceConn ice_conn @@ -1051,7 +1056,7 @@ should return one of four values: is the callback invoked for the client that received the ProtocolSetup - + IcePoAuthStatus PoAuthStatus IceConn ice_conn @@ -1177,7 +1182,7 @@ The IcePaAuthProc should return one of four values: - + ICE Connections @@ -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. - + Opening an ICE Connection To open an ICE connection with another client (that is, waiting -for connections), use IceOpenConnection +for connections), use - + IceConn IceOpenConnection char *network_ids_list @@ -1261,7 +1266,7 @@ are used. -IceOpenConnection + returns an opaque ICE connection object if it succeeds; otherwise, it returns NULL. @@ -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: - - - - - + + + + + - - tcp/<hostname>:<portnumber> - or + tcp/<hostname>:<portnumber> + or - - decnet/<hostname>::<objname> - or + decnet/<hostname>::<objname> + or - - local/<hostname>:<path> - + local/<hostname>:<path> + @@ -1301,9 +1303,9 @@ Each network ID has the following format: Most protocol libraries will have some sort of open function that should internally make a call into -IceOpenConnection + When -IceOpenConnection + 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. @@ -1330,40 +1332,40 @@ Appendix A). After -IceOpenConnection + is called, the client is ready to send a ProtocolSetup (provided that -IceRegisterForProtocolSetup + was called) or receive a ProtocolSetup (provided that -IceRegisterForProtocolReply + was called). - + Listening for ICE Connections Clients wishing to accept ICE connections must first call -IceListenForConnections + or -IceListenForWellKnownConnections + 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). Normally clients will let ICElib allocate an available name in each transport and return listen objects. Such a client will then use -IceComposeNetworkIdList + 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 -IceListenForWellKnownConnections + to specify the names for the listen objects. - + Status IceListenForConnections int *count_ret @@ -1400,10 +1402,10 @@ No more than error_length bytes are used. The return value of -IceListenForConnections + is zero for failure and a positive value for success. - + Status IceListenForWellKnownConnections char *port_id @@ -1467,27 +1469,27 @@ points to user supplied memory. No more than error_length bytes are used. -IceListenForWellKnownConnections constructs a list + 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 -IceListenForWellKnownConnections + returns failure. -The return value of IceListenForWellKnownConnections +The return value of is zero for failure and a positive value for success. To close and free the listen objects, use -IceFreeListenObjs + - + void IceFreeListenObjs int count @@ -1519,10 +1521,10 @@ the listen object. To obtain the descriptor, use -IceGetListenConnectionNumber + - + int IceGetListenConnectionNumber IceListenObj *listen_objs @@ -1540,11 +1542,11 @@ To obtain the descriptor, use To obtain the network ID string associated with a listen object, use -IceGetListenConnectionString + - + char IceGetListenConnectionString IceListenObj listen_obj @@ -1562,26 +1564,23 @@ To obtain the network ID string associated with a listen object, use A network ID has the following format: - - - - - + + + + + - - tcp/<hostname>:<portnumber> - or + tcp/<hostname>:<portnumber> + or - - decnet/<hostname>::<objname> - or + decnet/<hostname>::<objname> + or - - local/<hostname>:<path> - + local/<hostname>:<path> + @@ -1589,11 +1588,11 @@ To obtain the network ID string associated with a listen object, use To compose a string containing a list of network IDs separated by commas -(the format recognized by IceOpenConnection -use IceComposeNetworkIdList +(the format recognized by +use - + char IceComposeNetworkIdList int count @@ -1618,7 +1617,7 @@ use IceComposeNetworkIdList - + Host Based Authentication for ICE Connections @@ -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 -IceSetHostBasedAuthProc + function. - + void IceSetHostBasedAuthProc IceListenObj listen_obj @@ -1662,7 +1661,7 @@ host based authentication if it was previously set. - + Bool HostBasedAuthProc char *host_name @@ -1702,25 +1701,24 @@ which always returns True Host based authentication is also allowed at ProtocolSetup time. The callback is specified in the -IceRegisterForProtocolReply + function (see - -). +). - + Accepting ICE Connections After a connection attempt is detected on a listen object returned by -IceListenForConnections -you should call IceAcceptConnection + +you should call This returns a new opaque ICE connection object. - + IceConn IceAcceptConnection IceListenObj listen_obj @@ -1768,9 +1766,9 @@ and the function returns a new connection object. select on the file descriptors associated with the listen objects. When a new connection is detected, the -IceAcceptConnection + function should be called. -IceAcceptConnection + 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 After -IceAcceptConnection + is called and the connection has been validated, the client is ready to receive a ProtocolSetup (provided that -IceRegisterForProtocolReply + was called) or send a ProtocolSetup (provided that -IceRegisterForProtocolSetup + was called). - + Closing ICE Connections To close an ICE connection created with -IceOpenConnection + or -IceAcceptConnection + use -IceCloseConnection + - + IceCloseStatus IceCloseConnection IceConn ice_conn @@ -1878,17 +1876,17 @@ must be met: The open reference count must have reached zero on this ICE connection. When -IceOpenConnection + 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 -IceOpenConnection + must be matched with a call to -IceCloseConnection + The connection can be closed only on the last call to -IceCloseConnection + The active protocol count 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 -IceProtocolShutdown + function should be called, which decrements the active protocol count by one (see - -). +). 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. -IceCloseConnection + returns one of the following values: @@ -1918,12 +1915,12 @@ invoked and the connection was freed. IceClosedASAP - an IO error had occurred on the connection, but -IceCloseConnection + is being called within a nested -IceProcessMessages + 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 -IceProcessMessages + returns a status of IceProcessMessagesConnectionClosed @@ -1937,7 +1934,7 @@ other active protocols. - 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, -IceProcessMessages + will return a status of IceProcessMessagesConnectionClosed @@ -1945,12 +1942,12 @@ will return a status of When it is known that the client on the other side of the ICE connection has terminated the connection without initiating shutdown negotiation, the -IceSetShutdownNegotiation + function should be called to turn off shutdown negotiation. This will prevent -IceCloseConnection + from writing to a broken connection. - + void IceSetShutdownNegotiation IceConn ice_conn @@ -1976,9 +1973,9 @@ shutdown negotiating will be turned off. To check the shutdown negotiation status of an ICE connection, use -IceCheckShutdownNegotiation + - + Bool IceCheckShutdownNegotiation IceConn ice_conn @@ -1995,7 +1992,7 @@ shutdown negotiating will be turned off. -IceCheckShutdownNegotiation + returns True if shutdown negotiation will take place on the connection; @@ -2003,24 +2000,24 @@ otherwise, it returns False Negotiation is on by default for a connection. It can only be changed with the -IceSetShutdownNegotiation + function. - + Connection Watch Procedures To add a watch procedure that will be called each time ICElib opens a new connection via -IceOpenConnection + or -IceAcceptConnection + or closes a connection via -IceCloseConnection + use -IceAddConnectionWatch + - + Status IceAddConnectionWatch IceWatchProc watch_proc @@ -2047,16 +2044,16 @@ The watch procedure to invoke when ICElib opens or closes a connection. -The return value of IceAddConnectionWatch +The return value of is zero for failure, and a positive value for success. -Note that several calls to IceOpenConnection +Note that several calls to 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 IceCloseConnection +watch procedure is called only if actually closes the connection (right before the IceConn is freed). @@ -2085,7 +2082,7 @@ set to True The watch procedure is of type IceWatchProc - + void WatchProc IceConn ice_conn @@ -2111,7 +2108,7 @@ to get the file descriptor associated with this connection. Client data specified in the call to -IceAddConnectionWatch + @@ -2141,10 +2138,10 @@ is closed and the watch procedure is invoked again with opening set to To remove a watch procedure, use -IceRemoveConnectionWatch + - + void IceRemoveConnectionWatch IceWatchProc watch_proc @@ -2158,7 +2155,7 @@ To remove a watch procedure, use The watch procedure that was passed to -IceAddConnectionWatch + @@ -2167,7 +2164,7 @@ The watch procedure that was passed to The client_data pointer that was passed to -IceAddConnectionWatch + @@ -2176,15 +2173,15 @@ The client_data pointer that was passed to - + Protocol Setup and Shutdown To activate a protocol on a given ICE connection, use -IceProtocolSetup + - + IceProtocolSetupStatus IceProtocolSetup IceConn ice_conn @@ -2212,7 +2209,7 @@ To activate a protocol on a given ICE connection, use The major opcode of the protocol to be set up, as returned by -IceRegisterForProtocolSetup + @@ -2284,7 +2281,7 @@ The vendor_ret and release_ret strings should be freed with -IceProtocolSetup returns one of the following values: + returns one of the following values: @@ -2314,10 +2311,10 @@ are not set. To notify the ICE library when a given protocol will no longer be used -on an ICE connection, use IceProtocolShutdown +on an ICE connection, use - + Status IceProtocolShutdown IceConn ice_conn @@ -2342,7 +2339,7 @@ on an ICE connection, use IceProtocolShutdown -The return value of IceProtocolShutdown +The return value of is zero for failure and a positive value for success. @@ -2355,14 +2352,14 @@ protocol shutdown. - + Processing Messages To process incoming messages on an ICE connection, use -IceProcessMessages + - + IceProcessMessagesStatus IceProcessMessages IceConn ice_conn @@ -2395,19 +2392,19 @@ If set to True on return, a reply is ready. -IceProcessMessages is used in two ways: + is used in two ways: In the first, a client may generate a message and block by calling -IceProcessMessages repeatedly until it gets its reply. + repeatedly until it gets its reply. -In the second, a client calls IceProcessMessages +In the second, a client calls with reply_wait set to NULL in response to select 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 { If reply_wait is not NULL and -IceProcessMessages + 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 True @@ -2463,7 +2460,7 @@ this pointer. -IceProcessMessages returns one of the following values: + returns one of the following values: @@ -2476,7 +2473,7 @@ this pointer. IceProcessMessagesIOError - an IO error occurred, and the caller must explicitly close the connection by calling -IceCloseConnection + @@ -2484,7 +2481,7 @@ and the caller must explicitly close the connection by calling IceProcessMessagesConnectionClosed - the ICE connection has been closed (closing of the connection was deferred because of shutdown negotiation, or because the -IceProcessMessages + nesting level was not zero). Do not attempt to access the ICE connection at this point, since it has been freed. @@ -2493,15 +2490,15 @@ to access the ICE connection at this point, since it has been freed. - + Ping To send a "Ping" message to the client on the other side of the -ICE connection, use IcePing +ICE connection, use - + Status IcePing IceConn ice_conn @@ -2527,7 +2524,7 @@ ICE connection, use IcePing client_data -This pointer will be passed to the IcePingReplyProc +This pointer will be passed to the IcePingReplyProc callback. @@ -2535,16 +2532,16 @@ callback. -IcePing + returns zero for failure and a positive value for success. When -IceProcessMessages + processes the Ping reply, it will invoke the -IcePingReplyProc +IcePingReplyProc callback. - + void PingReplyProc IceConn ice_conn @@ -2563,24 +2560,24 @@ callback. client_data The client data specified in the call to -IcePing + - + Using ICElib Informational Functions - + IceConnectStatus IceConnectionStatus IceConn ice_conn -IceConnectionStatus + returns the status of an ICE connection. The possible return values are: @@ -2588,19 +2585,19 @@ returns the status of an ICE connection. The possible return values are: IceConnectPending - the connection is not valid yet (that is, authentication is taking place). This is only relevant to connections created by -IceAcceptConnection + IceConnectAccepted - the connection has been accepted. This is only relevant to connections created by -IceAcceptConnection + IceConnectRejected - the connection had been rejected (that is, authentication failed). This is only relevant to connections created by -IceAcceptConnection + IceConnectIOError @@ -2608,7 +2605,7 @@ This is only relevant to connections created by - + char *IceVendor IceConn ice_conn @@ -2622,7 +2619,7 @@ The string should be freed with a call to free when no longer needed. - + char *IceRelease IceConn ice_conn @@ -2636,17 +2633,17 @@ The string should be freed with a call to free when no longer needed. - + int IceProtocolVersion IceConn ice_conn -IceProtocolVersion + returns the major version of the ICE protocol on this connection. - + int IceProtocolRevision IceConn ice_conn @@ -2654,7 +2651,7 @@ returns the major version of the ICE protocol on this connection. -IceProtocolRevision + returns the minor version of the ICE protocol on this connection. @@ -2668,7 +2665,7 @@ returns the minor version of the ICE protocol on this connection. IceConnectionNumber returns the file descriptor of this ICE connection. - + char *IceConnectionString IceConn ice_conn @@ -2681,7 +2678,7 @@ accepted this connection. The string should be freed with a call to free when no longer needed. - + unsigned long IceLastSentSequenceNumber IceConn ice_conn @@ -2689,7 +2686,7 @@ when no longer needed. -IceLastSentSequenceNumber + returns the sequence number of the last message sent on this ICE connection. @@ -2703,7 +2700,7 @@ returns the sequence number of the last message sent on this ICE connection. - + Bool IceSwapping IceConn ice_conn @@ -2711,24 +2708,24 @@ ICE connection. -IceSwapping + returns True if byte swapping is necessary when reading messages on the ICE connection. - + IcePointer IceGetContext IceConn ice_conn -IceGetContext + returns the context associated with a connection created by -IceOpenConnection + - + ICE Messages @@ -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. - + Sending ICE Messages @@ -2761,17 +2758,16 @@ together and flush the output buffer at appropriate times. If an IO error has occurred on an ICE connection, all write operations will be ignored. For further information, see - -. +. To get the size of the ICE output buffer, use -IceGetOutBufSize + - + int IceGetOutBufSize IceConn ice_conn @@ -2789,10 +2785,10 @@ To get the size of the ICE output buffer, use -To flush the ICE output buffer, use IceFlush +To flush the ICE output buffer, use - + int IceFlush IceConn ice_conn @@ -2815,7 +2811,7 @@ insufficient space to generate a message. The following macros can be used to generate ICE messages: - + IceGetHeader IceConn ice_conn @@ -2870,7 +2866,7 @@ library can store data in the message header. -IceGetHeader + 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. - + IceGetHeaderExtra IceConn ice_conn @@ -2955,13 +2951,13 @@ in the ICE output buffer, pdata is set to NULL. -IceGetHeaderExtra + 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. - + IceSimpleMessage IceConn ice_conn @@ -2992,12 +2988,12 @@ buffer. -IceSimpleMessage + is used to generate a message that is identical in size to the ICE header message, and has no additional data. - + IceErrorHeader IceConn ice_conn @@ -3067,7 +3063,7 @@ Length of data (in 8-byte units) to be written after the header. -IceErrorHeader sets up an error message header. + sets up an error message header. @@ -3084,26 +3080,27 @@ See the Inter-Client Exchange Protocol standard for more details. - - - - + + + + + - IceBadMinor - 0x8000 + IceBadMinor + 0x8000 - IceBadState - 0x8001 + IceBadState + 0x8001 - IceBadLength - 0x8002 + IceBadLength + 0x8002 - IceBadValue - 0x8003 + IceBadValue + 0x8003 @@ -3113,18 +3110,18 @@ standard for more details. To write data to an ICE connection, use the -IceWriteData macro. If the data fits into the + 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. This macro is used in conjunction with -IceGetHeader and -IceErrorHeader + and + - + IceWriteData IceConn ice_conn @@ -3156,10 +3153,10 @@ This macro is used in conjunction with -To write data as 16-bit quantities, use IceWriteData16 +To write data as 16-bit quantities, use - + IceWriteData16 IceConn ice_conn @@ -3190,11 +3187,11 @@ To write data as 16-bit quantities, use IceWriteData16 -To write data as 32-bit quantities, use IceWriteData32 +To write data as 32-bit quantities, use - + IceWriteData32 IceConn ice_conn @@ -3225,16 +3222,16 @@ To write data as 32-bit quantities, use IceWriteData32 -To write data as 32-bit quantities, use IceWriteData32 +To write data as 32-bit quantities, use To bypass copying data to the ICE output buffer, use -IceSendData to directly send data over the network + to directly send data over the network connection. If necessary, the ICE output buffer is first flushed. - + IceSendData IceConn ice_conn @@ -3266,11 +3263,11 @@ connection. If necessary, the ICE output buffer is first flushed. -To force 32-bit or 64-bit alignment, use IceWritePad +To force 32-bit or 64-bit alignment, use A maximum of 7 pad bytes can be specified. - + IceWritePad IceConn ice_conn @@ -3302,7 +3299,7 @@ A maximum of 7 pad bytes can be specified. - + Reading ICE Messages @@ -3319,10 +3316,10 @@ the data is not already present in the input buffer. To get the size of the ICE input buffer, use -IceGetInBufSize + - + int IceGetInBufSize IceConn ice_conn @@ -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 IceValidIO +messages, the 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 - -. +. - + Bool IceValidIO IceConn ice_conn @@ -3369,7 +3365,7 @@ read operations will be ignored. For further information, see The following macros can be used to read ICE messages. - + IceReadSimpleMessage IceConn ice_conn @@ -3399,11 +3395,11 @@ read operations will be ignored. For further information, see -IceReadSimpleMessage + 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. IceReadSimpleMessage +opcode of the message. simply returns a pointer to these 8 bytes; it does not actually read any data into the input buffer. @@ -3411,16 +3407,16 @@ into the input buffer. 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 IceReadCompleteMessage +pass using 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 -IceReadMessageHeader and -IceReadData + and + - + IceReadCompleteMessage IceConn ice_conn @@ -3467,7 +3463,7 @@ This pointer is set to the variable length data of the message. If the ICE input buffer has sufficient space, -IceReadCompleteMessage + 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. -After calling IceReadCompleteMessage -and processing the message, IceDisposeCompleteMessage +After calling +and processing the message, should be called. - + IceDisposeCompleteMessage IceConn ice_conn @@ -3502,7 +3498,7 @@ should be called. The pointer to the variable length data returned in -IceReadCompleteMessage + @@ -3514,7 +3510,7 @@ it did not fit in the ICE input buffer), it is freed here by ICElib. - + IceReadMessageHeader IceConn ice_conn @@ -3551,9 +3547,9 @@ it did not fit in the ICE input buffer), it is freed here by ICElib. -IceReadMessageHeader reads just the message header. + reads just the message header. The rest of the data should be read with the -IceReadData + family of macros. This method of reading a message should be used when the variable length data must be read in chunks. @@ -3561,10 +3557,10 @@ variable length data must be read in chunks. To read data directly into a user supplied buffer, use -IceReadData + - + IceReadData IceConn ice_conn @@ -3596,10 +3592,10 @@ To read data directly into a user supplied buffer, use -To read data as 16-bit quantities, use IceReadData16 +To read data as 16-bit quantities, use - + IceReadData16 IceConn ice_conn @@ -3640,10 +3636,10 @@ If True, the values will be byte swapped. -To read data as 32-bit quantities, use IceReadData32 +To read data as 32-bit quantities, use - + IceReadData32 IceConn ice_conn @@ -3683,10 +3679,10 @@ If True, the values will be byte swapped. To force 32-bit or 64-bit alignment, use -IceReadPad + A maximum of 7 pad bytes can be specified. - + IceReadPad IceConn ice_conn @@ -3712,7 +3708,7 @@ A maximum of 7 pad bytes can be specified. - + Error Handling @@ -3737,10 +3733,10 @@ prefer your own error handling and can be changed as often as you like. -To set the ICE error handler, use IceSetErrorHandler +To set the ICE error handler, use - + IceSetErrorHandler IceConn ice_conn @@ -3760,7 +3756,7 @@ The ICE error handler. You should pass NULL to restore the default handler. -IceSetErrorHandler returns the previous error handler. + returns the previous error handler. @@ -3781,10 +3777,10 @@ should have their own error handlers). -An ICE error handler has the type of IceErrorHandler +An ICE error handler has the type of - + void IceErrorHandler IceConn ice_conn @@ -3875,11 +3871,11 @@ the Inter-Client Exchange Protocol standard. -To handle fatal I/O errors, use IceSetIOErrorHandler +To handle fatal I/O errors, use - + IceIOErrorHandler IceSetIOErrorHandler IceIOErrorHandler handler @@ -3898,16 +3894,16 @@ The I/O error handler. You should pass NULL to restore the default handler. -IceSetIOErrorHandler returns the previous + returns the previous IO error handler. An ICE I/O error handler has the type of -IceIOErrorHandler + - + void IceIOErrorHandler IceConn ice_conn @@ -3929,20 +3925,20 @@ An ICE I/O error handler has the type of 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 -IceCloseConnection + The ICE connection is given a "bad IO" status, and all future reads and writes to the connection are ignored. The next time -IceProcessMessages + is called it will return a status of IceProcessMessagesIOError At that time, the application should call -IceCloseConnection + In the second, the IO error handler does call -IceCloseConnection + and then uses the longjmp call to get back to the application's main event loop. The setjmp and @@ -3957,15 +3953,15 @@ Therefore, this second model is less desirable. Before the application I/O error handler is invoked, protocol libraries that were interested in being notified of I/O errors will have their -IceIOErrorProc + handlers invoked. This handler is set up in the protocol registration -functions (see IceRegisterForProtocolSetup and -IceRegisterForProtocolReply +functions (see and + and could be used to clean up state specific to the protocol. - + void IceIOErrorProc IceConn ice_conn @@ -3980,14 +3976,14 @@ and could be used to clean up state specific to the protocol. -Note that every IceIOErrorProc +Note that every 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. - + Multi-Threading Support @@ -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: - + void IceLockConn IceConn ice_conn - + void IceUnlockConn IceConn ice_conn @@ -4039,11 +4035,11 @@ macros, are provided: To keep an ICE connection locked across several ICElib calls, applications use -IceAppLockConn + and -IceAppUnlockConn + - + void IceAppLockConn IceConn ice_conn @@ -4059,18 +4055,18 @@ and The -IceAppLockConn + function completely locks out other threads using the connection until -IceAppUnlockConn + is called. Other threads attempting to use ICElib calls on the connection will block. If the program has not previously called IceInitThreads -IceAppLockConn + has no effect. - + void IceAppUnlockConn IceConn ice_conn @@ -4085,17 +4081,17 @@ has no effect. The -IceAppUnlockConn + function allows other threads to complete ICElib calls on the connection that were blocked by a previous call to -IceAppLockConn + from this thread. If the program has not previously called IceInitThreads -IceAppUnlockConn + has no effect. - + Miscellaneous Functions @@ -4110,7 +4106,7 @@ The contents of the scratch space is not guaranteed to be preserved after any ICElib function is called. - + char *IceAllocScratch IceConn ice_conn @@ -4135,7 +4131,7 @@ should not be freed by the caller. The ICE library will free the memory when the ICE connection is closed. - + Acknowledgements @@ -4235,26 +4231,23 @@ authentication (for example, the network ID of a session manager). A network ID has the following form: - - - - - + + + + + - - tcp/<hostname>:<portnumber> - or + tcp/<hostname>:<portnumber> + or - - decnet/<hostname>::<objname> - or + decnet/<hostname>::<objname> + or - - local/<hostname>:<path> - + local/<hostname>:<path> + @@ -4284,13 +4277,13 @@ This name is statically allocated and should not be freed. To synchronously update the authorization file, the file must be locked with a call to -IceLockAuthFile + This function takes advantage of the fact that the link system call will fail if the name of the new link already exists. - + int IceLockAuthFile char *file_name @@ -4352,10 +4345,10 @@ retries failed. -To unlock an authorization file, use IceUnlockAuthFile +To unlock an authorization file, use - + int IceUnlockAuthFile char *file_name @@ -4374,7 +4367,7 @@ To read the next entry in an authorization file, use IceReadAuthFileEntry - + IceAuthFileEntry *IceReadAuthFileEntry FILE *auth_file @@ -4396,15 +4389,15 @@ or there are no more entries to read, NULL is returned. Entries should be free with a call to -IceFreeAuthFileEntry + To write an entry in an authorization file, use -IceWriteAuthFileEntry + - + Status IceWriteAuthFileEntry FILE *auth_file @@ -4436,12 +4429,12 @@ protocol_name/network_id/auth_name tuple, use IceGetAuthFileEntry - + IceAuthFileEntry *IceGetAuthFileEntry - char *protocol_name - char *network_id - char *auth_name + const char *protocol_name + const char *network_id + const char *auth_name @@ -4474,10 +4467,10 @@ fails to find such an entry, NULL is returned. To free an entry returned by IceReadAuthFileEntry or IceGetAuthFileEntry use -IceFreeAuthFileEntry + - + void IceFreeAuthFileEntry IceAuthFileEntry *entry @@ -4511,13 +4504,13 @@ magic cookie in the user's .ICEauthority file on a remote machine. In addition to storing the magic cookie in the .ICEauthority file, the application needs to call the -IceSetPaAuthData + 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. - + char *IceGenerateMagicCookie int length @@ -4539,12 +4532,12 @@ Otherwise, the magic cookie should be freed with a call to To store the authentication data in memory, use -IceSetPaAuthData + Currently, this function is only used for MIT-MAGIC-COOKIE-1 authentication, but it may be used for additional authentication methods in the future. - + void IceSetPaAuthData int num_entries diff --git a/doc/Makefile.am b/doc/Makefile.am old mode 100755 new mode 100644 index 23ed84a..3d1b0ba --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -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 index 0000000..bba4d54 --- /dev/null +++ b/docbook.am @@ -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) diff --git a/include/X11/ICE/ICE.h b/include/X11/ICE/ICE.h old mode 100755 new mode 100644 diff --git a/include/X11/ICE/ICEconn.h b/include/X11/ICE/ICEconn.h old mode 100755 new mode 100644 index f169b6c..e5d493a --- a/include/X11/ICE/ICEconn.h +++ b/include/X11/ICE/ICEconn.h @@ -32,7 +32,7 @@ Author: Ralph Mor, X Consortium #include /* - * Data structures for ICE connection object + * Data structures for ICE connection object */ typedef struct _IceSavedReplyWait { diff --git a/include/X11/ICE/ICElib.h b/include/X11/ICE/ICElib.h old mode 100755 new mode 100644 index ba42119..402cbc8 --- a/include/X11/ICE/ICElib.h +++ b/include/X11/ICE/ICElib.h @@ -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 */, diff --git a/include/X11/ICE/ICEmsg.h b/include/X11/ICE/ICEmsg.h old mode 100755 new mode 100644 index 6a60f1c..8ca3e5f --- a/include/X11/ICE/ICEmsg.h +++ b/include/X11/ICE/ICEmsg.h @@ -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 \ diff --git a/include/X11/ICE/ICEproto.h b/include/X11/ICE/ICEproto.h old mode 100755 new mode 100644 diff --git a/include/X11/ICE/ICEutil.h b/include/X11/ICE/ICEutil.h old mode 100755 new mode 100644 index 2852931..9c6b12f --- a/include/X11/ICE/ICEutil.h +++ b/include/X11/ICE/ICEutil.h @@ -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 ( diff --git a/packaging/libICE.spec b/packaging/libICE.spec index c893baf..7fadb81 100644 --- a/packaging/libICE.spec +++ b/packaging/libICE.spec @@ -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 - diff --git a/specs/Makefile.am b/specs/Makefile.am old mode 100755 new mode 100644 index 4b7bef5..2937cb7 --- a/specs/Makefile.am +++ b/specs/Makefile.am @@ -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 diff --git a/specs/ice.xml b/specs/ice.xml old mode 100755 new mode 100644 index 64e24ca..439c2f6 --- a/specs/ice.xml +++ b/specs/ice.xml @@ -1,6 +1,9 @@ - + %defs; +]> @@ -9,33 +12,33 @@ Inter-Client Exchange (ICE) Protocol X Consortium Standard - X Version 11, Release 6.4 + X Version 11, Release &fullrelvers; RobertScheifler + X Consortium JordanBrown Quarterdeck Office Systems - X Consortium Standard - 1993X Consortium - 1994X Consortium - Version 1.0 - X Consortium - X Version 11, Release 7 + Version 1.1 + + 19931994 + X Consortium + 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 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 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. +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. 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. -X Window System is a trademark of X Consortium, Inc. +X Window System is a trademark of The Open Group. @@ -50,7 +53,7 @@ allows the sharing of many aspects of the implementation. - + Purpose and Goals @@ -85,7 +88,7 @@ allow them to share the same transport layer connection. - + Overview of the Protocol @@ -216,7 +219,7 @@ from party A. - + Data Types ICE messages contain several types of data. Byte order is negotiated in @@ -233,41 +236,42 @@ to pad E bytes to the next multiple of pad(E, b) = (b - (E mod b)) mod b - + Primitive Types - - - - + + + + + - - Type Name - Description + + Type Name + Description - CARD8 - 8-bit unsigned integer + CARD8 + 8-bit unsigned integer - CARD16 - 16-bit unsigned integer + CARD16 + 16-bit unsigned integer - CARD32 - 32-bit unsigned integer + CARD32 + 32-bit unsigned integer - BOOL - False + BOOL + False or True - LPCE - A character from the X Portable Character Set in Latin Portable Character + LPCE + A character from the X Portable Character Set in Latin Portable Character Encoding @@ -276,31 +280,28 @@ Encoding - + Complex Types - - - - + + + + + - - Type Name - Type - - - .TH - + + Type Name + Type - VERSION - [Major, minor: CARD16] + VERSION + [Major, minor: CARD16] - STRING - LISTofLPCE + STRING + LISTofLPCE @@ -312,33 +313,34 @@ varies depending on the context; see the encoding section. - + Message Format All ICE messages include the following information: - - - - + + + + + - + Field Type Description - CARD8 - protocol major opcode + CARD8 + protocol major opcode - CARD8 - protocol minor opcode + CARD8 + protocol minor opcode - CARD32 - length of remaining data in 8-byte units + CARD32 + length of remaining data in 8-byte units @@ -387,7 +389,7 @@ error. - + Overall Protocol Description @@ -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 - - and - -. + + . The class defines the generic class of error. Classes are specified separately for each protocol (numeric @@ -474,7 +474,7 @@ for the protocol. - + ICE Control Subprotocol -- Major Opcode 0 @@ -1073,7 +1073,7 @@ connection. Either party may again initiate WantToClose at some future time. - + Generic Error Classes @@ -1205,7 +1205,7 @@ CARD32 Length of offending value. - + ICE Error Classes These errors are all major opcode 0 errors. @@ -1497,7 +1497,7 @@ existing registration. - + State Diagrams @@ -1637,7 +1637,7 @@ Here are the state transitions for shutting down the connection: connection close -> quit - + Protocol Encoding @@ -1660,41 +1660,42 @@ additional padding. The number of repetitions must be specified elsewhere in the message. - + Primitives - - - - - + + + + + + - - Type Name - Length (bytes) - Description + + Type Name + Length (bytes) + Description - CARD8 - 1 - 8-bit unsigned integer + CARD8 + 1 + 8-bit unsigned integer - CARD16 - 2 - 16-bit unsigned integer + CARD16 + 2 + 16-bit unsigned integer - CARD32 - 4 - 32-bit unsigned integer + CARD32 + 4 + 32-bit unsigned integer - LPCE - 1 - A character from the X Portable Character Set in Latin Portable Character + LPCE + 1 + A character from the X Portable Character Set in Latin Portable Character Encoding @@ -1703,32 +1704,33 @@ Encoding - + Enumerations - - - - - + + + + + + - - Type Name - Value - Description + + Type Name + Value + Description - BOOL - 0 - False + BOOL + 0 + False - - 1 - True + + 1 + True @@ -1736,65 +1738,66 @@ Encoding - + Compound Types - - - - - - + + + + + + + - - Type Name - Length (bytes) - Type - Description + + Type Name + Length (bytes) + Type + Description - VERSION - - - + VERSION + + + - - 2 - CARD16 - Major version number + + 2 + CARD16 + Major version number - - 2 - CARD16 - Minor version number + + 2 + CARD16 + Minor version number - STRING - - - + STRING + + + - - 2 - CARD16 - length of string in bytes + + 2 + CARD16 + length of string in bytes - - n - LISTofLPCE - string + + n + LISTofLPCE + string - - p - - unused, p = pad(n+2, 4) + + p + + unused, p = pad(n+2, 4) @@ -1802,71 +1805,71 @@ Encoding - + ICE Minor opcodes - - - - + + + + - - Message Name - Encoding + + Message Name + Encoding - Error - 0 + Error + 0 - ByteOrder - 1 + ByteOrder + 1 - ConnectionSetup - 2 + ConnectionSetup + 2 - AuthenticationRequired - 3 + AuthenticationRequired + 3 - AuthenticationReply - 4 + AuthenticationReply + 4 - AuthenticationNextPhase - 5 + AuthenticationNextPhase + 5 - ConnectionReply - 6 + ConnectionReply + 6 - ProtocolSetup - 7 + ProtocolSetup + 7 - ProtocolReply - 8 + ProtocolReply + 8 - Ping - 9 + Ping + 9 - PingReply - 10 + PingReply + 10 - WantToClose - 11 + WantToClose + 11 - NoClose - 12 + NoClose + 12 @@ -1874,7 +1877,7 @@ Encoding - + Message Encoding @@ -2035,7 +2038,7 @@ Encoding - + Error Class Encoding @@ -2043,90 +2046,92 @@ Generic errors have classes in the range 0x8000-0xFFFF, and subprotocol-specific errors are in the range 0x0000-0x7FFF. - + Generic Error Class Encoding - - - - + + + + + - - Class - Encoding + + Class + Encoding - BadMinor - 0x8000 + BadMinor + 0x8000 - BadState - 0x8001 + BadState + 0x8001 - BadLength - 0x8002 + BadLength + 0x8002 - BadValue - 0x8003 + BadValue + 0x8003 - + ICE-specific Error Class Encoding - - - - + + + + + - - Class - Encoding + + Class + Encoding - BadMajor - 0 + BadMajor + 0 - NoAuthentication - 1 + NoAuthentication + 1 - NoVersion - 2 + NoVersion + 2 - SetupFailed - 3 + SetupFailed + 3 - AuthenticationRejected - 4 + AuthenticationRejected + 4 - AuthenticationFailed - 5 + AuthenticationFailed + 5 - ProtocolDuplicate - 6 + ProtocolDuplicate + 6 - MajorOpcodeDuplicate - 7 + MajorOpcodeDuplicate + 7 - UnknownProtocol - 8 + UnknownProtocol + 8 @@ -2140,7 +2145,7 @@ subprotocol-specific errors are in the range 0x0000-0x7FFF. Modification History - + Release 6 to Release 6.1 Release 6.1 added the ICE X rendezvous protocol (Appendix B) and @@ -2148,7 +2153,7 @@ updated the document version to 1.1. - + Release 6.1 to Release 6.3 Release 6.3 added the listen on well known ports feature. @@ -2158,7 +2163,7 @@ updated the document version to 1.1. ICE X Rendezvous Protocol - + Introduction The ICE X rendezvous protocol is designed to answer the need posed @@ -2169,7 +2174,7 @@ connections to the same X server. - + Overview of ICE X Rendezvous @@ -2188,7 +2193,7 @@ with the ICE answering party. - + Registering Known Protocols @@ -2217,7 +2222,7 @@ or remove the ICE_PROTOCOLS property entirely. - + Initiating the Rendezvous @@ -2245,28 +2250,29 @@ name of the ICE answering party's choosing. The format for this text property is as follows: - - - - + + + + + - - Field - Value + + Field + Value - type - XA_STRING + type + XA_STRING - format - 8 + format + 8 - value - comma-separated list of ICE network IDs + value + comma-separated list of ICE network IDs @@ -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. - - - - + + + + + - - Field - Value + + Field + Value - message_type - Atom = "ICE_PROTOCOLS" + message_type + Atom = "ICE_PROTOCOLS" - format - 32 + format + 32 - data.l[0] - Atom identifying the ICE subprotocol to speak + data.l[0] + Atom identifying the ICE subprotocol to speak - data.l[1] - Timestamp + data.l[1] + Timestamp - data.l[2] - ICE answering party's window ID with + data.l[2] + ICE answering party's window ID with ICE network IDs text property - data.l[3] - Atom naming text property containing the ICE + data.l[3] + Atom naming text property containing the ICE answering party's ICE network IDs - data.l[4] - Reserved. Must be 0. + data.l[4] + Reserved. Must be 0. @@ -2357,45 +2364,46 @@ event to the window specified in data.l[2]. This return event has the following format: - - - - + + + + + - - Field - Value + + Field + Value - message_type - Atom = "ICE_INITIATE_FAILED" + message_type + Atom = "ICE_INITIATE_FAILED" - format - 32 + format + 32 - data.l[0] - Atom identifying the ICE subprotocol requested + data.l[0] + Atom identifying the ICE subprotocol requested - data.l[1] - Timestamp + data.l[1] + Timestamp - data.l[2] - Initiating party's window ID + data.l[2] + Initiating party's window ID (holding ICE_PROTOCOLS) - data.l[3] - int: reason for failure + data.l[3] + int: reason for failure - data.l[4] - Reserved, must be 0 + data.l[4] + Reserved, must be 0 @@ -2418,23 +2426,23 @@ client message event was sent. - - - - - + + + + + - - Value - Encoding - Description + + Value + Encoding + Description - OpenFailed - 1 - + OpenFailed + 1 + 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. - AuthenticationFailed - 2 - Authentication or authorization of the + AuthenticationFailed + 2 + 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. - SetupFailed - 3 - The client was unable to initiate the specified + SetupFailed + 3 + The client was unable to initiate the specified protocol on the connection (e.g. a call to IceProtocolSetup() failed). - UnknownProtocol - 4 - The client does not recognize the requested + UnknownProtocol + 4 + The client does not recognize the requested protocol. (This represents a semantic error on the part of the answering party.) - Refused - 5 - + Refused + 5 + The client was in the process of removing ICE_INITIATE_pname from its ICE_PROTOCOLS list @@ -2535,7 +2543,7 @@ for ICE subprotocol pname. - + ICE Subprotocol Versioning diff --git a/src/ICElibint.h b/src/ICElibint.h old mode 100755 new mode 100644 index 3df59d6..0638fb0 --- a/src/ICElibint.h +++ b/src/ICElibint.h @@ -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 */ ); diff --git a/src/Makefile.am b/src/Makefile.am old mode 100755 new mode 100644 index a5dd7d4..3cbe9c6 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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 \ diff --git a/src/accept.c b/src/accept.c old mode 100755 new mode 100644 diff --git a/src/authutil.c b/src/authutil.c old mode 100755 new mode 100644 index fd0a77d..6c00482 --- a/src/authutil.c +++ b/src/authutil.c @@ -171,7 +171,7 @@ IceLockAuthFile ( unlink (link_name); } } - + while (retries > 0) { if (creat_fd == -1) @@ -338,9 +338,9 @@ IceWriteAuthFileEntry ( 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'; diff --git a/src/connect.c b/src/connect.c old mode 100755 new mode 100644 index 2542a0c..b59e94c --- a/src/connect.c +++ b/src/connect.c @@ -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); diff --git a/src/error.c b/src/error.c old mode 100755 new mode 100644 index 5c9aa51..3e5e5e9 --- a/src/error.c +++ b/src/error.c @@ -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; -/* +/* * 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; -/* +/* * 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 diff --git a/src/getauth.c b/src/getauth.c old mode 100755 new mode 100644 index aa5d72d..e127206 --- a/src/getauth.c +++ b/src/getauth.c @@ -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); /* @@ -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 ( 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 ( 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 ( 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; diff --git a/src/globals.h b/src/globals.h old mode 100755 new mode 100644 index 2102384..965386f --- a/src/globals.h +++ b/src/globals.h @@ -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; diff --git a/src/iceauth.c b/src/iceauth.c old mode 100755 new mode 100644 index 7dc46da..14370e2 --- a/src/iceauth.c +++ b/src/iceauth.c @@ -54,7 +54,7 @@ IceGenerateMagicCookie ( int seed; int value; int i; - + if ((auth = (char *) malloc (len + 1)) == NULL) return (NULL); diff --git a/src/icetrans.c b/src/icetrans.c old mode 100755 new mode 100644 diff --git a/src/listen.c b/src/listen.c old mode 100755 new mode 100644 index 22602d4..0348fec --- a/src/listen.c +++ b/src/listen.c @@ -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; diff --git a/src/listenwk.c b/src/listenwk.c old mode 100755 new mode 100644 index 7747af6..06b56a3 --- a/src/listenwk.c +++ b/src/listenwk.c @@ -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; diff --git a/src/locking.c b/src/locking.c old mode 100755 new mode 100644 diff --git a/src/misc.c b/src/misc.c old mode 100755 new mode 100644 index 890da9a..e201fda --- a/src/misc.c +++ b/src/misc.c @@ -246,7 +246,7 @@ _IceRead ( return (0); } - else + else { /* * Fatal IO error. First notify each protocol's IceIOErrorProc diff --git a/src/ping.c b/src/ping.c old mode 100755 new mode 100644 diff --git a/src/process.c b/src/process.c old mode 100755 new mode 100644 index 583ea1d..2708ee8 --- a/src/process.c +++ b/src/process.c @@ -66,6 +66,51 @@ Author: Ralph Mor, X Consortium IceDisposeCompleteMessage (_iceConn, _pStart);\ return (0);\ } + +#ifndef HAVE_ASPRINTF +# include + +/* 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 + /* * 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); diff --git a/src/protosetup.c b/src/protosetup.c old mode 100755 new mode 100644 index 2aab6d9..255b912 --- a/src/protosetup.c +++ b/src/protosetup.c @@ -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. diff --git a/src/register.c b/src/register.c old mode 100755 new mode 100644 index 5b67bf2..20a6ad0 --- a/src/register.c +++ b/src/register.c @@ -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 ( 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) { diff --git a/src/replywait.c b/src/replywait.c old mode 100755 new mode 100644 index e29f019..eb3a814 --- a/src/replywait.c +++ b/src/replywait.c @@ -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); } diff --git a/src/setauth.c b/src/setauth.c old mode 100755 new mode 100644 diff --git a/src/shutdown.c b/src/shutdown.c old mode 100755 new mode 100644 index da80e1f..14874a0 --- a/src/shutdown.c +++ b/src/shutdown.c @@ -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 diff --git a/src/watch.c b/src/watch.c old mode 100755 new mode 100644 index b197a50..e414e19 --- a/src/watch.c +++ b/src/watch.c @@ -71,7 +71,7 @@ IceAddConnectionWatch ( /* * Invoke the watch proc with any previously opened ICE connections. */ - + for (i = 0; i < _IceConnectionCount; i++) { _IceWatchedConnection *newWatchedConn = (_IceWatchedConnection *)