From: Boram Park Date: Tue, 21 Aug 2012 09:03:53 +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%2Flibxaw.git;a=commitdiff_plain;h=0dc28c450b200751a0665b256ca764d98dddda5e upload tizen2.0 source --- diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index e69de29..0000000 diff --git a/COPYING b/COPYING old mode 100755 new mode 100644 index 5469363..aeeeda3 --- a/COPYING +++ b/COPYING @@ -72,13 +72,13 @@ SOFTWARE. Copyright 1987-1998 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/ChangeLog b/ChangeLog old mode 100755 new mode 100644 index 9e4a671..5e7e8f5 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,526 @@ +commit ffaad7ee2ef6e06b4585567df04f6b64356fb6fe +Author: Alan Coopersmith +Date: Fri Jun 1 20:31:30 2012 -0700 + + libXaw 1.0.11 + + Signed-off-by: Alan Coopersmith + +commit 52081b462ff7d1844d014bf9be887197caa88160 +Author: Alan Coopersmith +Date: Sat May 26 15:07:07 2012 -0700 + + Only call XawStackFree if XawStackAlloc was used for allocation + + In FormParagraph() in TextAction.c, the #if OLDXAW case always uses + fixed length buffers, while the !OLDXAW case uses XawStackAlloc & + XawStackFree to switch to dynamic allocations when the buffers aren't + large enough. + + A couple instances of XawStackFree slipped into the wrong side of + the #if checks though, so move them back where they belong. Also + reset pos afterwards, in the case we continue and may use it again, + to avoid the chance of a double free. + + Found by the Parfait 0.5.0.1 bug checking tool: + + Error: Free memory not allocated dynamically by alloc (CWE 590) + Free() was called on a pointer 'buf' to the auto variable 'buf'. Free() must only be used on dynamically allocated memory + at line 3946 of TextAction.c in function 'FormParagraph'. + 'buf' allocated at line 0 as auto variable. + at line 4000 of TextAction.c in function 'FormParagraph'. + 'buf' allocated at line 0 as auto variable. + Error: Use after free (CWE 416) + Use after free of pointer '&buf' + at line 3995 of TextAction.c in function 'FormParagraph'. + Previously freed at line 3946 with XtFree. + Error: Use after free + Double free (CWE 415): Double free of pointer '&buf' in call to XtFree + at line 4000 of TextAction.c in function 'FormParagraph'. + Previously freed at line 3946 with XtFree. + Double free (CWE 415): Double free of pointer '' in call to XtFree + at line 4000 of TextAction.c in function 'FormParagraph'. + Previously freed at line 3946 with XtFree. + + Signed-off-by: Alan Coopersmith + Acked-by: pcpa + +commit ca35cff72a3100c9367b7e7f4811117c8733b8be +Author: Alan Coopersmith +Date: Sat May 26 14:44:26 2012 -0700 + + Correct order of arguments to XawStackFree() + + XawStackAlloc() & XawStackFree() are macros to automate the process of + using a fixed size stack buffer for strings smaller than the buffer size, + and allocating/freeing memory for larger strings. + + XawStackFree is defined in src/Private.h as taking (pointer, stk_buffer) + and freeing pointer if it's not pointing to the stack buffer. + + Most of the calls of this macro get the ordering right, but a couple + got it reversed, passing a stack buffer to free() instead of the + allocated pointer. + + Found by the Parfait 0.5.0.1 bug checking tool: + + Error: Free memory not allocated dynamically by alloc (CWE 590) + Free() was called on a pointer 'buf' to the auto variable 'buf'. Free() must only be used on dynamically allocated memory + at line 2281 of TextAction.c in function 'DoFormatText'. + 'buf' allocated at line 0 as auto variable. + at line 2296 of TextAction.c in function 'DoFormatText'. + 'buf' allocated at line 0 as auto variable. + + Signed-off-by: Alan Coopersmith + Acked-by: pcpa + +commit 11c3a104141e1a4946ad949dfb5514df0b66a031 +Author: pcpa +Date: Tue May 22 20:42:32 2012 -0300 + + Correct undefined behavior access to out of scope pointer contents. + + This problem is triggered in gcc 4.7 DCE (dead code elimination). + In the Xaw code, the local constant "String" is not guaranteed to + have global scope. + The problem was found when debugging the reason xedit built with + gcc 4.7 would be very unstable, and that happens regardless of using + a libXaw built with gcc 4.6. + + Signed-off-by: pcpa + Signed-off-by: Alan Coopersmith + +commit b16cc35e551860a0bff54c47b33317536ddeae52 +Author: Alan Coopersmith +Date: Thu Mar 22 19:51:33 2012 -0700 + + libXaw 1.0.10 + + Signed-off-by: Alan Coopersmith + +commit 8a78d3aef0f6f1f51997468daf5f67231f4a3ecd +Author: Matt Turner +Date: Wed Feb 1 13:44:05 2012 -0500 + + Include headers instead of using extern definitions + + Signed-off-by: Matt Turner + +commit 49c0a2441946f0d70fbd2612f193c95b84dde102 +Author: Jeremy Huddleston +Date: Tue Nov 1 20:47:34 2011 -0700 + + Build fix for -Werror=pointer-to-int-cast + + Signed-off-by: Jeremy Huddleston + +commit fe00db0ecafd95f6e1353b1d5f11ee6012a9b64c +Author: Matt Dew +Date: Wed Oct 5 22:33:05 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 c8e8838702ba8ae0a8100c7f1bd94ce9932339de +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Mon Sep 19 16:25:43 2011 -0400 + + specs: refactor multi license legal text + + Also restore lost information. + There was no version number for this spec as in many of the docs. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 37ffe69b10ae29e8f91de6ef647d06804b9d159b +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri Sep 16 22:13:37 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 6c628c605e4f58be3a84edc5273a0dd88363a770 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Tue Sep 13 17:12:59 2011 -0400 + + specs: fix orphan author affiliation. + + It belongs to Chris Peterson formerly of MIT + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit e07f1d83079eb90ea91e3ff120ad747b1cc78bfb +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Mon Sep 12 16:54:45 2011 -0400 + + docs: use the &fullrelvers; entity to set X11 release information + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 5b1f776e84108bce397cc6721ee176c3bb5592ad +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Sep 11 19:49:53 2011 -0400 + + docs: 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. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 038802c68090dd3a75405178516017d80a51ecdf +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 e24d546c5da599f63cc2ff40626b58c1183ed27a +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 a6c814b6d02e3f28f1d015678bd3d944ff8dfb10 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Thu Sep 1 14:01:02 2011 -0400 + + Remove include directive to <X11/Xaw> + + The -I directive to include/X11/Xaw is removed which will alert + developers not to include header files with quotes unless they are in + the /src directory. + + Currently no offending includes were found. + + Tested-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 86444aeda526e957e1d7adc90625f24e263aa7ea +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sat Jun 18 10:22:19 2011 -0400 + + man page: replace hard coded section number with __libmansuffix__ + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 66e450fdbb58b77641351e3c11631fdde86bf205 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Jun 12 18:38:44 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 f3d7c3c5d9f142149d3217682667b32c3d0ded8d +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 39ffb88b3a6523e9258bc6e4f3948a09e63b269f +Author: Matt Dew <marcoz@osource.org> +Date: Tue May 31 20:03:23 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 f5823ff8ed5bd280e7858116c3cec5d97184b175 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat May 28 08:48:10 2011 -0700 + + Correct path to examples in X11R5 contrib archive + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7d01dd4176b8ae1664218da8e197ef49d1efd05a +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Fri May 27 20:35:28 2011 -0700 + + Bug 37536: Documentation refers to invalid contrib/examples/mit/Xaw + + https://bugs.freedesktop.org/show_bug.cgi?id=37536 + + Update text to point to the latest distributed copy I found, in the + X11R5 contrib archives. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit cfa8e377352d5b9d5dbddc75de8314a509f51224 +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 a1c8ddc087715876cce1c86f837f7b13b49696aa +Author: Glenn Burkhardt <gbburkhardt@verizon.net> +Date: Fri Dec 3 17:22:42 2010 -0500 + + fix potential infinte loop in XawBoxQueryGeometry() (bug 11569) + + Originally sent to xorg@ back in July 2007. + http://lists.x.org/archives/xorg/2007-July/025997.html + +commit 38dce0209303b48054c884508633b4ce0d52a819 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jan 27 22:40:02 2011 -0800 + + Convert XmuSnprintf calls to just plain snprintf + + All supported platforms have native snprintf + + Remove #include <X11/Xmu/SysUtil.h> since it only defines XmuSnprintf + and the unused XmuGethostname + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 83e4910b379cb9b9d69a0438eba3322470afda24 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Jan 27 22:35:46 2011 -0800 + + Typo fix: sintax error -> syntax error + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit bd78cc3b4afec713fcef114b5f12186d749fdb17 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Wed Feb 2 11:43:41 2011 -0500 + + config: comment, minor upgrade and layout configure.ac + + Group statements per section as per Autoconf standard layout + Autoconf recommends not using dnl instead of # for comments + No functional configuration changes + + 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 449ab92d83a972ba28ffda0ae198a6c8e4b00e78 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Jan 28 16:07:07 2011 -0500 + + config: replace deprecated AC_HELP_STRING with AS_HELP_STRING + + This silences an Automake warning. + + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit b73a5ea91d0b3bb61ee8e7aa26ff178fd5b72209 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Fri Jan 28 14:59:04 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 03457873474dfc90e5f2322facbd6032a1312086 +Author: Roberto Branciforti <rbbrnc@gmail.com> +Date: Wed Jan 12 22:36:06 2011 +0100 + + Removing trailing white spaces + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 8ac146ce96cfa133b788b1ffdd13fe0b648ee4fc +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Tue Jan 11 17:07:08 2011 -0800 + + libXaw 1.0.9 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit e7a9b0302f7cb84015e8f612e5b65694d785b2d8 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Sun Nov 21 09:33:46 2010 -0500 + + config: prevent config.status from being generated three times + + AC_OUTPUT with parameters is deprecated, use AC_CONFIG_FILES. + + Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Signed-off-by: Gaetan Nadon <memsize@videotron.ca> + +commit 55fc7aa22197350d9cd1039e0398132a63d3589f +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 20 20:10:12 2010 -0800 + + Check for getpagesize() with autoconf instead of #ifdef osname + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + +commit b2e86875d03e349a4c85135e4cf41b26b99b083e +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 20 20:06:04 2010 -0800 + + convert header checks/ifdefs to autoconf standard AC_CHECK_HEADERS + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Reviewed-by: Julien Cristau <jcristau@debian.org> + Reviewed-by: Gaetan Nadon <memsize@videotron.ca> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + +commit 41bf7992c45c6766c5982b3500b03d9c1b1fab87 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 20 19:54:54 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. + Regroup XORG statements under the Xorg macros section. + Add missing AC_CONFIG_SRCDIR + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit f85d4342cbfbb58764e24e202f3a7c95eaba3d77 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Sat Nov 20 19:52:41 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 394a0c49c849e497cbcb987154ff796eb34f4820 +Author: Alan Coopersmith <alan.coopersmith@oracle.com> +Date: Thu Nov 11 23:30:22 2010 -0800 + + specs/CH6.xml: Remove stray quote in chapter title + + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit e9da4e6268b2cfbda793435caedc6403b2a918f0 +Author: Gaetan Nadon <memsize@videotron.ca> +Date: Tue Nov 9 13:04:44 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 fd5ef2fb841903c0a7d59e56f8fe69d0974f964c +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Tue Nov 2 09:52:34 2010 -0700 + + xaw6.pc: Only list xmu in Requires.private, not Requires + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + + Based on earlier similar change to xaw7.pc which was: + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + Tested-by: Gaetan Nadon <memsize@videotron.ca> + +commit 5136e2aabb73fec3c1670616bf0ebf828a1a1ca9 +Author: Cyril Brulebois <kibi@debian.org> +Date: Thu Oct 28 00:29:30 2010 +0200 + + Fix missing <X11/Intrinsic.h> in XawInit.h + + Configure scripts/test programs might have troubles detecting libXaw by + just including XawInit.h, since it doesn't include <X11/Intrinsic.h>, + even though it's needed for the Widget definition. + + X.Org Bugzilla #3526 <https://bugs.freedesktop.org/show_bug.cgi?id=3526> + + Signed-off-by: Cyril Brulebois <kibi@debian.org> + Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> + +commit 7b8196c9f7723b77b5d18fc1cc2070e557a7f767 +Author: Jeremy Huddleston <jeremyhu@apple.com> +Date: Mon Oct 25 12:33:32 2010 -0700 + + Move -I CFLAGS to CPPFLAGS + + Previously, setting CPPFLAGS at configure time could result in using the + installed headers rather than the ones included in the package. + + Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com> + commit 46ca2da2e8d29d7f1347c9f4e9fb3794dd99cb7a Author: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Mon Oct 25 10:47:03 2010 -0700 diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..8b82ade --- /dev/null +++ b/INSTALL @@ -0,0 +1,291 @@ +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 index 25ad354..d8869f0 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ SUBDIRS = include src man specs pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = +pkgconfig_DATA = if BUILD_XAW6 diff --git a/NEWS b/NEWS deleted file mode 100644 index e69de29..0000000 diff --git a/compile b/compile new file mode 100755 index 0000000..bac481c --- /dev/null +++ b/compile @@ -0,0 +1,310 @@ +#! /bin/sh +# Wrapper for compilers which do not understand `-c -o'. + +scriptversion=2010-11-15.09; # UTC + +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010 Free Software +# Foundation, Inc. +# Written by Tom Tromey <tromey@cygnus.com>. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to <bug-automake@gnu.org> or send patches to +# <automake-patches@gnu.org>. + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Win32 hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l*) + lib=${1#-l} + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + set x "$@" "$dir/$lib.dll.lib" + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + set x "$@" "$dir/$lib.lib" + break + fi + done + IFS=$save_IFS + + test "$found" != yes && set x "$@" "$lib.lib" + shift + ;; + -L*) + func_file_conv "${1#-L}" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand `-c -o'. +Remove `-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file `INSTALL'. + +Report bugs to <bug-automake@gnu.org>. +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as `compile cc -o foo foo.c'. + # So we strip `-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no `-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # `.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use `[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/configure.ac b/configure.ac old mode 100755 new mode 100644 index 8779b36..3ed625e --- a/configure.ac +++ b/configure.ac @@ -1,37 +1,39 @@ -dnl Process this file with autoconf to create configure. +# Initialize Autoconf AC_PREREQ([2.60]) +AC_INIT([libXaw], [1.0.11], + [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXaw]) +AC_CONFIG_SRCDIR([Makefile.am]) +AC_CONFIG_HEADERS([config.h]) -AC_INIT([libXaw], - [1.0.8], - [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], - libXaw) - +# Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -AM_CONFIG_HEADER(config.h) -# Require xorg-macros minimum of 1.10 for HAVE_STYLESHEETS in XORG_CHECK_SGML_DOCTOOLS +# 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_SPECS +XORG_WITH_XMLTO(0.0.22) +XORG_WITH_FOP +XORG_WITH_XSLTPROC +XORG_CHECK_SGML_DOCTOOLS(1.8) -# Check for progs -AC_PROG_CC -AC_PROG_LIBTOOL -AC_PROG_AWK +# Some compilers do not support per target -c and -o flags AM_PROG_CC_C_O +# Checks for programs. +AC_PROG_AWK + # Need to call this explicitly since the first call to PKG_CHECK_MODULES # is in an if statement, and later calls would break if it's skipped. PKG_PROG_PKG_CONFIG -XORG_DEFAULT_OPTIONS -XORG_ENABLE_SPECS -XORG_WITH_XMLTO(0.0.20) -XORG_WITH_FOP -XORG_CHECK_SGML_DOCTOOLS(1.5) - # # fix libtool to set SONAME to libXaw.so.$major # @@ -67,27 +69,23 @@ AM_CONDITIONAL(PLATFORM_DARWIN, test "x$platform_darwin" = "xyes") # Whether to build Xaw6 -AC_ARG_ENABLE(xaw6, AC_HELP_STRING([--disable-xaw6], +AC_ARG_ENABLE(xaw6, AS_HELP_STRING([--disable-xaw6], [Disable building of libXaw.so.6]), [build_v6=$enableval], [build_v6=yes]) if test "x$build_v6" = xyes; then PKG_CHECK_MODULES(XAW6, xproto x11 xext xextproto xt xmu) - AC_SUBST(XAW6_CFLAGS) - AC_SUBST(XAW6_LIBS) fi # Whether to build Xaw7 -AC_ARG_ENABLE(xaw7, AC_HELP_STRING([--disable-xaw7], +AC_ARG_ENABLE(xaw7, AS_HELP_STRING([--disable-xaw7], [Disable building of libXaw.so.7]), [build_v7=$enableval], [build_v7=yes]) if test "x$build_v7" = xyes; then PKG_CHECK_MODULES(XAW7, xproto x11 xext xextproto xt xmu xpm) - AC_SUBST(XAW7_CFLAGS) - AC_SUBST(XAW7_LIBS) fi @@ -95,30 +93,23 @@ AM_CONDITIONAL(BUILD_XAW6, [test x$build_v6 = xyes]) AM_CONDITIONAL(BUILD_XAW7, [test x$build_v7 = xyes]) # Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADER(wctype.h, - AC_DEFINE([HAS_WCTYPE_H],1, - [Define to 1 if you have the <wctype.h> header file.])) -AC_CHECK_HEADER(wchar.h, - AC_DEFINE([HAS_WCHAR_H],1, - [Define to 1 if you have the <wchar.h> header file.])) -AC_CHECK_HEADER(widec.h, [], - AC_DEFINE([NO_WIDEC_H],1, - [Define to 1 if you DO NOT have the <widec.h> header file.])) +AC_CHECK_HEADERS([wctype.h wchar.h widec.h]) # Checks for functions -AC_CHECK_FUNCS([iswalnum]) +AC_CHECK_FUNCS([iswalnum getpagesize]) -AC_OUTPUT([Makefile - include/Makefile - man/Makefile - specs/Makefile - src/Makefile]) +AC_CONFIG_FILES([Makefile + include/Makefile + man/Makefile + specs/Makefile + src/Makefile]) if test "x$build_v6" = xyes; then - AC_OUTPUT(xaw6.pc) + AC_CONFIG_FILES(xaw6.pc) fi if test "x$build_v7" = xyes; then - AC_OUTPUT(xaw7.pc) + AC_CONFIG_FILES(xaw7.pc) fi + +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 26f720e..0000000 --- a/debian/changelog +++ /dev/null @@ -1,248 +0,0 @@ -libxaw (2:1.0.8-1slp2) unstable; urgency=low - - * [X11R7.6] upgrade pacakge - * Git: 165.213.180.234:slp/pkgs/xorg/lib/libxaw - * Tag: libxaw_1.0.8-1slp2 - - -- SooChan Lim <sc1.lim@samsung.com> Mon, 03 Jan 2011 22:54:35 +0900 - -libxaw (2:1.0.7-4slp2) unstable; urgency=low - - * add --as-needed - * Git: 165.213.180.234:/git/slp/pkgs/xorg/lib/libxaw - * Tag: libxaw_1.0.7-4slp2 - - -- SooChan Lim <sc1.lim@samsung.com> Thu, 18 Nov 2010 14:14:57 +0900 - -libxaw (2:1.0.7-4slp2) unstable; urgency=low - - * Update maintainer - * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/X11 - * Tag: libxaw_1.0.7-4slp2 - - -- Sung-Jin Park <sj76.park@samsung.com> Wed, 21 Apr 2010 13:03:02 +0900 - -libxaw (2:1.0.7-3slp2) unstable; urgency=low - - * modify the package name - - -- SooChan Lim <sc1.lim@samsung.com> Thu, 25 Mar 2010 17:41:48 +0900 - -libxaw (2:1.0.7-2) unstable; urgency=low - - * Import debian package - * Install .la files - - -- Sung-Jin Park <sj76.park@samsung.com> Mon, 07 Dec 2009 10:30:29 +0900 - -libxaw (2:1.0.7-1) unstable; urgency=low - - [ Julien Cristau ] - * Add header to 01_Xaw_StripChart_fix.diff. This way it's not necessary to - go look at the changelog for xfree86 4.2.1-5 to figure out what this is - about. - * Build the Xaw spec and install it in libxaw7-dev. - * README.Debian pointed at this doc in xspecs, it's now unnecessary. - - [ Timo Aaltonen ] - * New upstream release. - * Bump the build-dep on xutils-dev (>= 1:7.5~1). - * Bump Standards-Version to 3.8.3. - - -- Julien Cristau <jcristau@debian.org> Wed, 25 Nov 2009 13:47:36 +0100 - -libxaw (2:1.0.6-1) unstable; urgency=low - - * Add README.source, bump Standards-Version to 3.8.2. - * New upstream release. - * Move -dbg package to section debug. - - -- Brice Goglin <bgoglin@debian.org> Mon, 27 Jul 2009 17:37:25 +0200 - -libxaw (2:1.0.5-2) unstable; urgency=low - - * Upload to unstable. - - -- Julien Cristau <jcristau@debian.org> Mon, 16 Feb 2009 19:11:19 +0100 - -libxaw (2:1.0.5-1) experimental; urgency=low - - [ Brice Goglin ] - * Add a link to www.X.org and a reference to the upstream module - in the long description. - - [ Timo Aaltonen ] - * New upstream release. - - [ Julien Cristau ] - * Run autoreconf on build. Add build-deps on autoconf, automake, libtool - and xutils-dev. - * Handle parallel builds. - - -- Julien Cristau <jcristau@debian.org> Fri, 19 Dec 2008 14:11:04 +0100 - -libxaw (2:1.0.4-2) unstable; urgency=low - - [ Drew Parsons ] - * Add a README.Debian to libxaw7-dev, pointing to further - documentation in the xspecs package. Closes: #260659. - - [ Julien Cristau ] - * Stop building Xaw6. Remove the libxaw6, libxaw6-dbg, libxaw6-dev and - libxaw-headers packages, moving the contents of -headers to libxaw7-dev - (closes: #172890). - * Use ${binary:Version} instead of ${Source-Version}. - * Bump Standards-Version to 3.7.3. - * Add Vcs-Browser, and remove the XS- prefix from Vcs-Git. - * Drop the -1 debian revisions from build-dependencies. - * libxaw7{,-dbg} don't need to depend on x11-common. - * libxaw7-dev now Pre-Depends: x11-common (>= 1:7.0.0) because it contains - the Xaw headers in /usr/include/X11. - * Add myself to Uploaders. - - -- Julien Cristau <jcristau@debian.org> Fri, 16 May 2008 16:02:12 +0200 - -libxaw (2:1.0.4-1) unstable; urgency=low - - [ Julien Cristau ] - * Move binary packages to the proper sections. - - [ Timo Aaltonen ] - * Bump the epoch so that this can be synced to Ubuntu in the future. - - [ Brice Goglin ] - * New upstream release. - * Add the upstream URL to debian/copyright. - * Add myself to Uploaders, and remove Fabio and Branden with their - permission. - - -- Brice Goglin <bgoglin@debian.org> Wed, 22 Aug 2007 09:22:34 +0200 - -libxaw (1:1.0.3-3) unstable; urgency=low - - * Upload to unstable. - - -- Julien Cristau <jcristau@debian.org> Wed, 11 Apr 2007 11:09:19 +0200 - -libxaw (1:1.0.3-2) experimental; urgency=low - - * Ship the Xaw(3) manpage in libxaw-headers instead of libxaw7-dev. Bump - Replaces to libxaw7-dev (<< 1:1.0.3-2). - - -- Julien Cristau <jcristau@debian.org> Fri, 16 Feb 2007 17:43:38 +0100 - -libxaw (1:1.0.3-1) experimental; urgency=low - - * New upstream release. - * Drop obsolete CVS info from the descriptions, and add XS-Vcs-Git. - * Install the upstream ChangeLog. - * Make libxaw binNMUable: build-dep on dpkg-dev >= 1.13.19, and change - dependency of libxaw?-dev to libxaw-headers (= ${source:Version}). - - -- Julien Cristau <jcristau@debian.org> Fri, 9 Feb 2007 18:08:12 +0100 - -libxaw (1:1.0.2-4) unstable; urgency=low - - * Make libxaw7-dev conflict and replace libxaw6-dev and libxaw8-dev. Also - make libxaw6-dev do the same for libxaw7-dev and libxaw8-dev. These were - lost in the move to modular. - * Handle libXaw.so in *.links files so we can allow both libxaw6-dev and - libxaw7-dev to ship an appropriate libXaw.so symlink to libXaw[67].so - * Explicitly pass --disable-xaw8 to configure so that we don't try and build - it if the xprint .pc file is on the system. The configure script will try - and guess whether or not to build xaw8 if it doesn't get an explicit yes - or no. This way, we make sure the libXaw.so symlink doesn't get linked to - a non-existent libXaw8.so. Thanks Rene Engelhard, Steve Langasek, and - Michael Banck. - - -- David Nusinow <dnusinow@debian.org> Sun, 27 Aug 2006 19:17:18 +0000 - -libxaw (1:1.0.2-3) unstable; urgency=low - - * Bring X11R7.1 into unstable. - * dbg package has priority extra. - - -- Drew Parsons <dparsons@debian.org> Sat, 26 Aug 2006 00:22:33 +1000 - -libxaw (1:1.0.2-2) experimental; urgency=low - - * Need to add libxaw7-dev.manpages for man pages to get installed! - - -- Drew Parsons <dparsons@debian.org> Thu, 10 Aug 2006 00:51:43 +1000 - -libxaw (1:1.0.2-1) experimental; urgency=low - - * New upstream version (X11R7.1). - * Use debhelper 5, update control, compat, use of dh_install to match. - * Handle libXaw.so.[67] in .install instead of .links (for - consistency since other symlinks such as libXaw7.so.7 are already - handled there). - * Exclude .la and Xaw8 from dh_install. - * Install Xaw man page with libxaw7-dev. - - -- Drew Parsons <dparsons@debian.org> Wed, 9 Aug 2006 22:38:21 +1000 - -libxaw (1:1.0.1-6) UNRELEASED; urgency=low - - * Test for obj-$(DEB_BUILD_GNU_TYPE) before creating it during build; - idempotency fix. - * Run dh_install w/ --list-missing. - * Bump standards version to 3.7.2.0. - * Version x11-common pre-dep in headers package to 1:7.0.0 to match - the rest of Debian. - - -- Andres Salomon <dilinger@debian.org> Mon, 17 Jul 2006 01:20:41 -0400 - -libxaw (1:1.0.1-5) unstable; urgency=low - - * Reorder makeshlib command in rules file so that ldconfig is run - properly. Thanks Drew Parsons and Steve Langasek. - * Add quilt to build-depends - - -- David Nusinow <dnusinow@debian.org> Tue, 18 Apr 2006 22:48:53 -0400 - -libxaw (1:1.0.1-4) unstable; urgency=low - - * Upload to unstable - - -- David Nusinow <dnusinow@debian.org> Thu, 23 Mar 2006 22:44:29 -0500 - -libxaw (1:1.0.1-3) experimental; urgency=low - - * Fix typo in debian/rules that allowed libxaw7 to get stripped without - saving the debugging symbols in the right package - - -- David Nusinow <dnusinow@debian.org> Tue, 21 Mar 2006 20:43:38 -0500 - -libxaw (1:1.0.1-2) experimental; urgency=low - - * Port patches from trunk - + general/012_Xaw_StripChart_fix.diff - - -- David Nusinow <dnusinow@debian.org> Sun, 26 Feb 2006 19:09:55 -0500 - -libxaw (1:1.0.1-1) UNRLEASED; urgency=low - - * First upload to Debian - * Add ed to build-depends. Thanks Eugene Konev. (seriously... ed!) - - -- David Nusinow <dnusinow@debian.org> Fri, 6 Jan 2006 00:44:17 -0500 - -libxaw (7.0.2-3) breezy; urgency=low - - * Add libxmu-dev and libxpm-dev to the libxaw-headers dependencies.: - - -- Adam Conrad <adconrad@ubuntu.com> Mon, 25 Jul 2005 05:46:47 +0000 - -libxaw (7.0.2-2) breezy; urgency=low - - * Bump Build-Depends on libx11-dev, libxt-dev, libxmu-dev, libxpm-dev, and - x11proto-core-dev to avoid _XOPEN_SOURCE. - - -- Daniel Stone <daniel.stone@ubuntu.com> Sat, 23 Jul 2005 00:31:45 +1000 - -libxaw (7.0.2-1) breezy; urgency=low - - * First libxaw 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 6bbd383..0000000 --- a/debian/control +++ /dev/null @@ -1,77 +0,0 @@ -Source: libxaw -Section: x11 -Priority: optional -Maintainer: Sung-Jin Park <sj76.park@samsung.com>, Sangjin Lee <sc1.lim@samsung.com>, Debian X Strike Force <debian-x@lists.debian.org> -Uploaders: SooChan Lim <sc1.lim@samsung.com>, David Nusinow <dnusinow@debian.org>, Drew Parsons <dparsons@debian.org>, Brice Goglin <bgoglin@debian.org>, Julien Cristau <jcristau@debian.org> -Build-Depends: debhelper (>= 5), libx11-dev (>= 1:0.99.2), x11proto-core-dev (>= 7.0.1), libxt-dev (>= 1:0.99.1), libxmu-dev (>= 1:0.99.1), libxpm-dev (>= 1:3.5.3), pkg-config, ed, quilt, dpkg-dev (>= 1.13.19), autoconf, automake, libtool, xutils-dev (>= 1:7.5~1), groff, -#Build-Depends: debhelper (>= 5), libx11-dev (>= 1:0.99.2), x11proto-core-dev (>= 7.0.1), libxt-dev (>= 1:0.99.1), libxmu-dev (>= 1:0.99.1), libxpm-dev (>= 1:3.5.3), pkg-config, ed, quilt, dpkg-dev (>= 1.13.19), autoconf, automake, libtool, xutils-dev (>= 1:7.5~1), groff, ghostscript, -Standards-Version: 3.8.3 -Vcs-Git: git://git.debian.org/git/pkg-xorg/lib/libxaw -Vcs-Browser: http://git.debian.org/?p=pkg-xorg/lib/libxaw.git - -Package: libxaw7 -Section: libs -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: X11 Athena Widget library - libXaw7 provides the second version of Xaw, the Athena Widgets tookit, - which is largely used by legacy X applications. This version is the - most common version, as version 6 is considered deprecated, and version - 8, which adds Xprint support, is unsupported and not widely used. - In general, use of a more modern toolkit such as GTK+ is recommended. - . - 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/libXaw - -Package: libxaw7-dbg -Section: debug -Architecture: any -Priority: extra -Depends: ${shlibs:Depends}, ${misc:Depends}, libxaw7 (= ${binary:Version}) -Description: X11 Athena Widget library (debug package) - libXaw7 provides the second version of Xaw, the Athena Widgets tookit, - which is largely used by legacy X applications. This version is the - most common version, as version 6 is considered deprecated, and version - 8, which adds Xprint support, is unsupported and not widely used. - In general, use of a more modern toolkit such as GTK+ is recommended. - . - This package contains the debug versions of the library found in libxaw7. - 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/libXaw - -Package: libxaw7-dev -Section: libdevel -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, libxaw7 (= ${binary:Version}), libx11-dev, libxmu-dev, libxpm-dev, x11proto-core-dev -Pre-Depends: x11-common (>= 1:7.0.0) -Conflicts: libxaw6-dev, libxaw8-dev, libxaw-headers (<< 2:1.0.4-2) -Replaces: libxaw6-dev, libxaw8-dev, libxaw-headers (<< 2:1.0.4-2) -Description: X11 Athena Widget library (development headers) - libXaw7 provides the second version of Xaw, the Athena Widgets tookit, - which is largely used by legacy X applications. This version is the - most common version, as version 6 is considered deprecated, and version - 8, which adds Xprint support, is unsupported and not widely used. - In general, use of a more modern toolkit such as GTK+ is recommended. - . - This package contains the development headers for the library found in - libxaw7. 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/libXaw diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index df757b7..0000000 --- a/debian/copyright +++ /dev/null @@ -1,129 +0,0 @@ -This package was downloaded from -http://xorg.freedesktop.org/releases/individual/lib/ - -Copyright (c) 1998 by The XFree86 Project, Inc. - -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 XFREE86 PROJECT 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 XFree86 Project 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 -XFree86 Project. - -Copyright (c) 1991, 1994, 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. - -Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -Copyright 1991 by OMRON Corporation - -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, and that the name of OMRON not be used in advertising -or publicity pertaining to distribution of the software without specific, -written prior permission. OMRON makes no representations about the -suitability of this software for any purpose. It is provided "as is" -without express or implied warranty. - -OMRON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO -EVENT SHALL OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR -CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. - -(c) Copyright 2003 Danny Backx <danny.backx@skynet.be> -(c) Copyright 2003-2004 Roland Mainz <roland.mainz@nrubsig.org> - -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 -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. - -Except as contained in this notice, the names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. - -Copyright 1989 Prentice Hall - -Permission to use, copy, modify, and distribute this software for any -purpose and without fee is hereby granted, provided that the above -copyright notice appear in all copies and that both the copyright notice -and this permission notice appear in supporting documentation. - -Prentice Hall and the authors disclaim all warranties with regard -to this software, including all implied warranties of merchantability and -fitness. In no event shall Prentice Hall or the authors be liable -for any special, indirect or cosequential damages or any damages whatsoever -resulting from loss of use, data or profits, whether in an action of -contract, negligence or other tortious action, arising out of or in -connection with the use or performance of this software. diff --git a/debian/libxaw7-dev.install b/debian/libxaw7-dev.install deleted file mode 100755 index 848ad3a..0000000 --- a/debian/libxaw7-dev.install +++ /dev/null @@ -1,5 +0,0 @@ -usr/lib/libXaw7.a -usr/lib/libXaw7.so -usr/lib/libXaw7.la -usr/lib/pkgconfig/xaw7.pc -usr/include/X11/* diff --git a/debian/libxaw7-dev.links b/debian/libxaw7-dev.links deleted file mode 100644 index 6917ddf..0000000 --- a/debian/libxaw7-dev.links +++ /dev/null @@ -1 +0,0 @@ -usr/lib/libXaw7.so usr/lib/libXaw.so diff --git a/debian/libxaw7.install b/debian/libxaw7.install deleted file mode 100644 index fd8df61..0000000 --- a/debian/libxaw7.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/libXaw7.so.7* -usr/lib/libXaw.so.7 diff --git a/debian/patches/01_Xaw_StripChart_fix.diff b/debian/patches/01_Xaw_StripChart_fix.diff deleted file mode 100644 index a58b289..0000000 --- a/debian/patches/01_Xaw_StripChart_fix.diff +++ /dev/null @@ -1,102 +0,0 @@ -From: "Nikita V. Youshchenko" <yoush@cs.msu.su> -Date: Sat, 02 Nov 2002 17:57:13 +0300 -Subject: A bug in Xaw/StripChart.c causes incorrect scale lines in xload window - -Recently I tried to run xload on a high loaded server (load was more -than 10), and discovered that if window size is rather small, scale -lines are drawn incorrectly (upper than needed). - -This is caused by a bug in Xaw/StripChart.c. -It draws lines with fixed integer steps. Than means that if window -height is 39 pixels, and 10 lines should be drawn to split view into 11 -equal parts, lines will be drawn at 3, 6, 9, ,.., 30. So the bottom part -height will be 9 pixels while other parts height will be 2 pixels. - -This patch makes part heights differ no more than by 1 pixel. - -Debian bug#167448 <http://bugs.debian.org/167448> - -Index: libXaw-X11R7.0-1.0.1/src/StripChart.c -=================================================================== ---- libXaw-X11R7.0-1.0.1.orig/src/StripChart.c 2005-12-30 14:50:24.000000000 -0500 -+++ libXaw-X11R7.0-1.0.1/src/StripChart.c 2006-02-26 19:09:07.000000000 -0500 -@@ -373,12 +373,12 @@ - * the returned value is identical to the initial value of next and data is - * unchanged. Otherwise keeps half a window's worth of data. If data is - * changed, then w->strip_chart.max_value is updated to reflect the -- * largest data point -+ * largest data point. - */ --static int -+static int - repaint_window(StripChartWidget w, int left, int width) - { -- int i, j; -+ int i, j, k; - int next = w->strip_chart.interval; - int scale = w->strip_chart.scale; - int scalewidth = 0; -@@ -423,8 +423,10 @@ - } - - /* Draw graph reference lines */ -+ k = XtHeight(w) % w->strip_chart.scale; - for (i = 1; i < w->strip_chart.scale; i++) { -- j = i * ((int)XtHeight(w) / w->strip_chart.scale); -+ j = i * (XtHeight(w) / w->strip_chart.scale) + -+ ((i * k + w->strip_chart.scale/2) / w->strip_chart.scale); - XDrawLine(dpy, win, w->strip_chart.hiGC, left, j, scalewidth, j); - } - } -@@ -446,7 +448,7 @@ - MoveChart(StripChartWidget w, Bool blit) - { - double old_max; -- int left, i, j; -+ int left, i, j, k; - int next = w->strip_chart.interval; - - if (!XtIsRealized((Widget)w)) -@@ -495,8 +497,10 @@ - - /* Draw graph reference lines */ - left = j; -+ k = XtHeight(w) % w->strip_chart.scale; - for (i = 1; i < w->strip_chart.scale; i++) { -- j = i * (XtHeight(w) / w->strip_chart.scale); -+ j = i * (XtHeight(w) / w->strip_chart.scale) + -+ ((i * k + w->strip_chart.scale/2) / w->strip_chart.scale); - XDrawLine(XtDisplay((Widget)w), XtWindow((Widget)w), - w->strip_chart.hiGC, left, j, XtWidth(w), j); - } -@@ -557,23 +561,26 @@ - StripChartWidget w = (StripChartWidget)widget; - XPoint *points; - Cardinal size; -- int i; -+ int i, k; - - if (w->strip_chart.scale <= 1) { - XtFree((char *)w->strip_chart.points); - w->strip_chart.points = NULL; - return; - } -- -+ - size = sizeof(XPoint) * (w->strip_chart.scale - 1); - - points = (XPoint *)XtRealloc((XtPointer)w->strip_chart.points, size); - w->strip_chart.points = points; - - /* Draw graph reference lines into clip mask */ -- -+ k = XtHeight(w) % w->strip_chart.scale; - for (i = 1; i < w->strip_chart.scale; i++) { - points[i - 1].x = 0; -- points[i - 1].y = XtHeight(w) / w->strip_chart.scale; -+ points[i - 1].y = i * (XtHeight(w) / w->strip_chart.scale) + -+ ((i * k + w->strip_chart.scale/2) / w->strip_chart.scale); - } -+ for (i = w->strip_chart.scale - 1; i > 1; i--) -+ points[i - 1].y -= points[i - 2].y; - } diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index 6591a5d..0000000 --- a/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -01_Xaw_StripChart_fix.diff diff --git a/debian/rules b/debian/rules deleted file mode 100755 index b0f6838..0000000 --- a/debian/rules +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/make -f -# debian/rules for the Debian libxaw 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 - -include debian/xsfbs/xsfbs.mk - -CFLAGS = -Wall -g -LDFLAGS += -Wl,--hash-style=both -Wl,--as-needed -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 - autoreconf -vfi - -obj-$(DEB_BUILD_GNU_TYPE)/config.status: configure - mkdir -p obj-$(DEB_BUILD_GNU_TYPE) - cd obj-$(DEB_BUILD_GNU_TYPE) && \ - ../configure --prefix=/usr --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info $(confflags) \ - --disable-xaw6 --disable-xaw8 \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" - -build: build-stamp -build-stamp: obj-$(DEB_BUILD_GNU_TYPE)/config.status - dh_testdir - - cd obj-$(DEB_BUILD_GNU_TYPE) && $(MAKE) - - touch build-stamp - -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 $$(find -name Makefile.in) - rm -f compile config.guess config.sub configure depcomp install-sh - rm -f ltmain.sh missing INSTALL aclocal.m4 mkinstalldirs config.h.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 - # the generated html looks ugly, don't ship it - rm -f debian/tmp/usr/share/doc/libXaw/widgets.html - -# Build architecture-dependent files here. -binary-arch: build install - dh_testdir - dh_testroot - -# dh_installdocs - dh_install --sourcedir=debian/tmp --list-missing --exclude=.la -# dh_installman -# dh_installchangelogs ChangeLog - dh_link - dh_strip -Nlibxaw7 - dh_strip -plibxaw7 --dbg-package=libxaw7-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 03ab381..0000000 --- a/debian/watch +++ /dev/null @@ -1,2 +0,0 @@ -version=3 -http://xorg.freedesktop.org/releases/individual/lib/ libXaw-(.*)\.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/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/Xaw/AllWidgets.h b/include/X11/Xaw/AllWidgets.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/AsciiSink.h b/include/X11/Xaw/AsciiSink.h old mode 100755 new mode 100644 index be13433..27d8f48 --- a/include/X11/Xaw/AsciiSink.h +++ b/include/X11/Xaw/AsciiSink.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/AsciiSinkP.h b/include/X11/Xaw/AsciiSinkP.h old mode 100755 new mode 100644 index ec6c212..4bf440a --- a/include/X11/Xaw/AsciiSinkP.h +++ b/include/X11/Xaw/AsciiSinkP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -51,8 +51,8 @@ SOFTWARE. /* * AsciiSink Object Private Data */ -#include <X11/Xaw/TextSinkP.h> -#include <X11/Xaw/AsciiSink.h> +#include <X11/Xaw/TextSinkP.h> +#include <X11/Xaw/AsciiSink.h> /* New fields for the AsciiSink object class record */ typedef struct _AsciiSinkClassPart { diff --git a/include/X11/Xaw/AsciiSrc.h b/include/X11/Xaw/AsciiSrc.h old mode 100755 new mode 100644 index 0bd14b4..08c5f8c --- a/include/X11/Xaw/AsciiSrc.h +++ b/include/X11/Xaw/AsciiSrc.h @@ -35,7 +35,7 @@ in this Software without prior written authorization from The Open Group. * Date: June 29, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ @@ -57,7 +57,7 @@ in this Software without prior written authorization from The Open Group. useStringInPlace UseStringInPlace Boolean False */ - + extern WidgetClass asciiSrcObjectClass; typedef struct _AsciiSrcClassRec *AsciiSrcObjectClass; diff --git a/include/X11/Xaw/AsciiSrcP.h b/include/X11/Xaw/AsciiSrcP.h old mode 100755 new mode 100644 index 2668f06..1f3f06e --- a/include/X11/Xaw/AsciiSrcP.h +++ b/include/X11/Xaw/AsciiSrcP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -55,7 +55,7 @@ SOFTWARE. * Date: June 29, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ @@ -75,10 +75,10 @@ SOFTWARE. #endif #endif -typedef struct _Piece { /* Piece of the text file of BUFSIZ allocated +typedef struct _Piece { /* Piece of the text file of BUFSIZ allocated characters */ char *text; /* The text in this buffer */ - XawTextPosition used; /* The number of characters of this buffer + XawTextPosition used; /* The number of characters of this buffer that have been used */ struct _Piece *prev, *next; /* linked list pointers */ } Piece; @@ -122,7 +122,7 @@ typedef struct _AsciiSrcPart { #endif Boolean allocated_string; /* Have I allocated the string in ascii_src->string? */ - XawTextPosition length; /* length of file */ + XawTextPosition length; /* length of file */ Piece *first_piece; /* first piece of the text */ #ifndef OLDXAW XtPointer pad[4]; /* for future use and keep binary compatability */ @@ -136,4 +136,4 @@ typedef struct _AsciiSrcRec { AsciiSrcPart ascii_src; } AsciiSrcRec; -#endif /* _XawAsciiSrcP_h */ +#endif /* _XawAsciiSrcP_h */ diff --git a/include/X11/Xaw/AsciiText.h b/include/X11/Xaw/AsciiText.h old mode 100755 new mode 100644 index 0c38f9c..b0b3cd9 --- a/include/X11/Xaw/AsciiText.h +++ b/include/X11/Xaw/AsciiText.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -48,13 +48,13 @@ SOFTWARE. /* * AsciiText.h - Public header file for AsciiText Widget * - * This Widget is intended to be used as a simple front end to the + * This Widget is intended to be used as a simple front end to the * text widget with an ascii source and ascii sink attached to it * * Date: June 29, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ #ifndef _AsciiText_h diff --git a/include/X11/Xaw/AsciiTextP.h b/include/X11/Xaw/AsciiTextP.h old mode 100755 new mode 100644 index 52863e5..f91c362 --- a/include/X11/Xaw/AsciiTextP.h +++ b/include/X11/Xaw/AsciiTextP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -48,13 +48,13 @@ SOFTWARE. /* * AsciiText.c - Private header file for AsciiText Widget. * - * This Widget is intended to be used as a simple front end to the + * This Widget is intended to be used as a simple front end to the * text widget with an ascii source and ascii sink attached to it. * * Date: June 29, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ diff --git a/include/X11/Xaw/Box.h b/include/X11/Xaw/Box.h old mode 100755 new mode 100644 index 19e9a65..9eb1884 --- a/include/X11/Xaw/Box.h +++ b/include/X11/Xaw/Box.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -63,11 +63,11 @@ SOFTWARE. borderWidth BorderWidth Dimension 1 destroyCallback Callback Pointer NULL displayList DisplayList XawDisplayList* NULL - hSpace HSpace Dimension 4 + hSpace HSpace Dimension 4 height Height Dimension 0 mappedWhenManaged MappedWhenManaged Boolean True orientation Orientation XtOrientation vertical - vSpace VSpace Dimension 4 + vSpace VSpace Dimension 4 width Width Dimension 0 x Position Position 0 y Position Position 0 @@ -83,7 +83,7 @@ SOFTWARE. #ifndef XawNdisplayList #define XawNdisplayList "displayList" #endif - + #ifndef XawCDisplayList #define XawCDisplayList "DisplayList" #endif diff --git a/include/X11/Xaw/BoxP.h b/include/X11/Xaw/BoxP.h old mode 100755 new mode 100644 index 87f2ac4..b3c2573 --- a/include/X11/Xaw/BoxP.h +++ b/include/X11/Xaw/BoxP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -91,7 +91,7 @@ typedef struct { typedef struct _BoxRec { CorePart core; CompositePart composite; - BoxPart box; + BoxPart box; } BoxRec; #endif /* _XawBoxP_h */ diff --git a/include/X11/Xaw/Cardinals.h b/include/X11/Xaw/Cardinals.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/Command.h b/include/X11/Xaw/Command.h old mode 100755 new mode 100644 index 7bfac2e..7011fde --- a/include/X11/Xaw/Command.h +++ b/include/X11/Xaw/Command.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/CommandP.h b/include/X11/Xaw/CommandP.h old mode 100755 new mode 100644 index 9d9d1dc..d0be64e --- a/include/X11/Xaw/CommandP.h +++ b/include/X11/Xaw/CommandP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -57,7 +57,7 @@ SOFTWARE. typedef enum { HighlightNone, /* Do not highlight */ HighlightWhenUnset, /* Highlight only when unset, this is - to preserve current command widget + to preserve current command widget functionality */ HighlightAlways /* Always highlight, lets the toggle widget and other subclasses do the right thing */ @@ -85,14 +85,14 @@ typedef struct { XtCallbackList callbacks; /* private state */ - Pixmap gray_pixmap; - GC normal_GC; - GC inverse_GC; - Boolean set; + Pixmap gray_pixmap; + GC normal_GC; + GC inverse_GC; + Boolean set; XtCommandHighlight highlighted; /* more resources */ - int shape_style; + int shape_style; Dimension corner_round; #ifndef OLDXAW diff --git a/include/X11/Xaw/Dialog.h b/include/X11/Xaw/Dialog.h old mode 100755 new mode 100644 index d4442c3..442d2d2 --- a/include/X11/Xaw/Dialog.h +++ b/include/X11/Xaw/Dialog.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/DialogP.h b/include/X11/Xaw/DialogP.h old mode 100755 new mode 100644 index 755d9bd..8fb4735 --- a/include/X11/Xaw/DialogP.h +++ b/include/X11/Xaw/DialogP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/Form.h b/include/X11/Xaw/Form.h old mode 100755 new mode 100644 index bc818e9..71a0bcc --- a/include/X11/Xaw/Form.h +++ b/include/X11/Xaw/Form.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -135,7 +135,7 @@ typedef enum { #ifndef XawNdisplayList #define XawNdisplayList "displayList" #endif - + #ifndef XawCDisplayList #define XawCDisplayList "DisplayList" #endif @@ -163,5 +163,5 @@ void XawFormDoLayout ); _XFUNCPROTOEND - + #endif /* _XawForm_h */ diff --git a/include/X11/Xaw/FormP.h b/include/X11/Xaw/FormP.h old mode 100755 new mode 100644 index fe658b5..43a58e9 --- a/include/X11/Xaw/FormP.h +++ b/include/X11/Xaw/FormP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/Grip.h b/include/X11/Xaw/Grip.h old mode 100755 new mode 100644 index 131cf23..e8892ae --- a/include/X11/Xaw/Grip.h +++ b/include/X11/Xaw/Grip.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/GripP.h b/include/X11/Xaw/GripP.h old mode 100755 new mode 100644 index bc7f96f..427948a --- a/include/X11/Xaw/GripP.h +++ b/include/X11/Xaw/GripP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/Label.h b/include/X11/Xaw/Label.h old mode 100755 new mode 100644 index 1ce32bc..175f1c1 --- a/include/X11/Xaw/Label.h +++ b/include/X11/Xaw/Label.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/LabelP.h b/include/X11/Xaw/LabelP.h old mode 100755 new mode 100644 index 755e171..e8cc611 --- a/include/X11/Xaw/LabelP.h +++ b/include/X11/Xaw/LabelP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -56,7 +56,7 @@ SOFTWARE. /* New fields for the Label widget class record */ typedef struct { - XtPointer extension; + XtPointer extension; } LabelClassPart; /* Full class record declaration */ @@ -73,7 +73,7 @@ typedef struct { /* resources */ Pixel foreground; XFontStruct *font; - XFontSet fontset; + XFontSet fontset; char *label; XtJustify justify; Dimension internal_width; diff --git a/include/X11/Xaw/List.h b/include/X11/Xaw/List.h old mode 100755 new mode 100644 index e00569c..7fc59f4 --- a/include/X11/Xaw/List.h +++ b/include/X11/Xaw/List.h @@ -23,11 +23,11 @@ in this Software without prior written authorization from The Open Group. */ /* This is the List widget, it is useful to display a list, without the - * overhead of having a widget for each item in the list. It allows + * overhead of having a widget for each item in the list. It allows * the user to select an item in a list and notifies the application through * a callback function. * - * Created: 8/13/88 + * Created: 8/13/88 * By: Chris D. Peterson * MIT X Consortium */ @@ -49,7 +49,7 @@ in this Software without prior written authorization from The Open Group. cursor Cursor Cursor left_ptr cursorName Cursor String NULL defaultColumns Columns int 2 **5 - destroyCallback Callback Pointer NULL + destroyCallback Callback Pointer NULL font Font XFontStruct* XtDefaultFont forceColumns Columns Boolean False **5 foreground Foreground Pixel XtDefaultForeground @@ -75,28 +75,28 @@ in this Software without prior written authorization from The Open Group. is set to the minimum size necessay to fit the entire list. If both Width and Height are zero then they are adjusted to fit the - entire list that is created width the number of default columns + entire list that is created width the number of default columns specified in the defaultColumns resource. **2 - This is an array of strings the specify elements of the list. - This resource must be specified. + This resource must be specified. (What good is a list widget without a list?? :-) **3 - Longest is the length of the widest string in pixels. **4 - If either of these values are zero (0) then the list widget calculates - the correct value. + the correct value. - (This allows you to make startup faster if you already have + (This allows you to make startup faster if you already have this information calculated) - NOTE: If the numberStrings value is zero the list must + NOTE: If the numberStrings value is zero the list must be NULL terminated. **5 - By setting the List.Columns resource you can force the application to - have a given number of columns. - - **6 - This returns the name and index of the item selected in an + have a given number of columns. + + **6 - This returns the name and index of the item selected in an XawListReturnStruct that is pointed to by the client_data in the CallbackProc. @@ -105,7 +105,7 @@ in this Software without prior written authorization from The Open Group. /* * Value returned when there are no highlighted objects */ -#define XAW_LIST_NONE -1 +#define XAW_LIST_NONE -1 #define XtCList "List" #define XtCSpacing "Spacing" @@ -124,7 +124,7 @@ in this Software without prior written authorization from The Open Group. #define XtNrowSpacing "rowSpacing" #define XtNverticalList "verticalList" #define XtNshowCurrent "showCurrent" - + #ifndef XtNfontSet #define XtNfontSet "fontSet" #endif diff --git a/include/X11/Xaw/ListP.h b/include/X11/Xaw/ListP.h old mode 100755 new mode 100644 index 4a83c9a..5f53982 --- a/include/X11/Xaw/ListP.h +++ b/include/X11/Xaw/ListP.h @@ -23,11 +23,11 @@ in this Software without prior written authorization from The Open Group. */ -/* +/* * This is a List widget. It allows the user to select an item in a list and * notifies the application through a callback function. * - * Created: 8/13/88 + * Created: 8/13/88 * By: Chris D. Peterson * MIT - Project Athena */ diff --git a/include/X11/Xaw/MenuButtoP.h b/include/X11/Xaw/MenuButtoP.h old mode 100755 new mode 100644 index 277cdfc..8ee3195 --- a/include/X11/Xaw/MenuButtoP.h +++ b/include/X11/Xaw/MenuButtoP.h @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. * Date: May 2, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ diff --git a/include/X11/Xaw/MenuButton.h b/include/X11/Xaw/MenuButton.h old mode 100755 new mode 100644 index 2df6191..93f0963 --- a/include/X11/Xaw/MenuButton.h +++ b/include/X11/Xaw/MenuButton.h @@ -38,7 +38,7 @@ in this Software without prior written authorization from The Open Group. * Date: May 2, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ diff --git a/include/X11/Xaw/MultiSink.h b/include/X11/Xaw/MultiSink.h old mode 100755 new mode 100644 index 72ba289..3519acc --- a/include/X11/Xaw/MultiSink.h +++ b/include/X11/Xaw/MultiSink.h @@ -51,13 +51,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/MultiSinkP.h b/include/X11/Xaw/MultiSinkP.h old mode 100755 new mode 100644 index a2867b6..019f5f4 --- a/include/X11/Xaw/MultiSinkP.h +++ b/include/X11/Xaw/MultiSinkP.h @@ -52,13 +52,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -78,8 +78,8 @@ SOFTWARE. /* * MultiSink Object Private Data */ -#include <X11/Xaw/TextSinkP.h> -#include <X11/Xaw/MultiSink.h> +#include <X11/Xaw/TextSinkP.h> +#include <X11/Xaw/MultiSink.h> /* new fields for the MultiSink object class */ typedef struct _MultiSinkClassPart { diff --git a/include/X11/Xaw/MultiSrc.h b/include/X11/Xaw/MultiSrc.h old mode 100755 new mode 100644 index 7c8a1c4..628da0c --- a/include/X11/Xaw/MultiSrc.h +++ b/include/X11/Xaw/MultiSrc.h @@ -71,7 +71,7 @@ in this Software without prior written authorization from The Open Group. useStringInPlace UseStringInPlace Boolean False */ - + extern WidgetClass multiSrcObjectClass; typedef struct _MultiSrcClassRec *MultiSrcObjectClass; diff --git a/include/X11/Xaw/MultiSrcP.h b/include/X11/Xaw/MultiSrcP.h old mode 100755 new mode 100644 index a3609cc..95642a4 --- a/include/X11/Xaw/MultiSrcP.h +++ b/include/X11/Xaw/MultiSrcP.h @@ -52,13 +52,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -80,11 +80,11 @@ SOFTWARE. * Date: June 29, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ -/* +/* * This file was changed from AsciiSrcP.h. * * By Li Yuhong, Sept. 18, 1990 @@ -107,10 +107,10 @@ SOFTWARE. #endif #endif -typedef struct _MultiPiece { /* Piece of the text file of BUFSIZ allocated +typedef struct _MultiPiece { /* Piece of the text file of BUFSIZ allocated characters */ wchar_t* text; /* The text in this buffer */ - XawTextPosition used; /* The number of characters of this buffer + XawTextPosition used; /* The number of characters of this buffer that have been used */ struct _MultiPiece *prev, *next; /* linked list pointers */ } MultiPiece; @@ -153,7 +153,7 @@ typedef struct _MultiSrcPart { #endif Boolean allocated_string; /* Have I allocated the string in multi_src->string? */ - XawTextPosition length; /* length of file - IN CHARACTERS, NOT BYTES */ + XawTextPosition length; /* length of file - IN CHARACTERS, NOT BYTES */ MultiPiece *first_piece; /* first piece of the text */ #ifndef OLDXAW XtPointer pad[4]; /* for future use and keep binary compatability */ diff --git a/include/X11/Xaw/Paned.h b/include/X11/Xaw/Paned.h old mode 100755 new mode 100644 index c5b96b5..4b7e115 --- a/include/X11/Xaw/Paned.h +++ b/include/X11/Xaw/Paned.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -92,7 +92,7 @@ SOFTWARE. verticalGripCursor Cursor Cursor sb_v_double_arrow width Width Dimension 0 x Position Position 0 - y Position Position 0 + y Position Position 0 ** These resources now are set to the vertical or horizontal cursor depending upon orientation, by default. If a value is specified here @@ -107,7 +107,7 @@ CONSTRAINT RESOURCES: max Max Dimension unlimited min Min Dimension Grip Size preferredPaneSize PreferredPaneSize Dimension PANED_ASK_CHILD - resizeToPreferred Boolean Boolean False + resizeToPreferred Boolean Boolean False showGrip ShowGrip Boolean True skipAdjust Boolean Boolean False @@ -152,7 +152,7 @@ typedef struct _PanedClassRec *PanedWidgetClass; typedef struct _PanedRec *PanedWidget; /* - * Public Procedures + * Public Procedures */ _XFUNCPROTOBEGIN diff --git a/include/X11/Xaw/PanedP.h b/include/X11/Xaw/PanedP.h old mode 100755 new mode 100644 index 08dcd3b..4e40eaf --- a/include/X11/Xaw/PanedP.h +++ b/include/X11/Xaw/PanedP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -90,7 +90,7 @@ typedef struct _PanedConstraintsPart { Dimension preferred_size; /* The Preferred size of the pane. If this is zero then ask child for size*/ Boolean resize_to_pref; /* resize this pane to its preferred size - on a resize or change managed after + on a resize or change managed after realize */ /* Private state */ @@ -98,7 +98,7 @@ typedef struct _PanedConstraintsPart { Position olddelta; /* The last value of dy */ Boolean paned_adjusted_me; /* Has the vpaned adjusted this widget w/o user interaction to make things fit? */ - Dimension wp_size; /* widget's preferred size */ + Dimension wp_size; /* widget's preferred size */ int size; /* the size the widget will actually get */ Widget grip; /* The grip for this child */ } PanedConstraintsPart, *Pane; @@ -120,9 +120,9 @@ typedef struct _PaneStack { /* New Fields for the Paned widget record */ typedef struct { /* resources */ - Position grip_indent; /* Location of grips (offset + Position grip_indent; /* Location of grips (offset from right margin) */ - Boolean refiguremode; /* Whether to refigure changes + Boolean refiguremode; /* Whether to refigure changes right now */ XtTranslations grip_translations; /* grip translation table */ Pixel internal_bp; /* color of internal borders */ diff --git a/include/X11/Xaw/Panner.h b/include/X11/Xaw/Panner.h old mode 100755 new mode 100644 index 0248292..dd37602 --- a/include/X11/Xaw/Panner.h +++ b/include/X11/Xaw/Panner.h @@ -32,16 +32,16 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xaw/Reports.h> /***************************************************************************** - * + * * Panner Widget (subclass of Simple) - * + * * This widget is used to represent navigation in a 2d coordinate system - * + * * Resources: - * + * * Name Class Type Default * ---- ----- ---- ------- - * + * * allowOff AllowOff Boolean FALSE * background Background Pixel XtDefaultBackground * backgroundStipple BackgroundStipple String NULL @@ -60,7 +60,7 @@ in this Software without prior written authorization from The Open Group. * sliderY SliderY Position 0 * sliderWidth SliderWidth Dimension 0 * sliderHeight SliderHeight Dimension 0 - * + * *****************************************************************************/ #ifndef _XtStringDefs_h_ diff --git a/include/X11/Xaw/PannerP.h b/include/X11/Xaw/PannerP.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/Porthole.h b/include/X11/Xaw/Porthole.h old mode 100755 new mode 100644 index d7c260c..2dbcf18 --- a/include/X11/Xaw/Porthole.h +++ b/include/X11/Xaw/Porthole.h @@ -32,26 +32,26 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xaw/Reports.h> /***************************************************************************** - * + * * Porthole Widget (subclass of Composite) - * + * * This widget is similar to a viewport without scrollbars. Child movement * is done by external panners or scrollbars. - * + * * Parameters: - * + * * Name Class Type Default * ---- ----- ---- ------- - * + * * background Background Pixel XtDefaultBackground * border BorderColor Pixel XtDefaultForeground * borderWidth BorderWidth Dimension 1 * height Height Dimension 0 * reportCallback ReportCallback Pointer NULL * width Width Dimension 0 - * x Position Position 0 + * x Position Position 0 * y Position Position 0 - * + * *****************************************************************************/ extern WidgetClass portholeWidgetClass; diff --git a/include/X11/Xaw/PortholeP.h b/include/X11/Xaw/PortholeP.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/Print.h b/include/X11/Xaw/Print.h deleted file mode 100644 index 7946e8a..0000000 --- a/include/X11/Xaw/Print.h +++ /dev/null @@ -1,132 +0,0 @@ -/* $Xorg: Print.h,v 1.1 2003/07/11 19:46:06 gisburn Exp $ */ -/****************************************************************************** - ****************************************************************************** - ** - ** (c) Copyright 2003 Danny Backx <danny.backx@skynet.be> - ** (c) Copyright 2003-2004 Roland Mainz <roland.mainz@nrubsig.org> - ** - ** 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 - ** 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. - ** - ** Except as contained in this notice, the names of the copyright holders shall - ** not be used in advertising or otherwise to promote the sale, use or other - ** dealings in this Software without prior written authorization from said - ** copyright holders. - ** - ****************************************************************************** - *****************************************************************************/ - - -#ifndef _XAW_PRINT_H -#define _XAW_PRINT_H 1 - -#include <X11/extensions/Print.h> - -/* Resources: - NOT WRITTEN YET -*/ - -/* XawPrintConfigureLayoutMode - define how the shell resizes/moves itself - * to match the paper size - * Values: - * - XawPrintLAYOUTMODE_NONE - * do nothing - * - XawPrintLAYOUTMODE_PAGESIZE - * set width/height to page size - * (this is the default (mainly for compatibilty to XmPrintShell)) - * - XawPrintLAYOUTMODE_DRAWABLEAREA - * set x/y/width/height to drawable area of pag - */ -typedef -enum -{ - XawPrintLAYOUTMODE_NONE, - XawPrintLAYOUTMODE_PAGESIZE, - XawPrintLAYOUTMODE_DRAWABLEAREA -} XawPrintConfigureLayoutMode; - - -#define XawNstartJobCallback "startJobCallback" -#define XawNendJobCallback "endJobCallback" -#define XawNdocSetupCallback "docSetupCallback" -#define XawNpageSetupCallback "pageSetupCallback" -#define XawNlayoutMode "layoutMode" -#define XawCLayoutMode "LayoutMode" -#define XawNminX "minX" -#define XawCMinX "MinX" -#define XawNminY "minY" -#define XawCMinY "MinY" -#define XawNmaxX "maxX" -#define XawCMaxX "MaxX" -#define XawNmaxY "maxY" -#define XawCMaxY "MaxY" -#define XawNcurrDocNumInJob "currDocNumInJob" -#define XawCCurrDocNumInJob "CurrDocNumInJob" -#define XawNcurrPageNumInDoc "currPageNumInDoc" -#define XawCCurrPageNumInDoc "CurrPageNumInDoc" -#define XawNcurrPageNumInJob "currPageNumInJob" -#define XawCCurrPageNumInJob "CurrPageNumInJob" -#define XawNdefaultPixmapResolution "defaultPixmapResolution" -#define XawCDefaultPixmapResolution "DefaultPixmapResolution" - -#define XawCR_START_JOB 70 -#define XawCR_END_JOB 71 -#define XawCR_DOC_SETUP 72 -#define XawCR_PAGE_SETUP 73 - -typedef struct -{ - int reason; - XEvent *event; - XPContext context; - Boolean last_page_in_doc; - Boolean last_page_in_job; - XtPointer detail; -} XawPrintShellCallbackStruct; - -extern WidgetClass xawPrintShellWidgetClass; -typedef struct XawPrintShellRec *XawPrintShellWidget; - -/************************************************************ - * - * Public Functions. - * - ************************************************************/ - -_XFUNCPROTOBEGIN - -/* Returns whether the widget passed in is a print shell or "print shell"-like - * widget (e.g. print preview). - * Note that this will return |True| for more classes than |XawPrintShell| in - * the future (like for |XmPrintShell| etc.) - */ -extern Boolean XawIsPrintShell( -#if NeedFunctionPrototypes - Widget w -#endif -); - -extern void XawPrintRedisplayWidget( -#if NeedFunctionPrototypes - Widget w /* Widget */ -#endif -); - -_XFUNCPROTOEND - -#endif /* !_XAW_PRINT_H */ - diff --git a/include/X11/Xaw/PrintSP.h b/include/X11/Xaw/PrintSP.h deleted file mode 100644 index e0aca27..0000000 --- a/include/X11/Xaw/PrintSP.h +++ /dev/null @@ -1,135 +0,0 @@ -/* $Xorg: PrintSP.h,v 1.1 2003/07/11 19:46:06 gisburn Exp $ */ -/****************************************************************************** - ****************************************************************************** - ** - ** (c) Copyright 2003 Danny Backx <danny.backx@skynet.be> - ** (c) Copyright 2003-2004 Roland Mainz <roland.mainz@nrubsig.org> - ** - ** 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 - ** 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. - ** - ** Except as contained in this notice, the names of the copyright holders shall - ** not be used in advertising or otherwise to promote the sale, use or other - ** dealings in this Software without prior written authorization from said - ** copyright holders. - ** - ****************************************************************************** - *****************************************************************************/ - -#ifndef _XAW_PRINTSP_H -#define _XAW_PRINTSP_H 1 - -#include <X11/CoreP.h> -#include <X11/ShellP.h> - -_XFUNCPROTOBEGIN - -/* New fields for the XawPrintShell widget class record */ - -typedef struct { - XtPointer extension; /* pointer to extension record */ -} XawPrintShellClassPart; - -typedef struct XawPrintShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; - TopLevelShellClassPart top_level_shell_class; - ApplicationShellClassPart application_shell_class; - XawPrintShellClassPart print_shell_class; -} XawPrintShellClassRec; - -extern XawPrintShellClassRec xawPrintShellClassRec; - -/* New fields for the XawPrint shell widget */ - -typedef struct { - XtCallbackList start_job_callback, - end_job_callback, - doc_setup_callback, - page_setup_callback; - XtEnum layoutmode; /* see XawPrintConfigureLayoutMode */ - unsigned short page_width, - page_height; - Dimension min_x, - min_y, - max_x, - max_y; - unsigned int curr_doc_num_in_job, /* Current document number in job */ - curr_page_num_in_doc, /* Current page number in doc */ - curr_page_num_in_job; /* Current page number in job */ - unsigned short default_pixmap_resolution; - long print_resolution; - Boolean last_page_in_doc; - Boolean last_page_in_job; -} XawPrintShellPart; - -typedef struct XawPrintShellRec { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TopLevelShellPart topLevel; - ApplicationShellPart application; - XawPrintShellPart print; -} XawPrintShellRec; -extern WidgetClass xawPrintShellWidgetClass; - -#define PS_StartJobCallback(w) \ - (((XawPrintShellWidget) (w))->print.start_job_callback) -#define PS_EndJobCallback(w) \ - (((XawPrintShellWidget) (w))->print.end_job_callback) -#define PS_DocSetupCallback(w) \ - (((XawPrintShellWidget) (w))->print.doc_setup_callback) -#define PS_PageSetupCallback(w) \ - (((XawPrintShellWidget) (w))->print.page_setup_callback) -#define PS_LayoutMode(w) \ - (((XawPrintShellWidget) (w))->print.layoutmode) -#define PS_PageWidth(w) \ - (((XawPrintShellWidget) (w))->print.page_width) -#define PS_PageHeight(w) \ - (((XawPrintShellWidget) (w))->print.page_height) -#define PS_MinX(w) \ - (((XawPrintShellWidget) (w))->print.min_x) -#define PS_MinY(w) \ - (((XawPrintShellWidget) (w))->print.min_y) -#define PS_MaxX(w) \ - (((XawPrintShellWidget) (w))->print.max_x) -#define PS_MaxY(w) \ - (((XawPrintShellWidget) (w))->print.max_y) -#define PS_CurrDocNumInJob(w) \ - (((XawPrintShellWidget) (w))->print.curr_doc_num_in_job) -#define PS_CurrPageNumInDoc(w) \ - (((XawPrintShellWidget) (w))->print.curr_page_num_in_doc) -#define PS_CurrPageNumInJob(w) \ - (((XawPrintShellWidget) (w))->print.curr_page_num_in_job) -#define PS_DefaultPixmapResolution(w) \ - (((XawPrintShellWidget) (w))->print.default_pixmap_resolution) -#define PS_PrintResolution(w) \ - (((XawPrintShellWidget) (w))->print.print_resolution) -#define PS_LastPageInDoc(w) \ - (((XawPrintShellWidget) (w))->print.last_page_in_doc) -#define PS_LastPageInJob(w) \ - (((XawPrintShellWidget) (w))->print.last_page_in_job) - -_XFUNCPROTOEND - -#endif /* !_XAW_PRINTSP_H */ - diff --git a/include/X11/Xaw/Repeater.h b/include/X11/Xaw/Repeater.h old mode 100755 new mode 100644 index f09af2d..6b712ca --- a/include/X11/Xaw/Repeater.h +++ b/include/X11/Xaw/Repeater.h @@ -31,16 +31,16 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xaw/Command.h> /***************************************************************************** - * + * * Repeater Widget (subclass of Command) - * + * * This widget is a push button that repeatedly fires when held down - * + * * Parameters: - * + * * Name Class Type Default * ---- ----- ---- ------- - * + * * decay Decay int 5 milliseconds * flash Boolean Boolean FALSE * initialDelay Delay int 200 milliseconds @@ -48,7 +48,7 @@ in this Software without prior written authorization from The Open Group. * repeatDelay Delay int 50 milliseconds * startCallback StartCallback XtCallbackList NULL * stopCallback StopCallback XtCallbackList NULL - * + * *****************************************************************************/ #define XtNdecay "decay" diff --git a/include/X11/Xaw/RepeaterP.h b/include/X11/Xaw/RepeaterP.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/Reports.h b/include/X11/Xaw/Reports.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/Scrollbar.h b/include/X11/Xaw/Scrollbar.h old mode 100755 new mode 100644 index 1a8ef6a..904aad9 --- a/include/X11/Xaw/Scrollbar.h +++ b/include/X11/Xaw/Scrollbar.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -125,7 +125,7 @@ void XawScrollbarSetThumb #else float top, float shown -#endif +#endif ); _XFUNCPROTOEND diff --git a/include/X11/Xaw/ScrollbarP.h b/include/X11/Xaw/ScrollbarP.h old mode 100755 new mode 100644 index ed77d2b..b36472d --- a/include/X11/Xaw/ScrollbarP.h +++ b/include/X11/Xaw/ScrollbarP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/Simple.h b/include/X11/Xaw/Simple.h old mode 100755 new mode 100644 index 52b2970..ff38f16 --- a/include/X11/Xaw/Simple.h +++ b/include/X11/Xaw/Simple.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/SimpleMenP.h b/include/X11/Xaw/SimpleMenP.h old mode 100755 new mode 100644 index 34ee86a..e01c151 --- a/include/X11/Xaw/SimpleMenP.h +++ b/include/X11/Xaw/SimpleMenP.h @@ -73,7 +73,7 @@ typedef struct _SimpleMenuPart { /* private */ Boolean recursive_set_values; /* contain a possible infinite loop */ - Boolean menu_width; /* If true then force width to remain + Boolean menu_width; /* If true then force width to remain core.width */ Boolean menu_height; /* Just like menu_width, but for height */ SmeObject entry_set; /* The entry that is currently set or @@ -90,7 +90,7 @@ typedef struct _SimpleMenuPart { typedef struct _SimpleMenuRec { CorePart core; - CompositePart composite; + CompositePart composite; ShellPart shell; OverrideShellPart override; SimpleMenuPart simple_menu; diff --git a/include/X11/Xaw/SimpleMenu.h b/include/X11/Xaw/SimpleMenu.h old mode 100755 new mode 100644 index 633fb17..79f7216 --- a/include/X11/Xaw/SimpleMenu.h +++ b/include/X11/Xaw/SimpleMenu.h @@ -38,7 +38,7 @@ in this Software without prior written authorization from The Open Group. * Date: April 3, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ diff --git a/include/X11/Xaw/SimpleP.h b/include/X11/Xaw/SimpleP.h old mode 100755 new mode 100644 index d69aa69..d801162 --- a/include/X11/Xaw/SimpleP.h +++ b/include/X11/Xaw/SimpleP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/Sme.h b/include/X11/Xaw/Sme.h old mode 100755 new mode 100644 index 758b53d..b395ae7 --- a/include/X11/Xaw/Sme.h +++ b/include/X11/Xaw/Sme.h @@ -25,12 +25,12 @@ in this Software without prior written authorization from The Open Group. /* * This is the public header file for the Athena Sme object. - * It is intended to be used with the simple menu widget. + * It is intended to be used with the simple menu widget. * * Date: April 3, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ diff --git a/include/X11/Xaw/SmeBSB.h b/include/X11/Xaw/SmeBSB.h old mode 100755 new mode 100644 index 88bc15a..ab6fda7 --- a/include/X11/Xaw/SmeBSB.h +++ b/include/X11/Xaw/SmeBSB.h @@ -33,7 +33,7 @@ in this Software without prior written authorization from The Open Group. * Date: April 3, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ diff --git a/include/X11/Xaw/SmeBSBP.h b/include/X11/Xaw/SmeBSBP.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/SmeLine.h b/include/X11/Xaw/SmeLine.h old mode 100755 new mode 100644 index 34e9595..af4406f --- a/include/X11/Xaw/SmeLine.h +++ b/include/X11/Xaw/SmeLine.h @@ -26,12 +26,12 @@ in this Software without prior written authorization from The Open Group. /* * This is the public header file for the Athena SmeLine object. - * It is intended to be used with the simple menu widget. + * It is intended to be used with the simple menu widget. * * Date: April 3, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ diff --git a/include/X11/Xaw/SmeLineP.h b/include/X11/Xaw/SmeLineP.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/SmeP.h b/include/X11/Xaw/SmeP.h old mode 100755 new mode 100644 index ad35515..bd4bd9d --- a/include/X11/Xaw/SmeP.h +++ b/include/X11/Xaw/SmeP.h @@ -25,12 +25,12 @@ in this Software without prior written authorization from The Open Group. /* * This is the private header file for the Athena Sme object. - * This object is intended to be used with the simple menu widget. + * This object is intended to be used with the simple menu widget. * * Date: April 3, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ diff --git a/include/X11/Xaw/StripCharP.h b/include/X11/Xaw/StripCharP.h old mode 100755 new mode 100644 index 974291a..a0085b4 --- a/include/X11/Xaw/StripCharP.h +++ b/include/X11/Xaw/StripCharP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -63,7 +63,7 @@ typedef struct { Pixel hipixel; /* color index for lines */ GC fgGC; /* graphics context for fgpixel */ GC hiGC; /* graphics context for hipixel */ - + /* private */ int update; /* update frequence */ int scale; /* scale factor */ diff --git a/include/X11/Xaw/StripChart.h b/include/X11/Xaw/StripChart.h old mode 100755 new mode 100644 index 7404163..17e9299 --- a/include/X11/Xaw/StripChart.h +++ b/include/X11/Xaw/StripChart.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -61,7 +61,7 @@ SOFTWARE. Name Class RepType Default Value ---- ----- ------- ------------- accelerators Accelerators AcceleratorTable NULL - ancestorSensitive AncestorSensitive Boolean True + ancestorSensitive AncestorSensitive Boolean True background Background Pixel XtDefaultBackground backgroundPixmap Pixmap Pixmap XtUnspecifiedPixmap borderColor BorderColor Pixel XtDefaultForeground @@ -107,7 +107,7 @@ SOFTWARE. #define XtNminScale "minScale" #define XtNscale "scale" #define XtNvmunix "vmunix" - + typedef struct _StripChartRec *StripChartWidget; typedef struct _StripChartClassRec *StripChartWidgetClass; diff --git a/include/X11/Xaw/Template.c b/include/X11/Xaw/Template.c old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/Template.h b/include/X11/Xaw/Template.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/TemplateP.h b/include/X11/Xaw/TemplateP.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/Text.h b/include/X11/Xaw/Text.h old mode 100755 new mode 100644 index c2153bf..78c1478 --- a/include/X11/Xaw/Text.h +++ b/include/X11/Xaw/Text.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -52,7 +52,7 @@ SOFTWARE. /* - Class: textWidgetClass + Class: textWidgetClass Class Name: Text Superclass: Simple diff --git a/include/X11/Xaw/TextP.h b/include/X11/Xaw/TextP.h old mode 100755 new mode 100644 index 2653500..60f4624 --- a/include/X11/Xaw/TextP.h +++ b/include/X11/Xaw/TextP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -104,10 +104,10 @@ typedef struct { typedef struct _XawTextSelectionSalt { struct _XawTextSelectionSalt *next; XawTextSelection s; - /* + /* * The element "contents" stores the CT string which is gotten in the * function _XawTextSaltAwaySelection() - */ + */ char *contents; int length; } XawTextSelectionSalt; @@ -158,11 +158,11 @@ struct SearchAndReplace { Widget search_popup; /* The poppup widget that allows searches.*/ Widget label1; /* The label widgets for the search window. */ Widget label2; - Widget left_toggle; /* The left search toggle radioGroup. */ + Widget left_toggle; /* The left search toggle radioGroup. */ Widget right_toggle; /* The right search toggle radioGroup. */ Widget rep_label; /* The Replace label string. */ Widget rep_text; /* The Replace text field. */ - Widget search_text; /* The Search text field. */ + Widget search_text; /* The Search text field. */ Widget rep_one; /* The Replace one button. */ Widget rep_all; /* The Replace all button. */ #ifndef OLDXAW diff --git a/include/X11/Xaw/TextSink.h b/include/X11/Xaw/TextSink.h old mode 100755 new mode 100644 index 1bbe92c..f3dd968 --- a/include/X11/Xaw/TextSink.h +++ b/include/X11/Xaw/TextSink.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -65,7 +65,7 @@ SOFTWARE. background Background Pixel XtDefaultBackground cursorColor Color Pixel XtDefaultForeground */ - + /* Class record constants */ extern WidgetClass textSinkObjectClass; @@ -103,7 +103,7 @@ _XFUNCPROTOBEGIN * highlight - hightlight this text? * * Description: - * Stub function that in subclasses will display text. + * Stub function that in subclasses will display text. * * Note: * This function doesn't actually display anything, it is only a place @@ -337,7 +337,7 @@ void XawTextSinkSetTabs int tab_count, int *tabs ); - + /* * Function: * XawTextSinkGetCursorBounds diff --git a/include/X11/Xaw/TextSinkP.h b/include/X11/Xaw/TextSinkP.h old mode 100755 new mode 100644 index c8cb2b8..78f41d2 --- a/include/X11/Xaw/TextSinkP.h +++ b/include/X11/Xaw/TextSinkP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/TextSrc.h b/include/X11/Xaw/TextSrc.h old mode 100755 new mode 100644 index 89bd5c2..2c65e66 --- a/include/X11/Xaw/TextSrc.h +++ b/include/X11/Xaw/TextSrc.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -60,7 +60,7 @@ SOFTWARE. sourceChanged Changed Boolean False */ - + /* Class record constants */ extern WidgetClass textSrcObjectClass; @@ -169,7 +169,7 @@ int XawTextSourceReplace * dir - direction to scan * count - which occurance if this thing to search for * include - whether or not to include the character found in - * the position that is returned. + * the position that is returned. * * Description: * Scans the text source for the number and type of item specified. diff --git a/include/X11/Xaw/TextSrcP.h b/include/X11/Xaw/TextSrcP.h old mode 100755 new mode 100644 index 023d737..27514c2 --- a/include/X11/Xaw/TextSrcP.h +++ b/include/X11/Xaw/TextSrcP.h @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/Tip.h b/include/X11/Xaw/Tip.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/TipP.h b/include/X11/Xaw/TipP.h old mode 100755 new mode 100644 diff --git a/include/X11/Xaw/Toggle.h b/include/X11/Xaw/Toggle.h old mode 100755 new mode 100644 index 1e57d38..f6c6b97 --- a/include/X11/Xaw/Toggle.h +++ b/include/X11/Xaw/Toggle.h @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. * Author: Chris D. Peterson * MIT X Consortium * kit@expo.lcs.mit.edu - * + * * Date: January 12, 1989 */ @@ -105,7 +105,7 @@ typedef struct _ToggleRec *ToggleWidget; */ _XFUNCPROTOBEGIN - + /* * Function: * XawToggleChangeRadioGroup diff --git a/include/X11/Xaw/ToggleP.h b/include/X11/Xaw/ToggleP.h old mode 100755 new mode 100644 index 6735140..a816598 --- a/include/X11/Xaw/ToggleP.h +++ b/include/X11/Xaw/ToggleP.h @@ -24,11 +24,11 @@ in this Software without prior written authorization from The Open Group. */ -/* +/* * Author: Chris D. Peterson * MIT X Consortium * kit@expo.lcs.mit.edu - * + * * Date: January 12, 1989 * */ diff --git a/include/X11/Xaw/Tree.h b/include/X11/Xaw/Tree.h old mode 100755 new mode 100644 index 57ca34a..1747a78 --- a/include/X11/Xaw/Tree.h +++ b/include/X11/Xaw/Tree.h @@ -29,7 +29,7 @@ in this Software without prior written authorization from The Open Group. * purpose and without fee is hereby granted, provided that the above * copyright notice appear in all copies and that both the copyright notice * and this permission notice appear in supporting documentation. - * + * * Prentice Hall and the authors disclaim all warranties with regard * to this software, including all implied warranties of merchantability and * fitness. In no event shall Prentice Hall or the authors be liable @@ -37,12 +37,12 @@ in this Software without prior written authorization from The Open Group. * resulting from loss of use, data or profits, whether in an action of * contract, negligence or other tortious action, arising out of or in * connection with the use or performance of this software. - * + * * Authors: Jim Fulton, MIT X Consortium, * based on a version by Douglas Young, Prentice Hall - * + * * This widget is based on the Tree widget described on pages 397-419 of - * Douglas Young's book "The X Window System, Programming and Applications + * Douglas Young's book "The X Window System, Programming and Applications * with Xt OSF/Motif Edition." The layout code has been rewritten to use * additional blank space to make the structure of the graph easier to see * as well as to support vertical trees. @@ -54,16 +54,16 @@ in this Software without prior written authorization from The Open Group. #include <X11/Xmu/Converters.h> /****************************************************************************** - * + * * Tree Widget (subclass of ConstraintClass) - * + * ****************************************************************************** - * + * * Parameters: - * + * * Name Class Type Default * ---- ----- ---- ------- - * + * * autoReconfigure AutoReconfigure Boolean FALSE * background Background Pixel XtDefaultBackground * foreground Foreground Pixel XtDefaultForeground @@ -71,14 +71,14 @@ in this Software without prior written authorization from The Open Group. * hSpace HSpace Dimension 20 * lineWidth LineWidth Dimension 0 * vSpace VSpace Dimension 6 - * - * + * + * * Constraint Resources attached to children: - * + * * treeGC TreeGC GC NULL * treeParent TreeParent Widget NULL - * - * + * + * *****************************************************************************/ /* new instance field names */ @@ -108,7 +108,7 @@ in this Software without prior written authorization from The Open Group. #ifndef XawNdisplayList #define XawNdisplayList "displayList" #endif - + #ifndef XawCDisplayList #define XawCDisplayList "DisplayList" #endif diff --git a/include/X11/Xaw/TreeP.h b/include/X11/Xaw/TreeP.h old mode 100755 new mode 100644 index 8776e78..01d2bdc --- a/include/X11/Xaw/TreeP.h +++ b/include/X11/Xaw/TreeP.h @@ -28,7 +28,7 @@ in this Software without prior written authorization from The Open Group. * purpose and without fee is hereby granted, provided that the above * copyright notice appear in all copies and that both the copyright notice * and this permission notice appear in supporting documentation. - * + * * Prentice Hall and the authors disclaim all warranties with regard * to this software, including all implied warranties of merchantability and * fitness. In no event shall Prentice Hall or the authors be liable @@ -36,12 +36,12 @@ in this Software without prior written authorization from The Open Group. * resulting from loss of use, data or profits, whether in an action of * contract, negligence or other tortious action, arising out of or in * connection with the use or performance of this software. - * + * * Authors: Jim Fulton, MIT X Consortium, * based on a version by Douglas Young, Prentice Hall - * + * * This widget is based on the Tree widget described on pages 397-419 of - * Douglas Young's book "The X Window System, Programming and Applications + * Douglas Young's book "The X Window System, Programming and Applications * with Xt OSF/Motif Edition." The layout code has been rewritten to use * additional blank space to make the structure of the graph easier to see * as well as to support vertical trees. diff --git a/include/X11/Xaw/VendorEP.h b/include/X11/Xaw/VendorEP.h old mode 100755 new mode 100644 index 1ac0954..b91f10a --- a/include/X11/Xaw/VendorEP.h +++ b/include/X11/Xaw/VendorEP.h @@ -17,12 +17,12 @@ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * SOFTWARE. * * Author: Seiji Kuwari OMRON Corporation * kuwa@omron.co.jp * kuwa%omron.co.jp@uunet.uu.net - */ + */ /* diff --git a/include/X11/Xaw/Viewport.h b/include/X11/Xaw/Viewport.h old mode 100755 new mode 100644 index da08e61..36fab44 --- a/include/X11/Xaw/Viewport.h +++ b/include/X11/Xaw/Viewport.h @@ -27,13 +27,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/ViewportP.h b/include/X11/Xaw/ViewportP.h old mode 100755 new mode 100644 index 5dbadf0..2aeb8a5 --- a/include/X11/Xaw/ViewportP.h +++ b/include/X11/Xaw/ViewportP.h @@ -31,13 +31,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/include/X11/Xaw/XawImP.h b/include/X11/Xaw/XawImP.h old mode 100755 new mode 100644 index 536e5b4..a03eef6 --- a/include/X11/Xaw/XawImP.h +++ b/include/X11/Xaw/XawImP.h @@ -17,12 +17,12 @@ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * SOFTWARE. * * Author: Seiji Kuwari OMRON Corporation * kuwa@omron.co.jp * kuwa%omron.co.jp@uunet.uu.net - */ + */ /* diff --git a/include/X11/Xaw/XawInit.h b/include/X11/Xaw/XawInit.h old mode 100755 new mode 100644 index 3d1359c..73226b2 --- a/include/X11/Xaw/XawInit.h +++ b/include/X11/Xaw/XawInit.h @@ -36,6 +36,7 @@ in this Software without prior written authorization from The Open Group. typedef struct _XawDL XawDisplayList; #endif /* OLDXAW */ +#include <X11/Intrinsic.h> #include <X11/Xfuncproto.h> _XFUNCPROTOBEGIN diff --git a/man/Makefile.am b/man/Makefile.am old mode 100755 new mode 100644 diff --git a/man/Xaw.man b/man/Xaw.man old mode 100755 new mode 100644 index 4c4c9f1..55caefe --- a/man/Xaw.man +++ b/man/Xaw.man @@ -41,7 +41,7 @@ .ns .TP \\$1 .. -.TH Xaw 3 __vendorversion__ +.TH Xaw __libmansuffix__ __vendorversion__ .SH NAME Xaw \- X Athena Widgets .SH DESCRIPTION diff --git a/old-doc/CHANGES b/old-doc/CHANGES index 2eb316a..a6a95fd 100644 --- a/old-doc/CHANGES +++ b/old-doc/CHANGES @@ -28,11 +28,11 @@ AsciiSrc (Text): Memory leak when freeing pieces in a source of type "ascii String" has been plugged. - Buffer is now updated whenever the "string" resource is set using + Buffer is now updated whenever the "string" resource is set using XtSetValues(). If type is file then the file is read in again. Box: - The public header file now includes Xmu/Converters.h for the + The public header file now includes Xmu/Converters.h for the orientation resources. Clock: @@ -53,7 +53,7 @@ Form: Fixed EdgeTypes to be Xaw* instead of Xt*, but left the old definitions around with #define so that code will still work. - StringToWidget converter no longer caches resources. + StringToWidget converter no longer caches resources. Logo: Made subclass of simple instead of Core. @@ -67,13 +67,13 @@ MenuButton: * The MenuButton widget no longer places a server grab on itself. Instead, PopupMenu is registered as a grab action. As a result of this, clients which popped up menus without using XtMenuPopup - or MenuPopup or PopupMenu in the menu button translations will - fail to have a grab active. They should make a call to - XtRegisterGrabAction on the appropriate action in the application + or MenuPopup or PopupMenu in the menu button translations will + fail to have a grab active. They should make a call to + XtRegisterGrabAction on the appropriate action in the application initialization routine, or use a different translation. Paned: - The public header file now includes Xmu/Converters.h for the + The public header file now includes Xmu/Converters.h for the orientation resources. Panner: This widget is new in R5. @@ -86,14 +86,14 @@ Scrollbar: Made subclass of simple instead of Core Type of thumb resource is XtRBitmap; it used to be XtRPixmap. - However, if applications provide the resource conversion, the + However, if applications provide the resource conversion, the Scrollbar's SetValues can still handle pixmaps of correct depth. Simple: Added a color cursor converter. and the new resource types: XtNpointerColor XtNpointerColorBackground - XtNcursorName + XtNcursorName SmeBSB: Right bitmaps are now painted in the correct location. @@ -132,7 +132,7 @@ TextP.h: #define XawDEL 0x7f #define XawBSLASH '\\' - + Toggle: * Toggle widget state is preserved across changes in sensitivity. diff --git a/old-doc/Changelog b/old-doc/Changelog index 263ae04..cabbb2c 100644 --- a/old-doc/Changelog +++ b/old-doc/Changelog @@ -349,7 +349,7 @@ Moved the code clipping code I have put in Text.c in my previous patch to code is now heavily used by the TextWidget. --- XEDIT -- +-- XEDIT -- Removed a XDefineCursor in xedit.c:main(). There are several ways to specify a cursor for a program (most times inherited from the wm decoration window), so, it is better to let the user choose one. @@ -358,7 +358,7 @@ Before starting the main loop, now xedit sets the keyboard focus to the none was especified in the command line (do not use the new xedit without the new Xaw library, or you will not be able to change the keyboard focus). Updated the Scrollbar configurations in Xedit.ad - + #1788 12 July 1998 @@ -368,7 +368,7 @@ Updated the Scrollbar configurations in Xedit.ad + Automatic resize was removed, it is not required with automatic horizontal scroll, but I will look for programs that rely on it; the only program affected (that I know) is xmh, because it popups dialogs of a small size, - and expects that the text widget (with a warning message) do a geometry + and expects that the text widget (with a warning message) do a geometry request. + Scroll mode set to "WhenNeeded" was removed. It generates several unespected conditions when editing text, and the new feature of automatic scrolling @@ -432,7 +432,7 @@ Fixed problem with the default macro for type conversion, where it was possible to the code tell the wrong size of a string, since it was returning the string size with 'strlen' but making the copy with strcpy. Complete ansification of Xaw (and Xmu). -Corrected some problems caused due to an alteration in the text code, to +Corrected some problems caused due to an alteration in the text code, to make the cursor always visible when the wrap mode is 'line' or 'word'. Text.c:VJump() was made a bit smarter and a problem that would cause it to jump incorrectly was also corrected so that now the jumping should be @@ -510,7 +510,7 @@ also fixed a possible buffer overflow while searching the source of the #1945, 31 Aug 1998 --- XAW -- +-- XAW -- + Corrected bug in Viewport.c:ComputeLayout(), that would put the scrollbar in the incorrect position, if w->viewport.useright == True + Corrected bug in Converters.c:_XawCvtCARD32ToString(), so that now it @@ -531,7 +531,7 @@ also fixed a possible buffer overflow while searching the source of the #2028, 2033, 7 Oct 1998 --- Xaw -- +-- Xaw -- Added a delete translation to the text widget, that deletes the current selection if any, else the backwards char. Corrected bug that would not update correctly the screen if page-up or @@ -550,20 +550,20 @@ Added a 'hack' to be able to type ^U<any-numeric-sequence> to be able Corrected a nasty bug in Text.c:CvtStringToScrollMode(); XtConvertAndStore can't be called from a type converter! added UNDO/REDO to the text widget. Please try it, I think it is very nice. - Undo is enabled by the new resource 'enableUndo', and, by default is + Undo is enabled by the new resource 'enableUndo', and, by default is triggered with 'Ctrl+_'. -- editres -- Resubmitting a patch to editres/handler.c, to make editres work properly. --- xedit -- +-- xedit -- NOTE that with this patch, xedit probably will not work with Xaw3d, neXtaw... this surelly can be fixed, or in the xedit side or the *Xaw* side, but the patch seens to be necessary. Changed the defaults file to be more user friendly and previsible. Added some 'Emacs like' binding translations. Added file completion in the filename prompt. This is a very nice - feature, but I'm not sure if the code is portable to all the XFree86 + feature, but I'm not sure if the code is portable to all the XFree86 supported platforms (surely it will not work 'as is' with OS/2). @@ -577,7 +577,7 @@ Changed the functions {Ascii,Multi}Sink.c:CharWidth and PaintText, to surely be made faster (based on comparition with some popular X editors). Changed the way the AsciiSink prints characters with value bigger than 126 decimal. Now it prints DEL as ^?, and the other characters as \XXX - where 'X' is an octal digit. The MultiSink widget was unchanged in this + where 'X' is an octal digit. The MultiSink widget was unchanged in this respect, i.e. when calling xedit with something like: xedit -xrm '*international: true' Converted all calls to strncpy, in AsciiSrc.c to memcpy, so that the (ascii) @@ -593,14 +593,14 @@ Changed Text.c:TextScroll() to be smarter when calculating the offset of Added a nice feature, to show the matching '(', '[' or '{', when a ')', ']' or '}' is typped. Changed TextAction.c:FormParagraph() to generate only one undo/redo step. - + -- xedit -- Changed the defaults file to enable backups and made the backup suffix the character '~'. Replaced all instances of sprintf by XmuSnprintf. Changed xedit to set the label when saving a file also, to reflect what is being edited correctly. -Corrected a bug in the new action 'file-completion', to replace correctly +Corrected a bug in the new action 'file-completion', to replace correctly the home directory, and keep correctly whatever was after the '~'. This isn't the correct place to this code (xedit/commands.c), since there are several other file name prompt windows in Xaw, but since it is required @@ -742,7 +742,7 @@ Added a 'hints' feature to xedit. Instead of a 'dead' #2544 12 Mar 1999 - + -- Xaw -- Mostly changes to add support to latin-* languages in the text code, when not using the international resource. @@ -826,7 +826,7 @@ xedit.c: without it. Just ifdef'ed again the code to avoid warnings or dead code. -- xedit -- - + Added a ispell interface to xedit. Sorry for not documenting enough about it + + Added a ispell interface to xedit. Sorry for not documenting enough about it the man page, but here is a small explanation of the new funcionality: Replace: Replace's the selected word. All (right side of Replace button): Replaces all occurrences of the selected diff --git a/packaging/01_Xaw_StripChart_fix.diff b/packaging/01_Xaw_StripChart_fix.diff deleted file mode 100644 index a58b289..0000000 --- a/packaging/01_Xaw_StripChart_fix.diff +++ /dev/null @@ -1,102 +0,0 @@ -From: "Nikita V. Youshchenko" <yoush@cs.msu.su> -Date: Sat, 02 Nov 2002 17:57:13 +0300 -Subject: A bug in Xaw/StripChart.c causes incorrect scale lines in xload window - -Recently I tried to run xload on a high loaded server (load was more -than 10), and discovered that if window size is rather small, scale -lines are drawn incorrectly (upper than needed). - -This is caused by a bug in Xaw/StripChart.c. -It draws lines with fixed integer steps. Than means that if window -height is 39 pixels, and 10 lines should be drawn to split view into 11 -equal parts, lines will be drawn at 3, 6, 9, ,.., 30. So the bottom part -height will be 9 pixels while other parts height will be 2 pixels. - -This patch makes part heights differ no more than by 1 pixel. - -Debian bug#167448 <http://bugs.debian.org/167448> - -Index: libXaw-X11R7.0-1.0.1/src/StripChart.c -=================================================================== ---- libXaw-X11R7.0-1.0.1.orig/src/StripChart.c 2005-12-30 14:50:24.000000000 -0500 -+++ libXaw-X11R7.0-1.0.1/src/StripChart.c 2006-02-26 19:09:07.000000000 -0500 -@@ -373,12 +373,12 @@ - * the returned value is identical to the initial value of next and data is - * unchanged. Otherwise keeps half a window's worth of data. If data is - * changed, then w->strip_chart.max_value is updated to reflect the -- * largest data point -+ * largest data point. - */ --static int -+static int - repaint_window(StripChartWidget w, int left, int width) - { -- int i, j; -+ int i, j, k; - int next = w->strip_chart.interval; - int scale = w->strip_chart.scale; - int scalewidth = 0; -@@ -423,8 +423,10 @@ - } - - /* Draw graph reference lines */ -+ k = XtHeight(w) % w->strip_chart.scale; - for (i = 1; i < w->strip_chart.scale; i++) { -- j = i * ((int)XtHeight(w) / w->strip_chart.scale); -+ j = i * (XtHeight(w) / w->strip_chart.scale) + -+ ((i * k + w->strip_chart.scale/2) / w->strip_chart.scale); - XDrawLine(dpy, win, w->strip_chart.hiGC, left, j, scalewidth, j); - } - } -@@ -446,7 +448,7 @@ - MoveChart(StripChartWidget w, Bool blit) - { - double old_max; -- int left, i, j; -+ int left, i, j, k; - int next = w->strip_chart.interval; - - if (!XtIsRealized((Widget)w)) -@@ -495,8 +497,10 @@ - - /* Draw graph reference lines */ - left = j; -+ k = XtHeight(w) % w->strip_chart.scale; - for (i = 1; i < w->strip_chart.scale; i++) { -- j = i * (XtHeight(w) / w->strip_chart.scale); -+ j = i * (XtHeight(w) / w->strip_chart.scale) + -+ ((i * k + w->strip_chart.scale/2) / w->strip_chart.scale); - XDrawLine(XtDisplay((Widget)w), XtWindow((Widget)w), - w->strip_chart.hiGC, left, j, XtWidth(w), j); - } -@@ -557,23 +561,26 @@ - StripChartWidget w = (StripChartWidget)widget; - XPoint *points; - Cardinal size; -- int i; -+ int i, k; - - if (w->strip_chart.scale <= 1) { - XtFree((char *)w->strip_chart.points); - w->strip_chart.points = NULL; - return; - } -- -+ - size = sizeof(XPoint) * (w->strip_chart.scale - 1); - - points = (XPoint *)XtRealloc((XtPointer)w->strip_chart.points, size); - w->strip_chart.points = points; - - /* Draw graph reference lines into clip mask */ -- -+ k = XtHeight(w) % w->strip_chart.scale; - for (i = 1; i < w->strip_chart.scale; i++) { - points[i - 1].x = 0; -- points[i - 1].y = XtHeight(w) / w->strip_chart.scale; -+ points[i - 1].y = i * (XtHeight(w) / w->strip_chart.scale) + -+ ((i * k + w->strip_chart.scale/2) / w->strip_chart.scale); - } -+ for (i = w->strip_chart.scale - 1; i > 1; i--) -+ points[i - 1].y -= points[i - 2].y; - } diff --git a/packaging/libXaw.spec b/packaging/libXaw.spec new file mode 100644 index 0000000..a9c7305 --- /dev/null +++ b/packaging/libXaw.spec @@ -0,0 +1,78 @@ +Summary: X Athena Widget Set +Name: libXaw +Version: 1.0.11 +Release: 1 +License: MIT +URL: http://www.x.org +Group: System Environment/Libraries + +Source0: %{name}-%{version}.tar.gz + +BuildRequires: pkgconfig(xproto) pkgconfig(x11) pkgconfig(xt) +BuildRequires: pkgconfig(xmu) pkgconfig(xpm) pkgconfig(xext) +BuildRequires: pkgconfig(xorg-macros) +# Required by the configury. +BuildRequires: ed +BuildRequires: xorg-x11-xutils-dev + +%description +Xaw is a widget set based on the X Toolkit Intrinsics (Xt) Library. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Provides: libxaw-devel +Requires: %{name} = %{version}-%{release} +Requires: pkgconfig +Requires: pkgconfig(xproto) pkgconfig(xmu) pkgconfig(xt) pkgconfig(xpm) + +%description devel +X.Org X11 libXaw development package + +%prep +%setup -q + +%build +export CFLAGS="${CFLAGS} $RPM_OPT_FLAGS -Os" +%reconfigure \ + LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed" \ + --disable-xaw8 --disable-static \ + --disable-xaw6 +make %{?jobs:-j%jobs} + +%install +rm -rf $RPM_BUILD_ROOT + +make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la + +%remove_docs + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc COPYING README ChangeLog +%{_libdir}/libXaw.so.7 +%{_libdir}/libXaw7.so.7 +%{_libdir}/libXaw7.so.7.0.0 + +%files devel +%defattr(-,root,root,-) +%dir %{_includedir}/X11/Xaw +%doc COPYING +%{_includedir}/X11/Xaw/*.h +# FIXME: Is this C file really supposed to be here? +%{_includedir}/X11/Xaw/Template.c +%{_libdir}/libXaw.so +%{_libdir}/libXaw7.so +%{_libdir}/pkgconfig/xaw7.pc +#%{_mandir}/man3/*.3* +#%dir %{_docdir}/%{name}-%{version}-%{release} +#%{_docdir}/%{name}-%{version}-%{release}/*.xml +#{_docdir}/%{name}-%{version}-%{release}/%{name}.html +#{_docdir}/%{name}-%{version}-%{release}/%{name}.txt \ No newline at end of file diff --git a/packaging/libxaw-rpmlintrc b/packaging/libxaw-rpmlintrc deleted file mode 100644 index e9fd97b..0000000 --- a/packaging/libxaw-rpmlintrc +++ /dev/null @@ -1,2 +0,0 @@ -from Config import * -addFilter("libXaw-compat.* devel-file-in-non-devel-package") diff --git a/packaging/libxaw.spec b/packaging/libxaw.spec deleted file mode 100644 index 90cecd1..0000000 --- a/packaging/libxaw.spec +++ /dev/null @@ -1,85 +0,0 @@ - -Name: libxaw -Summary: X.Org X11 libXaw runtime library -Version: 1.0.8 -Release: 2.7 -Group: System/Libraries -License: MIT -URL: http://www.x.org/ -Source0: http://xorg.freedesktop.org/releases/individual/lib/%{name}-%{version}.tar.gz -Source101: libxaw-rpmlintrc -Patch1: 01_Xaw_StripChart_fix.diff -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig -BuildRequires: pkgconfig(xorg-macros) -BuildRequires: pkgconfig(xproto) -BuildRequires: pkgconfig(x11) -BuildRequires: pkgconfig(xext) -BuildRequires: pkgconfig(xextproto) -BuildRequires: pkgconfig(xt) -BuildRequires: pkgconfig(xmu) -BuildRequires: pkgconfig(xpm) - -%description -Description: %{summary} - - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -Description: %{summary} - -%prep -%setup -q -n %{name}-%{version} - -# 01_Xaw_StripChart_fix.diff -%patch1 -p1 - - -%build -export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed" -%reconfigure --disable-xaw6 --disable-xaw8 - -make %{?jobs:-j%jobs} - -%install -rm -rf %{buildroot} -%make_install - -rm -rf %{buildroot}/%{_datadir}/doc/libXaw - - - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - - - - - - -%files -%defattr(-,root,root,-) -%doc COPYING README ChangeLog -%{_libdir}/libXaw.so.7 -%{_libdir}/libXaw7.so.7 -%{_libdir}/libXaw7.so.7.0.0 - - -%files devel -%defattr(-,root,root,-) -%dir %{_includedir}/X11 -%dir %{_includedir}/X11/Xaw -%doc COPYING -%{_includedir}/X11/Xaw/*.h -%{_includedir}/X11/Xaw/Template.c -%{_libdir}/libXaw.so -%{_libdir}/libXaw7.so -%{_libdir}/pkgconfig/xaw7.pc -%{_mandir}/man3/*.3* - - diff --git a/specs/AsciiSink.xml b/specs/AsciiSink.xml old mode 100755 new mode 100644 index 06bc87d..aba588b --- a/specs/AsciiSink.xml +++ b/specs/AsciiSink.xml @@ -38,7 +38,7 @@ handling Tab and Carriage Return.\fP The source object also reports the text window metrics to the text widgets. </para> -<sect2 id="asciisink_resources"> +<sect2 id='AsciiSink::Resources'> <title>Resources diff --git a/specs/AsciiSource.xml b/specs/AsciiSource.xml old mode 100755 new mode 100644 index bd51f99..b3ca6da --- a/specs/AsciiSource.xml +++ b/specs/AsciiSource.xml @@ -50,7 +50,7 @@ into an internal buffer. This buffer may then be modified, provided the text widget is in the correct edit mode, just as if it were a source of type XawAsciiString. Unlike R3 and earlier versions of the AsciiSrc, it is now possible to specify an editable disk source. The file is not -updated, however, until a call to XawAsciiSave is made. When the +updated, however, until a call to is made. When the source is in this mode the useStringInPlace resource is ignored. @@ -68,22 +68,22 @@ In the default case for AsciiSrc objects of type XawAsciiStringuseStringInPlace is false, and the widget owns the string. The initial value of the string resource, and any update made by the application -programmer to the string resource with XtSetValues, is copied +programmer to the string resource with , is copied into memory private to the widget, and managed internally by the widget. The application writer does not need to worry about running out of buffer space (subject to the total memory available to the application). The performance does not decay linearly as the buffer grows large, as is necessarily the case when the text buffer is used -in place. The application writer must use XtGetValues to +in place. The application writer must use to determine the contents of the text buffer, which will return a copy of the widget's text buffer as -it existed at the time of the XtGetValues call. This copy +it existed at the time of the call. This copy is not affected by subsequent updates to the text buffer, i.e., it is not updated as the user types input into the text buffer. This copy is freed upon the next call to XtGetValues to retrieve the string resource; however, to conserve memory, -there is a convenience routine, XawAsciiSourceFreeString, allowing the +there is a convenience routine, , allowing the application programmer to direct the widget to free the copy. @@ -94,12 +94,12 @@ is the string owner. The widget will take the value of the string resource as its own text buffer, and the length resource indicates the buffer size. In this case the buffer contents change as the user types at the widget; -it is not necessary to call XtGetValues on the string +it is not necessary to call on the string resource to determine the contents of the buffer-it will simply return the address of the application's implementation of the text buffer. - + Resources @@ -206,7 +206,7 @@ retrieved from the argument list or from the resource database: - + Convenience Routines @@ -220,11 +220,11 @@ commonly used functionality of the AsciiSrc. When the AsciiSrc widget is not in useStringInPlace mode space must be allocated whenever the file is saved, or the string is -requested with a call to XtGetValues. This memory is allocated on the +requested with a call to . This memory is allocated on the fly, and remains valid until the next time a string needs to be allocated. You may save memory by freeing this string as soon as you are done -with it by calling XawAsciiSourceFreeString. - +with it by calling . + void XawAsciiSourceFreeString Widget w @@ -247,8 +247,8 @@ Specifies the AsciiSrc object. This function will free the memory that contains the string pointer returned -by XtGetValues. This will normally happen automatically when -the next call to XtGetValues occurs, or when the widget is destroyed. +by . This will normally happen automatically when +the next call to occurs, or when the widget is destroyed. @@ -256,8 +256,8 @@ the next call to XtGetValues occurs, or when the widget is To save the changes made in the current text source into a file use -XawAsciiSave. - +. + Boolean XawAsciiSave Widget w @@ -279,7 +279,7 @@ Specifies the AsciiSrc object. -XawAsciiSave returns True if the save was successful. + returns True if the save was successful. It will update the file named in the string resource. If the buffer has not been changed, no action will be taken. This function only works on an AsciiSrc of type XawAsciiFile. @@ -288,8 +288,8 @@ only works on an AsciiSrc of type XawAsciiFile. To save the contents of the current text buffer into a named file use -XawAsciiSaveAsFile. - +. + Boolean XawAsciiSaveAsFile Widget w @@ -323,7 +323,7 @@ The name of the file to save the current buffer into. This function returns True if the save was successful. -XawAsciiSaveAsFile will work with a buffer of either type + will work with a buffer of either type XawAsciiString or type XawAsciiFile. @@ -332,10 +332,10 @@ This function returns True if the save was successful. To find out if the text buffer in an AsciiSrc object has changed -since the last time it was saved with XawAsciiSave or queried +since the last time it was saved with or queried -use XawAsciiSourceChanged. - +use . + Boolean XawAsciiSourceChanged Widget w @@ -359,8 +359,8 @@ Specifies the AsciiSrc object. This function will return True if the source has changed since the last time it was saved or queried. The internal change flag is -reset whenever the string is queried via XtGetValues or the -buffer is saved via XawAsciiSave. +reset whenever the string is queried via or the +buffer is saved via . diff --git a/specs/AsciiText.xml b/specs/AsciiText.xml old mode 100755 new mode 100644 index 1a336d6..156e0c0 --- a/specs/AsciiText.xml +++ b/specs/AsciiText.xml @@ -47,9 +47,9 @@ specifying these resources in a resource file it is necessary to use *AsciiText.resource_name, since they actually belong to the children of the AsciiText widget, and not the AsciiText widget itself. However, these resources may be set directly on the AsciiText widget at -widget creation time, or via XtSetValues. +widget creation time, or via . - + Resources diff --git a/specs/Box.xml b/specs/Box.xml old mode 100755 new mode 100644 index fe93b42..692d7d2 --- a/specs/Box.xml +++ b/specs/Box.xml @@ -38,7 +38,7 @@ are often called ButtonBox widgets, but the children are not limited to buttons. The Box's children are arranged on a background that has its own specified dimensions and color. - + Resources diff --git a/specs/CH1.xml b/specs/CH1.xml old mode 100755 new mode 100644 index a4fb08c..8d913b8 --- a/specs/CH1.xml +++ b/specs/CH1.xml @@ -1,4 +1,4 @@ - + Athena Widgets and The Intrinsics The X Toolkit is made up of two distinct pieces, the Xt Intrinsics and a @@ -42,7 +42,7 @@ design allows for, but does not necessarily encourage, the free mixing of radically differing widget implementations. - + Introduction to the X Toolkit @@ -130,7 +130,7 @@ Format of the Widget Reference Chapters -In addition to the terms already defined for X programming (see +In addition to the terms already defined for X programming (see Xlib - C Language Interface), the following terms are specific to the Intrinsics and Athena widget set and used throughout this document. @@ -646,7 +646,7 @@ resource is changed. This resource is only settable at widget creation time, and may not -be modified with XtSetValues. +be modified with . @@ -716,7 +716,7 @@ resource defaults to False in the Intrinsics, but is redefi default to True when an application is using the Athena widget set. An application programmer may override this default and set the resource back to False if the application does not need the window -manager to give it the input focus. See the +manager to give it the input focus. See the X Toolkit Intrinsics - C Language Interface for details on the input resource. diff --git a/specs/CH2.xml b/specs/CH2.xml old mode 100755 new mode 100644 index 08f0ff5..98ac97e --- a/specs/CH2.xml +++ b/specs/CH2.xml @@ -1,5 +1,5 @@ Using Widgets - + Using Widgets Widgets serve as the primary tools for building a user interface or @@ -35,7 +35,7 @@ description of the programming interface is provided in the document If it is desirable that the application take advantage of internationalization (i18n), you must establish locale with XtSetLanguageProc -before XtDisplayInitialize or XtAppInitialize +before XtDisplayInitialize or is called. For full details, please refer to the document X Toolkit Intrinsics - C Language Interface, section 2.2. However, the following simplest-case call is sufficient in many or most applications. @@ -69,7 +69,7 @@ of programs in the default "C" locale. You must call a toolkit initialization function before invoking any other toolkit routines (besides locale setting, above). -XtAppInitialize + opens the X server connection, parses the command line, and creates an initial widget that will serve as the root of a tree of widgets created by this application. @@ -77,7 +77,7 @@ a tree of widgets created by this application. - + Widget XtAppInitialize XtAppContext app_context_return @@ -126,7 +126,7 @@ first letter of the application name. For example, the application named Specifies how to parse the command line for any application-specific resources. The options argument is passed as a parameter to -XrmParseCommand . +XrmParseCommand. For further information, see Xlib - C Language Interface. @@ -220,10 +220,10 @@ Creating a widget is a three-step process. First, the widget instance is allocated, and various instance-specific attributes are set by using XtCreateWidget. Second, the widget's parent is informed of the new child by using XtManageChild. Finally, X windows are -created for the parent and all its children by using XtRealizeWidget +created for the parent and all its children by using and specifying the top-most widget. The first two steps can be -combined by using XtCreateManagedWidget. In addition, -XtRealizeWidget is automatically called when the child becomes +combined by using . In addition, + is automatically called when the child becomes managed if the parent is already realized. @@ -231,7 +231,7 @@ managed if the parent is already realized. To allocate, initialize, and manage a widget, use XtCreateManagedWidget . - + Widget XtCreateManagedWidget String name @@ -659,7 +659,7 @@ directory is The -XtRealizeWidget + function performs two tasks: @@ -675,7 +675,7 @@ for performance reasons. Creates an X window for the widget and, if it is a composite widget, realizes each of its managed children. - + void XtRealizeWidget Widget w @@ -708,9 +708,9 @@ see the X Toolkit Intrinsics - C Language InterfaceXtAppMainLoop. +events is . - + void XtAppMainLoop XtAppContext app_context @@ -725,7 +725,7 @@ events is XtAppMainLoop. Specifies the application context of this application. The value is -normally returned by XtAppInitialize. +normally returned by . @@ -786,13 +786,13 @@ Set an argument value By default, widget windows are mapped (made viewable) automatically by -XtRealizeWidget. This behavior can be disabled by using -XtSetMappedWhenManaged, making the client responsible for calling -XtMapWidget to make the widget viewable. +. This behavior can be disabled by using +, making the client responsible for calling + to make the widget viewable. - + void XtSetMappedWhenManaged Widget w @@ -821,9 +821,9 @@ Specifies the new value. If map_when_managed is True, the widget is mapped automatically when it is realized. If map_when_managed is False, the client must call -XtMapWidget + or make a second call to -XtSetMappedWhenManaged + to cause the child window to be mapped. @@ -834,10 +834,10 @@ to cause the child window to be mapped. The definition for -XtMapWidget + is: - + void XtMapWidget Widget w @@ -862,13 +862,13 @@ Specifies the widget. When you are creating several children in sequence for a previously realized common parent it is generally more efficient to construct a list of children as they are created (using XtCreateWidget) and -then use XtManageChildren to request that their parent managed +then use to request that their parent managed them all at once. By managing a list of children at one time, the parent can avoid wasteful duplication of geometry processing and the associated ``screen flash''. - + void XtManageChildren WidgetList children @@ -916,9 +916,9 @@ see the X Toolkit Intrinsics - C Language Interface To destroy a widget instance of any type, use -XtDestroyWidget + - + void XtDestroyWidget Widget w @@ -940,7 +940,7 @@ Specifies the widget. -XtDestroyWidget + destroys the widget and recursively destroys any children that it may have, including the windows created by its children. After calling @@ -957,7 +957,7 @@ To retrieve the current value of a resource attribute associated with a widget instance, use XtGetValues . - + void XtGetValues Widget w @@ -1018,7 +1018,7 @@ To modify the current value of a resource attribute associated with a widget instance, use XtSetValues . - + void XtSetValues Widget w @@ -1066,7 +1066,7 @@ Specifies the number of arguments in the argument list. The arguments and values that are passed will depend on the widget being modified. Some widgets may not allow certain resources to be modified after the widget instance has been created or realized. -No notification is given if any part of a XtSetValues request is +No notification is given if any part of a request is ignored. @@ -1076,7 +1076,7 @@ For further information about these functions, see the X Too The argument list entry for -XtGetValues + specifies the address to which the caller wants the value copied. The argument list entry for XtSetValues , @@ -1100,7 +1100,7 @@ Widgets can communicate changes in their state to their clients by means of a callback facility. The format for a client's callback handler is: - + void CallbackProc Widget w @@ -1154,7 +1154,7 @@ it passes the current position of the thumb in call_data Callbacks can be registered either by creating an argument containing the callback list described below or by using the special convenience -routines XtAddCallback and XtAddCallbacks. When the widget +routines and XtAddCallbacks. When the widget is created, a pointer to a list of callback procedure and data pairs can be passed in the argument list to XtCreateWidget . @@ -1191,10 +1191,10 @@ callback when the callback list is executed. The second method for registering callbacks is to use -XtAddCallback + after the widget has been created. - + void XtAddCallback Widget w @@ -1249,7 +1249,7 @@ Specifies the data to be passed to the callback when it is invoked. -XtAddCallback + adds the specified callback to the list for the named widget. @@ -1310,7 +1310,7 @@ and Call the -XtAppInitialize + function before invoking any other toolkit or Xlib functions. For further information, @@ -1336,7 +1336,7 @@ For further information, see Section 2.9.2.2. When the argument list is set up, create the widget with the -XtCreateManagedWidget function. For further information, see + function. For further information, see Section 2.2 and the X Toolkit Intrinsics - C Language Interface. @@ -1346,7 +1346,7 @@ Section 2.2 and the X Toolkit Intrinsics - C Language Interf If the widget has any callback routines, set by the XtNcallback argument or the -XtAddCallback + function, declare these routines within the application. @@ -1355,7 +1355,7 @@ function, declare these routines within the application. After creating the initial widget hierarchy, windows must be created for each widget by calling -XtRealizeWidget + on the top level widget. @@ -1591,7 +1591,7 @@ This matches any widget in the Foo application that is named The root of all application widget trees is the widget returned by -XtAppInitialize. Even though this is actually an +. Even though this is actually an ApplicationShell widget, the toolkit replaces its widget class with the class name of the application. The name of this widget is either the name used to invoke the application (argv[0]) or the name of @@ -1880,11 +1880,12 @@ can be used, as in the first approach, for easier code maintenance. The best way to understand how to use any programming library is by trying some simple examples. A collection of example programs that introduces each of the widgets in that Athena widget set, as well as many -important toolkit programming concepts, is available in the X11R6 +important toolkit programming concepts, is available in the X11R5 contrib release as distributed by the X Consortium. It can be found in the -distribution directory contrib/examples/mit/Xaw, but see your -site administrator for the exact location of these files on your system. -See the README file from that directory for a guide to the examples. +directory contrib/examples/Xaw in the archive +at +See the README file from that directory for a guide +to the examples. diff --git a/specs/CH3.xml b/specs/CH3.xml old mode 100755 new mode 100644 index 8fdefcc..37ee8b5 --- a/specs/CH3.xml +++ b/specs/CH3.xml @@ -1,4 +1,4 @@ - + Simple Widgets diff --git a/specs/CH4.xml b/specs/CH4.xml old mode 100755 new mode 100644 index 00c89f7..0546af5 --- a/specs/CH4.xml +++ b/specs/CH4.xml @@ -1,4 +1,4 @@ - + Menus The Athena widget set provides support for single paned non-hierarchical diff --git a/specs/CH5.xml b/specs/CH5.xml old mode 100755 new mode 100644 index eb3f2fb..2636aff --- a/specs/CH5.xml +++ b/specs/CH5.xml @@ -1,4 +1,4 @@ - + Text Widgets @@ -37,8 +37,8 @@ modifications a user is allowed to make: Read-only mode does not allow the user or the programmer to modify the text in the widget. While the entire string may be reset in -read-only mode with XtSetValues, it cannot be modified via -with XawTextReplace. Append-only and editable modes allow +read-only mode with , it cannot be modified via +with . Append-only and editable modes allow the text at the insertion point to be modified. The only difference is that text may only be added to or removed from the end of a buffer in append-only mode. diff --git a/specs/CH6.xml b/specs/CH6.xml old mode 100755 new mode 100644 index 3f9d518..8424387 --- a/specs/CH6.xml +++ b/specs/CH6.xml @@ -1,5 +1,5 @@ - -"Composite and Constraint Widgets + +Composite and Constraint Widgets These widgets may contain arbitrary widget children. They implement a policy for the size and location of their children. @@ -87,7 +87,7 @@ application programmer. If the application wishes to change the size or location of -any widget it should make a call to XtSetValues. This will +any widget it should make a call to . This will allow the widget to ask its parent for the new size or location. As noted above the parent is allowed to refuse this request, diff --git a/specs/CH7.xml b/specs/CH7.xml old mode 100755 new mode 100644 index 4c49170..a84e3cf --- a/specs/CH7.xml +++ b/specs/CH7.xml @@ -1,10 +1,10 @@ - + Creating New Widgets (Subclassing) Although the task of creating a new widget may at first appear a little daunting, there is a basic simple pattern that all widgets follow. The Athena Widget library contains a special widget called the -Template widget that is intended to assist +Template widget that is intended to assist the novice widget programmer in writing a custom widget. @@ -111,10 +111,10 @@ un-necessarily waste many resources. In this section, an outline will be given of the procedure to follow to construct a special-purpose widget to address the items listed above. -The reader should refer to the appropriate sections of the +The reader should refer to the appropriate sections of the X Toolkit Intrinsics - C Language Interface for complete details of the material outlined here. Section 1.4 of -the Intrinsics should be read in +the Intrinsics should be read in conjunction with this section. diff --git a/specs/Command.xml b/specs/Command.xml old mode 100755 new mode 100644 diff --git a/specs/Dialog.xml b/specs/Dialog.xml old mode 100755 new mode 100644 index f77006c..aff03d7 --- a/specs/Dialog.xml +++ b/specs/Dialog.xml @@ -40,7 +40,7 @@ into which the user types input. The third line can contain buttons that let the user confirm or cancel the Dialog input. Any of these areas may be omitted by the application. - + Resources @@ -422,7 +422,7 @@ resizable If this resource is False then the parent - + Layout Semantics @@ -431,7 +431,7 @@ tics. One is used when initially laying out the children. The other is used when the Dialog is resized. -The first layout method uses the fromVert mand fromHoriz +The first layout method uses the fromVert mand fromHoriz resources to place the children of the Dialog. A single pass is made through the Dialog widget's children in the order that they were created. Each child is then placed in @@ -450,17 +450,17 @@ The second layout method is used when the Dialog is resized. It does not matter what causes this resize, and it is possi- ble for a resize to happen before the widget becomes visible (due to constraints imposed by the parent of the Dialog). -This layout method uses the bottom , -top , left , and -right +This layout method uses the bottom , +top , left , and +right resources. These resources are used to determine what will happen to each edge of the child when the Dialog is resized. -If a value of XawChain +If a value of XawChain <something> is specified, the the edge of the child will remain a fixed distance from the chain -edge of the Dialog. For example if XawChainLeft -mis specified for the right mresource of a child +edge of the Dialog. For example if XawChainLeft +mis specified for the right mresource of a child then the right edge of that child will remain a fixed distance from the left edge of the Dialog widget. If a value of XawRubber mis spec- @@ -556,7 +556,7 @@ own Dialog policy. - + Automatically Created Children. @@ -573,14 +573,14 @@ available through the Dialog widget itself. - + Convenience Routines To return the character string in the text field, use - + String XawDialogGetValueString Widget w @@ -605,19 +605,19 @@ Specifies the Dialog widget. This function returns a copy of the value string of the Dialog widget. This string is allocated by the AsciiText widget and will remain valid and unchanged until another call to -XawDialogGetValueString or an XtGetValues call on the + or an call on the value widget, when the string will be automatically freed, and a new string is returned. This string may be freed earlier by calling -the function XawAsciiSourceFreeString. +the function . To add a new button to the Dialog widget use -XawDialogAddButton. +. - + void XawDialogAddButton Widget w diff --git a/specs/Form.xml b/specs/Form.xml old mode 100755 new mode 100644 index 13cc36a..a6e0a0c --- a/specs/Form.xml +++ b/specs/Form.xml @@ -42,7 +42,7 @@ at the right and bottom edges. If a width and height is assigned to the Form that is too small for the layout, the children will be clipped by the right and bottom edges of the Form. - + Resources @@ -243,7 +243,7 @@ retrieved from the argument list or from the resource database: - + Constraint Resources @@ -372,7 +372,7 @@ resizable If this resource is False then the parent - + Layout Semantics The Form widget uses two different sets of layout semantics. @@ -380,16 +380,16 @@ One is used when initially laying out the children. The other is used when the Form is resized. -The first layout method uses the fromVert -and fromHoriz +The first layout method uses the fromVert +and fromHoriz resources to place the children of the Form. A single pass is made through the Form widget's children in the order that they were created. Each child is then placed in the Form widget below or to the right of the widget specified by the -fromVert and fromHoriz +fromVert and fromHoriz resources. The distance the new child is placed from its left or upper neighbor is deter- -mined by the horizDistance and +mined by the horizDistance and vertDistance resources. This implies some things about how the order of creation affects the possible placement of the children. The Form widget @@ -401,14 +401,14 @@ The second layout method is used when the Form is resized. It does not matter what causes this resize, and it is possi- ble for a resize to happen before the widget becomes visible (due to constraints imposed by the parent of the Form). -This layout method uses the bottom, -top, left, and +This layout method uses the bottom, +top, left, and right resources. These resources are used to determine what will happen to each edge of the child when the Form is resized. -If a value of XawChain +If a value of XawChain <something> is specified, the the edge -of the child will remain a fixed distance from the +of the child will remain a fixed distance from the chain edge of the Form. For example if XawChainLeft is specified for the right resource of a child then the right edge of @@ -468,7 +468,7 @@ children when the Form widget is resized. - + Example @@ -480,7 +480,7 @@ Form, and never to resize. - + Convenience Routines @@ -488,7 +488,7 @@ To force or defer a re-layout of the Form, use - + void XawFormDoLayout Widget w diff --git a/specs/Grip.xml b/specs/Grip.xml old mode 100755 new mode 100644 index 4e49d5b..73dd5a7 --- a/specs/Grip.xml +++ b/specs/Grip.xml @@ -26,7 +26,7 @@ events (such as ButtonPress or ButtonRelease) may be handled. The most common use for the Grip widget is as an attachment point for visually repositioning an object, such as the pane border in a Paned widget. - + Resources diff --git a/specs/Label.xml b/specs/Label.xml old mode 100755 new mode 100644 index 68962b5..65c4a92 --- a/specs/Label.xml +++ b/specs/Label.xml @@ -32,7 +32,7 @@ left, right, or center justified. Normally, this widget can be neither selected nor directly edited by the user. It is intended for use as an output device only. - + Resources diff --git a/specs/List.xml b/specs/List.xml old mode 100755 new mode 100644 index 0bad43d..2c541dc --- a/specs/List.xml +++ b/specs/List.xml @@ -30,7 +30,7 @@ columns. When one of the strings is selected, it is highlighted, and the List widget's Notify action is invoked, calling all routines on its callback list. Only one string may be selected at a time. - + Resources @@ -476,7 +476,7 @@ NULL terminated. If a value is not specified for the list, the list, and longest is set to the length of the name of the widget. The list is used in place, and must be available to the List widget for the lifetime of this widget, or until it is -changed with XtSetValues or XawListChange. +changed with or . @@ -652,7 +652,7 @@ operating systems, and had to be changed. To change the list that is displayed, use XawListChange . - + void XawListChange Widget w @@ -724,11 +724,11 @@ regardless of the value specified here. -XawListChange + will unset all list elements that are currently set before the list is actually changed. The list is used in place, and must remain usable for the lifetime of the List widget, or until list -has been changed again with this function or with XtSetValues. +has been changed again with this function or with . @@ -738,7 +738,7 @@ has been changed again with this function or with XtSetValuesXawListHighlight . - + void XawListHighlight Widget w @@ -774,7 +774,7 @@ highlighted. Only one item can be highlighted at a time. If an item is already highlighted when -XawListHighlight + is called, the highlighted item is unhighlighted before the new item is highlighted. @@ -786,7 +786,7 @@ the highlighted item is unhighlighted before the new item is highlighted. To unhighlight the currently highlighted item in the list, use XawListUnhighlight . - + void XawListUnhighlight Widget w @@ -814,7 +814,7 @@ Specifies the List widget. To retrieve the list element that is currently set, use XawListShowCurrent . - + XawListReturnStruct *XawListShowCurrent Widget w diff --git a/specs/Makefile.am b/specs/Makefile.am old mode 100755 new mode 100644 index bb34170..8663da2 --- a/specs/Makefile.am +++ b/specs/Makefile.am @@ -1,29 +1,11 @@ -# -# 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 = libXaw.xml -dist_doc_DATA = $(doc_sources) \ + +# Main DocBook/XML files (DOCTYPE book) +docbook = libXaw.xml + +# Included chapters, appendix, images +chapters = \ AsciiSink.xml \ AsciiSource.xml \ AsciiText.xml \ @@ -70,40 +52,10 @@ dist_doc_DATA = $(doc_sources) \ Tree.xml \ Viewport.xml -if HAVE_XMLTO -doc_DATA = $(doc_sources:.xml=.html) - -if HAVE_FOP -doc_DATA += $(doc_sources:.xml=.ps) $(doc_sources:.xml=.pdf) -endif - -if HAVE_XMLTO_TEXT -doc_DATA += $(doc_sources:.xml=.txt) -endif - -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 - -%.txt: %.xml $(dist_doc_DATA) - $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $< - -%.html: %.xml $(dist_doc_DATA) - $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $< - -%.pdf: %.xml $(dist_doc_DATA) - $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $< +# The location where the DocBook/XML files and their generated formats are installed +shelfdir = $(docdir) -%.ps: %.xml $(dist_doc_DATA) - $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop ps $< +# Generate DocBook/XML output formats with or without stylesheets +include $(top_srcdir)/docbook.am -endif HAVE_XMLTO endif ENABLE_SPECS diff --git a/specs/MenuButton.xml b/specs/MenuButton.xml old mode 100755 new mode 100644 index b907fef..b7df723 --- a/specs/MenuButton.xml +++ b/specs/MenuButton.xml @@ -459,8 +459,8 @@ MenuButton widget: - -MenuButton Actions_b + +MenuButton Actions The full list of actions supported by MenuButton is: diff --git a/specs/Paned.xml b/specs/Paned.xml old mode 100755 new mode 100644 index 90c3809..6ab2f1d --- a/specs/Paned.xml +++ b/specs/Paned.xml @@ -95,7 +95,7 @@ The default bindings for the Paned widget's grips are: - + Resources @@ -565,7 +565,7 @@ when the Paned widget is oriented vertically. This is not the same as the number of panes, since this also contains a -grip for some of the panes, use XawPanedGetNumSub to retrieve the +grip for some of the panes, use to retrieve the number of panes. @@ -605,7 +605,7 @@ widget. - + Constraint Resources @@ -775,7 +775,7 @@ forced to be resized. See Layout Semantics for details. - + Layout Semantics @@ -859,7 +859,7 @@ Invoking GripAction with ThisBorderOnly specified just move border between the panes. No other panes are ever resized. - + Resizing Panes after the Paned widget is resized. @@ -889,7 +889,7 @@ panes exactly. If this is not possible then it will hunt through the children, from bottom to top (right to left), for a pane to resize. - + Special Considerations @@ -970,7 +970,7 @@ grip's inactive cursor. No second argument is needed in this case. - + Convenience Routines @@ -980,7 +980,7 @@ To enable or disable a child's request for pane resizing, use XawPanedAllowResize : - + void XawPanedAllowResize Widget w @@ -1029,7 +1029,7 @@ constraint resource for the child. To change the minimum and maximum height settings for a pane, use XawPanedSetMinMax : - + void XawPanedSetMinMax Widget w @@ -1082,7 +1082,7 @@ constraint resources for the child. To retrieve the minimum and maximum height settings for a pane, use XawPanedGetMinMax : - + void XawPanedGetMinMax Widget w @@ -1137,7 +1137,7 @@ To enable or disable automatic recalculation of pane sizes and positions, use XawPanedSetRefigureMode : - + void XawPanedSetRefigureMode Widget w @@ -1180,9 +1180,9 @@ relayout until after all changes have been made. To retrieve the number of panes in a paned widget use -XawPanedGetNumSub: +: - + int XawPanedGetNumSub Widget w diff --git a/specs/Panner.xml b/specs/Panner.xml old mode 100755 new mode 100644 index a04bb1a..f886af0 --- a/specs/Panner.xml +++ b/specs/Panner.xml @@ -41,7 +41,7 @@ through callback procedures. Notification may be done either continuously whenever the slider moves or discretely whenever the slider has been given a new location. - + Resources @@ -688,7 +688,7 @@ The default bindings for Panner are: The functions registered on the reportCallback list are invoked by the notify action as follows: - + void ReportProc Widget panner diff --git a/specs/Porthole.xml b/specs/Porthole.xml old mode 100755 new mode 100644 index beda434..0452578 --- a/specs/Porthole.xml +++ b/specs/Porthole.xml @@ -29,7 +29,7 @@ widgets, only one of which may be managed at any particular time. The managed child widget is reparented within the porthole and is moved around by the application (typically under the control of a Panner widget). - + Resources @@ -242,7 +242,7 @@ size or position. - + Layout Semantics @@ -262,7 +262,7 @@ Panner widget. The functions registered on the reportCallback list are invoked whenever the managed child changes size or position: - + void ReportProc Widget porthole @@ -281,7 +281,7 @@ the managed child changes size or position: Specifies the Porthole widget. - + client_data @@ -290,7 +290,7 @@ Specifies the Porthole widget. Specifies the client data. - + report @@ -300,7 +300,7 @@ Specifies a pointer to an XawPannerReport structure contain the location and size of the slider and the size of the canvas. - + diff --git a/specs/Repeater.xml b/specs/Repeater.xml old mode 100755 new mode 100644 index 35cd69a..289e14d --- a/specs/Repeater.xml +++ b/specs/Repeater.xml @@ -27,7 +27,7 @@ registered callbacks repeatedly, at an increasing rate. The default translation does so for the duration the user holds down pointer button 1 while the pointer is on the Repeater. - + Resources diff --git a/specs/Scrollbar.xml b/specs/Scrollbar.xml old mode 100755 new mode 100644 index 87f6d68..f5d0553 --- a/specs/Scrollbar.xml +++ b/specs/Scrollbar.xml @@ -54,7 +54,7 @@ procedure is invoked only when the button is released and the client callback procedure is responsible for moving the thumb. - + Resources @@ -663,7 +663,7 @@ The procedural interface for these functions is described here. The calling interface to the scrollProc callback procedure is: - + void ScrollProc Widget scrollbar @@ -720,7 +720,7 @@ be greater than the length of the Scrollbar. The calling interface to the jumpProc callback procedure is: - + void JumpProc Widget scrollbar @@ -792,7 +792,7 @@ To set the position and length of a Scrollbar thumb, use - + void XawScrollbarSetThumb Widget w @@ -845,7 +845,7 @@ Values greater than 1.0 are truncated to 1.0. -If called from jumpProc, XawScrollbarSetThumb has no effect. +If called from jumpProc, has no effect. diff --git a/specs/Simple.xml b/specs/Simple.xml old mode 100755 new mode 100644 index a21bc64..0d32f74 --- a/specs/Simple.xml +++ b/specs/Simple.xml @@ -26,7 +26,7 @@ of its own. It main purpose is to be used as a common superclass for the other simple Athena widgets. This widget adds six resources to the resource list provided by the Core widget and its superclasses. - + Resources diff --git a/specs/SimpleMenu.xml b/specs/SimpleMenu.xml old mode 100755 new mode 100644 index 84ba039..a99608d --- a/specs/SimpleMenu.xml +++ b/specs/SimpleMenu.xml @@ -23,7 +23,7 @@ Superclass OverrideShell The SimpleMenu widget is a container for the menu entries. It is a direct subclass of shell, and is should be created with -XtCreatePopupShell, not XtCreateManagedWidget. This is the +XtCreatePopupShell, not . This is the only part of the menu that actually is associated with a window. The SimpleMenu serves as the glue to bind the individual menu entries together into a menu. @@ -632,7 +632,7 @@ translation table of the widget that will be popping up the menu. The MenuPopup action is described in (xT. XawPositionSimpleMenu is a global action procedure registered by the SimpleMenu widget when the first one is created or the convenience -routine XawSimpleMenuAddGlobalActions is called. +routine is called. @@ -689,9 +689,9 @@ The XawPositionSimpleMenu action routine may often be invok before any menus have been created. This can occur when an application uses dynamic menu creation. In these cases an application will need to register this global action routine by calling -XawSimpleMenuAddGlobalActions: +: - + void XawSimpleMenuAddGlobalActions XtAppContext app_con @@ -723,9 +723,9 @@ is realized. To get the currently highlighted menu entry use -XawSimpleMenuGetActiveEntry: +: - + Widget XawSimpleMenuGetActiveEntry Widget w @@ -755,9 +755,9 @@ currently highlighted, or NULL if no entry is highlighted. To clear the SimpleMenu widget's internal information about the currently highlighted menu entry use -XawSimpleMenuClearActiveEntry: +: - + Widget XawSimpleMenuClearActiveEntry Widget w diff --git a/specs/Sme.xml b/specs/Sme.xml old mode 100755 new mode 100644 index 2d3d2f5..da3c4d1 --- a/specs/Sme.xml +++ b/specs/Sme.xml @@ -28,7 +28,7 @@ The Sme object is the base class for all menu entries. While this object is mainly intended to be subclassed, it may be used in a menu to add blank space between menu entries. - + Resources @@ -191,7 +191,7 @@ XtSetValues calls may come from the application while the Sme is highlighted, and if the SetValues method returns True, will result in an expose event. The SimpleMenu may later call the menu entry's unhighlight procedure. However, due to the asynchronous nature of -X, the expose event generated by XtSetValues will come after +X, the expose event generated by will come after this unhighlight. diff --git a/specs/SmeBSB.xml b/specs/SmeBSB.xml old mode 100755 new mode 100644 index 539bdcb..3636e2e --- a/specs/SmeBSB.xml +++ b/specs/SmeBSB.xml @@ -32,7 +32,7 @@ entry by entry basis. The format of the string may either be the encoding of the 8 bit font utilized, or in a multi-byte encoding for use with a fontSet. - + Resources @@ -189,7 +189,7 @@ All callback functions on this list are called when the SimpleMenu notifies this entry that the user has selected it. - + font diff --git a/specs/SmeLine.xml b/specs/SmeLine.xml old mode 100755 new mode 100644 index e53728c..96c920b --- a/specs/SmeLine.xml +++ b/specs/SmeLine.xml @@ -30,7 +30,7 @@ is able to change the color, height, and other attributes of the SmeLine objects on an entry by entry basis. This object is not selectable, and will not highlight when the pointer cursor is over it. - + Resources diff --git a/specs/StripChart.xml b/specs/StripChart.xml old mode 100755 new mode 100644 index f51f6fc..8d5c064 --- a/specs/StripChart.xml +++ b/specs/StripChart.xml @@ -28,7 +28,7 @@ to provide a graph of processor load. The StripChart reads data from an application, and updates the chart at the update interval specified. - + Resources diff --git a/specs/TPage_Credits.xml b/specs/TPage_Credits.xml old mode 100755 new mode 100644 diff --git a/specs/Template.xml b/specs/Template.xml old mode 100755 new mode 100644 index 2d94ca8..d9e2fc5 --- a/specs/Template.xml +++ b/specs/Template.xml @@ -4,7 +4,7 @@ The public header file contains declarations that will be required by any application module that needs to refer to the widget; whether to create an instance of the class, to perform an -XtSetValues + operation, or to call a public routine implemented by the widget class. diff --git a/specs/Template_private_header_file.xml b/specs/Template_private_header_file.xml old mode 100755 new mode 100644 diff --git a/specs/Template_public_header_file.xml b/specs/Template_public_header_file.xml old mode 100755 new mode 100644 index b173796..6e8d609 --- a/specs/Template_public_header_file.xml +++ b/specs/Template_public_header_file.xml @@ -4,7 +4,7 @@ The public header file contains declarations that will be required by any application module that needs to refer to the widget; whether to create an instance of the class, to perform an -XtSetValues + operation, or to call a public routine implemented by the widget class. diff --git a/specs/Template_widget_source_file.xml b/specs/Template_widget_source_file.xml old mode 100755 new mode 100644 diff --git a/specs/Text.xml b/specs/Text.xml old mode 100755 new mode 100644 index 3daf7d3..d2d5e30 --- a/specs/Text.xml +++ b/specs/Text.xml @@ -1,4 +1,4 @@ - + Text Widget @@ -20,7 +20,7 @@ mediator between the source and sink. This section lists the resources that are actually part of the Text widget, and explains the functionality provided by each. - + Resources diff --git a/specs/TextActions.xml b/specs/TextActions.xml old mode 100755 new mode 100644 index 0af3bec..0e54582 --- a/specs/TextActions.xml +++ b/specs/TextActions.xml @@ -63,7 +63,7 @@ may assume this to be the case. - + Cursor Movement Actions\fP @@ -813,7 +813,7 @@ section called Text Selections for Users. To modify the se a programmer must construct a XawTextSelectType array (called the selection array), containing the selections desired, and pass this as the new value for the selectionTypes resource. The selection -array may also be modified using the XawTextSetSelectionArray +array may also be modified using the function. All selection arrays must end with the value XawselectNull. The selectionTypes resource has no converter diff --git a/specs/TextActions_default_translation_bindings.xml b/specs/TextActions_default_translation_bindings.xml old mode 100755 new mode 100644 diff --git a/specs/TextActions_text_widget_actions.xml b/specs/TextActions_text_widget_actions.xml old mode 100755 new mode 100644 index 2387276..af77052 --- a/specs/TextActions_text_widget_actions.xml +++ b/specs/TextActions_text_widget_actions.xml @@ -63,7 +63,7 @@ may assume this to be the case. - + Cursor Movement Actions\fP @@ -813,7 +813,7 @@ section called Text Selections for Users. To modify the se a programmer must construct a XawTextSelectType array (called the selection array), containing the selections desired, and pass this as the new value for the selectionTypes resource. The selection -array may also be modified using the XawTextSetSelectionArray +array may also be modified using the function. All selection arrays must end with the value XawselectNull. The selectionTypes resource has no converter diff --git a/specs/TextCustom.xml b/specs/TextCustom.xml old mode 100755 new mode 100644 diff --git a/specs/TextFuncs.xml b/specs/TextFuncs.xml old mode 100755 new mode 100644 index 0d2ae81..d7d3580 --- a/specs/TextFuncs.xml +++ b/specs/TextFuncs.xml @@ -109,7 +109,7 @@ deprecated and will eventually be removed from the implementation. To select a piece of text, use XawTextSetSelection : - + void XawTextSetSelection Widget w @@ -152,7 +152,7 @@ Specifies the character position at which the selection ends. -See section 5.4 for a description of XawTextPosition. +See section 5.4 for a description of XawTextPosition. If redisplay is enabled, this function highlights the text and makes it the PRIMARY selection. This function does not have any effect on CUT_BUFFER0. @@ -166,9 +166,9 @@ effect on CUT_BUFFER0. To unhighlight previously highlighted text in a widget, use -XawTextUnsetSelection: +: - + void XawTextUnsetSelection Widget w @@ -194,9 +194,9 @@ Specifies the Text widget. To retrieve the text that has been selected by this -text widget use XawTextGetSelectionPos: +text widget use : - + void XawTextGetSelectionPos Widget w @@ -239,7 +239,7 @@ Returns the end of the text selection. -See section 5.4 for a description of XawTextPosition. +See section 5.4 for a description of XawTextPosition. If the returned values are equal, no text is currently selected. @@ -247,9 +247,9 @@ If the returned values are equal, no text is currently selected. Replacing Text -To modify the text in an editable Text widget use XawTextReplace: +To modify the text in an editable Text widget use : - + int XawTextReplace Widget w @@ -356,7 +356,7 @@ than the length of the Source. -The XawTextReplace arguments start and +The arguments start and end represent the text source character positions for the existing text that is to be replaced by the text in the text block. The characters from start up to @@ -371,9 +371,9 @@ text is inserted after start. To search for a string in the Text widget, use -XawTextSearch: +: - + XawTextPosition XawTextSearch Widget w @@ -419,7 +419,7 @@ Specifies a text block structure that contains the text to search for. See section 5.4 for a description of XawTextPosition and XawTextBlock. -The XawTextSearch function will begin at the insertion point +The function will begin at the insertion point and search in the direction specified for a string that matches the one passed in text. If the string is found the location of the first @@ -431,9 +431,9 @@ found then the value XawTextSearchError is returned. Redisplaying Text -To redisplay a range of characters, use XawTextInvalidate: +To redisplay a range of characters, use : - + void XawTextInvalidate Widget w @@ -477,7 +477,7 @@ Specifies the end of the text to redisplay. See section 5.4 for a description of XawTextPosition. -The XawTextInvalidate +The function causes the specified range of characters to be redisplayed immediately if redisplay is enabled or the next time that redisplay is enabled. @@ -485,9 +485,9 @@ enabled. -To enable redisplay, use XawTextEnableRedisplay: +To enable redisplay, use : - + void XawTextEnableRedisplay Widget w @@ -509,17 +509,17 @@ Specifies the Text widget. -The XawTextEnableRedisplay function flushes any changes due to -batched updates when XawTextDisableRedisplay +The function flushes any changes due to +batched updates when was called and allows future changes to be reflected immediately. To disable redisplay while making several changes, use -XawTextDisableRedisplay. +. - + void XawTextDisableRedisplay Widget w @@ -541,16 +541,16 @@ Specifies the Text widget. -The XawTextDisableRedisplay function causes all changes to be -batched until either XawTextDisplay or XawTextEnableRedisplay +The function causes all changes to be +batched until either or is called. -To display batched updates, use XawTextDisplay: +To display batched updates, use : - + void XawTextDisplay Widget w @@ -572,7 +572,7 @@ Specifies the Text widget. -The XawTextDisplay function forces any accumulated updates to be +The function forces any accumulated updates to be displayed. @@ -582,9 +582,9 @@ displayed. To obtain the character position of the left-most character on the first line displayed in the widget (the value of the -displayPosition resource), use XawTextTopPosition. +displayPosition resource), use . - + XawTextPosition XawTextTopPosition Widget w @@ -608,9 +608,9 @@ Specifies the Text widget. To assign a new selection array to a text widget use -XawTextSetSelectionArray: +: - + void XawTextSetSelectionArray Widget w @@ -651,9 +651,9 @@ Calling this function is equivalent to setting the value of the To move the insertion point to the specified source position, use -XawTextSetInsertionPoint: +: - + void XawTextSetInsertionPoint Widget w @@ -695,9 +695,9 @@ equivalent to setting the insertPosition resource. To obtain the current position of the insertion point, use -XawTextGetInsertionPoint: +: - + XawTextPosition XawTextGetInsertionPoint Widget w @@ -727,9 +727,9 @@ The result is equivalent to retrieving the value of the To replace the text source in the specified widget, use -XawTextSetSource: +: - + void XawTextSetSource Widget w @@ -781,9 +781,9 @@ A display update will be performed if redisplay is enabled. To obtain the current text source for the specified widget, use -XawTextGetSource: +: - + Widget XawTextGetSource Widget w @@ -812,9 +812,9 @@ using. To enable and disable the insertion point, use -XawTextDisplayCaret: +: - + void XawTextDisplayCaret Widget w @@ -849,7 +849,7 @@ Specifies whether or not the caret should be displayed. If visible is False the insertion point will be disabled. The marker is re-enabled either by setting visible to True, by -calling XtSetValues, or by executing the display-caret +calling , or by executing the display-caret action routine. diff --git a/specs/TextSink.xml b/specs/TextSink.xml old mode 100755 new mode 100644 index bafe557..93a2e0e --- a/specs/TextSink.xml +++ b/specs/TextSink.xml @@ -35,7 +35,7 @@ export. Since all text sinks will have some resources in common, the TextSink defines a few new resources. - + Resources @@ -190,9 +190,9 @@ to be used as a sink by itself. To display a section of the text buffer contained in the text source -use the function DisplayText: +use the function : - + void DisplayText Widget w @@ -281,9 +281,9 @@ be displayed. The function that controls the display of the text cursor is -InsertCursor. This function will be called whenever the text +. This function will be called whenever the text widget desires to change the state of, or move the insert point. - + void InsertCursor Widget w @@ -346,13 +346,15 @@ Specifies the state of the cursor, may be one of XawisOn or To clear a portion of the Text window to its background color, the Text -widget will call ClearToBackground. The TextSink object already -defines this function as calling XClearArea on the region passed. +widget will call . The TextSink object already +defines this function as calling +XClearArea +on the region passed. This behavior will be used if you specify XtInheritClearToBackground for this method. - + void ClearToBackground Widget w @@ -424,9 +426,9 @@ Specifies the height, in pixels, of the Region to clear. To find the text character position that will be rendered at a given x -location the Text widget uses the function FindPosition: +location the Text widget uses the function : - + void FindPosition Widget w @@ -537,10 +539,10 @@ widget will only call it one line at a time. -Another means of finding a text position is provided by the Resolve +Another means of finding a text position is provided by the function: - + void Resolve Widget w @@ -613,7 +615,7 @@ if stopAtWordBreak is True. This function need make no attempt to deal with line feeds. The text widget will only call it one line at a time. This is a more convenient -interface to the FindPosition function, and provides a subset of its +interface to the function, and provides a subset of its functionality. @@ -623,9 +625,9 @@ functionality. To find the distance in pixels between two text positions on the same -line use the function FindDistance. +line use the function . - + void FindDistance Widget w @@ -727,11 +729,11 @@ widget will only call it one line at a time. To find the maximum number of lines that will fit into the current Text -widget, use the function MaxLines. The TextSink already defines +widget, use the function . The TextSink already defines this function to compute the maximum number of lines by using the height of font. - + int MaxLines Widget w @@ -770,11 +772,11 @@ Returns the maximum number of lines that will fit in height< To find the height required for a given number of text lines, use -the function MaxHeight. The TextSink already defines this +the function . The TextSink already defines this function to compute the maximum height of the window by using the height of font. - + int MaxHeight Widget w @@ -814,12 +816,12 @@ Returns the height that will be taken up by the number of lines passed. Setting the Tab Stops -To set the tab stops for a text sink use the SetTabs function. +To set the tab stops for a text sink use the function. The TextSink already defines this function to set the tab x location in pixels to be the number of characters times the figure width of font. - + void SetTabs Widget w @@ -866,14 +868,14 @@ This function is responsible for the converting character positions passed to it into whatever internal positions the TextSink uses for tab placement. - + Getting the Insert Point's Size and Location To get the size and location of the insert point use the -GetCursorBounds function. + function. - + void GetCursorBounds Widget w diff --git a/specs/TextSource.xml b/specs/TextSource.xml old mode 100755 new mode 100644 index 51b9ae0..c90ae29 --- a/specs/TextSource.xml +++ b/specs/TextSource.xml @@ -22,7 +22,7 @@ Since all text sources will have some resources in common the TextSrc defines a few new resources. - + Resources When creating an TextSrc object instance, the following resources are @@ -133,14 +133,14 @@ used as a source by itself and bad things will probably happen. - + Reading Text. -To read the text in a text source use the Read function: +To read the text in a text source use the function: - + XawTextPosition Read Widget w @@ -199,18 +199,18 @@ characters read from the text buffer. The function is not required to read length characters if that many characters are in the file, it may break at any point that is convenient to the internal structure of the -source. It may take several calls to Read before the desired +source. It may take several calls to before the desired portion of the text buffer is fully retrieved. - + Replacing Text. -To replace or edit the text in a text buffer use the Replace function: +To replace or edit the text in a text buffer use the function: - + XawTextPosition Replace Widget w @@ -293,7 +293,7 @@ than the length of the Source. -The Replace arguments start and end represent the +The arguments start and end represent the text source character positions for the existing text that is to be replaced by the text in the text block. The characters from start up to but not including end are deleted, and the @@ -307,10 +307,10 @@ the new text is inserted after start. Scanning the TextSrc To search the text source for one of the predefined boundary types use -the Scan function: +the function: - + XawTextPosition Scan Widget w @@ -382,7 +382,7 @@ Specifies whether the boundary itself should be included in the scan. -The Scan function returns the position in the text source of the desired +The function returns the position in the text source of the desired boundary. It is expected to return a valid address for all calls made to it, thus if a particular request is made that would take the text widget beyond the end of the source it must return the @@ -393,10 +393,10 @@ position of that end. Searching through a TextSrc -To search for a particular string use the Search function. +To search for a particular string use the function. - + XawTextPosition Search Widget w @@ -466,7 +466,7 @@ the ConvertSelection function, to attempt the selection conversion. - + Boolean ConvertSelections Widget w @@ -568,10 +568,10 @@ Text widget will attempt to convert the selection itself. If the source needs to know when the text selection is modified it -should define a SetSelection procedure: +should define a procedure: - + void SetSelection Widget w diff --git a/specs/Toggle.xml b/specs/Toggle.xml old mode 100755 new mode 100644 index d5c2398..227aba2 --- a/specs/Toggle.xml +++ b/specs/Toggle.xml @@ -38,7 +38,7 @@ Toggle widgets may also be part of a ``radio group.'' A radio group is a list of at least two Toggle widgets in which no more than one Toggle may be set at any time. A radio group is identified by the widget ID of any one of -its members. The convenience routine XawToggleGetCurrent will +its members. The convenience routine will return information about the Toggle widget in the radio group. @@ -46,7 +46,7 @@ return information about the Toggle widget in the radio group. Toggle widget state is preserved across changes in sensitivity. - + Resources When creating a Toggle widget instance, the following resources are @@ -375,11 +375,11 @@ retrieved from the argument list or from the resource database: -Specifies the data that will be returned by XawToggleGetCurrent +Specifies the data that will be returned by when this is the currently set widget in the radio group. This value is also used to identify the Toggle that will be set by a call to -XawToggleSetCurrent. The value NULL will be returned by -XawToggleGetCurrent if no widget in a radio group is currently +. The value NULL will be returned by + if no widget in a radio group is currently set. Programmers must not specify NULL (or Zero) as radioData. @@ -455,8 +455,8 @@ Toggle widget: - -Toggle Actions_b + +Toggle Actions The full list of actions supported by Toggle is: @@ -593,22 +593,22 @@ its member widgets to True. - + Convenience Routines The following functions allow easy access to the Toggle widget's radio group functionality. - + Changing the Toggle's Radio Group. To enable an application to change the Toggle's radio group, add the Toggle to a radio group, or remove the Toggle from a radio group, use -XawToggleChangeRadioGroup. +. - + void XawToggleChangeRadioGroup Widgetw, radio_group @@ -651,10 +651,10 @@ Finding the Currently selected Toggle in a radio group of Toggles To find the currently selected Toggle in a radio group of Toggle widgets -use XawToggleGetCurrent. +use . - + XtPointer XawToggleGetCurrent XtPointer XawToggleGetCurrent(radio_group) @@ -687,10 +687,10 @@ Changing the Toggle that is set in a radio group. To change the Toggle that is currently set in a radio group use -XawToggleSetCurrent. +. - + void XawToggleSetCurrent voidXawToggleSetCurrent(radio_group, radio_data) @@ -727,11 +727,11 @@ by the radio_group argument. -XawToggleSetCurrent locates the Toggle widget to be set by + locates the Toggle widget to be set by matching radio_data against the radioData for each Toggle in -the radio group. If none match, XawToggleSetCurrent returns +the radio group. If none match, returns without making any changes. If more than one Toggle matches, -XawToggleSetCurrent will choose a Toggle to set arbitrarily. If + will choose a Toggle to set arbitrarily. If this causes any Toggle widgets to change state, all routines in their callback lists will be invoked. The callback routines for a Toggle that is to be unset will be called before the one that is to be set. @@ -740,10 +740,10 @@ Unsetting all Toggles in a radio group. To unset all Toggle widgets in a radio group use -XawToggleUnsetCurrent. +. - + void XawToggleUnsetCurrent void XawToggleUnsetCurrent(radio_group) diff --git a/specs/Tree.xml b/specs/Tree.xml old mode 100755 new mode 100644 index bb51e80..71cadd1 --- a/specs/Tree.xml +++ b/specs/Tree.xml @@ -25,7 +25,7 @@ another composite widget (such as the Porthole or - + Resources When creating a Tree widget instance, the following resources are @@ -286,7 +286,7 @@ constraint resource to their children. - + Constraint Resources Each child of the Tree widget must specify its superior node in the tree. In @@ -356,7 +356,7 @@ for the node to have no superior (and to therefore be at the top of the tree). - + Layout Semantics Each time a child is managed or unmanaged, the Tree widget will attempt @@ -373,17 +373,17 @@ own size to the minimum dimensions required for the layout. - + Convenience Routines The most efficient way to layout a tree is to set autoReconfigure to False and then use the - XawTreeForceLayout + routine to arrange the children. - + void XawTreeForceLayout Widget w diff --git a/specs/Viewport.xml b/specs/Viewport.xml old mode 100755 new mode 100644 index 3b37036..767dc07 --- a/specs/Viewport.xml +++ b/specs/Viewport.xml @@ -39,7 +39,7 @@ window, or when the data does not require scrolling, the Viewport widget automatically removes any scrollbars. The forceBars option causes the Viewport widget to display all scrollbars permanently. - + Resources @@ -347,7 +347,7 @@ the Viewport. - + Layout Semantics @@ -374,7 +374,7 @@ appropriate dimension. The scrollbar children of the Viewport are named horizontal and vertical. By using these names the programmer can specify resources -for the individual scrollbars. XtSetValues can be used to modify +for the individual scrollbars. can be used to modify the resources dynamically once the widget ID has been obtained with XtNameToWidget. diff --git a/specs/libXaw.xml b/specs/libXaw.xml old mode 100755 new mode 100644 index d8a0a35..75880ad --- a/specs/libXaw.xml +++ b/specs/libXaw.xml @@ -1,62 +1,68 @@ + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" +[ + %defs; +]> Athena Widget Set - C Language Interface X Consortium Standard - X Version 11, Release 6.4 + X Version 11, Release &fullrelvers; - ChrisPeterson + ChrisD.Peterson + formerly MIT X Consortium - 1985X Consortium - 1986X Consortium - 1987X Consortium - 1988X Consortium - 1989X Consortium - 1991X Consortium - 1994X Consortium - libXaw 1.0.7 - formerly MIT X Consortium - X Version 11, Release 7 + 1985198619871988 + 198919911994 + 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 +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 +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 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 +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 The OpenGroup. + + + +Copyright © 1985, 1986, 1987, 1988, 1989, 1991 +Digital Equipment Corporation, Maynard, Massachusetts. + + Permission to use, copy, modify and distribute this documentation for any purpose and without fee is hereby granted, provided that the above copyright @@ -66,16 +72,11 @@ Digital not be used in in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Digital makes no representations about the suitability of the software described herein for any purpose. -It is provided ``as is'' without express or implied warranty. - - - -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. +It is provided “as is” without express or implied warranty. + diff --git a/src/Actions.c b/src/Actions.c old mode 100755 new mode 100644 index 996db31..3a444b8 --- a/src/Actions.c +++ b/src/Actions.c @@ -10,7 +10,7 @@ * * 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 @@ -38,7 +38,6 @@ #include #include #include -#include #include #include "Private.h" @@ -300,8 +299,8 @@ get_token(XawEvalInfo *info) { char msg[256]; - XmuSnprintf(msg, sizeof(msg), - "evaluate(): bad token \"%c\" at \"%s\"", ch, info->cp - 1); + snprintf(msg, sizeof(msg), "evaluate(): bad token \"%c\" at \"%s\"", + ch, info->cp - 1); XtAppWarning(XtWidgetToApplicationContext(info->widget), msg); } @@ -371,8 +370,8 @@ prim(XawEvalInfo *info) char msg[256]; info->token = ERROR; - XmuSnprintf(msg, sizeof(msg), - "evaluate(): expecting ), at \"%s\"", info->lp); + snprintf(msg, sizeof(msg), "evaluate(): expecting ), at \"%s\"", + info->lp); XtAppWarning(XtWidgetToApplicationContext(info->widget), msg); return (False); } @@ -385,8 +384,8 @@ prim(XawEvalInfo *info) char msg[256]; info->token = ERROR; - XmuSnprintf(msg, sizeof(msg), - "evaluate(): sintax error, at \"%s\"", info->lp); + snprintf(msg, sizeof(msg), "evaluate(): syntax error, at \"%s\"", + info->lp); XtAppWarning(XtWidgetToApplicationContext(info->widget), msg); } return (False); } @@ -435,8 +434,7 @@ XawSetValuesAction(Widget w, XEvent *event, { char msg[256]; - XmuSnprintf(msg, sizeof(msg), - "set-values(): bad resource name \"%s\"", + snprintf(msg, sizeof(msg), "set-values(): bad resource name \"%s\"", params[count]); XtAppWarning(XtWidgetToApplicationContext(w), msg); continue; @@ -457,9 +455,9 @@ XawSetValuesAction(Widget w, XEvent *event, { char msg[256]; - XmuSnprintf(msg, sizeof(msg), - "set-values(): bad resource size for \"%s\"", - params[count]); + snprintf(msg, sizeof(msg), + "set-values(): bad resource size for \"%s\"", + params[count]); XtAppWarning(XtWidgetToApplicationContext(w), msg); } continue; } @@ -501,13 +499,13 @@ XawSetValuesAction(Widget w, XEvent *event, void XawGetValuesAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ +{ XawActionResList *rlist; XawActionVarList *vlist; String value; Cardinal count; - if (!(*num_params & 1)) + if (!(*num_params & 1)) { XawPrintActionErrorMsg("get-values", w, params, num_params); return; @@ -529,7 +527,7 @@ XawGetValuesAction(Widget w, XEvent *event, void XawDeclareAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ +{ XawActionVarList *vlist; Cardinal count; @@ -585,7 +583,7 @@ XawConvertActionRes(XawActionResList *list, Widget w, String name) Arg arg; char c_1; short c_2; - int c_4; + int c_4; #ifdef LONG64 long c_8; #endif @@ -594,8 +592,8 @@ XawConvertActionRes(XawActionResList *list, Widget w, String name) { char msg[256]; - XmuSnprintf(msg, sizeof(msg), - "convert(): bad resource name \"%s\"", name); + snprintf(msg, sizeof(msg), "convert(): bad resource name \"%s\"", + name); XtAppWarning(XtWidgetToApplicationContext(w), msg); return (NULL); } @@ -625,8 +623,8 @@ XawConvertActionRes(XawActionResList *list, Widget w, String name) { char msg[256]; - XmuSnprintf(msg, sizeof(msg), - "convert(): bad resource size for \"%s\"", name); + snprintf(msg, sizeof(msg), "convert(): bad resource size for \"%s\"", + name); XtAppWarning(XtWidgetToApplicationContext(w), name); } return (NULL); } @@ -651,17 +649,17 @@ XawPrintActionErrorMsg(String action_name, Widget w, char msg[1024]; unsigned int size, idx; - size = XmuSnprintf(msg, sizeof(msg), "%s(): bad number of parameters.\n\t(", - action_name); + size = snprintf(msg, sizeof(msg), "%s(): bad number of parameters.\n\t(", + action_name); idx = 0; while (idx < *num_params - 1 && size < sizeof(msg)) - size += XmuSnprintf(&msg[size], sizeof(msg) - size, "%s, ", - params[idx++]); + size += snprintf(&msg[size], sizeof(msg) - size, "%s, ", + params[idx++]); if (*num_params) - XmuSnprintf(&msg[size], sizeof(msg) - size, "%s)", params[idx]); + snprintf(&msg[size], sizeof(msg) - size, "%s)", params[idx]); else - XmuSnprintf(&msg[size], sizeof(msg) - size, ")"); + snprintf(&msg[size], sizeof(msg) - size, ")"); XtAppWarning(XtWidgetToApplicationContext(w), msg); } @@ -681,7 +679,7 @@ XawGetActionResList(WidgetClass wc) static int qcmp_action_resource_list(register _Xconst void *left, register _Xconst void *right) -{ +{ return ((char *)((*(XawActionResList **)left)->widget_class) - (char *)((*(XawActionResList **)right)->widget_class)); } @@ -727,7 +725,7 @@ bcmp_action_resource_list(register _Xconst void *wc, static XawActionResList * _XawFindActionResList(WidgetClass wc) -{ +{ XawActionResList **list; if (!resource_list) @@ -831,8 +829,8 @@ bcmp_action_resource(register _Xconst void *string, { return (strcmp((String)string, XrmQuarkToString((*(XawActionRes **)resource)->qname))); -} - +} + static XawActionRes * _XawFindActionRes(XawActionResList *list, Widget detail, String name) { @@ -904,8 +902,9 @@ XawDeclareActionVar(XawActionVarList *list, String name, String value) { char msg[256]; - XmuSnprintf(msg, sizeof(msg), "declare(): variable name must begin with " - "\'%c\', at %s = %s", XAW_PRIV_VAR_PREFIX, name, value); + snprintf(msg, sizeof(msg), + "declare(): variable name must begin with \'%c\', at %s = %s", + XAW_PRIV_VAR_PREFIX, name, value); XtAppWarning(XtWidgetToApplicationContext(list->widget), msg); return; } diff --git a/src/AllWidgets.c b/src/AllWidgets.c old mode 100755 new mode 100644 index 27be437..3b13438 --- a/src/AllWidgets.c +++ b/src/AllWidgets.c @@ -28,46 +28,37 @@ in this Software without prior written authorization from The Open Group. #include #endif #include -#include #include -extern WidgetClass applicationShellWidgetClass; -extern WidgetClass asciiSinkObjectClass; -extern WidgetClass asciiSrcObjectClass; -extern WidgetClass asciiTextWidgetClass; -extern WidgetClass boxWidgetClass; -extern WidgetClass commandWidgetClass; -extern WidgetClass dialogWidgetClass; -extern WidgetClass formWidgetClass; -extern WidgetClass gripWidgetClass; -extern WidgetClass labelWidgetClass; -extern WidgetClass listWidgetClass; -extern WidgetClass menuButtonWidgetClass; -extern WidgetClass multiSinkObjectClass; -extern WidgetClass multiSrcObjectClass; -extern WidgetClass overrideShellWidgetClass; -extern WidgetClass panedWidgetClass; -extern WidgetClass pannerWidgetClass; -extern WidgetClass portholeWidgetClass; -extern WidgetClass repeaterWidgetClass; -extern WidgetClass scrollbarWidgetClass; -extern WidgetClass shellWidgetClass; -extern WidgetClass simpleMenuWidgetClass; -extern WidgetClass simpleWidgetClass; -extern WidgetClass smeBSBObjectClass; -extern WidgetClass smeLineObjectClass; -extern WidgetClass smeObjectClass; -extern WidgetClass stripChartWidgetClass; -extern WidgetClass textSinkObjectClass; -extern WidgetClass textSrcObjectClass; -extern WidgetClass textWidgetClass; -extern WidgetClass toggleWidgetClass; -extern WidgetClass topLevelShellWidgetClass; -extern WidgetClass transientShellWidgetClass; -extern WidgetClass treeWidgetClass; -extern WidgetClass vendorShellWidgetClass; -extern WidgetClass viewportWidgetClass; -extern WidgetClass wmShellWidgetClass; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include XmuWidgetNode XawWidgetArray[] = { { "applicationShell", &applicationShellWidgetClass }, diff --git a/src/AsciiSink.c b/src/AsciiSink.c old mode 100755 new mode 100644 index 56f899c..d776895 --- a/src/AsciiSink.c +++ b/src/AsciiSink.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -331,7 +331,7 @@ void CalculateBearing(TextWidget ctx, XawTextPosition position, int x, int y, * | #### | * | #### | * | #### | - * |### | + * |### | * #### | * | | * @@ -369,7 +369,7 @@ void CalculateBearing(TextWidget ctx, XawTextPosition position, int x, int y, c = ' '; } if (font->per_char && - (c >= font->min_char_or_byte2 && c <= font->max_char_or_byte2)) + (c >= font->min_char_or_byte2 && c <= font->max_char_or_byte2)) rbearing = font->per_char[c - font->min_char_or_byte2].rbearing - font->per_char[c - font->min_char_or_byte2].width; if (rbearing > 0) { @@ -405,7 +405,7 @@ void CalculateBearing(TextWidget ctx, XawTextPosition position, int x, int y, c = ' '; } if (font->per_char && - (c >= font->min_char_or_byte2 && c <= font->max_char_or_byte2)) + (c >= font->min_char_or_byte2 && c <= font->max_char_or_byte2)) lbearing = font->per_char[c - font->min_char_or_byte2].lbearing; if (lbearing < 0) { paint = XtNew(XawTextPaintStruct); @@ -1707,7 +1707,7 @@ XawAsciiSinkInitialize(Widget request, Widget cnew, GetGC(sink); if (!sink->ascii_sink.font) XtError("Aborting: no font found\n"); - + sink->ascii_sink.cursor_position = 0; sink->ascii_sink.laststate = XawisOff; sink->ascii_sink.cursor_x = sink->ascii_sink.cursor_y = 0; diff --git a/src/AsciiSrc.c b/src/AsciiSrc.c old mode 100755 new mode 100644 index 245a654..b28b2c4 --- a/src/AsciiSrc.c +++ b/src/AsciiSrc.c @@ -164,7 +164,7 @@ static XtResource resources[] = { XtNcallback, XtCCallback, XtRCallback, - sizeof(XtPointer), + sizeof(XtPointer), offset(callback), XtRCallback, (XtPointer)NULL @@ -360,7 +360,7 @@ ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length) AsciiSrcObject src = (AsciiSrcObject)w; XawTextPosition count, start; Piece *piece; -#ifndef OLDXAW +#ifndef OLDXAW XawTextAnchor *anchor; XawTextEntity *entity; XawTextPosition offset, end = pos + length; @@ -454,7 +454,7 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos, /* * Editing a read only source is not allowed */ - if (src->text_src.edit_mode == XawtextRead) + if (src->text_src.edit_mode == XawtextRead) return (XawEditError); start_piece = FindPiece(src, startPos, &start_first); @@ -561,7 +561,7 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos, src->ascii_src.length += -(endPos - startPos) + text->length; if ( text->length != 0) { - /* + /* * Put in the New Stuff */ start_piece = FindPiece(src, startPos, &start_first); @@ -834,7 +834,7 @@ Scan(Widget w, register XawTextPosition position, XawTextScanType type, * Returns: * The position of the item found */ -static XawTextPosition +static XawTextPosition Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, XawTextBlock *text) { @@ -1078,7 +1078,7 @@ XawAsciiSrcDestroy(Widget w) } /* - * Public routines + * Public routines */ /* * Function: @@ -1146,7 +1146,7 @@ XawAsciiSave(Widget w) * If using the string in place then there is no need to play games * to get the internal info into a readable string. */ - if (src->ascii_src.use_string_in_place) + if (src->ascii_src.use_string_in_place) return (True); if (src->ascii_src.type == XawAsciiFile) { @@ -1211,7 +1211,7 @@ XawAsciiSaveAsFile(Widget w, _Xconst char *name) if (src->ascii_src.type == XawAsciiFile) ret = WritePiecesToFile(src, (String)name); else { - String string = StorePiecesInString(src); + String string = StorePiecesInString(src); ret = WriteToFile(string, (String)name, src->ascii_src.length); XtFree(string); @@ -1258,7 +1258,7 @@ XawAsciiSourceChanged(Widget w) * Private Functions */ static void -RemoveOldStringOrFile(AsciiSrcObject src, Bool checkString) +RemoveOldStringOrFile(AsciiSrcObject src, Bool checkString) { FreeAllPieces(src); @@ -1379,8 +1379,8 @@ StorePiecesInString(AsciiSrcObject src) string = XtMalloc((unsigned)(src->ascii_src.length + 1)); - for (first = 0, piece = src->ascii_src.first_piece ; piece != NULL; - first += piece->used, piece = piece->next) + for (first = 0, piece = src->ascii_src.first_piece ; piece != NULL; + first += piece->used, piece = piece->next) memcpy(string + first, piece->text, (unsigned)piece->used); string[src->ascii_src.length] = '\0'; @@ -1661,7 +1661,7 @@ RemovePiece(AsciiSrcObject src, Piece *piece) * Parameters: * src - AsciiSrc Widget * position - position that we are searching for - * first - position of the first character in this piece (return) + * first - position of the first character in this piece (return) * * Description: * Finds the piece containing the position indicated. @@ -1686,7 +1686,7 @@ FindPiece(AsciiSrcObject src, XawTextPosition position, XawTextPosition *first) return (old_piece); /* if we run off the end the return the last piece */ } - + /* * Function: * BreakPiece @@ -1874,9 +1874,9 @@ XawDiskSourceCreate(Widget parent, ArgList args, Cardinal num_args) ascii_args = XtMergeArgLists(temp, ONE, args, num_args); num_args++; - for (i = 0; i < num_args; i++) + for (i = 0; i < num_args; i++) if (streq(ascii_args[i].name, XtNfile) - || streq(ascii_args[i].name, XtCFile)) + || streq(ascii_args[i].name, XtCFile)) ascii_args[i].name = XtNstring; src = XtCreateWidget("genericAsciiDisk", asciiSrcObjectClass, parent, diff --git a/src/AsciiText.c b/src/AsciiText.c old mode 100755 new mode 100644 index 25cea9d..8e2f0aa --- a/src/AsciiText.c +++ b/src/AsciiText.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -48,13 +48,13 @@ SOFTWARE. /* * AsciiText.c - Source code for AsciiText Widget * - * This Widget is intended to be used as a simple front end to the + * This Widget is intended to be used as a simple front end to the * text widget with an ascii source and ascii sink attached to it * * Date: June 29, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ @@ -314,7 +314,7 @@ XawAsciiInitialize(Widget request, Widget cnew, for (i = 0, tab = 0; i < TAB_COUNT; i++) tabs[i] = (tab += 8); - + XawTextSinkSetTabs(w->text.sink, TAB_COUNT, tabs); XawTextDisableRedisplay(cnew); @@ -336,7 +336,7 @@ XawAsciiInitialize(Widget request, Widget cnew, } } -static void +static void XawAsciiDestroy(Widget w) { AsciiWidget ascii = (AsciiWidget)w; diff --git a/src/Box.c b/src/Box.c old mode 100755 new mode 100644 index 7aa14a5..266fb08 --- a/src/Box.c +++ b/src/Box.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -204,13 +204,13 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, { Boolean vbox = (bbw->box.orientation == XtorientVertical); Cardinal i; - Dimension w, h; /* Width and height needed for box */ - Dimension lw, lh; /* Width and height needed for current line */ - Dimension bw, bh; /* Width and height needed for current widget */ - Dimension h_space; /* Local copy of bbw->box.h_space */ - Widget widget; /* Current widget */ + Dimension w, h; /* Width and height needed for box */ + Dimension lw, lh; /* Width and height needed for current line */ + Dimension bw, bh; /* Width and height needed for current widget */ + Dimension h_space; /* Local copy of bbw->box.h_space */ + Widget widget; /* Current widget */ unsigned int num_mapped_children = 0; - + /* Box width and height */ h_space = bbw->box.h_space; @@ -224,11 +224,11 @@ DoLayout(BoxWidget bbw, unsigned int width, unsigned int height, if (w > width) width = w; h = bbw->box.v_space; - + /* Line width and height */ lh = 0; lw = h_space; - + for (i = 0; i < bbw->composite.num_children; i++) { widget = bbw->composite.children[i]; if (widget->core.managed) { @@ -362,7 +362,7 @@ XawBoxQueryGeometry(Widget widget, XtWidgetGeometry *constraint, else return (XtGeometryAlmost); } - + /* else gotta do it the long way... I have a preference for tall and narrow, so if my width is constrained, I'll accept it; otherwise, I'll compute the minimum @@ -392,9 +392,10 @@ XawBoxQueryGeometry(Widget widget, XtWidgetGeometry *constraint, if (preferred_width <= constraint->width) { width = preferred_width; do { /* find some width big enough to stay within this height */ - width <<= 1; - if (width > constraint->width) + if (width > (constraint->width >> 1)) /* avoid short int overflow */ width = constraint->width; + else + width <<= 1; DoLayout(w, width, 0, &preferred_width, &preferred_height, False); } while (preferred_height > constraint->height && width < constraint->width); diff --git a/src/Command.c b/src/Command.c old mode 100755 new mode 100644 index 9ad1f15..4535423 --- a/src/Command.c +++ b/src/Command.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -110,7 +110,7 @@ static char defaultTranslations[] = ; #define offset(field) XtOffsetOf(CommandRec, field) -static XtResource resources[] = { +static XtResource resources[] = { { XtNcallback, XtCCallback, @@ -216,21 +216,21 @@ WidgetClass commandWidgetClass = (WidgetClass)&commandClassRec; /* * Implementation */ -static GC +static GC Get_GC(CommandWidget cbw, Pixel fg, Pixel bg) { XGCValues values; - + values.foreground = fg; values.background = bg; values.font = cbw->label.font->fid; values.cap_style = CapProjecting; - + if (cbw->command.highlight_thickness > 1) values.line_width = cbw->command.highlight_thickness; - else + else values.line_width = 0; - + if (cbw->simple.international == True) return (XtAllocateGC((Widget)cbw, 0, GCForeground | GCBackground | GCLineWidth | @@ -242,7 +242,7 @@ Get_GC(CommandWidget cbw, Pixel fg, Pixel bg) } /*ARGSUSED*/ -static void +static void XawCommandInitialize(Widget request, Widget cnew, ArgList args, Cardinal *num_args) { @@ -250,7 +250,7 @@ XawCommandInitialize(Widget request, Widget cnew, int shape_event_base, shape_error_base; if (!cbw->label.font) XtError("Aborting: no font found\n"); - + if (cbw->command.shape_style != XawShapeRectangle && !XShapeQueryExtension(XtDisplay(cnew), &shape_event_base, &shape_error_base)) @@ -263,9 +263,9 @@ XawCommandInitialize(Widget request, Widget cnew, cbw->command.highlight_thickness = DEFAULT_HIGHLIGHT_THICKNESS; } - cbw->command.normal_GC = Get_GC(cbw, cbw->label.foreground, + cbw->command.normal_GC = Get_GC(cbw, cbw->label.foreground, cbw->core.background_pixel); - cbw->command.inverse_GC = Get_GC(cbw, cbw->core.background_pixel, + cbw->command.inverse_GC = Get_GC(cbw, cbw->core.background_pixel, cbw->label.foreground); XtReleaseGC(cnew, cbw->label.normal_GC); cbw->label.normal_GC = cbw->command.normal_GC; @@ -274,7 +274,7 @@ XawCommandInitialize(Widget request, Widget cnew, cbw->command.highlighted = HighlightNone; } -static Region +static Region HighlightRegion(CommandWidget cbw) { static Region outerRegion = NULL, innerRegion, emptyRegion; @@ -323,7 +323,7 @@ XawCommandToggle(Widget w) } /*ARGSUSED*/ -static void +static void Set(Widget w, XEvent *event, String *params, Cardinal *num_params) { CommandWidget cbw = (CommandWidget)w; @@ -349,7 +349,7 @@ Unset(Widget w, XEvent *event, String *params, Cardinal *num_params) } /*ARGSUSED*/ -static void +static void Reset(Widget w, XEvent *event, String *params, Cardinal *num_params) { CommandWidget cbw = (CommandWidget)w; @@ -363,7 +363,7 @@ Reset(Widget w, XEvent *event, String *params, Cardinal *num_params) } /*ARGSUSED*/ -static void +static void Highlight(Widget w, XEvent *event, String *params, Cardinal *num_params) { CommandWidget cbw = (CommandWidget)w; @@ -389,7 +389,7 @@ Highlight(Widget w, XEvent *event, String *params, Cardinal *num_params) } /*ARGSUSED*/ -static void +static void Unhighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) { CommandWidget cbw = (CommandWidget)w; @@ -400,10 +400,10 @@ Unhighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) } /*ARGSUSED*/ -static void +static void Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) { - CommandWidget cbw = (CommandWidget)w; + CommandWidget cbw = (CommandWidget)w; /* check to be sure state is still Set so that user can cancel the action (e.g. by moving outside the window, in the default @@ -427,13 +427,13 @@ XawCommandRedisplay(Widget w, XEvent *event, Region region) * region - region to paint (passed to the superclass) * change - did it change either set or highlight state? */ -static void +static void PaintCommandWidget(Widget w, XEvent *event, Region region, Bool change) { CommandWidget cbw = (CommandWidget)w; Bool very_thick; GC rev_gc; - + very_thick = cbw->command.highlight_thickness > Min(XtWidth(cbw), XtHeight(cbw)) / 2; @@ -485,7 +485,7 @@ PaintCommandWidget(Widget w, XEvent *event, Region region, Bool change) else { int offset = cbw->command.highlight_thickness / 2; - XDrawRectangle(XtDisplay(w),XtWindow(w), rev_gc, offset, offset, + XDrawRectangle(XtDisplay(w),XtWindow(w), rev_gc, offset, offset, XtWidth(cbw) - cbw->command.highlight_thickness, XtHeight(cbw) - cbw->command.highlight_thickness); } @@ -495,7 +495,7 @@ PaintCommandWidget(Widget w, XEvent *event, Region region, Bool change) (*SuperClass->core_class.expose)(w, event, region); } -static void +static void XawCommandDestroy(Widget w) { CommandWidget cbw = (CommandWidget)w; @@ -505,7 +505,7 @@ XawCommandDestroy(Widget w) } /*ARGSUSED*/ -static Boolean +static Boolean XawCommandSetValues(Widget current, Widget request, Widget cnew, ArgList args, Cardinal *num_args) { @@ -541,9 +541,9 @@ XawCommandSetValues(Widget current, Widget request, Widget cnew, || oldcbw->label.font != cbw->label.font) { XtReleaseGC(cnew, cbw->command.inverse_GC); - cbw->command.normal_GC = Get_GC(cbw, cbw->label.foreground, + cbw->command.normal_GC = Get_GC(cbw, cbw->label.foreground, cbw->core.background_pixel); - cbw->command.inverse_GC = Get_GC(cbw, cbw->core.background_pixel, + cbw->command.inverse_GC = Get_GC(cbw, cbw->core.background_pixel, cbw->label.foreground); XtReleaseGC(cnew, cbw->label.normal_GC); cbw->label.normal_GC = cbw->command.normal_GC; @@ -619,7 +619,7 @@ XawCommandRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes) static void XawCommandResize(Widget w) { - if (XtIsRealized(w)) + if (XtIsRealized(w)) ShapeButton((CommandWidget)w, False); (*commandWidgetClass->core_class.superclass->core_class.resize)(w); diff --git a/src/Converters.c b/src/Converters.c old mode 100755 new mode 100644 index 08b18c4..9795671 --- a/src/Converters.c +++ b/src/Converters.c @@ -10,7 +10,7 @@ * * 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 @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include "Private.h" @@ -217,7 +216,7 @@ XawTypeToStringWarning(Display *dpy, String type) String params[1]; Cardinal num_params; - XmuSnprintf(fname, sizeof(fname), "cvt%sToString", type); + snprintf(fname, sizeof(fname), "cvt%sToString", type); params[0] = type; num_params = 1; @@ -235,7 +234,7 @@ TypeToStringNoArgsWarning(Display *dpy, String type) String params[1]; Cardinal num_params; - XmuSnprintf(fname, sizeof(fname), "cvt%sToString", type); + snprintf(fname, sizeof(fname), "cvt%sToString", type); params[0] = type; num_params = 1; @@ -258,8 +257,8 @@ _XawCvtBooleanToString(Display *dpy, XrmValue *args, Cardinal *num_args, if (*num_args != 0) TypeToStringNoArgsWarning(dpy, XtRBoolean); - XmuSnprintf(buffer, sizeof(buffer), "%s", - *(Boolean *)fromVal->addr ? XtEtrue : XtEfalse); + snprintf(buffer, sizeof(buffer), "%s", + *(Boolean *)fromVal->addr ? XtEtrue : XtEfalse); size = strlen(buffer) + 1; string_done(buffer); @@ -277,8 +276,8 @@ _XawCvtBoolToString(Display *dpy, XrmValue *args, Cardinal *num_args, if (*num_args != 0) TypeToStringNoArgsWarning(dpy, XtRBool); - XmuSnprintf(buffer, sizeof(buffer), "%s", - *(Bool *)fromVal->addr ? XtEtrue : XtEfalse); + snprintf(buffer, sizeof(buffer), "%s", + *(Bool *)fromVal->addr ? XtEtrue : XtEfalse); size = strlen(buffer) + 1; string_done(buffer); @@ -296,7 +295,7 @@ _XawCvtPositionToString(Display *dpy, XrmValue *args, Cardinal *num_args, if (*num_args != 0) TypeToStringNoArgsWarning(dpy, XtRPosition); - XmuSnprintf(buffer, sizeof(buffer), "%d", *(Position *)fromVal->addr); + snprintf(buffer, sizeof(buffer), "%d", *(Position *)fromVal->addr); size = strlen(buffer) + 1; string_done(buffer); @@ -314,7 +313,7 @@ _XawCvtShortToString(Display *dpy, XrmValue *args, Cardinal *num_args, if (*num_args != 0) TypeToStringNoArgsWarning(dpy, XtRShort); - XmuSnprintf(buffer, sizeof(buffer), "%d", *(short *)fromVal->addr); + snprintf(buffer, sizeof(buffer), "%d", *(short *)fromVal->addr); size = strlen(buffer) + 1; string_done(buffer); @@ -332,7 +331,7 @@ _XawCvtDimensionToString(Display *dpy, XrmValue *args, Cardinal *num_args, if (*num_args != 0) TypeToStringNoArgsWarning(dpy, XtRDimension); - XmuSnprintf(buffer, sizeof(buffer), "%u", *(Dimension *)fromVal->addr); + snprintf(buffer, sizeof(buffer), "%u", *(Dimension *)fromVal->addr); size = strlen(buffer) + 1; string_done(buffer); @@ -350,7 +349,7 @@ _XawCvtCARD32ToString(Display *dpy, XrmValue *args, Cardinal *num_args, if (*num_args != 0) TypeToStringNoArgsWarning(dpy, "CARD32"); - XmuSnprintf(buffer, sizeof(buffer), "0x%08hx", *(int *)fromVal->addr); + snprintf(buffer, sizeof(buffer), "0x%08hx", *(int *)fromVal->addr); size = strlen(buffer) + 1; string_done(buffer); @@ -368,7 +367,7 @@ _XawCvtIntToString(Display *dpy, XrmValue *args, Cardinal *num_args, if (*num_args != 0) TypeToStringNoArgsWarning(dpy, XtRInt); - XmuSnprintf(buffer, sizeof(buffer), "%d", *(int *)fromVal->addr); + snprintf(buffer, sizeof(buffer), "%d", *(int *)fromVal->addr); size = strlen(buffer) + 1; string_done(buffer); @@ -386,7 +385,7 @@ _XawCvtCardinalToString(Display *dpy, XrmValue *args, Cardinal *num_args, if (*num_args != 0) TypeToStringNoArgsWarning(dpy, XtRCardinal); - XmuSnprintf(buffer, sizeof(buffer), "%u", *(Cardinal *)fromVal->addr); + snprintf(buffer, sizeof(buffer), "%u", *(Cardinal *)fromVal->addr); size = strlen(buffer) + 1; string_done(buffer); @@ -454,8 +453,8 @@ _XawCvtPixelToString(Display *dpy, XrmValue *args, Cardinal *num_args, * without asking Xlib. */ XQueryColor(dpy, colormap, &color); - XmuSnprintf(buffer, sizeof(buffer), "rgb:%04hx/%04hx/%04hx", - color.red, color.green, color.blue); + snprintf(buffer, sizeof(buffer), "rgb:%04hx/%04hx/%04hx", + color.red, color.green, color.blue); size = strlen(buffer) + 1; string_done(buffer); @@ -486,7 +485,7 @@ _XawCvtFontStructToString(Display *dpy, XrmValue *args, Cardinal *num_args, if (tmp) { - XmuSnprintf(buffer, sizeof(buffer), "%s", tmp); + snprintf(buffer, sizeof(buffer), "%s", tmp); size = strlen(tmp); XFree(tmp); } @@ -515,8 +514,8 @@ _XawCvtUnsignedCharToString(Display *dpy, XrmValue *args, Cardinal *num_args, if (*num_args != 0) TypeToStringNoArgsWarning(dpy, XtRUnsignedChar); - XmuSnprintf(buffer, sizeof(buffer), "%u", - *(unsigned char *)fromVal->addr); + snprintf(buffer, sizeof(buffer), "%u", + *(unsigned char *)fromVal->addr); size = strlen(buffer) + 1; string_done(buffer); diff --git a/src/Dialog.c b/src/Dialog.c old mode 100755 new mode 100644 index 7accb8c..9c98d36 --- a/src/Dialog.c +++ b/src/Dialog.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -54,7 +54,7 @@ SOFTWARE. #include #include #include -#include +#include #include #include #include @@ -220,7 +220,7 @@ XawDialogInitialize(Widget request, Widget cnew, XtSetArg(arglist[0], XtNheight, XtHeight(dw->dialog.iconW)); XtSetValues(dw->dialog.labelW, arglist, 1); } - if (dw->dialog.value != NULL) + if (dw->dialog.value != NULL) CreateDialogValueWidget((Widget)dw); else dw->dialog.valueW = NULL; @@ -238,7 +238,7 @@ XawDialogConstraintInitialize(Widget request, Widget cnew, return; /* then just use defaults */ constraint->form.left = constraint->form.right = XtChainLeft; - if (dw->dialog.valueW == NULL) + if (dw->dialog.valueW == NULL) constraint->form.vert_base = dw->dialog.labelW; else constraint->form.vert_base = dw->dialog.valueW; @@ -360,7 +360,7 @@ XawDialogGetValuesHook(Widget w, ArgList args, Cardinal *num_args) String s; DialogWidget src = (DialogWidget)w; unsigned int i; - + for (i = 0; i < *num_args; i++) if (streq(args[i].name, XtNvalue)) { XtSetArg(a[0], XtNstring, &s); diff --git a/src/DisplayList.c b/src/DisplayList.c old mode 100755 new mode 100644 index 6549650..4ef89aa --- a/src/DisplayList.c +++ b/src/DisplayList.c @@ -10,7 +10,7 @@ * * 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 @@ -39,7 +39,6 @@ #include #include #include -#include #include "Private.h" #ifdef __UNIXOS2__ @@ -273,8 +272,8 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, { char msg[256]; - XmuSnprintf(msg, sizeof(msg), - "Error parsing displayList at \"%s\"", lp); + snprintf(msg, sizeof(msg), + "Error parsing displayList at \"%s\"", lp); XtAppWarning(XtDisplayToApplicationContext(DisplayOfScreen(screen)), msg); XawDestroyDisplayList(dlist); @@ -291,15 +290,15 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, } if (fp) { - XmuSnprintf(cname, fp - fname + 1, fname); + snprintf(cname, fp - fname + 1, fname); memmove(fname, fp + 1, strlen(fp)); lc = cname[0] ? XawGetDisplayListClass(cname) : xlibc; if (!lc) { char msg[256]; - XmuSnprintf(msg, sizeof(msg), - "Cannot find displayList class \"%s\"", cname); + snprintf(msg, sizeof(msg), + "Cannot find displayList class \"%s\"", cname); XtAppWarning(XtDisplayToApplicationContext (DisplayOfScreen(screen)), msg); XawDestroyDisplayList(dlist); @@ -316,8 +315,8 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, { char msg[256]; - XmuSnprintf(msg, sizeof(msg), - "Cannot find displayList procedure \"%s\"", fname); + snprintf(msg, sizeof(msg), + "Cannot find displayList procedure \"%s\"", fname); XtAppWarning(XtDisplayToApplicationContext(DisplayOfScreen(screen)), msg); XawDestroyDisplayList(dlist); @@ -355,8 +354,8 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, { char msg[256]; - XmuSnprintf(msg, sizeof(msg), - "Error parsing displayList at \"%s\"", lp); + snprintf(msg, sizeof(msg), + "Error parsing displayList at \"%s\"", lp); XtAppWarning(XtDisplayToApplicationContext (DisplayOfScreen(screen)), msg); XawDestroyDisplayList(dlist); @@ -420,8 +419,9 @@ _XawDisplayList *XawCreateDisplayList(String string, Screen *screen, char msg[256]; proc->args = NULL; - XmuSnprintf(msg, sizeof(msg), - "Cannot convert arguments to displayList function \"%s\"", fname); + snprintf(msg, sizeof(msg), + "Cannot convert arguments to displayList function \"%s\"", + fname); XtAppWarning(XtDisplayToApplicationContext (DisplayOfScreen(screen)), msg); XawDestroyDisplayList(dlist); diff --git a/src/Form.c b/src/Form.c old mode 100755 new mode 100644 index 58723e8..dcc26f3 --- a/src/Form.c +++ b/src/Form.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/src/Grip.c b/src/Grip.c old mode 100755 new mode 100644 index 93ddfbe..85f021b --- a/src/Grip.c +++ b/src/Grip.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL diff --git a/src/Label.c b/src/Label.c old mode 100755 new mode 100644 index d584426..e304636 --- a/src/Label.c +++ b/src/Label.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -468,7 +468,7 @@ GetGrayGC(LabelWidget lw) values.font = lw->label.font->fid; values.fill_style = FillTiled; values.tile = XmuCreateStippledPixmap(XtScreen((Widget)lw), - lw->label.foreground, + lw->label.foreground, lw->core.background_pixel, lw->core.depth); values.graphics_exposures = False; @@ -482,7 +482,7 @@ GetGrayGC(LabelWidget lw) GCGraphicsExposures, &values, GCFont, 0); else - lw->label.gray_GC = XtGetGC((Widget)lw, + lw->label.gray_GC = XtGetGC((Widget)lw, GCForeground | GCBackground | GCFont | GCTile | GCFillStyle | GCGraphicsExposures, @@ -493,7 +493,7 @@ static void compute_bitmap_offsets(LabelWidget lw) { /* - * bitmap will be eventually be displayed at + * bitmap will be eventually be displayed at * (internal_width, internal_height + lbm_y) */ if (lw->label.lbm_height != 0) @@ -527,10 +527,10 @@ XawLabelInitialize(Widget request, Widget cnew, LabelWidget lw = (LabelWidget)cnew; if (!lw->label.font) XtError("Aborting: no font found\n"); - if (lw->simple.international && !lw->label.fontset) + if (lw->simple.international && !lw->label.fontset) XtError("Aborting: no fontset found\n"); - - if (lw->label.label == NULL) + + if (lw->label.label == NULL) lw->label.label = XtNewString(lw->core.name); else lw->label.label = XtNewString(lw->label.label); @@ -615,7 +615,7 @@ XawLabelRedisplay(Widget gw, XEvent *event, Region region) else XDrawString(XtDisplay(gw), XtWindow(gw), gc, w->label.label_x, y, label, (int)(nl - label)); - y += w->label.font->max_bounds.ascent + + y += w->label.font->max_bounds.ascent + w->label.font->max_bounds.descent; label = nl + 1; } @@ -724,7 +724,7 @@ XawLabelSetValues(Widget current, Widget request, Widget cnew, if (curlw->label.encoding != newlw->label.encoding) was_resized = True; - if (curlw->simple.international + if (curlw->simple.international && curlw->label.fontset != newlw->label.fontset) was_resized = True; diff --git a/src/List.c b/src/List.c old mode 100755 new mode 100644 index 287151d..ce0ab5f --- a/src/List.c +++ b/src/List.c @@ -28,7 +28,7 @@ in this Software without prior written authorization from The Open Group. * This is a List widget. It allows the user to select an item in a list and * notifies the application through a callback function. * - * Created: 8/13/88 + * Created: 8/13/88 * By: Chris D. Peterson * MIT X Consortium */ @@ -81,7 +81,7 @@ static Bool Layout(Widget, Bool, Bool, Dimension*, Dimension*); static void PaintItemName(Widget, int); static void ResetList(Widget, Bool, Bool); -/* +/* * Actions */ static void Notify(Widget, XEvent*, String*, Cardinal*); @@ -91,7 +91,7 @@ static void Unset(Widget, XEvent*, String*, Cardinal*); /* * Initialization */ -static char defaultTranslations[] = +static char defaultTranslations[] = ":" "Set()\n" ":" "Notify()\n" ; @@ -337,7 +337,7 @@ GetGCs(Widget w) else lw->list.revgc = XtGetGC(w, GCForeground | GCFont, &values); - values.tile = XmuCreateStippledPixmap(XtScreen(w), + values.tile = XmuCreateStippledPixmap(XtScreen(w), lw->list.foreground, lw->core.background_pixel, lw->core.depth); @@ -374,10 +374,10 @@ CalculatedValues(Widget w) for (i = 0 ; i < lw->list.nitems; i++) { if (lw->simple.international == True) len = XmbTextEscapement(lw->list.fontset, lw->list.list[i], - strlen(lw->list.list[i])); + strlen(lw->list.list[i])); else len = XTextWidth(lw->list.font, lw->list.list[i], - strlen(lw->list.list[i])); + strlen(lw->list.list[i])); if (len > lw->list.longest) lw->list.longest = len; } @@ -466,15 +466,15 @@ ChangeSize(Widget w, unsigned int width, unsigned int height) } /*ARGSUSED*/ -static void +static void XawListInitialize(Widget temp1, Widget cnew, ArgList args, Cardinal *num_args) { ListWidget lw = (ListWidget)cnew; if (!lw->list.font) XtError("Aborting: no font found\n"); - if (lw->simple.international && !lw->list.fontset) + if (lw->simple.international && !lw->list.fontset) XtError("Aborting: no fontset found\n"); - + /* * Initialize all private resources */ @@ -538,10 +538,10 @@ CvtToItem(Widget w, int xloc, int yloc, int *item) /* If in right margin handle things right */ another = (xloc - (int)lw->list.internal_width) / lw->list.col_width; if (another >= lw->list.ncols) { - another = lw->list.ncols - 1; + another = lw->list.ncols - 1; ret_val = OUT_OF_RANGE; } - } + } if (xloc < 0 || yloc < 0) ret_val = OUT_OF_RANGE; if (one < 0) @@ -600,8 +600,8 @@ ItemInRectangle(Widget w, int ul, int lr, int item) ListWidget lw = (ListWidget)w; int mod_item; int things; - - if (item < ul || item > lr) + + if (item < ul || item > lr) return (False); if (lw->list.vertical_cols) things = lw->list.nrows; @@ -716,7 +716,7 @@ PaintItemName(Widget w, int item) HighlightBackground(w, x, y, lw->list.normgc); } else { - if (XtIsSensitive(w)) + if (XtIsSensitive(w)) gc = lw->list.normgc; else gc = lw->list.graygc; @@ -731,7 +731,7 @@ PaintItemName(Widget w, int item) lw->list.is_highlighted = item; } else { - if (XtIsSensitive(w)) + if (XtIsSensitive(w)) gc = lw->list.normgc; else gc = lw->list.graygc; @@ -759,7 +759,7 @@ PaintItemName(Widget w, int item) XSetClipMask(XtDisplay(w), gc, None); } -static void +static void XawListRedisplay(Widget w, XEvent *event, Region region) { int item; /* an item to work with */ @@ -776,7 +776,7 @@ XawListRedisplay(Widget w, XEvent *event, Region region) if (Superclass->core_class.expose) (Superclass->core_class.expose)(w, event, region); - + for (item = ul_item; item <= lr_item && item < lw->list.nitems; item++) if (ItemInRectangle(w, ul_item, lr_item, item)) PaintItemName(w, item); @@ -789,13 +789,13 @@ XawListRedisplay(Widget w, XEvent *event, Region region) * w - the widget. * intended - what the parent intends to do with us. * requested - what we want to happen */ -static XtGeometryResult +static XtGeometryResult XawListQueryGeometry(Widget w, XtWidgetGeometry *intended, XtWidgetGeometry *requested) { Dimension new_width, new_height; Bool change, width_req, height_req; - + width_req = intended->request_mode & CWWidth; height_req = intended->request_mode & CWHeight; @@ -810,13 +810,13 @@ XawListQueryGeometry(Widget w, XtWidgetGeometry *intended, new_height = XtHeight(w); requested->request_mode = 0; - + /* * We only care about our height and width */ if (!width_req && !height_req) return (XtGeometryYes); - + change = Layout(w, !width_req, !height_req, &new_width, &new_height); requested->request_mode |= CWWidth; @@ -853,7 +853,7 @@ XawListResize(Widget w) * width, height- the is the current width and height that we are going * we are going to layout the list widget to, * depending on xfree and yfree of course. - * + * * Return: * True if width or height have been changed */ static Bool @@ -877,7 +877,7 @@ Layout(Widget w, Bool xfree, Bool yfree, Dimension *width, Dimension *height) of inter-column column_space 's as columns. There should thus be a half column_space margin on each side of each column...*/ width2 = lw->list.ncols * lw->list.col_width + - (lw->list.internal_width << 1); + (lw->list.internal_width << 1); change = True; } if (yfree) { @@ -948,7 +948,7 @@ Layout(Widget w, Bool xfree, Bool yfree, Dimension *width, Dimension *height) while (1) { lw->list.nrows = ((lw->list.nitems - 1) / lw->list.ncols) + 1; width2 = lw->list.ncols * lw->list.col_width + - (lw->list.internal_width << 1); + (lw->list.internal_width << 1); height2 = lw->list.nrows * lw->list.row_height + (lw->list.internal_height << 1); if (width2 >= MaxSize && height2 >= MaxSize) @@ -984,7 +984,7 @@ Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) /* * Find item and if out of range then unhighlight and return - * + * * If the current item is unhighlighted then the user has aborted the * notify, so unhighlight and return */ @@ -1014,7 +1014,7 @@ Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) */ ret_value.string = lw->list.list[item]; ret_value.list_index = item; - + XtCallCallbacks(w, XtNcallback, (XtPointer)&ret_value); } @@ -1051,7 +1051,7 @@ Set(Widget w, XEvent *event, String *params, Cardinal *num_params) * Set specified arguments into widget */ /*ARGSUSED*/ -static Boolean +static Boolean XawListSetValues(Widget current, Widget request, Widget cnew, ArgList args, Cardinal *num_args) { @@ -1142,7 +1142,7 @@ XawListSetValues(Widget current, Widget request, Widget cnew, nl->list.highlight = NO_HIGHLIGHT; redraw = True; } - + return (redraw); } @@ -1151,7 +1151,7 @@ XawListDestroy(Widget w) { ListWidget lw = (ListWidget)w; XGCValues values; - + XGetGCValues(XtDisplay(w), lw->list.graygc, GCTile, &values); XmuReleaseStippledPixmap(XtScreen(w), values.tile); XtReleaseGC(w, lw->list.graygc); @@ -1233,7 +1233,7 @@ void XawListHighlight(Widget w, int item) { ListWidget lw = (ListWidget)w; - + if (XtIsSensitive(w)) { lw->list.highlight = item; if (lw->list.is_highlighted != NO_HIGHLIGHT) @@ -1259,7 +1259,7 @@ XawListShowCurrent(Widget w) XawListReturnStruct *ret_val; ret_val = (XawListReturnStruct *)XtMalloc(sizeof(XawListReturnStruct)); - + ret_val->list_index = lw->list.highlight; if (ret_val->list_index == XAW_LIST_NONE) ret_val->string = ""; diff --git a/src/Makefile.am b/src/Makefile.am old mode 100755 new mode 100644 index a77bb13..951dc26 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -56,15 +56,19 @@ COMMON_SOURCES = \ XawI18n.h COMMON_CFLAGS = \ - $(CWARNFLAGS) \ + $(CWARNFLAGS) + +COMMON_CPPFLAGS = \ -I${top_srcdir}/include \ - -I${top_srcdir}/include/X11/Xaw \ -DPROJECT_ROOT=\"$(prefix)\" if BUILD_XAW6 lib_LTLIBRARIES += libXaw6.la +libXaw6_la_CPPFLAGS = \ + $(COMMON_CPPFLAGS) + libXaw6_la_CFLAGS = \ $(COMMON_CFLAGS) \ -DOLDXAW \ @@ -100,6 +104,9 @@ if BUILD_XAW7 lib_LTLIBRARIES += libXaw7.la +libXaw7_la_CPPFLAGS = \ + $(COMMON_CPPFLAGS) + libXaw7_la_CFLAGS = \ $(COMMON_CFLAGS) \ -DXAW7 \ diff --git a/src/MenuButton.c b/src/MenuButton.c old mode 100755 new mode 100644 index 2732a72..e190851 --- a/src/MenuButton.c +++ b/src/MenuButton.c @@ -32,7 +32,7 @@ in this Software without prior written authorization from The Open Group. * Date: May 2, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ @@ -42,7 +42,6 @@ in this Software without prior written authorization from The Open Group. #include #include #include -#include #include #include #include "Private.h" @@ -65,7 +64,7 @@ static void PopupMenu(Widget, XEvent*, String*, Cardinal*); */ #define superclass ((CommandWidgetClass)&commandClassRec) -static char defaultTranslations[] = +static char defaultTranslations[] = ":" "highlight()\n" ":" "reset()\n" "Any:" "reset() PopupMenu()\n"; @@ -96,7 +95,7 @@ MenuButtonClassRec menuButtonClassRec = { { (WidgetClass)superclass, /* superclass */ "MenuButton", /* class_name */ - sizeof(MenuButtonRec), /* size */ + sizeof(MenuButtonRec), /* size */ XawMenuButtonClassInitialize, /* class_initialize */ NULL, /* class_part_initialize */ False, /* class_inited */ @@ -122,14 +121,14 @@ MenuButtonClassRec menuButtonClassRec = { NULL, /* accept_focus */ XtVersion, /* version */ NULL, /* callback_private */ - defaultTranslations, /* tm_table */ + defaultTranslations, /* tm_table */ XtInheritQueryGeometry, /* query_geometry */ XtInheritDisplayAccelerator, /* display_accelerator */ NULL, /* extension */ }, /* simple */ { - XtInheritChangeSensitive /* change_sensitive */ + XtInheritChangeSensitive /* change_sensitive */ }, /* label */ { @@ -212,7 +211,7 @@ PopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params) temp = w; while(temp != NULL) { menu = XtNameToWidget(temp, mbw->menu_button.menu_name); - if (menu == NULL) + if (menu == NULL) temp = XtParent(temp); else break; @@ -221,16 +220,16 @@ PopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params) if (menu == NULL) { char error_buf[BUFSIZ]; - (void)XmuSnprintf(error_buf, sizeof(error_buf), - "MenuButton: Could not find menu widget named %s.", - mbw->menu_button.menu_name); + snprintf(error_buf, sizeof(error_buf), + "MenuButton: Could not find menu widget named %s.", + mbw->menu_button.menu_name); XtAppWarning(XtWidgetToApplicationContext(w), error_buf); return; } if (!XtIsRealized(menu)) XtRealizeWidget(menu); - + menu_width = XtWidth(menu) + (XtBorderWidth(menu) << 1); button_height = XtHeight(w) + (XtBorderWidth(w) << 1); menu_height = XtHeight(menu) + (XtBorderWidth(menu) << 1); @@ -260,7 +259,7 @@ PopupMenu(Widget w, XEvent *event, String *params, Cardinal *num_params) if (menu_x + menu_width > scr_width) menu_x = scr_width - menu_width; } - if (menu_x < 0) + if (menu_x < 0) menu_x = 0; num_args = 0; diff --git a/src/MultiSink.c b/src/MultiSink.c old mode 100755 new mode 100644 index 129624e..77eb42f --- a/src/MultiSink.c +++ b/src/MultiSink.c @@ -51,13 +51,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -662,7 +662,7 @@ GetGC(MultiSinkObject sink) values.clip_x_origin = (long)sink; values.clip_mask = None; values.graphics_exposures = False; - + values.foreground = sink->text_sink.foreground; values.background = sink->text_sink.background; diff --git a/src/MultiSrc.c b/src/MultiSrc.c old mode 100755 new mode 100644 index e9e4bda..148a178 --- a/src/MultiSrc.c +++ b/src/MultiSrc.c @@ -170,7 +170,7 @@ static XtResource resources[] = { XtNcallback, XtCCallback, XtRCallback, - sizeof(XtPointer), + sizeof(XtPointer), offset(callback), XtRCallback, (XtPointer)NULL @@ -331,7 +331,7 @@ ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length) MultiSrcObject src = (MultiSrcObject)w; XawTextPosition count, start; MultiPiece *piece = FindPiece(src, pos, &start); - + text->format = XawFmtWide; text->firstPos = pos; text->ptr = (char *)(piece->text + (pos - start)); @@ -358,7 +358,7 @@ ReadText(Widget w, XawTextPosition pos, XawTextBlock *text, int length) * XawEditDone on success, XawEditError otherwise */ /*ARGSUSED*/ -static int +static int ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos, XawTextBlock *u_text_p) { @@ -370,9 +370,9 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos, Bool local_artificial_block = False; XawTextBlock text; - /* STEP 1: The user handed me a text block called `u_text' that may be - * in either FMTWIDE or FMT8BIT (ie MB.) Later code needs the block - * `text' to hold FMTWIDE. So, this copies `u_text' to `text', and if + /* STEP 1: The user handed me a text block called `u_text' that may be + * in either FMTWIDE or FMT8BIT (ie MB.) Later code needs the block + * `text' to hold FMTWIDE. So, this copies `u_text' to `text', and if * `u_text' was MB, I knock it up to WIDE */ if (u_text_p->length == 0) /* if so, the block contents never ref'd */ @@ -406,7 +406,7 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos, } /* STEP 2: some initialization... */ - if (src->text_src.edit_mode == XawtextRead) + if (src->text_src.edit_mode == XawtextRead) return (XawEditError); start_piece = FindPiece(src, startPos, &start_first); @@ -455,11 +455,11 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos, start_piece = FindPiece(src, startPos, &start_first); length = text.length; firstPos = text.firstPos; - + while (length > 0) { wchar_t *ptr; int fill; - + if (src->multi_src.use_string_in_place) { if (start_piece->used == src->multi_src.piece_size - 1) { @@ -481,13 +481,13 @@ ReplaceText(Widget w, XawTextPosition startPos, XawTextPosition endPos, } fill = Min((int)(src->multi_src.piece_size - start_piece->used), length); - + ptr = start_piece->text + (startPos - start_first); memmove(ptr + fill, ptr, (start_piece->used - (startPos - start_first)) * sizeof(wchar_t)); wptr =(wchar_t *)text.ptr; (void)wcsncpy(ptr, wptr + firstPos, fill); - + startPos += fill; firstPos += fill; start_piece->used += fill; @@ -681,7 +681,7 @@ Scan(Widget w, register XawTextPosition position, XawTextScanType type, * Returns: * The position of the item found */ -static XawTextPosition +static XawTextPosition Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, XawTextBlock *text) { @@ -752,7 +752,7 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, ptr += inc; position += inc; - + while (ptr < piece->text) { cnt = piece->text - ptr; @@ -763,7 +763,7 @@ Search(Widget w, register XawTextPosition position, XawTextScanDirection dir, } ptr = piece->text + piece->used - cnt; } - + while (ptr >= piece->text + piece->used) { cnt = ptr - (piece->text + piece->used); @@ -816,7 +816,7 @@ XawMultiSrcSetValues(Widget current, Widget request, Widget cnew, XtAppWarning(app_con, "MultiSrc: The XtNuseStringInPlace resources " "may not be changed."); - src->multi_src.use_string_in_place = + src->multi_src.use_string_in_place = old_src->multi_src.use_string_in_place; } @@ -825,7 +825,7 @@ XawMultiSrcSetValues(Widget current, Widget request, Widget cnew, string_set = True; break; } - + if (string_set || old_src->multi_src.type != src->multi_src.type) { RemoveOldStringOrFile(old_src, string_set); src->multi_src.allocated_string = old_src->multi_src.allocated_string; @@ -890,14 +890,14 @@ XawMultiSrcGetValuesHook(Widget w, ArgList args, Cardinal *num_args) } } -static void +static void XawMultiSrcDestroy(Widget w) { RemoveOldStringOrFile((MultiSrcObject) w, True); } /* - * Public routines + * Public routines */ /* * Function: @@ -952,14 +952,14 @@ _XawMultiSave(Widget w) * If using the string in place then there is no need to play games * to get the internal info into a readable string */ - if (src->multi_src.use_string_in_place) + if (src->multi_src.use_string_in_place) return (True); if (src->multi_src.type == XawAsciiFile) { #ifdef OLDXAW if (!src->multi_src.changes) #else - if (!src->text_src.changed) /* No changes to save */ + if (!src->text_src.changed) /* No changes to save */ #endif return (True); @@ -1006,7 +1006,7 @@ _XawMultiSave(Widget w) XtFree((char *)src->multi_src.string); else src->multi_src.allocated_string = True; - + src->multi_src.string = mb_string; } #ifdef OLDXAW @@ -1092,7 +1092,7 @@ static Bool WriteToFile(String string, String name) { int fd; - + if (((fd = creat(name, 0666)) == -1) || (write(fd, string, strlen(string)) == -1)) return (False); @@ -1197,12 +1197,12 @@ InitStringOrFile(MultiSrcObject src, Bool newString) if (src->multi_src.length > src->multi_src.multi_length) src->multi_src.multi_length = src->multi_src.length; - if (src->multi_src.multi_length == MAGIC_VALUE) + if (src->multi_src.multi_length == MAGIC_VALUE) src->multi_src.piece_size = src->multi_src.length; else src->multi_src.piece_size = src->multi_src.multi_length + 1; } - + return (NULL); } @@ -1252,7 +1252,7 @@ InitStringOrFile(MultiSrcObject src, Bool newString) src->multi_src.string = temp; src->multi_src.allocated_string = True; } - + if (!src->multi_src.is_tempfile) { if ((fd = open((char *)src->multi_src.string, open_mode, 0666)) != -1) { if ((file = fdopen(fd, fdopen_mode)) != NULL) { @@ -1264,7 +1264,7 @@ InitStringOrFile(MultiSrcObject src, Bool newString) { String params[2]; Cardinal num_params = 2; - + params[0] = (String)src->multi_src.string; params[1] = strerror(errno); XtAppWarningMsg(XtWidgetToApplicationContext((Widget)src), @@ -1294,25 +1294,25 @@ LoadPieces(MultiSrcObject src, FILE *file, char *string) int bytes = sizeof(wchar_t); char* temp_mb_holder = NULL; - /* - * This is tricky - the _XawTextMBtoWC converter uses its 3rd arg - * in as MB length, out as WC length. We want local_length to be - * WC count. + /* + * This is tricky - the _XawTextMBtoWC converter uses its 3rd arg + * in as MB length, out as WC length. We want local_length to be + * WC count. */ int local_length = src->multi_src.length; if (string != NULL) { - /* - * ASSERT: IF our caller passed a non-null string, THEN - * src->multi_src.length is currently string's * byte count, + /* + * ASSERT: IF our caller passed a non-null string, THEN + * src->multi_src.length is currently string's * byte count, * AND string is in a MB format */ local_str = _XawTextMBToWC(d, (char *)string, &local_length); src->multi_src.length = (XawTextPosition) local_length; } else if (src->multi_src.type != XawAsciiFile) { - /* - * here, we are not changing the contents, just reloading, + /* + * here, we are not changing the contents, just reloading, * so don't change len... */ local_length = src->multi_src.string ? @@ -1322,13 +1322,13 @@ LoadPieces(MultiSrcObject src, FILE *file, char *string) } else { if (src->multi_src.length != 0) { - temp_mb_holder = + temp_mb_holder = XtMalloc((src->multi_src.length + 1) * sizeof(unsigned char)); fseek(file, 0, 0); src->multi_src.length = fread(temp_mb_holder, - (Size_t)sizeof(unsigned char), + (Size_t)sizeof(unsigned char), (Size_t)src->multi_src.length, file); - if (src->multi_src.length <= 0) + if (src->multi_src.length <= 0) XtAppErrorMsg(XtWidgetToApplicationContext ((Widget) src), "readError", "multiSource", "XawError", "fread returned error.", NULL, NULL); @@ -1339,7 +1339,7 @@ LoadPieces(MultiSrcObject src, FILE *file, char *string) if (local_str == 0) { String params[2]; Cardinal num_params; - static char err_text[] = + static char err_text[] = "<<< FILE CONTENTS NOT REPRESENTABLE IN THIS LOCALE >>>"; params[0] = XtName(XtParent((Widget)src)); @@ -1353,7 +1353,7 @@ LoadPieces(MultiSrcObject src, FILE *file, char *string) params, &num_params); src->multi_src.length = sizeof err_text; local_length = src->multi_src.length; - local_str = _XawTextMBToWC(d, err_text, &local_length); + local_str = _XawTextMBToWC(d, err_text, &local_length); src->multi_src.length = local_length; } } @@ -1420,7 +1420,7 @@ AllocNewPiece(MultiSrcObject src, MultiPiece *prev) piece->next = prev->next; prev->next = piece; } - + piece->prev = prev; return (piece); @@ -1436,7 +1436,7 @@ AllocNewPiece(MultiSrcObject src, MultiPiece *prev) * Description: * Frees all the pieces */ -static void +static void FreeAllPieces(MultiSrcObject src) { MultiPiece *next, *first = src->multi_src.first_piece; @@ -1451,7 +1451,7 @@ FreeAllPieces(MultiSrcObject src) RemovePiece(src, first); } } - + /* * Function: * RemovePiece @@ -1511,7 +1511,7 @@ FindPiece(MultiSrcObject src, XawTextPosition position, XawTextPosition *first) return (old_piece); /* if we run off the end the return the last piece */ } - + /* * Function: * BreakPiece @@ -1528,7 +1528,7 @@ static void BreakPiece(MultiSrcObject src, MultiPiece *piece) { MultiPiece *cnew = AllocNewPiece(src, piece); - + cnew->text = (wchar_t *) XtMalloc(src->multi_src.piece_size * sizeof(wchar_t)); (void)wcsncpy(cnew->text, piece->text + HALF_PIECE, diff --git a/src/OS.c b/src/OS.c old mode 100755 new mode 100644 index 9c0bb45..8bc23dd --- a/src/OS.c +++ b/src/OS.c @@ -14,18 +14,9 @@ #if defined(linux) /* kernel header doesn't work with -ansi */ /* #include *//* for PAGE_SIZE */ -#define HAS_GETPAGESIZE #define HAS_SC_PAGESIZE /* _SC_PAGESIZE may be an enum for Linux */ #endif -#if defined(CSRG_BASED) -#define HAS_GETPAGESIZE -#endif - -#if defined(sun) -#define HAS_GETPAGESIZE -#endif - int _XawGetPageSize(void) { @@ -45,7 +36,7 @@ _XawGetPageSize(void) pagesize = sysconf(_SC_PAGE_SIZE); #endif -#ifdef HAS_GETPAGESIZE +#ifdef HAVE_GETPAGESIZE if (pagesize == -1) pagesize = getpagesize(); #endif diff --git a/src/Paned.c b/src/Paned.c old mode 100755 new mode 100644 index 84999f7..26ff812 --- a/src/Paned.c +++ b/src/Paned.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -64,10 +64,9 @@ SOFTWARE. #include #include #include -#include #include #include -#include +#include #include #include "Private.h" @@ -536,7 +535,7 @@ AdjustPanedSize(PanedWidget pw, unsigned int off_size, } if (*result_ret != XtGeometryAlmost) { *on_size_ret = GetRequestInfo(&request, IsVert(pw)); - *off_size_ret = GetRequestInfo(&request, !IsVert(pw)); + *off_size_ret = GetRequestInfo(&request, !IsVert(pw)); return; } *on_size_ret = GetRequestInfo(&reply, IsVert(pw)); @@ -563,21 +562,21 @@ AdjustPanedSize(PanedWidget pw, unsigned int off_size, * * Description: * This function chooses a pane to resize. - They are chosen using the following rules: + * They are chosen using the following rules: * * 1) size < max && size > min * 2) skip adjust == False * 3) widget not its prefered height * && this change will bring it closer * && The user has not resized this pane. - * + * * If no widgets are found that fits all the rules then * rule #3 is broken. * If there are still no widgets found than * rule #2 is broken. * Rule #1 is never broken. * If no widgets are found then NULL is returned. - * + * * Returns: * pane to resize or NULL */ @@ -599,7 +598,7 @@ ChoosePaneToResize(PanedWidget pw, int paneindex, Direction dir, Bool shrink) /*CONSTCOND*/ while(True) { Pane pane = PaneInfo(*childP); - + if ((rules < 3 || SatisfiesRule3(pane, shrink)) && (rules < 2 || SatisfiesRule2(pane)) && SatisfiesRule1(pane, shrink) @@ -635,7 +634,7 @@ ChoosePaneToResize(PanedWidget pw, int paneindex, Direction dir, Bool shrink) * * Parameters: * pw - paned widget - * paneindex - number of the pane border we are moving + * paneindex - number of the pane border we are moving * dir - pane to move (either UpLeftPane or LowRightPane) * sizeused - current amount of space used (used and returned) * @@ -668,7 +667,7 @@ LoopAndRefigureChildren(PanedWidget pw, int paneindex, Direction dir, GetPaneStack(pw, shrink, &pane, &start_size); if (pane == NULL) { pane = ChoosePaneToResize(pw, paneindex, dir, shrink); - if (pane == NULL) + if (pane == NULL) return; /* no one to resize, give up */ rule3_ok = SatisfiesRule3(pane, shrink); @@ -727,7 +726,7 @@ LoopAndRefigureChildren(PanedWidget pw, int paneindex, Direction dir, * the choosing of panes procedes in reverse order starting with the * last child. */ -static void +static void RefigureLocations(PanedWidget pw, int paneindex, Direction dir) { Widget *childP; @@ -766,7 +765,7 @@ RefigureLocations(PanedWidget pw, int paneindex, Direction dir) AssignMin(pane->size, (int) pane->max); sizeused += pane->size - old; } - + /* * It is possible that the panes will not fit inside the vpaned widget, but * we have tried out best @@ -789,7 +788,7 @@ RefigureLocations(PanedWidget pw, int paneindex, Direction dir) * Description: * Commits all of the previously figured locations. */ -static void +static void CommitNewLocations(PanedWidget pw) { Widget *childP; @@ -827,7 +826,7 @@ CommitNewLocations(PanedWidget pw) } /* - * This should match XtMoveWidget, except that we're also insuring the + * This should match XtMoveWidget, except that we're also insuring the * grip is Raised in the same request */ @@ -851,14 +850,14 @@ CommitNewLocations(PanedWidget pw) * pw - paned widget * * Description: - * Refigures all locations in a paned widget and commits them immediately. + * Refigures all locations in a paned widget and commits them immediately. * * This function does nothing if any of the following are true. * o refiguremode is false. * o The widget is unrealized. * o There are no panes is the paned widget. */ -static void +static void RefigureLocationsAndCommit(Widget w) { PanedWidget pw = (PanedWidget)w; @@ -888,7 +887,7 @@ static void _DrawRect(PanedWidget pw, GC gc, int on_loc, int off_loc, unsigned int on_size, unsigned int off_size) { - if (IsVert(pw)) + if (IsVert(pw)) XFillRectangle(XtDisplay((Widget)pw), XtWindow((Widget)pw), gc, off_loc, on_loc, off_size, on_size); else @@ -921,7 +920,7 @@ _DrawInternalBorders(PanedWidget pw, GC gc) if (pw->core.background_pixel == pw->paned.internal_bp) return; - off_loc = 0; + off_loc = 0; off_size = (unsigned int) PaneSize((Widget)pw, !IsVert(pw)); on_size = (unsigned int)pw->paned.internal_bw; @@ -937,7 +936,7 @@ _DrawInternalBorders(PanedWidget pw, GC gc) _DrawInternalBorders((pw), (pw)->paned.normgc) #define EraseInternalBorders(pw) \ _DrawInternalBorders((pw), (pw)->paned.invgc) -/* +/* * Function Name: * _DrawTrackLines * @@ -962,7 +961,7 @@ _DrawTrackLines(PanedWidget pw, Bool erase) ForAllPanes(pw, childP) { pane = PaneInfo(*childP); if (erase || pane->olddelta != pane->delta) { - on_size = pw->paned.internal_bw; + on_size = pw->paned.internal_bw; if (!erase) { on_loc = PaneInfo(*childP)->olddelta - (int) on_size; _DrawRect(pw, pw->paned.flipgc, @@ -981,7 +980,7 @@ _DrawTrackLines(PanedWidget pw, Bool erase) #define DrawTrackLines(pw) _DrawTrackLines((pw), False); #define EraseTrackLines(pw) _DrawTrackLines((pw), True); -/* +/* * Function: * GetEventLocation * @@ -1002,25 +1001,25 @@ GetEventLocation(PanedWidget pw, XEvent *event) switch (event->xany.type) { case ButtonPress: - case ButtonRelease: + case ButtonRelease: x = event->xbutton.x_root; y = event->xbutton.y_root; break; case KeyPress: - case KeyRelease: + case KeyRelease: x = event->xkey.x_root; y = event->xkey.y_root; break; - case MotionNotify: + case MotionNotify: x = event->xmotion.x_root; y = event->xmotion.y_root; break; - default: + default: x = pw->paned.start_loc; y = pw->paned.start_loc; } - if (IsVert(pw)) + if (IsVert(pw)) return (y); return (x); @@ -1056,10 +1055,10 @@ StartGripAdjustment(PanedWidget pw, Widget grip, Direction dir) */ if (XtIsRealized(grip)) { if (IsVert(pw)) { - if (dir == UpLeftPane) + if (dir == UpLeftPane) cursor = pw->paned.adjust_upper_cursor; - else if (dir == LowRightPane) - cursor = pw->paned.adjust_lower_cursor; + else if (dir == LowRightPane) + cursor = pw->paned.adjust_lower_cursor; else { if (pw->paned.adjust_this_cursor == None) cursor = pw->paned.v_adjust_this_cursor; @@ -1068,10 +1067,10 @@ StartGripAdjustment(PanedWidget pw, Widget grip, Direction dir) } } else { - if (dir == UpLeftPane) + if (dir == UpLeftPane) cursor = pw->paned.adjust_left_cursor; - else if (dir == LowRightPane) - cursor = pw->paned.adjust_right_cursor; + else if (dir == LowRightPane) + cursor = pw->paned.adjust_right_cursor; else { if (pw->paned.adjust_this_cursor == None) cursor = pw->paned.h_adjust_this_cursor; @@ -1079,12 +1078,12 @@ StartGripAdjustment(PanedWidget pw, Widget grip, Direction dir) cursor = pw->paned.adjust_this_cursor; } } - + XDefineCursor(XtDisplay(grip), XtWindow(grip), cursor); } EraseInternalBorders(pw); - ForAllPanes(pw, childP) + ForAllPanes(pw, childP) PaneInfo(*childP)->olddelta = -99; EraseTrackLines(pw); @@ -1110,10 +1109,10 @@ MoveGripAdjustment(PanedWidget pw, Widget grip, Direction dir, int loc) diff = loc - pw->paned.start_loc; - if (pw->paned.whichadd) + if (pw->paned.whichadd) add_size = PaneSize(pw->paned.whichadd, IsVert(pw)) + diff; - if (pw->paned.whichsub) + if (pw->paned.whichsub) sub_size = PaneSize(pw->paned.whichsub, IsVert(pw)) - diff; /* @@ -1125,7 +1124,7 @@ MoveGripAdjustment(PanedWidget pw, Widget grip, Direction dir, int loc) AssignMax(add_size, (int)PaneInfo(pw->paned.whichadd)->min); AssignMin(add_size, (int)PaneInfo(pw->paned.whichadd)->max); - if (add_size != old_add_size) + if (add_size != old_add_size) sub_size += old_add_size - add_size; old_sub_size = sub_size; @@ -1159,7 +1158,7 @@ CommitGripAdjustment(PanedWidget pw) EraseTrackLines(pw); CommitNewLocations(pw); DrawInternalBorders(pw); - + /* * Since the user selected this size then use it as the preferred size */ @@ -1218,9 +1217,9 @@ HandleGrip(Widget grip, XtPointer temp, XtPointer callData) case 'S': /* Start adjustment */ pw->paned.resize_children_to_pref = False; StartGripAdjustment(pw, grip, (Direction)direction[0]); - pw->paned.start_loc = loc; + pw->paned.start_loc = loc; break; - case 'M': + case 'M': MoveGripAdjustment(pw, grip, (Direction)direction[0], loc); break; case 'C': @@ -1257,12 +1256,12 @@ ResortChildren(PanedWidget pw) /* * We only keep track of the first unmanaged pane */ - if (unmanagedP == NULL) + if (unmanagedP == NULL) unmanagedP = childP; } else { /* must be a managed pane */ /* - * If an earlier widget was not a managed pane, then swap + * If an earlier widget was not a managed pane, then swap */ if (unmanagedP != NULL) { Widget child = *unmanagedP; @@ -1287,7 +1286,7 @@ ResortChildren(PanedWidget pw) * This function manages and unmanages the grips so that * the managed state of each grip matches that of its pane. */ -static void +static void ManageAndUnmanageGrips(PanedWidget pw) { WidgetList managed_grips, unmanaged_grips; @@ -1305,7 +1304,7 @@ ManageAndUnmanageGrips(PanedWidget pw) else *unmanagedP++ = PaneInfo(*childP)->grip; } - + if (managedP != managed_grips) { *unmanagedP++ = *--managedP; /* Last grip is never managed */ XtManageChildren(managed_grips, managedP - managed_grips); @@ -1335,7 +1334,7 @@ CreateGrip(Widget child) Arg arglist[2]; Cardinal num_args = 0; Cursor cursor; - + XtSetArg(arglist[num_args], XtNtranslations, pw->paned.grip_translations); num_args++; if ((cursor = pw->paned.grip_cursor) == None) { @@ -1349,8 +1348,8 @@ CreateGrip(Widget child) num_args++; PaneInfo(child)->grip = XtCreateWidget("grip", gripWidgetClass, (Widget)pw, arglist, num_args); - - XtAddCallback(PaneInfo(child)->grip, XtNcallback, + + XtAddCallback(PaneInfo(child)->grip, XtNcallback, HandleGrip, (XtPointer)child); } @@ -1371,14 +1370,14 @@ GetGCs(Widget w) /* * Draw pane borders in internal border color */ - values.foreground = pw->paned.internal_bp; + values.foreground = pw->paned.internal_bp; valuemask = GCForeground; pw->paned.normgc = XtGetGC(w, valuemask, &values); /* * Erase pane borders with background color */ - values.foreground = pw->core.background_pixel; + values.foreground = pw->core.background_pixel; valuemask = GCForeground; pw->paned.invgc = XtGetGC(w, valuemask, &values); @@ -1388,7 +1387,7 @@ GetGCs(Widget w) */ values.function = GXinvert; values.plane_mask = pw->paned.internal_bp ^ pw->core.background_pixel; - values.subwindow_mode = IncludeInferiors; + values.subwindow_mode = IncludeInferiors; valuemask = GCPlaneMask | GCFunction | GCSubwindowMode; pw->paned.flipgc = XtGetGC(w, valuemask, &values); } @@ -1455,7 +1454,7 @@ ChangeAllGripCursors(PanedWidget pw) ForAllPanes(pw, childP) { Arg arglist[1]; Cursor cursor; - + if ((cursor = pw->paned.grip_cursor) == None) { if (IsVert(pw)) cursor = pw->paned.v_grip_cursor; @@ -1469,7 +1468,7 @@ ChangeAllGripCursors(PanedWidget pw) } } } - + /* * Function: * PushPaneStack @@ -1510,7 +1509,7 @@ static void GetPaneStack(PanedWidget pw, Bool shrink, Pane *pane, int *start_size) { if (pw->paned.stack == NULL) { - *pane = NULL; + *pane = NULL; return; } @@ -1567,7 +1566,7 @@ ClearPaneStack(PanedWidget pw) ; } -static void +static void XawPanedClassInitialize(void) { XawInitializeWidgetSet(); @@ -1578,8 +1577,8 @@ XawPanedClassInitialize(void) } /* The Geometry Manager only allows changes after Realize if - * allow_resize is True in the constraints record. - * + * allow_resize is True in the constraints record. + * * For vertically paned widgets: * * It only allows height changes, but offers the requested height @@ -1633,9 +1632,9 @@ XawPanedGeometryManager(Widget w, XtWidgetGeometry *request, */ if (result != XtGeometryNo) { - if (vert) + if (vert) XtHeight(pw) = on_size; - else + else XtWidth(pw) = on_size; } @@ -1653,7 +1652,7 @@ XawPanedGeometryManager(Widget w, XtWidgetGeometry *request, XtWidth(pw) = old_paned_size; reply->height = off_size; reply->width = pane->size; - } + } /* * IF either of the following is true @@ -1661,13 +1660,13 @@ XawPanedGeometryManager(Widget w, XtWidgetGeometry *request, * o There was a "off_size" request and the new "off_size" is different * from that requested * o There was no "off_size" request and the new "off_size" is different - * + * * o The "on_size" we will allow is different from that requested - * + * * THEN: set almost */ if (!((vert ? CWWidth : CWHeight) & mask)) { - if (vert) + if (vert) request->width = XtWidth(w); else request->height = XtHeight(w); @@ -1707,7 +1706,7 @@ XawPanedInitialize(Widget request, Widget cnew, pw->paned.num_panes = 0; } -static void +static void XawPanedRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes) { PanedWidget pw = (PanedWidget)w; @@ -1732,7 +1731,7 @@ XawPanedRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes) pw->paned.resize_children_to_pref = False; } -static void +static void XawPanedDestroy(Widget w) { ReleaseGCs(w); @@ -1746,7 +1745,7 @@ ReleaseGCs(Widget w) XtReleaseGC(w, pw->paned.normgc); XtReleaseGC(w, pw->paned.invgc); XtReleaseGC(w, pw->paned.flipgc); -} +} static void XawPanedInsertChild(Widget w) @@ -1763,7 +1762,7 @@ XawPanedInsertChild(Widget w) if (pane->show_grip == True) { CreateGrip(w); - if (pane->min == PANED_GRIP_SIZE) + if (pane->min == PANED_GRIP_SIZE) pane->min = PaneSize(pane->grip, IsVert((PanedWidget)XtParent(w))); } else { @@ -1782,7 +1781,7 @@ XawPanedDeleteChild(Widget w) /* remove the subwidget info and destroy the grip */ if (IsPane(w) && HasGrip(w)) XtDestroyWidget(PaneInfo(w)->grip); - + /* delete the child widget in the composite children list with the superclass delete_child routine */ @@ -1813,7 +1812,7 @@ XawPanedChangeManaged(Widget w) ManageAndUnmanageGrips(pw); pw->paned.recursively_called = False; - ResortChildren(pw); + ResortChildren(pw); pw->paned.num_panes = 0; ForAllChildren(pw, childP) @@ -1827,7 +1826,7 @@ XawPanedChangeManaged(Widget w) pw->paned.num_panes++; } else - break; /* This list is already sorted */ + break; /* This list is already sorted */ } SetChildrenPrefSizes((PanedWidget) w, size); @@ -1858,7 +1857,7 @@ XawPanedRedisplay(Widget w, XEvent *event, Region region) } /*ARGSUSED*/ -static Boolean +static Boolean XawPanedSetValues(Widget old, Widget request, Widget cnew, ArgList args, Cardinal *num_args) { @@ -1880,7 +1879,7 @@ XawPanedSetValues(Widget old, Widget request, Widget cnew, old_pw->paned.v_grip_cursor != new_pw->paned.v_grip_cursor || old_pw->paned.h_grip_cursor != new_pw->paned.h_grip_cursor) ChangeAllGripCursors(new_pw); - + if (IsVert(old_pw) != IsVert(new_pw)) { /* * We are fooling the paned widget into thinking that is needs to @@ -1905,7 +1904,7 @@ XawPanedSetValues(Widget old, Widget request, Widget cnew, RefigureLocationsAndCommit(cnew); return (True); /* We have done a full configuration, return */ } - + if (old_pw->paned.grip_indent != new_pw->paned.grip_indent && XtIsRealized(cnew)) { CommitNewLocations(new_pw); @@ -1916,7 +1915,7 @@ XawPanedSetValues(Widget old, Widget request, Widget cnew, } /*ARGSUSED*/ -static Boolean +static Boolean XawPanedPaneSetValues(Widget old, Widget request, Widget cnew, ArgList args, Cardinal *num_args) { @@ -1966,7 +1965,7 @@ XawPanedPaneSetValues(Widget old, Widget request, Widget cnew, * Description: * Sets the min and max size for a pane. */ -void +void XawPanedSetMinMax(Widget widget, int min, int max) { Pane pane = PaneInfo(widget); @@ -1988,7 +1987,7 @@ XawPanedSetMinMax(Widget widget, int min, int max) * Description: * Gets the min and max size for a pane. */ -void +void XawPanedGetMinMax(Widget widget, int *min, int *max) { Pane pane = PaneInfo(widget); @@ -2009,7 +2008,7 @@ XawPanedGetMinMax(Widget widget, int *min, int *max) * Allows a flag to be set the will inhibit * the paned widgets relayout routine. */ -void +void XawPanedSetRefigureMode(Widget w, #if NeedWidePrototypes int mode @@ -2034,7 +2033,7 @@ XawPanedSetRefigureMode(Widget w, * Returns: * the number of panes in the paned widget */ -int +int XawPanedGetNumSub(Widget w) { return (((PanedWidget)w)->paned.num_panes); @@ -2051,7 +2050,7 @@ XawPanedGetNumSub(Widget w) * Allows a flag to be set that determines if the paned * widget will allow geometry requests from this child. */ -void +void XawPanedAllowResize(Widget widget, #if NeedWidePrototypes int allow_resize diff --git a/src/Panner.c b/src/Panner.c old mode 100755 new mode 100644 index 2ab88f5..aa90233 --- a/src/Panner.c +++ b/src/Panner.c @@ -635,7 +635,7 @@ parse_page_string(char *s, int pagesize, int canvassize, Bool *relative) XmuLocatePixmapFile(pw->core.screen, pw->panner.stipple_name, \ pw->panner.shadow_color, pw->core.background_pixel, \ pw->core.depth, NULL, 0, NULL, NULL, NULL, NULL) - + #define PIXMAP_OKAY(pm) ((pm) != None && (pm) != XtUnspecifiedPixmap) /*ARGSUSED*/ @@ -663,7 +663,7 @@ XawPannerInitialize(Widget greq, Widget gnew, ArgList args, Cardinal *num_args) cnew->panner.slider_gc = NULL; reset_slider_gc(cnew); /* foreground */ cnew->panner.xor_gc = NULL; - reset_xor_gc(cnew); /* foreground ^ background */ + reset_xor_gc(cnew); /* foreground ^ background */ rescale(cnew); /* does a position check */ cnew->panner.shadow_valid = False; @@ -822,7 +822,7 @@ XawPannerSetValues(Widget gcur, Widget greq, Widget gnew, Bool loc = cur->panner.slider_x != cnew->panner.slider_x || cur->panner.slider_y != cnew->panner.slider_y; Bool siz = cur->panner.slider_width != cnew->panner.slider_width || - cur->panner.slider_height != cnew->panner.slider_height; + cur->panner.slider_height != cnew->panner.slider_height; if (loc || siz || (cur->panner.allow_off != cnew->panner.allow_off && cnew->panner.allow_off)) { scale_knob(cnew, loc, siz); diff --git a/src/Pixmap.c b/src/Pixmap.c old mode 100755 new mode 100644 index e4ac9b4..6e3388c --- a/src/Pixmap.c +++ b/src/Pixmap.c @@ -10,7 +10,7 @@ * * 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 @@ -675,7 +675,7 @@ GetResourcePixmapPath(Display *display) xrm_class[1] = NULLQUARK; if (!XrmGetDatabase(display)) (void) XGetDefault(display, "", ""); - if (XrmQGetResource(XrmGetDatabase(display), xrm_name, xrm_class, + if (XrmQGetResource(XrmGetDatabase(display), xrm_name, xrm_class, &rep_type, &value) && rep_type == XrmPermStringToQuark("String")) { int length = 0; @@ -859,7 +859,7 @@ GradientLoader(XawParams *params, Screen *screen, Colormap colormap, int depth, return (False); ired = (double)(end.red - start.red) / (double)steps; - igreen = (double)(end.green - start.green) / (double)steps; + igreen = (double)(end.green - start.green) / (double)steps; iblue = (double)(end.blue - start.blue) / (double)steps; red = color.red = start.red; diff --git a/src/Porthole.c b/src/Porthole.c old mode 100755 new mode 100644 index e94d213..4842e70 --- a/src/Porthole.c +++ b/src/Porthole.c @@ -23,7 +23,7 @@ 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: Jim Fulton, MIT X Consortium - * + * * This widget is a trivial clipping widget. It is typically used with a * panner or scrollbar to navigate. */ @@ -112,7 +112,7 @@ PortholeClassRec portholeClassRec = { NULL, /* extension */ }, /* composite */ - { + { XawPortholeGeometryManager, /* geometry_manager */ XawPortholeChangeManaged, /* change_managed */ XtInheritInsertChild, /* insert_child */ @@ -367,7 +367,7 @@ XawPortholeChangeManaged(Widget gw) == XtGeometryAlmost) (void)XtMakeGeometryRequest(gw, &retgeom, NULL); } - + XtResizeWidget(child, Max(XtWidth(child), XtWidth(pw)), Max(XtHeight(child), XtHeight(pw)), 0); diff --git a/src/Private.h b/src/Private.h old mode 100755 new mode 100644 index 3a91b7a..ca70d5f --- a/src/Private.h +++ b/src/Private.h @@ -10,7 +10,7 @@ * * 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 diff --git a/src/Repeater.c b/src/Repeater.c old mode 100755 new mode 100644 index e99a978..9b16ced --- a/src/Repeater.c +++ b/src/Repeater.c @@ -23,7 +23,7 @@ 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: Jim Fulton, MIT X Consortium - * + * * This widget is used for press-and-hold style buttons. */ @@ -278,7 +278,7 @@ ActionStart(Widget gw, XEvent *event, String *params, Cardinal *num_params) RepeaterWidget rw = (RepeaterWidget)gw; CLEAR_TIMEOUT(rw); - if (rw->repeater.start_callbacks) + if (rw->repeater.start_callbacks) XtCallCallbackList(gw, rw->repeater.start_callbacks, NULL); DO_CALLBACK(rw); @@ -293,6 +293,6 @@ ActionStop(Widget gw, XEvent *event, String *params, Cardinal *num_params) RepeaterWidget rw = (RepeaterWidget)gw; CLEAR_TIMEOUT((RepeaterWidget)gw); - if (rw->repeater.stop_callbacks) + if (rw->repeater.stop_callbacks) XtCallCallbackList(gw, rw->repeater.stop_callbacks, NULL); } diff --git a/src/Scrollbar.c b/src/Scrollbar.c old mode 100755 new mode 100644 index 6413f0b..894a945 --- a/src/Scrollbar.c +++ b/src/Scrollbar.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -372,7 +372,7 @@ FillArea(ScrollbarWidget w, int top, int bottom, int thumb) Dimension length; top = XawMax(1, top); - if (w->scrollbar.orientation == XtorientHorizontal) + if (w->scrollbar.orientation == XtorientHorizontal) bottom = XawMin(bottom, XtWidth(w) - 1); else bottom = XawMin(bottom, XtHeight(w) - 1); @@ -385,7 +385,7 @@ FillArea(ScrollbarWidget w, int top, int bottom, int thumb) switch(thumb) { /* Fill the new Thumb location */ case 1: - if (w->scrollbar.orientation == XtorientHorizontal) + if (w->scrollbar.orientation == XtorientHorizontal) XFillRectangle(XtDisplay(w), XtWindow(w), w->scrollbar.gc, top, 1, length, XtHeight(w) - 2); else @@ -394,7 +394,7 @@ FillArea(ScrollbarWidget w, int top, int bottom, int thumb) break; /* Clear the old Thumb location */ case 0: - if (w->scrollbar.orientation == XtorientHorizontal) + if (w->scrollbar.orientation == XtorientHorizontal) XClearArea(XtDisplay(w), XtWindow(w), top, 1, length, XtHeight(w) - 2, False); else @@ -417,7 +417,7 @@ PaintThumb(ScrollbarWidget w) oldbot = oldtop + w->scrollbar.shownLength; newtop = w->scrollbar.length * w->scrollbar.top; newbot = newtop + (int)(w->scrollbar.length * w->scrollbar.shown); - if (newbot < newtop + (int)w->scrollbar.min_thumb) + if (newbot < newtop + (int)w->scrollbar.min_thumb) newbot = newtop + w->scrollbar.min_thumb; w->scrollbar.topLoc = newtop; w->scrollbar.shownLength = newbot - newtop; @@ -451,7 +451,7 @@ static void XawScrollbarDestroy(Widget w) { ScrollbarWidget sbw = (ScrollbarWidget)w; - + XtReleaseGC(w, sbw->scrollbar.gc); } @@ -529,7 +529,7 @@ XawScrollbarRealize(Widget gw, Mask *valueMask, XtVaSetValues(gw, XtNcursor, w->scrollbar.inactiveCursor, NULL); - /* + /* * The Simple widget actually stuffs the value in the valuemask */ (*scrollbarWidgetClass->core_class.superclass->core_class.realize) @@ -537,7 +537,7 @@ XawScrollbarRealize(Widget gw, Mask *valueMask, } /*ARGSUSED*/ -static Boolean +static Boolean XawScrollbarSetValues(Widget current, Widget request, Widget desired, ArgList args, Cardinal *num_args) { diff --git a/src/Simple.c b/src/Simple.c old mode 100755 new mode 100644 index 711e900..be5597b --- a/src/Simple.c +++ b/src/Simple.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -52,7 +52,6 @@ SOFTWARE. #include #include #include -#include #include #include #include "Private.h" @@ -271,11 +270,11 @@ XawSimpleClassPartInitialize(WidgetClass cclass) if (c->simple_class.change_sensitive == NULL) { char buf[BUFSIZ]; - (void)XmuSnprintf(buf, sizeof(buf), - "%s Widget: The Simple Widget class method " - "'change_sensitive' is undefined.\nA function " - "must be defined or inherited.", - c->core_class.class_name); + snprintf(buf, sizeof(buf), + "%s Widget: The Simple Widget class method " + "'change_sensitive' is undefined.\n" + "A function must be defined or inherited.", + c->core_class.class_name); XtWarning(buf); c->simple_class.change_sensitive = ChangeSensitive; } @@ -321,7 +320,7 @@ XawSimpleRealize(Widget w, Mask *valueMask, XSetWindowAttributes *attributes) if (((SimpleWidget)w)->simple.insensitive_border == None) ((SimpleWidget)w)->simple.insensitive_border = XmuCreateStippledPixmap(XtScreen(w), - w->core.border_pixel, + w->core.border_pixel, w->core.background_pixel, w->core.depth); border_pixmap = w->core.border_pixmap; @@ -372,7 +371,7 @@ ConvertCursor(Widget w) SimpleWidget simple = (SimpleWidget) w; XrmValue from, to; Cursor cursor = None; - + if (simple->simple.cursor_name == NULL) return; @@ -410,7 +409,7 @@ XawSimpleSetValues(Widget current, Widget request, Widget cnew, if (s_old->simple.cursor != s_new->simple.cursor) new_cursor = True; - + /* * We are not handling the string cursor_name correctly here */ @@ -488,7 +487,7 @@ ChangeSensitive(Widget w) if (((SimpleWidget)w)->simple.insensitive_border == None) ((SimpleWidget)w)->simple.insensitive_border = XmuCreateStippledPixmap(XtScreen(w), - w->core.border_pixel, + w->core.border_pixel, w->core.background_pixel, w->core.depth); XSetWindowBorderPixmap(XtDisplay(w), XtWindow(w), diff --git a/src/SimpleMenu.c b/src/SimpleMenu.c old mode 100755 new mode 100644 index 0152a85..8defdf7 --- a/src/SimpleMenu.c +++ b/src/SimpleMenu.c @@ -28,7 +28,7 @@ in this Software without prior written authorization from The Open Group. * Date: April 3, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ @@ -39,7 +39,6 @@ in this Software without prior written authorization from The Open Group. #include #include #include -#include #include #include #include @@ -224,7 +223,7 @@ static XtResource resources[] = { XtCBackingStore, XtRBackingStore, sizeof(int), - offset(backing_store), + offset(backing_store), XtRImmediate, (XtPointer)(Always + WhenMapped + NotUseful) }, @@ -234,12 +233,12 @@ static XtResource resources[] = { XawCDisplayList, XawRDisplayList, sizeof(XawDisplayList*), - offset(display_list), + offset(display_list), XtRImmediate, NULL }, #endif -}; +}; #undef offset static char defaultTranslations[] = @@ -266,7 +265,7 @@ static XtActionsRec actionsList[] = {"call-proc", XawCallProcAction}, #endif }; - + static CompositeClassExtensionRec extension_rec = { NULL, /* next_extension */ NULLQUARK, /* record_type */ @@ -399,7 +398,7 @@ XawSimpleMenuInitialize(Widget request, Widget cnew, XmuCallInitializers(XtWidgetToApplicationContext(cnew)); - if (smw->simple_menu.label_class == NULL) + if (smw->simple_menu.label_class == NULL) smw->simple_menu.label_class = smeBSBObjectClass; smw->simple_menu.label = NULL; @@ -473,7 +472,7 @@ XawSimpleMenuRedisplay(Widget w, XEvent *event, Region region) if (!XtIsManaged((Widget)*entry)) continue; - if (region != NULL) + if (region != NULL) switch(XRectInRegion(region, XtX(*entry),XtY(*entry), XtWidth(*entry), XtHeight(*entry))) { case RectangleIn: @@ -600,7 +599,7 @@ XawSimpleMenuSetValues(Widget current, Widget request, Widget cnew, CreateLabel(cnew); else { /* Change */ Arg arglist[1]; - + XtSetArg(arglist[0], XtNlabel, smw_new->simple_menu.label_string); XtSetValues((Widget)smw_new->simple_menu.label, arglist, ONE); } @@ -609,7 +608,7 @@ XawSimpleMenuSetValues(Widget current, Widget request, Widget cnew, if (smw_old->simple_menu.label_class != smw_new->simple_menu.label_class) XtAppWarning(XtWidgetToApplicationContext(cnew), "No Dynamic class change of the SimpleMenu Label."); - + if (smw_old->simple_menu.top_margin != smw_new->simple_menu.top_margin || smw_old->simple_menu.bottom_margin != smw_new->simple_menu.bottom_margin) { @@ -638,7 +637,7 @@ XawSimpleMenuSetValues(Widget current, Widget request, Widget cnew, return (ret_val); } -/* +/* * Function: * XawSimpleMenuSetValuesHook * @@ -655,10 +654,10 @@ XawSimpleMenuSetValuesHook(Widget w, ArgList arglist, Cardinal *num_args) { Cardinal i; Dimension width, height; - + width = XtWidth(w); height = XtHeight(w); - + for (i = 0 ; i < *num_args ; i++) { if (streq(arglist[i].name, XtNwidth)) width = (Dimension)arglist[i].value; @@ -769,14 +768,14 @@ XawSimpleMenuChangeManaged(Widget w) /* * Global Action Routines - * + * * These actions routines will be added to the application's * global action list */ /* * Function: * PositionMenuAction - * + * * Parameters: * w - a widget (no the simple menu widget) * event - the event that caused this action @@ -791,7 +790,7 @@ XawSimpleMenuChangeManaged(Widget w) static void PositionMenuAction(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ +{ Widget menu; XPoint loc; @@ -805,13 +804,13 @@ PositionMenuAction(Widget w, XEvent *event, if ((menu = FindMenu(w, params[0])) == NULL) { char error_buf[BUFSIZ]; - (void)XmuSnprintf(error_buf, sizeof(error_buf), - "SimpleMenuWidget: could not find menu named %s.", - params[0]); + snprintf(error_buf, sizeof(error_buf), + "SimpleMenuWidget: could not find menu named %s.", + params[0]); XtAppWarning(XtWidgetToApplicationContext(w), error_buf); return; } - + switch (event->type) { case ButtonPress: case ButtonRelease: @@ -834,7 +833,7 @@ PositionMenuAction(Widget w, XEvent *event, PositionMenu(menu, NULL); break; } -} +} /* * Widget Action Routines @@ -848,17 +847,17 @@ PositionMenuAction(Widget w, XEvent *event, * event - event that caused this action * params - not used * num_params - "" - * + * * Description: * Unhighlights current entry. */ /*ARGSUSED*/ static void Unhighlight(Widget w, XEvent *event, String *params, Cardinal *num_params) -{ +{ SimpleMenuWidget smw = (SimpleMenuWidget)w; SmeObject entry = smw->simple_menu.entry_set; - + if (entry == NULL) return; @@ -987,7 +986,7 @@ XawSimpleMenuAddGlobalActions(XtAppContext app_con) { XtInitializeWidgetClass(simpleMenuWidgetClass); XmuCallInitializers(app_con); -} +} /* * Function: @@ -1008,7 +1007,7 @@ XawSimpleMenuGetActiveEntry(Widget w) SimpleMenuWidget smw = (SimpleMenuWidget)w; return ((Widget)smw->simple_menu.entry_set); -} +} /* * Function: @@ -1026,7 +1025,7 @@ XawSimpleMenuClearActiveEntry(Widget w) SimpleMenuWidget smw = (SimpleMenuWidget)w; smw->simple_menu.entry_set = NULL; -} +} /* * Private Functions @@ -1037,7 +1036,7 @@ XawSimpleMenuClearActiveEntry(Widget w) * * Parameters: * w - smw widget - * + * * Description: * Creates the label object and makes sure it is the first child in * in the list. @@ -1060,8 +1059,8 @@ CreateLabel(Widget w) XtSetArg(args[0], XtNlabel, smw->simple_menu.label_string); XtSetArg(args[1], XtNjustify, XtJustifyCenter); - smw->simple_menu.label = (SmeObject) - XtCreateManagedWidget("menuLabel", + smw->simple_menu.label = (SmeObject) + XtCreateManagedWidget("menuLabel", smw->simple_menu.label_class, w, args, TWO); next_child = NULL; @@ -1266,7 +1265,7 @@ Layout(Widget w, Dimension *width_ret, Dimension *height_ret) *height_ret = XtHeight(current_entry); } } - + /* * Function: * AddPositionAction @@ -1304,11 +1303,11 @@ AddPositionAction(XtAppContext app_con, XPointer data) * Returns: * The menu widget or NULL. */ -static Widget +static Widget FindMenu(Widget widget, String name) { Widget w, menu; - + for (w = widget; w != NULL; w = XtParent(w)) if ((menu = XtNameToWidget(w, name)) != NULL) return (menu); @@ -1333,12 +1332,12 @@ PositionMenu(Widget w, XPoint *location) SimpleMenuWidget smw = (SimpleMenuWidget)w; SmeObject entry; XPoint t_point; - + if (location == NULL) { Window temp1, temp2; int root_x, root_y, tempX, tempY; unsigned int tempM; - + location = &t_point; if (XQueryPointer(XtDisplay(w), XtWindow(w), &temp1, &temp2, &root_x, &root_y, &tempX, &tempY, &tempM) == False) { @@ -1350,14 +1349,14 @@ PositionMenu(Widget w, XPoint *location) location->x = (short) root_x; location->y = (short) root_y; } - + /* * The width will not be correct unless it is realized */ XtRealizeWidget(w); - + location->x -= XtWidth(w) >> 1; - + if (smw->simple_menu.popup_entry == NULL) entry = smw->simple_menu.label; else @@ -1388,20 +1387,20 @@ MoveMenu(Widget w, int x, int y) Arg arglist[2]; Cardinal num_args = 0; SimpleMenuWidget smw = (SimpleMenuWidget)w; - + if (smw->simple_menu.menu_on_screen) { int width = XtWidth(w) + (XtBorderWidth(w) << 1); int height = XtHeight(w) + (XtBorderWidth(w) << 1); - + if (x >= 0) { int scr_width = WidthOfScreen(XtScreen(w)); if (x + width > scr_width) x = scr_width - width; } - if (x < 0) + if (x < 0) x = 0; - + if (y >= 0) { int scr_height = HeightOfScreen(XtScreen(w)); @@ -1411,7 +1410,7 @@ MoveMenu(Widget w, int x, int y) if (y < 0) y = 0; } - + XtSetArg(arglist[num_args], XtNx, x); num_args++; XtSetArg(arglist[num_args], XtNy, y); num_args++; XtSetValues(w, arglist, num_args); @@ -1435,14 +1434,14 @@ static void ChangeCursorOnGrab(Widget w, XtPointer temp1, XtPointer temp2) { SimpleMenuWidget smw = (SimpleMenuWidget)w; - + /* * The event mask here is what is currently in the MIT implementation. * There really needs to be a way to get the value of the mask out * of the toolkit (CDP 5/26/89). */ XChangeActivePointerGrab(XtDisplay(w), ButtonPressMask | ButtonReleaseMask, - smw->simple_menu.cursor, + smw->simple_menu.cursor, XtLastTimestampProcessed(XtDisplay(w))); } @@ -1461,7 +1460,7 @@ MakeSetValuesRequest(Widget w, unsigned int width, unsigned int height) SimpleMenuWidget smw = (SimpleMenuWidget)w; Arg arglist[2]; Cardinal num_args = 0; - + if (!smw->simple_menu.recursive_set_values) { if (XtWidth(smw) != width || XtHeight(smw) != height) { smw->simple_menu.recursive_set_values = True; @@ -1495,7 +1494,7 @@ DoGetEventEntry(Widget w, int x_loc, int y_loc) return (*entry); } } - + return (NULL); } @@ -1544,7 +1543,7 @@ GetEventEntry(Widget w, XEvent *event) "Unknown event type in GetEventEntry()."); return (NULL); } - + if (x_loc < 0 || x_loc >= XtWidth(smw) || y_loc < 0 || y_loc >= XtHeight(smw)) return (NULL); @@ -1702,7 +1701,7 @@ MakeResizeRequest(Widget w) { int tries; Dimension width, height; - + width = XtWidth(w); height = XtHeight(w); @@ -1762,7 +1761,7 @@ PopupSubMenu(SimpleMenuWidget smw) popleft = (smw->simple_menu.state & SMW_POPLEFT) != 0; - if (popleft) + if (popleft) XtTranslateCoords((Widget)smw, -(int)XtWidth(menu), XtY(entry) - XtBorderWidth(menu), &menu_x, &menu_y); else diff --git a/src/Sme.c b/src/Sme.c old mode 100755 new mode 100644 index b01a81c..24d4fed --- a/src/Sme.c +++ b/src/Sme.c @@ -26,7 +26,7 @@ in this Software without prior written authorization from The Open Group. * Date: September 26, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ @@ -75,7 +75,7 @@ static XtResource resources[] = { XtRImmediate, (XtPointer)False }, -}; +}; #undef offset #define Superclass (&rectObjClassRec) @@ -147,13 +147,13 @@ XawSmeClassPartInitialize(WidgetClass cclass) m_ent = (SmeObjectClass)cclass; superC = (SmeObjectClass)m_ent->rect_class.superclass; - if (m_ent->sme_class.highlight == XtInheritHighlight) + if (m_ent->sme_class.highlight == XtInheritHighlight) m_ent->sme_class.highlight = superC->sme_class.highlight; if (m_ent->sme_class.unhighlight == XtInheritUnhighlight) m_ent->sme_class.unhighlight = superC->sme_class.unhighlight; - if (m_ent->sme_class.notify == XtInheritNotify) + if (m_ent->sme_class.notify == XtInheritNotify) m_ent->sme_class.notify = superC->sme_class.notify; } @@ -164,7 +164,7 @@ XawSmeClassPartInitialize(WidgetClass cclass) * Parameters: * request - widget requested by the argument list * cnew - new widget with both resource and non resource values - * + * * Description: * Initializes the simple menu widget entry */ @@ -234,7 +234,7 @@ Notify(Widget w) * w - menu entry object * itended - intended and return geometry info * return_val - - * + * * Description: * Returns the preferred geometry for this widget. * @@ -259,7 +259,7 @@ XawSmeQueryGeometry(Widget w, XtWidgetGeometry *intended, return_val->request_mode |= CWWidth; return_val->width = width; mode = return_val->request_mode; - + if ((mode & CWWidth) && width == XtWidth(entry)) return (XtGeometryNo); return (XtGeometryAlmost); diff --git a/src/SmeBSB.c b/src/SmeBSB.c old mode 100755 new mode 100644 index b56874b..52a789a --- a/src/SmeBSB.c +++ b/src/SmeBSB.c @@ -28,7 +28,7 @@ in this Software without prior written authorization from The Open Group. * Date: September 26, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ @@ -40,7 +40,6 @@ in this Software without prior written authorization from The Open Group. #include #include #include -#include #include #include #include @@ -62,7 +61,7 @@ static void XawSmeBSBRedisplay(Widget, XEvent*, Region); static Boolean XawSmeBSBSetValues(Widget, Widget, Widget, ArgList, Cardinal*); -/* +/* * Prototypes */ static void CreateGCs(Widget); @@ -179,7 +178,7 @@ static XtResource resources[] = { #endif }; #undef offset - + #define superclass (&smeClassRec) SmeBSBClassRec smeBSBClassRec = { /* rectangle */ @@ -215,7 +214,7 @@ SmeBSBClassRec smeBSBClassRec = { NULL, /* tm_table */ XawSmeBSBQueryGeometry, /* query_geometry */ NULL, /* display_accelerator */ - NULL, /* extension */ + NULL, /* extension */ }, /* sme */ { @@ -238,7 +237,7 @@ WidgetClass smeBSBObjectClass = (WidgetClass)&smeBSBClassRec; * Description: * Initializes the SmeBSBObject. */ -static void +static void XawSmeBSBClassInitialize(void) { XawInitializeWidgetSet(); @@ -267,7 +266,7 @@ XawSmeBSBInitialize(Widget request, Widget cnew, if (!entry->sme_bsb.font) XtError("Aborting: no font found\n"); - if (entry->sme_bsb.label == NULL) + if (entry->sme_bsb.label == NULL) entry->sme_bsb.label = XtName(cnew); else entry->sme_bsb.label = XtNewString(entry->sme_bsb.label); @@ -336,7 +335,7 @@ XawSmeBSBRedisplay(Widget w, XEvent *event, Region region) if (XtIsSensitive(w) && XtIsSensitive(XtParent(w))) { if (w == XawSimpleMenuGetActiveEntry(XtParent(w))) { - XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w), + XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w), entry->sme_bsb.norm_gc, XtX(w), y_loc, XtWidth(entry), XtHeight(entry)); gc = entry->sme_bsb.rev_gc; @@ -346,7 +345,7 @@ XawSmeBSBRedisplay(Widget w, XEvent *event, Region region) } else gc = entry->sme_bsb.norm_gray_gc; - + if (entry->sme_bsb.label != NULL) { int x_loc = entry->sme_bsb.left_margin; int len = strlen(entry->sme_bsb.label); @@ -400,7 +399,7 @@ XawSmeBSBRedisplay(Widget w, XEvent *event, Region region) else { y_loc += ((XtHeight(entry) - (font_ascent + font_descent)) >> 1) + font_ascent; - + XDrawString(XtDisplayOfObject(w), XtWindowOfObject(w), gc, XtX(w) + x_loc, y_loc, label, len); } @@ -487,7 +486,7 @@ XawSmeBSBSetValues(Widget current, Widget request, Widget cnew, * w - menu entry object * itended - intended and return geometry info * return_val - "" - * + * * Returns: * Geometry Result * @@ -527,7 +526,7 @@ XawSmeBSBQueryGeometry(Widget w, XtWidgetGeometry *intended, return (ret_val); } - + /* * Function: * FlipColors @@ -538,7 +537,7 @@ XawSmeBSBQueryGeometry(Widget w, XtWidgetGeometry *intended, * Description: * Invert the colors of the current entry. */ -static void +static void FlipColors(Widget w) { SmeBSBObject entry = (SmeBSBObject)w; @@ -547,7 +546,7 @@ FlipColors(Widget w) return; XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w), - entry->sme_bsb.invert_gc, + entry->sme_bsb.invert_gc, XtX(w), XtY(entry), XtWidth(entry), XtHeight(entry)); } @@ -571,7 +570,7 @@ GetDefaultSize(Widget w, Dimension *width, Dimension *height) if (entry->sme.international == True) { XFontSetExtents *ext = XExtentsOfFontSet(entry->sme_bsb.fontset); - if (entry->sme_bsb.label == NULL) + if (entry->sme_bsb.label == NULL) *width = 0; else *width = XmbTextEscapement(entry->sme_bsb.fontset, @@ -583,14 +582,14 @@ GetDefaultSize(Widget w, Dimension *width, Dimension *height) entry->sme_bsb.vert_space)) / ONE_HUNDRED; } else { - if (entry->sme_bsb.label == NULL) + if (entry->sme_bsb.label == NULL) *width = 0; else *width = XTextWidth(entry->sme_bsb.font, entry->sme_bsb.label, strlen(entry->sme_bsb.label)); *width += entry->sme_bsb.left_margin + entry->sme_bsb.right_margin; - + *height = entry->sme_bsb.font->max_bounds.ascent + entry->sme_bsb.font->max_bounds.descent; @@ -615,7 +614,7 @@ DrawBitmaps(Widget w, GC gc) { int x_loc, y_loc; SmeBSBObject entry = (SmeBSBObject)w; - + if (entry->sme_bsb.left_bitmap == None && entry->sme_bsb.right_bitmap == None) return; @@ -631,7 +630,7 @@ DrawBitmaps(Widget w, GC gc) entry->sme_bsb.left_bitmap_height) >> 1); XCopyPlane(XtDisplayOfObject(w), entry->sme_bsb.left_bitmap, - XtWindowOfObject(w), gc, 0, 0, + XtWindowOfObject(w), gc, 0, 0, entry->sme_bsb.left_bitmap_width, entry->sme_bsb.left_bitmap_height, x_loc, y_loc, 1); } @@ -647,7 +646,7 @@ DrawBitmaps(Widget w, GC gc) entry->sme_bsb.right_bitmap_height) >> 1); XCopyPlane(XtDisplayOfObject(w), entry->sme_bsb.right_bitmap, - XtWindowOfObject(w), gc, 0, 0, + XtWindowOfObject(w), gc, 0, 0, entry->sme_bsb.right_bitmap_width, entry->sme_bsb.right_bitmap_height, x_loc, y_loc, 1); } @@ -673,11 +672,11 @@ GetBitmapInfo(Widget w, Bool is_left) Window root; int x, y; unsigned int width, height; - + if (is_left) { if (entry->sme_bsb.left_bitmap != None && XGetGeometry(XtDisplayOfObject(w), - entry->sme_bsb.left_bitmap, &root, + entry->sme_bsb.left_bitmap, &root, &x, &y, &width, &height, &bw, &depth)) { entry->sme_bsb.left_bitmap_width = width; entry->sme_bsb.left_bitmap_height = height; @@ -708,7 +707,7 @@ CreateGCs(Widget w) SmeBSBObject entry = (SmeBSBObject)w; XGCValues values; XtGCMask mask, mask_i18n; - + values.foreground = XtParent(w)->core.background_pixel; values.background = entry->sme_bsb.foreground; values.font = entry->sme_bsb.font->fid; @@ -719,7 +718,7 @@ CreateGCs(Widget w) entry->sme_bsb.rev_gc = XtAllocateGC(w, 0, mask_i18n, &values, GCFont, 0); else entry->sme_bsb.rev_gc = XtGetGC(w, mask, &values); - + values.foreground = entry->sme_bsb.foreground; values.background = XtParent(w)->core.background_pixel; if (entry->sme.international == True) @@ -728,7 +727,7 @@ CreateGCs(Widget w) entry->sme_bsb.norm_gc = XtGetGC(w, mask, &values); values.fill_style = FillTiled; - values.tile = XmuCreateStippledPixmap(XtScreenOfObject(w), + values.tile = XmuCreateStippledPixmap(XtScreenOfObject(w), entry->sme_bsb.foreground, XtParent(w)->core.background_pixel, XtParent(w)->core.depth); diff --git a/src/SmeLine.c b/src/SmeLine.c old mode 100755 new mode 100644 index 80de18e..8011342 --- a/src/SmeLine.c +++ b/src/SmeLine.c @@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group. * Date: September 26, 1989 * * By: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu */ @@ -183,17 +183,17 @@ CreateGC(Widget w) SmeLineObject entry = (SmeLineObject)w; XGCValues values; XtGCMask mask = GCForeground | GCGraphicsExposures | GCLineWidth; - + values.foreground = entry->sme_line.foreground; values.graphics_exposures = False; values.line_width = entry->sme_line.line_width; - + if (entry->sme_line.stipple != XtUnspecifiedPixmap) { values.stipple = entry->sme_line.stipple; - values.fill_style = FillStippled; + values.fill_style = FillStippled; mask |= GCStipple | GCFillStyle; - - entry->sme_line.gc = XCreateGC(XtDisplayOfObject(w), + + entry->sme_line.gc = XCreateGC(XtDisplayOfObject(w), RootWindowOfScreen(XtScreenOfObject(w)), mask, &values); } @@ -212,7 +212,7 @@ DestroyGC(Widget w) { SmeLineObject entry = (SmeLineObject)w; - if (entry->sme_line.stipple != XtUnspecifiedPixmap) + if (entry->sme_line.stipple != XtUnspecifiedPixmap) XFreeGC(XtDisplayOfObject(w), entry->sme_line.gc); else XtReleaseGC(w, entry->sme_line.gc); @@ -225,7 +225,7 @@ XawSmeLineRedisplay(Widget w, XEvent *event, Region region) SmeLineObject entry = (SmeLineObject)w; int y = XtY(w) + (((int)XtHeight(w) - entry->sme_line.line_width) >> 1); - if (entry->sme_line.stipple != XtUnspecifiedPixmap) + if (entry->sme_line.stipple != XtUnspecifiedPixmap) XSetTSOrigin(XtDisplayOfObject(w), entry->sme_line.gc, 0, y); XFillRectangle(XtDisplayOfObject(w), XtWindowOfObject(w), @@ -252,7 +252,7 @@ XawSmeLineSetValues(Widget current, Widget request, Widget cnew, { SmeLineObject entry = (SmeLineObject)cnew; SmeLineObject old_entry = (SmeLineObject)current; - + if (entry->sme_line.line_width != old_entry->sme_line.line_width && entry->sme_line.stipple != old_entry->sme_line.stipple) { DestroyGC(current); diff --git a/src/StripChart.c b/src/StripChart.c old mode 100755 new mode 100644 index 237cf66..fa7357c --- a/src/StripChart.c +++ b/src/StripChart.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -247,10 +247,10 @@ CreateGC(StripChartWidget w, unsigned int which) static void DestroyGC(StripChartWidget w, unsigned int which) { - if (which & FOREGROUND) + if (which & FOREGROUND) XtReleaseGC((Widget)w, w->strip_chart.fgGC); - if (which & HIGHLIGHT) + if (which & HIGHLIGHT) XtReleaseGC((Widget)w, w->strip_chart.hiGC); } @@ -264,7 +264,7 @@ XawStripChartInitialize(Widget greq, Widget gnew, if (w->strip_chart.update > 0) w->strip_chart.interval_id = XtAppAddTimeOut(XtWidgetToApplicationContext(gnew), - w->strip_chart.update * MS_PER_SEC, + w->strip_chart.update * MS_PER_SEC, draw_it, (XtPointer)gnew); CreateGC(w, ALL_GCS); @@ -274,7 +274,7 @@ XawStripChartInitialize(Widget greq, Widget gnew, w->strip_chart.points = NULL; XawStripChartResize(gnew); } - + static void XawStripChartDestroy(Widget gw) { @@ -288,7 +288,7 @@ XawStripChartDestroy(Widget gw) } /* - * NOTE: This function really needs to recieve graphics exposure + * NOTE: This function really needs to recieve graphics exposure * events, but since this is not easily supported until R4 I am * going to hold off until then. */ @@ -305,12 +305,12 @@ XawStripChartRedisplay(Widget w, XEvent *event, Region region) } /*ARGSUSED*/ -static void +static void draw_it(XtPointer client_data, XtIntervalId *id) { StripChartWidget w = (StripChartWidget)client_data; double value; - + if (w->strip_chart.update > 0) w->strip_chart.interval_id = XtAppAddTimeOut(XtWidgetToApplicationContext((Widget)w), @@ -326,8 +326,8 @@ draw_it(XtPointer client_data, XtIntervalId *id) XtCallCallbacks((Widget)w, XtNgetValue, (XtPointer)&value); - /* - * Keep w->strip_chart.max_value up to date, and if this data + /* + * Keep w->strip_chart.max_value up to date, and if this data * point is off the graph, change the scale to make it fit */ if (value > w->strip_chart.max_value) { @@ -345,7 +345,7 @@ draw_it(XtPointer client_data, XtIntervalId *id) / w->strip_chart.scale); XFillRectangle(XtDisplay(w), XtWindow(w), w->strip_chart.fgGC, - w->strip_chart.interval, y, + w->strip_chart.interval, y, 1, XtHeight(w) - y); /* @@ -372,7 +372,7 @@ draw_it(XtPointer client_data, XtIntervalId *id) * changed, then w->strip_chart.max_value is updated to reflect the * largest data point */ -static int +static int repaint_window(StripChartWidget w, int left, int width) { int i, j; @@ -415,7 +415,7 @@ repaint_window(StripChartWidget w, int left, int width) int y = XtHeight(w) - (XtHeight(w) * w->strip_chart.valuedata[i]) / w->strip_chart.scale; - XFillRectangle(dpy, win, w->strip_chart.fgGC, + XFillRectangle(dpy, win, w->strip_chart.fgGC, i, y, 1, XtHeight(w) - y); } @@ -463,15 +463,15 @@ MoveChart(StripChartWidget w, Bool blit) (char *)(w->strip_chart.valuedata + next - j), j * sizeof(double)); next = w->strip_chart.interval = j; - + /* - * Since we just lost some data, recompute the + * Since we just lost some data, recompute the * w->strip_chart.max_value */ old_max = w->strip_chart.max_value; w->strip_chart.max_value = 0.0; for (i = 0; i < next; i++) { - if (w->strip_chart.valuedata[i] > w->strip_chart.max_value) + if (w->strip_chart.valuedata[i] > w->strip_chart.max_value) w->strip_chart.max_value = w->strip_chart.valuedata[i]; } @@ -487,7 +487,7 @@ MoveChart(StripChartWidget w, Bool blit) XCopyArea(XtDisplay((Widget)w), XtWindow((Widget)w), XtWindow((Widget)w), w->strip_chart.hiGC, (int)XtWidth(w) - j, 0, j, XtHeight(w), 0, 0); - XClearArea(XtDisplay((Widget)w), XtWindow((Widget)w), + XClearArea(XtDisplay((Widget)w), XtWindow((Widget)w), j, 0, XtWidth(w) - j, XtHeight(w), False); /* Draw graph reference lines */ @@ -521,17 +521,17 @@ XawStripChartSetValues(Widget current, Widget request, Widget cnew, if (w->strip_chart.min_scale > w->strip_chart.max_value + 1) ret_val = True; - + if (w->strip_chart.fgpixel != old->strip_chart.fgpixel) { new_gc |= FOREGROUND; ret_val = True; } - + if (w->strip_chart.hipixel != old->strip_chart.hipixel) { new_gc |= HIGHLIGHT; ret_val = True; } - + DestroyGC(old, new_gc); CreateGC(w, new_gc); @@ -561,7 +561,7 @@ XawStripChartResize(Widget widget) w->strip_chart.points = NULL; return; } - + size = sizeof(XPoint) * (w->strip_chart.scale - 1); points = (XPoint *)XtRealloc((XtPointer)w->strip_chart.points, size); diff --git a/src/Text.c b/src/Text.c old mode 100755 new mode 100644 index 060057d..a1ae74a --- a/src/Text.c +++ b/src/Text.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -83,7 +83,6 @@ SOFTWARE. #include #include #include -#include #include #include #include @@ -308,7 +307,7 @@ static XtResource resources[] = { XtNdisplayPosition, XtCTextPosition, XtRInt, - sizeof(XawTextPosition), + sizeof(XawTextPosition), offset(text.lt.top), XtRImmediate, (XtPointer)0 @@ -695,7 +694,7 @@ XawTextClassInitialize(void) XawInitializeWidgetSet(); textClassRec.core_class.num_actions = _XawTextActionsTableCount; - + QWrapNever = XrmPermStringToQuark(XtEtextWrapNever); QWrapLine = XrmPermStringToQuark(XtEtextWrapLine); QWrapWord = XrmPermStringToQuark(XtEtextWrapWord); @@ -971,7 +970,7 @@ XawTextRealize(Widget w, XtValueMask *mask, XSetWindowAttributes *attr) TextWidget ctx = (TextWidget)w; (*textClassRec.core_class.superclass->core_class.realize)(w, mask, attr); - + if (ctx->text.hbar != NULL) { XtRealizeWidget(ctx->text.hbar); XtMapWidget(ctx->text.hbar); @@ -1092,7 +1091,7 @@ _XawTextGetText(TextWidget ctx, XawTextPosition left, XawTextPosition right) if (XawTextFormat(ctx, XawFmt8Bit)) bytes = sizeof(unsigned char); - else if (XawTextFormat(ctx, XawFmtWide)) + else if (XawTextFormat(ctx, XawFmtWide)) bytes = sizeof(wchar_t); else /* if there is another fomat, add here */ bytes = 1; @@ -1163,7 +1162,7 @@ _XawTextGetSTRING(TextWidget ctx, XawTextPosition left, XawTextPosition right) } } -/* +/* * This routine maps an x and y position in a window that is displaying text * into the corresponding position in the source. */ @@ -2019,7 +2018,7 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, } else *type = *target; - /* + /* * If salt is True, the salt->contents stores CT string, * its length is measured in bytes. * Refer to _XawTextSaltAwaySelection(). @@ -2036,7 +2035,7 @@ TextConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, XtFree((char *)*value); return (False); } - XtFree((char *)*value); + XtFree((char *)*value); *value = (XtPointer)textprop.value; *length = textprop.nitems; } @@ -2216,7 +2215,7 @@ TextLoseSelection(Widget w, Atom *selection) while (salt->s.atom_count && salt->s.selections[salt->s.atom_count-1] == 0) salt->s.atom_count--; - + /* * Must walk the selection list in opposite order from UnsetSelection */ @@ -3147,7 +3146,7 @@ _XawTextSetSelection(TextWidget ctx, XawTextPosition l, XawTextPosition r, if (nelems == 1 && !strcmp (list[0], "none")) return; if (nelems == 0) { - String defaultSel = "PRIMARY"; + static String defaultSel = "PRIMARY"; list = &defaultSel; nelems = 1; } @@ -3623,7 +3622,7 @@ XawTextDestroy(Widget w) /* * by the time we are managed (and get this far) we had better - * have both a source and a sink + * have both a source and a sink */ static void XawTextResize(Widget w) @@ -3938,13 +3937,13 @@ XawTextReplace(Widget w, XawTextPosition startPos, XawTextPosition endPos, return (result); } -XawTextPosition +XawTextPosition XawTextTopPosition(Widget w) { return (((TextWidget)w)->text.lt.top); } -XawTextPosition +XawTextPosition XawTextLastPosition(Widget w) { return (((TextWidget)w)->text.lastPos); @@ -4027,7 +4026,7 @@ XawTextDisableRedisplay(Widget w) _XawTextPrepareToUpdate((TextWidget)w); } -void +void XawTextEnableRedisplay(Widget w) { TextWidget ctx = (TextWidget)w; @@ -4111,7 +4110,7 @@ XawTextSearch(Widget w, TextClassRec textClassRec = { /* core */ { - (WidgetClass)&simpleClassRec, /* superclass */ + (WidgetClass)&simpleClassRec, /* superclass */ "Text", /* class_name */ sizeof(TextRec), /* widget_size */ XawTextClassInitialize, /* class_initialize */ diff --git a/src/TextAction.c b/src/TextAction.c old mode 100755 new mode 100644 index 47c6ce6..7b87ce4 --- a/src/TextAction.c +++ b/src/TextAction.c @@ -39,7 +39,6 @@ in this Software without prior written authorization from The Open Group. #include #include #include -#include #include #include #include @@ -1129,7 +1128,7 @@ ConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, if (XmuConvertStandardSelection(w, ctx->text.time, selection, target, type, (XPointer *)value, length, format)) return (True); - + return (False); } @@ -1370,7 +1369,7 @@ DeleteOrKill(TextWidget ctx, XEvent *event, XawTextScanDirection dir, from = to; to = ctx->text.insertPos; } - else + else from = ctx->text.insertPos; _DeleteOrKill(ctx, from, to, kill); @@ -2279,7 +2278,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level, text.length = bytes; bytes -= text.length; if (_XawTextReplace(ctx, tmp, tmp, &text)) { - XawStackFree(buf, text.ptr); + XawStackFree(text.ptr, buf); return (XawEditError); } if (num_pos) { @@ -2294,7 +2293,7 @@ DoFormatText(TextWidget ctx, XawTextPosition left, Bool force, int level, } position += count; right += count; - XawStackFree(buf, text.ptr); + XawStackFree(text.ptr, buf); } break; } @@ -2707,7 +2706,7 @@ SelectAdjust(Widget w, XEvent *event, String *params, Cardinal *num_params) #ifndef OLDXAW if (ctx->text.selection_state) #endif - ModifySelection(ctx, event, + ModifySelection(ctx, event, XawsmTextSelect, XawactionAdjust, params, num_params); } @@ -3214,8 +3213,8 @@ InsertChar(Widget w, XEvent *event, String *p, Cardinal *n) static char * IfHexConvertHexElseReturnParam(char *param, int *len_return) { - char *p; /* steps through param char by char */ - char c; /* holds the character pointed to by p */ + char *p; /* steps through param char by char */ + char c; /* holds the character pointed to by p */ int ind; /* steps through hexval buffer char by char */ static char hexval[XawTextActionMaxHexChars]; Boolean first_digit; @@ -3347,7 +3346,7 @@ InsertString(Widget w, XEvent *event, String *params, Cardinal *num_params) } /* DisplayCaret() - action - * + * * The parameter list should contain one boolean value. If the * argument is true, the cursor will be displayed. If false, not. * @@ -3399,9 +3398,10 @@ Numeric(Widget w, XEvent *event, String *params, Cardinal *num_params) InsertChar(w, event, params, num_params); return; } - XmuSnprintf(err_buf, sizeof(err_buf), - "numeric: Invalid argument%s'%s'", - *num_params ? ", " : "", *num_params ? params[0] : ""); + snprintf(err_buf, sizeof(err_buf), + "numeric: Invalid argument%s'%s'", + *num_params ? ", " : "", + *num_params ? params[0] : ""); XtAppWarning(XtWidgetToApplicationContext(w), err_buf); ctx->text.numeric = False; ctx->text.mult = 1; @@ -3487,7 +3487,7 @@ Multiply(Widget w, XEvent *event, String *params, Cardinal *num_params) #ifndef OLDXAW if (params[0][0] == 's' || params[0][0] == 'S') { ctx->text.numeric = True; - ctx->text.mult = 0; + ctx->text.mult = 0; return; } else @@ -3495,9 +3495,9 @@ Multiply(Widget w, XEvent *event, String *params, Cardinal *num_params) if ((mult = atoi(params[0])) == 0) { char buf[BUFSIZ]; - XmuSnprintf(buf, sizeof(buf), - "%s %s", "Xaw Text Widget: multiply() argument", - "must be a number greater than zero, or 'Reset'."); + snprintf(buf, sizeof(buf), + "Xaw Text Widget: multiply() argument " + "must be a number greater than zero, or 'Reset'."); XtAppError(XtWidgetToApplicationContext(w), buf); XBell(XtDisplay(w), 50); return; @@ -3582,14 +3582,14 @@ StripOutOldCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to, /* * Remove all extra spaces. */ - for (i = 1 ; i < len; i++) + for (i = 1 ; i < len; i++) if (text.format == XawFmtWide) { if (!iswspace(((wchar_t*)buf)[i]) || ((periodPos + i) >= to)) break; } else if (!isspace(buf[i]) || (periodPos + i) >= to) break; - + XtFree(buf); to -= (i - text.length - 1); @@ -3667,7 +3667,7 @@ InsertNewCRs(TextWidget ctx, XawTextPosition from, XawTextPosition to, XawsdRight,1, True); startPos = endPos = eol; - if (eol == space) + if (eol == space) return; len = (int)(space - eol); @@ -3935,6 +3935,8 @@ FormParagraph(Widget w, XEvent *event, String *params, Cardinal *num_params) } if (FormRegion(ctx, from, to, pos, src->textSrc.num_text) == XawReplaceError) { + XawStackFree(pos, buf); + pos = buf; #else from = SrcScan(ctx->text.source, ctx->text.insertPos, XawstParagraph, XawsdLeft, 1, False); @@ -3943,7 +3945,6 @@ FormParagraph(Widget w, XEvent *event, String *params, Cardinal *num_params) if (FormRegion(ctx, from, to, pos, 1) == XawReplaceError) { #endif - XawStackFree(pos, buf); XBell(XtDisplay(w), 0); #ifndef OLDXAW if (undo) { @@ -3991,13 +3992,13 @@ FormParagraph(Widget w, XEvent *event, String *params, Cardinal *num_params) XawsdLeft, 1, False), False); tw->text.clear_to_eol = True; } + XawStackFree(pos, buf); #else ctx->text.old_insert = ctx->text.insertPos = *pos; _XawTextBuildLineTable(ctx, SrcScan(ctx->text.source, ctx->text.lt.top, XawstEOL, XawsdLeft, 1, False), False); ctx->text.clear_to_eol = True; #endif - XawStackFree(pos, buf); ctx->text.showposition = True; EndAction(ctx); diff --git a/src/TextPop.c b/src/TextPop.c old mode 100755 new mode 100644 index 4775c25..953fa9a --- a/src/TextPop.c +++ b/src/TextPop.c @@ -30,13 +30,13 @@ in this Software without prior written authorization from The Open Group. * * FileInsert, Search, and Replace. * - * There is also a section at the end for utility functions + * There is also a section at the end for utility functions * used by all more than one of these dialogs. * * The following functions are the only non-static ones defined * in this module. They are located at the begining of the * section that contains this dialog box that uses them. - * + * * void _XawTextInsertFileAction(w, event, params, num_params); * void _XawTextDoSearchAction(w, event, params, num_params); * void _XawTextDoReplaceAction(w, event, params, num_params); @@ -50,10 +50,9 @@ in this Software without prior written authorization from The Open Group. #include #include #include -#include +#include #include #include -#include #include #include #include @@ -132,7 +131,7 @@ static char radio_trans_string[] = ",:" "set() notify()\n" ; -static char search_text_trans[] = +static char search_text_trans[] = "~sReturn:" "DoSearchAction(Popdown)\n" "sReturn:" "DoSearchAction() SetField(Replace)\n" "cc:" "PopdownSearchAction()\n" @@ -140,7 +139,7 @@ static char search_text_trans[] = "Tab:" "DoSearchAction() SetField(Replace)\n" ; -static char rep_text_trans[] = +static char rep_text_trans[] = "~sReturn:" "DoReplaceAction(Popdown)\n" "sReturn:" "SetField(Search)\n" "cc:" "PopdownSearchAction()\n" @@ -152,7 +151,7 @@ static char rep_text_trans[] = * Implementation */ /* - * This section of the file contains all the functions that + * This section of the file contains all the functions that * the file insert dialog box uses */ @@ -165,7 +164,7 @@ static char rep_text_trans[] = * that will insert a file into the main Text Widget. */ /*ARGSUSED*/ -void +void _XawTextInsertFileAction(Widget w, XEvent *event, String *params, Cardinal *num_params) { @@ -193,7 +192,7 @@ _XawTextInsertFileAction(Widget w, XEvent *event, * This entry is optional and contains the value of the default * file to insert */ -void +void _XawTextInsertFile(Widget w, XEvent *event, String *params, Cardinal *num_params) { @@ -204,17 +203,17 @@ _XawTextInsertFile(Widget w, XEvent *event, XtSetArg(args[0], XtNeditType, &edit_mode); XtGetValues(ctx->text.source, args, 1); - + if (edit_mode != XawtextEdit) { XBell(XtDisplay(w), 0); return; } - if (*num_params == 0) + if (*num_params == 0) ptr = ""; - else + else ptr = params[0]; - + if (!ctx->text.file_insert) { ctx->text.file_insert = CreateDialog(w, ptr, "insertFile", AddInsertFileChildren); @@ -239,7 +238,7 @@ _XawTextInsertFile(Widget w, XEvent *event, * Pops down the file insert button */ /*ARGSUSED*/ -static void +static void PopdownFileInsert(Widget w, XtPointer closure, XtPointer call_data) { TextWidget ctx = (TextWidget)closure; @@ -261,14 +260,14 @@ PopdownFileInsert(Widget w, XtPointer closure, XtPointer call_data) * Actually insert the file named in the text widget of the file dialog */ /*ARGSUSED*/ -static void +static void DoInsert(Widget w, XtPointer closure, XtPointer call_data) { TextWidget ctx = (TextWidget)closure; char buf[BUFSIZ], msg[BUFSIZ]; Widget temp_widget; - (void)XmuSnprintf(buf, sizeof(buf), "%s.%s", FORM_NAME, TEXT_NAME); + snprintf(buf, sizeof(buf), "%s.%s", FORM_NAME, TEXT_NAME); if ((temp_widget = XtNameToWidget(ctx->text.file_insert, buf)) == NULL) { (void)strcpy(msg, "Error: Could not get text widget from file insert popup"); @@ -278,9 +277,9 @@ DoInsert(Widget w, XtPointer closure, XtPointer call_data) return; } else - (void)XmuSnprintf(msg, sizeof(msg), "Error: %s", strerror(errno)); + snprintf(msg, sizeof(msg), "Error: %s", strerror(errno)); - (void)SetResourceByName(ctx->text.file_insert, + (void)SetResourceByName(ctx->text.file_insert, LABEL_NAME, XtNlabel, (XtArgVal)msg); XBell(XtDisplay(w), 0); } @@ -365,7 +364,7 @@ AddInsertFileChildren(Widget form, char *ptr, Widget tw) XtSetArg(args[num_args], XtNborderWidth, 0); num_args++; label = XtCreateManagedWidget(LABEL_NAME, labelWidgetClass, form, args, num_args); - + num_args = 0; XtSetArg(args[num_args], XtNfromVert, label); num_args++; XtSetArg(args[num_args], XtNleft, XtChainLeft); num_args++; @@ -406,7 +405,7 @@ AddInsertFileChildren(Widget form, char *ptr, Widget tw) } /* - * This section of the file contains all the functions that + * This section of the file contains all the functions that * the search dialog box uses */ /* @@ -419,11 +418,11 @@ AddInsertFileChildren(Widget form, char *ptr, Widget tw) * * Note: * If the search was sucessful and the argument popdown is passed to - * this action routine then the widget will automatically popdown the + * this action routine then the widget will automatically popdown the * search widget */ /*ARGSUSED*/ -void +void _XawTextDoSearchAction(Widget w, XEvent *event, String *params, Cardinal *num_params) { @@ -432,7 +431,7 @@ _XawTextDoSearchAction(Widget w, XEvent *event, if (*num_params == 1 && (params[0][0] == 'p' || params[0][0] == 'P')) popdown = True; - + if (DoSearch(tw->text.search) && popdown) PopdownSearch(w, (XtPointer)tw->text.search, NULL); } @@ -446,7 +445,7 @@ _XawTextDoSearchAction(Widget w, XEvent *event, * will popdown the search widget. */ /*ARGSUSED*/ -void +void _XawTextPopdownSearchAction(Widget w, XEvent *event, String *params, Cardinal *num_params) { @@ -468,7 +467,7 @@ _XawTextPopdownSearchAction(Widget w, XEvent *event, * Pops down the search widget and resets it */ /*ARGSUSED*/ -static void +static void PopdownSearch(Widget w, XtPointer closure, XtPointer call_data) { struct SearchAndReplace *search = (struct SearchAndReplace *)closure; @@ -490,7 +489,7 @@ PopdownSearch(Widget w, XtPointer closure, XtPointer call_data) * Performs a search when the button is clicked. */ /*ARGSUSED*/ -static void +static void SearchButton(Widget w, XtPointer closure, XtPointer call_data) { (void)DoSearch((struct SearchAndReplace *)closure); @@ -525,7 +524,7 @@ SearchButton(Widget w, XtPointer closure, XtPointer call_data) */ #define SEARCH_HEADER "Text Widget - Search():" -void +void _XawTextSearch(Widget w, XEvent *event, String *params, Cardinal *num_params) { TextWidget ctx = (TextWidget)w; @@ -536,9 +535,9 @@ _XawTextSearch(Widget w, XEvent *event, String *params, Cardinal *num_params) wchar_t wcs[1]; if (*num_params < 1 || *num_params > 2) { - (void)XmuSnprintf(buf, sizeof(buf), "%s %s\n%s", SEARCH_HEADER, - "This action must have only", - "one or two parameters"); + snprintf(buf, sizeof(buf), "%s %s\n%s", SEARCH_HEADER, + "This action must have only", + "one or two parameters"); XtAppWarning(XtWidgetToApplicationContext(w), buf); return; } @@ -555,18 +554,18 @@ _XawTextSearch(Widget w, XEvent *event, String *params, Cardinal *num_params) ptr = ""; switch(params[0][0]) { - case 'b': /* Left */ + case 'b': /* Left */ case 'B': dir = XawsdLeft; break; - case 'f': /* Right */ + case 'f': /* Right */ case 'F': dir = XawsdRight; break; default: - (void)XmuSnprintf(buf, sizeof(buf), "%s %s\n%s", SEARCH_HEADER, - "The first parameter must be", - "Either 'backward' or 'forward'"); + snprintf(buf, sizeof(buf), "%s %s\n%s", SEARCH_HEADER, + "The first parameter must be", + "Either 'backward' or 'forward'"); XtAppWarning(XtWidgetToApplicationContext(w), buf); return; } @@ -620,7 +619,7 @@ InitializeSearchWidget(struct SearchAndReplace *search, SetResource(search->right_toggle, XtNstate, (XtArgVal)True); break; } -} +} /* * Function: @@ -659,7 +658,7 @@ AddSearchChildren(Widget form, char *ptr, Widget tw) XtSetArg(args[num_args], XtNborderWidth, 0); num_args++; search->label2 = XtCreateManagedWidget("label2", labelWidgetClass, form, args, num_args); - + /* * We need to add R_OFFSET to the radio_data, because the value zero (0) * has special meaning @@ -751,7 +750,7 @@ AddSearchChildren(Widget form, char *ptr, Widget tw) r_text = XtCreateManagedWidget("replaceText", asciiTextWidgetClass, form, args, num_args); search->rep_text = r_text; - + num_args = 0; XtSetArg(args[num_args], XtNlabel, "Search"); num_args++; XtSetArg(args[num_args], XtNfromVert, r_text); num_args++; @@ -864,13 +863,13 @@ DoSearch(struct SearchAndReplace *search) } #endif /* OLDXAW */ } - + dir = (XawTextScanDirection)(unsigned long) ((XPointer)XawToggleGetCurrent(search->left_toggle) - R_OFFSET); pos = XawTextSearch(tw, dir, &text); - /* The Raw string in find.ptr may be WC I can't use here, so I re - call + /* The Raw string in find.ptr may be WC I can't use here, so I re - call GetString to get a tame version */ if (pos == XawTextSearchError) { @@ -879,7 +878,7 @@ DoSearch(struct SearchAndReplace *search) ptr = GetString(search->search_text); len = strlen(ptr); - (void)XmuSnprintf(msg, sizeof(msg), "%s", ptr); + snprintf(msg, sizeof(msg), "%s", ptr); ptr = strchr(msg, '\n'); if (ptr != NULL || sizeof(msg) - 1 < len) { @@ -913,7 +912,7 @@ DoSearch(struct SearchAndReplace *search) } /* - * This section of the file contains all the functions that + * This section of the file contains all the functions that * the replace dialog box uses */ /* @@ -925,7 +924,7 @@ DoSearch(struct SearchAndReplace *search) * Text Widget that will replace a string in the main Text Widget. */ /*ARGSUSED*/ -void +void _XawTextDoReplaceAction(Widget w, XEvent *event, String *params, Cardinal *num_params) { @@ -968,12 +967,12 @@ DoReplaceOne(Widget w, XtPointer closure, XtPointer call_data) * closure - pointer to the search structure * call_data - (not used) * - * Description: + * Description: * Replaces every instance of the string in the search dialog's * text widget with the one in the replace dialog's text widget. */ /*ARGSUSED*/ -static void +static void DoReplaceAll(Widget w, XtPointer closure, XtPointer call_data) { Replace((struct SearchAndReplace *)closure, False, False); @@ -1019,7 +1018,7 @@ Replace(struct SearchAndReplace *search, Bool once_only, Bool show_current) replace.length = wcslen((wchar_t*)replace.ptr); else replace.length = strlen(replace.ptr); - + dir = (XawTextScanDirection)(unsigned long) ((XPointer)XawToggleGetCurrent(search->left_toggle) - R_OFFSET); @@ -1040,7 +1039,7 @@ Replace(struct SearchAndReplace *search, Bool once_only, Bool show_current) ptr = GetString(search->search_text); len = strlen(ptr); - (void)XmuSnprintf(msg, sizeof(msg), "%s", ptr); + snprintf(msg, sizeof(msg), "%s", ptr); ptr = strchr(msg, '\n'); if (ptr != NULL || sizeof(msg) - 1 < len) { if (ptr != NULL) @@ -1153,7 +1152,7 @@ SetSearchLabels(struct SearchAndReplace *search, String msg1, String msg2, { (void)SetResource(search->label1, XtNlabel, (XtArgVal)msg1); (void)SetResource(search->label2, XtNlabel, (XtArgVal)msg2); - if (bell) + if (bell) XBell(XtDisplay(search->search_popup), 0); } @@ -1170,7 +1169,7 @@ SetSearchLabels(struct SearchAndReplace *search, String msg1, String msg2, * Text Widget that will send input to the field specified. */ /*ARGSUSED*/ -void +void _XawTextSetField(Widget w, XEvent *event, String *params, Cardinal *num_params) { struct SearchAndReplace *search; @@ -1226,7 +1225,7 @@ _SetField(Widget cnew, Widget old) } XtSetKeyboardFocus(XtParent(cnew), cnew); - + XtSetArg(args[0], XtNborderColor, &old_border); XtSetArg(args[1], XtNbackground, &old_bg); XtGetValues(cnew, args, 2); @@ -1264,7 +1263,7 @@ SetResourceByName(Widget shell, char *name, char *res_name, XtArgVal value) Widget temp_widget; char buf[BUFSIZ]; - (void)XmuSnprintf(buf, sizeof(buf), "%s.%s", FORM_NAME, name); + snprintf(buf, sizeof(buf), "%s.%s", FORM_NAME, name); if ((temp_widget = XtNameToWidget(shell, buf)) != NULL) { SetResource(temp_widget, res_name, value); @@ -1289,7 +1288,7 @@ static void SetResource(Widget w, char *res_name, XtArgVal value) { Arg args[1]; - + XtSetArg(args[0], res_name, value); XtSetValues( w, args, 1); } @@ -1300,7 +1299,7 @@ SetResource(Widget w, char *res_name, XtArgVal value) * * Parameters: * text - text widget whose string we will get - * + * * Description: * Gets the value for the string in the popup. * @@ -1352,7 +1351,7 @@ CenterWidgetOnPoint(Widget w, XEvent *event) Cardinal num_args; Dimension width, height, b_width; Position x, y, max_x, max_y; - + if (event != NULL) { switch (event->type) { case ButtonPress: @@ -1392,7 +1391,7 @@ CenterWidgetOnPoint(Widget w, XEvent *event) y = 0; if (y > (max_y = (Position)(XtScreen(w)->height - height))) y = max_y; - + num_args = 0; XtSetArg(args[num_args], XtNx, x); num_args++; XtSetArg(args[num_args], XtNy, y); num_args++; @@ -1430,7 +1429,7 @@ CreateDialog(Widget parent, String ptr, String name, AddFunc func) XtSetArg(args[num_args], XtNgeometry, NULL); num_args++; XtSetArg(args[num_args], XtNallowShellResize, True); num_args++; XtSetArg(args[num_args], XtNtransientFor, GetShell(parent));num_args++; - popup = XtCreatePopupShell(name, transientShellWidgetClass, + popup = XtCreatePopupShell(name, transientShellWidgetClass, parent, args, num_args); form = XtCreateManagedWidget(FORM_NAME, formWidgetClass, popup, NULL, 0); @@ -1451,7 +1450,7 @@ CreateDialog(Widget parent, String ptr, String name, AddFunc func) * * Returns: * The shell widget among the ancestors of w that is the - * fewest levels up in the widget hierarchy. + * fewest levels up in the widget hierarchy. * * Description: * Walks up the widget hierarchy to find the topmost shell widget. @@ -1461,7 +1460,7 @@ GetShell(Widget w) { while (w != NULL && !XtIsShell(w)) w = XtParent(w); - + return (w); } @@ -1503,7 +1502,7 @@ WMProtocols(Widget w, XEvent *event, String *params, Cardinal *num_params) Widget cancel; char descendant[DISMISS_NAME_LEN + 2]; - (void)XmuSnprintf(descendant, sizeof(descendant), "*%s", DISMISS_NAME); + snprintf(descendant, sizeof(descendant), "*%s", DISMISS_NAME); cancel = XtNameToWidget(w, descendant); if (cancel) XtCallCallbacks(cancel, XtNcallback, NULL); diff --git a/src/TextSink.c b/src/TextSink.c old mode 100755 new mode 100644 index b47c7b8..333701b --- a/src/TextSink.c +++ b/src/TextSink.c @@ -228,7 +228,7 @@ XawTextSinkClassPartInitialize(WidgetClass wc) Qdefault = XrmPermStringToQuark("default"); #endif - /* + /* * We don't need to check for null super since we'll get to TextSink * eventually. */ @@ -416,7 +416,7 @@ static void ClearToBackground(Widget w, int x, int y, unsigned int width, unsigned int height) { - /* + /* * Don't clear in height or width are zero * XClearArea() has special semantic for these values */ @@ -736,7 +736,7 @@ XawTextSinkFindPosition(Widget w, XawTextPosition fromPos, int fromx, int width, TextSinkObjectClass cclass = (TextSinkObjectClass)w->core.widget_class; (*cclass->text_sink_class.FindPosition)(w, fromPos, fromx, width, - stopAtWordBreak, + stopAtWordBreak, resPos, resWidth, resHeight); } @@ -759,7 +759,7 @@ XawTextSinkFindPosition(Widget w, XawTextPosition fromPos, int fromx, int width, /*ARGSUSED*/ void XawTextSinkFindDistance(Widget w, XawTextPosition fromPos, int fromx, - XawTextPosition toPos, int *resWidth, + XawTextPosition toPos, int *resWidth, XawTextPosition *resPos, int *resHeight) { TextSinkObjectClass cclass = (TextSinkObjectClass)w->core.widget_class; @@ -1220,16 +1220,16 @@ _XawTextSinkAddProperty(XawTextPropertyList *list, XawTextProperty *property, if (property->mask & XAW_TPROP_FOREGROUND) { color.pixel = property->foreground; XQueryColor(DisplayOfScreen(list->screen), list->colormap, &color); - XmuSnprintf(foreground, sizeof(foreground), "%04x%04x%04x", - color.red, color.green, color.blue); + snprintf(foreground, sizeof(foreground), "%04x%04x%04x", + color.red, color.green, color.blue); } else strcpy(foreground, asterisk); if (property->mask & XAW_TPROP_BACKGROUND) { color.pixel = property->background; XQueryColor(DisplayOfScreen(list->screen), list->colormap, &color); - XmuSnprintf(background, sizeof(background), "%04x%04x%04x", - color.red, color.green, color.blue); + snprintf(background, sizeof(background), "%04x%04x%04x", + color.red, color.green, color.blue); } else strcpy(background, asterisk); @@ -1313,10 +1313,11 @@ _XawTextSinkAddProperty(XawTextPropertyList *list, XawTextProperty *property, /* XXX should do the best to load a suitable font here */ if (!(result->mask & XAW_TPROP_FONT)) { - XmuSnprintf(identifier, sizeof(identifier), - "-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s", - foundry, family, weight, slant, setwidth, addstyle, pixel_size, - point_size, res_x, res_y, spacing, avgwidth, registry, encoding); + snprintf(identifier, sizeof(identifier), + "-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s-%s", + foundry, family, weight, slant, setwidth, addstyle, + pixel_size, point_size, res_x, res_y, spacing, avgwidth, + registry, encoding); if ((result->font = XLoadQueryFont(DisplayOfScreen(list->screen), identifier)) != NULL) { result->mask |= XAW_TPROP_FONT; @@ -1331,14 +1332,14 @@ _XawTextSinkAddProperty(XawTextPropertyList *list, XawTextProperty *property, else xlfd = null; - XmuSnprintf(identifier, sizeof(identifier), "%08lx%08lx%s%s%d%d%d%d%s", - property->mask, property->xlfd_mask, - foreground, background, - (result->mask & XAW_TPROP_UNDERLINE) != 0, - (result->mask & XAW_TPROP_OVERSTRIKE) != 0, - (result->mask & XAW_TPROP_SUBSCRIPT) != 0, - (result->mask & XAW_TPROP_SUPERSCRIPT) != 0, - xlfd); + snprintf(identifier, sizeof(identifier), "%08lx%08lx%s%s%d%d%d%d%s", + property->mask, property->xlfd_mask, + foreground, background, + (result->mask & XAW_TPROP_UNDERLINE) != 0, + (result->mask & XAW_TPROP_OVERSTRIKE) != 0, + (result->mask & XAW_TPROP_SUBSCRIPT) != 0, + (result->mask & XAW_TPROP_SUPERSCRIPT) != 0, + xlfd); quark = XrmStringToQuark(identifier); if (result->identifier == NULLQUARK) @@ -1547,8 +1548,8 @@ XawTextSinkConvertPropertyList(String name, String spec, Screen *screen, params = XawParseParamsString(tok); ident = XrmStringToQuark(params->name); if (ident == NULLQUARK) { - XmuSnprintf(buffer, sizeof(buffer), - "Bad text property name \"%s\".", params->name); + snprintf(buffer, sizeof(buffer), "Bad text property name \"%s\".", + params->name); XtAppWarning(XtDisplayToApplicationContext (DisplayOfScreen(screen)), buffer); DestroyTextPropertyList(propl); @@ -1570,8 +1571,8 @@ XawTextSinkConvertPropertyList(String name, String spec, Screen *screen, if ((prop->font = XLoadQueryFont(DisplayOfScreen(screen), argval->value)) == NULL) { - XmuSnprintf(buffer, sizeof(buffer), - "Cannot load font \"%s\".", argval->value); + snprintf(buffer, sizeof(buffer), "Cannot load font \"%s\".", + argval->value); XtAppWarning(XtDisplayToApplicationContext (DisplayOfScreen(screen)), buffer); DestroyTextPropertyList(propl); @@ -1589,8 +1590,8 @@ XawTextSinkConvertPropertyList(String name, String spec, Screen *screen, argval->value) { if (!XAllocNamedColor(DisplayOfScreen(screen), colormap, argval->value, &color, &exact)) { - XmuSnprintf(buffer, sizeof(buffer), - "Cannot allocate color \"%s\".", argval->value); + snprintf(buffer, sizeof(buffer), + "Cannot allocate color \"%s\".", argval->value); XtAppWarning(XtDisplayToApplicationContext (DisplayOfScreen(screen)), buffer); DestroyTextPropertyList(propl); @@ -1606,8 +1607,8 @@ XawTextSinkConvertPropertyList(String name, String spec, Screen *screen, argval->value) { if (!XAllocNamedColor(DisplayOfScreen(screen), colormap, argval->value, &color, &exact)) { - XmuSnprintf(buffer, sizeof(buffer), - "Cannot allocate color \"%s\".", argval->value); + snprintf(buffer, sizeof(buffer), + "Cannot allocate color \"%s\".", argval->value); XtAppWarning(XtDisplayToApplicationContext (DisplayOfScreen(screen)), buffer); DestroyTextPropertyList(propl); diff --git a/src/TextSrc.c b/src/TextSrc.c old mode 100755 new mode 100644 index 118361e..26ce474 --- a/src/TextSrc.c +++ b/src/TextSrc.c @@ -245,7 +245,7 @@ static wchar_t SrcWNL[2]; /* * Implementation */ -static void +static void XawTextSrcClassInitialize(void) { XawInitializeWidgetSet(); @@ -274,22 +274,22 @@ XawTextSrcClassPartInitialize(WidgetClass wc) * We don't need to check for null super since we'll get to TextSrc * eventually */ - if (t_src->textSrc_class.Read == XtInheritRead) + if (t_src->textSrc_class.Read == XtInheritRead) t_src->textSrc_class.Read = superC->textSrc_class.Read; - if (t_src->textSrc_class.Replace == XtInheritReplace) + if (t_src->textSrc_class.Replace == XtInheritReplace) t_src->textSrc_class.Replace = superC->textSrc_class.Replace; - if (t_src->textSrc_class.Scan == XtInheritScan) + if (t_src->textSrc_class.Scan == XtInheritScan) t_src->textSrc_class.Scan = superC->textSrc_class.Scan; - if (t_src->textSrc_class.Search == XtInheritSearch) + if (t_src->textSrc_class.Search == XtInheritSearch) t_src->textSrc_class.Search = superC->textSrc_class.Search; - if (t_src->textSrc_class.SetSelection == XtInheritSetSelection) + if (t_src->textSrc_class.SetSelection == XtInheritSetSelection) t_src->textSrc_class.SetSelection = superC->textSrc_class.SetSelection; - if (t_src->textSrc_class.ConvertSelection == XtInheritConvertSelection) + if (t_src->textSrc_class.ConvertSelection == XtInheritConvertSelection) t_src->textSrc_class.ConvertSelection = superC->textSrc_class.ConvertSelection; } @@ -430,7 +430,7 @@ Read(Widget w, XawTextPosition pos, XawTextBlock *text, int length) * Replaces a block of text with new text. */ /*ARGSUSED*/ -static int +static int Replace(Widget w, XawTextPosition startPos, XawTextPosition endPos, XawTextBlock *text) { @@ -454,7 +454,7 @@ Replace(Widget w, XawTextPosition startPos, XawTextPosition endPos, * Scans the text source for the number and type of item specified. */ /*ARGSUSED*/ -static XawTextPosition +static XawTextPosition Scan(Widget w, XawTextPosition position, XawTextScanType type, XawTextScanDirection dir, int count, Bool include) { @@ -498,14 +498,14 @@ SetSelection(Widget w, XawTextPosition left, XawTextPosition right, } /*ARGSUSED*/ -static void +static void CvtStringToEditMode(XrmValuePtr args, Cardinal *num_args, XrmValuePtr fromVal, XrmValuePtr toVal) { static XawTextEditType editType; XrmQuark q; char name[7]; - + XmuNCopyISOLatin1Lowered(name, (char *)fromVal->addr, sizeof(name)); q = XrmStringToQuark(name); @@ -1401,7 +1401,7 @@ UndoGC(XawTextUndo *undo) * dir - direction to scan * count - which occurance if this thing to search for * include - whether or not to include the character found in - * the position that is returned. + * the position that is returned. * * Description: * Scans the text source for the number and type of item specified. @@ -1441,7 +1441,7 @@ XawTextSourceScan(Widget w, XawTextPosition position, * Description: * Searchs the text source for the text block passed */ -XawTextPosition +XawTextPosition XawTextSourceSearch(Widget w, XawTextPosition position, #if NeedWidePrototypes int dir, @@ -1472,7 +1472,7 @@ XawTextSourceSearch(Widget w, XawTextPosition position, * True if the selection has been converted */ Boolean -XawTextSourceConvertSelection(Widget w, Atom *selection, Atom *target, +XawTextSourceConvertSelection(Widget w, Atom *selection, Atom *target, Atom *type, XtPointer *value, unsigned long *length, int *format) { @@ -1496,7 +1496,7 @@ XawTextSourceConvertSelection(Widget w, Atom *selection, Atom *target, * Allows special setting of the selection. */ void -XawTextSourceSetSelection(Widget w, XawTextPosition left, +XawTextSourceSetSelection(Widget w, XawTextPosition left, XawTextPosition right, Atom selection) { TextSrcObjectClass cclass = (TextSrcObjectClass)w->core.widget_class; @@ -1508,7 +1508,7 @@ XawTextSourceSetSelection(Widget w, XawTextPosition left, * External Functions for Multi Text */ /* - * TextFormat(): + * TextFormat(): * returns the format of text: FMT8BIT or FMTWIDE */ XrmQuark @@ -1546,7 +1546,7 @@ _XawTextWCToMB(Display *d, wchar_t *wstr, int *len_in_out) /* _XawTextMBToWC(): * Convert the string to internal processing codeset WC. * The caller is responsible for freeing both the source and ret string. - * + * * str - source string * len_in_out - lengh of string * As In, it is length of source string diff --git a/src/TextTr.c b/src/TextTr.c old mode 100755 new mode 100644 diff --git a/src/Tip.c b/src/Tip.c old mode 100755 new mode 100644 index 9f8b32a..8328aac --- a/src/Tip.c +++ b/src/Tip.c @@ -247,7 +247,7 @@ XawTipInitialize(Widget req, Widget w, ArgList args, Cardinal *num_args) if (!tip->tip.font) XtError("Aborting: no font found\n"); if (tip->tip.international && !tip->tip.fontset) XtError("Aborting: no fontset found\n"); - + tip->tip.timer = 0; values.foreground = tip->tip.foreground; @@ -352,7 +352,7 @@ XawTipExpose(Widget w, XEvent *event, Region region) else XDrawString(XtDisplay(w), XtWindow(w), gc, tip->tip.left_margin, y, label, (int)(nl - label)); - y += tip->tip.font->max_bounds.ascent + + y += tip->tip.font->max_bounds.ascent + tip->tip.font->max_bounds.descent; label = nl + 1; } diff --git a/src/Toggle.c b/src/Toggle.c old mode 100755 new mode 100644 index 1b9afad..b484878 --- a/src/Toggle.c +++ b/src/Toggle.c @@ -26,9 +26,9 @@ in this Software without prior written authorization from The Open Group. /* * Author: Chris D. Peterson - * MIT X Consortium + * MIT X Consortium * kit@expo.lcs.mit.edu - * + * * Date: January 12, 1989 * */ @@ -41,7 +41,6 @@ in this Software without prior written authorization from The Open Group. #include #include #include -#include #include #include @@ -62,7 +61,7 @@ static void RemoveFromRadioGroup(Widget); static void TurnOffRadioSiblings(Widget); static void XawToggleDestroy(Widget, XtPointer, XtPointer); -/* +/* * Actions */ static void Notify(Widget, XEvent*, String*, Cardinal*); @@ -83,7 +82,7 @@ static char defaultTranslations[] = ; #define offset(field) XtOffsetOf(ToggleRec, field) -static XtResource resources[] = { +static XtResource resources[] = { { XtNstate, XtCState, @@ -142,7 +141,7 @@ ToggleClassRec toggleClassRec = { True, /* compress_exposure */ True, /* compress_enterleave */ False, /* visible_interest */ - NULL, /* destroy */ + NULL, /* destroy */ XtInheritResize, /* resize */ XtInheritExpose, /* expose */ XawToggleSetValues, /* set_values */ @@ -209,7 +208,7 @@ XawToggleClassInitialize(void) for (i = 0 ; i < num_actions ; i++) { if (streq(actions[i].string, "set")) cclass->toggle_class.Set = actions[i].proc; - if (streq(actions[i].string, "unset")) + if (streq(actions[i].string, "unset")) cclass->toggle_class.Unset = actions[i].proc; if (cclass->toggle_class.Set != NULL && @@ -233,7 +232,7 @@ XawToggleInitialize(Widget request, Widget cnew, tw->toggle.radio_group = NULL; - if (tw->toggle.radio_data == NULL) + if (tw->toggle.radio_data == NULL) tw->toggle.radio_data = (XtPointer)cnew->core.name; if (tw->toggle.widget != NULL) { @@ -245,13 +244,13 @@ XawToggleInitialize(Widget request, Widget cnew, XtAddCallback(cnew, XtNdestroyCallback, XawToggleDestroy, NULL); /* - * Command widget assumes that the widget is unset, so we only + * Command widget assumes that the widget is unset, so we only * have to handle the case where it needs to be set * * If this widget is in a radio group then it may cause another * widget to be unset, thus calling the notify proceedure * - * I want to set the toggle if the user set the state to "On" in + * I want to set the toggle if the user set the state to "On" in * the resource group, reguardless of what my ancestors did */ if (tw_req->command.set) @@ -259,7 +258,7 @@ XawToggleInitialize(Widget request, Widget cnew, } /*ARGSUSED*/ -static void +static void ToggleSet(Widget w, XEvent *event, String *params, Cardinal *num_params) { ToggleWidgetClass cclass = (ToggleWidgetClass)w->core.widget_class; @@ -268,15 +267,15 @@ ToggleSet(Widget w, XEvent *event, String *params, Cardinal *num_params) cclass->toggle_class.Set(w, event, NULL, NULL); } -static void +static void Toggle(Widget w, XEvent *event, String *params, Cardinal *num_params) { ToggleWidget tw = (ToggleWidget)w; ToggleWidgetClass cclass = (ToggleWidgetClass)w->core.widget_class; - if (tw->command.set) + if (tw->command.set) cclass->toggle_class.Unset(w, event, NULL, NULL); - else + else ToggleSet(w, event, params, num_params); } @@ -291,7 +290,7 @@ Notify(Widget w, XEvent *event, String *params, Cardinal *num_params) } /*ARGSUSED*/ -static Boolean +static Boolean XawToggleSetValues(Widget current, Widget request, Widget cnew, ArgList args, Cardinal *num_args) { @@ -366,7 +365,7 @@ GetRadioGroup(Widget w) * * Description: * Creates a radio group. give two widgets. - * + * * Note: * A pointer to the group is added to each widget's radio_group field. */ @@ -495,7 +494,7 @@ XawToggleChangeRadioGroup(Widget w, Widget radio_group) RemoveFromRadioGroup(w); /* - * If the toggle that we are about to add is set then we will + * If the toggle that we are about to add is set then we will * unset all toggles in the new radio group */ @@ -561,7 +560,7 @@ void XawToggleSetCurrent(Widget radio_group, XtPointer radio_data) { RadioGroup *group; - ToggleWidget local_tog; + ToggleWidget local_tog; /* Special case of no radio group */ @@ -577,7 +576,7 @@ XawToggleSetCurrent(Widget radio_group, XtPointer radio_data) } /* - * find top of radio_roup + * find top of radio_roup */ for (; group->prev != NULL ; group = group->prev) ; diff --git a/src/Tree.c b/src/Tree.c old mode 100755 new mode 100644 index 9dd9b7f..f4781bf --- a/src/Tree.c +++ b/src/Tree.c @@ -28,7 +28,7 @@ in this Software without prior written authorization from The Open Group. * purpose and without fee is hereby granted, provided that the above * copyright notice appear in all copies and that both the copyright notice * and this permission notice appear in supporting documentation. - * + * * Prentice Hall and the authors disclaim all warranties with regard * to this software, including all implied warranties of merchantability and * fitness. In no event shall Prentice Hall or the authors be liable @@ -36,12 +36,12 @@ in this Software without prior written authorization from The Open Group. * resulting from loss of use, data or profits, whether in an action of * contract, negligence or other tortious action, arising out of or in * connection with the use or performance of this software. - * + * * Authors: Jim Fulton, MIT X Consortium, * based on a version by Douglas Young, Prentice Hall - * + * * This widget is based on the Tree widget described on pages 397-419 of - * Douglas Young's book "The X Window System, Programming and Applications + * Douglas Young's book "The X Window System, Programming and Applications * with Xt OSF/Motif Edition." The layout code has been rewritten to use * additional blank space to make the structure of the graph easier to see * as well as to support vertical trees. @@ -142,31 +142,31 @@ TreeClassRec treeClassRec = { sizeof(TreeRec), /* widget_size */ XawTreeClassInitialize, /* class_init */ NULL, /* class_part_init */ - FALSE, /* class_inited */ + FALSE, /* class_inited */ XawTreeInitialize, /* initialize */ - NULL, /* initialize_hook */ + NULL, /* initialize_hook */ XtInheritRealize, /* realize */ NULL, /* actions */ - 0, /* num_actions */ + 0, /* num_actions */ resources, /* resources */ XtNumber(resources), /* num_resources */ NULLQUARK, /* xrm_class */ - TRUE, /* compress_motion */ - TRUE, /* compress_exposure */ - TRUE, /* compress_enterleave*/ + TRUE, /* compress_motion */ + TRUE, /* compress_exposure */ + TRUE, /* compress_enterleave*/ TRUE, /* visible_interest */ XawTreeDestroy, /* destroy */ NULL, /* resize */ XawTreeRedisplay, /* expose */ XawTreeSetValues, /* set_values */ - NULL, /* set_values_hook */ + NULL, /* set_values_hook */ XtInheritSetValuesAlmost, /* set_values_almost */ - NULL, /* get_values_hook */ + NULL, /* get_values_hook */ NULL, /* accept_focus */ - XtVersion, /* version */ + XtVersion, /* version */ NULL, /* callback_private */ NULL, /* tm_table */ - XawTreeQueryGeometry, /* query_geometry */ + XawTreeQueryGeometry, /* query_geometry */ NULL, /* display_accelerator*/ NULL, /* extension */ }, @@ -174,11 +174,11 @@ TreeClassRec treeClassRec = { /* composite_class fields */ XawTreeGeometryManager, /* geometry_manager */ XawTreeChangeManaged, /* change_managed */ - XtInheritInsertChild, /* insert_child */ - XtInheritDeleteChild, /* delete_child */ + XtInheritInsertChild, /* insert_child */ + XtInheritDeleteChild, /* delete_child */ NULL, /* extension */ }, - { + { /* constraint_class fields */ treeConstraintResources, /* subresources */ XtNumber(treeConstraintResources), /* subresource_count */ @@ -190,7 +190,7 @@ TreeClassRec treeClassRec = { }, { /* Tree class fields */ - NULL, /* ignore */ + NULL, /* ignore */ } }; @@ -250,28 +250,28 @@ insert_node(Widget parent, Widget node) TreeConstraints pc; TreeConstraints nc = TREE_CONSTRAINT(node); int nindex; - + nc->tree.parent = parent; if (parent == NULL) return; /* - * If there isn't more room in the children array, + * If there isn't more room in the children array, * allocate additional space. - */ + */ pc = TREE_CONSTRAINT(parent); nindex = pc->tree.n_children; - + if (pc->tree.n_children == pc->tree.max_children) { pc->tree.max_children += (pc->tree.max_children / 2) + 2; - pc->tree.children = (WidgetList) XtRealloc ((char *)pc->tree.children, + pc->tree.children = (WidgetList) XtRealloc ((char *)pc->tree.children, (unsigned int) ((pc->tree.max_children) * sizeof(Widget))); - } + } /* - * Add the sub_node in the next available slot and + * Add the sub_node in the next available slot and * increment the counter. */ pc->tree.children[nindex] = node; @@ -287,8 +287,8 @@ delete_node(Widget parent, Widget node) /* * Make sure the parent exists. */ - if (!parent) return; - + if (!parent) return; + pc = TREE_CONSTRAINT(parent); /* @@ -301,14 +301,14 @@ delete_node(Widget parent, Widget node) /* * Decrement the number of children - */ + */ pc->tree.n_children--; /* * Fill in the gap left by the sub_node. * Zero the last slot for good luck. */ - for (i = pos; i < pc->tree.n_children; i++) + for (i = pos; i < pc->tree.n_children; i++) pc->tree.children[i] = pc->tree.children[i+1]; pc->tree.children[pc->tree.n_children] = NULL; @@ -329,7 +329,7 @@ check_gravity(TreeWidget tw, XtGravity grav) /***************************************************************************** * * - * tree class methods * + * tree class methods * * * *****************************************************************************/ @@ -352,7 +352,7 @@ XawTreeInitialize(Widget grequest, Widget gnew, Arg arglist[2]; /* - * Make sure the widget's width and height are + * Make sure the widget's width and height are * greater than zero. */ if (request->core.width <= 0) cnew->core.width = 5; @@ -390,14 +390,14 @@ XawTreeInitialize(Widget grequest, Widget gnew, */ cnew->tree.largest = NULL; cnew->tree.n_largest = 0; - initialize_dimensions (&cnew->tree.largest, &cnew->tree.n_largest, + initialize_dimensions (&cnew->tree.largest, &cnew->tree.n_largest, TREE_INITIAL_DEPTH); /* * make sure that our gravity is one of the acceptable values */ check_gravity (cnew, WestGravity); -} +} /* ARGSUSED */ @@ -414,21 +414,21 @@ XawTreeConstraintInitialize(Widget request, Widget cnew, tc->tree.n_children = 0; tc->tree.max_children = 0; tc->tree.children = (Widget *) NULL; - tc->tree.x = tc->tree.y = 0; + tc->tree.x = tc->tree.y = 0; tc->tree.bbsubwidth = 0; tc->tree.bbsubheight = 0; /* - * If this widget has a super-node, add it to that - * widget' sub-nodes list. Otherwise make it a sub-node of + * If this widget has a super-node, add it to that + * widget' sub-nodes list. Otherwise make it a sub-node of * the tree_root widget. */ if (tc->tree.parent) insert_node (tc->tree.parent, cnew); else if (tw->tree.tree_root) insert_node (tw->tree.tree_root, cnew); -} +} /* ARGSUSED */ @@ -448,7 +448,7 @@ XawTreeSetValues(Widget gcurrent, Widget grequest, Widget gnew, cnew->tree.line_width != current->tree.line_width) { XtReleaseGC (gnew, cnew->tree.gc); cnew->tree.gc = get_tree_gc (cnew); - redraw = TRUE; + redraw = TRUE; } /* @@ -499,7 +499,7 @@ XawTreeConstraintSetValues(Widget current, Widget request, Widget cnew, insert_node(newc->tree.parent, cnew); /* - * If the Tree widget has been realized, + * If the Tree widget has been realized, * compute new layout. */ if (XtIsRealized((Widget)tw)) @@ -511,16 +511,16 @@ XawTreeConstraintSetValues(Widget current, Widget request, Widget cnew, static void XawTreeConstraintDestroy(Widget w) -{ +{ TreeConstraints tc = TREE_CONSTRAINT(w); TreeWidget tw = (TreeWidget) XtParent(w); int i; - /* + /* * Remove the widget from its parent's sub-nodes list and * make all this widget's sub-nodes sub-nodes of the parent. */ - + if (tw->tree.tree_root == w) { if (tc->tree.n_children > 0) tw->tree.tree_root = tc->tree.children[0]; @@ -748,8 +748,8 @@ compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth) if (tc->tree.n_children == 0) return; /* - * Figure the size of the opposite dimension (vertical if tree is - * horizontal, else vice versa). The other dimension will be set + * Figure the size of the opposite dimension (vertical if tree is + * horizontal, else vice versa). The other dimension will be set * in the second pass once we know the maximum dimensions. */ newwidth = 0; @@ -757,7 +757,7 @@ compute_bounding_box_subtree(TreeWidget tree, Widget w, int depth) for (i = 0; i < tc->tree.n_children; i++) { Widget child = tc->tree.children[i]; TreeConstraints cc = TREE_CONSTRAINT(child); - + compute_bounding_box_subtree (tree, child, depth + 1); if (horiz) { @@ -793,7 +793,7 @@ static void set_positions(TreeWidget tw, Widget w, int level) { int i; - + if (w) { TreeConstraints tc = TREE_CONSTRAINT(w); @@ -915,9 +915,9 @@ arrange_subtree(TreeWidget tree, Widget w, int depth, int x, int y) if (horiz) { tc->tree.x = x; adjusted = firstcc->tree.y + - ((lastcc->tree.y + (Position) child->core.height + + ((lastcc->tree.y + (Position) child->core.height + (Position) child->core.border_width * 2 - - firstcc->tree.y - (Position) w->core.height - + firstcc->tree.y - (Position) w->core.height - (Position) w->core.border_width * 2 + 1) / 2); if (adjusted > tc->tree.y) tc->tree.y = adjusted; } else { @@ -973,7 +973,7 @@ layout_tree(TreeWidget tw, Bool insetvalues) tw->tree.maxwidth = tw->tree.maxheight = 0; for (i = 0, dp = tw->tree.largest; i < tw->tree.n_largest; i++, dp++) *dp = 0; - initialize_dimensions (&tw->tree.largest, &tw->tree.n_largest, + initialize_dimensions (&tw->tree.largest, &tw->tree.n_largest, tw->tree.n_largest); compute_bounding_box_subtree (tw, tw->tree.tree_root, 0); @@ -1002,7 +1002,7 @@ layout_tree(TreeWidget tw, Bool insetvalues) /***************************************************************************** * * - * Public Routines * + * Public Routines * * * *****************************************************************************/ diff --git a/src/Vendor.c b/src/Vendor.c old mode 100755 new mode 100644 index b455890..12618e9 --- a/src/Vendor.c +++ b/src/Vendor.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -174,7 +174,7 @@ externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { /* class_part_init */ XawVendorShellClassPartInit, /* Class init'ed ? */ FALSE, /* initialize */ XawVendorShellInitialize, - /* initialize_hook */ NULL, + /* initialize_hook */ NULL, /* realize */ XawVendorShellRealize, /* actions */ NULL, /* num_actions */ 0, @@ -189,8 +189,8 @@ externaldef(vendorshellclassrec) VendorShellClassRec vendorShellClassRec = { /* resize */ XawVendorShellExtResize, /* expose */ NULL, /* set_values */ XawVendorShellSetValues, - /* set_values_hook */ NULL, - /* set_values_almost */ XtInheritSetValuesAlmost, + /* set_values_hook */ NULL, + /* set_values_almost */ XtInheritSetValuesAlmost, /* get_values_hook */ NULL, /* accept_focus */ NULL, /* intrinsics version */ XtVersion, @@ -250,7 +250,7 @@ externaldef(vendorshellextclassrec) XawVendorShellExtClassRec /* class_part_initialize*/ NULL, /* Class init'ed ? */ FALSE, /* initialize */ XawVendorShellExtInitialize, - /* initialize_hook */ NULL, + /* initialize_hook */ NULL, /* pad */ NULL, /* pad */ NULL, /* pad */ 0, @@ -265,8 +265,8 @@ externaldef(vendorshellextclassrec) XawVendorShellExtClassRec /* pad */ NULL, /* pad */ NULL, /* set_values */ XawVendorShellExtSetValues, - /* set_values_hook */ NULL, - /* pad */ NULL, + /* set_values_hook */ NULL, + /* pad */ NULL, /* get_values_hook */ NULL, /* pad */ NULL, /* version */ XtVersion, @@ -324,7 +324,7 @@ XawVendorShellClassInitialize(void) sizeof(Screen *)} }; - XtAddConverter(XtRString, XtRCursor, XmuCvtStringToCursor, + XtAddConverter(XtRString, XtRCursor, XmuCvtStringToCursor, screenConvertArg, XtNumber(screenConvertArg)); XtAddConverter(XtRString, XtRBitmap, XmuCvtStringToBitmap, @@ -340,9 +340,9 @@ XawVendorShellClassPartInit(WidgetClass cclass) CompositeClassExtension ext; VendorShellWidgetClass vsclass = (VendorShellWidgetClass)cclass; - if ((ext = (CompositeClassExtension) + if ((ext = (CompositeClassExtension) XtGetClassExtension (cclass, - XtOffsetOf(CompositeClassRec, + XtOffsetOf(CompositeClassRec, composite_class.extension), NULLQUARK, 1L, (Cardinal) 0)) == NULL) { ext = (CompositeClassExtension) XtNew (CompositeClassExtensionRec); @@ -495,7 +495,7 @@ XawVendorShellGeometryManager(Widget wid, XtWidgetGeometry *request, * so, whatever the WM sized us to (if the Shell requested * only one of the two) is now the correct child size */ - + wid->core.width = shell->core.width; wid->core.height = shell->core.height; if (request->request_mode & CWBorderWidth) { diff --git a/src/Viewport.c b/src/Viewport.c old mode 100755 new mode 100644 index 68bd168..082682f --- a/src/Viewport.c +++ b/src/Viewport.c @@ -27,13 +27,13 @@ Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. All Rights Reserved -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in +both that copyright notice and this permission notice appear in supporting documentation, and that the name of Digital not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. +software without specific, written prior permission. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL @@ -313,12 +313,12 @@ XawViewportInitialize(Widget request, Widget cnew, w->viewport.clip = XtCreateManagedWidget("clip", widgetClass, cnew, clip_args, arg_cnt); - if (!w->viewport.forcebars) + if (!w->viewport.forcebars) return; /* If we are not forcing the bars then we are done */ - if (w->viewport.allowhoriz) + if (w->viewport.allowhoriz) (void)CreateScrollbar(w, True); - if (w->viewport.allowvert) + if (w->viewport.allowvert) (void)CreateScrollbar(w, False); h_bar = w->viewport.horiz_bar; @@ -538,7 +538,7 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) if (w->viewport.forcebars) { needsvert = w->viewport.allowvert; needshoriz = w->viewport.allowhoriz; - ComputeWithForceBars(widget, query, &intended, + ComputeWithForceBars(widget, query, &intended, &clip_width, &clip_height); } else { @@ -553,7 +553,7 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) * but we don't set the mode bits until after we decide that the * child's preferences are not acceptable */ - if (!w->viewport.allowhoriz) + if (!w->viewport.allowhoriz) intended.request_mode |= CWWidth; if (XtWidth(child) < clip_width) @@ -566,7 +566,7 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) else intended.height = XtHeight(child); - if (!w->viewport.allowvert) + if (!w->viewport.allowvert) intended.request_mode |= CWHeight; if (!query) { @@ -645,7 +645,7 @@ ComputeLayout(Widget widget, Bool query, Bool destroy_scrollbars) XtHeight(w->viewport.horiz_bar) + XtBorderWidth(w->viewport.horiz_bar) : 0); XtResizeWidget(clip, clip_width, clip_height, 0); - + if (w->viewport.horiz_bar != NULL) { Widget bar = w->viewport.horiz_bar; @@ -728,7 +728,7 @@ ComputeWithForceBars(Widget widget, Bool query, XtWidgetGeometry *intended, * Thus if needsvert is set it MUST have a scrollbar */ if (w->viewport.allowvert) { - if (w->viewport.vert_bar == NULL) + if (w->viewport.vert_bar == NULL) w->viewport.vert_bar = CreateScrollbar(w, False); *clip_width -= XtWidth(w->viewport.vert_bar) + @@ -736,7 +736,7 @@ ComputeWithForceBars(Widget widget, Bool query, XtWidgetGeometry *intended, } if (w->viewport.allowhoriz) { - if (w->viewport.horiz_bar == NULL) + if (w->viewport.horiz_bar == NULL) w->viewport.horiz_bar = CreateScrollbar(w, True); *clip_height -= XtHeight(w->viewport.horiz_bar) + @@ -758,7 +758,7 @@ ComputeWithForceBars(Widget widget, Bool query, XtWidgetGeometry *intended, if (query) { if (w->viewport.allowvert || w->viewport.allowhoriz) { XtQueryGeometry(child, intended, &preferred); - + if (!(intended->request_mode & CWWidth)) { if (preferred.request_mode & CWWidth) intended->width = preferred.width; @@ -874,11 +874,11 @@ GeometryRequestPlusScrollbar(ViewportWidget w, Bool horizontal, #define WidthChange() (request->width != XtWidth(w)) #define HeightChange() (request->height != XtHeight(w)) -static XtGeometryResult +static XtGeometryResult QueryGeometry(ViewportWidget w, XtWidgetGeometry *request, XtWidgetGeometry *reply_return) -{ - if (w->viewport.allowhoriz && w->viewport.allowvert) +{ + if (w->viewport.allowhoriz && w->viewport.allowvert) return (TestSmaller(w, request, reply_return)); else if (w->viewport.allowhoriz && !w->viewport.allowvert) { @@ -942,7 +942,7 @@ XawViewportGeometryManager(Widget child, XtWidgetGeometry *request, if (rWidth && XtWidth(w) != request->width) { if (w->viewport.allowhoriz && request->width > XtWidth(w)) { /* horizontal scrollbar will be needed so possibly reduce height */ - Widget bar; + Widget bar; if ((bar = w->viewport.horiz_bar) == NULL) bar = CreateScrollbar(w, True); @@ -1058,12 +1058,12 @@ XawViewportSetLocation if (xoff > 1.0) /* scroll to right */ x = XtWidth(child); - else if (xoff < 0.0) /* if the offset is < 0.0 nothing */ + else if (xoff < 0.0) /* if the offset is < 0.0 nothing */ x = XtX(child); else x = (float)XtWidth(child) * xoff; - if (yoff > 1.0) + if (yoff > 1.0) y = XtHeight(child); else if (yoff < 0.0) y = XtY(child); diff --git a/src/XawI18n.c b/src/XawI18n.c old mode 100755 new mode 100644 index 9a49521..99ed2ca --- a/src/XawI18n.c +++ b/src/XawI18n.c @@ -18,7 +18,7 @@ * OMRON, NTT SOFTWARE, AND NTT, DISCLAIM ALL WARRANTIES WITH REGARD * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL OMRON, NTT SOFTWARE, OR NTT BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. @@ -101,5 +101,5 @@ _Xaw_iswalnum(wchar_t ch) wctomb((char*)mb, ch); return (isalnum(*mb)); -#endif +#endif } diff --git a/src/XawI18n.h b/src/XawI18n.h old mode 100755 new mode 100644 index 09ab51b..d50171c --- a/src/XawI18n.h +++ b/src/XawI18n.h @@ -24,9 +24,9 @@ in this Software without prior written authorization from The Open Group. ********************************************************/ -#ifdef HAS_WCTYPE_H +#ifdef HAVE_WCTYPE_H #include -#ifndef NO_WIDEC_H +#ifdef HAVE_WIDEC_H #include #define wcslen(c) wslen(c) #define wcscpy(d, s) wscpy(d, s) @@ -34,7 +34,7 @@ in this Software without prior written authorization from The Open Group. #endif #endif -#ifdef HAS_WCHAR_H +#ifdef HAVE_WCHAR_H #include #endif diff --git a/src/XawIm.c b/src/XawIm.c old mode 100755 new mode 100644 index 3b7032b..7a7152f --- a/src/XawIm.c +++ b/src/XawIm.c @@ -17,12 +17,12 @@ * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS - * SOFTWARE. + * SOFTWARE. * * Author: Seiji Kuwari OMRON Corporation * kuwa@omron.co.jp * kuwa%omron.co.jp@uunet.uu.net - */ + */ /* @@ -85,7 +85,7 @@ in this Software without prior written authorization from The Open Group. * Forward reference prototypes * *****************************************************/ - + /* * Prototypes */ @@ -184,14 +184,14 @@ static VendorShellWidget SearchVendorShell(Widget w) return(NULL); } -static XContext extContext = (XContext)NULL; +static XContext extContext = (XContext)0; static XawVendorShellExtPart * SetExtPart(VendorShellWidget w, XawVendorShellExtWidget vew) { contextDataRec *contextData; - if (extContext == (XContext)NULL) extContext = XUniqueContext(); + if (extContext == (XContext)0) extContext = XUniqueContext(); contextData = XtNew(contextDataRec); contextData->parent = (Widget)w; @@ -296,13 +296,13 @@ ConfigureCB(Widget w, XtPointer closure, XEvent *event, Boolean *unused) } } -static XContext errContext = (XContext)NULL; +static XContext errContext = (XContext)0; static Widget SetErrCnxt(Widget w, XIM xim) { contextErrDataRec *contextErrData; - if (errContext == (XContext)NULL) errContext = XUniqueContext(); + if (errContext == (XContext)0) errContext = XUniqueContext(); contextErrData = XtNew(contextErrDataRec); contextErrData->widget = w; @@ -506,7 +506,7 @@ OpenIM(XawVendorShellExtPart *ve) } if (XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL) || !xim_styles) { - XtAppWarning(XtWidgetToApplicationContext(ve->parent), + XtAppWarning(XtWidgetToApplicationContext(ve->parent), "input method doesn't support any style"); XCloseIM(xim); return; @@ -800,7 +800,7 @@ CreateIC(Widget w, XawVendorShellExtPart *ve) if (IsSharedIC(ve)) SetICValuesShared(w, ve, p, FALSE); XFlush(XtDisplay(w)); - + if (p->input_style & (XIMPreeditArea|XIMPreeditPosition|XIMStatusArea)) { if (p->flg & CIFontSet) { pe_a[pe_cnt] = (XPointer) XNFontSet; pe_cnt++; @@ -1220,7 +1220,7 @@ SetFocusValues(Widget inwidg, ArgList args, Cardinal num_args, Bool focus) if (focus) SetICFocus(inwidg, ve); } else { CreateIC(inwidg, ve); - SetICFocus(inwidg, ve); + SetICFocus(inwidg, ve); } } } @@ -1407,13 +1407,13 @@ Destroy(Widget w, XawVendorShellExtPart *ve) return; XtFree( (char*) ve->im.resources ); - if (extContext != (XContext)NULL && - !XFindContext (XtDisplay (w), (Window)w, + if (extContext != (XContext)0 && + !XFindContext (XtDisplay (w), (Window)w, extContext, (XPointer*)&contextData)) XtFree( (char*) contextData ); - if (errContext != (XContext)NULL && - !XFindContext (XDisplayOfIM( ve->im.xim ), (Window) ve->im.xim, + if (errContext != (XContext)0 && + !XFindContext (XDisplayOfIM( ve->im.xim ), (Window) ve->im.xim, errContext, (XPointer*) &contextErrData)) XtFree( (char*) contextErrData ); } diff --git a/src/XawInit.c b/src/XawInit.c old mode 100755 new mode 100644 index c10a9b6..5ca1ef8 --- a/src/XawInit.c +++ b/src/XawInit.c @@ -22,10 +22,10 @@ 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. - * - * - * XawInitializeWidgetSet - * + * + * + * XawInitializeWidgetSet + * * This routine forces a reference to vendor shell so that the one in this * widget is installed. Any other cross-widget set initialization should be * done here as well. All Athena widgets should include "XawInit.h" and @@ -76,7 +76,7 @@ Widget XawOpenApplication(XtAppContext *app_context_return, *app_context_return = XtCreateApplicationContext(); if( *app_context_return == NULL ) return NULL; - + XtDisplayInitialize(*app_context_return, dpy, application_name, application_class, NULL, 0, @@ -86,7 +86,7 @@ Widget XawOpenApplication(XtAppContext *app_context_return, if (screen) { XtSetArg(args[n], XtNscreen, screen); n++; } - toplevel = XtAppCreateShell(application_name, + toplevel = XtAppCreateShell(application_name, application_class, widget_class, dpy, diff --git a/src/sharedlib.c b/src/sharedlib.c old mode 100755 new mode 100644 diff --git a/xaw6.pc.in b/xaw6.pc.in index 537df32..cee7220 100644 --- a/xaw6.pc.in +++ b/xaw6.pc.in @@ -6,7 +6,7 @@ includedir=@includedir@ Name: Xaw Description: X Athena Widgets Library, version 6 Version: @PACKAGE_VERSION@ -Requires: xproto xt xmu +Requires: xproto xt Requires.private: x11 xext xt xmu Cflags: -I${includedir} Libs: -L${libdir} -lXaw6 diff --git a/xaw7.pc.in b/xaw7.pc.in old mode 100755 new mode 100644