Comment: These are patches to produce the Andrew component of the X.V11R4 distribution, patch level 8 Andrew-Patch: 8 Date: Tue, 20 Nov 1990 15:13:33 -0500 (EST) Date-span: 90/9/5 13:58:56 through 90/11/20 13:51:04 Bugs addressed: Count of patched files: 280 SPECIAL PATCH NOTES: You must create the directory ./atk/layout by hand before you can patch. RCS logs: Source file: Imakefile Current version: 2.48 revision 2.48 date: 90/10/24 12:51:36; author: gk5g; state: Exp; lines added/del: 3/0 If SITE_ENV is defined then install andrew/config/site.rls into ${DESTDIR}/config. ---------------------------- revision 2.47 date: 90/09/28 15:11:38; author: gk5g; state: Exp; lines added/del: 5/1 Added site directory to SUBDIRS list if SITE_ENV is defined. Source file: config/allsys.h Current version: 1.17 revision 1.17 date: 90/11/01 15:35:04; author: gk5g; state: Exp; lines added/del: 3/3 Changed OLD_ULTRIX to OLD_ULTRIX_ENV. Changed NO_FONTS to NO_FONTS_ENV. ---------------------------- revision 1.16 date: 90/11/01 15:19:01; author: gk5g; state: Exp; lines added/del: 4/1 Added make configuration symbol NO_FONTS. This satisfies bug #1396: Sometimes (and more often than you might think -- e.g. in an environment with a mainframe compute server & x terminals) people build X11 without a server. That is, they build only the client libraries and applications. On such machines, it makes sense to compile Andrew, as an application library. However, it does not necessarily make sense to compile Andrew fonts on such a server. Whenever I compile on one such server here at Bellcore, for example, I have to finish the build by hand because the font build never works (due to the absence of xmkfontd). ---------------------------- revision 1.15 date: 90/09/06 15:38:20; author: gk5g; state: Exp; lines added/del: 1/1 Changed PRE_X11R4 to PRE_X11R4_ENV. Source file: config/andrew.rls Current version: 2.104 revision 2.104 date: 90/10/19 14:41:43; author: gk5g; state: Exp; lines added/del: 8/2 Added whole new NormalAsmPPRule() for mips. ---------------------------- revision 2.103 date: 90/10/19 14:29:06; author: gk5g; state: Exp; lines added/del: 4/0 Changed definition of rule NormalAsmRule(). Ifdef mips, use -nocpp flag to as(1). ---------------------------- revision 2.102 date: 90/09/28 14:14:16; author: gk5g; state: Exp; lines added/del: 4/0 Added inclusion of site.rls if SITE_ENV is defined. Source file: config/site.rls Current version: 1.1 revision 1.1 date: 90/09/28 14:15:22; author: gk5g; state: Exp; Initial revision Source file: config/apollo68k/system.mcr Current version: 1.7 revision 1.7 date: 90/09/06 14:00:48; author: gk5g; state: Exp; lines added/del: 1/2 Removed bogus definition of XSRCDIR. It was andrew.cmu.edu specific. Source file: config/pmax_3/system.mcr Current version: 1.9 revision 1.9 date: 90/09/06 14:01:43; author: gk5g; state: Exp; lines added/del: 2/1 Removed bogus definition of XSRCDIR. It was andrew.cmu.edu specific. Source file: config/ps_aix11/system.h Current version: 1.15 revision 1.15 date: 90/11/05 13:54:26; author: gk5g; state: Exp; lines added/del: 0/2 Removed undef of ANDREW_MALLOC_ENV and DEBUG_MALLOC_ENV Source file: config/ps_aix12/system.h Current version: 1.7 revision 1.7 date: 90/11/05 13:46:07; author: gk5g; state: Exp; lines added/del: 0/2 Removed undef of ANDREW_MALLOC_ENV and DEBUG_MALLOC_ENV ---------------------------- revision 1.6 date: 90/11/02 14:38:10; author: gk5g; state: Exp; lines added/del: 0/4 Removed definition of symbol _BSD. This is now passed on the CC command line. Source file: config/ps_aix12/system.mcr Current version: 1.4 revision 1.4 date: 90/11/02 14:38:48; author: gk5g; state: Exp; lines added/del: 1/1 Removed unnecessary CC command line definitions. Added CC command line definition -D_BSD. Source file: config/sun2_35/system.mcr Current version: 1.7 revision 1.7 date: 90/09/06 14:03:42; author: gk5g; state: Exp; lines added/del: 1/2 Removed bogus definition of XUTILDIR. It was $(BASEDIR)/bin/X11. Source file: config/sun4_40/system.mcr Current version: 1.8 revision 1.8 date: 90/09/06 14:04:31; author: gk5g; state: Exp; lines added/del: 0/1 Removed bogus definition of XUTILDIR. It was $(BASEDIR)/bin/X11. Source file: config/vax_22/system.mcr Current version: 1.7 revision 1.7 date: 90/09/06 14:04:54; author: gk5g; state: Exp; lines added/del: 1/2 Removed bogus definition of XUTILDIR. It was $(BASEDIR)/bin/X11. Source file: xmkfontd/Imakefile Current version: 2.11 revision 2.11 date: 90/11/20 12:03:57; author: susan; state: Exp; lines added/del: 3/3 changed name of ISO_80_FONTS to ISO80_FONTS_ENV ---------------------------- revision 2.10 date: 90/11/16 16:32:29; author: susan; state: Exp; lines added/del: 1/1 modified installation of non-andrew.fonts.alias ---------------------------- revision 2.9 date: 90/11/14 14:24:33; author: susan; state: Exp; lines added/del: 5/1 added ISO_80_FONTS to install non-andrew.fonts.alias Source file: ams/flames/flib.flm Current version: 2.8 revision 2.8 date: 90/10/31 09:32:13; author: bobg; state: Exp; lines added/del: 6/1 The extract-liberally function was not properly handling the case where the user's regular expression contained parentheses. It now does the right thing. Source file: ams/libs/ms/bldcapt.c Current version: 2.18 revision 2.18 date: 90/11/19 14:38:32; author: gk5g; state: Exp; lines added/del: 2/1 Added a return call to the end of the routine ReallyIsFromMe(). This was causing the captions to come up incorrectly. ---------------------------- revision 2.17 date: 90/11/07 13:54:31; author: gk5g; state: Exp; lines added/del: 4/5 Changed test in BuildCaption() that determines if "=>" is used in the To: field when you send yourself mail in a non-AMDS env. ---------------------------- revision 2.16 date: 90/11/05 16:15:37; author: gk5g; state: Exp; lines added/del: 36/9 Patch submitted by Nathaniel Borenstein: This patch fixes a bug that causes the captions of mail messages you sent yourself NEVER to work right on non-AMDS systems. Instead of using "=>" followed by the To addresses, it just shows the mail as being From you, which isn't very useful. Source file: ams/libs/ms/epoch.c Current version: 2.30 revision 2.30 date: 90/11/15 13:06:58; author: susan; state: Exp; lines added/del: 3/2 added #include ---------------------------- revision 2.29 date: 90/11/14 12:36:02; author: gk5g; state: Exp; lines added/del: 18/2 Patch submitted by Craig Everhart: Here's a tad more on the epoch.c error recovery, that should help AMS deal that much better with long AFS operations. ---------------------------- revision 2.28 date: 90/11/13 14:01:39; author: gk5g; state: Exp; lines added/del: 3/1 Patch submitted by Craig Everhart: This patch will make the epoch purges of large bboard trees more reliable. The epoch attempts quit after ten retries of ``temporary'' failures, but it's easy to see a failure as non-``temporary,'' and the epoch attempts bomb out if the failure doesn't appear to be ``temporary.'' This patch causes ENOENT to appear ``temporary,'' which should probably be OK, since most names come from directories themselves. Source file: ams/libs/ms/hdlnew.c Current version: 2.54 revision 2.54 date: 90/11/01 16:50:08; author: gk5g; state: Exp; lines added/del: 10/6 Patch submitted by Craig Everhart: There's one place I seem to have missed in my attempts to split off the UseridPlusWorks attribute from AMSDelivery. It's in the file andrew/ams/libs/ms/hdlnew.c, where the Flames program can get the value of the local parameter ``uidsuffix''. Source file: ams/libs/ms/init.c Current version: 2.40 revision 2.40 date: 90/10/23 15:20:31; author: gk5g; state: Exp; lines added/del: 6/4 Patch to allow a new AndrewSetup/AMS-Server configuration option: AMS_UseridPlusWorks: yes whereby an administration can declare that mail to ThisDomain (via AndrewSetup) or CELLNAME ( via /afs/CELLNAME/service/configuration/AMS-Server ) supports the userid+ and userid+tag conventions for local mail addresses. ---------------------------- revision 2.39 date: 90/09/21 12:24:45; author: gk5g; state: Exp; lines added/del: 9/5 The purpose of the patch below is to generate from lines that do not have host names in them, for sites that consider the addition of host names to be properly the province of the delivery system only. Source file: ams/libs/ms/mswp.c Current version: 2.47 revision 2.47 date: 90/10/23 15:22:08; author: gk5g; state: Exp; lines added/del: 11/10 Patch to allow a new AndrewSetup/AMS-Server configuration option: AMS_UseridPlusWorks: yes whereby an administration can declare that mail to ThisDomain (via AndrewSetup) or CELLNAME ( via /afs/CELLNAME/service/configuration/AMS-Server ) supports the userid+ and userid+tag conventions for local mail addresses. ---------------------------- revision 2.46 date: 90/09/19 15:37:17; author: gk5g; state: Exp; lines added/del: 3/3 Fix that lets UUCP-style destination hostnames pass through the AMS address validation when the system is configured with AMS_UUCPSupported ON. Source file: ams/libs/ms/mungenew.c Current version: 2.24 revision 2.24 date: 90/09/14 13:51:50; author: gk5g; state: Exp; lines added/del: 3/2 If there's an AMS_MailCollectionCommand or a PersonalMailCollectionCommand we don't collect mail from /usr/spool/mail/{uid} anymore. Source file: ams/libs/ms/reply.c Current version: 2.9 revision 2.9 date: 90/09/07 11:52:10; author: gk5g; state: Exp; lines added/del: 2/2 AMS has been creating mal-formed RFC822 References: headers for a long time. This problem was just pointed out in a conversation with Nicholas Briggs, the mail administrator at Xerox.com. The problem is that the message-IDs in the References: field are supposed to be separated only by whitespace, rather than by a comma. Source file: ams/libs/ms/strpself.c Current version: 2.11 revision 2.11 date: 90/10/23 14:52:34; author: gk5g; state: Exp; lines added/del: 28/5 Patch supplied by Craig Everhart: Be a little more aggressive in stripping out one's own name from a list of names that results when composing a reply to a message one has already received. It fixes a bug in that code that showed up here at Transarc with names in First_Last form rather than userid+ form. Source file: ams/libs/ms/subs.c Current version: 2.30 revision 2.30 date: 90/10/15 16:02:34; author: gk5g; state: Exp; lines added/del: 12/4 Added return values to all integer-returning routines that didn't have return calls as last line. This was causing core-dumps under SunOS4.1. ---------------------------- revision 2.29 date: 90/10/15 13:46:37; author: gk5g; state: Exp; lines added/del: 4/2 Added a return value to CheckGlobalSubscriptions(). It is suppose to return an int. It never has. On SunOS4.1 it returns a non-zero value causing a NULL pointer dereference. I didn't add a AMS_RETURN_ERRCODE macro if the GlobalRequiredSubsFile couldn't be opened for some reason. I'm not sure if this file is necessarily existent. Thanks to Jishnu Mukerji for uncovering this bug. ---------------------------- revision 2.28 date: 90/09/18 18:17:34; author: gk5g; state: Exp; lines added/del: 2/2 SetProfileEntry was not returning a value. It now returns the value of SetFullProfileEntry. Source file: ams/libs/snap/cuisnap.c Current version: 2.19 revision 2.19 date: 90/10/19 11:08:17; author: gk5g; state: Exp; lines added/del: 7/3 Don't include malloc declarations for RS/6000. Source file: ams/ms/Imakefile Current version: 2.29 revision 2.29 date: 90/10/30 18:50:18; author: gk5g; state: Exp; lines added/del: 7/1 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: ams/ms/ms.c Current version: 2.23 revision 2.23 date: 90/10/15 15:28:17; author: gk5g; state: Exp; lines added/del: 3/3 #ifndef _IBMR2 declare malloc family. ---------------------------- revision 2.22 date: 90/10/15 15:26:55; author: gk5g; state: Exp; lines added/del: 8/4 RS/6000 malloc. Source file: ams/msclients/cui/Imakefile Current version: 2.23 revision 2.23 date: 90/10/30 18:52:11; author: gk5g; state: Exp; lines added/del: 7/1 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: ams/msclients/cui/cui.c Current version: 2.32 revision 2.32 date: 90/10/25 18:04:52; author: gk5g; state: Exp; lines added/del: 6/6 Removed routines strcmpi() & strnicmp(). These were case-insensitive versions of strcmp() and strncmp() that are provided in libutil.a as ULstrcmp() and ULstrncmp(). Source file: ams/msclients/cui/cuifns.c Current version: 2.11 revision 2.11 date: 90/10/25 18:06:24; author: gk5g; state: Exp; lines added/del: 6/33 Removed routines strcmpi() & strnicmp(). These were case-insensitive versions of strcmp() and strncmp() that are provided in libutil.a as ULstrcmp() and ULstrncmp(). Source file: ams/msclients/nns/Imakefile Current version: 2.9 revision 2.9 date: 90/10/30 18:52:58; author: gk5g; state: Exp; lines added/del: 7/1 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: ams/msclients/vui/Imakefile Current version: 2.24 revision 2.24 date: 90/10/30 18:53:49; author: gk5g; state: Exp; lines added/del: 7/1 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: ams/msclients/vui/andmpc.c Current version: 2.9 revision 2.9 date: 90/10/25 17:54:37; author: gk5g; state: Exp; lines added/del: 2/21 Now get ULstrncmp from libutil.a. Source file: ams/msclients/vui/vuibase.c Current version: 1.30 Source file: ams/msclients/vui/vuipnl.c Current version: 1.28 Source file: ams/utils/dlistc/Imakefile Current version: 1.7 revision 1.7 date: 90/10/30 18:55:17; author: gk5g; state: Exp; lines added/del: 8/2 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: ams/utils/dlistc/dlc.c Current version: 1.8 revision 1.8 date: 90/10/25 17:49:08; author: gk5g; state: Exp; lines added/del: 0/25 Removed definition of ULstrncmp. It's in libutil.a now. Source file: ams/utils/nntp/cmd/Imakefile Current version: 1.8 revision 1.8 date: 90/10/30 18:56:33; author: gk5g; state: Exp; lines added/del: 7/1 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: ams/delivery/Imakefile Current version: 1.9 revision 1.9 date: 90/09/10 14:11:54; author: gk5g; state: Exp; lines added/del: 10/1 Patch sent by Craig Everhart: So people have complained that when they turn on RUN_AMDS_ENV, their /bin/mail and /usr/lib/sendmail programs are destroyed. The following is a set of three patches that should keep this from screwing people anywhere near so easily. The way that ``protection'' was offered before was that in the ams/delivery/sendmail and ams/delivery/mail Imakefiles, the overwriting of $(ROOTDIR){/bin/mail,/usr/lib/sendmail) was done only if RUN_AMDS_ENV was set. Nonetheless, this screwed those folks who were planning on running AMDS, but were only compiling it and had not yet installed it. The method I propose with this set of patches is twofold: - in ams/delivery/Imakefile, recurse into ams/delivery/mail and ams/delivery/sendmail only if CMU_ENV is on; - in ams/delivery/{mail,sendmail}/Imakefile, the first time through, save copies of ``$(ROOTDIR){/bin/mail,/usr/lib/sendmail}'' as ``$(ROOTDIR){/bin/mail,/usr/lib/sendmail}.pre-amds''. Installers won't get bitten by the automatic clobbering, but can replace the programs, if they wish, by ``cd ...../ams/delivery/mail; make dependInstall; cd ../sendmail; make dependInstall'' if they wish. Source file: ams/delivery/trymail/Imakefile Current version: 1.11 revision 1.11 date: 90/10/30 18:57:54; author: gk5g; state: Exp; lines added/del: 8/2 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: ams/delivery/trymail/strong.c Current version: 1.41 revision 1.41 date: 90/10/26 13:05:56; author: gk5g; state: Exp; lines added/del: 21/11 Patch submitted by Craig Everhart: Bob Oesterlin asked for a better error message in one weird mail delivery condition. (Actually, he had to call me up to ask what an error message meant, so I took that as an opportunity to do a better job on that error message and other comparable ones.) Source file: ams/delivery/queuem/queuem.c Current version: 1.67 revision 1.67 date: 90/11/19 15:42:23; author: gk5g; state: Exp; lines added/del: 31/15 Patch submitted by Craig Everhart: Wallace Colyer noticed a security problem with queuemail and asked about a fix (and made two suggestions). This change implements one of the suggestions. ---------------------------- revision 1.66 date: 90/09/10 14:22:14; author: gk5g; state: Exp; lines added/del: 11/2 Patch sent by Craig Everhart: The current queuemail daemon is supposed to shut itself down when it gets an XCPU signal. Almost all instances of the daemon do this, but one doesn't: the one that polls all the .Outgoing directories on the system. This daemon sits in a loop doing two things, over and over: - poll all ~userid/.Outgoing directories - sleep for two hours If the XCPU signal comes during the two-hour sleep, the daemon won't shut down, and naively it looks like it's in trouble. This patch fixes the problem, by replacing the ``sleep(7200)'' with a call to select(2), which will allow early returns. Source file: ams/delivery/sendmail/Imakefile Current version: 1.9 revision 1.9 date: 90/10/17 17:13:00; author: gk5g; state: Exp; lines added/del: 2/9 We don't install sendmail now, just issue a message to the builder telling them to install manually when the system build has completed successfully. ---------------------------- revision 1.8 date: 90/09/10 14:14:35; author: gk5g; state: Exp; lines added/del: 9/1 Patch sent by Craig Everhart re: fix so that people who have RUN_AMDS_ENV won't have their /bin/mail & /usr/lib/sendmail destroyed during the build. Source file: ams/delivery/mail/Imakefile Current version: 1.12 revision 1.12 date: 90/10/17 17:14:21; author: gk5g; state: Exp; lines added/del: 2/8 We don't install mail now, just issue a message to the builder telling them to install manually when the system build has completed successfully. ---------------------------- revision 1.11 date: 90/09/10 14:17:39; author: gk5g; state: Exp; lines added/del: 10/2 Patch sent by Craig Everhart re: fix so that people who have RUN_AMDS_ENV won't have their /bin/mail & /usr/lib/sendmail destroyed during the build. Source file: atk/Imakefile Current version: 2.55 revision 2.55 date: 90/10/29 15:26:10; author: susan; state: Exp; lines added/del: 1/2 changed location of LAYOUT in top level Imakefile layout needs lset to be compiled first ---------------------------- revision 2.54 date: 90/10/03 14:11:20; author: susan; state: Exp; lines added/del: 6/0 added layout Source file: atk/apps/statload.c Current version: 2.10 Source file: atk/apt/apt/aptv.c Current version: 1.19 Source file: atk/apt/suite/suiteev.c Current version: 1.34 revision 1.34 date: 90/10/23 18:16:05; author: gk5g; state: Exp; lines added/del: 54/52 Rewrote routine PlaceItems(). Source file: atk/apt/suite/suite.c Current version: 1.35 Source file: atk/apt/suite/suiteta.c Current version: 1.16 revision 1.16 date: 90/09/11 14:05:11; author: gk5g; state: Exp; lines added/del: 5/1 Added code to deal with a NULL return value from im_Create. Source file: atk/apt/tree/treev.c Current version: 1.30 revision 1.30 date: 90/09/20 12:52:13; author: gk5g; state: Exp; lines added/del: 37/35 Fixed NULL pointer bug in Print_Tree. Source file: atk/atkvers/atkvers.num Current version: 1.47 revision 1.47 date: 90/11/14 15:16:50; author: susan; state: Exp; lines added/del: 1/1 Bump the global ATK Version number ---------------------------- revision 1.46 date: 90/11/07 11:20:11; author: susan; state: Exp; lines added/del: 1/1 Bump the global ATK Version number ---------------------------- revision 1.45 date: 90/10/08 13:36:13; author: susan; state: Exp; lines added/del: 1/1 Bump the global ATK Version number ---------------------------- revision 1.44 date: 90/10/01 15:51:58; author: susan; state: Exp; lines added/del: 1/1 Bump the global ATK Version number Source file: atk/basics/x/xfontd.c Current version: 1.12 revision 1.12 date: 90/11/07 15:46:47; author: gk5g; state: Exp; lines added/del: 27/14 Replaced the macro ENSUREGRAPHIC with a procedure. The macro returned a value but the macro was used in a void routine and that caused the Sun c compiler to die. ---------------------------- revision 1.11 date: 90/11/05 18:58:33; author: gk5g; state: Exp; lines added/del: 4/4 There was a call to the macro ENSUREGRAPHIC() in xfontdesc_StringSize() that didn't have an argument. This caused gcc to die. Added NULL argument. Source file: atk/basics/x/xim.c Current version: 1.44 revision 1.44 date: 90/10/23 14:56:30; author: gk5g; state: Exp; lines added/del: 2/4 Removed a debugging printout that was inadvertantly left in. ---------------------------- revision 1.43 date: 90/10/04 17:48:46; author: gk5g; state: Exp; lines added/del: 86/41 Fix submitted by Guy Harris: Andrew doesn't handle the INCR property mechanism, used for handling large selections, properly. The value of the INCR property, which is supposed to be a lower bound on the number of characters in the selection, is *NOT* supposed to be an ASCII string for that number, it's supposed to be the number itself. XView incorrectly gives the TARGETS target the type TARGETS rather than ATOM. A bug report has been sent to Sun, along with a fix; however, not everybody with XView necessarily has source or necessarily wants to run a version they've built from source, and the Open Windows 2.0 distribution has the bug, so it's probably polite to have Andrew compensate for XView's deficiencies here. XView insists that the LENGTH target be supported. The ICCCM doesn't say what its value should be; it's supposed to be the "number of bytes in (the) selection", but that number can vary depending on which target is requested; XView seems to want it to be the number of bytes in the STRING target, so that's what we give it. Added code to handle selections issue complaints in some situations, rather than silently ignoring the selection requests. ---------------------------- revision 1.42 date: 90/09/07 15:11:59; author: gk5g; state: Exp; lines added/del: 4/4 Changed PRE_X11R4 to PRE_X11R4_ENV. Source file: atk/basics/common/Imakefile Current version: 1.37 revision 1.37 date: 90/09/12 15:41:57; author: gk5g; state: Exp; lines added/del: 0/1 Removed a duplicate InstallMultiple() rule. Source file: atk/basics/common/fontdesc.c Current version: 2.8 Source file: atk/basics/common/im.c Current version: 2.36 revision 2.36 date: 90/09/13 19:16:27; author: wjh; state: Exp; lines added/del: 31/15 insert "im-" in front of names of five proctable entries: im-exit-program, im-start-keyboard-macro, im-stop-keyboard-macro, im-play-keyboard-macro, im-redraw-window ---------------------------- revision 2.35 date: 90/09/13 17:04:28; author: gk5g; state: Exp; lines added/del: 4/4 Initialized long rock = 0L in im_DoKey(). Now a keybinding-invoked procedure can find out if it has been passed data or not. Source file: atk/basics/common/improc.help Current version: 1.3 revision 1.3 date: 90/09/13 19:18:19; author: wjh; state: Exp; lines added/del: 7/7 insert "im-" in front of names of five proctable entries: im-exit-program, im-start-keyboard-macro, im-stop-keyboard-macro, im-play-keyboard-macro, im-redraw-window Source file: atk/basics/common/view.ch Current version: 2.15 revision 2.15 date: 90/09/18 17:37:29; author: sg08; state: Exp; lines added/del: 4/4 Add in missing parameters in GetLineDash macromethod. ---------------------------- revision 2.14 date: 90/09/18 17:18:23; author: gk5g; state: Exp; lines added/del: 4/4 The macro method view_Move was incorrectly defined. It was using graphic_MoveTo when it should have been using view_Move. Source file: atk/bush/bushapp.c Current version: 1.10 revision 1.10 date: 90/09/20 12:41:23; author: gk5g; state: Exp; lines added/del: 16/1 Changed bushapp_ParseArgs to handle invalid arguments in a more robust way. Fixes bug #1237. Source file: atk/bush/bush.c Current version: 1.21 revision 1.21 date: 90/09/20 12:40:04; author: gk5g; state: Exp; lines added/del: 17/4 Changed bush__InitTree to handle the case where the target directory does not exist or cannot be searched. Source file: atk/calc/calcv.c Current version: 1.11 revision 1.11 date: 90/09/18 19:50:59; author: gk5g; state: Exp; lines added/del: 10/4 Removed reliance on char* return value of sprintf. Source file: atk/champ/chump.c Current version: 2.6 revision 2.6 date: 90/09/21 18:15:43; author: gk5g; state: Exp; lines added/del: 1/0 Added a call to exit(0) at the end of main()(. Source file: atk/chart/chartapp.c Current version: 1.8 revision 1.8 date: 90/09/11 14:24:57; author: gk5g; state: Exp; lines added/del: 9/3 Added code to deal with a NULL return value from im_Create. Source file: atk/chart/chartp.c Current version: 1.8 revision 1.8 date: 90/09/11 14:41:22; author: gk5g; state: Exp; lines added/del: 5/2 Added code to deal with NULL return value from im_Create. Source file: atk/chart/chartv.c Current version: 1.21 revision 1.21 date: 90/10/04 13:47:02; author: gk5g; state: Exp; lines added/del: 9/5 Before updating the Control Palette, we now make sure that PaletteInitialized is TRUE. Source file: atk/chart/chartx1a.c Current version: 1.3 revision 1.3 date: 90/09/11 14:44:32; author: gk5g; state: Exp; lines added/del: 8/2 Added code to deal with NULL return value from im_Create and frame_New. Source file: atk/console/cmd/consolea.c Current version: 1.13 revision 1.13 date: 90/09/11 14:49:31; author: gk5g; state: Exp; lines added/del: 3/3 Changed wording of message that is printed when im_Create returns NULL. It used to state that it was "unable to open the display; program cannot run without a window manager." This may not be why NULL was returned. It could be that the process ran out of VM. I changed the message to simply state that it was unable to create a new window and that the process was exiting. Truth in advertising. Source file: atk/console/cmd/vopcona.c Current version: 1.13 revision 1.13 date: 90/09/11 14:53:09; author: gk5g; state: Exp; lines added/del: 4/4 Changed wording of message that is printed when im_Create returns NULL. It used to state that it was "unable to open the display; program cannot run without a window manager." This may not be why NULL was returned. It could be that the process ran out of VM. I changed the message to simply state that it was unable to create a new window and that the process was exiting. ruth in advertising. Source file: atk/console/consoles/fudgenut.con Current version: 2.5 revision 2.5 date: 90/09/25 17:51:39; author: gk5g; state: Exp; lines added/del: 1/1 Changed the text label from "Venus Activity" fo "AFS Activity". Source file: atk/console/doc/console.help Current version: 1.4 revision 1.4 date: 90/09/25 18:17:32; author: gk5g; state: Exp; lines added/del: 3/0 Added description of -C argument to Quick Reference section. That arg disables opening of /dev/console for error monitoring. ---------------------------- revision 1.3 date: 90/09/25 17:53:00; author: gk5g; state: Exp; lines added/del: 18/11 Changed references from Venus to AFS. The example of how to start a console other than the default was wm-specific. I added a statement of how to start console from ~/.xinitrc when running X. Source file: atk/createinset/null/nullvt.c Current version: 1.3 revision 1.3 date: 90/09/11 15:01:01; author: gk5g; state: Exp; lines added/del: 14/5 Added code to deal with a NULL return value from im_Create and frame_New. Source file: atk/ctext/ctextv.c Current version: 2.14 revision 2.14 date: 90/10/11 12:11:24; author: gk5g; state: Exp; lines added/del: 13/4 After a symbol is replaced it is now skipped and the search for more instances of the symbol starts after the replacement. Source file: atk/doc/insets.help Current version: 1.3 revision 1.3 date: 90/11/01 16:08:37; author: gk5g; state: Exp; lines added/del: 17/3 Added Caveats section to describe problem with scrolling large embedded insets. Source file: atk/ez/eza.c Current version: 2.13 revision 2.13 date: 90/09/11 15:31:18; author: gk5g; state: Exp; lines added/del: 11/5 Added code to handle a NULL return value from im_Create and frame_New. Source file: atk/extensions/compile.c Current version: 2.8 revision 2.8 date: 90/09/11 16:39:40; author: gk5g; state: Exp; lines added/del: 14/5 Added code to handle a NULL return value from im_Create and frame_New. Source file: atk/extensions/deskey.c Current version: 1.5 revision 1.5 date: 90/09/11 16:40:15; author: gk5g; state: Exp; lines added/del: 9/2 Added code to handle a NULL return value from im_Create and frame_New. Source file: atk/extensions/tags.c Current version: 2.9 revision 2.9 date: 90/09/11 16:40:41; author: gk5g; state: Exp; lines added/del: 10/41 Added code to handle a NULL return value from im_Create and frame_New. Source file: atk/extensions/tags.help Current version: 1.2 revision 1.2 date: 90/09/11 16:40:57; author: gk5g; state: Exp; lines added/del: 4/5 Added filename completion to tags for loading new tags file. Updated help file to explain this. Source file: atk/extensions/gsearch.c Current version: 1.3 revision 1.3 date: 90/11/19 14:39:05; author: bobg; state: Exp; lines added/del: 2/1 Fix for the bug that caused searches terminated by a mouse hit to insert \377 into the text (on the RT [dumped core on the Vax]). The problem was that im_GetCharacter returns EOF if a mouse hit occurs before the next keystroke. This is, of course, undocumented. Source file: atk/extensions/metax.c Current version: 1.2 revision 1.2 date: 90/09/06 22:35:42; author: ajp; state: Exp; lines added/del: 2/4 removed include of strings.h. It is picked up by andrewos.h Source file: atk/ezprint/ezprinta.c Current version: 2.17 Source file: atk/fad/fadv.c Current version: 2.10 Source file: atk/fad/fadv.ch Current version: 2.6 Source file: atk/frame/framecmd.c Current version: 2.44 revision 2.44 date: 90/11/01 15:00:58; author: gk5g; state: Exp; lines added/del: 6/5 In LocalReadFile(), we check for the existence of a buffer by the name of lastBuffer. If no such buffer exists, we set lastBuffer to the empty-string. We do this check as the last step in the routine now. ---------------------------- revision 2.43 date: 90/10/10 15:09:13; author: gk5g; state: Exp; lines added/del: 5/2 At the end of LocalReadFile(), added a check for the existence of the buffer whose name is lastBuffer. If that buffer doesn't exist, then clear out the value of lastBuffer. ---------------------------- revision 2.42 date: 90/09/11 17:07:04; author: gk5g; state: Exp; lines added/del: 24/9 Added code to handle a NULL return value from im_Create and frame_New. Source file: atk/help/src/Imakefile Current version:2.20 revision 2.20 date: 90/11/26 14:36:54; author: gk5g; state: Exp; lines added/del: 3/2 Now install config.h using InstallFile() macro. ---------------------------- date: 90/11/19 17:10:35; author: gk5g; state: Exp; lines added/del: 2/2 Added config.h to list of HFILES that are to be installed. That file is included by help.ih. Fixes bug #1406. Source file: atk/help/src/config.h Current version: 1.9 Source file: atk/help/src/help.c Current version: 2.74 revision 2.74 locked by: gk5g; date: 90/11/06 14:13:33; author: gk5g; state: Exp; lines added/del: 8/9 Patch submmited by Wayne Richardson: Here's a little patch that we made to andrew/atk/help/src/help.[hc] to make the missing-file msg (in ERRORBOX ) more verbose. This really helps when a help file has been accidently erased, but the help index still knows about it. ---------------------------- revision 2.73 date: 90/10/26 15:56:04; author: gk5g; state: Exp; lines added/del: 3/3 NULL pointer check. Source file: atk/help/src/help.h Current version: 1.36 revision 1.36 locked by: gk5g; date: 90/11/06 14:11:46; author: gk5g; state: Exp; lines added/del: 4/4 Patch submmited by Wayne Richardson: Here's a little patch that we made to andrew/atk/help/src/help.[hc] to make the missing-file msg (in ERRORBOX ) more verbose. This really helps when a help file has been accidently erased, but the help index still knows about it. Source file: atk/help/src/helpa.c Current version: 2.32 revision 2.32 date: 90/10/26 15:57:03; author: gk5g; state: Exp; lines added/del: 17/8 Change to routine unique_help() that fixes the bug where multiple users on the same host would not each get their own window. The first help request would get a window but all requests thereafter went to the same, initial hel window. This was caused by the code consulting the env. var. WMHOST only, even when running X11. We now check the env. var. TERM when running X11. Source file: atk/help/src/helpa.ch Current version: 2.8 Source file: atk/help/maint/mkindex.c Current version: 2.21 revision 2.21 date: 90/10/23 17:44:05; author: gk5g; state: Exp; lines added/del: 39/55 Changed routine BuildIndex() so that it now indexes a source-dir as a target-dir regardless of whether or not the target-dir exists. Previously it only created an index if both the source- and target-dirs existed. That way, in the help application, a user could never click on a help topic and get an error "no such topic". Now, it is possible to create indices where the file associated with the key does not exist. This feature is useful in a environment like CMU where there are different test-trees (alpha, beta, gamma) and the links (/usr/andrew) on a workstation are often changed to point to different test-environments. The person who builds the help indices may not have their links set to a tree that has the full set of help files. If the user does get a "no such topic" error in help, it means that the input-file to mkindex was not correct. Source file: atk/layout/Imakefile Current version: 1.1 Source file: atk/layout/layout.ch Current version: 1.2 revision 1.2 date: 90/10/10 17:06:06; author: jhh; state: Exp; lines added/del: 12/14 Fix handling of background objects; add programmer documentation. Source file: atk/layout/layoutv.ch Current version: 1.3 revision 1.3 date: 90/10/10 17:06:24; author: jhh; state: Exp; lines added/del: 13/4 Fix handling of background objects; add programmer documentation. ---------------------------- revision 1.2 date: 90/10/10 10:50:31; author: jhh; state: Exp; lines added/del: 33/22 Clean up methods, part 1. Source file: atk/layout/fillerv.c Current version: 1.2 revision 1.2 date: 90/10/03 15:02:15; author: jhh; state: Exp; lines added/del: 5/5 Fix more obsolete Sun compiler errors. Source file: atk/layout/layout.c Current version: 1.2 revision 1.2 date: 90/10/10 17:05:32; author: jhh; state: Exp; lines added/del: 31/119 Fix handling of background objects; add programmer documentation. Source file: atk/layout/layoutv.c Current version: 1.4 revision 1.4 date: 90/10/10 17:06:10; author: jhh; state: Exp; lines added/del: 113/108 Fix handling of background objects; add programmer documentation. ---------------------------- revision 1.3 date: 90/10/10 10:49:46; author: jhh; state: Exp; lines added/del: 171/202 Clean up methods, part 1. ---------------------------- revision 1.2 date: 90/10/03 12:35:47; author: jhh; state: Exp; lines added/del: 11/6 Remove ANSI standard procedure header so brain-dead Sun compiler will not object. Source file: atk/layout/layout.doc Current version: 1.1 revision 1.1 date: 90/10/10 17:06:29; author: jhh; state: Exp; Initial revision Source file: atk/layout/filler.doc Current version: 1.1 revision 1.1 date: 90/10/11 09:19:31; author: jhh; state: Exp; Initial revision Source file: atk/layout/layout.help Current version: 1.1 revision 1.1 date: 90/10/03 13:19:23; author: susan; state: Exp; Initial revision Source file: atk/layout/filler.help Current version: 1.1 revision 1.1 date: 90/10/03 13:19:53; author: susan; state: Exp; Initial revision Source file: atk/lookz/lookzv.c Current version: 2.16 Source file: atk/lookz/lookzv.ch Current version: 2.5 Source file: atk/lookz/lookzvt.c Current version: 1.2 revision 1.2 date: 90/09/11 17:17:15; author: gk5g; state: Exp; lines added/del: 11/5 Added code to handle a NULL return value from im_Create and frame_New. Source file: atk/lset/arbcon.c Current version: 2.35 revision 2.35 date: 90/09/11 18:33:59; author: gk5g; state: Exp; lines added/del: 9/3 Added some error messages for the case where im_Create or frame_New return NULL. Source file: atk/lset/celv.c Current version: 2.24 Source file: atk/lset/celv.ch Current version: 2.10 revision 2.10 date: 90/10/25 14:02:32; author: wjh; state: Exp; lines added/del: 7/7 add missing parentheses in macro definitions Source file: atk/lset/conpros.awk Current version: 2.10 revision 2.10 date: 90/09/21 11:53:04; author: tpn; state: Exp; lines added/del: 12/13 fix for bug 1220. The variable named 'function' is a reserved word in some versions of awk. The variable has been renamed. Also, some shells have a problem the the fact that conpros.awk was a large shell script. It have been changed to be just an awk script. The calling of it from mkcon.c has been changed to reflect this as well. Source file: atk/lset/mkcon.c Current version: 2.16 revision 2.16 date: 90/09/21 11:47:54; author: tpn; state: Exp; lines added/del: 7/6 fix for bug 1220. The variable named 'function' is a reserved word in some versions of awk. The variable has been renamed. Also, some shells have a problem the the fact that conpros.awk was a large shell script. It have been changed to be just an awk script. The calling of it from mkcon.c has been changed to reflect this as well. Source file: atk/lset/page.ch Current version: 1.3 revision 1.3 date: 90/10/25 13:17:59; author: wjh; state: Exp; lines added/del: 5/5 fixed definitions of GetFirstObject() and GetNowPlaying() Source file: atk/lset/runadewa.c Current version: 1.3 revision 1.3 date: 90/09/21 12:13:25; author: tpn; state: Exp; lines added/del: 4/3 Added an im_ForceUpdate() to ensure that all of the views are initialized before the proctable entry is called to initialiaze the application. ---------------------------- revision 1.2 date: 90/09/11 18:23:23; author: gk5g; state: Exp; lines added/del: 11/5 Added code to handle a NULL return value from im_Create and frame_New. Source file: atk/lset/wincelv.c Current version: 1.6 revision 1.6 date: 90/09/11 18:28:15; author: gk5g; state: Exp; lines added/del: 4/2 Added an error message when frame_New returns NULL. Source file: atk/ness/tokens/Imakefile Current version: 1.13 revision 1.13 date: 90/10/12 20:53:01; author: wjh; state: Exp; lines added/del: 5/1 replace system yaccpar with improved, machine-independent version Source file: atk/ness/tokens/buildy.c Current version: 1.7 revision 1.7 date: 90/10/30 11:55:38; author: wjh; state: Exp; lines added/del: 3/2 cleaned up gripes by finicky Sun compiler ---------------------------- revision 1.6 date: 90/10/12 20:53:48; author: wjh; state: Exp; lines added/del: 46/20 replace system yaccpar with improved, machine-independent version Source file: atk/ness/tokens/lex.ch Current version: 1.8 Source file: atk/ness/tokens/reyacc.c Current version: 1.2 revision 1.2 date: 90/10/30 11:55:17; author: wjh; state: Exp; lines added/del: 5/5 cleaned up gripes by finicky Sun compiler ---------------------------- revision 1.1 date: 90/10/12 20:53:55; author: wjh; state: Exp; Initial revision Source file: atk/ness/tokens/qsearch.c Current version: 1.1 revision 1.1 date: 90/10/12 20:54:33; author: wjh; state: Exp; Initial revision Source file: atk/ness/tokens/yaccpar Current version: 1.1 revision 1.1 date: 90/10/12 20:54:48; author: wjh; state: Exp; Initial revision Source file: atk/ness/objects/Imakefile Current version: 1.36 revision 1.36 date: 90/12/04 14:58:04; author: wjh; state: Exp; lines added/del: 1/1 fixed so it doesn't remake nesscomp every time a make is done ---------------------------- revision 1.35 date: 90/11/26 15:10:36; author: gk5g; state: Exp; lines added/del: 1/1 The arguments to the CleanTarget() rule incorrectly included the file nevent.hn. That should be nevent.h. ---------------------------- date: 90/10/12 21:09:04; author: wjh; state: Exp; lines added/del: 28/19 revised yaccpar to eliminate saving parser state. moved yycompile to gen.c eliminated ErrorList made the argument to MapRunError be a ness instead of an ErrorList ---------------------------- revision 1.33 date: 90/09/18 12:46:31; author: gk5g; state: Exp; lines added/del: 1/0 Now install error.h into ${DESTDIR}/include. Ness.ih #include's error.h. Source file: atk/ness/objects/call.c Current version: 1.38 revision 1.38 date: 90/10/12 21:07:59; author: wjh; state: Exp; lines added/del: 7/6 revised yaccpar to eliminate saving parser state. moved yycompile to gen.c eliminated ErrorList made the argument to MapRunError be a ness instead of an ErrorList ---------------------------- revision 1.37 date: 90/09/16 20:13:21; author: wjh; state: Exp; lines added/del: 52/32 see ness/objects/changes.sept.90 Source file: atk/ness/objects/dump.c Current version: 1.12 revision 1.12 date: 90/10/12 21:08:21; author: wjh; state: Exp; lines added/del: 5/3 revised yaccpar to eliminate saving parser state. moved yycompile to gen.c eliminated ErrorList made the argument to MapRunError be a ness instead of an ErrorList Source file: atk/ness/objects/error.c Current version: 1.17 revision 1.17 date: 90/10/12 21:08:45; author: wjh; state: Exp; lines added/del: 43/31 revised yaccpar to eliminate saving parser state. moved yycompile to gen.c eliminated ErrorList made the argument to MapRunError be a ness instead of an ErrorList Source file: atk/ness/objects/error.h Current version: 1.6 revision 1.6 date: 90/10/12 21:09:54; author: wjh; state: Exp; lines added/del: 3/3 >>revised yaccpar to eliminate saving parser state. Source file: atk/ness/objects/gen.c Current version: 1.20 revision 1.20 date: 90/10/12 21:08:28; author: wjh; state: Exp; lines added/del: 44/4 revised yaccpar to eliminate saving parser state. moved yycompile to gen.c eliminated ErrorList made the argument to MapRunError be a ness instead of an ErrorList Source file: atk/ness/objects/gen.hn Current version: 1.9 revision 1.9 date: 90/10/12 21:08:57; author: wjh; state: Exp; lines added/del: 7/2 revised yaccpar to eliminate saving parser state. moved yycompile to gen.c eliminated ErrorList made the argument to MapRunError be a ness instead of an ErrorList Source file: atk/ness/objects/interp.c Current version: 1.32 revision 1.32 date: 90/09/30 09:48:00; author: wjh; state: Exp; lines added/del: 8/5 improved compilability of the bcopys. compliments of Guy Harris ---------------------------- revision 1.31 date: 90/09/16 20:14:27; author: wjh; state: Exp; lines added/del: 208/184 see ness/objects/changes.sept.90 Source file: atk/ness/objects/ness.c Current version: 1.30 revision 1.30 date: 90/10/12 21:11:20; author: wjh; state: Exp; lines added/del: 6/4 Revised the getc/ungetc code in ness__ReadNamedFile to try to make it work on PMAX and Sun4 revised yaccpar to eliminate saving parser state. moved yycompile to gen.c eliminated ErrorList made the argument to MapRunError be a ness instead of an ErrorList ---------------------------- revision 1.29 date: 90/09/17 11:11:17; author: wjh; state: Exp; lines added/del: 12/4 reordered the code of ness__ReadNamedFile to try to make ungetc work on all systems. ---------------------------- revision 1.28 date: 90/09/16 20:14:42; author: wjh; state: Exp; lines added/del: 22/10 see ness/objects/changes.sept.90 Source file: atk/ness/objects/ness.ch Current version: 1.15 revision 1.15 date: 90/10/12 21:15:23; author: wjh; state: Exp; lines added/del: 6/3 change to version 1.5 ---------------------------- revision 1.14 date: 90/09/16 20:14:55; author: wjh; state: Exp; lines added/del: 25/3 see ness/objects/changes.sept.90 Source file: atk/ness/objects/nesscomp.gra Current version: 1.13 revision 1.13 date: 90/10/12 21:05:57; author: wjh; state: Exp; lines added/del: 25/49 revised yaccpar to eliminate saving parser state. moved yycompile to gen.c eliminated ErrorList made the argument to MapRunError be a ness instead of an ErrorList ---------------------------- revision 1.12 date: 90/09/16 20:15:01; author: wjh; state: Exp; lines added/del: 41/33 see ness/objects/changes.sept.90 Source file: atk/ness/objects/nevent.c Current version: 1.24 revision 1.24 date: 90/10/12 21:17:15; author: wjh; state: Exp; lines added/del: 3/3 fix value_SetArrayElt() to be sure changes are displayed change value_SetArraySize to use a value method ---------------------------- revision 1.23 date: 90/09/18 10:15:20; author: wjh; state: Exp; lines added/del: 7/7 Added a NotifyObservers call in value_SetArrayElt(). Now when the latter is called the clicklistV--or other observer of the value--will display the modified string. Changed the implementation of the Ness function value_SetArraySize to use the C function value_SetStrArrayAndSize. ---------------------------- revision 1.22 date: 90/09/16 20:15:12; author: wjh; state: Exp; lines added/del: 205/73 see ness/objects/changes.sept.90 Source file: atk/ness/objects/search.c Current version: 1.23 revision 1.23 date: 90/12/04 14:58:37; author: wjh; state: Exp; lines added/del: 9/4 corrected search() to check for empty pattern argument ---------------------------- revision 1.22 date: 90/11/30 15:42:01; author: wjh; state: Exp; lines added/del: 13/9 fixed a bug that caused crash in search.c on pmaxen ---------------------------- revision 1.21 date: 90/11/28 15:23:54; author: wjh; state: Exp; lines added/del: 11/3 fixed a bug in the search() function which was crashing it during present.n ---------------------------- revision 1.20 date: 90/10/12 21:16:24; author: wjh; state: Exp; lines added/del: 353/4 added regSearch and regSearchReverse made search() faster ---------------------------- revision 1.19 date: 90/09/16 20:15:35; author: wjh; state: Exp; lines added/del: 14/16 see ness/objects/changes.sept.90 Source file: atk/ness/objects/nesscomp.c Current version: 1.1 revision 1.1 date: 90/10/12 21:06:32; author: wjh; state: Exp; Initial revision Source file: atk/ness/objects/y.tab.h Current version: 1.1 revision 1.1 date: 90/11/01 08:36:28; author: wjh; state: Exp; Initial revision Source file: atk/ness/objects/changes.sept.90 Current version: 1.1 revision 1.1 date: 90/10/01 13:16:26; author: wjh; state: Exp; Initial revision Source file: atk/ness/objects/changes.Oct.90 Current version: 1.1 revision 1.1 date: 90/10/12 21:17:55; author: wjh; state: Exp; Initial revision Source file: atk/ness/nesslib/funchdr.n Current version: 1.4 revision 1.4 date: 90/10/23 14:16:59; author: wjh; state: Exp; lines added/del: 22/18 fix formatting of function type and comment ---------------------------- revision 1.3 date: 90/10/22 17:30:38; author: wjh; state: Exp; lines added/del: 199/157 prevent loops due to syntax errors make it handle classprocedures reduce indentation of comments improve documentation Source file: atk/ness/nesslib/doubleword.n Current version: 1.1 revision 1.1 date: 90/10/12 20:50:34; author: wjh; state: Exp; Initial revision Source file: atk/ness/demos/calc.d Current version: 1.4 revision 1.4 date: 90/10/11 11:32:56; author: wjh; state: Exp; lines added/del: 271/271 fixed a syntax error in the Ness code ---------------------------- revision 1.3 date: 90/09/16 21:20:58; author: wjh; state: Exp; lines added/del: 522/387 *** empty log message *** Source file: atk/ness/doc/present.n Current version 1.5 date: 90/11/26 17:17:55; author: wjh; state: Exp; lines added/del: 2/1 modified to avoid the error message "Cannot access: No such file or directory" Source file: atk/ness/doc/ness.help Current version: 1.5 revision 1.5 date: 90/10/16 09:49:05; author: wjh; state: Exp; lines added/del: 17/16 reformatted program example and minor corrections Source file: atk/ness/doc/nessfunc.d Current version: 1.8 revision 1.8 date: 90/10/12 20:48:36; author: wjh; state: Exp; lines added/del: 34/21 added documentation for regSearch and regSearchReverse ---------------------------- revision 1.7 date: 90/09/16 21:18:27; author: wjh; state: Exp; lines added/del: 95/123 see atk/ness/objects/changes.sept.90 Source file: atk/ness/doc/nesstut.d Current version: 1.5 revision 1.5 date: 90/10/31 14:42:34; author: wjh; state: Exp; lines added/del: 107/52 added a compute-all-subsets example ---------------------------- revision 1.4 date: 90/09/16 21:19:40; author: wjh; state: Exp; lines added/del: 308/23 see atk/ness/objects/changes.sept.90 Source file: atk/org/orga.c Current version: 1.9 revision 1.9 date: 90/09/11 19:48:48; author: gk5g; state: Exp; lines added/del: 9/3 Added code to handle a NULL return value from im_Create and frame_New. Source file: atk/preview/previewa.c Current version: 2.7 revision 2.7 date: 90/09/11 20:00:03; author: gk5g; state: Exp; lines added/del: 11/5 Added code to handle a NULL return value from im_Create and frame_New. Source file: atk/raster/cmd/Imakefile Current version: 2.12 revision 2.12 date: 90/11/07 14:10:15; author: gk5g; state: Exp; lines added/del: 1/1 Split rasterv.c into two file: rasterv.c & rastvaux.c. Source file: atk/raster/cmd/raster.c Current version: 2.12 revision 2.12 date: 90/10/29 15:47:29; author: gk5g; state: Exp; lines added/del: 9/4 Changed raster_SetAttributes() to set the pixelimage readonly flag. In ReadRasterFile() moved the call to rasterimage_SetRO() to before the call to raster_Resize(). raster_Resize() depends on the readonly-ness of the rasterimage. Source file: atk/raster/cmd/rasterv.c Current version: 2.25 revision 2.25 date: 90/11/07 14:10:45; author: gk5g; state: Exp; lines added/del: 12/1885 Split rasterv.c into two file: rasterv.c & rastvaux.c. ---------------------------- revision 2.24 date: 90/10/29 15:44:33; author: gk5g; state: Exp; lines added/del: 65/7 X bitmap support provide by Bill Cattey at MIT. ---------------------------- revision 2.23 date: 90/09/13 19:01:01; author: wjh; state: Exp; lines added/del: 81/2 define both raster-... and rasterv-... ---------------------------- revision 2.22 date: 90/09/12 20:59:32; author: wjh; state: Exp; lines added/del: 41/41 Change "raster-..." to "rasterv-..." ---------------------------- revision 2.21 date: 90/09/11 20:13:29; author: gk5g; state: Exp; lines added/del: 9/5 The crop menu item is now available whenever it is possible to crop the image. It is possible whenever a portion of the image is selected (but not the whole image). Source file: atk/raster/cmd/rasterv.ch Current version: 2.8 revision 2.8 date: 90/11/07 14:11:28; author: gk5g; state: Exp; lines added/del: 37/3 Split rasterv.c into two file: rasterv.c & rastvaux.c. Source file: atk/raster/cmd/rastervt.c Current version: 2.7 revision 2.7 date: 90/09/11 20:12:26; author: gk5g; state: Exp; lines added/del: 11/5 Added code to handle a NULL return value from im_Create and frame_New. Source file: atk/raster/cmd/rstproc.help Current version: 1.3 revision 1.3 date: 90/09/12 21:00:45; author: wjh; state: Exp; lines added/del: 40/40 Change "raster-..." to "rasterv-..." Source file: atk/raster/cmd/rastvaux.c Current version: 1.1 revision 1.1 date: 90/11/07 14:11:49; author: gk5g; state: Exp; Initial revision Source file: atk/raster/convert/convrast.c Current version: 2.11 revision 2.11 date: 90/10/29 16:30:06; author: gk5g; state: Exp; lines added/del: 3/2 Insignifcant change... believe me. ---------------------------- revision 2.10 date: 90/10/29 15:45:22; author: gk5g; state: Exp; lines added/del: 17/4 X bitmap support provide by Bill Cattey at MIT. Source file: atk/raster/lib/Imakefile Current version: 2.7 revision 2.7 date: 90/10/29 15:43:57; author: gk5g; state: Exp; lines added/del: 6/3 X bitmap support provide by Bill Cattey at MIT. Source file: atk/raster/lib/xwdio.c Current version: 1.3 revision 1.3 date: 90/11/07 14:01:13; author: gk5g; state: Exp; lines added/del: 1/1 Removed superfluous '/' after inclusion of andrewos.h. Source file: atk/raster/lib/xbm.c Current version: 1.2 revision 1.2 date: 90/11/07 14:00:19; author: gk5g; state: Exp; lines added/del: 1/1 Removed superfluous '/' after inclusion of andrewos.h. ---------------------------- revision 1.1 date: 90/10/29 15:43:19; author: gk5g; state: Exp; Initial revision Source file: atk/raster/lib/xbm.ch Current version: 1.1 revision 1.1 date: 90/10/29 15:43:37; author: gk5g; state: Exp; Initial revision Source file: atk/support/buffer.c Current version: 2.27 revision 2.27 date: 90/11/05 15:48:43; author: gk5g; state: Exp; lines added/del: 21/5 Patch submitted by Bill Cattey: Here is a patch to buffer.c which causes it to follow the gnu_emacs checkpoint file naming scheme: / #uid.@ful@path@name#. The string #uid.@ful@path@name# is only used if the preference CheckpointGawdyNames is true and the CheckpointDirectory preference is set. ---------------------------- revision 2.26 date: 90/10/29 14:19:52; author: ajp; state: Exp; lines added/del: 35/6 Changes to make buffers observers of thier underlying dataobject Added IsModified to buffer so that observers of the buffer can determine if the dataobject is modified with respect to the buffer. ---------------------------- revision 2.25 date: 90/09/27 14:02:35; author: gk5g; state: Exp; lines added/del: 11/8 Fixed NULL pointer indirection bug in buffer_SetName() when name was NULL. Source file: atk/support/buffer.ch Current version: 2.9 revision 2.9 date: 90/10/29 14:21:02; author: ajp; state: Exp; lines added/del: 10/5 Changes to make buffers observers of thier underlying dataobject Added IsModified to buffer so that observers of the buffer can determine if the dataobject is modified with respect to the buffer. Source file: atk/support/buffer.doc Current version: 1.3 revision 1.3 date: 90/09/18 17:26:45; author: gk5g; state: Exp; lines added/del: 21/17 Updated the description of the method buffer_GetView. Source file: atk/support/nstdmark.c Current version: 2.13 revision 2.13 date: 90/10/11 12:05:11; author: ajp; state: Exp; lines added/del: 44/74 Changes to GetChild, GetNextChild, GetPreviousChild to use 23-tree code instead of enumerating through the children. ---------------------------- revision 2.12 date: 90/10/08 22:52:55; author: ajp; state: Exp; lines added/del: 16/2 Fix for handling environments that abut each other. in GetEnclosing Source file: atk/support/print.c Current version: 2.23 revision 2.23 date: 90/09/20 19:50:42; author: gk5g; state: Exp; lines added/del: 4/4 Changed *DocumentName == 0 to *DocumentName == '\0'. Source file: atk/support/style.c Current version: 2.13 revision 2.13 locked by: ajp; date: 90/09/10 11:25:24; author: tpn; state: Exp; lines added/del: 11/7 Fixed bug relating to generic attributes and the namespace object. When an attribute was deleated, the code was not dealing with the fact that namespace_GetValue can return negative values, rather than NULL. This is now fixed. Source file: atk/support/style.ch Current version: 2.6 Source file: atk/support/tree23.c Current version: 2.6 revision 2.6 date: 90/10/11 12:06:28; author: ajp; state: Exp; lines added/del: 36/3 Added support methods GetRightMostNode and GetPreviousNode. Used by nestedmarks Source file: atk/support/tree23.ch Current version: 2.8 revision 2.8 date: 90/10/11 12:07:38; author: ajp; state: Exp; lines added/del: 6/2 Added support methods GetRightMostNode and GetPreviousNode. Used by nestedmarks Source file: atk/support/bufferlist.c Current version: 1.6 revision 1.6 date: 90/10/29 14:22:58; author: ajp; state: Exp; lines added/del: 19/3 Changes to make buffers observers of thier underlying dataobject Added IsModified to buffer so that observers of the buffer can determine if the dataobject is modified with respect to the buffer. ---------------------------- revision 1.5 date: 90/10/22 17:58:40; author: gk5g; state: Exp; lines added/del: 8/8 Changed routine bufferlist__GetBufferOnFile(). When visiting a directory, now give the buffer a unique name. Used to name each and every dired buffer "Directory-Edit-1". Now don't require that a directory have '/' as it's last character. ---------------------------- revision 1.4 date: 90/10/04 15:19:06; author: gk5g; state: Exp; lines added/del: 2/4 I accidently left some debugging printf's in the code. ---------------------------- revision 1.3 date: 90/09/27 14:03:09; author: gk5g; state: Exp; lines added/del: 13/9 Changed bufferlist_GetBufferOnFile() to add the trailing slash when then file is a directory. Previously it just returned NULL. We make sure to add the slash so that there aren't two different buffers on the same directory - one with slash, one without. Source file: atk/support/bufferlist.ch Current version: 1.3 revision 1.3 date: 90/10/29 14:24:18; author: ajp; state: Exp; lines added/del: 4/2 Changes to make buffers observers of thier underlying dataobject Added IsModified to buffer so that observers of the buffer can determine if the dataobject is modified with respect to the buffer. Source file: atk/supportviews/scroll.c Current version: 2.22 revision 2.22 date: 90/11/07 16:30:34; author: tpn; state: Exp; lines added/del: 6/6 Added change to last update to insure that the code will never attempt to draw a rectangle with negitive width or height. ---------------------------- revision 2.21 date: 90/11/07 12:22:12; author: tpn; state: Exp; lines added/del: 13/26 The 'dot' will now be drawn with 2 zero-width rectangles, rather than with 1 double width rectangle. This avoids some known bugs in some X servers, and is probably actually faster, given the way most X servers deal with wide lines. Source file: atk/table/tabio.c Current version: 1.11 revision 1.11 date: 90/09/13 15:11:40; author: jhh; state: Exp; lines added/del: 177/95 Remove buffer length dependency reading tables with very long rows. Source file: atk/table/table.c Current version: 1.15 revision 1.15 date: 90/09/13 15:11:01; author: jhh; state: Exp; lines added/del: 5/3 Remove buffer length dependency reading tables with very long rows. Source file: atk/text/pcompch.ch Current version: 1.5 revision 1.5 date: 90/11/03 13:03:05; author: rr2b; state: Exp; lines added/del: 1/1 changed the declaration of ATKToASCII so that the UI can provide a interface more consistent with ASCIIToATK. Source file: atk/text/Imakefile Current version: 2.21 revision 2.21 locked by: ajp; date: 90/10/11 12:09:16; author: ajp; state: Exp; lines added/del: 2/1 Added txtvcsty.o to build Source file: atk/text/drawtxtv.c Current version: 2.29 revision 2.29 locked by: ajp; date: 90/09/20 15:56:11; author: gk5g; state: Exp; lines added/del: 15/16 Finished modifying to handle 8-bit characters. Source file: atk/text/text.c Current version: 2.29 revision 2.29 locked by: ajp; date: 90/10/11 12:09:37; author: ajp; state: Exp; lines added/del: 55/5 Fixed AlwaysAddView and AlwaysInsertFile to use AlwaysInsertCharacters instead of InsertCharacters Put code in to AwlaysDeleteCharacters to merge styles when they come together as a result of deleting characters Source file: atk/text/text.ch Current version: 2.12 revision 2.12 date: 90/10/11 12:14:19; author: ajp; state: Exp; lines added/del: 3/2 Added AlwaysDeleteCharacters to overrides list Source file: atk/text/textv.c Current version: 2.24 revision 2.24 locked by: ajp; date: 90/10/11 12:14:35; author: ajp; state: Exp; lines added/del: 29/10 Added in code for supporting non-seletion style commands. Source file: atk/text/textv.ch Current version: 2.11 revision 2.11 locked by: ajp; date: 90/10/11 12:15:54; author: ajp; state: Exp; lines added/del: 32/3 Added in methods for adjusting style boundaries when inserting and deleting characters Source file: atk/text/tpllist.c Current version: 2.11 revision 2.11 date: 90/09/27 18:15:53; author: gk5g; state: Exp; lines added/del: 5/3 Added GetProfile lookup for atktemplatepath as well as be2templatepath. Source file: atk/text/txtstvec.h Current version: 2.5 Source file: atk/text/txttroff.c Current version: 2.34 Source file: atk/text/txtvcmds.c Current version: 2.51 revision 2.51 date: 90/11/05 20:08:40; author: gk5g; state: Exp; lines added/del: 133/123 Changed all occurances of self->header.view.imPtr to textview_GetIM(self). Fix bug #1398: There was some inconsistent use of the search pattern lastPattern between textview_{R}SearchCmd() & textview_QueryReplaceCmd(). The latter routine handled things correctly but the search routines used a different technique. Changed the search routines to use the technique employed by QueryReplace. ---------------------------- revision 2.50 date: 90/10/23 10:06:24; author: ajp; state: Exp; lines added/del: 3/3 Fixed a bug in the code that allows you to enter styles by prompting for the style name from the keyboard. ---------------------------- revision 2.49 date: 90/10/11 12:16:40; author: ajp; state: Exp; lines added/del: 446/50 Added in commands for setting styles from the keyboard and menus when there is no selected region Source file: atk/text/pcompch.c Current version: 1.15 revision 1.15 date: 90/11/03 12:42:00; author: rr2b; state: Exp; lines added/del: 36/23 fixed pcompch__ATKToASCII and made functions not for export static. Source file: atk/text/comps Current version: 1.5 revision 1.5 date: 90/11/03 13:06:18; author: rr2b; state: Exp; lines added/del: 2/1 made the comment at the head of the file more meaningful. Source file: atk/text/txtvcsty.c Current version: 1.2 revision 1.2 date: 90/10/18 17:03:39; author: ajp; state: Exp; lines added/del: 3/6 Fix for bug when deleting text within a style and not at a style border. ---------------------------- revision 1.1 date: 90/10/11 12:17:56; author: ajp; state: Exp; Initial revision Source file: atk/text/tpls/Imakefile Current version: 2.8 revision 2.8 date: 90/11/09 17:41:47; author: gk5g; state: Exp; lines added/del: 0/0 Moved be2guide.tpl from the CMUTEMPLATES list into the TEMPLATEFILESLIST. Source file: atk/textaux/compchar.c Current version: 1.12 revision 1.12 date: 90/11/03 13:01:21; author: rr2b; state: Exp; lines added/del: 99/43 made compchar_ATKToASCII more consistent with ASCIIToATK Source file: atk/textaux/contentv.c Current version: 1.16 revision 1.16 date: 90/11/26 11:48:53; author: tpn; state: Exp; lines added/del: 3/4 A previous patch had contentv__MakeWindow creating 2 new buffers when it should only have been creating one. ---------------------------- revision 1.15 date: 90/10/30 16:14:22; author: gk5g; state: Exp; lines added/del: 13/6 Patch submited by Bill Cattey: Unfortunately, contentv.c blindly deletes that variable from the environment after it has printed the table of contents. If the old value of the PrintContents environment variable (if any) is saved, and used to determine if the variable were deleted, it doesn't hurt anything. But restoring it is a useful thing to do in case other subsystems want to take responsiblity for its value. When contentv can't find the proctable entry for either the preview or print commands, it doesn't say which one it can't find. ---------------------------- revision 1.14 date: 90/09/12 12:50:55; author: gk5g; state: Exp; lines added/del: 17/6 Added code to handle NULL return values from im_Create and frame_New. Source file: atk/textaux/cpchar.help Current version: 1.8 revision 1.8 date: 90/11/03 14:57:46; author: rr2b; state: Exp; lines added/del: 49/22 updated the documentation on the behavior of ATKToASCII Source file: atk/typescript/pscripta.c Current version: 2.9 revision 2.9 date: 90/09/12 13:04:33; author: gk5g; state: Exp; lines added/del: 11/5 Added code to handle NULL return value from im_Create and frame_New. Source file: atk/typescript/tscript.c Current version: 2.40 revision 2.40 date: 90/11/01 15:38:19; author: gk5g; state: Exp; lines added/del: 6/6 Changed OLD_ULTRIX to OLD_ULTRIX_ENV. ---------------------------- revision 2.39 date: 90/10/26 14:44:24; author: gk5g; state: Exp; lines added/del: 3/16 Backed-out attempt to fix bug that result in message "No job control" on RS/6000. This is a problem of POSIX conformance. Removed routine TypescriptEXITProcessCommand() and keybinding to it. Source file: atk/typescript/tscripta.c Current version: 2.13 revision 2.13 date: 90/09/12 13:05:07; author: gk5g; state: Exp; lines added/del: 11/5 Added code to handle NULL return value from im_Create and frame_New. Source file: atk/textobjects/diredv.c Current version: 1.7 revision 1.7 date: 90/10/22 18:01:44; author: gk5g; state: Exp; lines added/del: 0/9 Now don't require that a directory have '/' as it's last character. ---------------------------- revision 1.6 date: 90/09/12 13:14:22; author: gk5g; state: Exp; lines added/del: 9/2 Added code to handle NULL return value from im_Create and frame_New. Source file: atk/zip/lib/zipv000.c Current version: 2.9 revision 2.9 date: 90/09/20 14:56:27; author: sg08; state: Exp; lines added/del: 23/9 Optimize setting of FG/BG colors. Source file: atk/zip/lib/zipve01.c Current version: 2.10 revision 2.10 date: 90/11/19 17:05:11; author: gk5g; state: Exp; lines added/del: 6/8 Patch submitted by Bill Cattey; When I have an ez with multiple zip's, if any one of them draws the grid coordinates, it sets a global varible that makes them ALL think they have the grid coordinate font. The following patch puts the Draw_Pane_Coordinate code in sync with the correct way of setting the font. Source file: atk/zip/utility/ltapp.c Current version: 1.3 revision 1.3 date: 90/09/12 14:03:03; author: gk5g; state: Exp; lines added/del: 15/6 Added code to handle NULL return value from im_Create and frame_New. Source file: atk/zip/utility/schedapp.c Current version: 1.3 revision 1.3 date: 90/09/12 14:03:24; author: gk5g; state: Exp; lines added/del: 17/10 Added code to handle NULL return value from im_Create and frame_New. Source file: atkams/messages/cmd/messages.tpl Current version: 2.6 revision 2.6 date: 90/09/24 13:20:30; author: gk5g; state: Exp; lines added/del: 0/3 Removed item 'NoteToTypesetter'. It's been replaced by 'FormatNote'. Source file: atkams/messages/lib/Imakefile Current version: 2.15 revision 2.15 date: 90/10/30 19:06:44; author: gk5g; state: Exp; lines added/del: 7/1 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: atkams/messages/lib/ams.c Current version: 1.32 revision 1.32 date: 90/10/24 14:07:54; author: gk5g; state: Exp; lines added/del: 8/0 Added new ams{,n,s} method CheckAMSUseridPlusWorks() for use in sendaux.c. ---------------------------- revision 1.31 date: 90/09/12 14:08:22; author: gk5g; state: Exp; lines added/del: 6/2 Added code to handle NULL return value from im_Create and frame_New. Source file: atkams/messages/lib/ams.ch Current version: 1.5 revision 1.5 date: 90/10/24 14:09:01; author: gk5g; state: Exp; lines added/del: 1/0 Added new ams{,n,s} method CheckAMSUseridPlusWorks() for use in sendaux.c. Source file: atkams/messages/lib/amsn.c Current version: 1.6 revision 1.6 date: 90/10/24 14:09:40; author: gk5g; state: Exp; lines added/del: 7/0 Added new ams{,n,s} method CheckAMSUseridPlusWorks() for use in sendaux.c. Source file: atkams/messages/lib/amsn.ch Current version: 1.6 revision 1.6 date: 90/10/24 14:09:47; author: gk5g; state: Exp; lines added/del: 1/1 Added new ams{,n,s} method CheckAMSUseridPlusWorks() for use in sendaux.c. Source file: atkams/messages/lib/amss.c Current version: 1.6 revision 1.6 date: 90/10/24 14:09:52; author: gk5g; state: Exp; lines added/del: 7/0 Added new ams{,n,s} method CheckAMSUseridPlusWorks() for use in sendaux.c. Source file: atkams/messages/lib/amss.ch Current version: 1.4 revision 1.4 date: 90/10/24 14:09:59; author: gk5g; state: Exp; lines added/del: 1/0 Added new ams{,n,s} method CheckAMSUseridPlusWorks() for use in sendaux.c. Source file: atkams/messages/lib/capaux.c Current version: 1.16 revision 1.16 date: 90/09/24 14:14:31; author: gk5g; state: Exp; lines added/del: 20/5 Added two additional static void routines: Simulate{left,Right}Click. These routines are bound to the proctable entries captions-simulate-{left,right}-click. These proctable entries were previous bound to the method caption_SimulateClick. As well, the semantics of the proctable entry were dependent on the argument passed in. I removed that dependence. Source file: atkams/messages/lib/captions.c Current version: 2.32 revision 2.32 date: 90/10/15 15:05:56; author: gk5g; state: Exp; lines added/del: 4/4 Dealt with cpp "Too many defines" error by removing unnecessary header files and by moving some foldertree functionality out of messages.c and into fldtreev.c where it belongs. There was some code in messages.c that access the lpair of the foldertreev and set the lower view size to zero (i.e. - the 'Description and Button' views were given no screen space). This is now accomplished in foldertreev_FullUpdate(). ---------------------------- revision 2.31 date: 90/09/19 18:01:50; author: gk5g; state: Exp; lines added/del: 5/3 If the code passed into captions_SendMessage() isn't AMS_REPLY_FRESH, then we call sendmessage_SetCurrentState(SM_STATE_INPROGRESS). This addresses bug # 1240. Source file: atkams/messages/lib/messages.c Current version: 2.36 revision 2.36 date: 90/10/15 15:08:52; author: gk5g; state: Exp; lines added/del: 3/10 Dealt with cpp "Too many defines" error by removing unnecessary header files and by moving some foldertree functionality out of messages.c and into fldtreev.c where it belongs. There was some code in messages.c that access the lpair of the foldertreev and set the lower view size to zero (i.e. - the 'Description and Button' views were given no screen space). This is now accomplished in foldertreev_FullUpdate(). ---------------------------- revision 2.35 date: 90/09/21 13:54:17; author: gk5g; state: Exp; lines added/del: 5/5 Changed the prompt built in GetFolderName to tell how many marked messages there currently are. GetFolderName is called when the user chooses to file the set of marked messages into a folder. This solves bug#1204. Source file: atkams/messages/lib/sendaux.c Current version: 1.24 revision 1.24 date: 90/10/29 13:43:52; author: gk5g; state: Exp; lines added/del: 4/3 Added bind entry sendmessage-add-header to the smheadbindings. There is a similar entry in the smbindings but that one has a NULL keybinding because in the sendmessage body view control-o opens a newline. ---------------------------- revision 1.23 date: 90/10/24 14:10:17; author: gk5g; state: Exp; lines added/del: 4/4 Added new ams{,n,s} method CheckAMSUseridPlusWorks() for use in sendaux.c. ---------------------------- revision 1.22 date: 90/10/23 15:23:59; author: gk5g; state: Exp; lines added/del: 10/6 Patch to allow a new AndrewSetup/AMS-Server configuration option: AMS_UseridPlusWorks: yes whereby an administration can declare that mail to ThisDomain (via AndrewSetup) or CELLNAME ( via /afs/CELLNAME/service/configuration/AMS-Server ) supports the userid+ and userid+tag conventions for local mail addresses. ---------------------------- revision 1.21 date: 90/09/21 16:36:23; author: gk5g; state: Exp; lines added/del: 6/4 In UserWantsAHeader(), if the focus is not in the headers section we now put it there. Previously it just caused a new, empty line in the message body section (textview_OpenLineCmd(self->BodyTextview)). This addresses bug#1194. Source file: atkams/messages/lib/sendmsg.c Current version: 2.33 revision 2.33 date: 90/09/19 18:03:45; author: gk5g; state: Exp; lines added/del: 3/12 Moved the SM_STATE_x codes from sendmsg.c to sendmsg.ch so other modules could set the state of a sendmessage window. Source file: atkams/messages/lib/sendmsg.ch Current version: 2.11 revision 2.11 date: 90/09/19 18:04:40; author: gk5g; state: Exp; lines added/del: 12/3 Moved the SM_STATE_x codes from sendmsg.c to sendmsg.ch so other modules could set the state of a sendmessage window. Source file: atkams/messages/lib/fldtreev.c Current version: 1.2 revision 1.2 date: 90/10/15 15:09:16; author: gk5g; state: Exp; lines added/del: 17/0 Dealt with cpp "Too many defines" error by removing unnecessary header files and by moving some foldertree functionality out of messages.c and into fldtreev.c where it belongs. There was some code in messages.c that access the lpair of the foldertreev and set the lower view size to zero (i.e. - the 'Description and Button' views were given no screen space). This is now accomplished in foldertreev_FullUpdate(). Source file: atkams/messages/lib/fldtreev.ch Current version: 1.2 revision 1.2 date: 90/10/15 15:09:23; author: gk5g; state: Exp; lines added/del: 1/0 Dealt with cpp "Too many defines" error by removing unnecessary header files and by moving some foldertree functionality out of messages.c and into fldtreev.c where it belongs. There was some code in messages.c that access the lpair of the foldertreev and set the lower view size to zero (i.e. - the 'Description and Button' views were given no screen space). This is now accomplished in foldertreev_FullUpdate(). Source file: contrib/Imakefile Current version: 1.5 revision 1.5 date: 90/10/02 18:39:06; author: gk5g; state: Exp; lines added/del: 6/1 Only build eatmail if AMS_ENV is defined. Source file: contrib/hyplink/Developr.pro revision 1.2 date: 90/12/03 11:23:39; author: mcinerny; state: Exp; lines added/del: 21/21 update to reflect new features. Source file: contrib/hyplink/Imakefile revision 1.11 date: 90/12/06 16:21:06; author: mcinerny; state: Exp; lines added/del: 2/0 link against libutil.a Source file: contrib/hyplink/Procs.pro revision 1.2 date: 90/12/03 11:23:54; author: mcinerny; state: Exp; lines added/del: 5/27 update to reflect new features. Source file: contrib/hyplink/link.c revision 1.9 date: 90/12/03 11:06:33; author: mcinerny; state: Exp; lines added/del: 139/70 Iron out datastream mess. There's a #define in pshbttn.ch, called PL8. This will cause the software to compile in such a was as to allow it to read the new datastream, but it won't write one (unless it read one in the first place). The color interface has been disabled. The proctable remains, but calling it will cause the new datastream to be used (which will screw up the link inset, BTW). Once this code becomes "widely available", turn off the PL8 switch, and recompile to get the new behavior and datastreams. ---------------------------- revision 1.8 date: 90/11/28 12:31:20; author: mcinerny; state: Exp; lines added/del: 1/1 changes "startup" text. Source file: contrib/hyplink/link.ch revision 1.3 date: 90/12/03 11:09:12; author: mcinerny; state: Exp; lines added/del: 3/3 Iron out datastream mess. There's a #define in pshbttn.ch, called PL8. This will cause the software to compile in such a was as to allow it to read the new datastream, but it won't write one (unless it read one in the first place). The color interface has been disabled. The proctable remains, but calling it will cause the new datastream to be used (which will screw up the link inset, BTW). Once this code becomes "widely available", turn off the PL8 switch, and recompile to get the new behavior and datastreams. Source file: contrib/hyplink/linkins.pro revision 1.2 date: 90/12/03 11:27:07; author: mcinerny; state: Exp; lines added/del: 11/12 More changes--reflect subclass-ness of link to pushbutton. Source file: contrib/hyplink/linkv.c revision 1.14 date: 90/12/03 11:09:16; author: mcinerny; state: Exp; lines added/del: 45/39 Iron out datastream mess. There's a #define in pshbttn.ch, called PL8. This will cause the software to compile in such a was as to allow it to read the new datastream, but it won't write one (unless it read one in the first place). The color interface has been disabled. The proctable remains, but calling it will cause the new datastream to be used (which will screw up the link inset, BTW). Once this code becomes "widely available", turn off the PL8 switch, and recompile to get the new behavior and datastreams. ---------------------------- revision 1.13 date: 90/11/28 14:58:11; author: susan; state: Exp; lines added/del: 1/1 moved andrewos.h to be first include file. ---------------------------- revision 1.12 date: 90/11/28 10:32:15; author: mcinerny; state: Exp; lines added/del: 1/2 Put the focus fix in a better place (and keep the compiler happy). ---------------------------- revision 1.11 date: 90/11/28 10:23:32; author: mcinerny; state: Exp; lines added/del: 1/0 give focus to target view of the new frame, not the frame itself. ---------------------------- revision 1.10 date: 90/09/12 14:19:34; author: gk5g; state: Exp; lines added/del: 10/3 Added code to handle NULL return value from im_Create and frame_New. Source file: contrib/hyplink/pshbttn.c revision 1.8 date: 90/12/03 11:09:24; author: mcinerny; state: Exp; lines added/del: 67/19 Iron out datastream mess. There's a #define in pshbttn.ch, called PL8. This will cause the software to compile in such a was as to allow it to read the new datastream, but it won't write one (unless it read one in the first place). The color interface has been disabled. The proctable remains, but calling it will cause the new datastream to be used (which will screw up the link inset, BTW). Once this code becomes "widely available", turn off the PL8 switch, and recompile to get the new behavior and datastreams. ---------------------------- revision 1.7 date: 90/11/30 10:46:47; author: mcinerny; state: Exp; lines added/del: 233/8 Added a user interface to setting the label, look, font, and color. Required changes to datastream too, hence new DS version "2". Also supports true "gray"scale on displays capable of it, for three-d style. rounded rect style works better, but I'd still stay away from it, as it still freaks out X occaisionally (wanna see X grow to 10 megs?) Source file: contrib/hyplink/pshbttn.ch revision 1.8 date: 90/12/03 11:09:31; author: mcinerny; state: Exp; lines added/del: 33/0 Iron out datastream mess. There's a #define in pshbttn.ch, called PL8. This will cause the software to compile in such a was as to allow it to read the new datastream, but it won't write one (unless it read one in the first place). The color interface has been disabled. The proctable remains, but calling it will cause the new datastream to be used (which will screw up the link inset, BTW). Once this code becomes "widely available", turn off the PL8 switch, and recompile to get the new behavior and datastreams. ---------------------------- revision 1.7 date: 90/11/30 10:48:51; author: mcinerny; state: Exp; lines added/del: 26/19 Added a user interface to setting the label, look, font, and color. Required changes to datastream too, hence new DS version "2". Also supports true "gray"scale on displays capable of it, for three-d style. rounded rect style works better, but I'd still stay away from it, as it still freaks out X occaisionally (wanna see X grow to 10 megs?) ---------------------------- revision 1.6 date: 90/11/28 10:22:53; author: mcinerny; state: Exp; lines added/del: 15/0 document styles Source file: contrib/hyplink/pshbttn.help revision 1.2 date: 90/12/03 11:17:46; author: mcinerny; state: Exp; lines added/del: 23/6 Talk about new features. Note that color is documented, even though it won't be available with patch level 8. Source file: contrib/hyplink/pshbttnv.c revision 1.14 date: 90/12/20 17:05:07; author: mcinerny; state: Exp; lines added/del: 17/14 Fix a fatal bug tickled by wpedit (check for valid im before doing color calls). revision 1.13 date: 90/12/03 11:09:36; author: mcinerny; state: Exp; lines added/del: 17/10 Iron out datastream mess. There's a #define in pshbttn.ch, called PL8. This will cause the software to compile in such a was as to allow it to read the new datastream, but it won't write one (unless it read one in the first place). The color interface has been disabled. The proctable remains, but calling it will cause the new datastream to be used (which will screw up the link inset, BTW). Once this code becomes "widely available", turn off the PL8 switch, and recompile to get the new behavior and datastreams. ---------------------------- revision 1.12 date: 90/11/30 10:49:36; author: mcinerny; state: Exp; lines added/del: 294/28 Added a user interface to setting the label, look, font, and color. Required changes to datastream too, hence new DS version "2". Also supports true "gray"scale on displays capable of it, for three-d style. rounded rect style works better, but I'd still stay away from it, as it still freaks out X occaisionally (wanna see X grow to 10 megs?) Source file: contrib/hyplink/pshbttnv.ch revision 1.6 date: 90/11/30 10:49:43; author: mcinerny; state: Exp; lines added/del: 18/13 Added a user interface to setting the label, look, font, and color. Required changes to datastream too, hence new DS version "2". Also supports true "gray"scale on displays capable of it, for three-d style. rounded rect style works better, but I'd still stay away from it, as it still freaks out X occaisionally (wanna see X grow to 10 megs?) ---------------------------- revision 1.5 date: 90/11/28 10:23:10; author: mcinerny; state: Exp; lines added/del: 7/0 document trigger Source file: contrib/m3text/m3textv.c Current version: 1.6 revision 1.6 date: 90/09/12 14:35:16; author: gk5g; state: Exp; lines added/del: 3/2 If frame_New returns NULL, then destroy the newIM. ---------------------------- revision 1.5 date: 90/09/12 14:30:13; author: gk5g; state: Exp; lines added/del: 12/5 Added code to handle NULL return value from im_Create and frame_New. Source file: contrib/rmtext/rmtextv.c Current version: 1.6 revision 1.6 date: 90/09/12 14:42:56; author: gk5g; state: Exp; lines added/del: 14/6 Added code to handle NULL return value from im_Create and frame_New. Source file: contrib/tm/tm.c Current version: 2.21 revision 2.23 date: 90/12/07 13:43:24; author: gk5g; state: Exp; lines added/del: 5/5 Changed definition of macro ENTER_TIOCREMOTE for RS/6000. ---------------------------- revision 2.22 date: 90/12/06 14:22:41; author: gk5g; state: Exp; lines added/del: 3/5 Backed out last change that surrounded the call to ENTER_TIOCREMOTE() in termulator_StartProcess with #ifdef INCORRECTSIGNALS. We want the psuedo-terminal to be in TIOCREMOTE mode so the parent tm process and the child shell can read/write pre-alligned record boundaries. The fix that this backs out was for the RS/6000. It was a mal-formed attempt at a fix. AIX ptys & process groups are hard to get right but I'm still working on it. date: 90/09/20 13:26:12; author: gk5g; state: Exp; lines added/del: 13/4 In readDir, deal with non-printable characters in the passed bug by printing out buf and returning. Added some casts to (unsigned char). Source file: contrib/tm/tm.ch Current version: 2.6 Source file: contrib/tm/tma.c Current version: 2.6 revision 2.6 date: 90/09/12 14:53:50; author: gk5g; state: Exp; lines added/del: 9/5 Added code to handle NULL return value from im_Create and frame_New. Source file: contrib/wpedit/Imakefile Current version: 1.10 revision 1.10 date: 90/10/30 19:08:49; author: gk5g; state: Exp; lines added/del: 8/1 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: contrib/wpedit/wpedita.c Current version: 1.19 revision 1.19 date: 90/09/12 15:03:40; author: gk5g; state: Exp; lines added/del: 9/2 Added some error messages that report a failure to 1) allocate enough memory, 2) create a new window. Source file: install/install.c Current version: 1.5 revision 1.5 date: 90/10/18 17:15:35; author: gk5g; state: Exp; lines added/del: 18/2 Attempted fix for pmax_3. Macros N_TXTOFF and N_BADMAG are incompatible with standard a.out format. Source file: overhead/Imakefile Current version: 2.24 revision 2.24 date: 90/11/01 15:36:09; author: gk5g; state: Exp; lines added/del: 2/2 Changed NO_FONTS to NO_FONTS_ENV. ---------------------------- revision 2.23 date: 90/11/01 15:16:26; author: gk5g; state: Exp; lines added/del: 4/0 Conditionalized the building of the fonts directory based on whether or not the build variable NO_FONTS is defined. This satisfies bug #1396: Sometimes (and more often than you might think -- e.g. in an environment with a mainframe compute server & x terminals) people build X11 without a server. That is, they build only the client libraries and applications. On such machines, it makes sense to compile Andrew, as an application library. However, it does not necessarily make sense to compile Andrew fonts on such a server. Whenever I compile on one such server here at Bellcore, for example, I have to finish the build by hand because the font build never works (due to the absence of xmkfontd). Source file: overhead/class/cmd/doindex.c Current version: 1.15 revision 1.15 date: 90/11/05 15:19:23; author: ajp; state: Exp; lines added/del: 8/0 Fix to put in keyname into classheader field used when loading a file. This allows for the loading of multiple addressable classes in a single .do file ---------------------------- revision 1.14 date: 90/09/21 12:37:39; author: gk5g; state: Exp; lines added/del: 25/0 Patch submitted by Bill Cattey: doindex locking code fails on PS/2 over NFS It seems that the osi_ExclusiveLockNoBlock defined as lockf((fid, F_TLOCK, 0) will always fail over NFS on PS/2 AIX 1.2. This means that the newer, smarter, doindex will hang forever any time an attempt is made to do an index over NFS. What I have done, is to take the old locking code from CMU rev 1.9of doindex.c, and put it into the UpdateAll routine. The old locking code replaces the new locking code if sys_ps_aix12 or sys_ps_aix11 are defined. Source file: overhead/class/machdep/aix_i386/Imakefile Current version: 1.7 revision 1.7 date: 90/11/05 13:58:25; author: gk5g; state: Exp; lines added/del: 6/5 Changed references to /lib/librts.a to /usr/lib/librts.a. Patch submmited by Bill Cattey: Following the example from aix_rt, I have modified the construction of globalrefs._h to get rid of the nasty symbols generated by the C compiler that were screwing up the use of andrew malloc. (It was easy, whereas rt_aix does grep -v __X, we grep -v _%.) I am sure this will enable linking in of Andrew malloc, and it might cause dynamic objects to be smaller. (I think the whole problem was that lots of stuff from libc was always getting linked in due to these global symbols.) ---------------------------- revision 1.6 date: 90/10/25 15:02:28; author: gk5g; state: Exp; lines added/del: 1/1 Made globalrefs._h a DependTarget. Source file: overhead/class/machdep/aix_i386/globals.spp Current version: 1.4 revision 1.4 date: 90/10/29 13:55:46; author: gk5g; state: Exp; lines added/del: 4/1 Patch submitted by Bill Cattey: This is the first of probably several patches you will receive from me to enable you to compile Andrew on the PS/2 with gcc. It is a good thing to compile with gcc since there may soon be gdb for it. This patch modifies globals.spp to be ANSI conformant. Source file: overhead/class/machdep/aix_rt/Imakefile Current version: 1.10 revision 1.10 date: 90/10/25 15:03:40; author: gk5g; state: Exp; lines added/del: 1/1 Made globalrefs._h a DependTarget. Source file: overhead/class/machdep/aos_rt/Imakefile Current version: 1.5 revision 1.5 date: 90/10/25 15:04:48; author: gk5g; state: Exp; lines added/del: 1/1 Made globalrefs._h a DependTarget. Source file: overhead/class/machdep/dec_mips/Imakefile Current version: 1.8 revision 1.8 date: 90/10/25 15:05:54; author: gk5g; state: Exp; lines added/del: 1/1 Made globalrefs._h a DependTarget. Source file: overhead/class/machdep/dec_mips/doload.c Current version: 1.14 revision 1.14 date: 90/11/16 16:37:20; author: rr2b; state: Exp; lines added/del: 0/2 took out extraneous printfs used in debugging. ---------------------------- revision 1.13 date: 90/10/29 13:06:06; author: gk5g; state: Exp; lines added/del: 41/8 Patch submitted by Rob Ryan: What needed to be changed is to arrange for all uninitialized (common) variables to be placed directly after the normal data areas so the debugger can know where to look for them. Previously there was no way for the debugger to deal with this case since doload.c just malloced up some space for each such variable. ---------------------------- revision 1.12 date: 90/09/24 12:47:34; author: gk5g; state: Exp; lines added/del: 14/104 Incorporated changes Zalman made around 5/90. Source file: overhead/class/machdep/dec_mips/doload.h Current version: 1.5 revision 1.5 date: 90/11/09 14:54:21; author: gk5g; state: Exp; lines added/del: 0/0 Added new element to doload_environment: unsigned long commonspace; Source file: overhead/class/machdep/dec_vax/Imakefile Current version: 1.5 revision 1.5 date: 90/10/25 15:06:46; author: gk5g; state: Exp; lines added/del: 1/1 Made globalrefs._h a DependTarget. Source file: overhead/class/machdep/hp_68k/Imakefile Current version: 1.6 revision 1.6 date: 90/10/25 15:07:34; author: gk5g; state: Exp; lines added/del: 1/1 Made globalrefs._h a DependTarget. Source file: overhead/class/machdep/sun_68k/Imakefile Current version: 1.7 revision 1.7 date: 90/10/25 15:09:42; author: gk5g; state: Exp; lines added/del: 1/1 Made globalrefs._h a DependTarget. Source file: overhead/class/machdep/sun_sparc/Imakefile Current version: 1.7 revision 1.7 date: 90/10/25 15:10:46; author: gk5g; state: Exp; lines added/del: 1/1 Made globalrefs._h a DependTarget. Source file: overhead/class/machdep/i386_mach/Imakefile Current version: 1.2 revision 1.2 date: 90/10/25 15:08:30; author: gk5g; state: Exp; lines added/del: 1/1 Made globalrefs._h a DependTarget. Source file: overhead/class/lib/class.c Current version: 2.31 revision 2.31 date: 90/11/05 16:14:30; author: ajp; state: Exp; lines added/del: 1/64 removed timing information ---------------------------- revision 2.30 date: 90/11/05 15:20:55; author: ajp; state: Exp; lines added/del: 73/2 Fix for putting in clasname into classheadre field when oading a .do file. This allows for the loading of multiple addressable classes in a single .do file ---------------------------- revision 2.29 date: 90/10/02 19:24:15; author: gk5g; state: Exp; lines added/del: 11/3 class_PrependClassPath() and class_ProcessClassPath() were both illegally comparing pointers to data that were not in the same array. When parsing the CLASSPATH environment string, a temporary character pointer was being decremented off of the beginning of the string. Then that invalid pointer was being compared to a pointer to the head of the string. That ain't legal. This only failed when optimized. Source file: overhead/class/pp/class.c Current version: 2.40 revision 2.40 date: 90/10/11 14:06:19; author: ajp; state: Exp; lines added/del: 593/97 Added code for class to generate prototypes for method calls use -p flag to get them Added code for generating class description files use -D to get them. Source file: overhead/class/pp/classpp.h Current version: 2.4 revision 2.4 date: 90/10/12 10:38:38; author: ajp; state: Exp; lines added/del: 8/1 Changes for prototypes and generation of description files Source file: overhead/fonts/fonts/programs/icn16x16.fdb Current version: 2.2 revision 2.2 date: 90/09/28 13:59:22; author: gk5g; state: Exp; lines added/del: 16/0 Added pencil. Source file: overhead/mail/hdrs/mail.h Current version: 2.18 revision 2.18 date: 90/10/23 15:14:06; author: gk5g; state: Exp; lines added/del: 1/0 Patch to allow a new AndrewSetup/AMS-Server configuration option: AMS_UseridPlusWorks: yes whereby an administration can declare that mail to ThisDomain (via AndrewSetup) or CELLNAME ( via /afs/CELLNAME/service/configuration/AMS-Server ) supports the userid+ and userid+tag conventions for local mail addresses. Source file: overhead/mail/hdrs/mailconf.h Current version: 2.27 revision 2.27 date: 90/10/23 15:07:02; author: gk5g; state: Exp; lines added/del: 3/0 Patch to allow a new AndrewSetup/AMS-Server configuration option: AMS_UseridPlusWorks: yes whereby an administration can declare that mail to ThisDomain (via AndrewSetup) or CELLNAME ( via /afs/CELLNAME/service/configuration/AMS-Server ) supports the userid+ and userid+tag conventions for local mail addresses. Source file: overhead/mail/lib/Imakefile Current version: 2.16 revision 2.16 date: 90/10/30 18:59:38; author: gk5g; state: Exp; lines added/del: 6/1 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: overhead/mail/lib/authret.c Current version: 2.10 revision 2.10 date: 90/10/23 15:16:21; author: gk5g; state: Exp; lines added/del: 6/6 Patch to allow a new AndrewSetup/AMS-Server configuration option: AMS_UseridPlusWorks: yes whereby an administration can declare that mail to ThisDomain (via AndrewSetup) or CELLNAME ( via /afs/CELLNAME/service/configuration/AMS-Server ) supports the userid+ and userid+tag conventions for local mail addresses. Source file: overhead/mail/lib/ckamsdel.c Current version: 2.19 revision 2.19 date: 90/10/24 12:44:53; author: gk5g; state: Exp; lines added/del: 30/7 This change allows folks to give AMS-Server file options as yes/no/true/false, as well as by giving numbers that are zero or non-zero. But in particular it provides a default value for the AMS_UseridPlusWorks option, which is that it doesn't work unless you're told it works. Before, it would assume that unless it was told, it didn't know. ---------------------------- revision 2.18 date: 90/10/23 15:12:06; author: gk5g; state: Exp; lines added/del: 42/11 Patch to allow a new AndrewSetup/AMS-Server configuration option: AMS_UseridPlusWorks: yes whereby an administration can declare that mail to ThisDomain (via AndrewSetup) or CELLNAME ( via /afs/CELLNAME/service/configuration/AMS-Server ) supports the userid+ and userid+tag conventions for local mail addresses. Source file: overhead/mail/lib/fwdvalid.c Current version: 1.12 revision 1.12 date: 90/10/23 15:17:45; author: gk5g; state: Exp; lines added/del: 29/29 Patch to allow a new AndrewSetup/AMS-Server configuration option: AMS_UseridPlusWorks: yes whereby an administration can declare that mail to ThisDomain (via AndrewSetup) or CELLNAME ( via /afs/CELLNAME/service/configuration/AMS-Server ) supports the userid+ and userid+tag conventions for local mail addresses. Source file: overhead/mail/lib/locname.c Current version: 2.15 revision 2.15 date: 90/10/23 15:15:14; author: gk5g; state: Exp; lines added/del: 3/2 Patch to allow a new AndrewSetup/AMS-Server configuration option: AMS_UseridPlusWorks: yes whereby an administration can declare that mail to ThisDomain (via AndrewSetup) or CELLNAME ( via /afs/CELLNAME/service/configuration/AMS-Server ) supports the userid+ and userid+tag conventions for local mail addresses. Source file: overhead/mail/lib/mailconf.c Current version: 2.46 revision 2.46 date: 90/10/23 15:09:59; author: gk5g; state: Exp; lines added/del: 8/0 Patch to allow a new AndrewSetup/AMS-Server configuration option: AMS_UseridPlusWorks: yes whereby an administration can declare that mail to ThisDomain (via AndrewSetup) or CELLNAME ( via /afs/CELLNAME/service/configuration/AMS-Server ) supports the userid+ and userid+tag conventions for local mail addresses. Source file: overhead/mail/lib/qmail.c Current version: 2.16 revision 2.16 date: 90/11/02 14:33:53; author: gk5g; state: Exp; lines added/del: 1/1 Moved inclusion of andrewos.h prior to sys/dir.h because on PS/2 machines we need the definition of _BSD from andrewos.h to get the right struct dirent from sys/dir.h. Source file: overhead/mail/lib/scan822.c Current version: 2.6 revision 2.6 date: 90/09/12 18:22:40; author: gk5g; state: Exp; lines added/del: 1/1 The routine Next822Phrase was testing for a NULL character instead of the character '\0'. Source file: overhead/mail/lib/stats.c Current version: 2.9 revision 2.9 date: 90/09/12 18:19:44; author: gk5g; state: Exp; lines added/del: 1/1 On failure, OpenSocket() was returning NULL instead of -1. Source file: overhead/malloc/Imakefile Current version: 2.8 revision 2.8 date: 90/10/03 19:34:04; author: wjh; state: Exp; lines added/del: 3/3 revised to properly report return addresses on the pmax Source file: overhead/malloc/malloc.ci Current version: 2.15 revision 2.15 date: 90/10/31 15:13:10; author: gk5g; state: Exp; lines added/del: 7/3 Added support for ANDREW_MALLOC_ENV on the RS/6000. ---------------------------- revision 2.14 date: 90/10/03 19:34:28; author: wjh; state: Exp; lines added/del: 25/24 revised to properly report return addresses on the pmax ---------------------------- revision 2.13 date: 90/09/28 15:08:59; author: wjh; state: Exp; lines added/del: 29/19 ensure that malloc returns zero if initial arena cannot be allocated ensure that mallocInProgress is reset if fail to allocate arena ---------------------------- revision 2.12 date: 90/09/25 18:54:22; author: gk5g; state: Exp; lines added/del: 4/4 Moved inclusion of andrewos.h to beginning of file. Source file: overhead/malloc/malloc.h Current version: 2.4 revision 2.4 date: 90/10/31 15:12:24; author: gk5g; state: Exp; lines added/del: 6/4 Added support for ANDREW_MALLOC_ENV on the RS/6000. Source file: overhead/malloc/getcallr.h Current version: 1.5 revision 1.5 date: 90/10/03 19:34:51; author: wjh; state: Exp; lines added/del: 17/4 revised to properly report return addresses on the pmax ---------------------------- revision 1.4 date: 90/09/30 09:51:31; author: wjh; state: Exp; lines added/del: 3/3 improved compilability on Sun4/SPARC. compliments of Guy Harris ---------------------------- revision 1.3 date: 90/09/29 11:29:17; author: wjh; state: Exp; lines added/del: 0/4 revert to previous version because the PMAX attempt failed ---------------------------- revision 1.2 date: 90/09/29 09:45:15; author: wjh; state: Exp; lines added/del: 7/3 fixed return address reporting for mips (and thus for pmax) Source file: overhead/malloc/getcallr.spp Current version: 1.3 revision 1.3 date: 90/10/03 19:34:49; author: wjh; state: Exp; lines added/del: 20/0 revised to properly report return addresses on the pmax Source file: overhead/snap2/pfio/pfio.h Current version: 1.9 revision 1.9 date: 90/09/13 16:52:31; author: gk5g; state: Exp; lines added/del: 6/2 If on a RIOS, #include else define macros like int16. Source file: overhead/snap2/guardian/cmd/Imakefile Current version: 2.38 revision 2.38 date: 90/10/30 19:01:22; author: gk5g; state: Exp; lines added/del: 8/2 Only use RESOLVLIB if RESOLVER_ENV is defined. ---------------------------- revision 2.37 date: 90/10/18 17:43:54; author: gk5g; state: Exp; lines added/del: 1/1 Include librauth.a only if AFS_ENV is defined and AFS30_ENV is not. Source file: overhead/snap2/guardian/cmd/guardian.c Current version: 2.88 revision 2.88 date: 90/10/18 17:41:27; author: gk5g; state: Exp; lines added/del: 28/2 Split up the routine log_death(). It had one very long line that caused syntax error on rs/6000. ---------------------------- revision 2.87 date: 90/09/12 17:45:55; author: gk5g; state: Exp; lines added/del: 3/1 Don't delcare malloc() for the RS/6k. Source file: overhead/snap2/guardian/hdrs/gasp.h Current version: 2.3 revision 2.3 date: 90/09/12 17:43:28; author: gk5g; state: Exp; lines added/del: 2/2 Changed the definition of the SERVER_PACKET typedef to be ANSI compatible. Each bitfield should be declared as unsigned, not unsigned int or unsigned long. ANSI only allows bitfields of type unsigned. Source file: overhead/snap2/loadserv/loadav.c Current version: 2.7 revision 2.7 date: 90/09/17 14:24:14; author: gk5g; state: Exp; lines added/del: 3/1 RS/6000 malloc. Source file: overhead/snap2/loadserv/loadserv.c Current version: 2.12 revision 2.12 date: 90/09/17 14:24:57; author: gk5g; state: Exp; lines added/del: 6/4 RS/6000 malloc. Source file: overhead/snap2/nametime/nametime.c Current version: 2.4 revision 2.4 date: 90/09/17 14:18:40; author: gk5g; state: Exp; lines added/del: 24/4 Added getservbyname() calls to replace hard-wired port settings for the name and time servers. Don't declare malloc if is RS/6000. Source file: overhead/snap2/nametime/nmtimeg.c Current version: 2.31 revision 2.31 date: 90/09/17 14:19:46; author: gk5g; state: Exp; lines added/del: 18/7 Added getservbyname() calls to replace hard-wired port settings for the name and time servers. Don't declare malloc if is RS/6000. Source file: overhead/snap2/pcserver/Imakefile Current version: 2.30 revision 2.30 date: 90/10/18 18:14:48; author: gk5g; state: Exp; lines added/del: 1/1 Only use librauth.a when AFS_ENV is defined while AFS30_ENV is not. Source file: overhead/snap2/snap2/snapclie.c Current version: 2.4 revision 2.4 date: 90/09/17 14:28:06; author: gk5g; state: Exp; lines added/del: 3/1 RS/6000 malloc. Source file: overhead/snap2/snap2t/snptclie.c Current version: 1.7 revision 1.7 date: 90/09/17 14:27:40; author: gk5g; state: Exp; lines added/del: 3/1 RS/6000 malloc. Source file: overhead/util/hdrs/btwp.h Current version: 2.7 revision 2.7 date: 90/11/06 16:23:03; author: mcinerny; state: Exp; lines added/del: 7/5 Added FAX ( office telefacsimile telephone number ) and HFX ( home telefacsimile telephone number ) fields. Source file: overhead/util/lib/tokunpak.c Current version: 2.19 revision 2.19 date: 90/10/12 14:44:49; author: gk5g; state: Exp; lines added/del: 4/4 tok_GetStr() will now be included when AFS_ENV or AMS_DELIVERY_ENV is defined. Previously it was only included when AMS_DELIVERY_ENV was defined. This was wrong because it is needed by a routine that is included when AFS_ENV is defined. In other words, this failed when AFS_ENV was defined by AMS_DELIVERY_ENV was not. See bug #1387. Source file: overhead/util/lib/WP.ovr Current version: 1.2 revision 1.2 date: 90/09/06 16:10:09; author: gk5g; state: Exp; lines added/del: 74/1 Expanded White Pages overview written by Craig Everhart. Source file: overhead/util/lib/btwp.c Current version: 2.11 revision 2.11 date: 90/11/06 16:24:04; author: mcinerny; state: Exp; lines added/del: 3/1 Added FAX ( office telefacsimile telephone number ) and HFX ( home telefacsimile telephone number ) fields. Source file: overhead/util/lib/prefs.help Current version: 1.9 revision 1.9 date: 90/11/05 15:04:27; author: gk5g; state: Exp; lines added/del: 17/3 Added description of new ez preference CheckpointGawdyNames. ---------------------------- revision 1.8 date: 90/10/12 15:05:28; author: gk5g; state: Exp; lines added/del: 3/10 Removed description of preference print.portrait. That preference is no supported anymore. See bug#1375. ---------------------------- revision 1.7 date: 90/09/25 16:56:35; author: gk5g; state: Exp; lines added/del: 28/3 Updated to include description of Environment-specific preferences. Fixed bug in description the machine-specific preferences. The sys-type dependent preferences were documented as being of this form: ?S=systype:preference The code looks for the special letter 'C' not 'S': ?C=systype:preference ---------------------------- revision 1.6 date: 90/09/18 19:36:12; author: gk5g; state: Exp; lines added/del: 3/8 Changed reference to preference option help.showoverview to showoverviews. Source file: overhead/util/lib/ulstrcmp.c Current version: 2.7 revision 2.7 date: 90/10/25 18:17:16; author: gk5g; state: Exp; lines added/del: 4/4 ULstrncmp() was returning the wrong value when the strings were not equal. It was returning (*s2 - *s1) when it should have been returning (*s1 - *s2). Source file: overhead/util/lib/wpbase.c Current version: 2.14 revision 2.14 date: 90/11/14 12:30:37; author: gk5g; state: Exp; lines added/del: 9/9 Patch submitted by Craig Everhart: This patch changes the routine cwp_ReInitialize() to be just a little more circumspect before doing a pioctl() call. That is, you're supposed to be able to link Andrew with AFS libraries and yet run it on a kernel that has no pioctl() syscall support, but this code wasn't testing the relevant flag before doing its pioctl() call. Source file: overhead/wputil/Imakefile Current version: 1.30 revision 1.30 date: 90/10/30 19:02:15; author: gk5g; state: Exp; lines added/del: 7/1 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: overhead/wputil/genaccts.c Current version: 5.13 revision 5.13 date: 90/10/23 15:19:09; author: gk5g; state: Exp; lines added/del: 3/1 Patch to allow a new AndrewSetup/AMS-Server configuration option: AMS_UseridPlusWorks: yes whereby an administration can declare that mail to ThisDomain (via AndrewSetup) or CELLNAME ( via /afs/CELLNAME/service/configuration/AMS-Server ) supports the userid+ and userid+tag conventions for local mail addresses. Source file: overhead/wputil/makeboth.c Current version: 5.29 revision 5.29 date: 90/11/06 16:24:10; author: mcinerny; state: Exp; lines added/del: 15/5 Added FAX ( office telefacsimile telephone number ) and HFX ( home telefacsimile telephone number ) fields. Source file: overhead/wpi/Imakefile Current version: 1.17 revision 1.17 date: 90/10/30 19:02:59; author: gk5g; state: Exp; lines added/del: 7/1 Only use RESOLVLIB if RESOLVER_ENV is defined. Source file: overhead/wpi/wpi.c Current version: 1.23 revision 1.23 date: 90/09/12 12:33:36; author: mcinerny; state: Exp; lines added/del: 10/9 More "don't feed printf and strcmp NULL" protection. Source file: overhead/wpi/wpilib.c Current version: 1.29 revision 1.29 date: 90/11/08 08:21:15; author: mcinerny; state: Exp; lines added/del: 1/0 Add missing support for HFX. ---------------------------- revision 1.28 date: 90/11/06 16:24:50; author: mcinerny; state: Exp; lines added/del: 3/1 Added FAX ( office telefacsimile telephone number ) and HFX ( home telefacsimile telephone number ) fields. ---------------------------- revision 1.27 date: 90/09/12 12:32:41; author: mcinerny; state: Exp; lines added/del: 16/13 Allow modification of demographics fields, again. To coordinate with "the people downstairs". Source file: site/Imakefile Current version: 1.1 revision 1.1 date: 90/09/28 15:05:35; author: gk5g; state: Exp; Initial revision Source file: site/README.ez Current version: 1.1 revision 1.1 date: 90/09/28 15:05:35; author: gk5g; state: Exp; Initial revision *** patchlevel.h Wed Sep 26 16:00:22 1990 --- patchlevel.h.NEW Tue Nov 20 14:04:38 1990 *************** *** 1 **** ! This is the Andrew component of the X.V11R4 distribution, patch level 7 --- 1 ---- ! This is the Andrew component of the X.V11R4 distribution, patch level 8 *** README Fri Dec 8 13:41:04 1989 --- README.NEW Tue Nov 20 14:04:44 1990 *************** *** 33,39 **** Mailing list: info-andrew@andrew.cmu.edu (info-andrew-request@andrew.cmu.edu for subscriptions) ! Newsgroup: comp.soft-sys.andrew 1 Installation Instructions for the Andrew Distribution --- 33,39 ---- Mailing list: info-andrew@andrew.cmu.edu (info-andrew-request@andrew.cmu.edu for subscriptions) ! Newsgroup: internet.info-andrew 1 Installation Instructions for the Andrew Distribution *************** *** 56,64 **** 1.1 Assumptions and Requirements The Andrew Distribution is portable to a number of system types. Andrew ! is able to run on RT AOS 3.4, RT AIX 2.2.1, Sun3 3.5, Vax Ultrix 3.0, ! Vax BSD, DEC MIPS, Apollo, HP, and Macintosh II MacMach. We run it on ! RT AOS 3.4 and Sun3 3.5. As shipped, the Andrew Toolkit distribution is about 55 megabytes of source that generates many megabytes of object files, libraries, fonts --- 56,64 ---- 1.1 Assumptions and Requirements The Andrew Distribution is portable to a number of system types. Andrew ! is able to run on RT AOS 3.4, RT AIX 2.2.1, RS/6000 AIX3.1, PS/2 AIX1.2, ! Sun3 3.5, Vax Ultrix 3.0, Vax BSD, DEC MIPS, Apollo, HP, and Macintosh ! II MacMach. We run it on RT AOS 3.4 and Sun3 3.5. As shipped, the Andrew Toolkit distribution is about 55 megabytes of source that generates many megabytes of object files, libraries, fonts *************** *** 87,93 **** a. What kind of machine and operating system are being used b. Location of various pieces of system software (including the X distribution) ! c. Location and configuration of services for installed Andrew system This information is conveyed to the build process through various configuration files. This section describes each of the major --- 87,93 ---- a. What kind of machine and operating system are being used b. Location of various pieces of system software (including the X distribution) ! c. Location and configuration of services for the installed Andrew system This information is conveyed to the build process through various configuration files. This section describes each of the major *************** *** 138,146 **** Macintosh II MacMach mac2_51 Apollo DomainOS apollo68k DEC MIPS Ultrix 3.0 pmax_3 ! IBM PS/2 Model 70 AIX 1.1 ps_aix11 - 1.2.1 The allsys.mcr, system.mcr, and site.mcr Files config/allsys.mcr, config//system.mcr, config/site.mcr -- The --- 138,147 ---- Macintosh II MacMach mac2_51 Apollo DomainOS apollo68k DEC MIPS Ultrix 3.0 pmax_3 ! IBM PS/2 M70/80 AIX 1.1 ps_aix11 ! IBM PS/2 M70/80 AIX 1.2 ps_aix12 ! IBM RS/6000 AIX3.1 rs_aix31 1.2.1 The allsys.mcr, system.mcr, and site.mcr Files config/allsys.mcr, config//system.mcr, config/site.mcr -- The *************** *** 227,233 **** RELEASE2_ENV, $(XSRCDIR)/fonts/compiler/fc] XSRCDIR [Default: empty string] ! These are miscellaneous X-related absolute paths. INCDIR needs to point to where your X include files are installed; it is used in the Andrew build process. XMKFONTDIR needs to point to the ``mkfontdir'' program from the X installation. XLIBDIR needs to --- 228,234 ---- RELEASE2_ENV, $(XSRCDIR)/fonts/compiler/fc] XSRCDIR [Default: empty string] ! These are miscellaneous X-related absolute paths. XINCDIR needs to point to where your X include files are installed; it is used in the Andrew build process. XMKFONTDIR needs to point to the ``mkfontdir'' program from the X installation. XLIBDIR needs to *************** *** 286,292 **** CC [Default: cc] ! C compiler to use. On IBM equipment, it is the hc Metaware compiler. On other systems, it is the pcc compiler. ConstructMFLAGS [Default: not defined] --- 287,293 ---- CC [Default: cc] ! C compiler to use. On the IBM RT/PC, it is the hc Metaware compiler. On other systems, it is the pcc compiler. ConstructMFLAGS [Default: not defined] *************** *** 418,424 **** System is to be built, regardless of whether it is expected to be used locally. Also see RUN_AMDS_ENV in a following section. ! WHITEPAGES_ENV [Defined: not defined] WHITEPAGES_ENV is defined if the white pages facility (including phonetic name lookup) is to be built and used by the Andrew --- 419,425 ---- System is to be built, regardless of whether it is expected to be used locally. Also see RUN_AMDS_ENV in a following section. ! WHITEPAGES_ENV [Default: not defined] WHITEPAGES_ENV is defined if the white pages facility (including phonetic name lookup) is to be built and used by the Andrew *************** *** 439,444 **** --- 440,453 ---- X11_ENV is defined if the Andrew Toolkit is to be built for the X.11 Window System. + PRE_X11R4_ENV [Default: not defined] + + PRE_X11R4 should be defined if you will be linking against X11 + header files and libraries that come from versions of X11 prior + to the fourth release (X11R4). This information is needed + because release 4 defines some new variable types and makes use + of ANSI C function prototypes. + ANDREW_MALLOC_ENV [Default: defined] ANDREW_MALLOC_ENV, if defined, causes the Andrew Toolkit memory *************** *** 597,607 **** RESOLVER_ENV [Default: defined] ! RESOLVER_ENV is defined is the Internet Domain Name Resolver is ! to be used by the Andrew Message Delivery System. See also the ! discussion for the symbol RESOLVLIB in the section describing ! the *.mcr files, because if RESOLVER_ENV is defined, RESOLVLIB ! will be used as the path to the resolver library routines. DITROFF_ENV [Default: defined] --- 606,616 ---- RESOLVER_ENV [Default: defined] ! RESOLVER_ENV is defined if the Internet Domain Name Resolver is ! to be used. See also the discussion for the symbol RESOLVLIB in ! the section describing the *.mcr files, because if RESOLVER_ENV ! is defined, RESOLVLIB will be used as the path to the resolver ! library routines. DITROFF_ENV [Default: defined] *************** *** 757,772 **** libc_G0.a instead of libc.a). On other systems, one must compile these libraries from source. ! Once the appropriate libraries are collected, they must be made lnown to the build process. At present, this is done in a somewhat ad-hoc ! fashion. There is a make macro MIPSLIBC_G0 which should be set in ! config/site.h to the path of one's -G 0 libc.a . This macro is used in ! overhead/class/machdep/dec_mips/Imakefile . The rest of the libraries ! must be placed in a directory that will be searched by the makedo shell ! script. By default, this directory is $(BASEDIR)/lib/mips_G0/ . This ! can be changed by editing the path following the -L on the following ! line in overhead/class/machdep/dec_mips/makedo.csh: ld -L${libdir}/mips_G0 -r -o ${outfile:r}.dog $filelist ${libdir}/libcx.a | egrep "ld:" --- 766,786 ---- libc_G0.a instead of libc.a). On other systems, one must compile these libraries from source. ! Once the appropriate libraries are collected, they must be made known to the build process. At present, this is done in a somewhat ad-hoc ! fashion. There is a make variable MIPSLIBC_G0 which should be set in ! config/site.mcr to the path of one's -G 0 libc.a, sans the trailing ! ".a". For example: + MIPSLIBC_G0 = /usr/andrew/lib/mips_G0/libc + + This macro is used in overhead/class/machdep/dec_mips/Imakefile . The + rest of the libraries must be placed in a directory that will be + searched by the makedo shell script. By default, this directory is + $(BASEDIR)/lib/mips_G0/ . This can be changed by editing the path + following the -L on the following line in + overhead/class/machdep/dec_mips/makedo.csh: + ld -L${libdir}/mips_G0 -r -o ${outfile:r}.dog $filelist ${libdir}/libcx.a | egrep "ld:" *************** *** 783,788 **** --- 797,812 ---- magic that sometimes works. This method is unreliable at best, the real solution is for Sun to fix the shell. + There have also been reports of various version of the Sun C compiler + dumping core when optimization is used. You may find it necessary to + set the CDEBUGFLAGS=-g in the Imakefile for the directory in which the + build fails. Then Rebuild the Makefile for that directory and recompile + it from scratch. + + 1.2.8 Notes on Installation on a IBM RS/6000 + + To build on this platform you must compile and use the version of imake + in /usr/lpp/X11/Xamples/util/imake. 2 Building the System We assume you have a C preprocessor or static preprocessor similar to *************** *** 839,847 **** problem and then do a "make dependInstall" from the root of the Andrew tree. ! A faster approach is to continue the make manually. For example, assume ! the make died in atk/eq. After correcting the problem, you could move ! into the atk directory and do a make dependInstall SUBDIRS="glist rofftext help ..." --- 863,871 ---- problem and then do a "make dependInstall" from the root of the Andrew tree. ! A faster approach is to continue the build process manually. For ! example, assume the make died in atk/eq. After correcting the problem, ! you could move into the atk directory and do a make dependInstall SUBDIRS="glist rofftext help ..." *************** *** 849,855 **** looking at atk/Imakefile. When the build for atk completes, examine the Imakefile for the top level and observe that the remaining SUBDIRS that need to be built are: ams atkams helpindex helpaliases xmkfontd. So ! change directory to the root of the object tree and do make dependInstall SUBDIRS="ams atkams helpindex helpaliases xmkfontd" --- 873,879 ---- looking at atk/Imakefile. When the build for atk completes, examine the Imakefile for the top level and observe that the remaining SUBDIRS that need to be built are: ams atkams helpindex helpaliases xmkfontd. So ! change directory to the root of the object tree and execute make dependInstall SUBDIRS="ams atkams helpindex helpaliases xmkfontd" *************** *** 962,970 **** function. Ispell is widely available (e.g. via anonymous FTP off of uunet.uu.net). All an installer has to do to get ez spell checking to work is to install ispell somewhere along users' path. The following ! .be2init line will then be useful: addmenu "spell-check-document" "Search/Spell~1,Check Spelling~30" textview 2.2 System Components The major parts of the distribution consists of: underlying libraries --- 986,1046 ---- function. Ispell is widely available (e.g. via anonymous FTP off of uunet.uu.net). All an installer has to do to get ez spell checking to work is to install ispell somewhere along users' path. The following ! .atkinit line will then be useful: addmenu "spell-check-document" "Search/Spell~1,Check Spelling~30" textview + + Debugging the System: + + In order to debug ATK applications you will need to have gdb version 3.5 + or greater from the Free Software Foundation: + + Free Software Foundation, Inc. Telephone: (617) 876-3296 + 675 Massachusetts Avenue Electronic mail: gnu@prep.ai.mit.edu + Cambridge, MA 02139 USA + + To compile the system such that symbol tables exist add these two lines + to your site.mcr: + + CDEBUGFLAGS = -g + MAKEDOFLAGS = -g -d ${BASEDIR}/lib -b ${BASEDIR}/bin + + You can now run gdb on runapp: + + % gdb runapp + GDB, Copyright (C) 1987 Free Software Foundation, Inc. + There is ABSOLUTELY NO WARRANTY for GDB; type "info warranty" for details. + GDB is free software and you are welcome to distribute copies of it + under certain conditions; type "info copying" to see the conditions. + Reading symbol data from runapp... + done. + Type "help" for a list of commands. + (gdb) run -d ezapp /tmp/foo.ras -d + Starting program: runapp -d ezapp /tmp/foo.d -d + Starting ez (Version 7.0, ATK 15.0); please wait... + raster: text = 0x10046594 data = 0x10049280 entry = 0x100498a8 + rasterview: text = 0x1004f820 data = 0x1005cc60 entry = 0x1005f8d8 + rasterimage: text = 0x1006701c data = 0x100675d0 entry = 0x10067810 + pixelimage: text = 0x1006e758 data = 0x100703bc entry = 0x1007068c + + To load the symbol table for raster you would use this command on a Sun: + (gdb) add-file raster.dog 0x10046594 + + and on an RT: + (gdb) set-rel 0x10046594 + (gdb) add-file raster.dog + + and on a DECstation: + (gdb) symbol-file raster.dog + + Note that the addresses passed to these gdb commands come from the text + address that runapp outputs when the -d switch is used (the second -d + switch prevents runapp from forking itself). To determine which module + to load in the fashion described above compare the various text + addresses with the address at which the program failed. For example, if + the program died at address 0x1004a520 you would find that address + between what was reported for raster and rasterview. Thus, the failure + was somewhere in the raster module. 2.2 System Components The major parts of the distribution consists of: underlying libraries *************** *** 1028,1034 **** 4. Building Blocks - apt - basic components - org - an organizational chart editor ! - bush - a directory tree/file browser (built on org) - zip - an hierarchical drawing editor - chart - a chart/graph program (line graphs, pie charts, histograms etc.) --- 1104,1110 ---- 4. Building Blocks - apt - basic components - org - an organizational chart editor ! - bush - a directory tree/file browser - zip - an hierarchical drawing editor - chart - a chart/graph program (line graphs, pie charts, histograms etc.) *************** *** 1083,1089 **** - rmtext - another MODULA 2 text editing package - m3text - a MODULA 3 text editing package - hyplink - a hypertext-like link inset ! - tm - an alternative typescript 2.2.6 ODA Package --- 1159,1168 ---- - rmtext - another MODULA 2 text editing package - m3text - a MODULA 3 text editing package - hyplink - a hypertext-like link inset ! - tm - an alternative to typescript ! - eatmail - a program which transfers mail from ! /usr/spool/mail/{uid} into separate files in uid's Mailbox ! directory 2.2.6 ODA Package *************** *** 1246,1252 **** where appname is the name of the application (i.e. console, ez, etc.). If you want the Check Spelling menu in text to work, you will need the ! ispell program. Ispell is executed along a user's path. Before running AMS, you may want to review the options available with the AndrewSetup mechanism, described in the setup.help file --- 1325,1331 ---- where appname is the name of the application (i.e. console, ez, etc.). If you want the Check Spelling menu in text to work, you will need the ! ispell program. Ispell must be found along a user's path. Before running AMS, you may want to review the options available with the AndrewSetup mechanism, described in the setup.help file *** Imakefile Fri Aug 3 16:05:50 1990 --- Imakefile.NEW Mon Oct 29 10:46:07 1990 *************** *** 24,29 **** --- 24,33 ---- HELP = helpindex helpaliases #endif /* MK_HELP */ + #ifdef SITE_ENV + SITE = site + #endif /* SITE_ENV */ + DIRS = $(DESTDIR) \ $(DESTDIR)/bin \ $(DESTDIR)/config \ *************** *** 38,44 **** $(DESTDIR)/dlib \ $(DESTDIR)/examples ! SUBDIRS = overhead atk $(AMS) $(CONTRIB) $(ODA) $(MKFONTDIR) $(HELP) depend:: @echo 'Checking that BASEDIR is not the location of the source files.' --- 42,48 ---- $(DESTDIR)/dlib \ $(DESTDIR)/examples ! SUBDIRS = overhead atk $(AMS) $(CONTRIB) $(SITE) $(ODA) $(MKFONTDIR) $(HELP) depend:: @echo 'Checking that BASEDIR is not the location of the source files.' *************** *** 121,126 **** --- 125,133 ---- InstallFileToFile(config/allsys.mcr, $(INSTINCFLAGS), $(DESTDIR)/config/allsys.mcr) InstallFileToFile(config/site.mcr, $(INSTINCFLAGS), $(DESTDIR)/config/site.mcr) InstallFileToFile(config/andrew.rls, $(INSTINCFLAGS), $(DESTDIR)/config/andrew.rls) + #ifdef SITE_ENV + InstallFileToFile(config/site.rls, $(INSTINCFLAGS), $(DESTDIR)/config/site.rls) + #endif InstallFileToFile(config/depend.csh, $(INSTPROGFLAGS), $(DESTDIR)/config/depend.csh) InstallFileToFile(config/loginstall, $(INSTPROGFLAGS), $(DESTDIR)/config/loginstall) InstallFileToFile(config/COPYRITE, $(INSTINCFLAGS), $(DESTDIR)/config/COPYRITE) *** config/allsys.h Wed Sep 26 16:00:29 1990 --- config/allsys.h.NEW Wed Nov 7 11:21:03 1990 *************** *** 179,183 **** /* #define BUILDANDREWINSTALL_ENV 1 */ ! /* If you have an old version of Ultrix that doesn't handle disabling of ECHO for pty's then define OLD_ULTRIX */ ! /* #define OLD_ULTRIX */ --- 179,186 ---- /* #define BUILDANDREWINSTALL_ENV 1 */ ! /* If you have an old version of Ultrix that doesn't handle disabling of ECHO for pty's then define OLD_ULTRIX_ENV */ ! /* #define OLD_ULTRIX_ENV 1 */ ! ! /* Define this if you don't want to build the fonts */ ! /* #define NO_FONTS_ENV 1 */ *** config/andrew.rls Wed Sep 26 16:00:33 1990 --- config/andrew.rls.NEW Fri Oct 19 14:44:38 1990 *************** *** 68,80 **** --- 68,90 ---- $(CC) -c -I. $(LOCALINCLUDES) $(CFLAGS) $*.c @@\ $(RM) $*.c + #ifdef mips #define NormalAsmPPRule() @@\ .spp.o: @@\ -$(RM) $@ ,$*.s ,$*.c @@\ $(CP) $*.spp ,$*.c @@\ $(CC) -E -I. $(LOCALINCLUDES) $(CFLAGS) ,$*.c > ,$*.s @@\ + $(AS) -nocpp -o $*.o ,$*.s @@\ + $(RM) ,$*.c ,$*.s + #else + #define NormalAsmPPRule() @@\ + .spp.o: @@\ + -$(RM) $@ ,$*.s ,$*.c @@\ + $(CP) $*.spp ,$*.c @@\ + $(CC) -E -I. $(LOCALINCLUDES) $(CFLAGS) ,$*.c > ,$*.s @@\ $(AS) -o $*.o ,$*.s @@\ $(RM) ,$*.c ,$*.s + #endif /* mips */ #define NormalLexRule() @@\ .l.o: @@\ *************** *** 900,902 **** --- 910,916 ---- touch .depends; \ @@\ cat .depends >>Makefile; \ @@\ $(MAKE) $(MFLAGS) Makefiles + + #ifdef SITE_ENV + #include + #endif /* SITE_ENV */ *** config/site.rls Tue Nov 20 14:05:30 1990 --- config/site.rls.NEW Mon Oct 1 15:53:58 1990 *************** *** 0 **** --- 1,2 ---- + + /* Empty site.rls file. Use this file to hold all */ + + /* your site's additions to andrew.rls. */ *** config/apollo68k/system.mcr Mon Aug 6 10:57:24 1990 --- config/apollo68k/system.mcr.NEW Fri Sep 7 13:40:25 1990 *************** *** 18,25 **** /* Now for the system-dependent information. */ ! XSRCDIR = /afs/andrew/asa/src/mit/X.V11R3/ ! /* Get site-specific inclusions */ #include --- 18,24 ---- /* Now for the system-dependent information. */ ! /* None */ /* Get site-specific inclusions */ #include *** config/pmax_3/system.mcr Mon Aug 6 10:57:35 1990 --- config/pmax_3/system.mcr.NEW Fri Sep 7 13:40:38 1990 *************** *** 18,24 **** /* Now for the system-dependent information. */ ! XSRCDIR = /afs/andrew/asa/src/mit/X.V11R3/ /* MIPS' compiler seems to have the standard set of PCC bugs dealing with * void... * The -G 0 is to prevent dynamically loadable modules from having global --- 18,25 ---- /* Now for the system-dependent information. */ ! /* (currently none) */ ! /* MIPS' compiler seems to have the standard set of PCC bugs dealing with * void... * The -G 0 is to prevent dynamically loadable modules from having global *** config/ps_aix11/system.h Mon Aug 6 10:57:37 1990 --- config/ps_aix11/system.h.NEW Wed Nov 7 11:21:15 1990 *************** *** 80,87 **** #endif /* !In_Imake */ #undef RESOLVER_ENV - #undef ANDREW_MALLOC_ENV - #undef DEBUG_MALLOC_ENV #undef LEVEL_ENV #define LEVEL_ENV 1 --- 80,85 ---- *** config/ps_aix12/system.h Wed Sep 26 16:00:43 1990 --- config/ps_aix12/system.h.NEW Wed Nov 7 11:21:19 1990 *************** *** 21,30 **** #ifndef In_Imake - #ifndef _BSD - #define _BSD - #endif /* _BSD */ - /* Get major data types (esp. caddr_t) */ #include --- 21,26 ---- *************** *** 85,92 **** #endif /* !In_Imake */ #undef RESOLVER_ENV - #undef ANDREW_MALLOC_ENV - #undef DEBUG_MALLOC_ENV #undef LEVEL_ENV #define LEVEL_ENV 1 --- 81,86 ---- *** config/ps_aix12/system.mcr Mon Aug 6 10:57:42 1990 --- config/ps_aix12/system.mcr.NEW Wed Nov 7 11:21:21 1990 *************** *** 21,27 **** XSRCDIR = / INCLUDES = -I${BASEDIR}/include/atk -I${BASEDIR}/include -I${XBASEDIR}/usr/include ! CC = cc -DBSD_INCLUDES -DBSD_REMAP_SIGNAL_TO_SIGVEC #define ConstructMFLAGS 1 RANLIB = echo ranlib is not needed on this system --- 21,27 ---- XSRCDIR = / INCLUDES = -I${BASEDIR}/include/atk -I${BASEDIR}/include -I${XBASEDIR}/usr/include ! CC = cc -D_BSD #define ConstructMFLAGS 1 RANLIB = echo ranlib is not needed on this system *** config/sun2_35/system.mcr Mon Aug 6 10:57:54 1990 --- config/sun2_35/system.mcr.NEW Fri Sep 7 13:40:51 1990 *************** *** 18,25 **** /* Now for the system-dependent information. */ ! XUTILDIR = ${BASEDIR}/bin/X11 ! /* Get site-specific inclusions */ #include --- 18,24 ---- /* Now for the system-dependent information. */ ! /* (currently none) */ /* Get site-specific inclusions */ #include *** config/sun4_40/system.mcr Mon Aug 6 10:58:02 1990 --- config/sun4_40/system.mcr.NEW Fri Sep 7 13:41:01 1990 *************** *** 18,24 **** /* Now for the system-dependent information. */ - XUTILDIR = ${BASEDIR}/bin/X11 MALLOCALIGNMENT = 8 --- 18,23 ---- *** config/vax_22/system.mcr Mon Aug 6 10:58:04 1990 --- config/vax_22/system.mcr.NEW Fri Sep 7 13:41:07 1990 *************** *** 18,25 **** /* Now for the system-dependent information. */ ! XUTILDIR = ${BASEDIR}/bin/X11 ! /* Get site-specific inclusions */ #include --- 18,24 ---- /* Now for the system-dependent information. */ ! /* (currently none) */ /* Get site-specific inclusions */ #include *** xmkfontd/Imakefile Wed Nov 22 11:30:01 1989 --- xmkfontd/Imakefile.NEW Tue Nov 20 13:17:03 1990 *************** *** 13,20 **** install:: ${RM} ${DESTDIR}/X11fonts/fonts.alias ${XMKFONTDIR} $(DESTDIR)/X11fonts ./mkfntdir.csh ${DESTDIR}/X11fonts .snf ! #endif #endif /* SY_AIX221 */ --- 13,24 ---- install:: ${RM} ${DESTDIR}/X11fonts/fonts.alias ${XMKFONTDIR} $(DESTDIR)/X11fonts + #ifdef ISO80_FONTS_ENV + InstallFileToFile(non-andrew.fonts.alias, ${INSTLIBFLAGS}, ${DESTDIR}/X11fonts/fonts.alias) + #else /* ISO80_FONTS_ENV */ ./mkfntdir.csh ${DESTDIR}/X11fonts .snf ! #endif /* ISO80_FONTS_ENV */ ! #endif /* RELEASE2_ENV */ #endif /* SY_AIX221 */ *** ams/flames/flib.flm Mon Aug 6 10:58:13 1990 --- ams/flames/flib.flm.NEW Wed Nov 7 11:21:48 1990 *************** *** 241,251 **** (car refs))))) ((null refs) result)))) (defun extract-liberally-onestr (pattern str) (let* ((decomp (re-strdecompose+ (strcat pattern &END-OF-EXTRACT-PATTERN) str))) ! (cond (decomp (cons (car (cdr (car (cdr decomp)))) (extract-liberally-onestr pattern (car (cdr (cdr decomp)))))) --- 241,256 ---- (car refs))))) ((null refs) result)))) + (defun last-list-elt (l) + (cond ((null l) nil) + ((null (cdr l)) (car l)) + (t (last-list-elt (cdr l))))) + (defun extract-liberally-onestr (pattern str) (let* ((decomp (re-strdecompose+ (strcat pattern &END-OF-EXTRACT-PATTERN) str))) ! (cond (decomp (cons (last-list-elt (car (cdr decomp))) (extract-liberally-onestr pattern (car (cdr (cdr decomp)))))) *** ams/libs/ms/bldcapt.c Mon Aug 6 10:58:35 1990 --- ams/libs/ms/bldcapt.c.NEW Mon Nov 19 14:45:39 1990 *************** *** 3,9 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/bldcapt.c,v 2.15 90/06/05 14:34:04 gk5g Exp $ $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/bldcapt.c,v $ */ #include --- 3,9 ---- * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/bldcapt.c,v 2.18 90/11/19 14:38:32 gk5g Exp $ $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/bldcapt.c,v $ */ #include *************** *** 26,33 **** #define BIGFROM 24 /* c.f. prettyn.c */ #define BIGCAPTPASTDATE 65 ! extern int postmanvuid, myvuid; ! extern char *months[], *index(), MyMailDomain[]; #ifndef _IBMR2 extern char *malloc(); --- 26,33 ---- #define BIGFROM 24 /* c.f. prettyn.c */ #define BIGCAPTPASTDATE 65 ! extern int postmanvuid, myvuid, homeUsesAMSDelivery; ! extern char *months[], *index(), MyMailDomain[], *MyPrettyAddress; #ifndef _IBMR2 extern char *malloc(); *************** *** 110,121 **** InMyCell = (Msg->AuthCell && ULstrcmp(MyMailDomain, Msg->AuthCell) == 0); if (AuthenticReSentHeader(Msg)) { FindPrettiestName(Msg, FromBuf); ! } else if ((!(Msg->AuthUid <= 0 /* the BCC case */ ! || (Msg->AuthCell == NULL) ! #ifdef AFS_ENV ! || (Msg->AuthUid == ANONYMOUSID) || (Msg->AuthUid == ANYUSERID) ! #endif /* AFS_ENV */ ! || (Msg->AuthUid == postmanvuid))) && IsMyMail && Msg->AuthUid == myvuid && InMyCell) { int lim; UseArrows = TRUE; --- 110,116 ---- InMyCell = (Msg->AuthCell && ULstrcmp(MyMailDomain, Msg->AuthCell) == 0); if (AuthenticReSentHeader(Msg)) { FindPrettiestName(Msg, FromBuf); ! } else if (IsMyMail && ((homeUsesAMSDelivery<0 && !AMS_ViceIsRunning && SeemsToBeFromMe(Msg)) || ReallyIsFromMe(Msg, InMyCell))) { int lim; UseArrows = TRUE; *************** *** 230,234 **** --- 225,261 ---- strcpy(AMS_CAPTION(Msg->Snapshot), Buf); } debug(16, ("Caption field is %s\n", AMS_CAPTION(Msg->Snapshot))); + return(0); + } + + SeemsToBeFromMe(Msg) + struct MS_Message *Msg; + { + if (Msg->ParsedStuff->HeadBody[HP_FROM] + && !strncmp(Msg->ParsedStuff->HeadBody[HP_FROM], MyPrettyAddress, Msg->ParsedStuff->HeadBodyLen[HP_FROM])) { + return(1); + } + if (!Msg->ParsedStuff->HeadBody[HP_FROM] + && !Msg->ParsedStuff->HeadBody[HP_SENDER] + && !Msg->ParsedStuff->HeadBody[HP_RESENTFROM] + && !Msg->ParsedStuff->HeadBody[HP_RETURNPATH] + && !Msg->ReplyTo + && (Msg->AuthUid <= 0)) { + return(1); + } + return(0); + } + + ReallyIsFromMe(Msg, InMyCell) + struct MS_Message *Msg; + { + if ((!(Msg->AuthUid <= 0 /* the BCC case */ + || (Msg->AuthCell == NULL) + #ifdef AFS_ENV + || (Msg->AuthUid == ANONYMOUSID) || (Msg->AuthUid == ANYUSERID) + #endif /* AFS_ENV */ + || (Msg->AuthUid == postmanvuid))) && Msg->AuthUid == myvuid && InMyCell) { + return(1); + } return(0); } *** ams/libs/ms/epoch.c Mon Aug 6 10:58:44 1990 --- ams/libs/ms/epoch.c.NEW Thu Nov 15 13:07:53 1990 *************** *** 3,9 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/epoch.c,v 2.27 90/06/05 14:34:51 gk5g Exp $ $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/epoch.c,v $ */ #include --- 3,9 ---- * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/epoch.c,v 2.30 90/11/15 13:06:58 susan Exp $ $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/epoch.c,v $ */ #include *************** *** 10,15 **** --- 10,19 ---- #include #include #include + #include + #ifdef AFS_ENV + #include + #endif /* AFS_ENV */ #ifndef _IBMR2 extern char *malloc(); *************** *** 25,30 **** --- 29,49 ---- int val; {/* Return TRUE iff the AMS_ERRNO value ``val'' seems like a retry-able failure. */ if (tfail(val)) return TRUE; + /* add this case for persistent AFS errors */ + if (val == ENOENT) { + #ifdef AFS_ENV + if (ViceIsRunning()) { + struct ViceIoctl blob; + blob.in = NULL; + blob.in_size = 0; + blob.out = NULL; + blob.out_size = 0; + (void) pioctl(ViceFile, VIOCCKBACK, &blob, 1); /* fs checkbackups */ + (void) pioctl(ViceFile, VIOCCKSERV, &blob, 1); /* fs checkservers */ + } + #endif /* AFS_ENV */ + return TRUE; + } switch (val) { case EWOULDBLOCK: case EMSVICE: case EMSBOGUS: case EMSRECONFAILED: case EMSYOUNGLOCK: *** ams/libs/ms/hdlnew.c Mon Aug 6 10:58:53 1990 --- ams/libs/ms/hdlnew.c.NEW Wed Nov 7 11:22:25 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/hdlnew.c,v 2.53 90/06/12 15:23:26 bobg Exp $ */ /* $ACIS: $ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/hdlnew.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/hdlnew.c,v 2.53 90/06/12 15:23:26 bobg Exp $ "; #endif /* lint */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/hdlnew.c,v 2.54 90/11/01 16:50:08 gk5g Exp $ */ /* $ACIS: $ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/hdlnew.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/hdlnew.c,v 2.54 90/11/01 16:50:08 gk5g Exp $ "; #endif /* lint */ *************** *** 51,59 **** static char *currentMessageFile = NULL; extern char home[], MyMailDomain[], Me[]; ! extern int homeUsesAMSDelivery; ! extern char *malloc(), *rindex(), *index(), *getenv(), *sys_errlist[]; /* No longer takes the second (location string) * argument */ --- 51,63 ---- static char *currentMessageFile = NULL; extern char home[], MyMailDomain[], Me[]; ! extern int homeUsesAMSDelivery, homeUsesUseridPlus; ! extern char *rindex(), *index(), *getenv(), *sys_errlist[]; + #ifndef _IBMR2 + extern char *malloc(); + #endif /* _IBMR2 */ + /* No longer takes the second (location string) * argument */ *************** *** 1319,1325 **** } else if (!strcmp(parm, "maildomain")) { PrepareReturnString(st, MyMailDomain, strlen(MyMailDomain), resbuf); } else if (!strcmp(parm, "uidsuffix")) { ! if (homeUsesAMSDelivery > 0) { PrepareReturnString(st, "+", 1, resbuf); } else { PrepareReturnString(st, "", 0, resbuf); --- 1323,1329 ---- } else if (!strcmp(parm, "maildomain")) { PrepareReturnString(st, MyMailDomain, strlen(MyMailDomain), resbuf); } else if (!strcmp(parm, "uidsuffix")) { ! if (homeUsesAMSDelivery > 0 || homeUsesUseridPlus) { PrepareReturnString(st, "+", 1, resbuf); } else { PrepareReturnString(st, "", 0, resbuf); *** ams/libs/ms/init.c Wed Sep 26 16:01:04 1990 --- ams/libs/ms/init.c.NEW Mon Oct 29 10:47:15 1990 *************** *** 3,10 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/init.c,v 2.39 90/09/21 12:24:45 gk5g Exp $ ! $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/init.c,v $ */ #include #include --- 3,10 ---- * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/init.c,v 2.40 90/10/23 15:20:31 gk5g Exp $ ! $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/init.c,v $ */ #include #include *************** *** 89,94 **** --- 89,95 ---- char MeInFull[250] = "", *MyPrettyAddress = NULL, *MyShortAddress = NULL; char MyMailDomain[125] = ""; int homeUsesAMSDelivery = 0; /* Whether my home auth uses AMS delivery */ + int homeUsesUseridPlus = 0; int MS_DeliveryType = -1; /* -1 not yet set, 0 OK, 1 can't send any mail, ... (DT_xxx from dropoff.h) */ static int MS_NameSep = 0; /* State from initialize call, used in GetConfigurationParameters */ char *BCCto = NULL, *DefaultPrinter = NULL; *************** *** 238,244 **** errno = 0; ca = NULL; RC = FindAMSHomeCell(&ca); ! if (RC == 1 && ca != NULL) { sprintf(NameBuf, "Possible problem with AMS home %s: %s", ca->CellName, AMSHome_errmsg); NonfatalBizarreError(NameBuf); } --- 239,245 ---- errno = 0; ca = NULL; RC = FindAMSHomeCell(&ca); ! if (RC != 0 && ca != NULL) { sprintf(NameBuf, "Possible problem with AMS home %s: %s", ca->CellName, AMSHome_errmsg); NonfatalBizarreError(NameBuf); } *************** *** 256,262 **** if (RC < 0) AMS_RETURN_ERRCODE(ENOMEM, EIN_MALLOC, EVIA_MSCUIINIT); if (RC > 0) { if (errno == ENOENT) sprintf(NameBuf, "AMSHome domain %s doesn't have a server config file; can't configure for it!", MyMailDomain); ! else sprintf("Can't read server config file for AMSHome domain %s: %s; can't configure to use that domain!", MyMailDomain, UnixError(errno)); FatalError(NameBuf); safeexit(-1); } --- 257,263 ---- if (RC < 0) AMS_RETURN_ERRCODE(ENOMEM, EIN_MALLOC, EVIA_MSCUIINIT); if (RC > 0) { if (errno == ENOENT) sprintf(NameBuf, "AMSHome domain %s doesn't have a server config file; can't configure for it!", MyMailDomain); ! else sprintf(NameBuf, "Can't read server config file for AMSHome domain %s: %s; can't configure to use that domain!", MyMailDomain, UnixError(errno)); FatalError(NameBuf); safeexit(-1); } *************** *** 265,270 **** --- 266,272 ---- ca->UsesAMSDelivery = CheckAMSDelivery(MyMailDomain); } homeUsesAMSDelivery = ca->UsesAMSDelivery; /* -1 for no, 0 for unk, >0 for yes. */ + homeUsesUseridPlus = (homeUsesAMSDelivery > 0 ? 1 : CheckAMSUseridPlusWorks(MyMailDomain)); #ifdef AFS_ENV if (AMS_ViceIsRunning) { S = CheckAMSPMName(MyMailDomain); *************** *** 321,327 **** } } else { strcpy(NameBuf, Me); ! if (homeUsesAMSDelivery > 0) strcat(NameBuf, "+"); if (!AMS_NoDomainPreferredOnLocalMail) { strcat(NameBuf, "@"); strcat(NameBuf, MyMailDomain); --- 323,329 ---- } } else { strcpy(NameBuf, Me); ! if (homeUsesUseridPlus > 0) strcat(NameBuf, "+"); if (!AMS_NoDomainPreferredOnLocalMail) { strcat(NameBuf, "@"); strcat(NameBuf, MyMailDomain); *** ams/libs/ms/mswp.c Wed Sep 26 16:01:11 1990 --- ams/libs/ms/mswp.c.NEW Mon Oct 29 10:47:20 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/mswp.c,v 2.46 90/09/19 15:37:17 gk5g Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/mswp.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/mswp.c,v 2.46 90/09/19 15:37:17 gk5g Exp $ "; #endif /* lint */ #include --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/mswp.c,v 2.47 90/10/23 15:22:08 gk5g Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/mswp.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/mswp.c,v 2.47 90/10/23 15:22:08 gk5g Exp $ "; #endif /* lint */ #include *************** *** 946,952 **** wp_PrimeKey PKey; wp_ErrorCode wpErr; wp_PrimeKeySet *PKs; ! int MinMatch, OutMatch, size, i, code, WasFuzzy; ADDRESS_COMMENT *Comment; char *NewName, *CanonID, *CanonName, *CommText, *CPtr; char *affiliation, *tempstring; --- 946,952 ---- wp_PrimeKey PKey; wp_ErrorCode wpErr; wp_PrimeKeySet *PKs; ! int MinMatch, OutMatch, size, i, code, WasFuzzy, UsePlus; ADDRESS_COMMENT *Comment; char *NewName, *CanonID, *CanonName, *CommText, *CPtr; char *affiliation, *tempstring; *************** *** 1021,1027 **** if (laType == latype_LocalID) sprintf(NewName, "%s+%s", CanonID, PostID); else ! sprintf(NewName, UnderAMSDelivery > 0 ? "%s+" : "%s", CanonID); } CanonName = NULL; wpErr = cwp_Read(wpCD, PKey, idxN, &CanonName); /* get name, if any */ --- 1021,1027 ---- if (laType == latype_LocalID) sprintf(NewName, "%s+%s", CanonID, PostID); else ! sprintf(NewName, UsePlus ? "%s+" : "%s", CanonID); } CanonName = NULL; wpErr = cwp_Read(wpCD, PKey, idxN, &CanonName); /* get name, if any */ *************** *** 1095,1100 **** --- 1095,1101 ---- } else { strcpy(CommText, "("); } + UsePlus = CheckAMSUseridPlusWorks(Domain) > 0; for (i = 0; i < PKs->KeyCount; ++i) { CanonID = CanonName = NULL; wpErr = cwp_Read(wpCD, PKs->Keys[i], idxID, &CanonID); *************** *** 1182,1188 **** if (CanonID == NULL) /* spaces to underscores */ for (; *CPtr != '\0'; ++CPtr) if (*CPtr == ' ') *CPtr = '_'; ! strcat(CommText, (CanonID && UnderAMSDelivery > 0) ? "+@" : "@"); strcat(CommText, Domain); if (CanonName != NULL) strcat(CommText, ">"); } --- 1183,1189 ---- if (CanonID == NULL) /* spaces to underscores */ for (; *CPtr != '\0'; ++CPtr) if (*CPtr == ' ') *CPtr = '_'; ! strcat(CommText, (CanonID && CheckAMSUseridPlusWorks(Domain) > 0) ? "+@" : "@"); strcat(CommText, Domain); if (CanonName != NULL) strcat(CommText, ">"); } *************** *** 1230,1236 **** if (laType == latype_LocalID) { sprintf(NewName, "%s+%s", p->pw_name, PostID); } else { ! sprintf(NewName, (UnderAMSDelivery > 0 ? "%s+" : "%s"), p->pw_name); } if (RealName != NULL && Addr->RoutePhrase == NULL) { Addr->RoutePhrase = RealName; --- 1231,1237 ---- if (laType == latype_LocalID) { sprintf(NewName, "%s+%s", p->pw_name, PostID); } else { ! sprintf(NewName, (CheckAMSUseridPlusWorks(Domain) > 0 ? "%s+" : "%s"), p->pw_name); } if (RealName != NULL && Addr->RoutePhrase == NULL) { Addr->RoutePhrase = RealName; *************** *** 1436,1442 **** } /* else fall through */ case laerr_SyntaxError: case laerr_BadSecond: ! if (AMSDel < 0 || recdepth > 0) {outType = latype_LocalName; break;} AMS_RETURN_ERRCODE(EMSBADLOCALSYNTAX, EIN_LAKIND, EVIA_REWRITEADDRESS); default: AMS_RETURN_ERRCODE(EMSUNKNOWN, EIN_LAKIND, EVIA_REWRITEADDRESS); --- 1437,1443 ---- } /* else fall through */ case laerr_SyntaxError: case laerr_BadSecond: ! if (AMSDel <= 0 || recdepth > 0) {outType = latype_LocalName; break;} AMS_RETURN_ERRCODE(EMSBADLOCALSYNTAX, EIN_LAKIND, EVIA_REWRITEADDRESS); default: AMS_RETURN_ERRCODE(EMSUNKNOWN, EIN_LAKIND, EVIA_REWRITEADDRESS); *************** *** 1509,1515 **** char *newloc; char FileCell[250]; char ErrMsg[1000]; if (outType == latype_DistList && recdepth < 13 && GetCellFromFileName(FileBuf, FileCell, sizeof(FileCell)) == 0 && ULstrcmp(FileCell, Domain) != 0 && CheckAMSDelivery(FileCell) < 0) { ! sprintf(ErrMsg, "Distribution list %s is in cell %s, which does not support the AMS delivery system.", ap_Shorten(FileBuf), FileCell); NonfatalBizarreError(ErrMsg); } newloc = malloc(6+strlen(FileBuf) + OutLen); --- 1510,1516 ---- char *newloc; char FileCell[250]; char ErrMsg[1000]; if (outType == latype_DistList && recdepth < 13 && GetCellFromFileName(FileBuf, FileCell, sizeof(FileCell)) == 0 && ULstrcmp(FileCell, Domain) != 0 && CheckAMSDelivery(FileCell) < 0) { ! sprintf(ErrMsg, "Distribution list %s is in cell %s, which does not support AMDS.", ap_Shorten(FileBuf), FileCell); NonfatalBizarreError(ErrMsg); } newloc = malloc(6+strlen(FileBuf) + OutLen); *************** *** 1634,1640 **** break; } } else { ! *ErrCode = AMS_UUCPSupported ? MSWP_GOODNETMAIL : MSWP_UNKNOWNNETMAIL; } if (IDpart) free(IDpart); errno = 0; --- 1635,1641 ---- break; } } else { ! *ErrCode = CheckAMSUUCPSupp(Domain) > 0 ? MSWP_GOODNETMAIL : MSWP_UNKNOWNNETMAIL; } if (IDpart) free(IDpart); errno = 0; *************** *** 1687,1693 **** if (IDpart) free(IDpart); return(0); } ! if (AMSDel >= 0 && outType == latype_LocalID) { char *newloc; newloc = malloc(2+strlen(IDpart)+(PostID ? strlen(PostID) : 0)); --- 1688,1694 ---- if (IDpart) free(IDpart); return(0); } ! if (outType == latype_LocalID && CheckAMSUseridPlusWorks(Domain) >= 0) { char *newloc; newloc = malloc(2+strlen(IDpart)+(PostID ? strlen(PostID) : 0)); *** ams/libs/ms/mungenew.c Mon Aug 6 10:59:14 1990 --- ams/libs/ms/mungenew.c.NEW Mon Sep 17 12:18:44 1990 *************** *** 3,9 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/mungenew.c,v 2.23 90/06/05 14:35:52 gk5g Exp $ $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/mungenew.c,v $ */ #include --- 3,9 ---- * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/mungenew.c,v 2.24 90/09/14 13:51:50 gk5g Exp $ $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/mungenew.c,v $ */ #include *************** *** 68,74 **** CloseDirsThatNeedIt(); *NumBad = *NumGood = *NumInProgress = *NumLocks = *FirstError = *resultcode = 0; if (EliErrBufLim) *EliErrBuf = '\0'; ! if (homeUsesAMSDelivery < 0) { char SpoolFileName[1 + MAXPATHLEN], *HomeBox, *SpoolFile; int numfound; --- 68,75 ---- CloseDirsThatNeedIt(); *NumBad = *NumGood = *NumInProgress = *NumLocks = *FirstError = *resultcode = 0; if (EliErrBufLim) *EliErrBuf = '\0'; ! if (homeUsesAMSDelivery < 0 && ! ( !(PersonalMailCollectionCommand || AMS_MailCollectionCommand) )) { char SpoolFileName[1 + MAXPATHLEN], *HomeBox, *SpoolFile; int numfound; *** ams/libs/ms/reply.c Mon Aug 6 10:59:36 1990 --- ams/libs/ms/reply.c.NEW Fri Sep 7 13:41:54 1990 *************** *** 3,9 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/reply.c,v 2.8 90/06/05 14:36:46 gk5g Exp $ $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/reply.c,v $ */ #include --- 3,9 ---- * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/reply.c,v 2.9 90/09/07 11:52:10 gk5g Exp $ $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/reply.c,v $ */ #include *************** *** 152,158 **** char *s; if (reflen) { ! strcat(References, ",\n\t"); } s = References + strlen(References); strncpy(s, Msg->ParsedStuff->HeadBody[HP_MESSAGEID], len); --- 152,158 ---- char *s; if (reflen) { ! strcat(References, "\n\t"); } s = References + strlen(References); strncpy(s, Msg->ParsedStuff->HeadBody[HP_MESSAGEID], len); *** ams/libs/ms/strpself.c Mon Aug 6 10:59:45 1990 --- ams/libs/ms/strpself.c.NEW Mon Oct 29 10:47:24 1990 *************** *** 3,10 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/strpself.c,v 2.10 90/06/05 14:37:08 gk5g Exp $ ! $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/strpself.c,v $ */ #include #include --- 3,10 ---- * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/strpself.c,v 2.11 90/10/23 14:52:34 gk5g Exp $ ! $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/strpself.c,v $ */ #include #include *************** *** 17,28 **** extern char Me[], MeInFull[], MyMailDomain[], *MyShortAddress; static void StripList(AddrList) PARSED_ADDRESS *AddrList; {/* Recursively strip Me@MyMailDomain from the list. */ ! int outType, la_errcode; char *IDpart, *PostID, *s; FOR_ALL_ADDRESSES(tmpaddr, AddrList, { switch (tmpaddr->Kind) { case SIMPLE_ADDRESS: --- 17,51 ---- extern char Me[], MeInFull[], MyMailDomain[], *MyShortAddress; + static int SameName(n1, n2, nlen, namesep) + char *n1, *n2; int nlen, namesep; + {/* Works like ULstrncmp, but treats spaces and namesep as the same. */ + int c1, c2; + + for (; nlen > 0; --nlen) { + c1 = *n1++; + c2 = *n2++; + /* convert UC to LC */ + if (c1 < 'Z' && c1 > 'A') c1 -= ('a' - 'A'); + if (c2 < 'Z' && c2 > 'A') c2 -= ('a' - 'A'); + /* convert namesep chars to spaces */ + if (namesep > 0) { + if (c1 == namesep) c1 = ' '; + if (c2 == namesep) c2 = ' '; + } + if (c1 != c2) return 0; + } + /* they're equivalent. */ + return 1; + } + static void StripList(AddrList) PARSED_ADDRESS *AddrList; {/* Recursively strip Me@MyMailDomain from the list. */ ! int outType, la_errcode, nameSep; char *IDpart, *PostID, *s; + nameSep = CheckAMSNameSep(MyMailDomain); FOR_ALL_ADDRESSES(tmpaddr, AddrList, { switch (tmpaddr->Kind) { case SIMPLE_ADDRESS: *************** *** 33,45 **** if (ULstrcmp(IDpart, Me) == 0) { /* We could do a zillion heuristics in the LocalName case. instead, we just do the most obvious, specifically to catch canonical addresses on non-AMS delivery configurations */ /* You might think these next two lines are necessary, but it turns out that FreeAddress does it for us automatically, according to CFE. I've left them in so that nobody else will make the same mistake I did. -- NSB */ ! /* tmpaddr->Prev->Next = tmpaddr->Next; */ ! /* tmpaddr->Next->Prev = tmpaddr->Prev; */ FreeAddress(tmpaddr); } else if (outType == latype_LocalName) { s = rindex(MyShortAddress, '@'); if (s != NULL && *s == '@') { ! if (strlen(IDpart) == (s-MyShortAddress) && ULstlmatch(MyShortAddress, IDpart) == 1) { FreeAddress(tmpaddr); } } --- 56,68 ---- if (ULstrcmp(IDpart, Me) == 0) { /* We could do a zillion heuristics in the LocalName case. instead, we just do the most obvious, specifically to catch canonical addresses on non-AMS delivery configurations */ /* You might think these next two lines are necessary, but it turns out that FreeAddress does it for us automatically, according to CFE. I've left them in so that nobody else will make the same mistake I did. -- NSB */ ! /* tmpaddr->Prev->Next = tmpaddr->Next; */ ! /* tmpaddr->Next->Prev = tmpaddr->Prev; */ FreeAddress(tmpaddr); } else if (outType == latype_LocalName) { s = rindex(MyShortAddress, '@'); if (s != NULL && *s == '@') { ! if ((strlen(IDpart) == (s-MyShortAddress)) && SameName(MyShortAddress, IDpart, (s-MyShortAddress), nameSep)) { FreeAddress(tmpaddr); } } *** ams/libs/ms/subs.c Mon Aug 6 10:59:51 1990 --- ams/libs/ms/subs.c.NEW Mon Oct 29 10:47:26 1990 *************** *** 3,10 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/subs.c,v 2.27 90/06/05 14:37:21 gk5g Exp $ ! $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/subs.c,v $ */ #include #include --- 3,10 ---- * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/subs.c,v 2.30 90/10/15 16:02:34 gk5g Exp $ ! $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/subs.c,v $ */ #include #include *************** *** 274,279 **** --- 274,280 ---- } HasInitializedSubsPriorities = 0; ++SubsModCtr; + return(0); } ReadSubs() *************** *** 487,492 **** --- 488,494 ---- } else { NonfatalBizarreError(ErrorText); } + return(0); } static Boolean MailPathChanged = FALSE, LocalPathChanged = FALSE, ExtPathChanged = FALSE, OffPathChanged = FALSE; *************** *** 517,522 **** --- 519,525 ---- oldlocallen = strlen(oldlocal); oldofflen = strlen(oldofficial); oldextlen = strlen(oldexternal); + return(0); } HandlePathChange(sub) *************** *** 531,536 **** --- 534,540 ---- if (LocalPathChanged) HandleChange(sub, oldlocal, LOCALSEARCHPATHTEMPLATE, oldlocallen); if (ExtPathChanged) HandleChange(sub, oldexternal, EXTERNALSEARCHPATHTEMPLATE, oldextlen); if (OffPathChanged) HandleChange(sub, oldofficial, OFFICIALSEARCHPATHTEMPLATE, oldofflen); + return(0); } HandleChange(sub, oldpath, newpath, oldlen) *************** *** 560,565 **** --- 564,570 ---- sub->key = malloc(1+strlen(NewName)); strcpy(sub->key, NewName); } + return(0); } *************** *** 579,584 **** --- 584,590 ---- --i; /* Recheck this spot again! */ } } + return(0); } /* For the qsort call */ *************** *** 649,654 **** --- 655,661 ---- ++i; } ++SubsModCtr; + return(0); } *************** *** 675,681 **** strcpy(MyBuf, convlongto64(time(0), 0)); newvalue = MyBuf; } ! SetFullProfileEntry(FALSE, FullName, NULL, 0, TRUE, newvalue, newdate, FALSE); } SetFullProfileEntry(DoSubs, FullName, NickName, status, DoProf, time64, filedate, NeedToCheckPath) --- 682,688 ---- strcpy(MyBuf, convlongto64(time(0), 0)); newvalue = MyBuf; } ! return(SetFullProfileEntry(FALSE, FullName, NULL, 0, TRUE, newvalue, newdate, FALSE)); } SetFullProfileEntry(DoSubs, FullName, NickName, status, DoProf, time64, filedate, NeedToCheckPath) *************** *** 956,961 **** --- 963,969 ---- fclose(ProfLockFP); ProfLockFP = NULL; } + return(0); } MakeSubsListInPathOrder() { *************** *** 1114,1119 **** --- 1122,1128 ---- if (!SkipThis) ++NumSubsOrderElts; } HasInitializedSubsPriorities = 1; + return(0); } WhichPath(s) *************** *** 1174,1179 **** --- 1183,1189 ---- } fclose(fp); } + return(0); } CheckForInconsistentSubscriptions(SubsFileName) *** ams/libs/snap/cuisnap.c Wed Nov 22 11:36:42 1989 --- ams/libs/snap/cuisnap.c.NEW Mon Oct 29 10:47:38 1990 *************** *** 3,10 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/ams/libs/snap/RCS/cuisnap.c,v 2.18 89/04/16 20:31:28 nsb Exp $ ! $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/ams/libs/snap/RCS/cuisnap.c,v $ */ /* --- 3,10 ---- * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/snap/RCS/cuisnap.c,v 2.19 90/10/19 11:08:17 gk5g Exp $ ! $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/snap/RCS/cuisnap.c,v $ */ /* *************** *** 37,43 **** char *SnapVersionString=NULL; ! extern char *malloc (), *snap_errlist[], *copy(); extern int SNAP_debugmask; --- 37,47 ---- char *SnapVersionString=NULL; ! extern char *snap_errlist[], *copy(); ! ! #ifndef _IBMR2 ! extern char *malloc(); ! #endif /* _IBMR2 */ extern int SNAP_debugmask; *** ams/ms/Imakefile Wed Nov 22 11:36:48 1989 --- ams/ms/Imakefile.NEW Tue Oct 30 19:21:09 1990 *************** *** 8,13 **** --- 8,19 ---- This Imakefile parses the installed amsvers.h file to determine the name for the messageserver executable program. BEWARE! *WARNING* */ + #ifdef RESOLVER_ENV + RESOLVER_LIB = ${RESOLVLIB} + #else + RESOLVER_LIB = + #endif /* RESOLVER_ENV */ + LOCALINCLUDES = -I${BASEDIR}/include/ams PRODUCT = messageserver *************** *** 26,32 **** ${UTILLIB} ${PRSLIB} \ ${BASEDIR}/lib/libplumber.a \ ${BASEDIR}/lib/libgasp.a \ ! ${RESOLVLIB} NSNAP_LIBS= \ ${LIBS_PART_A} \ --- 32,38 ---- ${UTILLIB} ${PRSLIB} \ ${BASEDIR}/lib/libplumber.a \ ${BASEDIR}/lib/libgasp.a \ ! ${RESOLVER_LIB} NSNAP_LIBS= \ ${LIBS_PART_A} \ *** ams/ms/ms.c Wed Nov 22 11:36:53 1989 --- ams/ms/ms.c.NEW Mon Oct 29 10:47:48 1990 *************** *** 2,12 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/ams/ms/RCS/ms.c,v 2.21 89/04/17 11:24:02 nsb Exp $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/ams/ms/RCS/ms.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/ams/ms/RCS/ms.c,v 2.21 89/04/17 11:24:02 nsb Exp $ "; #endif /* lint */ /* --- 2,12 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/ms/RCS/ms.c,v 2.23 90/10/15 15:28:17 gk5g Exp $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/ms/RCS/ms.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/ms/RCS/ms.c,v 2.23 90/10/15 15:28:17 gk5g Exp $ "; #endif /* lint */ /* *************** *** 34,40 **** char *SnapVersionString; ! extern char *malloc(), *getprofile(); extern char home[]; extern int SNAP_debugmask, MSDebugging; --- 34,44 ---- char *SnapVersionString; ! #ifndef _IBMR2 ! extern char *malloc(); ! #endif /* _IBMR2 */ ! ! extern *getprofile(); extern char home[]; extern int SNAP_debugmask, MSDebugging; *** ams/msclients/cui/Imakefile Wed Nov 22 11:37:20 1989 --- ams/msclients/cui/Imakefile.NEW Tue Oct 30 19:21:16 1990 *************** *** 4,9 **** --- 4,15 ---- \* ********************************************************************** */ LOCALINCLUDES = -I${BASEDIR}/include/ams + #ifdef RESOLVER_ENV + RESOLVER_LIB = ${RESOLVLIB} + #else + RESOLVER_LIB = + #endif /* RESOLVER_ENV */ + #ifdef SNAP_ENV PRODUCTS = cuin cuis cuit #else /* SNAP_ENV */ *************** *** 17,23 **** OBJS = cui.o cuifns.o ${ANDVOBJS} morprntf.o LIBS = ${BASEDIR}/lib/libmail.a ${BASEDIR}/lib/liberrors.a \ ! ${MALLOCLIB} ${UTILLIB} ${RESOLVLIB} NOSNAPLIBS = ${BASEDIR}/lib/libcui.a ${BASEDIR}/lib/libcuin.a \ ${BASEDIR}/lib/libmssrv.a ${BASEDIR}/lib/libmsshr.a \ --- 23,29 ---- OBJS = cui.o cuifns.o ${ANDVOBJS} morprntf.o LIBS = ${BASEDIR}/lib/libmail.a ${BASEDIR}/lib/liberrors.a \ ! ${MALLOCLIB} ${UTILLIB} ${RESOLVER_LIB} NOSNAPLIBS = ${BASEDIR}/lib/libcui.a ${BASEDIR}/lib/libcuin.a \ ${BASEDIR}/lib/libmssrv.a ${BASEDIR}/lib/libmsshr.a \ *** ams/msclients/cui/cui.c Wed Sep 26 16:01:25 1990 --- ams/msclients/cui/cui.c.NEW Mon Oct 29 10:48:00 1990 *************** *** 2,16 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/cui/RCS/cui.c,v 2.31 90/08/29 15:16:57 gk5g Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/cui/RCS/cui.c,v $ */ #define CUIP_MAJ_VER 2 #define CUIP_MIN_VER 0 #ifndef NO_DUPLICATE_STATIC_CHARS ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/cui/RCS/cui.c,v 2.31 90/08/29 15:16:57 gk5g Exp $ "; #endif /* NO_DUPLICATE_STATIC_CHARS */ --- 2,16 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/cui/RCS/cui.c,v 2.32 90/10/25 18:04:52 gk5g Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/cui/RCS/cui.c,v $ */ #define CUIP_MAJ_VER 2 #define CUIP_MIN_VER 0 #ifndef NO_DUPLICATE_STATIC_CHARS ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/cui/RCS/cui.c,v 2.32 90/10/25 18:04:52 gk5g Exp $ "; #endif /* NO_DUPLICATE_STATIC_CHARS */ *************** *** 1142,1148 **** } else { last=HeadList; for (t=HeadList; ! (t!=NULL) && 0>strcmpi(t->header, arg); t=t->next) { last=t; } if (t==HeadList) { --- 1142,1148 ---- } else { last=HeadList; for (t=HeadList; ! (t!=NULL) && 0header, arg); t=t->next) { last=t; } if (t==HeadList) { *************** *** 1164,1171 **** struct head_list *t; int i = 0; for (t=HeadList; (t!=NULL); t=t->next) { ! i=strnicmp(t->header, arg, strlen(t->header)); ! if (0<=i) break; } return((t==NULL || 0next) { ! i=ULstrncmp(t->header, arg, strlen(t->header)); ! if (i<=0) break; } return((t==NULL || 0s2: >0 s1==s2: 0 s1= 'A') c1 += 040; - c2 = *s2++; if (c2 <= 'Z') if (c2 >= 'A') c2 += 040; - if (c1 != c2) break; - if (c1 == '\0') return(0); - } - return(c1 - c2); - } - #endif /* 0 */ --- 44,47 ---- *** ams/msclients/vui/vuibase.c Mon Aug 6 11:00:25 1990 --- ams/msclients/vui/vuibase.c.NEW Mon Oct 29 10:48:21 1990 *************** *** 2,11 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/vui/RCS/vuibase.c,v 1.30 90/06/05 14:27:13 gk5g Exp $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/vui/RCS/vuibase.c,v 1.30 90/06/05 14:27:13 gk5g Exp $ "; #endif /* lint */ #include --- 2,11 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/vui/RCS/vuibase.c,v 1.30 90/06/05 14:27:13 gk5g Exp $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/vui/RCS/vuibase.c,v 1.30 90/06/05 14:27:13 gk5g Exp $ "; #endif /* lint */ #include *** ams/msclients/vui/vuipnl.c Mon Aug 6 11:00:33 1990 --- ams/msclients/vui/vuipnl.c.NEW Mon Oct 29 10:48:26 1990 *************** *** 2,8 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/vui/RCS/vuipnl.c,v 1.28 90/06/05 14:31:29 gk5g Exp $ */ /* * This module defines, and responds to input from, the --- 2,8 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/vui/RCS/vuipnl.c,v 1.28 90/06/05 14:31:29 gk5g Exp $ */ /* * This module defines, and responds to input from, the *** ams/utils/dlistc/Imakefile Wed Nov 22 11:39:22 1989 --- ams/utils/dlistc/Imakefile.NEW Tue Oct 30 19:21:42 1990 *************** *** 2,9 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! LIBS = ${BASEDIR}/lib/libmail.a ${UTILLIB} ${PRSLIB} ${RESOLVLIB} DOCS = dlc.help NormalObjectRule() --- 2,15 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! #ifdef RESOLVER_ENV ! RESOLVER_LIB = ${RESOLVLIB} ! #else ! RESOLVER_LIB = ! #endif /* RESOLVER_ENV */ + LIBS = ${BASEDIR}/lib/libmail.a ${UTILLIB} ${PRSLIB} ${RESOLVER_LIB} + DOCS = dlc.help NormalObjectRule() *************** *** 10,16 **** .SUFFIXES: .test .c.test: $(RM) $@ ! $(CC) -I. ${LOCALINCLUDES} -DTESTINGONLYTESTING $(CFLAGS) $*.c ${DESTDIR}/lib/libmail.a ${UTILLIB} ${PRSLIB} ${RESOLVLIB} -o $*.test $(RM) $*.o clean:: ${RM} *.test --- 16,22 ---- .SUFFIXES: .test .c.test: $(RM) $@ ! $(CC) -I. ${LOCALINCLUDES} -DTESTINGONLYTESTING $(CFLAGS) $*.c ${DESTDIR}/lib/libmail.a ${UTILLIB} ${PRSLIB} ${RESOLVER_LIB} -o $*.test $(RM) $*.o clean:: ${RM} *.test *** ams/utils/dlistc/dlc.c Wed Nov 22 11:39:23 1989 --- ams/utils/dlistc/dlc.c.NEW Mon Oct 29 10:48:48 1990 *************** *** 12,42 **** */ - #if 1 /* remove this code when libutil.a includes it */ - #include - - #define DOWNCASE(x) (isascii(x)?(isalpha(x)?(isupper(x)?(tolower(x)):(x)):(x)):(x)) - - static int ULstrncmp(s1,s2,n) - char *s1, *s2; - int n; - { - /* case INSENSITIVE: Compare strings, up to n chars: - s1>s2: >0 s1==s2: 0 s1 #include #include /* this may cause portability problems */ --- 12,17 ---- *** ams/utils/nntp/cmd/Imakefile Wed Nov 22 11:39:35 1989 --- ams/utils/nntp/cmd/Imakefile.NEW Tue Oct 30 19:21:46 1990 *************** *** 4,9 **** --- 4,15 ---- \* ********************************************************************** */ LOCALINCLUDES = -I../lib + #ifdef RESOLVER_ENV + RESOLVER_LIB = ${RESOLVLIB} + #else + RESOLVER_LIB = + #endif /* RESOLVER_ENV */ + LIBS = ${BASEDIR}/lib/libmail.a \ ${UTILLIB} \ ${BASEDIR}/lib/liberrors.a \ *************** *** 12,18 **** NormalObjectRule() ProgramTarget(nntppoll, main.o, ../lib/libpoll.a ${LIBS},) ! ProgramTarget(nntpxmit, nntpxmit.o, ../lib/libxmit.a ${LIBS} ${RESOLVLIB},) InstallProgram(nntppoll, ${DESTDIR}/etc/) InstallProgram(nntpxmit, ${DESTDIR}/etc/) --- 18,24 ---- NormalObjectRule() ProgramTarget(nntppoll, main.o, ../lib/libpoll.a ${LIBS},) ! ProgramTarget(nntpxmit, nntpxmit.o, ../lib/libxmit.a ${LIBS} ${RESOLVER_LIB},) InstallProgram(nntppoll, ${DESTDIR}/etc/) InstallProgram(nntpxmit, ${DESTDIR}/etc/) *** ams/delivery/Imakefile Fri Aug 3 16:18:51 1990 --- ams/delivery/Imakefile.NEW Thu Sep 13 18:01:04 1990 *************** *** 4,8 **** \* ********************************************************************** */ #define IHaveSubdirs ! SUBDIRS = hdrs vicemail trymail queuem sendmail mail doc --- 4,17 ---- \* ********************************************************************** */ #define IHaveSubdirs ! #ifdef CMU_ENV ! REPLACEMENTS = sendmail mail ! EXTRAS = ! #else /* CMU_ENV */ ! REPLACEMENTS = ! EXTRAS = sendmail mail ! #endif /* CMU_ENV */ + SUBDIRS = hdrs vicemail trymail queuem $(REPLACEMENTS) doc + + EXTRASUBDIRS = $(EXTRAS) *** ams/delivery/trymail/Imakefile Wed Nov 22 11:41:15 1989 --- ams/delivery/trymail/Imakefile.NEW Tue Oct 30 19:21:58 1990 *************** *** 2,7 **** --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ + #ifdef RESOLVER_ENV + RESOLVER_LIB = ${RESOLVLIB} + #else + RESOLVER_LIB = + #endif /* RESOLVER_ENV */ + LIBS = ${BASEDIR}/lib/libmail.a \ ${UTILLIB} \ ${BASEDIR}/lib/liberrors.a \ *************** *** 9,16 **** ${PRSLIB} NormalObjectRule() ! ProgramTarget(trymail, trymail.o weak.o, ${LIBS} ${RESOLVLIB},) ! ProgramTarget(switchmail, trymail.o strong.o, ${LIBS} ${RESOLVLIB},) InstallProgram(trymail, ${DESTDIR}/etc/) InstallProgram(switchmail, ${DESTDIR}/etc/) DependTarget() --- 15,22 ---- ${PRSLIB} NormalObjectRule() ! ProgramTarget(trymail, trymail.o weak.o, ${LIBS} ${RESOLVER_LIB},) ! ProgramTarget(switchmail, trymail.o strong.o, ${LIBS} ${RESOLVER_LIB},) InstallProgram(trymail, ${DESTDIR}/etc/) InstallProgram(switchmail, ${DESTDIR}/etc/) DependTarget() *** ams/delivery/trymail/strong.c Wed Sep 26 16:01:52 1990 --- ams/delivery/trymail/strong.c.NEW Mon Oct 29 10:49:13 1990 *************** *** 10,16 **** is permitted to return mail to its sender. \* ************************************************************ */ ! static char rcsid[] = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/delivery/trymail/RCS/strong.c,v 1.40 90/08/23 15:02:51 gk5g Exp $"; #include #include --- 10,16 ---- is permitted to return mail to its sender. \* ************************************************************ */ ! static char rcsid[] = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/delivery/trymail/RCS/strong.c,v 1.41 90/10/26 13:05:56 gk5g Exp $"; #include #include *************** *** 1972,1977 **** --- 1972,1980 ---- struct DelayedRemote **DRList = NULL; ADDRESS_HOST *Hst; auto char fName[MAXPATHLEN]; + auto char msgCase15[100+MAXPATHLEN]; + auto char msgCase16[100+MAXPATHLEN]; + extern char Qmail_ErrMsg[]; #define FixedArgs 5 #define OSMModeCell NewArgv[4] static char *ExNames[] = { /* values for FCode1 and FailCode1 */ *************** *** 2109,2117 **** PGrp = -1; } else { FCode1 = 14; } } ! if (PGrp < 0) continue; Recip = 0; for (RecipTry = Hunk; RecipTry < DRCount; ++RecipTry) { DR = DRList[RecipTry]; --- 2112,2121 ---- PGrp = -1; } else { FCode1 = 14; + FCode2 = errno; } } ! if (PGrp < 0) continue; /* this one isn't a candidate for cross-cell dropoff */ Recip = 0; for (RecipTry = Hunk; RecipTry < DRCount; ++RecipTry) { DR = DRList[RecipTry]; *************** *** 2149,2156 **** PrevHost, MailQueueNamePrefix); if (TMDebug) fprintf(stderr, "Cell dropoff: %d/%d\n", FCode1, FCode2); if (FCode1 == Q_OK) {FCode1 = 0; FCode2 = 1;} ! else if (FCode1 == Q_TEMP_FAIL) FCode1 = 15; ! else {FCode2 = FCode1; FCode1 = 16;} } close(fd); } --- 2153,2165 ---- PrevHost, MailQueueNamePrefix); if (TMDebug) fprintf(stderr, "Cell dropoff: %d/%d\n", FCode1, FCode2); if (FCode1 == Q_OK) {FCode1 = 0; FCode2 = 1;} ! else if (FCode1 == Q_TEMP_FAIL) { ! FCode1 = 15; ! strncpy(msgCase15, Qmail_ErrMsg, sizeof(msgCase15)-1); ! } else { ! FCode2 = FCode1; FCode1 = 16; ! strncpy(msgCase16, Qmail_ErrMsg, sizeof(msgCase16)-1); ! } } close(fd); } *************** *** 2284,2293 **** TimedOut = 0; WaitTime = TimeLeft(); errno = 0; ! if (ReallyDeliver) SuccCode = tclose(SendMail, WaitTime, &TimedOut); ! else ! {fclose(SendMail); SuccCode = 0;} if (TMDebug) fprintf(stderr, "SendMail ret status is %#x\n", SuccCode); if (SuccCode == -1 || TimedOut != 0) { FCode1 = 6; FCode2 = errno; --- 2293,2303 ---- TimedOut = 0; WaitTime = TimeLeft(); errno = 0; ! if (ReallyDeliver) { SuccCode = tclose(SendMail, WaitTime, &TimedOut); ! } else { ! fclose(SendMail); SuccCode = 0; ! } if (TMDebug) fprintf(stderr, "SendMail ret status is %#x\n", SuccCode); if (SuccCode == -1 || TimedOut != 0) { FCode1 = 6; FCode2 = errno; *************** *** 2439,2455 **** "Out of time in this run"); break; case 14: ! AddrResult(tmltf_MailerTempFailure, DR->RmtAddr, "Temp failure checking AMS delivery in remote cell"); break; case 15: ! AddrResult(tmltf_MailerTempFailure, DR->RmtAddr, "Temp failure in cross-cell dropoff"); break; case 16: ! AddrResult(tmltf_MailerExecFailure, DR->RmtAddr, "Persistent failure in cross-cell dropoff (code %d)", DR->FailCode2); break; default: AddrResult(tmlpf_DropoffFailure, DR->RmtAddr, ! "internal error in mail dropoff: %d/%d", DR->FailCode1, DR->FailCode2); break; } --- 2449,2465 ---- "Out of time in this run"); break; case 14: ! AddrResult(tmltf_MailerTempFailure, DR->RmtAddr, "Temp failure checking AMS delivery in remote cell: %s", UnixError(DR->FailCode2)); break; case 15: ! AddrResult(tmltf_MailerTempFailure, DR->RmtAddr, "Temp failure in cross-cell dropoff, e.g. %s", msgCase15); break; case 16: ! AddrResult(tmltf_MailerExecFailure, DR->RmtAddr, "Persistent failure in cross-cell dropoff (code %d), e.g.: %s", DR->FailCode2, msgCase16); break; default: AddrResult(tmlpf_DropoffFailure, DR->RmtAddr, ! "internal (unexpected) error in mail dropoff: %d/%d", DR->FailCode1, DR->FailCode2); break; } *** ams/delivery/queuem/queuem.c Wed Sep 26 16:02:00 1990 --- ams/delivery/queuem/queuem.c.NEW Tue Nov 20 13:18:43 1990 *************** *** 161,166 **** --- 161,172 ---- #define NIL 0 + #ifdef AFS_ENV + #define No_Owner ANONYMOUSID + #else /* AFS_ENV */ + #define No_Owner -1 + #endif /* AFS_ENV */ + #define debug(n, x) ((Debugging & (n)) ? printf x : 0) #define prbool(x) (x) ? "Yes" : "No" *************** *** 254,260 **** int NextRecipient; /* Index of next vacant recipient slot */ } OldRecipients, NewRecipients, *CurrentRecipients; ! static char ErrorText[256], WhoIAmBuf[MAXNAMESIZE], *WhoIAm, MailSourceFile[MAXPATHLEN+1] = { '\0' }, /* File holding msg */ --- 260,266 ---- int NextRecipient; /* Index of next vacant recipient slot */ } OldRecipients, NewRecipients, *CurrentRecipients; ! static char ErrorText[MAXPATHLEN+300], WhoIAmBuf[MAXNAMESIZE], *WhoIAm, MailSourceFile[MAXPATHLEN+1] = { '\0' }, /* File holding msg */ *************** *** 891,896 **** --- 897,911 ---- NewRecipients.NextRecipient = FIRSTRECIPIENT; CurrentRecipients = &OldRecipients; } + + static void awaitSleep(secs) + {/* Sleep but return early on a signal or interrupt. */ + struct timeval TV; + + TV.tv_sec = secs; + TV.tv_usec = 0; + (void) select(0, 0, 0, 0, &TV); + } #ifdef AFS_ENV static Boolean authenticated(dir) *************** *** 953,962 **** /* Process the named directory as a queue, possibly while in the middle of other processing */ ! static void InterjectDir(dirname, tokens, toklen, newFmt) char *dirname; unsigned char *tokens; int toklen, newFmt; { char oldSrcDir[MAXPATHLEN+1]; #ifdef AFS_ENV --- 968,978 ---- /* Process the named directory as a queue, possibly while in the middle of other processing */ ! static void InterjectDir(dirname, tokens, toklen, newFmt, forceUid) char *dirname; unsigned char *tokens; int toklen, newFmt; + long forceUid; { char oldSrcDir[MAXPATHLEN+1]; #ifdef AFS_ENV *************** *** 1009,1015 **** #endif /* AFS_ENV */ /* Sets up globals */ ! Rslt = GetMessageFromQueue(LockFileName, &LockFD, &age, FALSE); if (Rslt != 0 && Rslt != 1) { #ifdef LPPlumb CheckUnlocked(LockFileName, 26); --- 1025,1031 ---- #endif /* AFS_ENV */ /* Sets up globals */ ! Rslt = GetMessageFromQueue(LockFileName, &LockFD, &age, FALSE, forceUid); if (Rslt != 0 && Rslt != 1) { #ifdef LPPlumb CheckUnlocked(LockFileName, 26); *************** *** 1043,1049 **** SourceDirIsOpen = FALSE; } TargetLoadAv += DEFAULT_XLOAD_INCR; ! sleep(60); } else if (Rslt == 2) { /* can't move req out */ ; /* do nothing--fall through to next request */ } --- 1059,1065 ---- SourceDirIsOpen = FALSE; } TargetLoadAv += DEFAULT_XLOAD_INCR; ! awaitSleep(60); } else if (Rslt == 2) { /* can't move req out */ ; /* do nothing--fall through to next request */ } *************** *** 1093,1098 **** --- 1109,1116 ---- return 0; } } + errprintf(Qname, ERR_CRITICAL, NULL, NULL, + "No cell was marked as AMSHome in dropoff packet"); return -1; /* nothing was marked as primary (i.e. as an AMSHome from dropoff.c) */ #else /* AFS_ENV */ return 0; *************** *** 1203,1208 **** --- 1221,1227 ---- if (setreuid(0, 0) < 0) errprintf(Qname, ERR_CRITICAL, NULL, NULL, "Setreuid (9) failed: %s", UnixError(errno)); + return; } } else { if (!unpacktokens(tokens, 0, 0, 0, 1)) { *************** *** 1242,1248 **** } /* Process all the requests in that dir at least once */ ! InterjectDir(newname, tokens, toklen, isNewFormat); #ifdef AFS_ENV /* Unset the pag */ --- 1261,1267 ---- } /* Process all the requests in that dir at least once */ ! InterjectDir(newname, tokens, toklen, isNewFormat, uid); #ifdef AFS_ENV /* Unset the pag */ *************** *** 1714,1720 **** if (! ShuttingDown) { debug(262144, ("Looking at queued mail in %s\n", dirName)); SetProcTitle("(queuemail) -O%d p%d delivering for ~%s (%s)", cotime, Pass, pwd->pw_name, Times); ! InterjectDir(dirName, NULL, 0, 0); } WhoIAm = whoiwas; if (! ShuttingDown) CleanupOutgoing(dirName); --- 1733,1739 ---- if (! ShuttingDown) { debug(262144, ("Looking at queued mail in %s\n", dirName)); SetProcTitle("(queuemail) -O%d p%d delivering for ~%s (%s)", cotime, Pass, pwd->pw_name, Times); ! InterjectDir(dirName, NULL, 0, 0, (long) pwd->pw_uid); } WhoIAm = whoiwas; if (! ShuttingDown) CleanupOutgoing(dirName); *************** *** 1730,1736 **** if (! ShuttingDown) { osi_GetTimes(&TVal); SetProcTitle("(queuemail) -O%d p%d done in %d secs (%s)", cotime, Pass, TVal.Secs - CleanupStartTime, Times); ! sleep(cotime); } } } --- 1749,1755 ---- if (! ShuttingDown) { osi_GetTimes(&TVal); SetProcTitle("(queuemail) -O%d p%d done in %d secs (%s)", cotime, Pass, TVal.Secs - CleanupStartTime, Times); ! awaitSleep(cotime); } } } *************** *** 1784,1790 **** } #endif /* AFS_ENV */ /* Sets up globals */ ! if (GetMessageFromQueue(LockFileName, &LockFD, &age, TRUE) != 0) break; #ifdef LPPlumb CheckUnlocked(LockFileName, 30); #endif /* LPPlumb */ --- 1803,1809 ---- } #endif /* AFS_ENV */ /* Sets up globals */ ! if (GetMessageFromQueue(LockFileName, &LockFD, &age, TRUE, No_Owner) != 0) break; #ifdef LPPlumb CheckUnlocked(LockFileName, 30); #endif /* LPPlumb */ *************** *** 1906,1915 **** GetRslt = 1; /* Still waiting to learn queue's cell name */ } else { /* Sets up globals */ ! GetRslt = GetMessageFromQueue(LockFileName, &LockFD, &age, FALSE); } #else /* AFS_ENV */ ! GetRslt = GetMessageFromQueue(LockFileName, &LockFD, &age, FALSE); #endif /* AFS_ENV */ if (GetRslt != 0) { /* Can't find any valid requests in queue */ #ifdef LPPlumb --- 1925,1934 ---- GetRslt = 1; /* Still waiting to learn queue's cell name */ } else { /* Sets up globals */ ! GetRslt = GetMessageFromQueue(LockFileName, &LockFD, &age, FALSE, No_Owner); } #else /* AFS_ENV */ ! GetRslt = GetMessageFromQueue(LockFileName, &LockFD, &age, FALSE, No_Owner); #endif /* AFS_ENV */ if (GetRslt != 0) { /* Can't find any valid requests in queue */ #ifdef LPPlumb *************** *** 2234,2246 **** char *name; { register int owner1, owner2, owner3; - #ifdef AFS_ENV - #define No_Owner ANONYMOUSID - #else /* AFS_ENV */ - #define No_Owner -1 - #endif /* AFS_ENV */ - /* Try to get all 3 uids */ owner1 = buf->st_uid; #ifdef AFS_ENV --- 2253,2259 ---- *************** *** 2342,2350 **** } } ! static int GetMessageFromQueue(LockFile, refFD, refAge, JustLook) char *LockFile; int *refFD, *refAge, JustLook; { char *suffix, *PostmanInCell; int SomeErrno, err, OwnerInCell; --- 2355,2364 ---- } } ! static int GetMessageFromQueue(LockFile, refFD, refAge, JustLook, forceUid) char *LockFile; int *refFD, *refAge, JustLook; + long forceUid; { char *suffix, *PostmanInCell; int SomeErrno, err, OwnerInCell; *************** *** 2478,2483 **** --- 2492,2508 ---- debug(32, ("Author of message is %d\n", OwnerInCell)); #endif /* AFS_ENV */ if (JustLook) close(*refFD); + if (forceUid != No_Owner && forceUid != OwnerInCell) { + close(MailSourceFD); + if (!JustLook) unlock(LockFile, *refFD, FALSE, 12); + #ifdef LPPlumb + CheckUnlocked(LockFile, 46); + #endif /* LPPlumb */ + sprintf(ErrorText, ".Outgoing file, e.g. `%s', not owned by caller! Files=%ld, caller=%ld.\n", LockFile, OwnerInCell, forceUid); + if (!RepeatError(EPERM, EPERM)) ErrorToPostmaster(ErrorText, NIL, FALSE); + ++index; + continue; + } #ifdef AFS_ENV if (SourceQueueCell[0] == '\0' || OwnerInCell == ANONYMOUSID) { *** ams/delivery/sendmail/Imakefile Wed Nov 22 11:41:53 1989 --- ams/delivery/sendmail/Imakefile.NEW Mon Oct 29 10:49:23 1990 *************** *** 16,23 **** NormalObjectRule() ProgramTarget(sendmail, sendmail.o, ${LIBS},) #ifdef RUN_AMDS_ENV ! InstallProgram(sendmail, ${ROOTDIR}/usr/lib/) ! ${RM} ${RM_FILES} #endif /* RUN_AMDS_ENV */ DependTarget() --- 16,24 ---- NormalObjectRule() ProgramTarget(sendmail, sendmail.o, ${LIBS},) #ifdef RUN_AMDS_ENV ! install.time:: ! @echo 'Sendmail has been built but not installed.' ! @echo 'Install sendmail manually when the system build has completed successfully.' #endif /* RUN_AMDS_ENV */ DependTarget() *** ams/delivery/mail/Imakefile Fri Aug 3 16:20:08 1990 --- ams/delivery/mail/Imakefile.NEW Mon Oct 29 10:49:26 1990 *************** *** 8,16 **** NormalObjectRule() ProgramTarget(mail, mail.o, ${LIBS},) ! #ifndef CMU_ENV #ifdef RUN_AMDS_ENV ! InstallProgram(mail, ${ROOTDIR}/bin/) #endif /* RUN_AMDS_ENV */ ! #endif /* CMU_ENV */ DependTarget() --- 8,18 ---- NormalObjectRule() ProgramTarget(mail, mail.o, ${LIBS},) ! #ifdef RUN_AMDS_ENV ! install.time:: ! @echo 'Mail has been built but not installed.' ! @echo 'Install mail manually when the system build has completed successfully.' #endif /* RUN_AMDS_ENV */ ! DependTarget() *** atk/Imakefile Wed Nov 22 11:44:21 1989 --- atk/Imakefile.NEW Tue Oct 30 19:22:37 1990 *************** *** 172,177 **** --- 172,181 ---- TABLE = table #endif + #ifdef MK_LAYOUT + LAYOUT = layout + #endif + #endif /* MK_BASIC_INSETS */ /* ============================================================ */ #ifdef MK_HELP *************** *** 334,339 **** --- 338,344 ---- $(LOOKZ) \ $(VALUE) \ $(LSET) \ + $(LAYOUT) \ $(CONTROLLERS) \ $(MUSIC) \ $(CREATEINSET) \ *** atk/apps/statload.c Mon Aug 6 11:01:18 1990 --- atk/apps/statload.c.NEW Tue Nov 20 13:19:30 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/apps/RCS/statload.c,v 2.10 90/07/12 13:34:07 ajp Exp $ */ /* $ACIS:statload.c 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/apps/RCS/statload.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/apps/RCS/statload.c,v 2.10 90/07/12 13:34:07 ajp Exp $"; #endif /* lint */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/apps/RCS/statload.c,v 2.10 90/07/12 13:34:07 ajp Exp Locker: ajp $ */ /* $ACIS:statload.c 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/apps/RCS/statload.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/apps/RCS/statload.c,v 2.10 90/07/12 13:34:07 ajp Exp Locker: ajp $"; #endif /* lint */ *** atk/apt/apt/aptv.c Wed Apr 11 14:17:40 1990 --- atk/apt/apt/aptv.c.NEW Mon Oct 8 14:24:48 1990 *************** *** 4,10 **** \* ********************************************************************** */ #ifndef lint ! static char *rcsidaptv = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/apt/apt/RCS/aptv.c,v 1.19 89/11/01 15:58:53 gk5g Exp Locker: gk5g $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* --- 4,10 ---- \* ********************************************************************** */ #ifndef lint ! static char *rcsidaptv = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/apt/apt/RCS/aptv.c,v 1.19 89/11/01 15:58:53 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* *** atk/apt/suite/suiteev.c Mon Aug 6 11:01:32 1990 --- atk/apt/suite/suiteev.c.NEW Mon Oct 29 10:49:57 1990 *************** *** 4,10 **** \* ********************************************************************** */ #ifndef lint ! static char *rcsidsuiteev_c = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/apt/suite/RCS/suiteev.c,v 1.33 90/06/13 18:59:52 gk5g Exp Locker: gk5g $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* --- 4,10 ---- \* ********************************************************************** */ #ifndef lint ! static char *rcsidsuiteev_c = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/apt/suite/RCS/suiteev.c,v 1.34 90/10/23 18:16:05 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* *************** *** 752,765 **** { register int i = 0; register struct suite_item *item = NULL; ! long itemIndex = 0, itemleft = 0, itemtop = 0; long int width = 0, height = 0, top = 0, left = 0; ! long int OrigWidth = 0, OrigHeight = 0, ! OrigTop = 0, OrigLeft = 0; long delta = 0; register long XIndex = 0, XMax = cols; register long YIndex = 0, YMax = rows; ! long Ax = 0, Bx = 0, Ay = 0, By = 0; IN(PlaceItems); rectangle_GetRectSize(rect,&left,&top,&width,&height); --- 752,768 ---- { register int i = 0; register struct suite_item *item = NULL; ! long itemIndex = 0; long int width = 0, height = 0, top = 0, left = 0; ! long int OrigWidth = 0, OrigHeight = 0; ! long int OrigTop = 0, OrigLeft = 0; long delta = 0; register long XIndex = 0, XMax = cols; register long YIndex = 0, YMax = rows; ! long Ax = 0, Ay = 0; ! long X_LeftOvers = 0, Y_LeftOvers = 0; ! register long AggrigateLeft = 0, AggrigateTop = 0; ! long X_epsilon = 0, Y_epsilon = 0; IN(PlaceItems); rectangle_GetRectSize(rect,&left,&top,&width,&height); *************** *** 768,775 **** else return; if(RowMajor && (numleftOvers > 0)) rows++; else if(ColumnMajor && (numleftOvers > 0)) cols++; ! width -= (cols * XGutterSize); ! height -= (rows * YGutterSize); if(!List) { if(ItemFixedWidth && (delta = (width - (cols * itemWidth))) > 0) { left += (delta / 2); --- 771,782 ---- else return; if(RowMajor && (numleftOvers > 0)) rows++; else if(ColumnMajor && (numleftOvers > 0)) cols++; ! width -= ((cols+1) * XGutterSize); ! height -= ((rows+1) * YGutterSize); ! Y_LeftOvers = height - (rows * itemHeight); ! X_LeftOvers = width - (cols * itemWidth); ! if(Y_LeftOvers < 0) Y_LeftOvers = 0; ! if(X_LeftOvers < 0) X_LeftOvers = 0; if(!List) { if(ItemFixedWidth && (delta = (width - (cols * itemWidth))) > 0) { left += (delta / 2); *************** *** 780,824 **** height -= delta; } } ! if(List && VisibleColumns == 1) { ! Ax = left + XGutterSize; ! Bx = itemWidth + XGutterSize + 1; ! Ay = top + YGutterSize; ! itemtop = Ay; ! } ! else { ! Ax = left + XGutterSize; Bx = itemWidth + XGutterSize; ! Ay = top + YGutterSize; By = itemHeight + YGutterSize; ! } i = vector_Subscript(Items,FirstVisible); while(item = ITEM(i++)) if(Exposed(item)) { itemIndex++; if(List && VisibleColumns == 1) { itemHeight = ((item_RealCaptionFontSize+2) * (suiteev_LineCount(self,item_Caption) + BreakCount(item))) + TwiceBorderSize; ! By = itemHeight + YGutterSize; ! itemleft = Ax + XIndex * Bx; ! item_SetUpperLeft(item,itemleft,itemtop); ! itemtop += By; } else { ! itemleft = Ax + XIndex * Bx; ! itemtop = Ay + YIndex * By; ! item_SetUpperLeft(item,itemleft,itemtop); } - item_SetDimensions(item,itemWidth,itemHeight); - rectangle_SetRectSize(&InsetRect,itemleft,itemtop, - itemWidth,itemHeight); if(RowMajor) { ! if(++XIndex == XMax) { ! XIndex = 0; ! YIndex++; } } else { if(++YIndex == YMax) { ! YIndex = 0; ! XIndex++; } } if((itemIndex == NumVisible) && (LastVisible = item)) break; --- 787,833 ---- height -= delta; } } ! AggrigateLeft = Ax = left + XGutterSize; ! AggrigateTop = Ay = top + YGutterSize; i = vector_Subscript(Items,FirstVisible); while(item = ITEM(i++)) if(Exposed(item)) { itemIndex++; + if(X_LeftOvers> XIndex) X_epsilon = 1; + else X_epsilon = 0; + if(Y_LeftOvers> YIndex) Y_epsilon = 1; + else Y_epsilon = 0; if(List && VisibleColumns == 1) { itemHeight = ((item_RealCaptionFontSize+2) * (suiteev_LineCount(self,item_Caption) + BreakCount(item))) + TwiceBorderSize; ! item_SetUpperLeft(item,AggrigateLeft,AggrigateTop); ! item_SetDimensions(item,itemWidth,itemHeight); ! rectangle_SetRectSize(&InsetRect,AggrigateLeft,AggrigateTop, ! itemWidth,itemHeight); } else { ! item_SetUpperLeft(item,AggrigateLeft,AggrigateTop); ! item_SetDimensions(item,itemWidth + X_epsilon, ! itemHeight + Y_epsilon); ! rectangle_SetRectSize(&InsetRect,AggrigateLeft,AggrigateTop, ! itemWidth + X_epsilon, ! itemHeight + Y_epsilon); } if(RowMajor) { ! AggrigateLeft += (itemWidth + X_epsilon + XGutterSize); ! if(++XIndex == XMax) { ! AggrigateTop += (itemHeight + Y_epsilon + YGutterSize); ! XIndex = 0; ! AggrigateLeft = Ax; ! YIndex++; } } else { + AggrigateTop += (itemHeight + Y_epsilon + YGutterSize); if(++YIndex == YMax) { ! AggrigateLeft += (itemWidth + X_epsilon + XGutterSize); ! YIndex = 0; ! AggrigateTop = Ay; ! XIndex++; } } if((itemIndex == NumVisible) && (LastVisible = item)) break; *************** *** 832,858 **** if(Balanced) { if(RowMajor) { width -= ((numleftOvers+1) * XGutterSize); ! left += (abs(width-(numleftOvers*itemWidth))/2); Ax = left + XGutterSize; } else if(ColumnMajor) { height -= ((numleftOvers+1) * YGutterSize); ! top += (abs(height-(numleftOvers*itemHeight))/2); Ay = top + YGutterSize; } } - if(RowMajor) XIndex = 0; - else YIndex = 0; while(item = ITEM(i++)) if(Exposed(item)) { itemIndex++; item_SetDimensions(item,itemWidth,List ? ((item_RealCaptionFontSize + 2) * (suiteev_LineCount(self,item_Caption) + BreakCount(item))) : itemHeight); ! itemleft = Ax + XIndex * Bx; ! itemtop = Ay + YIndex * By; ! item_SetUpperLeft(item,itemleft,itemtop); ! rectangle_SetRectSize(&InsetRect,itemleft,itemtop,itemWidth,itemHeight); ! if(RowMajor) XIndex++; ! else YIndex++; if((itemIndex == NumVisible) && (LastVisible = item)) break; } } --- 841,863 ---- if(Balanced) { if(RowMajor) { width -= ((numleftOvers+1) * XGutterSize); ! AggrigateLeft = (abs(width-(numleftOvers*itemWidth))/2); Ax = left + XGutterSize; } else if(ColumnMajor) { height -= ((numleftOvers+1) * YGutterSize); ! AggrigateTop = (abs(height-(numleftOvers*itemHeight))/2); Ay = top + YGutterSize; } } while(item = ITEM(i++)) if(Exposed(item)) { itemIndex++; item_SetDimensions(item,itemWidth,List ? ((item_RealCaptionFontSize + 2) * (suiteev_LineCount(self,item_Caption) + BreakCount(item))) : itemHeight); ! item_SetUpperLeft(item,AggrigateLeft,AggrigateTop); ! rectangle_SetRectSize(&InsetRect, AggrigateLeft, AggrigateTop, itemWidth, itemHeight); ! if(RowMajor) AggrigateLeft += (itemWidth + XGutterSize); ! else AggrigateTop += (itemHeight + YGutterSize); if((itemIndex == NumVisible) && (LastVisible = item)) break; } } *************** *** 893,899 **** width = 0, height = 0, top = 0, left = 0; long numleftOvers = 0, maxCols = 0; long maxRows = 0, numItems = 0; - long XGutterOffset = 0, YGutterOffset = 0; IN(suiteev_Arrange); if(!Items || ((numItems = suiteev_NumberExposed(self)) <= 0) || --- 898,903 ---- *************** *** 906,924 **** else if(!FirstVisible) FirstVisible = ITEM(0); suiteev_MaxStringSize(self,&itemWidth,&itemHeight); rectangle_GetRectSize(rect,&left,&top,&width,&height); ! XGutterOffset = ((XGutterSize > 0) ? (XGutterSize + 1) : 0); ! YGutterOffset = ((YGutterSize > 0) ? (YGutterSize + 1) : 0); ! if(ItemFixedHeight) minHeight = ItemFixedHeight + YGutterOffset; ! else minHeight = itemHeight + TwiceBorderSize + 2 + YGutterOffset; ! if(ItemFixedWidth) minWidth = ItemFixedWidth + XGutterOffset; ! else minWidth = itemWidth + TwiceBorderSize + (2 * CaptionMWidth) + XGutterOffset; if(List && (minWidth > width)) { ! if(width > (TwiceBorderSize+(2*CaptionMWidth)+XGutterOffset)) { suiteev_ShrinkWrap(self, width - TwiceBorderSize - ! (2*CaptionMWidth) - (2*XGutterOffset), height); suiteev_MaxStringSize(self,&itemWidth,&itemHeight); minHeight = itemHeight + TwiceBorderSize + 2; ! minWidth = width - TwiceBorderSize - (2*XGutterOffset); } } if(!Scroll) { --- 910,926 ---- else if(!FirstVisible) FirstVisible = ITEM(0); suiteev_MaxStringSize(self,&itemWidth,&itemHeight); rectangle_GetRectSize(rect,&left,&top,&width,&height); ! if(ItemFixedHeight) minHeight = ItemFixedHeight + YGutterSize; ! else minHeight = itemHeight + TwiceBorderSize + 2 + YGutterSize; ! if(ItemFixedWidth) minWidth = ItemFixedWidth + XGutterSize; ! else minWidth = itemWidth + TwiceBorderSize + (2 * CaptionMWidth) + XGutterSize; if(List && (minWidth > width)) { ! if(width > (TwiceBorderSize+(2*CaptionMWidth)+XGutterSize)) { suiteev_ShrinkWrap(self, width - TwiceBorderSize - ! (2*CaptionMWidth) - (2*XGutterSize), height); suiteev_MaxStringSize(self,&itemWidth,&itemHeight); minHeight = itemHeight + TwiceBorderSize + 2; ! minWidth = width - TwiceBorderSize - (2*XGutterSize); } } if(!Scroll) { *** atk/apt/suite/suite.c Mon Aug 6 11:01:49 1990 --- atk/apt/suite/suite.c.NEW Mon Oct 29 10:50:06 1990 *************** *** 7,13 **** /* $Source $ */ #ifndef lint ! static char *rcsidsuite_c = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/apt/suite/RCS/suite.c,v 1.35 90/06/13 19:01:45 gk5g Exp Locker: gk5g $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* --- 7,13 ---- /* $Source $ */ #ifndef lint ! static char *rcsidsuite_c = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/apt/suite/RCS/suite.c,v 1.35 90/06/13 19:01:45 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* *** atk/apt/suite/suiteta.c Mon Aug 6 11:02:02 1990 --- atk/apt/suite/suiteta.c.NEW Thu Sep 13 18:01:49 1990 *************** *** 525,531 **** lpair_VSplit( triple, pair, button_view, 20, 1 ); printf("Vsplit'ed\n"); frame = frame_New(); ! im = im_Create(NULL); frame_SetView(frame,triple); im_SetView( im, frame ); printf("Done\n"); --- 525,535 ---- lpair_VSplit( triple, pair, button_view, 20, 1 ); printf("Vsplit'ed\n"); frame = frame_New(); ! if((im = im_Create(NULL)) == NULL) { ! fprintf(stderr,"Could not create new window on this display.\n"); ! fprintf(stderr,"exiting.\n"); ! exit(-1); ! } frame_SetView(frame,triple); im_SetView( im, frame ); printf("Done\n"); *** atk/apt/tree/treev.c Wed Sep 26 16:02:22 1990 --- atk/apt/tree/treev.c.NEW Mon Sep 24 12:50:33 1990 *************** *** 4,10 **** \* ********************************************************************** */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/apt/tree/RCS/treev.c,v 1.29 90/07/30 12:57:43 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* --- 4,10 ---- \* ********************************************************************** */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/apt/tree/RCS/treev.c,v 1.30 90/09/20 12:52:13 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* *************** *** 1627,1669 **** register boolean folded = false; IN(Print_Tree); ! L = T = 99999; R = B = 0; ! shadow_peer = shadow_node; ! if ( shadow_parent = ParentNode(shadow_node) ) ! parent_shadow = ShadowNodeDatum(shadow_parent); ! while ( shadow_peer ) ! { ! shadow = ShadowNodeDatum(shadow_peer); ! DEBUGst(Node Name,NodeName(ShadowedNode(shadow))); ! if ( ShadowExposed(shadow) && ShadowTop(shadow) < Bottom ) ! { DEBUG(Exposed); ! Print_Node_Border( self, shadow ); ! treev_PrintString( self, SC, SM /*===*/-1, ! NodeCaptionName(ShadowedNode(shadow)), 0 ); ! if ( folded = ShadowFolded(shadow) ) ! { ! if ( SL < L ) L = SL - HalfMWidth; ! if ( ST < T ) T = ST - HalfMWidth; ! if ( SR > R ) R = SR + HalfMWidth; ! if ( SB > B ) B = SB + HalfMWidth; ! } ! else ! if ( parent_shadow ) ! Print_Node_Connector( self, shadow, parent_shadow ); ! if ( ShadowChildrenExposed(shadow) ) ! Print_Tree( self, ChildNode(shadow_peer) ); } ! shadow_peer = RightNode(shadow_peer); ! } ! if ( folded ) ! { ! treev_PrintBox( self, L+1, T+1, R-L-2, B-T-2, 0 ); ! treev_PrintBox( self, L+2, T+2, R-L-4, B-T-4, 0 ); ! if ( parent_shadow && !ShadowFolded(shadow) ) { ! treev_PrintLine( self, SC, T, SC, SB+1 ); } ! } OUT(Print_Tree); } --- 1627,1671 ---- register boolean folded = false; IN(Print_Tree); ! if(shadow_node) { ! L = T = 99999; R = B = 0; ! shadow_peer = shadow_node; ! if ( shadow_parent = ParentNode(shadow_node) ) ! parent_shadow = ShadowNodeDatum(shadow_parent); ! while ( shadow_peer ) ! { ! shadow = ShadowNodeDatum(shadow_peer); ! DEBUGst(Node Name,NodeName(ShadowedNode(shadow))); ! if ( ShadowExposed(shadow) && ShadowTop(shadow) < Bottom ) ! { DEBUG(Exposed); ! Print_Node_Border( self, shadow ); ! treev_PrintString( self, SC, SM /*===*/-1, ! NodeCaptionName(ShadowedNode(shadow)), 0 ); ! if ( folded = ShadowFolded(shadow) ) ! { ! if ( SL < L ) L = SL - HalfMWidth; ! if ( ST < T ) T = ST - HalfMWidth; ! if ( SR > R ) R = SR + HalfMWidth; ! if ( SB > B ) B = SB + HalfMWidth; ! } ! else ! if ( parent_shadow ) ! Print_Node_Connector( self, shadow, parent_shadow ); ! if ( ShadowChildrenExposed(shadow) ) ! Print_Tree( self, ChildNode(shadow_peer) ); ! } ! shadow_peer = RightNode(shadow_peer); } ! if ( folded ) { ! treev_PrintBox( self, L+1, T+1, R-L-2, B-T-2, 0 ); ! treev_PrintBox( self, L+2, T+2, R-L-4, B-T-4, 0 ); ! if ( parent_shadow && !ShadowFolded(shadow) ) ! { ! treev_PrintLine( self, SC, T, SC, SB+1 ); ! } } ! } OUT(Print_Tree); } *** atk/atkvers/atkvers.num Wed Sep 26 16:02:27 1990 --- atk/atkvers/atkvers.num.NEW Wed Nov 14 15:22:34 1990 *************** *** 1 **** ! 15.1 --- 1 ---- ! 15.5 *** atk/basics/x/xfontd.c Mon Aug 6 11:02:24 1990 --- atk/basics/x/xfontd.c.NEW Wed Nov 7 15:50:20 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xfontd.c,v 1.10 90/05/03 14:43:57 gk5g Exp $ */ /* $ACIS:fontdesc.c 1.4$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xfontd.c,v $ */ #ifndef lint ! char *xfontd_rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xfontd.c,v 1.10 90/05/03 14:43:57 gk5g Exp $"; #endif /* lint */ /* fontdesc.c --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xfontd.c,v 1.12 90/11/07 15:46:47 gk5g Exp $ */ /* $ACIS:fontdesc.c 1.4$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xfontd.c,v $ */ #ifndef lint ! char *xfontd_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xfontd.c,v 1.12 90/11/07 15:46:47 gk5g Exp $"; #endif /* lint */ /* fontdesc.c *************** *** 36,45 **** */ static boolean announceSubstitutions; - #define ENSUREGRAPHIC(retval) \ - {if (graphic == NULL || ! xgraphic_Valid(graphic)) {graphic = GetAnyOldGraphic(); \ - if (graphic == NULL || ! xgraphic_Valid(graphic)) return retval;}} - #define GETXFONT(self, graphic) \ ((XFontStruct *)xfontdesc_GetRealFontDesc(self, graphic)) #define MDFD ((struct fcache *)(((struct fontdesc *)self)->MachineDependentFontDescriptor)) --- 36,41 ---- *************** *** 360,367 **** return ((im == NULL) ? NULL : (struct xgraphic *)im->header.view.drawable); } - /* ************* methods ****************** */ struct graphic *xfontdesc__CvtCharToGraphic(self, graphic, SpecialChar) --- 356,373 ---- return ((im == NULL) ? NULL : (struct xgraphic *)im->header.view.drawable); } + static struct xgraphic * + EnsureGraphic( graphic ) + struct xgraphic *graphic; + { + if (graphic == NULL || ! xgraphic_Valid(graphic)) { + graphic = GetAnyOldGraphic(); + if (graphic == NULL || ! xgraphic_Valid(graphic)) + return(NULL); + } + return(graphic); + } /* ************* methods ****************** */ struct graphic *xfontdesc__CvtCharToGraphic(self, graphic, SpecialChar) *************** *** 381,387 **** XGCValues gcattr; int depth; ! ENSUREGRAPHIC(NULL); depth = 1; /* Force depth of one for Stippling. was: DefaultDepth(xgraphic_XDisplay(graphic), xgraphic_XScreen(graphic)); */ RetValue = xgraphic_New(); if (!RetValue) return NULL; --- 387,394 ---- XGCValues gcattr; int depth; ! if((graphic = EnsureGraphic(graphic)) == NULL) ! return(NULL); depth = 1; /* Force depth of one for Stippling. was: DefaultDepth(xgraphic_XDisplay(graphic), xgraphic_XScreen(graphic)); */ RetValue = xgraphic_New(); if (!RetValue) return NULL; *************** *** 452,458 **** struct xgraphic *graphic; { struct fcache *fc; ! ENSUREGRAPHIC(NULL); for ( fc = MDFD; fc != NULL && fc->host != xgraphic_XDisplay(graphic)->fd; fc = fc->next) --- 459,466 ---- struct xgraphic *graphic; { struct fcache *fc; ! if((graphic = EnsureGraphic(graphic)) == NULL) ! return(NULL); for ( fc = MDFD; fc != NULL && fc->host != xgraphic_XDisplay(graphic)->fd; fc = fc->next) *************** *** 473,479 **** XFontStruct *font; register long retWidth = 0; ! ENSUREGRAPHIC(NULL); font = GETXFONT(self,graphic); if (font) --- 481,488 ---- XFontStruct *font; register long retWidth = 0; ! if((graphic = EnsureGraphic(graphic)) == NULL) ! return(0); font = GETXFONT(self,graphic); if (font) *************** *** 496,502 **** if (self->header.fontdesc.widthTable) return self->header.fontdesc.widthTable; ! ENSUREGRAPHIC(NULL); fontWidthTable = (short *) malloc(fontdesc_NumIcons*sizeof(short)); self->header.fontdesc.widthTable = fontWidthTable; font = GETXFONT(self, graphic); --- 505,512 ---- if (self->header.fontdesc.widthTable) return self->header.fontdesc.widthTable; ! if((graphic = EnsureGraphic(graphic)) == NULL) ! return(NULL); fontWidthTable = (short *) malloc(fontdesc_NumIcons*sizeof(short)); self->header.fontdesc.widthTable = fontWidthTable; font = GETXFONT(self, graphic); *************** *** 535,541 **** if (self->header.fontdesc.heightTable) return self->header.fontdesc.heightTable; ! ENSUREGRAPHIC(NULL); fontHeightTable = (short *) malloc(fontdesc_NumIcons*sizeof(short)); self->header.fontdesc.heightTable = fontHeightTable; font = GETXFONT(self, graphic); --- 545,552 ---- if (self->header.fontdesc.heightTable) return self->header.fontdesc.heightTable; ! if((graphic = EnsureGraphic(graphic)) == NULL) ! return(NULL); fontHeightTable = (short *) malloc(fontdesc_NumIcons*sizeof(short)); self->header.fontdesc.heightTable = fontHeightTable; font = GETXFONT(self, graphic); *************** *** 575,581 **** register XFontStruct *font; register long retWidth = 0; ! ENSUREGRAPHIC(NULL); font = GETXFONT(self, graphic); if (font) retWidth = XTextWidth(font,string,strlen(string)); --- 586,593 ---- register XFontStruct *font; register long retWidth = 0; ! if((graphic = EnsureGraphic(graphic)) == NULL) ! return(0); font = GETXFONT(self, graphic); if (font) retWidth = XTextWidth(font,string,strlen(string)); *************** *** 593,599 **** register XFontStruct *font; if (!RetValue) return; ! ENSUREGRAPHIC(/* no return value */); font = GETXFONT(self, graphic); /* Is it a "small" font that we can handle? */ --- 605,612 ---- register XFontStruct *font; if (!RetValue) return; ! if((graphic = EnsureGraphic(graphic)) == NULL) ! return; font = GETXFONT(self, graphic); /* Is it a "small" font that we can handle? */ *** atk/basics/x/xim.c Wed Sep 26 16:02:44 1990 --- atk/basics/x/xim.c.NEW Mon Oct 29 10:50:25 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xim.c,v 1.42 90/09/07 15:11:59 gk5g Exp $ */ /* $ACIS:im.c 1.6$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xim.c,v $ */ #ifndef lint ! char *xim_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xim.c,v 1.42 90/09/07 15:11:59 gk5g Exp $"; #endif /* lint */ /* Put in error messages for handling of keystrokes. --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xim.c,v 1.44 90/10/23 14:56:30 gk5g Exp $ */ /* $ACIS:im.c 1.6$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xim.c,v $ */ #ifndef lint ! char *xim_rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xim.c,v 1.44 90/10/23 14:56:30 gk5g Exp $"; #endif /* lint */ /* Put in error messages for handling of keystrokes. *************** *** 194,199 **** --- 194,200 ---- static Atom xim_TEXT; static Atom xim_INCR; static Atom xim_CLIPBOARD; + static Atom xim_LENGTH; static long LeftIncrement, TopIncrement, CurrLeftIncr, CurrTopIncr; *************** *** 762,767 **** --- 763,769 ---- xim_TEXT = XInternAtom(xDisplay, "TEXT", FALSE); xim_INCR = XInternAtom(xDisplay, "INCR", FALSE); xim_CLIPBOARD = XInternAtom(xDisplay, "CLIPBOARD", FALSE); + xim_LENGTH = XInternAtom(xDisplay, "LENGTH", FALSE); } for (i=0;i<8;i++) { Atom RetAtom; *************** *** 2868,2880 **** &actualtype, &actualformat, &nitems, &remainingbytes, &propList); target = None; ! if (success == Success && actualtype == XA_ATOM) ! for (i = 0; DesirableTargets[i] != None && target == None; i++) ! for (j = 0; j < nitems && target == None; j++) if (DesirableTargets[i] == ((Atom *)propList)[j]) target = DesirableTargets[i]; XFree((caddr_t)propList); ! if (target == None) break; /* okay, we'll ask for the selection in type 'target' */ --- 2870,2898 ---- &actualtype, &actualformat, &nitems, &remainingbytes, &propList); target = None; ! if (success == Success) { ! /* ! * XXX - work around XView bug, wherein it gives the type ! * TARGETS rather than ATOM to the result. ! */ ! if (actualtype == xim_TARGETS) ! actualtype = XA_ATOM; ! if (actualtype == XA_ATOM) { ! for (i = 0; DesirableTargets[i] != None && target == None; i++) ! for (j = 0; j < nitems && target == None; j++) if (DesirableTargets[i] == ((Atom *)propList)[j]) target = DesirableTargets[i]; + } else + fprintf(stderr,"TARGETS targets isn't of type ATOM\n"); + } XFree((caddr_t)propList); ! if (target == None) { ! /* ! * They don't speak our language. ! */ ! fprintf(stderr,"Owner of selection handles neither ATK nor STRING nor TEXT\n"); ! break; ! } /* okay, we'll ask for the selection in type 'target' */ *************** *** 2898,2904 **** /* is is an INCR ? */ if (actualtype == xim_INCR) { /* nuts, it is INCR. start multiple retrievals */ ! remainingbytes = atoi(elt->string->string); if (*elt->xfree) XFree(elt->string->string); else free(elt->string->string); *elt->xfree = FALSE; --- 2916,2923 ---- /* is is an INCR ? */ if (actualtype == xim_INCR) { /* nuts, it is INCR. start multiple retrievals */ ! remainingbytes = *(long *)elt->string->string; ! if (*elt->xfree) XFree(elt->string->string); else free(elt->string->string); *elt->xfree = FALSE; *************** *** 3057,3065 **** ProcessRequest(req) XSelectionRequestEvent *req; { ! Atom targets[6]; struct expandstring cutBuffer; - char m[12]; boolean xfree; struct proplistelt *elt; Atom actualtype; --- 3076,3083 ---- ProcessRequest(req) XSelectionRequestEvent *req; { ! Atom targets[7]; struct expandstring cutBuffer; boolean xfree; struct proplistelt *elt; Atom actualtype; *************** *** 3075,3082 **** targets[3] = xim_TEXT; targets[4] = xim_TARGETS; targets[5] = xim_MULTIPLE; XChangeProperty(req->display, req->requestor, req->property, ! XA_ATOM, 32, PropModeReplace, (char *)targets, 6); } else if (req->target == xim_TIMESTAMP) { XChangeProperty(req->display, req->requestor, req->property, --- 3093,3101 ---- targets[3] = xim_TEXT; targets[4] = xim_TARGETS; targets[5] = xim_MULTIPLE; + targets[6] = xim_LENGTH; XChangeProperty(req->display, req->requestor, req->property, ! XA_ATOM, 32, PropModeReplace, (char *)targets, 7); } else if (req->target == xim_TIMESTAMP) { XChangeProperty(req->display, req->requestor, req->property, *************** *** 3084,3090 **** (char *)&SelectionStartTime, 1); } else if (req->target == xim_ATK || req->target == XA_STRING ! || req->target == xim_TEXT) { if ( ! IOwnSelection || (req->time != CurrentTime && 0 > (long)(req->time - SelectionStartTime))) { --- 3103,3110 ---- (char *)&SelectionStartTime, 1); } else if (req->target == xim_ATK || req->target == XA_STRING ! || req->target == xim_TEXT ! || req->target == xim_LENGTH) { if ( ! IOwnSelection || (req->time != CurrentTime && 0 > (long)(req->time - SelectionStartTime))) { *************** *** 3103,3142 **** req->property = None; return FALSE; } ! if (req->target == XA_STRING || req->target == xim_TEXT) { ! /* delete objects and remove styles */ Unscribe(&cutBuffer); - if (req->target == xim_TEXT) - req->target = XA_STRING; - } - - /* send the data to the requestor */ - if (cutBuffer.length < MAXXFER) { /* send it with one XChangeProperty */ ! XChangeProperty(req->display, req->requestor, req->property, ! req->target, 8, PropModeReplace, ! cutBuffer.string, cutBuffer.length); if (xfree) XFree(cutBuffer.string); else free(cutBuffer.string); ! } ! else { ! /* send it via INCR scheme */ ! SetPNMask(req->display, req->requestor); ! elt = PostPropList(req->requestor, req->property, ! prop_OutIncr, req->time); ! elt->string = (struct expandstring *) ! malloc(sizeof(struct expandstring)); ! *(elt->string) = cutBuffer; ! elt->xfree = (xfree) ? &xfree : NULL; ! /* the value of elt->xfree is tested ! for non-NULL, but *elt->xfree is not used */ ! elt->type = req->target; ! sprintf(m, "%d", elt->string->length); ! XChangeProperty(req->display, req->requestor, req->property, ! xim_INCR, 8, PropModeReplace, ! m, strlen(m)); ! /* the main Interact loop will handle PropertyEvents ! we have to exit to do the SelectionNotify */ } if (OriginalNerrors != Nerrors) { /* OOPS. There was an error. Reject the request. */ --- 3123,3185 ---- req->property = None; return FALSE; } ! if (req->target == xim_LENGTH) { ! /* ! * Keep XView happy by telling it how big the ! * selection is. The SunView System Programmer's ! * Guide says that SELN_REQ_BYTESIZE is "the number ! * of bytes in the selection's ascii(sic) contents", ! * and that's what XView turns into a request for ! * LENGTH, so we delete objects and remove styles, ! * and give them the resulting size. ! */ Unscribe(&cutBuffer); /* send it with one XChangeProperty */ ! XChangeProperty(req->display, req->requestor, ! req->property, req->target, 32, ! PropModeReplace, ! (unsigned char *)&cutBuffer.length, 1); if (xfree) XFree(cutBuffer.string); else free(cutBuffer.string); ! } else { ! if (req->target == XA_STRING || req->target == xim_TEXT) { ! /* delete objects and remove styles */ ! Unscribe(&cutBuffer); ! if (req->target == xim_TEXT) ! req->target = XA_STRING; ! } ! ! /* send the data to the requestor */ ! if (cutBuffer.length < MAXXFER) { ! /* send it with one XChangeProperty */ ! XChangeProperty(req->display, req->requestor, ! req->property, req->target, 8, ! PropModeReplace, cutBuffer.string, ! cutBuffer.length); ! if (xfree) XFree(cutBuffer.string); ! else free(cutBuffer.string); ! } ! else { ! /* send it via INCR scheme */ ! SetPNMask(req->display, req->requestor); ! elt = PostPropList(req->requestor, ! req->property, prop_OutIncr, req->time); ! elt->string = (struct expandstring *) ! malloc(sizeof(struct expandstring)); ! *(elt->string) = cutBuffer; ! elt->xfree = (xfree) ? &xfree : NULL; ! /* the value of elt->xfree is tested ! for non-NULL, but *elt->xfree is not used */ ! elt->type = req->target; ! XChangeProperty(req->display, req->requestor, ! req->property,xim_INCR, 32, ! PropModeReplace, ! (unsigned char *)&elt->string->length, ! 1); ! /* the main Interact loop will handle ! PropertyEvents we have to exit to do the ! SelectionNotify */ ! } } if (OriginalNerrors != Nerrors) { /* OOPS. There was an error. Reject the request. */ *** atk/basics/common/Imakefile Fri Aug 3 16:23:31 1990 --- atk/basics/common/Imakefile.NEW Thu Sep 13 18:02:16 1990 *************** *** 55,61 **** #ifdef sys_rt_r3 InstallClassFiles(im.do, im.ih) #endif /* sys_rt_r3 */ - InstallMultiple(physical.h point.h rect.h attribs.h im.ch im.ih, ${INSTINCFLAGS}, ${DESTDIR}/include/atk/) DependTarget() --- 55,60 ---- *** atk/basics/common/fontdesc.c Wed Sep 26 16:02:59 1990 --- atk/basics/common/fontdesc.c.NEW Thu Oct 11 14:45:52 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/fontdesc.c,v 2.8 90/08/17 14:44:38 ajp Exp $ */ /* $ACIS:fontdesc.c 1.3$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/fontdesc.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/fontdesc.c,v 2.8 90/08/17 14:44:38 ajp Exp $"; #endif /* lint */ #include --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/fontdesc.c,v 2.8 90/08/17 14:44:38 ajp Exp Locker: gk5g $ */ /* $ACIS:fontdesc.c 1.3$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/fontdesc.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/fontdesc.c,v 2.8 90/08/17 14:44:38 ajp Exp Locker: gk5g $"; #endif /* lint */ #include *** atk/basics/common/im.c Wed Sep 26 16:03:12 1990 --- atk/basics/common/im.c.NEW Mon Sep 17 12:23:19 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/im.c,v 2.34 90/08/17 14:41:23 ajp Exp $ */ /* $ACIS:im.c 1.5$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/im.c,v $ */ #ifndef lint ! char *im_rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/im.c,v 2.34 90/08/17 14:41:23 ajp Exp $"; #endif /* lint */ /* Put in error messages for handling of keystrokes. --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/im.c,v 2.36 90/09/13 19:16:27 wjh Exp $ */ /* $ACIS:im.c 1.5$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/im.c,v $ */ #ifndef lint ! char *im_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/im.c,v 2.36 90/09/13 19:16:27 wjh Exp $"; #endif /* lint */ /* Put in error messages for handling of keystrokes. *************** *** 912,918 **** { struct proctable_Entry *procTableEntry; struct basicobject *object; ! long rock; long dest = destroycount; if (self->keystate == NULL) return self; --- 912,918 ---- { struct proctable_Entry *procTableEntry; struct basicobject *object; ! long rock = 0L; long dest = destroycount; if (self->keystate == NULL) return self; *************** *** 2362,2379 **** } static struct bind_Description imBindings[]={ ! {"exit", "\030\003",0,"Quit~99",0,0,im__KeyboardExit,"Exit program."}, ! {"start-keyboard-macro", "\030(",0,NULL,0,0,StartKeyboardMacro ,"Start recording input events."}, ! {"stop-keyboard-macro", "\030)",0,NULL,0,0,StopKeyboardMacro,"Stop recording input events."}, ! {"play-keyboard-macro", "\030e",0,NULL,0,0,PlayKeyboardMacro,"Play current keyboard macro."}, ! {"redraw-window", "\014",0,NULL,0,0,RedrawWindow,"Redraw the window."}, ! ! {"im-print-malloc-statistics", "\030\200m",0,NULL,0,0,PrintMallocStats,"Print malloc statisticsp to a file."}, ! {"im-reset-malloc-statistics", "\030\200r",0,NULL,0,0,ResetMallocStats,"Reset malloc statistics."}, ! {"im-print-malloc-table", "\030\200t",0,NULL,0,0,PrintMallocTable,"Print malloc table to a file."}, ! {"im-start-profile", "\030\200p",0,NULL,0,0,StartProfiling,"Start profiling program."}, ! {"im-stop-profile", "\030\200q",0,NULL,0,0,StopProfiling,"Stop profiling program."}, ! NULL }; /* This array is magic in that its first entry is the default. */ --- 2362,2395 ---- } static struct bind_Description imBindings[]={ ! {"im-exit-program", "\030\003", 0, "Quit~99", 0, 0, im__KeyboardExit, ! "Exit program."}, ! {"im-start-keyboard-macro", "\030(", 0, NULL, 0, 0, StartKeyboardMacro , ! "Start recording input events."}, ! {"im-stop-keyboard-macro", "\030)", 0, NULL, 0, 0, StopKeyboardMacro, ! "Stop recording input events."}, ! {"im-play-keyboard-macro", "\030e", 0, NULL, 0, 0, PlayKeyboardMacro, ! "Play current keyboard macro."}, ! {"im-redraw-window", "\014", 0, NULL, 0, 0, RedrawWindow, ! "Redraw the window."}, ! ! {"exit", 0, 0, 0, 0, 0, im__KeyboardExit, "Obsolete"}, ! {"start-keyboard-macro", 0, 0, 0, 0, 0, StartKeyboardMacro, "Obsolete"}, ! {"stop-keyboard-macro", 0, 0, 0, 0, 0, StopKeyboardMacro, "Obsolete"}, ! {"play-keyboard-macro", 0, 0, 0, 0, 0, PlayKeyboardMacro, "Obsolete"}, ! {"redraw-window", 0, 0, 0, 0, 0, RedrawWindow, "Obsolete"}, ! ! {"im-print-malloc-statistics", "\030\200m", 0, NULL, 0, 0, PrintMallocStats, ! "Print malloc statisticsp to a file."}, ! {"im-reset-malloc-statistics", "\030\200r", 0, NULL, 0, 0, ResetMallocStats, ! "Reset malloc statistics."}, ! {"im-print-malloc-table", "\030\200t", 0, NULL, 0, 0, PrintMallocTable, ! "Print malloc table to a file."}, ! {"im-start-profile", "\030\200p", 0, NULL, 0, 0, StartProfiling, ! "Start profiling program."}, ! {"im-stop-profile", "\030\200q", 0, NULL, 0, 0, StopProfiling, ! "Stop profiling program."}, ! NULL }; /* This array is magic in that its first entry is the default. */ *** atk/basics/common/improc.help Wed Nov 22 11:51:51 1989 --- atk/basics/common/improc.help.NEW Mon Sep 17 12:23:23 1990 *************** *** 1,4 **** ! \begindata{text,268794320} \textdsversion{12} \template{help} \chapter{Proclist for Im} --- 1,4 ---- ! \begindata{text,272799772} \textdsversion{12} \template{help} \chapter{Proclist for Im} *************** *** 5,19 **** \chapter{ } ! "exit", "\\030\\003", "Quit~99", "Exit program." ! "start-keyboard-macro", "\\030(", "Start recording input events." ! "stop-keyboard-macro", "\\030)", "Stop recording input events." ! "play-keyboard-macro", "\\030e", "Play current keyboard macro." ! "redraw-window", "\\014", "Redraw the window." "im-print-malloc-statistics", "\\030\\200m", "Print malloc statisticsp to a file." --- 5,19 ---- \chapter{ } ! "im-exit", "\\030\\003", "Quit~99", "Exit program." ! "im-start-keyboard-macro", "\\030(", "Start recording input events." ! "im-stop-keyboard-macro", "\\030)", "Stop recording input events." ! "im-play-keyboard-macro", "\\030e", "Play current keyboard macro." ! "im-redraw-window", "\\014", "Redraw the window." "im-print-malloc-statistics", "\\030\\200m", "Print malloc statisticsp to a file." *************** *** 28,31 **** ! \enddata{text,268794320} --- 28,31 ---- ! \enddata{text,272799772} *** atk/basics/common/view.ch Wed Sep 26 16:03:47 1990 --- atk/basics/common/view.ch.NEW Mon Sep 24 12:50:52 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/view.ch,v 2.13 90/08/13 14:03:37 sg08 Exp $ */ /* $ACIS:view.ch 1.3$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/view.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidview_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/view.ch,v 2.13 90/08/13 14:03:37 sg08 Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/view.ch,v 2.15 90/09/18 17:37:29 sg08 Exp $ */ /* $ACIS:view.ch 1.3$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/view.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidview_H = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/view.ch,v 2.15 90/09/18 17:37:29 sg08 Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ *************** *** 126,132 **** macromethods: MoveToPt(Pt) (graphic_MoveToPt((self)->drawable,(Pt))) MoveTo(NewX,NewY) (graphic_MoveTo((self)->drawable,(NewX),(NewY))) ! Move(DeltaX, DeltaY) (graphic_MoveTo((self)->drawable,(DeltaX),(DeltaY))) GetLogicalBounds(Rect) (graphic_GetLogicalBounds((self)->drawable,(Rect))) GetLogicalBoundsSize(x, y, width, height) (graphic_GetLogicalBoundsSize((self)->drawable,(x),(y),(width),(height))) --- 126,132 ---- macromethods: MoveToPt(Pt) (graphic_MoveToPt((self)->drawable,(Pt))) MoveTo(NewX,NewY) (graphic_MoveTo((self)->drawable,(NewX),(NewY))) ! Move(DeltaX, DeltaY) (graphic_Move((self)->drawable,(DeltaX),(DeltaY))) GetLogicalBounds(Rect) (graphic_GetLogicalBounds((self)->drawable,(Rect))) GetLogicalBoundsSize(x, y, width, height) (graphic_GetLogicalBoundsSize((self)->drawable,(x),(y),(width),(height))) *************** *** 222,228 **** GetLineWidth() (graphic_GetLineWidth((self)->drawable)) SetLineDash( dashPattern, dashOffset, dashType ) (graphic_SetLineDash((self)->drawable, (dashPattern), (dashOffset), (dashType))) ! GetLineDash() (graphic_GetLineDash((self)->drawable, (dashPattern), (dashOffset), (dashType))) SetLineCap(NewLineCap) (graphic_SetLineCap((self)->drawable, (NewLineCap))) GetLineCap() (graphic_GetLineCap((self)->drawable)) --- 222,228 ---- GetLineWidth() (graphic_GetLineWidth((self)->drawable)) SetLineDash( dashPattern, dashOffset, dashType ) (graphic_SetLineDash((self)->drawable, (dashPattern), (dashOffset), (dashType))) ! GetLineDash( dashPattern, dashOffset, dashType ) (graphic_GetLineDash((self)->drawable, (dashPattern), (dashOffset), (dashType))) SetLineCap(NewLineCap) (graphic_SetLineCap((self)->drawable, (NewLineCap))) GetLineCap() (graphic_GetLineCap((self)->drawable)) *** atk/bush/bushapp.c Mon Aug 6 11:03:31 1990 --- atk/bush/bushapp.c.NEW Mon Sep 24 12:50:58 1990 *************** *** 4,10 **** \* ********************************************************************** */ #ifndef lint ! static char *rcsidbushapp_c = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/bush/RCS/bushapp.c,v 1.9 90/05/12 17:30:06 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* --- 4,10 ---- \* ********************************************************************** */ #ifndef lint ! static char *rcsidbushapp_c = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/bush/RCS/bushapp.c,v 1.10 90/09/20 12:41:23 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* *************** *** 110,115 **** --- 110,130 ---- return(FALSE); ArgC = argc; ArgV = argv; + while(argc > 1) { + switch(*argv[argc-1]) { + case('-'): + printf("bush: illegal argument '%s'; exiting.\n", argv[argc-1]); + printf(" usage: bush [directory]\n"); + exit(-1); + default: + argc--; + break; + } + } + if(ArgC > 2) { + printf("usage: bush [directory]\n"); + printf("bush: using '%s' as root directory.\n", ArgV[1]); + } return(TRUE); } *** atk/bush/bush.c Mon Aug 6 11:03:35 1990 --- atk/bush/bush.c.NEW Mon Sep 24 12:51:00 1990 *************** *** 4,10 **** \* ********************************************************************** */ #ifndef lint ! static char *rcsidbush_c = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/bush/RCS/bush.c,v 1.20 90/06/06 17:05:35 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* --- 4,10 ---- \* ********************************************************************** */ #ifndef lint ! static char *rcsidbush_c = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/bush/RCS/bush.c,v 1.21 90/09/20 12:40:04 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* *************** *** 103,108 **** --- 103,111 ---- tree_Specification DirTree[] = {tree_Order(tree_PreOrder),NULL}; + extern int errno, sys_nerr; + extern char *sys_errlist[]; + char baseName[] = "/afs"; /*Pathname to give to pioctl()*/ #define MAX_PIOCTL_BUFF_SIZE 1000 static char *gethomecell(), *getcell(); *************** *** 124,130 **** register struct bush *self = NULL; if(self = bush_New()) { ! if(init_dir && (init_dir[0] != '\0')) strcpy(GivenDirName,init_dir); else im_GetDirectory(GivenDirName); bush_InitTree(self,GivenDirName); --- 127,133 ---- register struct bush *self = NULL; if(self = bush_New()) { ! if(init_dir && (init_dir[0] != '\0')) strcpy(GivenDirName,init_dir); else im_GetDirectory(GivenDirName); bush_InitTree(self,GivenDirName); *************** *** 224,234 **** RootPath = NULL; } ExtractNodePath(self,root_path,&RootPath); ! strcpy(GivenDirName,root_path); strcpy(tmp,RootPath); ExtractNodeName(tmp,&nodeName); AllocNameSpace(nodeName,&rootDir->name); ! if(stat(RootPath,&stats)) return; else { gethomecell(self,baseName); root = tree_CreateRootNode(Tree,rootDir->name,(char*)rootDir); --- 227,247 ---- RootPath = NULL; } ExtractNodePath(self,root_path,&RootPath); ! if(access(RootPath,F_OK) < 0) { ! printf("bush: directory '%s' does not exist or cannot be searched.\n", ! RootPath); ! free(RootPath); ! im_GetDirectory(GivenDirName); ! AllocNameSpace(GivenDirName,&RootPath); ! } ! else strcpy(GivenDirName,root_path); strcpy(tmp,RootPath); ExtractNodeName(tmp,&nodeName); AllocNameSpace(nodeName,&rootDir->name); ! if(stat(RootPath,&stats) < 0) { ! printf("bush: error '%s' encountered while scanning '%s'.\n", sys_errlist[errno]); ! return; ! } else { gethomecell(self,baseName); root = tree_CreateRootNode(Tree,rootDir->name,(char*)rootDir); *** atk/calc/calcv.c Wed Nov 22 11:52:46 1989 --- atk/calc/calcv.c.NEW Mon Sep 24 12:51:10 1990 *************** *** 7,17 **** /* $Source $ */ #ifndef lint ! static char *rcsidcalcv = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/calc/RCS/calcv.c,v 1.10 89/11/06 16:06:46 gk5g Exp $"; #endif /* $Log: calcv.c,v $ * Revision 1.10 89/11/06 16:06:46 gk5g * In calcv_InitializeObject changed test to determine if the area is the DisplayArea by looking at the index of the Area. * --- 7,20 ---- /* $Source $ */ #ifndef lint ! static char *rcsidcalcv = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/calc/RCS/calcv.c,v 1.11 90/09/18 19:50:59 gk5g Exp $"; #endif /* $Log: calcv.c,v $ + * Revision 1.11 90/09/18 19:50:59 gk5g + * Removed reliance on char* return value of sprintf. + * * Revision 1.10 89/11/06 16:06:46 gk5g * In calcv_InitializeObject changed test to determine if the area is the DisplayArea by looking at the index of the Area. * *************** *** 270,276 **** IN(calcv_SetDataObject); super_SetDataObject( self, data ); DEBUGgt(Value,calc_Value( Data )); ! Shrink( sprintf( Operand1, "%f", calc_Value( Data ) ) ); strcpy( Expression, Operand1 ); strcpy( PriorExpression, Expression ); DEBUGst(Operand1,Operand1); --- 273,280 ---- IN(calcv_SetDataObject); super_SetDataObject( self, data ); DEBUGgt(Value,calc_Value( Data )); ! sprintf( Operand1, "%f", calc_Value( Data ) ); ! Shrink( Operand1 ); strcpy( Expression, Operand1 ); strcpy( PriorExpression, Expression ); DEBUGst(Operand1,Operand1); *************** *** 380,386 **** switch ( value ) { case calc_value_changed: ! Shrink( sprintf( Expression, "%f", calc_Value( Data ) ) ); strcpy( Operand1, Expression ); *Operand2 = 0; PendingDisplay = true; --- 384,391 ---- switch ( value ) { case calc_value_changed: ! sprintf( Expression, "%f", calc_Value( Data ) ); ! Shrink( Expression ); strcpy( Operand1, Expression ); *Operand2 = 0; PendingDisplay = true; *************** *** 561,567 **** case 'X': value = operand_1 * operand_2; break; case '/': value = operand_1 / ((operand_2) ? operand_2 : 1); break; } ! Shrink( sprintf( Expression, "%f", value ) ); strcpy( Operand1, Expression ); *Operand2 = 0; } --- 566,573 ---- case 'X': value = operand_1 * operand_2; break; case '/': value = operand_1 / ((operand_2) ? operand_2 : 1); break; } ! sprintf( Expression, "%f", value ); ! Shrink( Expression ); strcpy( Operand1, Expression ); *Operand2 = 0; } *** atk/champ/chump.c Wed Nov 22 11:53:19 1989 --- atk/champ/chump.c.NEW Mon Sep 24 12:51:17 1990 *************** *** 46,50 **** --- 46,51 ---- IncrementDate(thisdate); --lefttocheck; } + exit(0); } *** atk/chart/chartapp.c Wed Nov 22 11:54:13 1989 --- atk/chart/chartapp.c.NEW Thu Sep 13 18:02:41 1990 *************** *** 4,10 **** \* ********************************************************************** */ #ifndef lint ! static char *rcsidchartapp_c = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/chart/RCS/chartapp.c,v 1.7 89/09/07 19:44:48 tom Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* --- 4,10 ---- \* ********************************************************************** */ #ifndef lint ! static char *rcsidchartapp_c = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/chart/RCS/chartapp.c,v 1.8 90/09/11 14:24:57 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* *************** *** 127,135 **** chartv_SetDebug( ChartView, debug ); if ( Chart && ChartView ) { ! Frame = frame_New(); frame_SetView( Frame, ChartView ); ! Im = im_Create(NULL); im_SetView( Im, Frame ); if ( *Source ) { --- 127,141 ---- chartv_SetDebug( ChartView, debug ); if ( Chart && ChartView ) { ! if((Frame = frame_New()) == NULL) { ! fprintf(stderr,"Could not allocate enough memory.\nexiting.\n"); ! exit(-1); ! } frame_SetView( Frame, ChartView ); ! if((Im = im_Create(NULL)) == NULL) { ! fprintf(stderr,"Could not create new window.\nexiting.\n"); ! exit(-1); ! } im_SetView( Im, Frame ); if ( *Source ) { *** atk/chart/chartp.c Mon Aug 6 11:03:58 1990 --- atk/chart/chartp.c.NEW Thu Sep 13 18:02:43 1990 *************** *** 4,10 **** \* ********************************************************************** */ #ifndef lint ! static char *rcsidchartp = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/chart/RCS/chartp.c,v 1.7 90/06/13 18:54:49 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* --- 4,10 ---- \* ********************************************************************** */ #ifndef lint ! static char *rcsidchartp = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/chart/RCS/chartp.c,v 1.8 90/09/11 14:41:22 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* *************** *** 478,484 **** IN(Expose_Palette); if ( ! PaletteExposed && Initialize_Palette( self ) == ok ) { DEBUG(Expose); ! PaletteIm = im_Create( NULL ); im_SetView( PaletteIm, PaletteFrame ); im_SetTitle( PaletteIm, "Auxiliary Chart Palette" ); menulist_SetMask( Menu, (menulist_GetMask( Menu ) & --- 478,487 ---- IN(Expose_Palette); if ( ! PaletteExposed && Initialize_Palette( self ) == ok ) { DEBUG(Expose); ! if((PaletteIm = im_Create( NULL )) == NULL) { ! fprintf(stderr,"Could not create new window.\nexiting.\n"); ! exit(-1); ! } im_SetView( PaletteIm, PaletteFrame ); im_SetTitle( PaletteIm, "Auxiliary Chart Palette" ); menulist_SetMask( Menu, (menulist_GetMask( Menu ) & *** atk/chart/chartv.c Mon Aug 6 11:04:00 1990 --- atk/chart/chartv.c.NEW Mon Oct 8 14:26:55 1990 *************** *** 4,10 **** \* ********************************************************************** */ #ifndef lint ! static char *rcsidchartv = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/chart/RCS/chartv.c,v 1.19 90/06/13 18:54:59 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* --- 4,10 ---- \* ********************************************************************** */ #ifndef lint ! static char *rcsidchartv = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/chart/RCS/chartv.c,v 1.21 90/10/04 13:47:02 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* *************** *** 79,85 **** static struct menulist *class_menulist; static struct keymap *class_keymap; ! extern long sys_nerr; extern char *sys_errlist[]; --- 79,85 ---- static struct menulist *class_menulist; static struct keymap *class_keymap; ! extern int sys_nerr; extern char *sys_errlist[]; *************** *** 565,571 **** } /*===*/ chart_SetModified( Chart ); ! suite_Reset( ControlSuite, suite_Normalize ); OUT(Add_Command); } --- 565,572 ---- } /*===*/ chart_SetModified( Chart ); ! if( PaletteInitialized ) ! suite_Reset( ControlSuite, suite_Normalize ); OUT(Add_Command); } *************** *** 581,587 **** chart_NotifyObservers( Chart, chart_ItemDestroyed ); chart_SetModified( Chart ); } ! suite_Reset( ControlSuite, suite_Normalize ); OUT(Delete_Command); } --- 582,589 ---- chart_NotifyObservers( Chart, chart_ItemDestroyed ); chart_SetModified( Chart ); } ! if( PaletteInitialized ) ! suite_Reset( ControlSuite, suite_Normalize ); OUT(Delete_Command); } *************** *** 670,676 **** } else chartv_Announce( self, "Error Printing" ); chartv_UseNormalCursor( self ); ! suite_Reset( ControlSuite, suite_Normalize ); OUT(Print_Command); } --- 672,679 ---- } else chartv_Announce( self, "Error Printing" ); chartv_UseNormalCursor( self ); ! if( PaletteInitialized ) ! suite_Reset( ControlSuite, suite_Normalize ); OUT(Print_Command); } *************** *** 745,751 **** } chartv_UseNormalCursor( self ); } ! suite_Reset( ControlSuite, suite_Normalize ); OUT(Save_Command); } --- 748,755 ---- } chartv_UseNormalCursor( self ); } ! if( PaletteInitialized ) ! suite_Reset( ControlSuite, suite_Normalize ); OUT(Save_Command); } *** atk/chart/chartx1a.c Wed Nov 22 11:54:43 1989 --- atk/chart/chartx1a.c.NEW Thu Sep 13 18:02:45 1990 *************** *** 67,75 **** chart_ItemValue( education ) ); chart_SetItemAttribute( Chart, chart_CreateItem( Chart, "Vacation", NULL ), chart_ItemValue( vacation ) ); ! Frame = frame_New(); frame_SetView( Frame, ChartView ); ! Im = im_Create(NULL); im_SetView( Im, Frame ); chartv_SetDataObject( ChartView, Chart ); chartv_WantInputFocus( ChartView, ChartView ); --- 67,81 ---- chart_ItemValue( education ) ); chart_SetItemAttribute( Chart, chart_CreateItem( Chart, "Vacation", NULL ), chart_ItemValue( vacation ) ); ! if((Frame = frame_New()) == NULL) { ! fprintf(stderr,"Could not allocate enough memory.\nexiting.\n"); ! exit(-1); ! } frame_SetView( Frame, ChartView ); ! if((Im = im_Create(NULL)) == NULL) { ! fprintf(stderr,"Could not create new window.\exiting.\n"); ! exit(-1); ! } im_SetView( Im, Frame ); chartv_SetDataObject( ChartView, Chart ); chartv_WantInputFocus( ChartView, ChartView ); *** atk/console/cmd/consolea.c Wed Sep 26 16:03:54 1990 --- atk/console/cmd/consolea.c.NEW Thu Sep 13 18:02:55 1990 *************** *** 6,16 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/cmd/RCS/consolea.c,v 1.12 90/08/09 15:16:01 gk5g Exp $ */ /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/cmd/RCS/consolea.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/cmd/RCS/consolea.c,v 1.12 90/08/09 15:16:01 gk5g Exp $"; #endif /* lint */ /* --- 6,16 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/cmd/RCS/consolea.c,v 1.13 90/09/11 14:49:31 gk5g Exp $ */ /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/cmd/RCS/consolea.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/cmd/RCS/consolea.c,v 1.13 90/09/11 14:49:31 gk5g Exp $"; #endif /* lint */ /* *************** *** 134,140 **** if (MaxHeight < MinHeight) MaxHeight = MinHeight; im_SetPreferedDimensions(0, 0, MaxWidth, MaxHeight); if ((im = im_Create(NULL)) == NULL) { ! printf("Could not open the display; this program will not run without a window system.\n"); return FALSE; } im_SetView(im, con); --- 134,140 ---- if (MaxHeight < MinHeight) MaxHeight = MinHeight; im_SetPreferedDimensions(0, 0, MaxWidth, MaxHeight); if ((im = im_Create(NULL)) == NULL) { ! fprintf(stderr,"Could not create new window.\nexiting.\n"); return FALSE; } im_SetView(im, con); *** atk/console/cmd/vopcona.c Wed Nov 22 11:55:39 1989 --- atk/console/cmd/vopcona.c.NEW Thu Sep 13 18:02:56 1990 *************** *** 3,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/console/cmd/RCS/vopcona.c,v 1.12 89/10/04 18:59:45 cfe Exp $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/console/cmd/RCS/vopcona.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/console/cmd/RCS/vopcona.c,v 1.12 89/10/04 18:59:45 cfe Exp $"; #endif /* lint */ /* --- 3,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/cmd/RCS/vopcona.c,v 1.13 90/09/11 14:53:09 gk5g Exp $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/cmd/RCS/vopcona.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/cmd/RCS/vopcona.c,v 1.13 90/09/11 14:53:09 gk5g Exp $"; #endif /* lint */ /* *************** *** 125,131 **** if (MaxHeight < MinHeight) MaxHeight = MinHeight; im_SetPreferedDimensions(0, 0, MaxWidth, MaxHeight); if ((im = im_Create(NULL)) == NULL) { ! printf("Could not open the display; this program will not run without a window system.\n"); return FALSE; } im_SetView(im, con); --- 125,131 ---- if (MaxHeight < MinHeight) MaxHeight = MinHeight; im_SetPreferedDimensions(0, 0, MaxWidth, MaxHeight); if ((im = im_Create(NULL)) == NULL) { ! fprintf(stderr,"Could not create new window.\nexiting.\n"); return FALSE; } im_SetView(im, con); *** atk/console/consoles/fudgenut.con Wed Nov 22 11:55:51 1989 --- atk/console/consoles/fudgenut.con.NEW Mon Oct 1 16:01:12 1990 *************** *** 234,240 **** DisplayType Indicator, Xmin 50, Xmax 80, Ymin 0, Ymax 12, TextFont "andysans12b", ! Text "Venus Activity", HighlightInvertMin 1, HighlightInvertMax 9999, Boxed) --- 234,240 ---- DisplayType Indicator, Xmin 50, Xmax 80, Ymin 0, Ymax 12, TextFont "andysans12b", ! Text "AFS Activity", HighlightInvertMin 1, HighlightInvertMax 9999, Boxed) *** atk/console/doc/console.help Wed Nov 22 12:00:09 1989 --- atk/console/doc/console.help.NEW Mon Oct 1 16:02:25 1990 *************** *** 1,4 **** ! \begindata{text,268672040} \textdsversion{12} \template{help} \chapter{Console: A System Monitor --- 1,4 ---- ! \begindata{text,269374956} \textdsversion{12} \template{help} \chapter{Console: A System Monitor *************** *** 43,50 **** \bold{Date/time:} The time is displayed in the upper-leftmost corner, by default it displays hours and minutes. Next to it is a small box which is blank until you set the Alarm (see menus - below). In the middle is the day ! and date (month/date/year), and next to that is simply a title (Venus ! Activity) for the box below it. \bold{Basic system status:} The large EKG graph on the left-hand side is a --- 43,50 ---- \bold{Date/time:} The time is displayed in the upper-leftmost corner, by default it displays hours and minutes. Next to it is a small box which is blank until you set the Alarm (see menus - below). In the middle is the day ! and date (month/date/year), and next to that is simply a title (AFS Activity) ! for the box below it. \bold{Basic system status:} The large EKG graph on the left-hand side is a *************** *** 65,71 **** two seconds. ! }}\leftindent{On the right hand side is the Venus Activity log (if you are not running AFS - do not expect to see anything in it) it will display the fetching and storing of files along with timestamps of when the fetch/store occured. --- 65,71 ---- two seconds. ! }}\leftindent{On the right hand side is the AFS Activity log (if you are not running AFS - do not expect to see anything in it) it will display the fetching and storing of files along with timestamps of when the fetch/store occured. *************** *** 265,280 **** "Display" menu and trying the Consoles that appear on the expanded menus. If you find that you prefer a Console other than the default or "Monitor" Console, you can make the new Console your default by either by adding the ! name of the Console to the wm.startup line your preferences file (as shown in ! the example below) or by setting the console.default preference explained in ! the section on "Preferences" in this help document. ! \bold{Example:} starting with a Console other than the default. Say you like ! the SmallFry display best. The wm.startup line in your preferences file ! should look like this: \leftindent{wm.startup: console SmallFry; typescript} } --- 265,287 ---- "Display" menu and trying the Consoles that appear on the expanded menus. If you find that you prefer a Console other than the default or "Monitor" Console, you can make the new Console your default by either by adding the ! name of the Console to the appropriate startup line (as shown in the example ! below) or by setting the console.default preference explained in the section ! on "Preferences" in this help document. ! \bold{Example:} Starting with a Console other than the default. Say you like ! the SmallFry display best. If you're running an X-based window manager (twm, ! olwm, etc.) then to start a console add this line to your ~/.xinitrc file: + \leftindent{console SmallFry & + + } + If you run the ITC window manager (wm) then add this line to your + ~/preferences file: + + \leftindent{wm.startup: console SmallFry; typescript} } *************** *** 415,420 **** --- 422,430 ---- \leftindent{-c -- allows monitoring of errors on a remote machine. + -C -- disables opening of /dev/console for error monitoring + + -d -- inhibits forking. *************** *** 517,520 **** lacc-quickref vopcon \ ! }}\enddata{text,268672040} --- 527,530 ---- lacc-quickref vopcon \ ! }}\enddata{text,269374956} *** atk/createinset/null/nullvt.c Wed Jan 17 16:37:27 1990 --- atk/createinset/null/nullvt.c.NEW Thu Sep 13 18:03:46 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/andrew/atk/createinset/null/RCS/nullvt.c,v 1.2 89/12/12 15:00:22 ghoti Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/andrew/atk/createinset/null/RCS/nullvt.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! char *nullvt_c_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/andrew/atk/createinset/null/RCS/nullvt.c,v 1.2 89/12/12 15:00:22 ghoti Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/createinset/null/RCS/nullvt.c,v 1.3 90/09/11 15:01:01 gk5g Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/createinset/null/RCS/nullvt.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! char *nullvt_c_rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/createinset/null/RCS/nullvt.c,v 1.3 90/09/11 15:01:01 gk5g Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ *************** *** 18,23 **** --- 18,26 ---- /* * $Log: nullvt.c,v $ + * Revision 1.3 90/09/11 15:01:01 gk5g + * Added code to deal with a NULL return value from im_Create and frame_New. + * * Revision 1.2 89/12/12 15:00:22 ghoti * sync with MIT tape * *************** *** 171,178 **** dview = nullview_New(); nullview_SetDataObject(dview, dobj); ! im = im_Create(NULL); /* (argument can be hostname) */ ! frame = frame_New(); /* use a frame to get message line */ im_SetView(im, frame); frame_PostDefaultHandler(frame, "message", frame_WantHandler(frame, "message")); --- 174,187 ---- dview = nullview_New(); nullview_SetDataObject(dview, dobj); ! if((im = im_Create(NULL)) == NULL) { /* (argument can be hostname) */ ! fprintf(stderr,"Could not create new window.\nexiting.\n"); ! exit(-1); ! } ! if((frame = frame_New()) == NULL) { /* use a frame to get message line */ ! fprintf(stderr,"Could not allocate enough memory.\nexiting.\n"); ! exit(-1); ! } im_SetView(im, frame); frame_PostDefaultHandler(frame, "message", frame_WantHandler(frame, "message")); *** atk/ctext/ctextv.c Wed Apr 11 14:19:03 1990 --- atk/ctext/ctextv.c.NEW Thu Oct 11 14:47:17 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ctext/RCS/ctextv.c,v 2.13 90/03/19 17:16:37 gk5g Exp $ */ /* $ACIS:ctextv.c 1.2$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ctext/RCS/ctextv.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ctext/RCS/ctextv.c,v 2.13 90/03/19 17:16:37 gk5g Exp $"; #endif /* lint */ /* CTextView, a ``c'' mode for BE2. */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ctext/RCS/ctextv.c,v 2.14 90/10/11 12:11:24 gk5g Exp $ */ /* $ACIS:ctextv.c 1.2$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ctext/RCS/ctextv.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ctext/RCS/ctextv.c,v 2.14 90/10/11 12:11:24 gk5g Exp $"; #endif /* lint */ /* CTextView, a ``c'' mode for BE2. */ *************** *** 315,323 **** { struct ctext *ct = (struct ctext *)self->header.view.dataobject; int pos, len, newlen; ! boolean insideQuotes, esc, discardIdent; char orig[40], rep[40]; ! int origlen, replen; pos = ctextview_GetDotPosition(self); newlen = len = ctextview_GetDotLength(self); --- 315,323 ---- { struct ctext *ct = (struct ctext *)self->header.view.dataobject; int pos, len, newlen; ! boolean insideQuotes, esc, discardIdent, skippingReplaced; char orig[40], rep[40]; ! int origlen, replen, skipReplaced; pos = ctextview_GetDotPosition(self); newlen = len = ctextview_GetDotLength(self); *************** *** 346,351 **** --- 346,352 ---- insideQuotes = FALSE; /* Likely a correct assumption */ esc = FALSE; + skippingReplaced = FALSE; for (; len >= origlen; pos++, len--) { int c = ctext_GetChar(ct, pos); *************** *** 367,377 **** --- 368,386 ---- if (insideQuotes || ! isident(c)) continue; discardIdent = TRUE; + if(skippingReplaced) { + if(--skipReplaced > 0) + continue; + else + skippingReplaced = FALSE; + } if (ctext_Strncmp(ct, pos, orig, origlen) == 0 && ! isident(ctext_GetChar(ct, pos + origlen))) { ctext_ReplaceCharacters(ct, pos, origlen, rep, replen); len -= origlen - replen - 1; newlen += replen - origlen; + skippingReplaced = TRUE; + skipReplaced = replen; } } *** atk/doc/insets.help Wed Nov 22 12:01:30 1989 --- atk/doc/insets.help.NEW Wed Nov 7 11:26:24 1990 *************** *** 1,4 **** ! \begindata{text,268629828} \textdsversion{12} \template{help} \chapter{Multi-media Documents: Understanding Insets}\chapter{ --- 1,4 ---- ! \begindata{text,268870992} \textdsversion{12} \template{help} \chapter{Multi-media Documents: Understanding Insets}\chapter{ *************** *** 362,370 **** document for more details. }\section{ ! Related Tools} Select (highlight) one of the italicized keywords and choose \bold{Show Help on Selected Word} from the pop-up menus to see the help document for: --- 362,384 ---- document for more details. }\section{ ! Caveats + } + \indent{If an inset is bigger than the EZ window, it becomes unspeakably + difficult to scroll. This is because EZ treats the inset as a big character + on the line. The scroll model says that the text line next to the scroll + click-location will be placed at the top of the view. For an inset that takes + up all the visible view space, clicking anywhere will attempt to place that + line (inset) at the top of the view space-- even if it is already there. This + is a known bug in the text redraw code. Two ways to get around this problem + are: 1) use keystrokes (^v) to get past the large inset, and 2) drag the + scroll elevator past the inset. + } + \section{Related Tools} + + Select (highlight) one of the italicized keywords and choose \bold{Show Help on Selected Word} from the pop-up menus to see the help document for: *************** *** 394,397 **** \italic{chomp} (an inset for two-month calendars) } ! \enddata{text,268629828} --- 408,411 ---- \italic{chomp} (an inset for two-month calendars) } ! \enddata{text,268870992} *** atk/ez/eza.c Wed Sep 26 16:04:19 1990 --- atk/ez/eza.c.NEW Thu Sep 13 18:05:12 1990 *************** *** 4,15 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ez/RCS/eza.c,v 2.12 90/08/24 11:19:18 ajp Exp $ */ /* $ACIS:eza.c 1.5$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ez/RCS/eza.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ez/RCS/eza.c,v 2.12 90/08/24 11:19:18 ajp Exp $"; #endif /* lint */ #include --- 4,15 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ez/RCS/eza.c,v 2.13 90/09/11 15:31:18 gk5g Exp $ */ /* $ACIS:eza.c 1.5$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ez/RCS/eza.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ez/RCS/eza.c,v 2.13 90/09/11 15:31:18 gk5g Exp $"; #endif /* lint */ #include *************** *** 392,400 **** buffer_SetCkpVersion(self->buffer, version); buffer_SetWriteVersion(self->buffer, version); if (fileEntry->newWindow) { ! self->frame = frame_New(); frame_SetCommandEnable(self->frame, TRUE); ! self->im = im_Create(NULL); im_SetView(self->im, self->frame); frame_PostDefaultHandler(self->frame, "message", frame_WantHandler(self->frame, "message")); frame_SetBuffer(self->frame, self->buffer, TRUE); --- 392,406 ---- buffer_SetCkpVersion(self->buffer, version); buffer_SetWriteVersion(self->buffer, version); if (fileEntry->newWindow) { ! if((self->frame = frame_New()) == NULL) { ! fprintf(stderr,"Could not allocate enough memory.\nexiting.\n"); ! return(FALSE); ! } frame_SetCommandEnable(self->frame, TRUE); ! if((self->im = im_Create(NULL)) == NULL) { ! fprintf(stderr,"Could not create new window.\nexiting.\n"); ! return(FALSE); ! } im_SetView(self->im, self->frame); frame_PostDefaultHandler(self->frame, "message", frame_WantHandler(self->frame, "message")); frame_SetBuffer(self->frame, self->buffer, TRUE); *** atk/extensions/compile.c Wed Nov 22 12:11:47 1989 --- atk/extensions/compile.c.NEW Thu Sep 13 18:05:22 1990 *************** *** 4,15 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/extensions/RCS/compile.c,v 2.7 89/04/12 05:32:51 pgc Exp $ */ /* $ACIS:compile.c 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/extensions/RCS/compile.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/extensions/RCS/compile.c,v 2.7 89/04/12 05:32:51 pgc Exp $"; #endif /* lint */ /* compile.c --- 4,15 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/compile.c,v 2.8 90/09/11 16:39:40 gk5g Exp $ */ /* $ACIS:compile.c 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/compile.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/compile.c,v 2.8 90/09/11 16:39:40 gk5g Exp $"; #endif /* lint */ /* compile.c *************** *** 864,871 **** if (!forceWindow) return NULL; ! newIM = im_Create(NULL); ! frame = frame_Create(buffer); im_SetView(newIM, frame); /* This is here because the frame_Create call can't set the input focus --- 864,878 ---- if (!forceWindow) return NULL; ! if((newIM = im_Create(NULL)) == NULL) { ! fprintf(stderr,"Could not create new window.\n"); ! return(NULL); ! } ! if((frame = frame_Create(buffer)) == NULL) { ! fprintf(stderr,"Could not allocate enough memory.\n"); ! if(newIM) im_Destroy(newIM); ! return(NULL); ! } im_SetView(newIM, frame); /* This is here because the frame_Create call can't set the input focus *************** *** 902,907 **** --- 909,916 ---- } else { textview = (struct textview *) PutInAnotherWindow((struct view *) textview, buffer, TRUE); /* Make sure it gets in a window */ + if(textview == NULL) return((struct view*) NULL); + } textview_SetDotPosition(textview, mark_GetPos(mark)); *** atk/extensions/deskey.c Fri Feb 2 12:24:59 1990 --- atk/extensions/deskey.c.NEW Thu Sep 13 18:05:24 1990 *************** *** 144,155 **** if ((f = frame_Enumerate(bufferFind, b))==NULL) { /* No frame--need to map buffer to new window */ ! f = frame_New(); frame_SetCommandEnable(f, TRUE); frame_PostDefaultHandler(f, "message", frame_WantHandler(f, "message")); frame_SetBuffer(f, b, TRUE); ! im = im_Create(NULL); im_SetView(im, f); } return(frame_GetView(f)); --- 144,162 ---- if ((f = frame_Enumerate(bufferFind, b))==NULL) { /* No frame--need to map buffer to new window */ ! if((f = frame_New()) == NULL) { ! fprintf(stderr,"Could not allocate enough memory.\n"); ! return((struct view*) NULL); ! } frame_SetCommandEnable(f, TRUE); frame_PostDefaultHandler(f, "message", frame_WantHandler(f, "message")); frame_SetBuffer(f, b, TRUE); ! if((im = im_Create(NULL)) == NULL) { ! fprintf(stderr,"Could not create new window.\n"); ! if(f) frame_Destroy(f); ! return((struct view*) NULL); ! } im_SetView(im, f); } return(frame_GetView(f)); *** atk/extensions/tags.c Wed Nov 22 12:12:07 1989 --- atk/extensions/tags.c.NEW Thu Sep 13 18:05:26 1990 *************** *** 2,16 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/extensions/RCS/tags.c,v 2.8 89/10/04 18:43:56 cfe Exp $ */ /* $ACIS:tags.c 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/extensions/RCS/tags.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/extensions/RCS/tags.c,v 2.8 89/10/04 18:43:56 cfe Exp $"; #endif /* lint */ ! /* * tags.c -- A tags package for the BE2 editor * * Uses the output from the 'ctags' command to find * function definitions. --- 2,16 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/tags.c,v 2.9 90/09/11 16:40:41 gk5g Exp $ */ /* $ACIS:tags.c 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/tags.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/tags.c,v 2.9 90/09/11 16:40:41 gk5g Exp $"; #endif /* lint */ ! /* * tags.c -- A tags package for the ATK editor * * Uses the output from the 'ctags' command to find * function definitions. *************** *** 35,42 **** --- 35,45 ---- #include #include #include + #include + #include #include #include + #include struct SearchPattern { short size, used; *************** *** 74,114 **** } - /* Find a window other that the one that contains this inset. Create one if we have to. */ - /*static struct view *PutInAnotherWindow(view, buffer, forceWindow) - struct view *view; - struct buffer *buffer; - int forceWindow; - { - - boolean FrameFinder(); - struct frame *frame; - struct finderInfo myInfo; - - myInfo.myFrame = FindByView(view); - myInfo.otherFrame = NULL; - myInfo.bestFrame = NULL; - myInfo.myBuffer = buffer; - frame_Enumerate(FrameFinder, &myInfo); - frame = (myInfo.bestFrame != NULL) ? myInfo.bestFrame : ((myInfo.otherFrame != NULL) ? myInfo.otherFrame : NULL); - if (frame == NULL) { - - struct im *newIM; - - if (!forceWindow) - return NULL; - newIM = im_Create(NULL); - frame = frame_Create(buffer); - im_SetView(newIM, frame); - } - else if (frame_GetBuffer(frame) != buffer) - frame_SetBuffer(frame, buffer, TRUE); - return frame_GetView(frame); - } - - - */ - static void checkFileName() { if (TagsFile == NULL) --- 77,82 ---- *************** *** 418,427 **** long key; { struct buffer *buffer, *tbuf; ! static char name[256]; checkFileName(); ! if (message_AskForString(view,0,"Load tag file: ",TagsFile,name,255)) return; else TagsFile = name; --- 386,396 ---- long key; { struct buffer *buffer, *tbuf; ! static char name[MAXPATHLEN+1]; checkFileName(); ! filetype_CanonicalizeFilename(name,TagsFile,sizeof(name)); ! if(completion_GetFilename(view, "Load tag file: ", name, name, sizeof(name), FALSE, FALSE) == -1) return; else TagsFile = name; *** atk/extensions/tags.help Wed Nov 22 12:12:14 1989 --- atk/extensions/tags.help.NEW Thu Sep 13 18:05:27 1990 *************** *** 1,4 **** ! \begindata{text, 268621024} \textdsversion{12} \template{help} --- 1,4 ---- ! \begindata{text,269501588} \textdsversion{12} \template{help} *************** *** 117,125 **** directory named "tags"; with this command you can explicitly tell tags to use a different file or a file in another directory. This is especially useful if you are editing two programs in different directories with different tag ! files. Currently the load-tag-file command does not use the filename ! completion facilities (as do commands like visit-file), but this will ! hopefully appear soon. }\section{Program Author} --- 117,124 ---- directory named "tags"; with this command you can explicitly tell tags to use a different file or a file in another directory. This is especially useful if you are editing two programs in different directories with different tag ! files. The load-tag-file command uses the filename completion facility (as do ! commands like visit-file). }\section{Program Author} *************** *** 143,146 **** ctags} } ! \enddata{text,268621024} --- 142,145 ---- ctags} } ! \enddata{text,269501588} *** atk/extensions/gsearch.c Mon Aug 6 11:06:10 1990 --- atk/extensions/gsearch.c.NEW Tue Nov 20 13:22:29 1990 *************** *** 31,37 **** #define ESC (27) #define DEL (127) ! static char rcsid[] = "$Revision: 1.2 $"; static char LastPattern[MAXPATLEN]; --- 31,37 ---- #define ESC (27) #define DEL (127) ! static char rcsid[] = "$Revision: 1.3 $"; static char LastPattern[MAXPATLEN]; *************** *** 97,102 **** --- 97,103 ---- okpattern = ((compileerr = search_CompilePattern(pattern, &compiled)) == NULL); } break; + case EOF: case ESC: mark_SetPos(tv->atMarker, mark_GetPos(startpos)); mark_SetLength(tv->atMarker, *** atk/extensions/metax.c Wed Sep 26 16:04:27 1990 --- atk/extensions/metax.c.NEW Fri Sep 7 13:48:10 1990 *************** *** 2,15 **** * Copyright IBM Corporation 1990 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/metax.c,v 1.1 90/08/21 13:27:35 rr2b Exp $ */ /* $ACIS:$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/metax.c,v $ */ #include #include - #include - #include --- 2,13 ---- * Copyright IBM Corporation 1990 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/metax.c,v 1.2 90/09/06 22:35:42 ajp Exp $ */ /* $ACIS:$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/metax.c,v $ */ #include #include #include *** atk/ezprint/ezprinta.c Wed Nov 22 12:12:44 1989 --- atk/ezprint/ezprinta.c.NEW Tue Nov 20 13:22:35 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ezprint/RCS/ezprinta.c,v 2.17 89/10/20 14:42:52 tpn Exp $ */ /* $ACIS:ezprinta.c 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ezprint/RCS/ezprinta.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ezprint/RCS/ezprinta.c,v 2.17 89/10/20 14:42:52 tpn Exp $"; #endif /* lint */ #include /* For MAXPATHLEN. */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ezprint/RCS/ezprinta.c,v 2.17 89/10/20 14:42:52 tpn Exp Locker: ajp $ */ /* $ACIS:ezprinta.c 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ezprint/RCS/ezprinta.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ezprint/RCS/ezprinta.c,v 2.17 89/10/20 14:42:52 tpn Exp Locker: ajp $"; #endif /* lint */ #include /* For MAXPATHLEN. */ *** atk/fad/fadv.c Mon Aug 6 11:06:17 1990 --- atk/fad/fadv.c.NEW Wed Nov 14 15:25:57 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.c,v 2.10 90/05/08 16:12:43 gk5g Exp $ */ /* $ACIS:fadv.c 1.6$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.c,v 2.10 90/05/08 16:12:43 gk5g Exp $"; #endif /* lint */ #include /* sys/time.h sys/types.h */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.c,v 2.10 90/05/08 16:12:43 gk5g Exp Locker: tpn $ */ /* $ACIS:fadv.c 1.6$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.c,v 2.10 90/05/08 16:12:43 gk5g Exp Locker: tpn $"; #endif /* lint */ #include /* sys/time.h sys/types.h */ *** atk/fad/fadv.ch Mon Aug 6 11:06:19 1990 --- atk/fad/fadv.ch.NEW Wed Nov 14 15:26:00 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.ch,v 2.6 90/05/08 16:13:20 gk5g Exp $ */ /* $ACIS:fadv.ch 1.5$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidfadview_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.ch,v 2.6 90/05/08 16:13:20 gk5g Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #include --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.ch,v 2.6 90/05/08 16:13:20 gk5g Exp Locker: tpn $ */ /* $ACIS:fadv.ch 1.5$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidfadview_H = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/fad/RCS/fadv.ch,v 2.6 90/05/08 16:13:20 gk5g Exp Locker: tpn $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #include *** atk/frame/framecmd.c Wed Sep 26 16:04:56 1990 --- atk/frame/framecmd.c.NEW Wed Nov 7 11:28:19 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framecmd.c,v 2.41 90/08/23 16:32:13 ajp Exp $ */ /* $ACIS:framecmd.c 1.3$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framecmd.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framecmd.c,v 2.41 90/08/23 16:32:13 ajp Exp $"; #endif /* lint */ /* framecmd.c --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framecmd.c,v 2.44 90/11/01 15:00:58 gk5g Exp $ */ /* $ACIS:framecmd.c 1.3$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framecmd.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framecmd.c,v 2.44 90/11/01 15:00:58 gk5g Exp $"; #endif /* lint */ /* framecmd.c *************** *** 694,703 **** struct frame *newFrame; struct im *window; ! newFrame = frame_New(); frame_SetCommandEnable(newFrame, TRUE); ! window = im_Create(NULL); im_SetView(window, newFrame); frame_PostDefaultHandler(newFrame, "message", --- 694,710 ---- struct frame *newFrame; struct im *window; ! if((newFrame = frame_New()) == NULL) { ! fprintf(stderr,"Could not allocate enough memory to create new window.\n"); ! return; ! } frame_SetCommandEnable(newFrame, TRUE); ! if((window = im_Create(NULL)) == NULL) { ! fprintf(stderr,"Could not create new window.\n"); ! if(newFrame) frame_Destroy(newFrame); ! return; ! } im_SetView(window, newFrame); frame_PostDefaultHandler(newFrame, "message", *************** *** 1196,1201 **** --- 1203,1212 ---- message_DisplayString(self, 0, "Done."); else message_DisplayString(self, 0, "New file."); + + if((buffer = buffer_FindBufferByName(lastBuffer)) == NULL) + strcpy(lastBuffer,""); + return 0; } *************** *** 1250,1257 **** self = newFrame; message_DisplayString(self, 0, ""); } ! else frame_Destroy(newFrame); } frame_SetBuffer(self, buffer, TRUE); --- 1261,1270 ---- self = newFrame; message_DisplayString(self, 0, ""); } ! else { ! fprintf(stderr,"Could not create new window.\n"); frame_Destroy(newFrame); + } } frame_SetBuffer(self, buffer, TRUE); *************** *** 1616,1623 **** struct frame *frame; struct im *window; ! if ((window = im_Create(NULL)) == NULL) return NULL; if ((buffer = LocalGetBufferOnFile(NULL, filename, TRUE)) == NULL) return NULL; --- 1629,1638 ---- struct frame *frame; struct im *window; ! if ((window = im_Create(NULL)) == NULL) { ! fprintf(stderr,"Could not create new window.\n"); return NULL; + } if ((buffer = LocalGetBufferOnFile(NULL, filename, TRUE)) == NULL) return NULL; *************** *** 1671,1680 **** buffer = buffer_Create(name, NULL, NULL, dobj); ! if ((window = im_Create(NULL)) == NULL) return NULL; ! if ((frame = frame_Create(buffer)) == NULL) return NULL; frame_SetCommandEnable(frame, FALSE); im_SetView(window, frame); frame_PostDefaultHandler(frame, "message", frame_WantHandler(frame, "message")); --- 1686,1699 ---- buffer = buffer_Create(name, NULL, NULL, dobj); ! if ((window = im_Create(NULL)) == NULL) { ! fprintf(stderr,"Could not create new window.\n"); return NULL; ! } ! if ((frame = frame_Create(buffer)) == NULL) { ! fprintf(stderr,"Could not allocate enough memory.\n"); return NULL; + } frame_SetCommandEnable(frame, FALSE); im_SetView(window, frame); frame_PostDefaultHandler(frame, "message", frame_WantHandler(frame, "message")); *** atk/help/src/Imakefile Wed Sep 26 16:05:07 1990 --- atk/help/src/Imakefile.NEW Mon Nov 26 14:38:58 1990 *************** *** 17,22 **** --- 17,23 ---- MkdirTarget($(DESTDIR)/lib/tmac) InstallFile(helpmac.an, $(INSTINCFLAGS), $(DESTDIR)/lib/tmac) + InstallFile(config.h, $(INSTINCFLAGS), $(DESTDIR)/include/atk) DynamicMultiObject(helpa.do, helpa.o, $(RESOLVER_LIB),) *** atk/help/src/config.h Mon Aug 6 11:06:44 1990 --- atk/help/src/config.h.NEW Wed Nov 14 15:26:17 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/config.h,v 1.9 90/07/19 13:40:43 gk5g Exp $ */ /* $ACIS$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/config.h,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/config.h,v 1.9 90/07/19 13:40:43 gk5g Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/config.h,v 1.9 90/07/19 13:40:43 gk5g Exp Locker: gk5g $ */ /* $ACIS$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/config.h,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/config.h,v 1.9 90/07/19 13:40:43 gk5g Exp Locker: gk5g $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ *** atk/help/src/help.c Mon Aug 6 11:06:51 1990 --- atk/help/src/help.c.NEW Wed Nov 14 15:26:22 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/help.c,v 2.72 90/07/19 13:59:22 gk5g Exp $ */ /* $ACIS$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/help.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/help.c,v 2.72 90/07/19 13:59:22 gk5g Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/help.c,v 2.74 90/11/06 14:13:33 gk5g Exp Locker: gk5g $ */ /* $ACIS$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/help.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/help.c,v 2.74 90/11/06 14:13:33 gk5g Exp Locker: gk5g $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ *************** *** 326,341 **** if (!(fd = fopen(afilename, "r"))) { char buf[HELP_MAX_ERR_LENGTH *2]; ! if (access(afilename, 4) < 0) { ! if (errno == ETIMEDOUT) { sprintf(buf, "%s %s", err_server, err_read); ! ERRORBOX(c->view, buf); ! } else ! ERRORBOX(c->view, err_missing); ! } else ERRORBOX(c->view, err_read); return 0; } - /* is it troff ? */ tc = getc(fd); ungetc(tc, fd); --- 326,340 ---- if (!(fd = fopen(afilename, "r"))) { char buf[HELP_MAX_ERR_LENGTH *2]; ! if (access(afilename, 4) < 0) { ! if (errno == ETIMEDOUT) sprintf(buf, "%s %s", err_server, err_read); ! else ! sprintf(buf, err_missing, afilename); ! ERRORBOX(c->view, buf); ! } else ERRORBOX(c->view, err_read); return 0; } /* is it troff ? */ tc = getc(fd); ungetc(tc, fd); *************** *** 2282,2288 **** { /* if the scrollbar took the hit, check if the user has selected something, and turn on some menus items if so */ ! if ((requestor == (struct view *)self->info->scroll)) { /* if the menumask changes, post menus */ if (menulist_SetMask(self->info->menus, (textview_GetDotLength((struct textview *)self->info->view) != 0) ? --- 2281,2287 ---- { /* if the scrollbar took the hit, check if the user has selected something, and turn on some menus items if so */ ! if (self->info && (requestor == (struct view *)self->info->scroll)) { /* if the menumask changes, post menus */ if (menulist_SetMask(self->info->menus, (textview_GetDotLength((struct textview *)self->info->view) != 0) ? *** atk/help/src/help.h Wed Jan 17 16:37:52 1990 --- atk/help/src/help.h.NEW Wed Nov 14 15:26:32 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/andrew/atk/help/src/RCS/help.h,v 1.35 89/12/12 15:01:32 ghoti Exp $ */ /* $ACIS$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/andrew/atk/help/src/RCS/help.h,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/andrew/atk/help/src/RCS/help.h,v 1.35 89/12/12 15:01:32 ghoti Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/help.h,v 1.36 90/11/06 14:11:46 gk5g Exp Locker: gk5g $ */ /* $ACIS$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/help.h,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/help.h,v 1.36 90/11/06 14:11:46 gk5g Exp Locker: gk5g $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ *************** *** 289,295 **** static char *err_generic = "Unspecified error."; static char *err_unexpected = "Unexpected failure to get help on '%s'."; static char *err_server = "Sorry; a file server is down."; ! static char *err_missing = "Sorry; your help file appears to be missing."; static char *err_read = "Sorry; could not read help file."; static char *err_sorry = "Sorry; no help available on '%s'."; static char *err_index = "Sorry; index %s not found. Cannot find entries."; --- 289,295 ---- static char *err_generic = "Unspecified error."; static char *err_unexpected = "Unexpected failure to get help on '%s'."; static char *err_server = "Sorry; a file server is down."; ! static char *err_missing = "Sorry; help file '%s' appears to be missing."; static char *err_read = "Sorry; could not read help file."; static char *err_sorry = "Sorry; no help available on '%s'."; static char *err_index = "Sorry; index %s not found. Cannot find entries."; *** atk/help/src/helpa.c Wed Sep 26 16:05:09 1990 --- atk/help/src/helpa.c.NEW Wed Nov 14 15:26:36 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/helpa.c,v 2.31 90/07/31 12:14:29 gk5g Exp $ */ /* $ACIS$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/helpa.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/helpa.c,v 2.31 90/07/31 12:14:29 gk5g Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /*---------------------------------------------------------------------------*/ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/helpa.c,v 2.32 90/10/26 15:57:03 gk5g Exp $ */ /* $ACIS$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/helpa.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/helpa.c,v 2.32 90/10/26 15:57:03 gk5g Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /*---------------------------------------------------------------------------*/ *************** *** 58,63 **** --- 58,64 ---- #include "helpsys.h" #include + #define IPPORT_HELPNAME "andrewhelp" /*---------------------------------------------------------------------------*/ /* CONDITIONAL DEBUGGING */ /*---------------------------------------------------------------------------*/ *************** *** 247,257 **** /* lookup the help port, default to the 'right' thing */ ! if ((ts = getservbyname("help", 0)) != (struct servent *)NULL) helpPort = ts->s_port; else helpPort = htons(HELPSOCK); ! wmHost = (char *) environ_Get("WMHOST"); if (wmHost == NULL) { wmHost = (char *)malloc(MAXHOSTNAMELEN * sizeof(char)); --- 248,258 ---- /* lookup the help port, default to the 'right' thing */ ! if ((ts = getservbyname(IPPORT_HELPNAME, 0)) != (struct servent *)NULL) helpPort = ts->s_port; else helpPort = htons(HELPSOCK); ! #ifdef WM_ENV wmHost = (char *) environ_Get("WMHOST"); if (wmHost == NULL) { wmHost = (char *)malloc(MAXHOSTNAMELEN * sizeof(char)); *************** *** 260,267 **** runningLocally = 1; } else runningLocally = 0; ! ! if (!newWindow) { /* see if we can find a help server already */ th = gethostbyname(wmHost); if (th != NULL) { --- 261,277 ---- runningLocally = 1; } else runningLocally = 0; ! #endif /* WM_ENV */ ! #ifdef X11_ENV ! wmHost = (char *) environ_Get("TERM"); ! if (wmHost && (!strcmp(wmHost,"wm") || !strcmp(wmHost,"WM"))) ! runningLocally = 1; ! else runningLocally = 0; ! wmHost = (char *)malloc(MAXHOSTNAMELEN * sizeof(char)); ! gethostname(wmHost, MAXHOSTNAMELEN); ! DEBUG(("ha: wmhost: %s\n",wmHost)); ! #endif /* X11_ENV */ ! if (!newWindow && runningLocally) { /* see if we can find a help server already */ th = gethostbyname(wmHost); if (th != NULL) { *************** *** 284,290 **** if (aliasName != NULL) send_pack('a', aliasName, helpSocket); send_pack('h', helpKey, helpSocket); ! printf("Sent request to existing help window.\n"); close(helpSocket); exit(0); } --- 294,300 ---- if (aliasName != NULL) send_pack('a', aliasName, helpSocket); send_pack('h', helpKey, helpSocket); ! printf("Sent reqest to existing help window.\n"); close(helpSocket); exit(0); } *************** *** 517,523 **** help_HelpappGetHelpOn(WMDEFAULTFILE, help_NEW, help_HIST_NOADD, tbuffer); } super_Run(self); - DEBUG(("ha: OUT run\n")); return(0); } --- 527,532 ---- *** atk/help/src/helpa.ch Wed Nov 22 12:14:32 1989 --- atk/help/src/helpa.ch.NEW Wed Nov 14 15:26:37 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/help/src/RCS/helpa.ch,v 2.8 89/03/30 19:10:58 mp1w Exp $ */ /* $ACIS$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/help/src/RCS/helpa.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/help/src/RCS/helpa.ch,v 2.8 89/03/30 19:10:58 mp1w Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/helpa.ch,v 2.8 89/03/30 19:10:58 mp1w Exp $ */ /* $ACIS$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/helpa.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/helpa.ch,v 2.8 89/03/30 19:10:58 mp1w Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ *** atk/help/maint/mkindex.c Wed Apr 11 14:19:27 1990 --- atk/help/maint/mkindex.c.NEW Mon Oct 29 10:54:36 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/maint/RCS/mkindex.c,v 2.20 89/10/21 13:03:39 pgc Exp Locker: gk5g $ */ /* $ACIS:mkindex.c 1.3$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/maint/RCS/mkindex.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/maint/RCS/mkindex.c,v 2.20 89/10/21 13:03:39 pgc Exp Locker: gk5g $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #define FSSIZE 32 /* max number of files */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/help/maint/RCS/mkindex.c,v 2.21 90/10/23 17:44:05 gk5g Exp $ */ /* $ACIS:mkindex.c 1.3$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/help/maint/RCS/mkindex.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/help/maint/RCS/mkindex.c,v 2.21 90/10/23 17:44:05 gk5g Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #define FSSIZE 32 /* max number of files */ *************** *** 47,60 **** } ! static BuildIndex(aindex, arealName, alinkName) ! char *arealName, *alinkName; register struct Index *aindex; { ! register DIR *td; ! register struct direct *tde; ! register char *tp, *tfp; ! char pathBuffer[MAXPATHLEN]; char keyBuffer[MAXPATHLEN / 4]; char mandir = 0; static char ManName[] = "man"; --- 47,61 ---- } ! static BuildIndex(aindex, srcDirName, targetDirName) ! char *srcDirName, *targetDirName; register struct Index *aindex; { ! register DIR *srcDir; ! register struct direct *sde; ! register char *tp, *tfp, *sfp; ! char srcPath[MAXPATHLEN]; ! char targetPath[MAXPATHLEN]; char keyBuffer[MAXPATHLEN / 4]; char mandir = 0; static char ManName[] = "man"; *************** *** 61,134 **** struct stat tstat; register long code; ! td = opendir(arealName); ! if (!td) { ! fprintf(stderr, "%s: can't open %s; skipping.\n", prog, arealName); return 2; } else { if (verbose) ! printf("%s: indexing %s as %s.\n", prog, arealName, alinkName); } ! tfp = rindex(arealName, '/'); ! mandir = (strcmp( (tfp) ? tfp+1 : arealName, ManName) == 0) ? 1 : 0; ! /* make a base path */ ! strcpy(pathBuffer, alinkName); ! tfp = pathBuffer + strlen(pathBuffer); *tfp++ = '/'; /* tfp now points after the trailing / */ ! while(tde=readdir(td)) { ! if (strcmp(tde->d_name, ".") == 0 || strcmp(tde->d_name, "..") == 0) continue; ! strcpy(tfp, tde->d_name); /* complete the path */ ! strcpy(keyBuffer, tde->d_name); tp = index(keyBuffer, '.'); if (tp) *tp = '\0'; /* remove extension */ /* check for "man" subdir */ ! code = stat(pathBuffer, &tstat); ! if ((code == 0 && (tstat.st_mode & S_IFMT) == S_IFDIR) && (mandir != 0) && strncmp(tde->d_name, ManName, sizeof(ManName)-1) == 0) { ! char rpath[MAXPATHLEN]; ! ! strcpy(rpath, arealName); ! strcat(rpath, "/"); ! strcat(rpath, tde->d_name); ! ! BuildIndex(aindex, rpath, pathBuffer); ! } else { if (tp && index(MANSUBS, *(tp+1))) { /* it's a man page */ - #if 0 - struct recordSet *ts; - #endif /* 0 */ - /* add w/o extension */ - index_AddPrimary(aindex, LowerCase(keyBuffer), pathBuffer); - #if 0 - /* I wanted to check if the index so far contained an entry for the - name sans extension, and the add_primary without the extension, so - this entry would be added to the list of files available through the - keyword of the name sans extension, but GetAnySet seems to have some - detrimental side effects... */ - ts = index_GetAnySet(aindex, keyBuffer); - if (ts->count != 0) { /* add with no extension, since already there like that */ - index_AddPrimary(aindex, LowerCase(keyBuffer), pathBuffer); - recordset_Free(ts); - } - #endif /* 0 */ *tp = '.'; /* put back extension */ /* add with extension */ ! index_AddPrimary(aindex, LowerCase(keyBuffer), pathBuffer); } else { if ((code == 0 && (tstat.st_mode & S_IFMT) != S_IFDIR)) { /* don't add directories */ ! index_AddPrimary(aindex, LowerCase(keyBuffer), pathBuffer); } } } } ! closedir(td); return 0; } --- 62,121 ---- struct stat tstat; register long code; ! if (!(srcDir = opendir(srcDirName))) { ! fprintf(stderr, "%s: can't open %s; skipping.\n", prog, srcDirName); return 2; } else { if (verbose) ! printf("%s: indexing %s as %s.\n", prog, srcDirName, targetDirName); } ! tp = rindex(srcDirName, '/'); ! mandir = (strcmp( (tp) ? tp+1 : srcDirName, ManName) == 0) ? 1 : 0; ! /* make a source base path */ ! strcpy(srcPath, srcDirName); ! sfp = srcPath + strlen(srcPath); ! *sfp++ = '/'; /* sfp now points after the trailing / */ ! ! /* make a target base path */ ! strcpy(targetPath, targetDirName); ! tfp = targetPath + strlen(targetPath); *tfp++ = '/'; /* tfp now points after the trailing / */ ! while(sde=readdir(srcDir)) { ! if (strcmp(sde->d_name, ".") == 0 || strcmp(sde->d_name, "..") == 0) continue; ! strcpy(sfp, sde->d_name); /* complete the source path */ ! strcpy(tfp, sde->d_name); /* complete the target path */ ! strcpy(keyBuffer, sde->d_name); tp = index(keyBuffer, '.'); if (tp) *tp = '\0'; /* remove extension */ /* check for "man" subdir */ ! code = stat(srcPath, &tstat); ! if ((code == 0 && (tstat.st_mode & S_IFMT) == S_IFDIR) && (mandir != 0) && strncmp(sde->d_name, ManName, sizeof(ManName)-1) == 0) { ! BuildIndex(aindex, srcPath, targetPath); ! } ! else { if (tp && index(MANSUBS, *(tp+1))) { /* it's a man page */ + /* add w/o extension */ + index_AddPrimary(aindex, LowerCase(keyBuffer), targetPath); *tp = '.'; /* put back extension */ + /* add with extension */ ! index_AddPrimary(aindex, LowerCase(keyBuffer), targetPath); } else { if ((code == 0 && (tstat.st_mode & S_IFMT) != S_IFDIR)) { /* don't add directories */ ! index_AddPrimary(aindex, LowerCase(keyBuffer), targetPath); } } } } ! closedir(srcDir); return 0; } *************** *** 217,225 **** exit(1); } - /* lp = lineNo + fsPtr; - *lp = 0; - */ lineNo[fsPtr] = 0; /* evidently Sun4.0 doesn't grok this --mrp */ while (1) { lineNo[fsPtr]++; --- 204,209 ---- *** atk/layout/Imakefile Tue Nov 20 14:25:34 1990 --- atk/layout/Imakefile.NEW Wed Oct 3 15:04:54 1990 *************** *** 0 **** --- 1,26 ---- + /* ********************************************************************** *\ + * Copyright IBM Corporation 1988, 1990 - All Rights Reserved * + * For full copyright information see:'andrew/config/COPYRITE' * + \* ********************************************************************** */ + DOBJS = layoutv.do layout.do fillerv.do filler.do boxview.do box.do + IHFILES = layoutv.ih layout.ih fillerv.ih filler.ih boxview.ih box.ih + + NormalObjectRule() + NormalATKRule() + + DynamicObject(layoutv,,) + DynamicObject(layout,,) + DynamicObject(fillerv,,) + DynamicObject(filler,,) + DynamicObject(boxview,,) + DynamicObject(box,,) + + InstallClassFiles($(DOBJS),$(IHFILES)) + + InstallLink(runapp, ${DESTDIR}/bin/layout) + + DependTarget() + + MkdirTarget(${DESTDIR}/doc/atk/layout) + NormalHelpRule() + InstallDocs(layout.help, ${DESTDIR}/help) *** atk/layout/layout.ch Tue Nov 20 14:25:48 1990 --- atk/layout/layout.ch.NEW Thu Oct 11 14:49:30 1990 *************** *** 0 **** --- 1,89 ---- + /* ********************************************************************** *\ + * Copyright IBM Corporation 1988,1990 - All Rights Reserved * + * For full copyright information see:'andrew/config/COPYRITE' * + \* ********************************************************************** */ + /* $Header $ */ + /* $ACIS$ */ + /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/layout.ch,v $ */ + + #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) + static char *rcsidlayout_H = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/layout.ch,v 1.2 90/10/10 17:06:06 jhh Exp $"; + #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ + + /* layout.ch - layout data object definition and interface */ + + #define layout_VERSION 1 + #define SafeFromNull(s) (((s) != NULL) ? (s) : "(null)") + + #define getDataObject(self) ((self) -> header.dataobject) + + + /* globals for entire package */ + + boolean debug; /* nonzero if debugging */ + + /* component data structure */ + + /* + Components are stored in a simple linked list. Order is significant, + with earlier objects in the list drawn in front of later ones. + + The forallcomponents(self, c) macro provides a loop down the list. + The cXxxxx macros provide geometry information. + */ + + struct component { + struct component *nextcomponent; /* forward link in component list */ + struct dataobject *data; /* embedded data object or NULL if none */ + long left, top, width, height; /* rectangle containing imbedded object */ + boolean varies:1; /* TRUE if can be changed in execution mode */ + }; + + #define forallcomponents(self, c) for (c = (self)->firstcomponent; c != NULL; c = c->nextcomponent) + + #define cLeft(c) ((c)->left) + #define cTop(c) ((c)->top) + #define cRight(c) ((c)->left + (c)->width) + #define cBottom(c) ((c)->top + (c)->height) + #define cWidth(c) ((c)->width) + #define cHeight(c) ((c)->height) + + #define cData(c) ((c)->data) + #define cVaries(c) ((c)->varies) + + + /* actual interface definition */ + + class layout: dataobject[dataobj] { + + overrides: + ViewName() returns char *; + Read (FILE * f, long id) returns long; + Write (FILE * f, long writeid, int level) returns long; + GetModified() returns long; + + methods: + ToggleDebug(); + RemoveComponent(struct component *c); + FillInComponent(char *name, struct component *c); + CreateComponent() returns struct component *; + SetComponentSize(struct component *c, long x, long y, long w, long h); + Promote(struct component *c); + Demote(struct component *c); + MakeVariable(struct component *c); + MakeFixed(struct component *c); + + macromethods: + GetFirstComponent() (self->firstcomponent) + + classprocedures: + InitializeClass() returns boolean; + InitializeObject(struct layout *self) returns boolean; + FinalizeObject(struct layout *self); + + data: + struct component *firstcomponent; /* first in component list */ + int inGetModified; /* recursion protection switch */ + }; + + /* end of layout.ch */ *** atk/layout/layoutv.ch Tue Nov 20 14:26:03 1990 --- atk/layout/layoutv.ch.NEW Thu Oct 11 14:49:33 1990 *************** *** 0 **** --- 1,134 ---- + /* ********************************************************************** *\ + * Copyright IBM Corporation 1988,1990 - All Rights Reserved * + * For full copyright information see:'andrew/config/COPYRITE' * + \* ********************************************************************** */ + /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/layoutv.ch,v 1.3 90/10/10 17:06:24 jhh Exp $ */ + /* $ACIS$ */ + /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/layoutv.ch,v $ */ + + #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) + static char *rcsidspread_H = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/layoutv.ch,v 1.3 90/10/10 17:06:24 jhh Exp $"; + #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ + + /* layoutview.ch - layout view definition and interface */ + #define layoutview_VERSION 1 + + + /* internal interfaces */ + + #define getView(self) ((self) -> header.view) + #define getLayout(self) ((struct layout *)layoutview_GetDataObject(self)) + + /* list of views (of a dataobject) */ + + /* List of child views for this layout. + + Since the child views are created at a later time than the components they + display, and since as views they belong to layoutv rather than layout, they + need a separate data structure. The viewlist provides this service, listing + all child views and the components to which they correspond. Order in this + simple linked list is not significant. There should be at most one viewlist + entry per component. Use the findviewlist or findview function to find it + and create it if necessary. + */ + + struct viewlist { + struct viewlist *nextview; /* next view on list */ + struct view *child; /* child view - viewing this data object */ + struct component *component; /* component for the child */ + }; + + #define forallsubviews(self, v) for (v = (self)->subviews; v != NULL; v = v->nextview) + #define vChild(v) ((v)->child) + #define vComponent(v) ((v)->component) + + #define vLeft(self, c) (cLeft(c) <= 0 ? 0 : cLeft(c)) + #define vTop(self, c) (cTop(c) <= 0 ? 0 : cTop(c)) + #define vRight(self, c) (cWidth(c) <= 0 ? layoutview_GetVisualWidth(self) : cRight(c)) + #define vBottom(self, c) (cHeight(c) <= 0 ? layoutview_GetVisualHeight(self) : cBottom(c)) + #define vWidth(self, c) (vRight(self, c) - vLeft(self, c)) + #define vHeight(self, c) (vBottom(self, c) - vTop(self, c)) + + /* operating mode cases */ + + enum hitmode_enum { + HIT_EXEC, /* in user mode */ + HIT_AUTHORING, /* in authoring mode */ + HIT_INITIALIZING, /* in authoring mode, selection active */ + HIT_DRAGGING, /* in authoring mode, dragging a component */ + HIT_CREATING}; /* in authoring mode, creating a component */ + + enum createmode_enum { + CREATE_NULL, /* do not fill in new components */ + CREATE_FILLER, /* fill new components with filler object */ + CREATE_PASTE}; /* past into new components */ + + /* Interface definition */ + + class layoutview[layoutv]: view { + + overrides: + FullUpdate(enum view_UpdateType how, long left, long top, long width, long height); + Update(); + Hit(enum view_MouseAction action, long x, long y, long numberOfClicks) returns struct view *; + DesiredSize(long width, long height, enum view_DSpass pass, long *dWidth, long *dheight) returns enum view_DSattributes; + ReceiveInputFocus(); + LoseInputFocus(); + PostMenus(struct menulist *ml); + WantNewSize(struct view *requestor); + LinkTree(struct view *parent); + ObservedChanged(struct observable *changed, long status); + Print(FILE *f, char *processor, char *finalFormat, boolean toplevel); + + methods: + SetSelection(struct component *c); + SetSelectionSize(long left, long top, long width, long height) returns boolean; + DestroyComponent(); + ToggleDebug(); + SetRunMode(); + SetInitMode(); + SetAuthoringMode(); + Paste(); + SetChildByName(char *dataname); + SetChild(); + Promote(); + Demote(); + MakeBackground(); + MakeVariable(); + MakeFixed(); + SetCreateMode(enum createmode_enum createmode); + SetGranularity(int granularity); + ReplaceComponent(struct component *c, char *dataname); + FindSubview(struct component *c) returns struct view *; + RemoveSubview(struct view *child) returns struct component *; + + macromethods: + Selection() (self->selection) + Hitmode() (self->hitmode) + Createmode() (self->createmode) + ApplyGranularity(v) ((self)->granularity > 0 ? (((v) / (self)->granularity) * (self)->granularity) : (v)) + + classprocedures: + InitializeClass() returns boolean; + InitializeObject(struct layoutview *self) returns boolean; + FinalizeObject(struct layoutview *self); + + data: + boolean hasInputFocus; /* layout has the input focus */ + boolean updateRequested; /* an update has been requested */ + long lastUpdate; /* modification timestamp of last update */ + struct keystate *keystate; /* current keystate for the layout */ + struct menulist *menulist; /* dup of general layout menu list */ + struct cursor *authoringCursor; /* cursor for layout authoring mode */ + struct viewlist *subviews; /* list of imbedded views */ + enum hitmode_enum hitmode; /* current operating mode */ + enum createmode_enum createmode; /* way to fill in new components */ + boolean dragleft, dragright, dragtop, dragbottom; /* which edges are being dragged */ + long dragx, dragy; /* mouse position at beginning of drag */ + long rubberleft, rubbertop, rubberwidth, rubberheight; /* rubberband box */ + struct component *selection; /* currently selected component */ + int granularity; /* resolution for object placement */ + }; + + /* end of layoutview.ch */ + *** atk/layout/fillerv.c Tue Nov 20 14:26:16 1990 --- atk/layout/fillerv.c.NEW Wed Oct 3 15:04:58 1990 *************** *** 0 **** --- 1,416 ---- + /* ********************************************************************** *\ + * Copyright IBM Corporation 1988,1990 - All Rights Reserved * + * For full copyright information see:'andrew/config/COPYRITE' * + \* ********************************************************************** */ + /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/fillerv.c,v 1.2 90/10/03 15:02:15 jhh Exp $ */ + /* $ACIS$ */ + /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/fillerv.c,v $ */ + + #ifndef lint + char *fillerv_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/fillerv.c,v 1.2 90/10/03 15:02:15 jhh Exp $"; + #endif /* lint */ + + #define fillerview_MINIMUMSIZE 100 + #define LEFTMARGIN 5 + #define TOPMARGIN 5 + + #define viewnamestring(v) ((v) == NULL ? "" : atom_Name(atomlist_First(view_GetName(v)))) + + extern char *malloc(); + extern char *realloc(); + + #include + #include + + #include + #include + #include + #include + #include + #include + #include + #include + #include + + #include + + #include + + /* graphic information */ + + struct graphicstuff { + struct fontdesc *writingFont; + int lineheight; + int linewidth; + }; + + #define DEBUGPRINTF(x) + + /* list of possible replacement objects */ + + static char **Insets; + + /* initialize entire class */ + + static struct menulist *mainmenus = (struct menulist *) NULL; + static struct proctable_Entry *replaceProc = (struct proctable_Entry *) NULL; + + /* add an inset to the list of candidates */ + + static void + addInset(newposs) + char *newposs; + { + int n; + char *b; + + for (n = 0; Insets[n] != NULL; n++) + if (strcmp(Insets[n], newposs) == 0) + return; + b = malloc(strlen(newposs)+1); + assert(b != NULL); + strcpy(b, newposs); + Insets = (char **)realloc((char *)Insets, (n+2)*sizeof (char *)); + assert(Insets != NULL); + Insets[n] = b; + Insets[n+1] = NULL; + } + + static void + initializeInsets() + { + char buff[81]; + char *insetlist; + char *c, *d; + int i; + + Insets = (char **)malloc(sizeof (char *)); + assert(Insets != NULL); + Insets[0] = NULL; + + insetlist = environ_GetProfile("FillerInsets"); + if (insetlist == NULL || *insetlist == '\0') + insetlist = "Ask...:box:text:raster:table:zip:fad:pshbttn:clock:timeoday:link"; + for (c = insetlist, d = buff; *c != '\0'; c++) { + if (*c == ':') { + assert(d-buff < sizeof buff); + *d++ = '\0'; + addInset(buff); + d = buff; + } + else if (*c == ' ') + ; + else + *d++ = *c; + } + assert(d-buff < sizeof buff); + *d++ = '\0'; + addInset(buff); + + /* do menus in opposite order so they appear in right order on card */ + + for (i = 0; Insets[i] != NULL; i++) ; + while (--i >= 0) { + sprintf(buff, "Insets,%s", Insets[i]); + assert(strlen(buff) < sizeof buff); + menulist_AddToML(mainmenus, buff, replaceProc, Insets[i], 0); + } + } + + /* initialize entire class */ + + boolean /* returns TRUE for success */ + fillerview__InitializeClass(classID) + struct classheader *classID; /* ignored */ + { + DEBUGPRINTF(("fillerview__InitializeClass(%x)\n", classID)); + + mainmenus = menulist_New(); + + replaceProc = proctable_DefineProc("fillerview-set-data-object-by-name", fillerview__SetDataObjectByName, &fillerview_classinfo, NULL, "Insert named inset"); + initializeInsets(); + + return TRUE; + } + + /* initialize filler view */ + + boolean /* retrurns TRUE for success */ + fillerview__InitializeObject(classID, self) + struct classheader *classID; /* ignored */ + struct fillerview *self; + { + DEBUGPRINTF(("fillerview__InitializeObject(%x)\n", classID)); + + self->hasInputFocus = FALSE; + self->menulist = menulist_DuplicateML(mainmenus, self); + self->hitindex = -1; + fillerview_WantInputFocus(self, self); + return TRUE; + } + + /* initialize graphic-dependent data */ + + void + InitializeGraphics(self, gc) + struct fillerview *self; + struct graphicstuff *gc; + { + static char *wfontname = NULL; + struct FontSummary *fs; + int i; + int w; + + DEBUGPRINTF(("fillerview_InitializeGraphics\n")); + + if (getDrawable(self) == NULL) { + printf("InitializeGraphics called without drawable.\n"); + return; + } + if (wfontname == NULL) { + wfontname = environ_GetProfile("bodyfontfamily"); + if (wfontname == NULL || !*wfontname) wfontname = "andy"; + } + gc->writingFont = fontdesc_Create(wfontname, fontdesc_Plain, 12); + fs = fontdesc_FontSummary(gc->writingFont, getDrawable(self)); + gc->lineheight = fs->maxHeight; + gc->linewidth = 0; + for (i = 0; Insets[i] != NULL; i++) { + fontdesc_StringSize(gc->writingFont, getDrawable(self), Insets[i], &w, NULL); + if (w > gc->linewidth) + gc->linewidth = w; + } + } + + /* compute top of line hit */ + + static int /* returns y position of top of button */ + TopOfTheMark(self, gc, i) + struct fillerview *self; + struct graphicstuff *gc; + int i; /* index of this button */ + { + return TOPMARGIN * 2 - 2 + (i + 1) * gc->lineheight; + } + + /* highlight hit box */ + + static void + showhit(self, gc) + struct fillerview *self; + struct graphicstuff *gc; + { + short savetransfermode; + + if (self->hitindex >= 0) { + savetransfermode = fillerview_GetTransferMode(self); + fillerview_SetTransferMode(self, graphic_INVERT); + fillerview_DrawRectSize(self, LEFTMARGIN, TopOfTheMark(self, gc, self->hitindex), gc->linewidth + 3 * LEFTMARGIN, gc->lineheight); + fillerview_SetTransferMode(self, savetransfermode); + } + } + + /* process mouse hit */ + + struct view * /* returns view to get subsequent hits */ + fillerview__Hit(self, action, x, y, numberOfClicks) + struct fillerview *self; + enum view_MouseAction action; /* button and what it did */ + long x, y; /* coordinates of mouse */ + long numberOfClicks; /* number of clicks at this location */ + { + int i; + struct graphicstuff realgc, *gc = &realgc; + + DEBUGPRINTF(("fillerview_Hit(%d, %ld, %ld, %ld)\n", (int) action, x, y, numberOfClicks)); + + if (fillerview_GetTrueChild(self) != NULL) + return super_Hit(self, action, x, y, numberOfClicks); + + InitializeGraphics(self, gc); + + if (self->hitindex >= 0) { + showhit(self, gc); /* turns it off */ + self->hitindex = -1; + } + + if (y >= TopOfTheMark(self, gc, 0) && x >= 0 && x < gc->linewidth + 3 * LEFTMARGIN) { + for (i = 0; Insets[i] != NULL; i++) { + if (y < TopOfTheMark(self, gc, i + 1)) { + self->hitindex = i; + break; + } + } + } + + if (self->hitindex >= 0 && (action == view_LeftDown || action == view_LeftMovement || action == view_RightDown || action == view_RightMovement)) { + showhit(self, gc); + } + + else if (self->hitindex >= 0 && (action == view_LeftUp || action == view_RightUp)) { + showhit(self, gc); + fillerview_SetDataObjectByName(self, Insets[self->hitindex]); + return NULL; + } + + else + self->hitindex = -1; + + if (!self->hasInputFocus) + fillerview_WantInputFocus(self, &getView(self)); + + return &getView(self); + } + + /* update all components */ + + static void + UpdateScreen(self, how, updateRect) + struct fillerview *self; + enum view_UpdateType how; /* kind of update */ + struct rectangle *updateRect; /* rectangle affected */ + { + int i; + struct graphicstuff realgc, *gc = &realgc; + + InitializeGraphics(self, gc); + + fillerview_SetTransferMode(self, graphic_COPY); + fillerview_SetClippingRect(self, updateRect); + fillerview_EraseRect(self, updateRect); + fillerview_MoveTo(self, LEFTMARGIN, TOPMARGIN); + fillerview_DrawString(self, "Select an inset", graphic_ATTOP | graphic_ATLEFT); + for (i = 0; Insets[i] != NULL; i++) { + fillerview_MoveTo(self, LEFTMARGIN * 2, TOPMARGIN * 2 + (i + 1) * gc->lineheight); + fillerview_DrawString(self, Insets[i], graphic_ATTOP | graphic_ATLEFT); + } + showhit(self, gc); + } + + /* full update when window changes */ + + void + fillerview__FullUpdate(self, how, left, top, width, height) + struct fillerview *self; + enum view_UpdateType how; /* kind of update */ + long left, top, width, height; /* rectangle affected (in some cases; */ + { + struct rectangle vb; + + DEBUGPRINTF(("fillerview_FullUpdate(%d, %d, %d, %d, %d)\n", (int)how, left, top, width, height)); + + super_FullUpdate(self, how, left, top, width, height); + if (fillerview_GetTrueChild(self) != NULL) + return; + + fillerview_GetVisualBounds(self, &vb); + + switch(how) { + + case view_MoveNoRedraw: + case view_Remove: + break; + + case view_PartialRedraw: + case view_LastPartialRedraw: + rectangle_SetRectSize(&vb, left, top, width, height); + /* fall through into default case */ + default: + UpdateScreen(self, how, &vb); + break; + } + } + + /* partial update */ + + void + fillerview__Update(self) + struct fillerview *self; + { + struct rectangle visualRect; + + DEBUGPRINTF(("fillerview_Update\n")); + + super_Update(self); + if (fillerview_GetTrueChild(self) != NULL) + return; + + fillerview_GetVisualBounds(self, &visualRect); + UpdateScreen(self, -1, &visualRect); + } + + /* input focus obtained; highlight something */ + + void + fillerview__ReceiveInputFocus(self) + struct fillerview *self; + { + DEBUGPRINTF(("fillerview_ReceiveInputFocus\n")); + + super_ReceiveInputFocus(self); + if (fillerview_GetTrueChild(self) != NULL) + return; + + if (!(self->hasInputFocus)) { + self->hasInputFocus = 1; + fillerview_PostMenus(self, self->menulist); + } + } + + /* input focus lost; remove highlighting */ + + void + fillerview__LoseInputFocus(self) + struct fillerview *self; + { + DEBUGPRINTF(("fillerview_LoseInputFocus\n")); + + super_LoseInputFocus(self); + if (fillerview_GetTrueChild(self) != NULL) + return; + + if (self->hasInputFocus) { + self->hasInputFocus = 0; + } + } + + /* tear down a fillerview */ + + void + fillerview__FinalizeObject(classID, self) + struct classheader *classID; + struct fillerview *self; + { + if (debug) + printf("fillerview_FinalizeObject\n"); + + menulist_Destroy(self->menulist); + } + + /* set contained data object */ + + void + fillerview__SetDataObjectByName(self, dataname) + struct fillerview *self; + char *dataname; /*class dataname of replacement dataobject */ + { + DEBUGPRINTF(("fillerview_SetDataObjectByName(,%s)\n", dataname)); + + if (strncmp(dataname, "Ask", 3) == 0) { + char newname[100]; + + newname[0] = '\0'; + if (message_AskForString(&getView(self), 0, "Data object to enter here (text): ", "", newname, sizeof newname)) + return; + if (newname[0] == 0) + dataname = "text"; + else + dataname = newname; + } + filler_SetObjectByName(MyFiller(self), dataname); + filler_SetViewName(MyFiller(self), NULL, TRUE); + filler_SetRefName(MyFiller(self), dataname); + ((struct celview *) self)->arb = NULL; + fillerview_ObservedChanged(self, MyFiller(self), observable_OBJECTCHANGED); + fillerview_WantInputFocus(self, self); + } *** atk/layout/layout.c Tue Nov 20 14:26:29 1990 --- atk/layout/layout.c.NEW Thu Oct 11 14:49:35 1990 *************** *** 0 **** --- 1,566 ---- + /* ********************************************************************** *\ + * Copyright IBM Corporation 1988,1990 - All Rights Reserved * + * For full copyright information see:'andrew/config/COPYRITE' * + \* ********************************************************************** */ + /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/layout.c,v 1.2 90/10/10 17:05:32 jhh Exp $ */ + /* $ACIS$ */ + /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/layout.c,v $ */ + + #ifndef lint + char *layout_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/layout.c,v 1.2 90/10/10 17:05:32 jhh Exp $"; + #endif /* lint */ + + #include + #include + + #include + #include + #include + #include + #include + #include + + #include + + extern char * malloc (); + + #define classname(do) ((do) == NULL ? "" : class_GetTypeName(do)) + #define safename(c) ((c) == NULL ? "" : classname(cData(c))) + #define MIN(x, y) ((x) < (y) ? (x) : (y)) + #define MAX(x, y) ((x) > (y) ? (x) : (y)) + + #define MINSIZE 5 /* minimum width/height resulting from constraints */ + + /* initialize entire class */ + + boolean layout__InitializeClass(classID) + struct classheader *classID; /* unused */ + { + if (debug) + printf("layout_InitializeClass()\n"); + + return TRUE; + } + + /* get corresponding view name */ + + char * /* returns "layoutview */ + layout__ViewName(self) + struct layout *self; + { + return "layoutview"; + } + + /* Initialize new data layout */ + + boolean /* returns TRUE for success */ + layout__InitializeObject(classID, self) + struct classheader *classID; /* unused */ + struct layout *self; + { + + if (debug) + printf("layout_InitializeObject\n"); + + self->firstcomponent = NULL; + self->inGetModified = FALSE; + return TRUE; + } + + /* tear down a layout */ + + void layout__FinalizeObject(classID, self) + struct classheader *classID; /* unused */ + struct layout *self; + { + if (debug) + printf("layout_FinalizeObject\n"); + } + + /* toggle debugging flag */ + + void layout__ToggleDebug(self) + struct layout *self; + { + if (debug) { + printf("layout debugging off\n"); + debug = 0; + } else { + debug = 1; + printf("layout debugging on - ESC-ESC turns it off\n"); + } + } + + /* write layout to file */ + + long /* returns id of object written */ + layout__Write(self, f, writeID, level) + struct layout *self; + FILE * f; /* file to be written */ + long writeID; /* unique ID of object in output file */ + int level; /* nesting level */ + { + struct component *c; + + if (debug) + printf("layout_Write(%ld, %d)\n", writeID, level); + + if (getDataObject(self).writeID != writeID) { + getDataObject(self).writeID = writeID; + fprintf (f, "\\begindata{%s,%ld}\n", class_GetTypeName(self), layout_GetID(self)); + forallcomponents(self, c) { + fprintf(f, "<%ld,%ld,%ld,%ld", cLeft(c), cTop(c), cWidth(c), cHeight(c)); + if (cData(c) != NULL) { + fprintf(f, ","); + if (cVaries(c)) + fprintf(f, "V"); + else + fprintf(f, "F"); + fprintf(f, ">"); + fprintf(f, "\n"); + if (debug) + printf("Writing out %s\n", class_GetTypeName(cData(c))); + dataobject_Write (cData(c), f, super_GetWriteID(self), level + 1); + } + else + fprintf(f, ">\n"); /* no child present */ + } + fprintf (f, "\\enddata{%s,%ld}\n", class_GetTypeName(self), layout_GetID(self)); + } + return layout_GetID(self); + } + + /* object to and print out bad input */ + + static void objectto(f, message) + FILE *f; /* input file containing offending material */ + char *message; /* error message */ + { + int ch; + + printf("%s: \"", message); + for (;;) { + ch = getc(f); + if (ch == '\n' || ch == EOF || ch == '\0') + break; + putchar(ch); + } + printf("\"\n"); + } + + /* scan input for a specific string */ + + static boolean /* returns TRUE for success */ + fgetstring(f, string) + FILE *f; /* input file */ + char *string; /* desired input string */ + { + int ch; + + ch = getc(f); + while (ch == *string && *string != '\0') { + ch = getc(f); + string++; + } + ungetc(ch, f); + if (*string != '\0') + return TRUE; + else + return FALSE; + } + + /* read ASCII representation of a layout */ + + /* + Layout data stream: + + The layout data stream follows ATK standards, starting with a begindata and + ending with an enddata directive. In between comes a sequence of components, + ordered front to back. Each component starts with a line of the form: + + + + where the first four are decimal numbers giving the geometry of the component's + rectangle, and the fifth is a set of letters giving specific properites: + + V or F for variable or fixed components (* is an acceptable substitute for V) + + This line is followed by the ATK representation for the component object. + A null component is represented by omitting the fifth field and data entirely. + + */ + + + static long /* returns read error status */ + readASCII(self, f) + struct layout *self; + FILE *f; /* input file */ + { + int ch; + struct component *c; + char dataname[256]; + char *np; + long uniqueID; + boolean havechild; + long left, top, width, height; + + while ((ch = getc(f)) != EOF) { + switch(ch) { + + case '\0': + printf("stopped on zero character"); + return dataobject_BADFORMAT; + + case '<': /* another component coming */ + c = layout_CreateComponent(self); + if (fscanf(f, "%d,%d,%d,%d", &left, &top, &width, &height) != 4) { + objectto(f, "layout: expected four numbers separated by commas"); + layout_RemoveComponent(self, c); + return dataobject_BADFORMAT; + } + layout_SetComponentSize(self, c, left, top, width, height); + c->varies = TRUE; + ch = getc(f); + havechild = FALSE; + if (ch != ',') + ungetc(ch, f); + else { + havechild = TRUE; + for (;;) { + ch = getc(f); + if (ch == '>') + break; + else if (ch == '*' || ch == 'V') + c->varies = TRUE; + else if (ch == 'F') + c->varies = FALSE; + else { + ungetc(ch, f); + objectto(f, "layout: unknown property or > missing"); + layout_RemoveComponent(self, c); + return dataobject_BADFORMAT; + } + }; + } + if (debug) + printf("Got <%ld,%ld,%ld,%ld,%c%c> havechild=%d\n", cLeft(c), cTop(c), cWidth(c), cHeight(c), (cVaries(c) ? 'V' : 'F'), havechild); + if (fgetstring(f, "\n") != 0) { + objectto(f, "layout: trash after coordinates"); + layout_RemoveComponent(self, c); + return dataobject_BADFORMAT; + } + + if (havechild) { + if (fgetstring(f, "\\begindata{") != 0) { + objectto(f, "layout: missing component begindata"); + layout_RemoveComponent(self, c); + return dataobject_BADFORMAT; + } + for (np = dataname; np < dataname + sizeof dataname - 1 && (ch = getc(f)) != EOF && ch != ','; np++) + *np = ch; + *np = '\0'; + if (fscanf(f, "%ld ", &uniqueID) != 1) { + objectto(f, "layout: missing , after component name"); + layout_RemoveComponent(self, c); + return dataobject_BADFORMAT; + } + if (fgetstring(f, "}") != 0) { + objectto(f, "layout: missing closing brace after begindata"); + layout_RemoveComponent(self, c); + return dataobject_BADFORMAT; + } + if (fgetstring(f, "\n") != 0) + objectto(f, "layout: extra stuff after begindata"); + c->data = (struct dataobject *)class_NewObject(dataname); + if (cData(c) == NULL) { + printf("Could not create %s object.\n", dataname); + return dataobject_OBJECTCREATIONFAILED; + } + cData(c)->id = uniqueID; + dataobject_Read(cData(c), f, uniqueID); + + } + layout_Demote(self, c); + if (debug) + printf("done adding component\n"); + break; + + case '\\': /* enddata coming */ + if (fscanf(f, "enddata{layout,%ld}\n", &uniqueID) != 1) { + objectto(f, "layout: expected enddata or another component"); + return dataobject_BADFORMAT; + } + return dataobject_NOREADERROR; + + default: + ungetc(ch, f); + objectto(f, "layout: bad input line"); + return dataobject_BADFORMAT; + + } /* end switch */ + } /* end reading loop */ + printf("layout: premature EOF"); + return dataobject_PREMATUREEOF; + } + + /* read layout from file */ + + long /* returns read error status */ + layout__Read(self, f, id) + struct layout *self; + FILE * f; /* input file */ + long id; /* unique identifier in data stream */ + { + long rc; + + if (debug) + printf("layout_Read(%d)\n", id); + + layout_SetID(self, layout_UniqueID(self)); + layout_SetModified(self); + + rc = readASCII(self, f); + layout_NotifyObservers(self, observable_OBJECTCHANGED); + if (debug) + printf("layout_Read rc = %d\n", rc); + + return rc; + } + + /* remove a component */ + + void layout__RemoveComponent(self, c) + struct layout *self; + struct component *c; /* component to be removed */ + { + struct component *prev; + + if (debug) + printf("layout_RemoveComponent(%s)\n", safename(c)); + + if (cData(c) != NULL) { + /* dataobject_Destroy(cData(c)); */ + c->data = NULL; + } + + if (c == self->firstcomponent) + self->firstcomponent = c->nextcomponent; + else { + forallcomponents(self, prev) { + if (prev->nextcomponent == c) { + prev->nextcomponent = c->nextcomponent; + break; + } + } + if (prev == NULL) + printf("layout: attempt to remove non-component\n"); + } + free(c); + layout_SetModified(self); + layout_NotifyObservers(self, observable_OBJECTCHANGED); + + if (debug) + printf("imbedded remove complete\n"); + } + + /* fill in component */ + + void layout__FillInComponent(self, name, c) + struct layout *self; + char *name; /* name of dataobject subclass */ + struct component *c; /* component to be filled in */ + { + struct dataobject *newobject; + + if (debug) + printf("layout_FillInComponent(%s)\n", name); + + newobject = (struct dataobject *) class_NewObject(name); + if (newobject != NULL) { + if (cData(c) != NULL) + dataobject_Destroy(cData(c)); + newobject->id = (long) newobject; + c->data = newobject; + } + layout_SetModified(self); + layout_NotifyObservers(self, observable_OBJECTCHANGED); + } + + /* create component */ + + struct component *layout__CreateComponent(self) + struct layout *self; + { + struct component *c; + + if (debug) + printf("layout_CreateComponent\n"); + + c = (struct component *)malloc(sizeof(struct component)); + if (c == NULL) { + printf("Insufficient memory for component\n"); + exit(4); + } + c->data = NULL; + c->left = 0; + c->top = 0; + c->width = 0; + c->height = 0; + c->varies = TRUE; + c->nextcomponent = self->firstcomponent; + self->firstcomponent = c; + /* we don't notify anybody of changes yet because this component is still vacant */ + return c; + } + + /* change component size */ + + void layout__SetComponentSize(self, c, x, y, w, h) + struct layout *self; + struct component *c; /* component to change */ + long x, y, w, h; /* new position and size */ + { + if (debug) + printf("layout_SetComponentSize(%s, %d, %d, %d, %d)\n", classname(cData(c)), x, y, w, y); + + if (cLeft(c) != x || cTop(c) != y || cWidth(c) != w || cHeight(c) != h) { + c->left = x; + c->top = y; + c->width = w; + c->height = h; + layout_SetModified(self); + layout_NotifyObservers(self, observable_OBJECTCHANGED); + } + } + + /* check to see if modified */ + + long layout__GetModified(self) + struct layout *self; + { + struct component *c; + long rc, cc; + + rc = super_GetModified(self); + if (!self->inGetModified) { + self->inGetModified = TRUE; + forallcomponents(self, c) { + if (cData(c) != NULL) { + cc = dataobject_GetModified(cData(c)); + if (cc > rc) rc = cc; + } + } + self->inGetModified = FALSE; + } + + if (debug) + printf("layout_GetModified = %d\n", rc); + + return rc; + } + + /* see if b would completely obscure c */ + + #define obscures(self, b, c) ((cLeft(b) <= 0 || cLeft(c) > 0 && cLeft(b) <= cLeft(c)) && (cWidth(b) <= 0 || cWidth(c) > 0 && cRight(b) >= cRight(c)) && (cTop(b) <= 0 || cTop(c) > 0 && cTop(b) <= cTop(c)) && (cHeight(b) <= 0 || cHeight(c) > 0 && cBottom(b) >= cBottom(c))) + + /* see if b and c overlap */ + + #define overlaps(self, b, c) ((cLeft(b) <= 0 || cWidth(c) <= 0 || cLeft(b) <= cRight(c)) && (cWidth(b) <= 0 || cLeft(c) <= 0 ||cRight(b) >= cLeft(c)) && (cTop(b) <= 0 || cHeight(c) <= 0 || cTop(b) <= cBottom(c)) && (cHeight(b) <= 0 || cTop(c) <= 0 || cBottom(b) >= cTop(c))) + + /* promote component to front of stack*/ + + void layout__Promote(self, c) + struct layout *self; + struct component *c; /* component to be promoted to front */ + { + struct component *prev; + boolean changed; + + if (debug) + printf("layout_Promote(%s)\n", classname(cData(c))); + + changed = FALSE; + if (c != self->firstcomponent) { + forallcomponents(self, prev) { + if (overlaps(self, prev, c)) + changed = TRUE; + if (prev->nextcomponent == c) { + prev->nextcomponent = c->nextcomponent; + c->nextcomponent = self->firstcomponent; + self->firstcomponent = c; + break; + } + } + if (prev == NULL) + printf("Layout: Attempt to promote non-component\n"); + } + if (changed) { + layout_SetModified(self); + layout_NotifyObservers(self, observable_OBJECTCHANGED); + } + } + + /* demote component to back of the bus */ + + void layout__Demote(self, c) + struct layout *self; + struct component *c; /* component to be demoted to back */ + { + struct component *prev; + + if (debug) + printf("layout_Demote(%s)\n", safename(c)); + + if (c == self->firstcomponent) + self->firstcomponent = c->nextcomponent; + else { + forallcomponents(self, prev) { + if (prev->nextcomponent == c) { + prev->nextcomponent = c->nextcomponent; + break; + } + } + if (prev == NULL) + printf("layout: attempt to demote non-component\n"); + } + + if (self->firstcomponent == NULL) { + c->nextcomponent = self->firstcomponent; + self->firstcomponent = c; + } + else { + forallcomponents(self, prev) + if (prev->nextcomponent == NULL || obscures(self, prev->nextcomponent, c)) { + c->nextcomponent = prev->nextcomponent; + prev->nextcomponent = c; + break; + } + } + + layout_SetModified(self); + layout_NotifyObservers(self, observable_OBJECTCHANGED); + } + + /* make object variable */ + + void layout__MakeVariable(self, c) + struct layout *self; + struct component *c; /* component which may vary */ + { + if (debug) + printf("layout_MakeVariable(%s)\n", safename(c)); + + c->varies = TRUE; + } + + /* make object fixed */ + + void layout__MakeFixed(self, c) + struct layout *self; + struct component *c; /* component which may vary */ + { + if (debug) + printf("layout_MakeFixed(%s)\n", safename(c)); + + c->varies = FALSE; + } *** atk/layout/layoutv.c Tue Nov 20 14:26:44 1990 --- atk/layout/layoutv.c.NEW Thu Oct 11 14:49:39 1990 *************** *** 0 **** --- 1,1409 ---- + /* ********************************************************************** *\ + * Copyright IBM Corporation 1988,1990 - All Rights Reserved * + * For full copyright information see:'andrew/config/COPYRITE' * + \* ********************************************************************** */ + /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/layoutv.c,v 1.4 90/10/10 17:06:10 jhh Exp $ */ + /* $ACIS$ */ + /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/layoutv.c,v $ */ + + #ifndef lint + char *layoutv_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/layout/RCS/layoutv.c,v 1.4 90/10/10 17:06:10 jhh Exp $"; + #endif /* lint */ + + #define layoutview_MINIMUMSIZE 100 + #define CHILD_MENULIST_KEY 999 + + #define viewname(v) ((v) == NULL ? "" : atom_Name(atomlist_First(view_GetName(v)))) + + extern char *malloc(); + + #include + #include + #include + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + #include + #include + + #define POINTINGTHRESHHOLD 6 /* max distance away from object pointed at */ + #define MOTIONTHRESHHOLD 10 /* min distance for dragging */ + + /* menu mode mask */ + + #define layoutview_EXEC_MASK 1 + #define layoutview_AUTHOR_MASK 2 + + #define layoutview_SELECTION_MASK 4 + + #define layoutview_VARIABLE_MASK 8 + #define layoutview_FIXED_MASK 16 + + /* static data for entire class */ + + static struct keymap *mainmap = (struct keymap *) NULL; + static struct menulist *mainmenus = (struct menulist *) NULL; + static struct bind_Description layoutview_bindings[] = { + + {"layout-run", "\033x", 0, "Exit Authoring~60", 0, layoutview_AUTHOR_MASK, layoutview__SetRunMode, "Enter execution mode"}, + {"layout-author", NULL, 0, "Enter Authoring~60", 0, layoutview_EXEC_MASK, layoutview__SetAuthoringMode, "Enter authoring mode"}, + + {"layout-toggle-debug", "\033\033", 0, NULL, 0, 0, layoutview__ToggleDebug, "Toggle Debug"}, + {"layout-paste-object", "\031", 0, "Authoring~1,Paste object~20", 0, layoutview_SELECTION_MASK, layoutview__Paste, "Paste into current selection"}, + {"layout-imbed-object", "\033\t", 0, "Authoring~1,Imbed object~21", 0, layoutview_SELECTION_MASK, layoutview__SetChild, "Prompt for object and place in current selection"}, + {"layout-destroy-object", "\004", 0, "Authoring~1,Cut object~22", 0, layoutview_SELECTION_MASK, layoutview__DestroyComponent, "Destroy current selection"}, + + {"layout-move-to-back", "\033d", 0, "Authoring~1,Move to back~30", 0, layoutview_SELECTION_MASK, layoutview__Demote, "Move current selection to back"}, + {"layout-background", "\033b", 0, "Authoring~1,Background~31", 0, layoutview_SELECTION_MASK, layoutview__MakeBackground, "Expand current selection and move to back"}, + {"layout-make-variable", "\033v", 0, "Authoring~1,Make variable~35", 0, layoutview_FIXED_MASK, layoutview__MakeVariable, "Allow component to vary"}, + {"layout-make-fixed", "\033f", 0, "Authoring~1,Make fixed~35", 0, layoutview_VARIABLE_MASK, layoutview__MakeFixed, "Component varies only in authoring mode"}, + + {"layout-create-null", NULL, 0, "Authoring~1,Null on create~40", CREATE_NULL, layoutview_AUTHOR_MASK, layoutview__SetCreateMode, "Do not fill in newly created data objects"}, + {"layout-create-filler", NULL, 0, "Authoring~1,Filler on create~41", CREATE_FILLER, layoutview_AUTHOR_MASK, layoutview__SetCreateMode, "Use filler for newly created data objects"}, + {"layout-create-paste", NULL, 0, "Authoring~1,Paste on create~42", CREATE_PASTE, layoutview_AUTHOR_MASK, layoutview__SetCreateMode, "Paste into newly created data objects"}, + + {"layout-fine-granularity", NULL, 0, "Authoring~1,Fine granularity~50", 0, layoutview_AUTHOR_MASK, layoutview__SetGranularity, "Fine (1 pixel) granularity of object placement"}, + {"layout-medium-granularity", NULL, 0, "Authoring~1,Medium granularity~51", 6, layoutview_AUTHOR_MASK, layoutview__SetGranularity, "Medium (6 pixel) granularity of object placement"}, + {"layout-coarse-granularity", NULL, 0, "Authoring~1,Coarse granularity~52", 18, layoutview_AUTHOR_MASK, layoutview__SetGranularity, "Coarse (18 pixel) granularity of object placement"}, + + {NULL, NULL, 0, NULL, 0, NULL, NULL} + }; + + /* initialize static data shared by all instances of layoutview */ + + boolean /* always returns TRUE */ + layoutview__InitializeClass(classID) + struct classheader *classID; /* unused */ + { + + if (debug) + printf("layoutview_InitializeClass(%x)\n", classID); + + mainmap = keymap_New(); + mainmenus = menulist_New(); + bind_BindList(layoutview_bindings, mainmap, mainmenus, &layoutview_classinfo); + + return TRUE; + } + + /* initialize layout view */ + + boolean /* always returns TRUE */ + layoutview__InitializeObject(classID, self) + struct classheader *classID; /* unused */ + struct layoutview *self; + { + if (debug) + printf("layoutview_InitializeObject(%x)\n", classID); + + self->hasInputFocus = FALSE; + self->updateRequested = FALSE; + self->lastUpdate = 0; + self->menulist = menulist_DuplicateML(mainmenus, self); + self->keystate = keystate_Create(self, mainmap); + self->authoringCursor = NULL; + self->subviews = NULL; + self->selection = NULL; + self->hitmode = HIT_EXEC; + self->createmode = CREATE_FILLER; + self->granularity = 0; + menulist_SetMask(self->menulist, layoutview_EXEC_MASK); + return TRUE; + } + + /* initialize graphic-dependent data */ + + static void + InitializeGraphic(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_InitializeGraphic\n"); + + if (layoutview_GetDrawable(self) == NULL) { + printf("InitializeGraphic called without drawable.\n"); + return; + } + self->authoringCursor = cursor_Create(self); + cursor_SetStandard(self->authoringCursor, Cursor_SmallCross); + } + + /* get printable class name of an object */ + + static char * + GetClassName(self, object) + struct layoutview *self; + struct dataobject *object; + { + char *result; + + if (object == NULL) + result = ""; + else { + result = class_GetTypeName(object); + if (strcmp(result, "filler") == 0 || strcmp(result, "cel") == 0) + result = cel_GetObjectName((struct cel *)object); + } + + return result; + } + + /* find or create new viewlist entry */ + + struct view * /* returns view, or NULL if error */ + layoutview__FindSubview(self, c) + struct layoutview *self; + struct component *c; /* component for which view is needed */ + { + struct viewlist *vl; + char *subviewname; /* name for new view */ + + if (c == NULL) + return NULL; + if (cData(c) == NULL) /* can not create view for non-object */ + return NULL; + + forallsubviews(self, vl) + if (vComponent(vl) == c) + return vChild(vl); /* it already exists, so return its child view */ + + /* construct new viewlist entry */ + + vl = (struct viewlist *) malloc(sizeof *vl); + if (vl == NULL) { + printf("out of space for subview list\n"); + return NULL; + } + subviewname = dataobject_ViewName(cData(c)); + vl->component = c; + vl->child = (struct view *) class_NewObject(subviewname); + if (vl->child == NULL) { + printf("unable to create child view\n"); + free(vl); + return NULL; + } + view_SetDataObject(vChild(vl), cData(c)); + view_LinkTree(vChild(vl), &getView(self)); + view_AddObserver(vChild(vl), self); + + if (debug) + printf(".. created subview %s\n", subviewname); + vl->nextview = self->subviews; + self->subviews = vl; + + return vChild(vl); + } + + /* remove viewlist entry */ + + struct component * + layoutview__RemoveSubview(self, child) + struct layoutview *self; + struct view *child; + { + struct viewlist *vl, *uvl; + struct component *c; + + uvl = NULL; + if (self->subviews != NULL && child == vChild(self->subviews)) { + uvl = self->subviews; + self->subviews = uvl->nextview; + } + else { + forallsubviews(self, vl) { + if (vl->nextview != NULL && child == vChild(vl->nextview)) { + uvl = vl->nextview; + vl->nextview = uvl->nextview; + break; + } + } + } + if (uvl != NULL) { + if (debug) + printf(".. removed subview %s\n", viewname(child)); + c = vComponent(uvl); + free((char *)uvl); + } + else + c = NULL; + view_RemoveObserver(child, self); + return c; + } + + /* replace contents of a component */ + + void + layoutview__ReplaceComponent(self, c, dataname) + struct layoutview *self; + struct component *c; + char *dataname; + { + struct view *child; + char foo[81]; + struct viewlist *vl; + + if(! class_IsTypeByName(dataname, "dataobject")){ + sprintf(foo, "%s is not a dataobject", dataname); + message_DisplayString(&getView(self), 0, foo); + return; + } + + child = NULL; + forallsubviews(self, vl) + if (vComponent(vl) == layoutview_Selection(self)) { + child = vChild(vl); + break; + } + if (child != NULL) { + layoutview_RemoveSubview(self, child); /* prevents removing component in view_Destroy */ + view_UnlinkTree(child); + view_Destroy(child); + } + + layout_FillInComponent(getLayout(self), dataname, c); + } + + /* Init new component */ + + static void + InitComponent(self) + struct layoutview *self; + { + struct view *child; + child = layoutview_FindSubview(self, layoutview_Selection(self)); + if (child != NULL) + view_WantInputFocus(child, child); + } + + /* negotiate size of view */ + + enum view_DSattributes /* returns indication of what it wants */ + layoutview__DesiredSize(self, width, height, pass, dWidth, dHeight) + struct layoutview *self; + long width; /* width being offered by parent */ + long height; /* height being offered */ + enum view_DSpass pass; /* what parent is willing to give */ + long *dWidth; /* set to desired width */ + long *dHeight; /* set to desired height */ + + /* layoutview asks for just enough space to display all contained components */ + + { + struct component *c; + long desiredWidth; + long desiredHeight; + + if (debug) + printf("layoutview_DesiredSize(, %d, %d, %d, .. )\n", width, height, (int)pass); + + desiredWidth = desiredHeight = layoutview_MINIMUMSIZE; + forallcomponents(getLayout(self), c) { + if (cWidth(c) > 0 && desiredWidth < cRight(c)) + desiredWidth = cRight(c); + if (cHeight(c) > 0 && desiredHeight < cBottom(c)) + desiredHeight = cBottom(c); + } + + *dWidth = (pass == view_WidthSet) ? width : desiredWidth; + *dHeight = (pass == view_HeightSet) ? height : desiredHeight; + + return (enum view_DSattributes) + ((int)((*dWidth > desiredWidth) ? view_WidthFlexible : view_WidthLarger) + | (int)((*dHeight > desiredHeight) ? view_HeightFlexible : view_HeightLarger)); + } + + /* draw rubber-band box */ + + static void + DrawRubberBox(self) + struct layoutview *self; + { + short savetransfermode; + + savetransfermode = layoutview_GetTransferMode(self); + layoutview_SetTransferMode(self, graphic_INVERT); + + layoutview_DrawRectSize(self, self->rubberleft - 1, self->rubbertop - 1, self->rubberwidth + 1, self->rubberheight + 1); + + layoutview_SetTransferMode(self, savetransfermode); + } + + /* update image */ + + #define ReallyDrawing(how, updateRect) (updateRect == NULL || how != view_Remove && how != view_MoveNoRedraw) + + static void + Update(self, how, updateRect, geometryChanged) + struct layoutview *self; + enum view_UpdateType how; /* kind of update */ + struct rectangle *updateRect; /* rectangle affected; or NULL for update */ + boolean geometryChanged; /* geometry changed since last update */ + { + struct component *c; + struct view *child; + struct region *visualRegion; /* visual region of entire layout */ + struct region *remainingRegion; /* region still to be updated */ + struct rectangle childRect; /* rectangle containing child */ + struct region *childRegion; /* visual region available to child */ + struct rectangle frameRect; /* rectangle containing child and frame */ + struct region *frameRegion; /* region containing child plus frame */ + struct rectangle vb; /* visual bounds for cursor */ + struct graphic *fillpattern; /* fill pattern bitmap */ + + /* deal with cursors */ + + if (self->hasInputFocus && how != view_Remove && layoutview_Hitmode(self) != HIT_EXEC) { + layoutview_GetVisualBounds(self, &vb); + layoutview_PostCursor(self, &vb, self->authoringCursor); + } + else + layoutview_RetractCursor(self, self->authoringCursor); + + /* initialize region being updated */ + + visualRegion = layoutview_GetVisualRegion(self, region_CreateEmptyRegion()); + if (updateRect != NULL) { + remainingRegion = region_CreateRectRegion(updateRect); + region_IntersectRegion(remainingRegion, visualRegion, remainingRegion); + } + else { + remainingRegion = region_CreateEmptyRegion(); + region_CopyRegion(remainingRegion, visualRegion); + } + layoutview_SetClippingRegion(self, remainingRegion); + if (ReallyDrawing(how, updateRect) && geometryChanged) + layoutview_EraseVisualRect(self); + else if (layoutview_Hitmode(self) == HIT_DRAGGING || layoutview_Hitmode(self) == HIT_CREATING) + DrawRubberBox(self); + + forallcomponents(getLayout(self), c) { + + rectangle_SetRectSize(&childRect, vLeft(self, c), vTop(self, c), vWidth(self, c), vHeight(self, c)); + childRegion = region_CreateRectRegion(&childRect); + region_IntersectRegion(childRegion, remainingRegion, childRegion); + + /* draw frame around child */ + + if (layoutview_Hitmode(self) != HIT_EXEC) { + if (ReallyDrawing(how, updateRect)) { + layoutview_SetClippingRegion(self, remainingRegion); + if (c != layoutview_Selection(self)) + fillpattern = layoutview_GrayPattern(self, 8, 16); + else if (layoutview_Hitmode(self) != HIT_DRAGGING && layoutview_Hitmode(self) != HIT_CREATING) + fillpattern = layoutview_BlackPattern(self); + else + fillpattern = layoutview_WhitePattern(self); + if (cTop(c) > 0) + layoutview_FillRectSize(self, vLeft(self, c) - 1, cTop(c) - 1, vWidth(self, c) + 1, 1, fillpattern); + if (cWidth(c) > 0) + layoutview_FillRectSize(self, cRight(c), vTop(self, c) - 1, 1, vHeight(self, c) + 1, fillpattern); + if (cHeight(c) > 0) + layoutview_FillRectSize(self, vLeft(self, c), cBottom(c), vWidth(self, c) + 1, 1, fillpattern); + if (cLeft(c) > 0) + layoutview_FillRectSize(self, cLeft(c) - 1, vTop(self, c), 1, vHeight(self, c) + 1, fillpattern); + } + rectangle_SetRectSize(&frameRect, vLeft(self, c) - 1, vTop(self, c) - 1, vWidth(self, c) + 2, vHeight(self, c) + 2); + frameRegion = region_CreateRectRegion(&frameRect); + region_SubtractRegion(remainingRegion, frameRegion, remainingRegion); + region_Destroy(frameRegion); + } + else + region_SubtractRegion(remainingRegion, childRegion, remainingRegion); + + /* update child itself */ + + layoutview_SetClippingRegion(self, childRegion); + + child = layoutview_FindSubview(self, c); + if (!geometryChanged) + /* do nothing */ ; + else if (child == NULL) { + if (ReallyDrawing(how, updateRect)) + layoutview_FillRect(self, &childRect, layoutview_BlackPattern(self)); + } + else if (updateRect != NULL) { + if (debug) + printf("FullUpdating %s\n", dataobject_ViewName(cData(c))); + view_InsertView(child, self, &childRect); + region_OffsetRegion(childRegion, -vLeft(self, c), -vTop(self, c)); + view_SetVisualRegion(child, childRegion); + view_FullUpdate(child, how, rectangle_Left(updateRect), rectangle_Top(updateRect), rectangle_Width(updateRect), rectangle_Height(updateRect)); + } + else { + if (debug) + printf("Redrawing %s\n", dataobject_ViewName(cData(c))); + view_InsertView(child, self, &childRect); + region_OffsetRegion(childRegion, -vLeft(self, c), -vTop(self, c)); + view_SetVisualRegion(child, childRegion); + view_FullUpdate(child, view_FullRedraw, 0, 0, vWidth(self, c), vHeight(self, c)); + } + region_Destroy(childRegion); + + } + + /* clean up clipping region, memory allocation, and active rubberbanding */ + + region_Destroy(remainingRegion); + layoutview_SetClippingRegion(self, visualRegion); + region_Destroy(visualRegion); + + if (layoutview_Hitmode(self) == HIT_DRAGGING || layoutview_Hitmode(self) == HIT_CREATING) + DrawRubberBox(self); + } + + /* full update when window changes */ + + void + layoutview__FullUpdate(self, how, left, top, width, height) + struct layoutview *self; + enum view_UpdateType how; /* kind of update */ + long left; /* updated rectangle (for certain kinds) */ + long top; + long width; + long height; + { + struct rectangle cliprect; /* actual updated rectangle */ + + if (debug) + printf("layoutview_FullUpdate(%d, %d, %d, %d, %d)\n", (int)how, left, top, width, height); + + self->updateRequested = FALSE; + + /* deferred initialization of graphic */ + + if (self->authoringCursor == NULL) + InitializeGraphic(self); + + /* force authoring mode if the layout is empty */ + + if (layoutview_Hitmode(self) == HIT_EXEC && layout_GetFirstComponent(getLayout(self)) == NULL) + layoutview_SetAuthoringMode(self); + + /* define rectangle actually being updated */ + + if (how == view_PartialRedraw || how == view_LastPartialRedraw) + rectangle_SetRectSize(&cliprect, left, top, width, height); + else { + rectangle_SetRectSize(&cliprect, layoutview_GetVisualLeft(self), layoutview_GetVisualTop(self), layoutview_GetVisualWidth(self), layoutview_GetVisualHeight(self)); + } + /* perform the update */ + + layoutview_SetTransferMode(self, graphic_COPY); + Update(self, how, &cliprect, TRUE); + if (how == view_FullRedraw) + self->lastUpdate = layout_GetModified(getLayout(self)); + } + + /* partial update in response to WantUpdate request */ + + void + layoutview__Update(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_Update requested=%d\n", self->updateRequested); + + Update(self, -1, NULL, (self->lastUpdate < layout_GetModified(getLayout(self)))); + self->lastUpdate = layout_GetModified(getLayout(self)); + } + + /* request update */ + + void + layoutview__WantUpdate(self, requestor) + register struct layoutview *self; + struct view *requestor; + { + + if (debug) + printf("layoutview_WantUpdate(%x,%x) requested = %d\n", self, requestor, self->updateRequested); + + if (&getView(self) == requestor) { + if (self->updateRequested) + return; + self->updateRequested = TRUE; + } + super_WantUpdate(self, requestor); + } + + + /* set authoring menu mask */ + + static void + SetAuthoringMask(self) + struct layoutview *self; + { + int m; + + m = layoutview_AUTHOR_MASK; + + if (layoutview_Selection(self) != NULL) { + m |= layoutview_SELECTION_MASK; + if (cVaries(layoutview_Selection(self))) + m |= layoutview_VARIABLE_MASK; + else + m |= layoutview_FIXED_MASK; + + if (debug) + printf(" authoring mask = %d varies=%d\n", m, cVaries(layoutview_Selection(self))); + } + + if (menulist_SetMask(self->menulist, m)) + layoutview_PostMenus(self, NULL); + } + + /* make new selection */ + + void + layoutview__SetSelection(self, c) + struct layoutview *self; + struct component *c; /* component to selected, or NULL */ + { + if (layoutview_Selection(self) != c) { + layoutview_Selection(self) = c; + if (layoutview_Hitmode(self) != HIT_EXEC) + layoutview_WantUpdate(self, &getView(self)); + } + if (layoutview_Hitmode(self) != HIT_INITIALIZING && layoutview_Hitmode(self) != HIT_EXEC) + SetAuthoringMask(self); + } + + /* set new selection size and position */ + + boolean /* returns TRUE if real selection created */ + layoutview__SetSelectionSize(self, x, y, w, h) + struct layoutview *self; + long x, y, w, h; + { + if (w < 0) { + w = -w; + x = x - w; + } + if (h < 0) { + h = -h; + y = y - h; + } + + if (w < POINTINGTHRESHHOLD || h < POINTINGTHRESHHOLD) { /* too small - ditch it */ + if (layoutview_Selection(self) != NULL) + layoutview_DestroyComponent(self); + } + else { + if (x + w >= layoutview_GetVisualRight(self) - POINTINGTHRESHHOLD) + w = 0; + if (y + h >= layoutview_GetVisualBottom(self) - POINTINGTHRESHHOLD) + h = 0; + if (x <= POINTINGTHRESHHOLD) + x = 0; + if (y <= POINTINGTHRESHHOLD) + y = 0; + if (layoutview_Selection(self) == NULL) + layoutview_SetSelection(self, layout_CreateComponent(getLayout(self))); + if (layoutview_Selection(self) != NULL) { + layout_SetComponentSize(getLayout(self), layoutview_Selection(self), x, y, w, h); + return TRUE; + } + } + return FALSE; + } + + /* set rubber band box size and position */ + + static void + SetRubberBox(self, x, y) + struct layoutview *self; + long x; /* current position relative to self->dragx */ + long y; /* current position relative to self->dragy */ + { + struct component *c = layoutview_Selection(self); + long xx, yy, rr, bb; + + if (c != layout_GetFirstComponent(getLayout(self))) + layoutview_Promote(self); + xx = (self->dragleft ? x - self->dragx : 0); + yy = (self->dragtop ? y - self->dragy : 0); + rr = (self->dragright ? x - self->dragx : 0); + bb = (self->dragbottom ? y - self->dragy : 0); + self->rubberleft = layoutview_ApplyGranularity(self, vLeft(self, c) + xx); + self->rubbertop = layoutview_ApplyGranularity(self, vTop(self, c) + yy); + self->rubberwidth = layoutview_ApplyGranularity(self, vWidth(self, c) - xx + rr); + self->rubberheight = layoutview_ApplyGranularity(self, vHeight(self, c) - yy + bb); + } + + /* Find component containing (x, y) */ + + static struct component * /* returns component containing x, y or NULL */ + FindContainingComponent(self, x, y, thresh) + struct layoutview *self; + long x; /* point to be found */ + long y; + long thresh; /* tolerance outside component allowed */ + { + struct component *c; + + forallcomponents(getLayout(self), c) { + if ((cLeft(c) <= 0 || cLeft(c) - thresh <= x) && (cWidth(c) <= 0 || cRight(c) + thresh > x) && (cTop(c) <= 0 || cTop(c) - thresh <= y) && (cHeight(c) <= 0 || cBottom(c) + thresh > y)) { + return c; + } + } + return NULL; + } + + /* process mouse hit */ + + struct view * /* returns view which should get follow-up events*/ + layoutview__Hit(self, action, x, y, numberOfClicks) + struct layoutview *self; + enum view_MouseAction action; /* which button; what it did */ + long x; /* where the mouse points */ + long y; + long numberOfClicks; /* number of hits at same place */ + { + struct component *c; + struct view *result; + struct view *child; + char whereline[80]; + + if (debug) + printf("layoutview_Hit(%d, %ld, %ld, %ld)\n", (int) action, x, y, numberOfClicks); + + if (layoutview_Hitmode(self) == HIT_DRAGGING || layoutview_Hitmode(self) == HIT_CREATING) + DrawRubberBox(self); + + c = FindContainingComponent(self, x, y, 0); + + /* pass hit to child when running or initializing */ + + if (layoutview_Hitmode(self) == HIT_INITIALIZING && c != layoutview_Selection(self)) { + layoutview_SetAuthoringMode(self); + layoutview_SetSelection(self, c); + } + if (layoutview_Hitmode(self) == HIT_AUTHORING && (action == view_LeftDown || action == view_RightDown) && c != NULL && numberOfClicks > 1) { + layoutview_SetInitMode(self); + numberOfClicks -= 1; + } + + if (c != NULL && (layoutview_Hitmode(self) == HIT_EXEC && cVaries(c) || layoutview_Hitmode(self) == HIT_INITIALIZING)) { + layoutview_SetSelection(self, c); + + child = layoutview_FindSubview(self, c); + + if (child == NULL) { + if (debug) + printf("Null hit at %d %d\n", x - vLeft(self, c), y - vTop(self, c)); + result = NULL; + } + + else { + if (debug) + printf("Passing hit to child %x at %d %d\n", child, x - vLeft(self, c), y - vTop(self, c)); + result = view_Hit(child, action, x - vLeft(self, c), y - vTop(self, c), numberOfClicks); + } + + if (debug) + printf("Child hit returned %x\n", result); + if (result != NULL) + return result; + } + + /* create new component or drag existing one */ + + else if (action == view_LeftDown || action == view_RightDown && layoutview_Hitmode(self) == HIT_AUTHORING) { + c = FindContainingComponent(self, x, y, POINTINGTHRESHHOLD); + layoutview_SetSelection(self, c); + self->dragx = x; + self->dragy = y; + if (c == NULL) { + + /* initialize create */ + self->dragleft = self->dragtop = FALSE; + self->dragright = self->dragbottom = TRUE; + self->rubberleft = layoutview_ApplyGranularity(self, self->dragx); + self->rubbertop = layoutview_ApplyGranularity(self, self->dragy); + self->rubberheight = self->rubberwidth = 0; + } + else { + + /* initialize drag */ + + self->dragleft = x < vLeft(self, c) + POINTINGTHRESHHOLD && x < vRight(self, c); + self->dragright = x >= vRight(self, c) - POINTINGTHRESHHOLD && x >= vLeft(self, c); + self->dragtop = y < vTop(self, c) + POINTINGTHRESHHOLD && y < vBottom(self, c); + self->dragbottom = y >= vBottom(self, c) - POINTINGTHRESHHOLD && y >= vTop(self, c); + if (!self->dragleft && !self->dragright && !self->dragtop && !self->dragbottom) + self->dragleft = self->dragright = self->dragtop = self->dragbottom = TRUE; + } + } + + /* continue creating or dragging */ + + else if ((action == view_RightUp || action == view_RightMovement + || action == view_LeftUp || action == view_LeftMovement) && + (layoutview_Hitmode(self) == HIT_CREATING || layoutview_Hitmode(self) == HIT_DRAGGING + || layoutview_Hitmode(self) == HIT_AUTHORING + && (x < self->dragx - MOTIONTHRESHHOLD + || x > self->dragx + MOTIONTHRESHHOLD + || y < self->dragy - MOTIONTHRESHHOLD + || y > self->dragy + MOTIONTHRESHHOLD))) { + + c = layoutview_Selection(self); + + /* do not drag background, but OK to resize it */ + if (layoutview_Hitmode(self) == HIT_AUTHORING + && self->dragleft && self->dragright && self->dragtop && self->dragbottom + && cLeft(c) <= 0 && cTop(c) <= 0 && cWidth(c) <= 0 && cHeight(c) <= 0) { + c = NULL; + layoutview_SetSelection(self, c); + self->dragleft = self->dragtop = FALSE; + self->dragright = self->dragbottom = TRUE; + self->rubberleft = layoutview_ApplyGranularity(self, self->dragx); + self->rubbertop = layoutview_ApplyGranularity(self, self->dragy); + self->rubberwidth = self->rubberheight = 0; + } + + if (c == NULL ) { + + /* actually begin creating */ + + if (layoutview_Hitmode(self) == HIT_AUTHORING) + self->hitmode = HIT_CREATING; + + /* continue creating */ + + self->rubberwidth = layoutview_ApplyGranularity(self, x - self->dragx); + self->rubberheight = layoutview_ApplyGranularity(self, y - self->dragy); + if (action == view_LeftUp || action == view_RightUp) { + + /* finish creating */ + + message_DisplayString(&getView(self), 0, ""); + if (layoutview_SetSelectionSize(self, self->rubberleft, self->rubbertop, self->rubberwidth, self->rubberheight)) { + layoutview_SetInitMode(self); + if (cData(layoutview_Selection(self)) == NULL) { + if (layoutview_Createmode(self) == CREATE_FILLER) + layoutview_SetChildByName(self, "filler"); + else if (layoutview_Createmode(self) == CREATE_PASTE) + layoutview_Paste(self); + } + } + else { + layoutview_SetSelection(self, NULL); + layoutview_SetAuthoringMode(self); + } + } + } + else { + if (layoutview_Hitmode(self) == HIT_AUTHORING) { + + /* actually begin dragging */ + + self->hitmode = HIT_DRAGGING; + SetRubberBox(self, self->dragx, self->dragy); + DrawRubberBox(self); + } + + /* continue dragging */ + + SetRubberBox(self, x, y); + if (action == view_LeftUp || action == view_RightUp) { + + /* finish dragging */ + + DrawRubberBox(self); + message_DisplayString(&getView(self), 0, ""); + layoutview_SetSelectionSize(self, self->rubberleft, self->rubbertop, self->rubberwidth, self->rubberheight); + self->hitmode = HIT_AUTHORING; + if (debug) + printf("Done dragging, back to authoring\n"); + } + } + } + + if (!self->hasInputFocus && layoutview_Hitmode(self) != HIT_INITIALIZING) + layoutview_WantInputFocus(self, &getView(self)); + + if (layoutview_Hitmode(self) == HIT_DRAGGING || layoutview_Hitmode(self) == HIT_CREATING) { + DrawRubberBox(self); + *whereline = '\0'; + if (self->dragleft) + sprintf(whereline + strlen(whereline), "left =%4d ", self->rubberleft); + if (self->dragright) + sprintf(whereline + strlen(whereline), "right =%4d ", self->rubberleft + self->rubberwidth); + if (self->dragtop) + sprintf(whereline + strlen(whereline), "top =%4d ", self->rubbertop); + if (self->dragbottom) + sprintf(whereline + strlen(whereline), "bottom =%4d ", self->rubbertop + self->rubberheight); + if (self->dragleft != self->dragright) + sprintf(whereline + strlen(whereline), "width =%4d ", self->rubberwidth); + if (self->dragtop != self->dragbottom) + sprintf(whereline + strlen(whereline), "height =%4d ", self->rubberheight); + message_DisplayString(&getView(self), 0, whereline); + } + + return &getView(self); + } + + /* input focus obtained; highlight something and post menus */ + + void + layoutview__ReceiveInputFocus(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_ReceiveInputFocus\n"); + + if (!(self->hasInputFocus)) { + self->hasInputFocus = TRUE; + self->keystate->next = NULL; + layoutview_PostKeyState(self, self->keystate); + layoutview_PostMenus(self, NULL); + } + } + + /* input focus lost; remove highlighting */ + + void + layoutview__LoseInputFocus(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_LoseInputFocus\n"); + + if (self->hasInputFocus) { + self->hasInputFocus = FALSE; + } + } + + /* handle request to post menus */ + + void + layoutview__PostMenus(self, ml) + struct layoutview *self; + struct menulist *ml; /* list of menus to post */ + { + if (debug) { + if (ml == NULL) + printf("layoutview_PostMenus NULL\n"); + else + printf("layoutview_PostMenus %x %s\n", ml, viewname((struct view *)ml->object)); + } + + menulist_UnchainML(self->menulist, CHILD_MENULIST_KEY); + if (ml != NULL) + menulist_ChainAfterML(self->menulist, ml, CHILD_MENULIST_KEY); + + super_PostMenus(self, self->menulist); + } + + /* handle child's request for a new size */ + + void + layoutview__WantNewSize(self, requestor) + struct layoutview *self; + struct view *requestor; /* view requesting a new size */ + { + struct viewlist *vl; + struct component *c; + long dWidth, dHeight; + + if (debug) + printf("layoutview_WantNewSize(%s)\n", viewname(requestor)); + + forallsubviews(self, vl) { + if (vChild(vl) == requestor) { + c = vComponent(vl); + view_DesiredSize(requestor, vWidth(self, c), vHeight(self, c), view_NoSet, &dWidth, &dHeight); + if (debug) + printf(" .. ignored %d %d\n", dWidth, dHeight); + } + } + } + + /* destroy selected component including its view */ + + void + layoutview__DestroyComponent(self) + struct layoutview *self; + { + struct viewlist *vl; + struct view *child; + FILE *cutFile; + char buffer[81]; + + if (debug) + printf("layoutview_DestroyComponent(%s)\n", GetClassName(self, cData(layoutview_Selection(self)))); + + if (layoutview_Selection(self) == NULL) + return; + child = NULL; + forallsubviews(self, vl) + if (vComponent(vl) == layoutview_Selection(self)) { + child = vChild(vl); + break; + } + if (child != NULL) { + layoutview_RemoveSubview(self, child); /* prevents removing component in view_Destroy */ + view_UnlinkTree(child); + view_Destroy(child); + } + if (cData(layoutview_Selection(self)) != NULL ) { + cutFile = im_ToCutBuffer(layoutview_GetIM(self)); + dataobject_Write(cData(layoutview_Selection(self)), cutFile, im_GetWriteID(), 0); + im_CloseToCutBuffer(layoutview_GetIM(self), cutFile); + sprintf(buffer, "Poof! Your %s vanishes into the cutbuffer.", GetClassName(self, cData(layoutview_Selection(self)))); + message_DisplayString(self, 0, buffer); + } + else + message_DisplayString(self, 0, "Poof!"); + layout_RemoveComponent(getLayout(self), layoutview_Selection(self)); + layoutview_SetSelection(self, NULL); + } + + /* destroy all subviews of a layout */ + + static void + DestroySubviews(self) + struct layoutview *self; + { + struct viewlist *vl; + struct view *child; + + while (self->subviews != NULL) { + vl = self->subviews; + child = vChild(vl); + view_UnlinkTree(child); + view_Destroy(child); + } + } + + /* tear down a layoutview */ + + void + layoutview__FinalizeObject(classID, self) + struct classheader *classID; + struct layoutview *self; + { + if (debug) + printf("layoutview_FinalizeObject\n"); + + DestroySubviews(self); + menulist_Destroy(self->menulist); + keystate_Destroy(self->keystate); + } + + /* build tree of views */ + + void + layoutview__LinkTree(self, parent) + struct layoutview *self; + struct view *parent; /* parent into which to link self */ + { + struct viewlist *vl; + + if (debug) + printf("layoutview_LinkTree to %s\n", viewname(parent)); + + forallsubviews(self, vl) + view_LinkTree(vChild(vl), self); + + super_LinkTree(self, parent); + } + + /* notification that observed object changed */ + + void + layoutview__ObservedChanged(self, changed, status) + struct layoutview *self; + struct observable *changed; /* that which changed */ + long status; /* OBJECTDESTROYED is used to signal deletion */ + { + struct component *c; + + if (debug) + printf("layoutview_ObservedChanged(%ld)\n", status); + + if (changed == &getLayout(self)->header.observable) { /* if it is my dataobject */ + + if (status == observable_OBJECTDESTROYED) + DestroySubviews(self); + layoutview_WantUpdate(self, &getView(self)); + } + + else if (status == observable_OBJECTDESTROYED) { + c = layoutview_RemoveSubview(self, (struct view *)changed); + if (c != NULL) { + layout_RemoveComponent(getLayout(self), c); + if (debug) + printf("removing subview %s\n", GetClassName(self, cData(c))); + } + } + + else { /* not my dataobject */ + super_ObservedChanged(self, changed, status); + + } + } + + /* toggle debug */ + + void + layoutview__ToggleDebug(self) + struct layoutview *self; + { + + /* + the rather peculiar if statement below is designed to work properly + in either the case that layout and layoutview are loaded separately or + loaded together (ie two or one copies of 'debug' + */ + if (debug) { + layout_ToggleDebug(getLayout(self)); + debug = 0; + } else { + layout_ToggleDebug(getLayout(self)); + debug = 1; + } + } + + /* enter execution mode */ + + void + layoutview__SetRunMode(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_SetRunMode() hitmode=%d\n", layoutview_Hitmode(self)); + + if (layoutview_Hitmode(self) != HIT_EXEC) { + if (menulist_SetMask(self->menulist, layoutview_EXEC_MASK)) + layoutview_PostMenus(self, NULL); + layoutview_WantUpdate(self, &getView(self)); + self->lastUpdate = -1; + self->hitmode = HIT_EXEC; + } + } + + /* enter initialization mode */ + + void + layoutview__SetInitMode(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_SetInitMode() hitmode=%d\n", layoutview_Hitmode(self)); + + if (layoutview_Hitmode(self) != HIT_INITIALIZING) { + if (menulist_SetMask(self->menulist, layoutview_EXEC_MASK)) + layoutview_PostMenus(self, NULL); + if (layoutview_Hitmode(self) != HIT_AUTHORING) { + layoutview_WantUpdate(self, &getView(self)); + self->lastUpdate = -1; + } + self->hitmode = HIT_INITIALIZING; + } + } + + /* enter authoring mode */ + + void + layoutview__SetAuthoringMode(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_SetAuthoringMode() hitmode=%d\n", layoutview_Hitmode(self)); + + if (layoutview_Hitmode(self) != HIT_AUTHORING) { + SetAuthoringMask(self); + if (layoutview_Hitmode(self) != HIT_INITIALIZING) { + layoutview_WantUpdate(self, &getView(self)); + self->lastUpdate = -1; + } + self->hitmode = HIT_AUTHORING; + } + } + + /* past object into selected component */ + + void + layoutview__Paste(self) + struct layoutview *self; + { + FILE *pasteFile; + int objectID; + char *objectName; + + if (debug) + printf("layoutview_Paste()\n"); + + if(layoutview_Selection(self) == NULL) + return; + pasteFile = im_FromCutBuffer(layoutview_GetIM(self)); + objectName = filetype_Lookup(pasteFile, NULL, &objectID, NULL); /* For now, ignore attributes. */ + if(objectName == NULL) + objectName = "text"; + layoutview_ReplaceComponent(self, layoutview_Selection(self), objectName); + if (cData(layoutview_Selection(self)) != NULL) + dataobject_Read(cData(layoutview_Selection(self)), pasteFile, objectID); + im_CloseFromCutBuffer(layoutview_GetIM(self), pasteFile); + InitComponent(self); + } + + /* insert dataobject by name */ + + void + layoutview__SetChildByName(self, dataname) + struct layoutview *self; + char *dataname; /* dataobject name */ + { + if (dataname == NULL || *dataname == '\0') + dataname = "filler"; + + if (debug) + printf("layoutview_SetChildByName(%s)\n", dataname); + + layoutview_ReplaceComponent(self, layoutview_Selection(self), dataname); + InitComponent(self); + } + + /* prompt for name and insert data object */ + + void + layoutview__SetChild(self) + struct layoutview *self; + { + char dataname[100]; + + dataname[0] = '\0'; + if (message_AskForString(&getView(self), 0, "Data object to enter here (filler): ", "", dataname, sizeof dataname)) + return; + layoutview_SetChildByName(self, dataname); + } + + /* promote selection to front */ + + void + layoutview__Promote(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_Promote()\n"); + + if (layoutview_Selection(self) != NULL) + layout_Promote(getLayout(self), layoutview_Selection(self)); + } + + + /* demote selection to back of list */ + + void + layoutview__Demote(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_Demote()\n"); + + if (layoutview_Selection(self) != NULL) + layout_Demote(getLayout(self), layoutview_Selection(self)); + } + + /* fill background of layout with selection */ + + void + layoutview__MakeBackground(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_MakeBackground()\n"); + + if (layoutview_Selection(self) != NULL) { + layout_Demote(getLayout(self), layoutview_Selection(self)); + layout_SetComponentSize(getLayout(self), layoutview_Selection(self), 0, 0, 0, 0); + SetAuthoringMask(self); + } + } + + /* Allow selected component to vary */ + + void + layoutview__MakeVariable(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_MakeVariable()\n"); + + if (layoutview_Selection(self) != NULL) { + layout_MakeVariable(getLayout(self), layoutview_Selection(self)); + SetAuthoringMask(self); + } + } + + /* Require selected component to vary only when authoring */ + + void + layoutview__MakeFixed(self) + struct layoutview *self; + { + if (debug) + printf("layoutview_MakeFixed()\n"); + + if (layoutview_Selection(self) != NULL) { + layout_MakeFixed(getLayout(self), layoutview_Selection(self)); + SetAuthoringMask(self); + } + } + + /* Do not fill newly created data objects */ + + void + layoutview__SetCreateMode(self, createmode) + struct layoutview *self; + enum createmode_enum createmode; + { + if (debug) + printf("layoutview_SetCreateMode(%d)\n", createmode); + + self->createmode = createmode; + } + + /* Set granularity */ + + void + layoutview__SetGranularity(self, granularity) + struct layoutview *self; + int granularity; + { + if (debug) + printf("layoutview_SetGranularity(%d)\n", granularity); + + self->granularity = granularity; + } + + /* print components back to front */ + + static void + PrintComponents(self, f, processor, finalFormat, c, saveno) + struct layoutview *self; + FILE *f; + char *processor; /* processor */ + char *finalFormat; /* final format */ + struct component *c; /* current component to be printed */ + int saveno; /* number of state-restoring macro */ + { + struct view *child; + struct rectangle childRect; + + /* use recursion to print from back to front */ + + if (c == NULL) + return; + PrintComponents(self, f, processor, finalFormat, c->nextcomponent, saveno); + + /* OK with those behind, now print this individual component */ + + child = layoutview_FindSubview(self, c); + fprintf(f, "\\\"component: %s\n", viewname(child)); + + fprintf(f, ".rs\n"); /* be sure we are really spacing */ + fprintf(f, ".sp %dp\n", vTop(self, c)); /* space to top of component */ + fprintf(f, ".in \\n(.iu+%dp\n", vLeft(self, c)); /* indent to left of component */ + if (cWidth(c) > 0) + fprintf(f, ".ll \\n(.iu+%dp\n", cWidth(c)); /* set width for component */ + + if (child) { + rectangle_SetRectSize(&childRect, vLeft(self, c), vTop(self, c), vWidth(self, c), vHeight(self, c)); + view_InsertView(child, self, &childRect); + view_Print(child, f, processor, finalFormat, FALSE); + } + + fprintf(f, ".br\n"); /* flush line buffer */ + fprintf(f, ".%d\n", saveno); /* restore state */ + fprintf(f, ".rt\n"); /* return to top of layout */ + } + + /* print as part of larger document */ + + void + layoutview__Print(self, f, processor, finalFormat, toplevel) + struct layoutview *self; + FILE *f; /* output file */ + char *processor; /* processor */ + char *finalFormat; /* final format */ + boolean toplevel; /* am I the top level view? */ + { + long height; + struct component *c; + static int saveno = 89; + + if (debug) + printf("layoutview_Print(%x, %x, %s, %s, %d)\n", self, f, processor, finalFormat, toplevel); + + /* set up top-level stuff */ + + if (class_Load("texttroff") == NULL) + printf("Can't load texttroff - document initializtion missing.\n"); + if (toplevel && class_IsLoaded("texttroff")) { + texttroff_BeginDoc(f); + fprintf(f, ".nr IN 0\n"); /* suppress indent at outer level */ + fprintf(f, ".nr PO 0\n"); /* ditto left margin */ + fprintf(f, ".nr HM 0\n"); /* ditto header margin */ + fprintf(f, ".nr FM 0\n"); /* ditto footer margin */ + fprintf(f, ".RS\n"); + } + + fprintf(f, "\\\"layout begins\n"); + + /* save state in macro 90, 91, ... */ + + saveno += 1; + fprintf(f, ".de %d\n", saveno); /* macro to restore state */ + fprintf(f, ".if \\n(.u .fi\n"); /* filling */ + fprintf(f, ".if \\n(.j .ad\n"); /* adjusting */ + fprintf(f, ".if \\n(.j=0 .na\n"); + fprintf(f, ".ft \\n(.f\n"); /* font */ + fprintf(f, ".ps \\n(.s\n"); /* point size */ + fprintf(f, ".vs \\n(.vu\n"); /* vertical spacing */ + fprintf(f, ".ll \\n(.lu\n"); /* line length */ + fprintf(f, ".in \\n(.iu\n"); /* indentation */ + fprintf(f, "..\n"); + + /* ask for necessary space on page and remember starting point */ + + height = 0; + forallcomponents(getLayout(self), c) { + if (cHeight(c) > 0 && height < cBottom(c)) + height = cBottom(c); + } + + fprintf(f, ".rs\n"); /* be sure we are really spacing */ + fprintf(f, ".sp -\\n(VSu\n"); /* compensate for baseline offset */ + fprintf(f, ".ne %dp\n", height); /* insure enough space to next trap */ + fprintf(f, ".mk\n"); /* mark this starting position */ + + /* print all components back to front */ + + PrintComponents(self, f, processor, finalFormat, layout_GetFirstComponent(getLayout(self)), saveno); + + fprintf(f, ".sp %dp\n", height); /* space to bottom of layout */ + saveno -= 1; + fprintf(f, "\\\"layout ends\n"); + + if (toplevel && class_IsLoaded("texttroff")) + texttroff_EndDoc(f); + + layoutview_WantUpdate(self, &getView(self)); /* redraw to fix up visual regions */ + self->lastUpdate = -1; + } *** atk/layout/layout.doc Tue Nov 20 14:27:00 1990 --- atk/layout/layout.doc.NEW Thu Oct 11 14:49:41 1990 *************** *** 0 **** --- 1,285 ---- + \begindata{text,268680648} + \textdsversion{12} + \template{default} + \define{paragraph + menu:[Title~3,Paragraph~23] + attr:[LeftMargin LeftMargin Cm 166461] + attr:[Indent LeftMargin Cm -83230] + attr:[Flags KeepPriorNL Int Set] + attr:[FontFace Italic Int Set]} + + + \chapter{LAYOUT} + + + \italic{Layout} and its companion \italic{layoutview} provide a way to lay out + a combination of ATK objects in a single rectangle with arbitrary positions + and sizes. Each object is given a fixed size and position. Overlapping + objects will generally work, altthough there are a few cases of advanced + graphic operations which are not properly handled. + + + This document describes the programmer's interface to layout. The user + interface is described in the help file. + + + + \subsection{Layout (data object)} + + + A layout is simply an ordered list of rectangular \bold{components}, which may + be empty or contain other data objects. + + + \paragraph{layout_CreateComponent} creates an empty component and returns a + pointer to it. + + + \paragraph{layout_RemoveComponent}(self, c) deletes a component. + + + \paragraph{layout_FillInComponent}(self, classname, c) fills in the contained + data object with a new instance of the named class. + + + \paragraph{cData(c)} points to the data object associated with c. + + + \paragraph{layout_SetComponentSize}(c, x, y, w, h) sets the \bold{size and + position} of a component. Any of the four parameters may be zero to indicate + that the corresponding edge of the component should coincide with the + corresponding edge of the entire layout. + + + \paragraph{cLeft}(c), \paragraph{cTop}(c), \paragraph{cRight}(c), + \paragraph{cBottom}(c), \paragraph{cWidth}(c), and \paragraph{cHeight}(c) give + the current size and position of the component. + + + \paragraph{vLeft}(self, c), \paragraph{vTop}(self, c), + \paragraph{vRight}(self, c), \paragraph{vBottom}(self, c), + \paragraph{vWidth}(self, c), and \paragraph{vHeight}(self, c) test for zero + values and use the dimensions of the view where needed. Note that these are + part of the view, not the data object. + + + \bold{Ordering} is important when two components overlap - the earlier + component in the list appears in front of the later. + + + \paragraph{layout_Promote}(c) moves a component in front of all other + components. + + + \paragraph{layout_Demote}(c) moves a component behind all other components + which do not completely obscure it. + + + \paragraph{layout_GetFirstComponent} is a pointer to the frontmost component. + To iterate through all components front to back, write: + + \example{ + struct component *c; + + forallcomponents(self, c) \{operate on c\}} + + + Components may be marked \bold{fixed or variable}: fixed objects are intended + to be like titling information, set by once and for all in authoring mode, + while variable objects are intended to be edited by the user. + + + \paragraph{layout_MakeVariable}(c) allows user input to an component. + + + \paragraph{layout_MakeFixed}(c) disallows input to a component except in + authoring mode. + + + \paragraph{cVaries(c)} is TRUE for variable components. + + + + \subsection{Layout data stream} + + + The layout data stream follows ATK standards, starting with a begindata and + ending with an enddata directive. In between comes a sequence of components, + ordered front to back. Each component starts with a line of the form: + + + + + + where the first four items are decimal numbers giving the geometry of the + component, and the fifth is either the character 'V' ('*' is also accepted) + for a variable component or 'F' for a fixed component. This line is followed + by the ATK representation for the component's dataobject. A null component is + represented by omitting the ",V' and the data. + + + + + \subsection{Layoutview} + + + The current \bold{operating mode}, returned by + \paragraph{layoutview_Hitmode}(), may be: + + + \leftindent{HIT_EXEC: layout is in user mode; authoring operations are + disabled. Input events are passed into the current selection. Set by calling + \italic{layoutview_SetRunMode}(). + + + HIT_AUTHORING: layout is in authoring mode but not doing anything special. + Set by calling \italic{layoutview_SetAuthoringMode}(). + + + HIT_INITIALIZING: layout is in authoring mode, but the current selection is + being given input events as in HIT_EXEC mode. Set by calling + \italic{layoutview_SetInitMode}(). + + + HIT_DRAGGING: layout is in authoring mode, a mouse button is down, and + something is being dragged. Set and reset by mouse hits in authoring mode. + + + HIT_CREATING: layout is in authoring mode, a mouse button is down, and a new + component is being created. Set and reset by mouse hits in authorign mode. + + } + The \bold{create mode} determines how a newly created components will be + filled in. + + + \paragraph{layoutview_SetCreateMode(self, mode)} sets the mode to one of three + possible values: + + + \leftindent{CREATE_NULL does not initialize new components + + CREATE_FILLER initializes them with filler objects + + CREATE_PASTE initializes them by doing an immediate paste. + + } + \paragraph{layoutview_Createmode} is the current create mode. + + + The \bold{pointing granularity} aids users in aligning components by + restricting the position and size of the rubber-band box used to create, move, + and resize components to a grid. + + + \paragraph{layoutview_SetGranularity}(self, granularity) sets the granularity + to an integer value (in pixel units). + + + \paragraph{layoutview_ApplyGranularity}(self, v) adjusts v to the nearest + multiple of the granularity. + + + The \bold{current selection} defines the component currently being worked on, + or is NULL if there is no current selection. Mouse hits on a component + generally select it. + + + \paragraph{layoutview_Selection}() is the current selection. + + + \paragraph{layoutview_SetSelection}(self, c) sets the current selection; c may + be NULL. Do not change the selection while it is being resized or dragged. + + + \paragraph{layoutview_SetSelectionSize}(self, rectangle) sets a new size and + position for the current selection, creating a new component if there is none. + This is the only way to create a component in layoutview. + + + \paragraph{layoutview_DestroyComponent}() destroys the current selection. + + + \paragraph{layoutview_Paste} pastes into the current component. + + + \paragraph{layoutview_SetChildByName}(self, char *dataname) inserts a new + dataobject from the named class into the current selection. + + + \paragraph{layoutview_SetChild}() prompts for a class name, then uses it to + insert a new dataobject. + + + \paragraph{layoutview_MakeVariable} makes the current selection variable. + + + \paragraph{layoutview_MakeFixed} makes it fixed. + + + \paragraph{layoutview_Promote} promotes the current selection to the front. + Layoutview always promotes components when they are moved or dragged, so that + the rubber-band outline of the moving component need never be obscured by + another component. + + + \paragraph{layoutview_Demote} demotes the current selection to the back. + + + \paragraph{layoutview_MakeBackground} demotes the current selection to be back + and expands it to fill the entire view. + + + As with any inset which contains other insets, it is necessary in the + layoutview object to maintain a mapping between the contained views and the + corresponding data object's component data objects. + + + \paragraph{layoutview_FindSubview}(self, c) is the child view corresponding to + c. + + + \paragraph{layoutview_RemoveSubview}(self, v) deletes the mapping entry for + child view v and returns a pointer to the corresponding component. + + + A macro is provided to iterate through the current subviews; use: + + + \example{struct viewlist *vl; + + forallsubviews(self, vl) + + \{operate on view \bold{vChild(vl)} for component \bold{vComponent(vl)}\}} + + + + \subsection{Special Considerations} + + + The update routine in layoutview uses clipping regions (not just rectangles) + to prevent behind components from overwriting in-front components. As the + update runs down the component list, which is ordered front to back, it + accumulates a residual clipping region by subtracting out already drawn + components. There is one case in which this fails: text sometimes moves its + window up or down with a blt operation, not noticing that the source of the + blt isn't all there. A redraw (control L) fixes this. + + + + + Author: John H Howard + + Last updated: + \ + \begindata{writestamp,268747652} + Datastream version: 1 + %o %A, %Y at %u:%M + andysans12 + 655592641 + \enddata{writestamp,268747652} + \view{writestampview,268747652,1,0,0} + + + + \enddata{text,268680648} *** atk/layout/filler.doc Tue Nov 20 14:27:18 1990 --- atk/layout/filler.doc.NEW Thu Oct 11 14:49:42 1990 *************** *** 0 **** --- 1,51 ---- + \begindata{text,268919080} + \textdsversion{12} + \template{default} + + + \chapter{FILLER} + + + The \italic{filler} object and its companion \italic{fillerview} provide a + simple user interface for selecting an object to go into a newly-created + inset. This file provides programmer documentation; the user interface is + described in the filler help file. + + + + \subsection{Filler} + + + \italic{Filler} does not extend its base class, \italic{cel}. Its only reason + for existence is to get fillerview started during initialization. + + + + + \subsection{Fillerview} + + + Fillerview provides a simple graphic interface which displays a list of + possible insets and allows the user to select one by clicking. It extends its + base class, celview, as follows: + + + \italic{fillerv_SetDataObjectByName}(self, dataname) fills in the inset with + the named data object. If the first three letters of the name are "Ask" it + prompts for a name. Although the filler remains present in the object + hierarchy, it is not visible in the view tree and functions only to provide + cel functions. + + + + Last updated: + \ + \begindata{writestamp,268684776} + Datastream version: 1 + %o %A, %Y at %u:%M + andysans12 + 655651149 + \enddata{writestamp,268684776} + \view{writestampview,268684776,4,0,0} + + \enddata{text,268919080} *** atk/layout/layout.help Tue Nov 20 14:27:35 1990 --- atk/layout/layout.help.NEW Wed Oct 3 13:20:56 1990 *************** *** 0 **** --- 1,242 ---- + \begindata{text,268907796} + \textdsversion{12} + \template{default} + + + \chapter{LAYOUT} + + + \italic{Layout} and its companion \italic{layoutview} provide a way to lay out + a combination of ATK objects in a single rectangle with arbitrary positions + and sizes. Each object is given a fixed size and position. Overlapping + objects will generally work, although there are a few cases of advanced + graphic operations which are not properly handled. + + + This document describes the user interface to layout. + + + + \subsection{User mode versus authoring mode} + + + Layouts are built in an \italic{authoring mode}, in which the actual layout is + being constructed or modified. In \italic{user mode} the layout is fixed and + the objects themselves are being filled in. + + + In user mode the layout does its best to get out of the way, passing all input + to the component objects. In authoring mode, input is interpreted by the + layout itself rather than the component objects. You switch between modes + using the menus: + + + \leftindent{\paragraph{Enter Authoring} (no default key sequence) switches to + authoring mode. + + + \paragraph{Exit Authoring} (default key sequence ESC-x) switches to user mode. + + } + + \subsection{Visual appearance} + + + In order to indicate when it is in authoring mode, layout uses a small "x" + cursor and draws a dotted line around each component object. One may be the a + \italic{current selection,} which is surrounded by a solid line rather than a + dotted line. In certain cases, the current selection can be \italic{active}, + in which case it receives input as it would in user mode. You can tell an + active selection because it highlights itself in some manner and (usually) + posts its own cursor. You can deactivate an active object with \italic{Enter + Authoring} or \italic{Leave Authoring} from the menus or by selecting a + different object. + + + + \subsection{Selecting objects} + + + Click either button once on an object to select it. Click somewhere else to + cancel the selection. + + + Once you have selected an object you can move, resize, and rearrange it (as + discussed later) or perform the following basic operations on it: + + + \leftindent{\paragraph{Paste object} (key sequence CTRL-y) replaces the + currently selected object with the contents of the cut buffer. + + + \paragraph{Imbed object} (key sequence ESC-tab) prompts for the name of a data + object which it then places inside the currently selected component. + + + \paragraph{Cut object} (key sequence CTRL-d) deletes the currently selected + object and places its contents in the cut buffer. + + } + + \subsection{Activating objects} + + + Double click on an object to select it, make it active and pass the mouse + click to it. (Because mouse and keyboard input is passed into the active + object, you must deactivate an object before you can drag or resize it.) + + + + \subsection{Creating new objects} + + + Move the mouse while holding the button down to create a new object. The + points at which you start and end define opposite corners of the rectangle for + the new object. Layout will display a "rubber-band" rectangle showing where + the new object will go. The newly created object will start out selected and + active so that you can fill it in. + + + How a newly-created is initialized depends on the most recent choice from the + following three menu options: + + + \leftindent{\paragraph{Filler on create} tells layout to use the "filler" + object for newly created objects. This is the default behavior. Fillers are + one convenient way to select insets. See the separate documentation for + filler. + + + \paragraph{Paste on create} tells layout to perform an automatic paste + operation whenever it creates a new object. This is especially useful in + conjunction with arbcon. + + + \paragraph{Null on create} tells layout not to fill anything into newly + created objects. If you select this you will have to use the paste or imbed + operations to fill in your objects. + + } + + \subsection{Moving and resizing objects} + + + To move an object, press a mouse button in the interior of the object and drag + to the new position. To resize, press close to an edge or corner and drag to + its new position. Layout will display a "rubber band" rectangle showing where + the object will move to. Moving and resizing select the object and place it + in front of all other objects in the layout. + + + You can choose a granularity of control over object placement. Finer + granularity allows you greater precision of placement but makes it harder to + line things up exactly. The possibilities (on the menu) are: + + + \leftindent{\paragraph{Fine granularity} gives the maximum control over + placement; you can move or resize objects to any pixel on the screen. A pixel + is approximately a typesetter's point, or 1/72 inch. + + + \paragraph{Medium granularity} gives placement to the nearest 1/12 inch (6 + pixels). + + + \paragraph{Coarse granularity} gives placement to the nearest 1/4 inch (18 + pixels). + + } + + \subsection{Deleting objects} + + + To delete an object, resize it so it has a small height or width, or select + \italic{Cut} from the authoring menu. This will automatically remove the + object and place its contents in the cut buffer. + + + + \subsection{Handling overlapping objects} + + + When two objects overlap, one appears in front of the other and partially or + totally obscures it on the display. Layouts try to handle this gracefully but + there are certain cases (printing, incremental scrolling) in which you may + obtain unexpected results from overlapping objects. You can move an object to + the front simply by resizing or dragging it. Other operations which affect + the overlapping order are: + + + \leftindent{\paragraph{Move to back} (key sequence ESC-d) moves the currently + selected object behind other objects in the layout. Layout will not move an + object behind another which would completely obscure it. You may need to use + this if you can't find an object because it is completely obscured by others. + + + \italic{Make background} (key sequence ESC-b) moves the currently selected + object to the back and expands it to fill the entire layout. Background + objects automatically resize themselves when the layout is resized. You can + stop this by dragging their edges away from the edges of the layout. You can + not, however, move a background object other than resizing it. + + } + + \subsection{Variable versus fixed objects} + + + Some components of a layout, such as titles, may be fixed for all time while + other components are intended to be edited or otherwise changed. Layout + supports a distinction between variable objects, which are allowed to receive + input, and fixed objects, which are not. + + + \leftindent{\paragraph{Make variable} (key sequence ESC-v) allows the + currently selected object to receive input (and thus edit itself) in user + mode. This is the standard case. + + + \paragraph{Make fixed} (key sequence ESC-f) allows the currently selected + object to receive input (and thus edit itself) only in Authoring mode. You + would use this for titles and other decorations of the layout which the end + user is not expected to change. + + } + + \subsection{Special Considerations} + + + The update routine in layoutview uses clipping regions (not just rectangles) + to prevent behind objects from overwriting in-front objects. As the update + runs down the component list, which is ordered front to back, it accumulates a + residual clipping region by subtracting out already drawn objects. There is + one case in which this fails: text sometimes moves its window up or down with + a blt operation, not noticing that the source of the blt isn't all there. A + redraw (control L) fixes this, of course. + + + Printing has certain problems. Scaling assumes that one pixel on the screen + corresponds to one point (1/72 inch); imbedded objects such as raster images + may have different rules. Overlapping objects are printed inconsistently - on + the screen the object in front writes both the black and the white contents of + its visual rectangle, regardless of any object behind it, but in the printed + output the front object simply overprints the back object. Generally you + should avoid printing overlapping objects. + + + + + Author: John H Howard + + Last updated: + \ + \begindata{writestamp,269063220} + Datastream version: 1 + %o %A, %Y at %u:%M + andysans12 + 648247035 + \enddata{writestamp,269063220} + \view{writestampview,269063220,0,0,0} + + + + \enddata{text,268907796} *** atk/layout/filler.help Tue Nov 20 14:27:49 1990 --- atk/layout/filler.help.NEW Wed Oct 3 13:20:57 1990 *************** *** 0 **** --- 1,51 ---- + \begindata{text,268715184} + \textdsversion{12} + \template{default} + + + \chapter{FILLER} + + + The \italic{filler} object and its companion \italic{fillerview} provide a + simple user interface for selecting an object to go into a newly-created + inset. \italic{Filler} is a refinement of \italic{cel}; this document covers + only the functions it adds. + + + + \section{User Interface} + + + + Filler presents a list of possible objects both in its area on the screen and + in a menu. In the former case, the user may click either mouse button on the + name of an object in order to select it, subject to the usual conventions for + making selections from a menu or list. To avoid selecting something, you may + move the pointer away from all possible selections. + + + The list of possible replacement objects is obtained from a preferences option + named "FillerInsets" and consists of a list of data object class names + separated by colons. The default at the time of writing is: + + + *.FillerInsets: + Ask...:box:text:raster:table:zip:fad:pshbttn:clock:timeoday:link + + + The "Ask..." selection is special: it prompts the user to type in the name of + an inset. + + + + Last updated: + \ + \begindata{writestamp,268721088} + Datastream version: 1 + %o %A, %Y at %u:%M + andysans12 + 649604015 + \enddata{writestamp,268721088} + \view{writestampview,268721088,1,0,0} + + \enddata{text,268715184} *** atk/lookz/lookzv.c Wed Apr 11 14:19:31 1990 --- atk/lookz/lookzv.c.NEW Tue Nov 20 13:23:11 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzv.c,v 2.16 90/03/05 16:54:33 gk5g Exp $ */ /* $ACIS:lookzv.c 1.4$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzv.c,v $ */ #ifndef lint ! char *lookzv_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzv.c,v 2.16 90/03/05 16:54:33 gk5g Exp $"; #endif /* lint */ /* lookzv.c --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzv.c,v 2.16 90/03/05 16:54:33 gk5g Exp Locker: ajp $ */ /* $ACIS:lookzv.c 1.4$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzv.c,v $ */ #ifndef lint ! char *lookzv_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzv.c,v 2.16 90/03/05 16:54:33 gk5g Exp Locker: ajp $"; #endif /* lint */ /* lookzv.c *** atk/lookz/lookzv.ch Wed Nov 22 12:15:38 1989 --- atk/lookz/lookzv.ch.NEW Tue Nov 20 13:23:13 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lookz/RCS/lookzv.ch,v 2.5 89/02/23 09:58:07 ghoti Exp $ */ /* $ACIS:lookzv.ch 1.3$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lookz/RCS/lookzv.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidlookzview_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lookz/RCS/lookzv.ch,v 2.5 89/02/23 09:58:07 ghoti Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzv.ch,v 2.5 89/02/23 09:58:07 ghoti Exp Locker: ajp $ */ /* $ACIS:lookzv.ch 1.3$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzv.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidlookzview_H = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzv.ch,v 2.5 89/02/23 09:58:07 ghoti Exp Locker: ajp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* *** atk/lookz/lookzvt.c Wed Nov 22 12:15:46 1989 --- atk/lookz/lookzvt.c.NEW Thu Sep 13 18:06:00 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lookz/RCS/lookzvt.c,v 1.1 89/04/04 19:52:36 wjh Exp $ */ /* $ACIS:testv.c 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lookz/RCS/lookzvt.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lookz/RCS/lookzvt.c,v 1.1 89/04/04 19:52:36 wjh Exp $"; #endif /* lint */ /* testv.c --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzvt.c,v 1.2 90/09/11 17:17:15 gk5g Exp $ */ /* $ACIS:testv.c 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzvt.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lookz/RCS/lookzvt.c,v 1.2 90/09/11 17:17:15 gk5g Exp $"; #endif /* lint */ /* testv.c *************** *** 171,178 **** lookzview_SetStyleSheet(dview, ss); ! im = im_Create(NULL); /* (argument can be hostname) */ ! frame = frame_New(); /* use a frame to get message line */ im_SetView(im, frame); frame_PostDefaultHandler( frame, "message", frame_WantHandler( frame, "message" ) ); --- 171,184 ---- lookzview_SetStyleSheet(dview, ss); ! if((im = im_Create(NULL)) == NULL) { /* (argument can be hostname) */ ! fprintf(stderr,"Could not create new window; exiting.\n"); ! exit(-1); ! } ! if((frame = frame_New()) == NULL) { /* use a frame to get message line */ ! fprintf(stderr,"Could not allocate enough memory; exiting.\n"); ! exit(-1); ! } im_SetView(im, frame); frame_PostDefaultHandler( frame, "message", frame_WantHandler( frame, "message" ) ); *** atk/lset/arbcon.c Mon Aug 6 11:07:02 1990 --- atk/lset/arbcon.c.NEW Thu Sep 13 18:06:11 1990 *************** *** 3,11 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/arbcon.c,v 2.34 90/06/11 21:42:04 gk5g Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/arbcon.c,v $ */ /* user code ends here for HeaderInfo */ #include #include --- 3,11 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/arbcon.c,v 2.35 90/09/11 18:33:59 gk5g Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/arbcon.c,v $ */ /* user code ends here for HeaderInfo */ #include #include *************** *** 353,359 **** if(newobject) dataobject_Destroy(ob); } } ! if ((newFrame = frame_New()) != NULL) if ((window = im_Create(NULL)) != NULL) { frame_SetCommandEnable(newFrame, TRUE); im_SetView(window, newFrame); --- 353,359 ---- if(newobject) dataobject_Destroy(ob); } } ! if ((newFrame = frame_New()) != NULL) { if ((window = im_Create(NULL)) != NULL) { frame_SetCommandEnable(newFrame, TRUE); im_SetView(window, newFrame); *************** *** 366,373 **** */ frame_SetBuffer(newFrame, buffer, TRUE); } ! else frame_Destroy(newFrame); } arbcon_Create(){ char foo[1024]; --- 366,379 ---- */ frame_SetBuffer(newFrame, buffer, TRUE); } ! else { ! fprintf(stderr,"Could not create new window.\n"); frame_Destroy(newFrame); + } + } + else { + fprintf(stderr,"Could not allocate enough memory.\n"); + } } arbcon_Create(){ char foo[1024]; *** atk/lset/celv.c Mon Aug 6 11:07:12 1990 --- atk/lset/celv.c.NEW Mon Sep 17 12:29:43 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/celv.c,v 2.24 90/05/08 15:59:14 gk5g Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/celv.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/celv.c,v 2.24 90/05/08 15:59:14 gk5g Exp $ "; #endif /* lint */ #define UNSET 0 --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/celv.c,v 2.24 90/05/08 15:59:14 gk5g Exp Locker: tpn $ */ /* $ACIS: $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/celv.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/celv.c,v 2.24 90/05/08 15:59:14 gk5g Exp Locker: tpn $ "; #endif /* lint */ #define UNSET 0 *** atk/lset/celv.ch Wed Nov 22 12:16:22 1989 --- atk/lset/celv.ch.NEW Mon Oct 29 10:54:56 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/celv.ch,v 2.9 89/07/03 16:34:00 tpn Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/celv.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid_celview_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/celv.ch,v 2.9 89/07/03 16:34:00 tpn Exp $ "; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #define celview_UnInitialized 0 --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/celv.ch,v 2.10 90/10/25 14:02:32 wjh Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/celv.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid_celview_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/celv.ch,v 2.10 90/10/25 14:02:32 wjh Exp $ "; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #define celview_UnInitialized 0 *************** *** 60,69 **** PushOverlay(struct view *view,struct rectangle *rect,long flags); PopOverlay(struct view *view) returns struct view *; macromethods: ! GetTrueChild() (self->truechild) ! GetApplication() (self->child) ! GetRemoteArb() (self->rarb) ! SetRemoteArb(Arb) self->rarb = Arb GetCel() (struct cel *) celview_GetDataObject(self) classprocedures: InitializeClass()returns boolean; --- 60,69 ---- PushOverlay(struct view *view,struct rectangle *rect,long flags); PopOverlay(struct view *view) returns struct view *; macromethods: ! GetTrueChild() ((self)->truechild) ! GetApplication() ((self)->child) ! GetRemoteArb() ((self)->rarb) ! SetRemoteArb(Arb) ((self)->rarb = (Arb)) GetCel() (struct cel *) celview_GetDataObject(self) classprocedures: InitializeClass()returns boolean; *** atk/lset/conpros.awk Wed Nov 22 12:16:37 1989 --- atk/lset/conpros.awk.NEW Mon Sep 24 12:53:27 1990 *************** *** 19,29 **** # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. # ! # $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/conpros.awk,v 2.9 89/10/09 17:03:18 tpn Exp $ # $ACIS: $ ! # $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/conpros.awk,v $ ! ! awk ' BEGIN{ vcount = 0 class= "! No Control Button Defined" --- 19,27 ---- # ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS # SOFTWARE. # ! # $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/conpros.awk,v 2.10 90/09/21 11:53:04 tpn Exp $ # $ACIS: $ ! # $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/conpros.awk,v $ BEGIN{ vcount = 0 class= "! No Control Button Defined" *************** *** 80,86 **** } if(NR == 1 && $1=="CLASSNAME=" && $3== "FUNCTIONAME=" && NF=4){ class = $2 ! function[$4] = $4 funcdefined++ classoverride = 1 } --- 78,84 ---- } if(NR == 1 && $1=="CLASSNAME=" && $3== "FUNCTIONAME=" && NF=4){ class = $2 ! funcs[$4] = $4 funcdefined++ classoverride = 1 } *************** *** 90,96 **** class = newclass if(class == newclass){ if(lastfunc != ""){ ! function[lastfunc] = lastfunc funcdefined++ lastfunc = "" } --- 88,94 ---- class = newclass if(class == newclass){ if(lastfunc != ""){ ! funcs[lastfunc] = lastfunc funcdefined++ lastfunc = "" } *************** *** 174,184 **** } print "}" ! for(i in function){ ! printf "%s_%s(v,dat)\nstruct view *v;\n long dat;\n{\n",class,function[i] printf "struct %s *self;\nif((self = FindSelf(v)) == NULL) return;\n",class ! printf "/* user code begins here for %s_%s */\n",class,function[i] ! printf "/* user code ends here for %s_%s */\n}\n",class,function[i] } printf "void %s__ObservedChanged(self,observed,status)\n",class printf "struct %s *self;\nstruct observable * observed;\nlong status;\n{\n",class --- 172,182 ---- } print "}" ! for(i in funcs){ ! printf "%s_%s(v,dat)\nstruct view *v;\n long dat;\n{\n",class,funcs[i] printf "struct %s *self;\nif((self = FindSelf(v)) == NULL) return;\n",class ! printf "/* user code begins here for %s_%s */\n",class,funcs[i] ! printf "/* user code ends here for %s_%s */\n}\n",class,funcs[i] } printf "void %s__ObservedChanged(self,observed,status)\n",class printf "struct %s *self;\nstruct observable * observed;\nlong status;\n{\n",class *************** *** 199,206 **** printf "boolean %s__InitializeClass(ClassID)\nstruct classheader *ClassID;\n{\n",class printf "struct classinfo *viewtype = class_Load(\"view\");\n" printf "first%s = NULL;\n",class ! for(i in function){ ! printf "proctable_DefineProc(\"%s-%s\",%s_%s, viewtype,NULL,\"%s %s\");\n", class,function[i],class,function[i],class,function[i] } printf "/* user code begins here for %s */\n","InitializeClass" printf "/* user code ends here for %s */\n","InitializeClass" --- 197,204 ---- printf "boolean %s__InitializeClass(ClassID)\nstruct classheader *ClassID;\n{\n",class printf "struct classinfo *viewtype = class_Load(\"view\");\n" printf "first%s = NULL;\n",class ! for(i in funcs){ ! printf "proctable_DefineProc(\"%s-%s\",%s_%s, viewtype,NULL,\"%s %s\");\n", class,funcs[i],class,funcs[i],class,funcs[i] } printf "/* user code begins here for %s */\n","InitializeClass" printf "/* user code ends here for %s */\n","InitializeClass" *************** *** 228,231 **** printf "/* user code ends here for %s */\n","Other Functions" printf "! THIS IS THE END OF THIS FILE !!!\n" } ! }' $1 --- 226,230 ---- printf "/* user code ends here for %s */\n","Other Functions" printf "! THIS IS THE END OF THIS FILE !!!\n" } ! } ! *** atk/lset/mkcon.c Wed Nov 22 12:16:29 1989 --- atk/lset/mkcon.c.NEW Mon Sep 24 12:53:29 1990 *************** *** 4,15 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/mkcon.c,v 2.15 89/11/06 17:24:27 tpn Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/mkcon.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/mkcon.c,v 2.15 89/11/06 17:24:27 tpn Exp $ "; #endif /* lint */ #include --- 4,15 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/mkcon.c,v 2.16 90/09/21 11:47:54 tpn Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/mkcon.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/mkcon.c,v 2.16 90/09/21 11:47:54 tpn Exp $ "; #endif /* lint */ #include *************** *** 19,25 **** #include extern char *AndrewDir(); ! #define AWKPROG AndrewDir("/lib/arbiters/conpros.awk") #define MAKEFILE AndrewDir("/lib/arbiters/makefile.arb") #define START "* user code begins here for " #define END "* user code ends here for " --- 19,25 ---- #include extern char *AndrewDir(); ! #define AWKPROG AndrewDir("/lib/arbiters/conpros.awk") #define MAKEFILE AndrewDir("/lib/arbiters/makefile.arb") #define START "* user code begins here for " #define END "* user code ends here for " *************** *** 270,282 **** register char *c; register int cc; char bb[256],cmd[5200],tmpfile[256]; ! char *awkprog,*src,*program; char *cls,*func,*title,*sname; int success = TRUE; FILE *f; strcpy(makefile,MAKEFILE); class_Init(AndrewDir("/dlib/atk")); ! awkprog = AWKPROG; src = cls = title = sname = NULL; func = "go"; *tmpfile = '\0'; --- 270,283 ---- register char *c; register int cc; char bb[256],cmd[5200],tmpfile[256]; ! char *awkprog,*src,*program,defaultawk[256]; char *cls,*func,*title,*sname; int success = TRUE; FILE *f; strcpy(makefile,MAKEFILE); class_Init(AndrewDir("/dlib/atk")); ! sprintf(defaultawk,"awk -f %s",AWKPROG); ! awkprog = defaultawk; src = cls = title = sname = NULL; func = "go"; *tmpfile = '\0'; *** atk/lset/page.ch Wed Nov 22 12:17:05 1989 --- atk/lset/page.ch.NEW Mon Oct 29 10:54:57 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/page.ch,v 1.2 89/08/05 15:29:25 tpn Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/page.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid_page_ch = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/page.ch,v 1.2 89/08/05 15:29:25 tpn Exp $ "; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* The following may be use in place of a specific position --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/page.ch,v 1.3 90/10/25 13:17:59 wjh Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/page.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid_page_ch = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/page.ch,v 1.3 90/10/25 13:17:59 wjh Exp $ "; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* The following may be use in place of a specific position *************** *** 37,44 **** macromethods: GetPostMenus() ((self)->PostMenusFlag) SetPostMenus(foo) (((self)->PostMenusFlag) = foo) ! GetFirstObject() ((((self)->FirstSwitchee) == NULL) ? NULL: (self)->FirstSwitchee->dataobject) ! GetNowPlaying() ((((self)->NowPlaying) == NULL) ? NULL: (self)->NowPlaying->dataobject) /* The following macro methods are private */ GetFirstSwitchee() ((self)->FirstSwitchee) --- 37,44 ---- macromethods: GetPostMenus() ((self)->PostMenusFlag) SetPostMenus(foo) (((self)->PostMenusFlag) = foo) ! GetFirstObject() ((((self)->FirstSwitchee) == NULL) ? NULL: (self)->FirstSwitchee->d) ! GetNowPlaying() ((((self)->NowPlaying) == NULL) ? NULL: (self)->NowPlaying->d) /* The following macro methods are private */ GetFirstSwitchee() ((self)->FirstSwitchee) *** atk/lset/runadewa.c Wed Nov 22 12:17:41 1989 --- atk/lset/runadewa.c.NEW Mon Sep 24 12:53:30 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/runadewa.c,v 1.1 89/10/03 14:09:54 tpn Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/runadewa.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/lset/RCS/runadewa.c,v 1.1 89/10/03 14:09:54 tpn Exp $"; #endif /* lint */ #include /* sys/types.h sys/file.h */ --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/runadewa.c,v 1.3 90/09/21 12:13:25 tpn Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/runadewa.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/lset/RCS/runadewa.c,v 1.3 90/09/21 12:13:25 tpn Exp $"; #endif /* lint */ #include /* sys/types.h sys/file.h */ *************** *** 153,160 **** self->buffer = buffer_GetBufferOnFile(fileEntry->filename, fileEntry->readOnly ? buffer_ReadOnly : 0); if (self->buffer != NULL && fileEntry->newWindow) { ! self->frame = frame_New(); ! self->im = im_Create(NULL); im_SetView(self->im, self->frame); frame_PostDefaultHandler(self->frame, "message", frame_WantHandler(self->frame, "message")); frame_SetBuffer(self->frame, self->buffer, TRUE); --- 153,166 ---- self->buffer = buffer_GetBufferOnFile(fileEntry->filename, fileEntry->readOnly ? buffer_ReadOnly : 0); if (self->buffer != NULL && fileEntry->newWindow) { ! if((self->frame = frame_New()) == NULL) { ! fprintf(stderr,"adew: Could not allocate enough memory; exiting.\n"); ! exit(-1); ! } ! if((self->im = im_Create(NULL)) == NULL) { ! fprintf(stderr,"adew: Could not create new window; exiting.\n"); ! exit(-1); ! } im_SetView(self->im, self->frame); frame_PostDefaultHandler(self->frame, "message", frame_WantHandler(self->frame, "message")); frame_SetBuffer(self->frame, self->buffer, TRUE); *************** *** 162,167 **** --- 168,174 ---- frame_SetCommandEnable(self->frame, FALSE); if(self->title) frame_SetTitle(self->frame,self->title); + im_ForceUpdate(); if(self->cls){ strcpy(iname,self->cls); if(class_Load(iname) != NULL){ *** atk/lset/wincelv.c Wed Nov 22 12:16:46 1989 --- atk/lset/wincelv.c.NEW Thu Sep 13 18:06:15 1990 *************** *** 33,40 **** abv = arbiterview_FindArb(self); if(pc && abv != NULL){ if(self->celview == NULL){ ! self->celview = celview_New(); ! if(self->celview == NULL)return; celview_AddObserver(self->celview,self); celview_SetDataObject(self->celview,pc); celview_SetRemoteArb(self->celview,abv); --- 33,42 ---- abv = arbiterview_FindArb(self); if(pc && abv != NULL){ if(self->celview == NULL){ ! if((self->celview = celview_New()) == NULL) { ! fprintf(stderr,"Could not allocate enough memory.\n"); ! return; ! } celview_AddObserver(self->celview,self); celview_SetDataObject(self->celview,pc); celview_SetRemoteArb(self->celview,abv); *** atk/ness/tokens/Imakefile Wed Nov 22 12:18:28 1989 --- atk/ness/tokens/Imakefile.NEW Mon Oct 29 10:55:10 1990 *************** *** 5,11 **** DOBJS = lex.do sym.do toksym.do lexdef.do IHFILES = lex.ih sym.ih toksym.ih lexdef.ih ! OBJS = lex.o sym.o toksym.o lexdef.o DOCS = lex.doc sym.doc NormalObjectRule() --- 5,11 ---- DOBJS = lex.do sym.do toksym.do lexdef.do IHFILES = lex.ih sym.ih toksym.ih lexdef.ih ! OBJS = lex.o sym.o toksym.o lexdef.o qsearch.o DOCS = lex.doc sym.doc NormalObjectRule() *************** *** 23,28 **** --- 23,29 ---- ${MALLOCLIB} ProgramTarget(buildy, buildy.o, ${MALLOCLIB}, -lm) + ProgramTarget(reyacc, reyacc.o qsearch.o, ${MALLOCLIB}, -lm) ProgramTarget(lextest, lextest.o, ${LIBS}, -lm) test:: lextest *************** *** 29,36 **** --- 30,40 ---- lextest test.in | diff - test.owt InstallProgram(buildy, ${DESTDIR}/bin/) + InstallProgram(reyacc, ${DESTDIR}/bin/) InstallDocs($(DOCS), $(DESTDIR)/doc/atk/) + + CleanTarget(buildy reyacc) DependTarget() *** atk/ness/tokens/buildy.c Wed Nov 22 12:18:38 1989 --- atk/ness/tokens/buildy.c.NEW Tue Oct 30 12:13:46 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/tokens/RCS/buildy.c,v 1.5 89/09/29 18:13:55 ajp Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/tokens/RCS/buildy.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/tokens/RCS/buildy.c,v 1.5 89/09/29 18:13:55 ajp Exp $"; #endif /* --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/buildy.c,v 1.7 90/10/30 11:55:38 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/buildy.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/buildy.c,v 1.7 90/10/30 11:55:38 wjh Exp $"; #endif /* *************** *** 16,22 **** WJHansen, 21 November, 1987 The program processes a xxx.gra file to generate xxx.y. ! Its only effect is to append lexdesc(), which returns a pointer to a static area with descriptions of the lexemes. Process %token lines to extract token names. --- 16,22 ---- WJHansen, 21 November, 1987 The program processes a xxx.gra file to generate xxx.y. ! Its principal effect is to append lexdesc(), which returns a pointer to a static area with descriptions of the lexemes. Process %token lines to extract token names. *************** *** 38,43 **** --- 38,44 ---- The generated lexdesc() has this form: + /*ZZSTARTLEXDESC... static char *reswords[] = { , NULL *************** *** 94,99 **** --- 95,101 ---- unsigned char *tx, *lx, *startx; struct thong *t; + fprintf(outfile, "/*ZZSTARTLEXDESC*/\n"); /* static char *reswords[] = { , *************** *** 180,191 **** fprintf(outfile, "}\n"); } SkipComment(inf, outf) FILE *inf, *outf; { ! register c; boolean SawStar = FALSE; while (getput(inf,outf) != EOF) if (c == '/' && SawStar) --- 182,223 ---- fprintf(outfile, "}\n"); } + static enum parsestate { + Start, + SawPercent, + InType, + InTokens, + Copying, + } State; + static char typebuf[100] = "", *tbx; + static enum parsestate + CheckForLastPercent(inf, outf) + FILE *inf, *outf; + { + register c; /* set by getput() */ + c = getc(inf); + if (c == '%') { + /* bracket %% with markers to locate code to be ripped out + by reyacc + note that initial % is already in outf */ + *tbx = '\0'; /* terminate the most recently saved type name */ + if (*typebuf) + fprintf(outf, "token <%s> ZZLASTTOKEN\n%%%%\n",typebuf); + else + fprintf(outf, "token ZZLASTTOKEN\n%%%%\n"); + return Copying; + } + else { + ungetc(c, inf); + return SawPercent; + } + } SkipComment(inf, outf) FILE *inf, *outf; { ! register c; /* set by getput() */ boolean SawStar = FALSE; while (getput(inf,outf) != EOF) if (c == '/' && SawStar) *************** *** 202,215 **** unsigned char buf[200]; unsigned char *bx, *dot; - enum parsestate { - Start, - SawPercent, - InType, - InTokens, - Copying, - } State; - dot = (unsigned char *)rindex(argv[1], '.'); if (dot) sprintf(filestem, "%.*s", dot-argv[1], argv[1]); --- 234,239 ---- *************** *** 245,254 **** if (getput(inf,outf) == '*') SkipComment(inf, outf); else if (c == '%') ! State = SawPercent; } else if (c == '%') ! State = SawPercent; break; case SawPercent: --- 269,278 ---- if (getput(inf,outf) == '*') SkipComment(inf, outf); else if (c == '%') ! State = CheckForLastPercent(inf, outf); } else if (c == '%') ! State = CheckForLastPercent(inf, outf); break; case SawPercent: *************** *** 304,315 **** if (getput(inf,outf) == '*') SkipComment(inf, outf); else if (c == '%') ! State = SawPercent; } else if (c == '%') ! State = SawPercent; else if (c == '>') State = InTokens; break; case InTokens: if (c == '/') { --- 328,340 ---- if (getput(inf,outf) == '*') SkipComment(inf, outf); else if (c == '%') ! State = CheckForLastPercent(inf, outf); } else if (c == '%') ! State = CheckForLastPercent(inf, outf); else if (c == '>') State = InTokens; + else *tbx++ = c; /* save type name */ break; case InTokens: if (c == '/') { *************** *** 316,327 **** if (getput(inf,outf) == '*') SkipComment(inf, outf); else if (c == '%') ! State = SawPercent; } else if (c == '%') ! State = SawPercent; ! else if (c == '<') State = InType; else if (isascii(c) && isalpha(c)) { do { *tx++ = c; --- 341,354 ---- if (getput(inf,outf) == '*') SkipComment(inf, outf); else if (c == '%') ! State = CheckForLastPercent(inf, outf); } else if (c == '%') ! State = CheckForLastPercent(inf, outf); ! else if (c == '<') { State = InType; + tbx = typebuf; /* start saving type name */ + } else if (isascii(c) && isalpha(c)) { do { *tx++ = c; *** atk/ness/tokens/lex.ch Wed Nov 22 12:18:32 1989 --- atk/ness/tokens/lex.ch.NEW Mon Oct 8 14:32:42 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/tokens/RCS/lex.ch,v 1.8 89/09/10 17:36:51 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/tokens/RCS/lex.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *lex_H_rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/tokens/RCS/lex.ch,v 1.8 89/09/10 17:36:51 wjh Exp $"; #endif /* --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/lex.ch,v 1.8 89/09/10 17:36:51 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/lex.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *lex_H_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/lex.ch,v 1.8 89/09/10 17:36:51 wjh Exp $"; #endif /* *** atk/ness/tokens/reyacc.c Tue Nov 20 14:31:11 1990 --- atk/ness/tokens/reyacc.c.NEW Tue Oct 30 12:13:47 1990 *************** *** 0 **** --- 1,158 ---- + /* ********************************************************************** *\ + * Copyright IBM Corporation 1988,1989 - All Rights Reserved * + * For full copyright information see:'andrew/config/COPYRITE' * + \* ********************************************************************** */ + /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/reyacc.c,v 1.2 90/10/30 11:55:17 wjh Exp $ */ + /* $ACIS:$ */ + /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/reyacc.c,v $ */ + + #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) + static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/reyacc.c,v 1.2 90/10/30 11:55:17 wjh Exp $"; + #endif + /* + reyacc.c + + Usage: + reyacc filename.c yaccpar [oldyaccpar] + + Massage 'filename.c' (which is yacc output) removing /usr/lib/yaccpar + (or the yaccpar given as third argument) and installing 'yaccpar' + in its place. It is assumed that 'yaccpar' contains + the string "$@" at the point where the semantics case statement goes. + + Also delete the stuff generated between the lines containing + #define ZZLASTTOKEN nnn + (for integer nnn) and + /*ZZSTARTLEX...\n + + Output replaces the input file. The input file is renamed to + filename.c.sysyacc + + */ + + #include + #include + #include + + #include /* for boolean */ + + char *qsearch(); + + Die(msg) + char *msg; + { + printf("%s\n", msg); + exit(9); + } + + /* Massage(s, old, new, f) + write to f a revised version of s: + delete text #define ZZ ... DESC + replace yaccpar before and after semantics rules + */ + void + Massage(s, old, new, f) + char *s, *old, *new; + FILE *f; + { + long oldlen = strlen(old), + newlen = strlen(new); + char *sx, *send, *newtail, *oldtail; + long k; + static char *zzlast = "ZZLASTTOKEN"; + static char *zzlex = "/*ZZSTARTLEXDESC*/\n"; + + send = s + strlen(s); + + /* output everything before #define ZZLASTTOKEN + and reset s and slen for the part after ZZSTARTLEXDESC */ + sx = qsearch(s, send-s, zzlast, strlen(zzlast)); + if (sx != NULL) { + while (*(sx-1) != '\n') sx--; /* ensure start of line */ + /* output up to sx and reset s to start after zzlex */ + fwrite(s, 1, sx - s, f); + sx = qsearch(sx, send-sx, zzlex, strlen(zzlex)); + if (sx == NULL) + Die("input file missing ZZSTARTLEXDESC"); + while (*sx++ != '\n') {}; /* get to start of next line */ + s = sx; + } + + /* find the prefix of old in s */ + sx = qsearch(s, send-s, old, 1600); /* first find 1600 bytes */ + if (sx == NULL) + Die("file does not contain old yacc"); + fwrite(s, 1, sx-s, f); /* write s up to old */ + s = sx; + k = qmatch(s, send-s, old, oldlen); /* match prefix of old */ + s = sx + k; /* and skip the prefix in s */ + + /* write new in place of old and set newtail to the tail end */ + newtail = qsearch(new, newlen, "$@", 2); + if (newtail == NULL) + Die("new yacc does not contain $@"); + fwrite(new, 1, newtail-new, f); + newtail += 2; + + /* set oldtail to the beginning in old of the final match + to the tail end of s */ + for (oldtail = old + oldlen - 1, sx = send - 1; + *oldtail == *sx; + oldtail--, sx--) + {} + oldtail++; + send = sx + 1; /* remove oldtail from s */ + + /* write the semantics rules and the tail piece of new */ + fwrite(s, 1, send-s, f); + fwrite(newtail, 1, newlen - (newtail-new), f); + } + + char * + grabfile(fnm) + char *fnm; + { + char *v; + struct stat sbuf; + FILE *f = fopen(fnm, "r"); + if (f == NULL || fstat (fileno(f), &sbuf) < 0) { + printf("failed to find %s\n", fnm); + exit (9); + } + v = malloc(sbuf.st_size + 1); + fread(v, 1, sbuf.st_size, f); + fclose(f); + return v; + } + + main(argc, argv) + char **argv; + { + char *fnm = argv[1]; + char *ynm = argv[2]; + char buf[2000]; + FILE *f; + char *instring, *newyacc, *sysyacc; + + if (argc < 3 || argc > 4) { + printf("Usage: %s filename.c newyaccpar [oldyaccpar]\n", + argv[0]); + exit(9); + } + + instring = grabfile(fnm); + newyacc = grabfile(ynm); + sysyacc = grabfile((argc==3) ? "/usr/lib/yaccpar" : argv[3]); + + sprintf(buf, "%s.newyacc", fnm); + f = fopen(buf, "w"); + Massage(instring, sysyacc, newyacc, f); + fclose(f); + + /* rename fnm to fnm.sysyacc and fnm.newyacc to fnm */ + sprintf(buf, "%s.sysyacc", fnm); + rename(fnm, buf); + sprintf(buf, "%s.newyacc", fnm); + rename(buf, fnm); + printf("File %s revised to use yacc %s\n", fnm, ynm); + } *** atk/ness/tokens/qsearch.c Tue Nov 20 14:31:23 1990 --- atk/ness/tokens/qsearch.c.NEW Mon Oct 29 10:55:15 1990 *************** *** 0 **** --- 1,145 ---- + /* ********************************************************************** *\ + * Copyright IBM Corporation 1988,1989 - All Rights Reserved * + \* ********************************************************************** */ + /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/qsearch.c,v 1.1 90/10/12 20:54:33 wjh Exp $ */ + /* $ACIS:$ */ + /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/qsearch.c,v $ */ + + #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) + static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/qsearch.c,v 1.1 90/10/12 20:54:33 wjh Exp $"; + #endif + + /* + qsearch.c - a reasonably fast search algorithm + (as suggested by article in CACM) + + qsearch(char *srcloc, long srclen, char *patloc, long patlen) + returns char *; + returns the location of the found string + or NULL if not found + its length will be patlen + + qmatch(char *srcloc, long srclen, char *patloc, long patlen) + returns long; + returns a length indicating how much of pat is matched + starting at beginning of src + + NB. If you just want to know if pat is a prefix of + src, use bcmp. + + */ + /* + * $Log: qsearch.c,v $ + * Revision 1.1 90/10/12 20:54:33 wjh + * Initial revision + * + * Creation 0.0 90/10/5 12:35:00 wjh + * Initial creation by WJHansen + * + */ + + #include /* for NULL */ + #include /* isspace() */ + #include /* bcmp() */ + + /* qsearch(srcloc, srclen, patloc, patlen) returns char *; + returns the location of the found string + or NULL if not found + its length will be patlen + */ + char * + qsearch(srcloc, srclen, patloc, patlen) + char *srcloc, *patloc; + long srclen, patlen; + { + long delta[256]; + register char *cx, *curend; + register char target; + register long i; + + /* for each character of pattern, compute a delta value + such that is the pattern is aligned at cx + it should next align at + cx+delta[*(cx+patlen)] + If there are multiple instances of a character, + use the rightmost because it advances cx the least + */ + for (i = 0; i < 256; i++) + delta[i] = patlen+1; /* delta for chars not in pat */ + curend = patloc + patlen; + for (cx = patloc; cx < curend; cx++) + delta[*cx] = curend - cx; + + /* compute target character: first non-white in pat + XXX ideally target would be that character in pat + least likely to be found in the src */ + curend = patloc + patlen; + target = *(curend-1); /* use last char of pat if none other */ + i = patlen - 1; + for (cx = patloc; cx < curend; cx++) + if ( ! isspace(*cx)) { + target = *cx; + i = cx - patloc; + break; + } + + cx = srcloc; + curend = srcloc + srclen - patlen + 1; + while (cx < curend) { + if (*(cx+i) == target && bcmp(cx, patloc, patlen) == 0) + return cx; + cx += delta[*(cx+patlen)]; + } + return NULL; + } + + /* qmatch(srcloc, srclen, patloc, patlen) returns long; + returns a length indicating how much of pat is matched + starting at beginning of src + + NB. If you just want to know if pat is a prefix of + src, use bcmp. + */ + long + qmatch(srcloc, srclen, patloc, patlen) + char *srcloc, *patloc; + long srclen, patlen; + { + register long *lsx, *lpx, *lsend; + register char *sx = srcloc, *px = patloc, *send; + long len = (srclen > patlen) ? patlen : srclen; + long oddcnt; + send = srcloc + len; + + if (len < 30 || (((long)srcloc) & 3) != (((long)patloc) & 3) + /* now check hardware characteristics: */ + || sizeof(char) * 4 != sizeof(long) + || sizeof(char *) != 4) { + for ( ; sx < send && *sx == *px; sx++, px++) + {} + return sx - srcloc; + } + + /* len >= 30 and both aligned the same: do by long words */ + /* align to long boundary */ + oddcnt = (4 - ((long)srcloc)) & 3; + while (oddcnt > 0) { + if (*sx != *px) return sx - srcloc; + sx++, px++, oddcnt --; + } + + /* check a sequence of long words */ + lsx = (long *)sx; + lpx = (long *)px; + lsend = (long *)((long)send & ~3); + for ( ; lsx < lsend && *lsx == *lpx; lsx++, lpx++) + {} + + sx = (char *)lsx; + px = (char *)lpx; + /* check last word (whether or not lsx == lsend) + assertion: this loop will execute no more than thrice */ + for ( ; sx < send && *sx == *px; sx++, px++) + {} + return sx - srcloc; + } *** atk/ness/tokens/yaccpar Tue Nov 20 14:31:34 1990 --- atk/ness/tokens/yaccpar.NEW Mon Oct 29 10:55:17 1990 *************** *** 0 **** --- 1,239 ---- + + # line 3 "yaccpar" + /* ********************************************************************** *\ + * Copyright IBM Corporation 1990 - All Rights Reserved * + * For full copyright information see:'andrew/config/COPYRITE' * + \* ********************************************************************** */ + /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/yaccpar,v 1.1 90/10/12 20:54:48 wjh Exp $ */ + /* $ACIS:$ */ + /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/yaccpar,v $ */ + + #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) + char *yaccpar_rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/yaccpar,v 1.1 90/10/12 20:54:48 wjh Exp $"; + #endif + + /* + + Ness version of yaccpar + + Parser utilizing the tables generated by yacc + + adapted by revision from code with this notice: + * 5799-WZQ (C) COPYRIGHT = NONE + * LICENSED MATERIALS - PROPERTY OF IBM + * + * Source: /ibm/acis/usr/src/usr.bin/yacc/RCS/yaccpar,v + + however, the original code is a lot like the yaccpar on most systems, + so it is more likely owned by AT&T, if anybody + + For that matter, this version is substantially revised from any other, + including the addition of an exception table index, the elimination of goto's, + and the fact that no variables are global. + */ + + /* semantics routines can reset parser state with these macros */ + # define YYERROR goto yyerrlab + # define YYACCEPT return(0) + # define YYABORT return(1) + # define yyclearin yychar = -1 /* force read next token */ + # define yyerrok yyerrflag = 0 /* force finish error scan mode */ + + /* constants used in the syntax tables to flag errors */ + # define YYERRCODE 256 + # define YYFLAG -1000 + + # ifndef YYMAXDEPTH + # define YYMAXDEPTH 200 + # endif + + # ifdef YYDEBUG + int yydebug = 0; /* 1 for debugging */ + # endif + + yyparse() + { + YYSTYPE yylval; /* side return from yylex + (with lex.h, yylex() is redefined to pass &yylval to lex.c) */ + short yys[YYMAXDEPTH]; /* state stack */ + YYSTYPE yyv[YYMAXDEPTH]; /* store value for each stacked state */ + + int yychar = -1; /* current input token number */ + int yynerrs = 0; /* number of errors */ + short yyerrflag = 0; /* error recovery: assume recovered when this is + decremented back to zero once for each successfully accepted token */ + + register YYSTYPE *yypvt; /* pt to value stack for semantics routines */ + register short yystate; /* current state */ + YYSTYPE yyval; /* current token value */ + register short *yyps; /* pt to state stack */ + register short yyn; /* temporary */ + register YYSTYPE *yypv; /* pt to value stack */ + register short *yyxi; /* temporary */ + short yyj, yym; /* temporaries */ + static short **yyxx = NULL; /* exception table index */ + + yystate = 0; /* bottom state */ + /* yyval = not initialized */ + yynerrs = 0; + yyps= yys-1; /* &yys[-1] */ + yypv= yyv-1; /* &yyv[-1] */ + + if (yyxx == NULL) { + /* build exception table index */ + yyn = 0; /* find maximum state number */ + for ( yyxi = yyexca; yyxi < yyexca + sizeof(yyexca)/sizeof(short); + yyxi+=2 ) + if ( *yyxi == -1 && yyxi[1] > yyn ) + yyn = yyxi[1]; + yyxx = (short **)malloc((yyn+1)*sizeof(short *)); /* allocate table */ + for ( yyxi = yyexca; yyxi < yyexca + sizeof(yyexca)/sizeof(short); + yyxi+=2 ) + if ( *yyxi == -1 ) + yyxx[yyxi[1]] = yyxi+2; /* point to 1st entry */ + } + + while (1) { + + /* in each cycle around this main loop we push a state, and then + generate the next state by shift, reduce, or error processing */ + + /* put a state and value onto the stack */ + + /* ( the following statement had an error: > instead of >= + this would have allowed use of the illegal element + yys[YYMAXDEPTH] ) */ + if( ++yyps >= &yys[YYMAXDEPTH] ) { + yyerror( "yacc stack overflow" ); + return(1); + } + *yyps = yystate; + *++yypv = yyval; + + /* process the new state */ + yyn = yypact[yystate]; + + if( yyn > YYFLAG ) { + /* check for shift */ + + /* read next token */ + if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0; + yyn += yychar; + if( yyn >= 0 && yyn < YYLAST + && yychk[ yyn = yyact[ yyn ] ] == yychar ) { + /* valid shift */ + + # ifdef YYDEBUG + if( yydebug ) printf( " char 0%o causes shift to state %d\n", + yychar, yyn ); + # endif + + yychar = -1; /* absorb current token */ + yyval = yylval; + yystate = yyn; + if( yyerrflag > 0 ) --yyerrflag; + continue; /* go stack the new state */ + } + } + + /* not a shift operation: take default state action */ + yyn = yydef[yystate]; + if( yyn == -2 ) { + /* be sure we have a token to look at */ + if( yychar<0 ) if( (yychar=yylex())<0 ) yychar = 0; + + /* look through exception table */ + for ( yyxi = yyxx[yystate]; *yyxi >= 0; yyxi += 2 ) + if( *yyxi == yychar ) break; + yyn = yyxi[1]; + if( yyn < 0 ) return(0); /* accept */ + } + + if( yyn == 0 ) { + /* error ... attempt to resume parsing */ + + switch( yyerrflag ) { + + case 0: /* brand new error */ + + yyerror( "syntax error" ); + yyerrlab: + ++yynerrs; + /* DROP THROUGH */ + + case 1: + case 2: /* incompletely recovered error ... try again */ + + yyerrflag = 3; /* must accept 3 tokens + before restarting scan */ + + /* find a state where "error" is a legal shift action */ + + while ( TRUE ) { + if ( yyps < yys ) /* reached stack bottom */ + return (1); /* abort */ + yyn = yypact[*yyps] + YYERRCODE; + if( yyn >= 0 && yyn < YYLAST + && yychk[yyact[yyn]] == YYERRCODE ) + break; /* found a state where "error" is valid */ + # ifdef YYDEBUG + if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", + *yyps, yyps[-1] ); + # endif + + --yyps; /* pop stack */ + --yypv; + } + yystate = yyact[yyn]; /* simulate a shift of "error" */ + continue; /* go stack the error state */ + + case 3: /* no shift yet; clobber input char */ + + # ifdef YYDEBUG + if( yydebug ) printf( "error recovery discards char %d\n", yychar ); + # endif + + if( yychar == 0 ) + return(1); /* don't discard EOF, abort */ + yychar = -1; + /* try again in the same state */ + yystate = *yyps--; + yyval = *yypv--; + continue; /* go push the state we just popped */ + } /* end switch ( yyerrflag ) */ + } /* end if ( yyn == 0 ) */ + + /* reduction by production yyn */ + + yym = yyn; /* save yyn for the case operand below */ + + /* pop off the states and values for righthand side of rule */ + yyj = yyr2[yyn]; + yyps -= yyj; + yypvt = yypv; /* for semantics: point to values for right-hand-side */ + yypv -= yyj; + yyval = yypv[1]; /* default value is first non-terminal on the right */ + + /* consult goto table to find next state */ + yyn = yyr1[yyn]; + yyj = yypgo[yyn] + *yyps + 1; + if( yyj >= YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) + yystate = yyact[yypgo[yyn]]; + /* yystate is set here. yyval will be set in semantics routines */ + + # ifdef YYDEBUG + if( yydebug ) printf("reduce by production %d new state is %d\n",yym, yystate); + # endif + + switch ( yym ) { + + /* semantics rules follow */ + $@ + # line 226 "yaccpar" + /* semantics rules precede */ + + } /* end of switch( yym ) */ + + } /* end while(1) main loop */ + + } /* end of Ness version of yaccpar */ *** atk/ness/objects/Imakefile Mon Aug 6 11:07:21 1990 --- atk/ness/objects/Imakefile.NEW Mon Nov 26 15:11:53 1990 *************** *** 3,11 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ YFLAGS = -d -v - CYFLAGS = -DYYDEBUG ! LOCALINCLUDES = -I../tokens/ INTERPOBJS = interp.o gen.o dump.o search.o error.o nevent.o call.o real.o NESSOBJS = ness.o nesscomp.o ${INTERPOBJS} --- 3,12 ---- * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ YFLAGS = -d -v ! TOKENS = ../tokens ! LOCALINCLUDES = -I${TOKENS} ! DEFINES = -DYYDEBUG INTERPOBJS = interp.o gen.o dump.o search.o error.o nevent.o call.o real.o NESSOBJS = ness.o nesscomp.o ${INTERPOBJS} *************** *** 36,42 **** NormalObjectRule() NormalATKRule() - NormalYaccRule() .SUFFIXES: .h .hn .hn.h: --- 37,42 ---- *************** *** 54,92 **** DynamicMultiObject(ness.do, ${NESSOBJS}, ${BASEDIR}/lib/atk/libbasics.a ${UTILLIB}, -lm) DynamicMultiObject(nessv.do, nessv.o, ${BASEDIR}/lib/atk/libbasics.a, -lm) - nesscomp.y: ../tokens/buildy nesscomp.gra - ../tokens/buildy nesscomp.gra nesscomp.y ! nesscomp.c: nesscomp.y ! $(YACC) ${YFLAGS} $*.y ! -$(RM) $*.c ! $(MV) y.tab.c $*.c ! nesscomp.o: nesscomp.c yypshpop.c ! -$(RM) /tmp/nesscomp.c ! echo '#include "yypshpop.c"' | cat nesscomp.c - > /tmp/nesscomp.c ! ${CC} -c -I. ${LOCALINCLUDES} ${CFLAGS} ${CYFLAGS} /tmp/nesscomp.c ! -$(RM) /tmp/nesscomp.c LibraryTarget(libness.a, $(OBJS)) InstallLibrary(libness.a, ${DESTDIR}/lib/atk) TestProgramTarget(nesst, nesst.o, ${LIBS} /usr/lib/libm.a,) ! TestProgramTarget(goodness, goodness.o ${NESSOBJS} nessmark.o nesssym.o , ../tokens/libtokens.a ${LIBS}, -lm) ! TestProgramTarget(nessrun, nessrun.o ${NESSOBJS} nessmark.o nesssym.o , ../tokens/libtokens.a ${LIBS}, -lm) /* InstallProgram(nessrun, ${DESTDIR}/bin) */ InstallLink(runapp, ${DESTDIR}/bin/ness) InstallLink(runapp, ${DESTDIR}/bin/nessrun) InstallFile(nesswarn.d, ${INSTMANFLAGS}, ${DESTDIR}/lib/ness) DependTarget(init) ! checkin: Imakefile nesscomp.gra nodeclss.n *.ch *.hn \ call.c dump.c error.c gen.c goodness.c interp.c interpt.c \ ness.c nessmark.c nessrun.c nessruna.c nesssym.c nessv.c ! nevent.c real.c search.c yypshpop.c \ ! envt.h error.h interp.h nesscomp.h \ nessrun.ci nodeclss.h nessmrkt.c nesswarn.d nesst.c notes.d ci -l $? touch checkin --- 54,102 ---- DynamicMultiObject(ness.do, ${NESSOBJS}, ${BASEDIR}/lib/atk/libbasics.a ${UTILLIB}, -lm) DynamicMultiObject(nessv.do, nessv.o, ${BASEDIR}/lib/atk/libbasics.a, -lm) ! /* nesscomp.c is distributed with the sources to avoid getting the local ! yaccpar. nesscomp.c should be remade whenever nesscomp.gra changes, but ! then it would be remade even if the times of extraction of the sources ! was in the wrong order. So the dependency on nesscomp.gra is omitted. ! (Suggestions for a better method are welcome.) ! */ ! nesscomp.c:: nesscomp.gra ${TOKENS}/yaccpar ${TOKENS}/buildy ${TOKENS}/reyacc ! echo "nesscomp.c NOT REBUILT FROM nesscomp.gra" ! # nesscomp.c:: nesscomp.gra ${TOKENS}/yaccpar ${TOKENS}/buildy ${TOKENS}/reyacc ! #nesscomp.c:: ! # ${TOKENS}/buildy nesscomp.gra nesscomp.z ! # $(YACC) ${YFLAGS} $*.z ! # -$(RM) $*.c ! # $(RM) $*.z ! # $(MV) y.tab.c $*.c ! # ${TOKENS}/reyacc $*.c ${TOKENS}/yaccpar LibraryTarget(libness.a, $(OBJS)) InstallLibrary(libness.a, ${DESTDIR}/lib/atk) TestProgramTarget(nesst, nesst.o, ${LIBS} /usr/lib/libm.a,) ! TestProgramTarget(goodness, goodness.o ${NESSOBJS} nessmark.o nesssym.o , ${TOKENS}/libtokens.a ${LIBS}, -lm) ! TestProgramTarget(nessrun, nessrun.o ${NESSOBJS} nessmark.o nesssym.o , ${TOKENS}/libtokens.a ${LIBS}, -lm) /* InstallProgram(nessrun, ${DESTDIR}/bin) */ InstallLink(runapp, ${DESTDIR}/bin/ness) InstallLink(runapp, ${DESTDIR}/bin/nessrun) InstallFile(nesswarn.d, ${INSTMANFLAGS}, ${DESTDIR}/lib/ness) + InstallFile(error.h, $(INSTINCFLAGS), $(DESTDIR)/include) + CleanTarget(y.tab.c y.output nesscomp.y *.sysyacc) + CleanTarget(call.h gen.h compdefs.h nevent.h) + CleanTarget(nessrun nodeclass goodness nesst) + DependTarget(init) ! checkin: Imakefile nesscomp.gra nesscomp.c nodeclss.n *.ch *.hn \ call.c dump.c error.c gen.c goodness.c interp.c interpt.c \ ness.c nessmark.c nessrun.c nessruna.c nesssym.c nessv.c ! nevent.c real.c search.c \ ! envt.h error.h interp.h \ nessrun.ci nodeclss.h nessmrkt.c nesswarn.d nesst.c notes.d ci -l $? touch checkin *** atk/ness/objects/call.c Wed Sep 26 16:05:22 1990 --- atk/ness/objects/call.c.NEW Mon Oct 29 10:55:34 1990 *************** *** 1,12 **** /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/call.c,v 1.37 90/09/16 20:13:21 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/call.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/call.c,v 1.37 90/09/16 20:13:21 wjh Exp $"; #endif /* --- 1,12 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/call.c,v 1.38 90/10/12 21:07:59 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/call.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/call.c,v 1.38 90/10/12 21:07:59 wjh Exp $"; #endif /* *************** *** 115,121 **** {"anyof", "Fc", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, {"span", "Fd", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, {"token", "Fe", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, ! {"searchforstyle", "Ff", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, {"definestyle", "zFi", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, {"addstyles", "Fj", {Tstr, Tstr, Tstr, Tend}, ness_codeYellow}, {"hasstyles", "Fk", {Tbool, Tstr, Tstr, Tend}, ness_codeOrange}, --- 115,123 ---- {"anyof", "Fc", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, {"span", "Fd", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, {"token", "Fe", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, ! {"regsearch", "Ff", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, ! {"regsearchreverse", "Fg", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, ! {"searchforstyle", "Fh", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, {"definestyle", "zFi", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, {"addstyles", "Fj", {Tstr, Tstr, Tstr, Tend}, ness_codeYellow}, {"hasstyles", "Fk", {Tbool, Tstr, Tstr, Tend}, ness_codeOrange}, *************** *** 584,592 **** booleanType = type_Lookup(Ctypes->voidType, "boolean"); } - yypushcompile(); msg = type_DeclareClass(classname); ! yypopcompile(); if (*msg != '\0') return FALSE; classtype = type_Lookup(Ctypes->basicobject, classname); if (classtype == NULL) return FALSE; --- 586,593 ---- booleanType = type_Lookup(Ctypes->voidType, "boolean"); } msg = type_DeclareClass(classname); ! if (*msg != '\0') return FALSE; classtype = type_Lookup(Ctypes->basicobject, classname); if (classtype == NULL) return FALSE; *************** *** 1737,1743 **** if (ness->ErrorList != NULL) { neventUnpost(ness, FALSE); /* remove old postings */ ! MapRunError(ness->ErrorList); ness_Expose(ness); } ness->needsInit = FALSE; --- 1738,1744 ---- if (ness->ErrorList != NULL) { neventUnpost(ness, FALSE); /* remove old postings */ ! MapRunError(ness); ness_Expose(ness); } ness->needsInit = FALSE; *** atk/ness/objects/dump.c Wed Nov 22 12:20:54 1989 --- atk/ness/objects/dump.c.NEW Mon Oct 29 10:55:38 1990 *************** *** 1,12 **** /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/dump.c,v 1.11 89/09/17 08:54:39 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/dump.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/dump.c,v 1.11 89/09/17 08:54:39 wjh Exp $"; #endif /* dump.c --- 1,12 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/dump.c,v 1.12 90/10/12 21:08:21 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/dump.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/dump.c,v 1.12 90/10/12 21:08:21 wjh Exp $"; #endif /* dump.c *************** *** 24,29 **** --- 24,36 ---- /* * $Log: dump.c,v $ + * Revision 1.12 90/10/12 21:08:21 wjh + * revised yaccpar to eliminate saving parser state. + * moved yycompile to gen.c + * eliminated ErrorList + * made the argument to MapRunError be a ness instead of an ErrorList + * + * * Revision 1.11 89/09/17 08:54:39 wjh * avoid crash when disabled event encountered * *************** *** 91,97 **** #include #include #include /* for curNess, for da */ - #include #include #include --- 98,103 ---- *** atk/ness/objects/error.c Wed Nov 22 12:21:05 1989 --- atk/ness/objects/error.c.NEW Mon Oct 29 10:55:40 1990 *************** *** 1,12 **** /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/error.c,v 1.16 89/09/19 19:57:41 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/error.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/error.c,v 1.16 89/09/19 19:57:41 wjh Exp $"; #endif /* error.c --- 1,12 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/error.c,v 1.17 90/10/12 21:08:45 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/error.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/error.c,v 1.17 90/10/12 21:08:45 wjh Exp $"; #endif /* error.c *************** *** 23,29 **** compile time errors: ! SetupErrorHandling() SaveError(msg, loc, len) ReportError(msr, index) ExprError(msg, expr) --- 23,29 ---- compile time errors: ! SetupErrorHandling(ness) SaveError(msg, loc, len) ReportError(msr, index) ExprError(msg, expr) *************** *** 34,45 **** run time errors: LocateErrorFunc(loc, base, msg, ness) ! MapRunError(err) */ /* * $Log: error.c,v $ * Revision 1.16 89/09/19 19:57:41 wjh * fix precedence error * --- 34,52 ---- run time errors: LocateErrorFunc(loc, base, msg, ness) ! MapRunError(ness) */ /* * $Log: error.c,v $ + * Revision 1.17 90/10/12 21:08:45 wjh + * revised yaccpar to eliminate saving parser state. + * moved yycompile to gen.c + * eliminated ErrorList + * made the argument to MapRunError be a ness instead of an ErrorList + * + * * Revision 1.16 89/09/19 19:57:41 wjh * fix precedence error * *************** *** 167,173 **** #include #include #include - #include /* home of ErrorList */ #include /* for exprnode */ #include #include /* for objnode */ --- 174,179 ---- *************** *** 395,414 **** COMPILE TIME ERRORS \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - /* decls inserted to match those of yacc */ - extern int yychar; - extern short yyerrflag; - static long lastloc, lastlen; /* loc/len of last ":. . . restart" */ static boolean Restarted; void ! SetupErrorHandling() { lastloc = -1; Restarted = FALSE; ! ErrorList = NULL; } --- 401,422 ---- COMPILE TIME ERRORS \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ static long lastloc, lastlen; /* loc/len of last ":. . . restart" */ static boolean Restarted; void ! SetupErrorHandling(ness) ! struct ness *ness; { lastloc = -1; Restarted = FALSE; ! while (ness->ErrorList != NULL) { ! struct errornode *t = ness->ErrorList; ! ness->ErrorList = t->next; ! errornode_Destroy(t); ! } ! ness->ErrorList = NULL; } *************** *** 450,460 **** struct errornode *err; err = errornode_Create(curNess, loc, len, 0, msg, (*msg == '*'), NULL); ! if (ErrorList == NULL) ! ErrorList = err; else { struct errornode *t; ! for (t = ErrorList; t->next != NULL; t = t->next) {} t->next = err; } --- 458,468 ---- struct errornode *err; err = errornode_Create(curNess, loc, len, 0, msg, (*msg == '*'), NULL); ! if (curNess->ErrorList == NULL) ! curNess->ErrorList = err; else { struct errornode *t; ! for (t = curNess->ErrorList; t->next != NULL; t = t->next) {} t->next = err; } *************** *** 489,502 **** Restarted = FALSE; } ! ! /* errsynch(index) generate an error message that parser will restart after error However, if it is the same restart token as the last, skip it returns location of restart */ long ! errsynch(index) { long loc, len; --- 497,512 ---- Restarted = FALSE; } ! /* errsynch(index, pyychar, pyyerrflag) generate an error message that parser will restart after error However, if it is the same restart token as the last, skip it returns location of restart */ long ! errsynch(index, pyychar, pyyerrflag) ! long index; ! int *pyychar; ! short *pyyerrflag; { long loc, len; *************** *** 507,514 **** Restarted = TRUE; lastloc = loc; lastlen = len; ! yychar = -1; /* yyclearin */ ! yyerrflag = 0; /* yyerrok */ lex_Repeat(index); SaveError(": . . . restart with token", loc, len); } --- 517,524 ---- Restarted = TRUE; lastloc = loc; lastlen = len; ! *pyychar = -1; /* yyclearin */ ! *pyyerrflag = 0; /* yyerrok */ lex_Repeat(index); SaveError(": . . . restart with token", loc, len); } *************** *** 568,587 **** \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ ! /* MapRunError (err) ! Modify the errornode 'err' to have the source code location corresponding to the object code location. */ void ! MapRunError(err) ! struct errornode *err; { register struct funcnode *fnode; struct nesssym *errsym; register struct nessmark *objcode; ! struct ness *ness; long loc, len; if (err == NULL) return; errsym = codelocFind(err->execloc); --- 578,600 ---- \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ ! /* MapRunError (ness) ! Modify the errornode ness->ErrorList to have the source code location corresponding to the object code location. */ void ! MapRunError(ness) ! struct ness *ness; { register struct funcnode *fnode; struct nesssym *errsym; register struct nessmark *objcode; ! struct errornode *err; long loc, len; + err = ness->ErrorList; + ness->ErrorList = err->next; /* remove err from ErrorList + before it is cleared by SetUpErrorHandling */ if (err == NULL) return; errsym = codelocFind(err->execloc); *************** *** 593,603 **** objcode = &SysMarkLowEnd[fnode->SysMarkOffset]; if (errsym->flags == (flag_function | flag_ness)) { /* top level function */ ! ness = errsym->parent.ness; } else { /* event or function defined in an 'extend' */ ! ness = errsym->parent.nesssym->parent.ness; } mark_SetPos(err->where, fnode->srcloc); --- 606,618 ---- objcode = &SysMarkLowEnd[fnode->SysMarkOffset]; if (errsym->flags == (flag_function | flag_ness)) { /* top level function */ ! if (ness != errsym->parent.ness) ! fprintf(stderr, "MapRunErr - ness mismatch 1\n"); } else { /* event or function defined in an 'extend' */ ! if (ness != errsym->parent.nesssym->parent.ness) ! fprintf(stderr, "MapRunErr - ness mismatch 2\n"); } mark_SetPos(err->where, fnode->srcloc); *************** *** 616,627 **** mark_SetLength(err->where, len); } ! /* delete compilation error messages XXX is this right??? */ ! while (ErrorList != NULL) { ! struct errornode *t = ErrorList; ! ErrorList = t->next; errornode_Destroy(t); } } --- 631,643 ---- mark_SetLength(err->where, len); } ! /* delete compilation error messages */ ! while (ness->ErrorList != NULL) { ! struct errornode *t = ness->ErrorList; ! ness->ErrorList = t->next; errornode_Destroy(t); } + ness->ErrorList = err; } *************** *** 661,667 **** attach an error message to the ness with the error */ whereness->ErrorList = errornode_Create(whereness, 0, 0, loc - base, msg, (*msg == '*'), whereness->ErrorList); ! MapRunError(whereness->ErrorList); ness_Expose(whereness); /* go up stack looking for the root ness to give it a message */ --- 677,683 ---- attach an error message to the ness with the error */ whereness->ErrorList = errornode_Create(whereness, 0, 0, loc - base, msg, (*msg == '*'), whereness->ErrorList); ! MapRunError(whereness); ness_Expose(whereness); /* go up stack looking for the root ness to give it a message */ *** atk/ness/objects/error.h Wed Nov 22 12:21:07 1989 --- atk/ness/objects/error.h.NEW Mon Oct 29 10:55:44 1990 *************** *** 1,9 **** /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/error.h,v 1.5 89/06/23 17:24:11 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/error.h,v $ */ /* error.h -- declarations for error handling routines */ --- 1,9 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/error.h,v 1.6 90/10/12 21:09:54 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/error.h,v $ */ /* error.h -- declarations for error handling routines */ *************** *** 10,16 **** #ifndef _ness_error_h_ #define _ness_error_h_ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *error_h_rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/error.h,v 1.5 89/06/23 17:24:11 wjh Exp $"; #endif --- 10,16 ---- #ifndef _ness_error_h_ #define _ness_error_h_ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *error_h_rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/error.h,v 1.6 90/10/12 21:09:54 wjh Exp $"; #endif *************** *** 43,49 **** boolean isFuncStart(/* struct nesssym *tok */); /* ? 0 indent for this or next two tokens */ struct errornode *LocateErrorFunc(/* loc, base, msg, ness */); /* see which ness has the error */ ! void MapRunErrors(/* struct ness *ness, struct errornode *errorlist */); #endif _ness_error_h_ --- 43,49 ---- boolean isFuncStart(/* struct nesssym *tok */); /* ? 0 indent for this or next two tokens */ struct errornode *LocateErrorFunc(/* loc, base, msg, ness */); /* see which ness has the error */ ! void MapRunErrors(/* struct ness *ness */); #endif _ness_error_h_ *** atk/ness/objects/gen.c Mon Aug 6 11:07:30 1990 --- atk/ness/objects/gen.c.NEW Mon Oct 29 10:55:46 1990 *************** *** 1,12 **** /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/gen.c,v 1.19 90/07/15 15:23:55 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/gen.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/gen.c,v 1.19 90/07/15 15:23:55 wjh Exp $"; #endif /* --- 1,12 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/gen.c,v 1.20 90/10/12 21:08:28 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/gen.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/gen.c,v 1.20 90/10/12 21:08:28 wjh Exp $"; #endif /* *************** *** 15,20 **** --- 15,27 ---- */ /* * $Log: gen.c,v $ + * Revision 1.20 90/10/12 21:08:28 wjh + * revised yaccpar to eliminate saving parser state. + * moved yycompile to gen.c + * eliminated ErrorList + * made the argument to MapRunError be a ness instead of an ErrorList + * + * * Revision 1.19 90/07/15 15:23:55 wjh * call.c: fix a coreleak in class() * ness.ch: defined CURRENTMODIFICATIONLEVEL *************** *** 169,175 **** #include #include #include - #include #include #include #include --- 176,181 ---- *************** *** 177,184 **** #include #include - /* defining instances for declarations in gen.hn */ struct lex *curLex = NULL; /* points to the lex used for grammar */ struct ness *curNess = NULL; /* the current ness */ --- 183,190 ---- #include #include + int yyparse(); /* in nesscomp.{gra,y,c} */ /* defining instances for declarations in gen.hn */ struct lex *curLex = NULL; /* points to the lex used for grammar */ struct ness *curNess = NULL; /* the current ness */ *************** *** 240,245 **** --- 246,270 ---- #define ENTERARGOFFSET 1 /* offset from start of object for function to the operand that must be fixed */ + + struct errornode * + yycompile(ness) + struct ness *ness; + { + genPush(); + + ness->AttrDest = &ness->globals; /* where to put defined symbols */ + curNess = ness; + SetupErrorHandling(ness); + curLex = ness_GetLex(ness); + lex_SetCurrent(curLex); + ness->CurrentObject = NULL; + + yyparse(); + + genPop(); + return ness->ErrorList; + } static struct genState { long scopeDepth; *** atk/ness/objects/gen.hn Wed Nov 22 12:21:19 1989 --- atk/ness/objects/gen.hn.NEW Mon Oct 29 10:55:49 1990 *************** *** 1,15 **** /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/gen.hn,v 1.8 89/09/17 08:52:21 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/gen.hn,v $ */ #ifndef _ness_gen_h_ #define _ness_gen_h_ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *gen_hn_rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/gen.hn,v 1.8 89/09/17 08:52:21 wjh Exp $"; #endif /* gen.hn - definitions for nesscomp --- 1,15 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/gen.hn,v 1.9 90/10/12 21:08:57 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/gen.hn,v $ */ #ifndef _ness_gen_h_ #define _ness_gen_h_ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *gen_hn_rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/gen.hn,v 1.9 90/10/12 21:08:57 wjh Exp $"; #endif /* gen.hn - definitions for nesscomp *************** *** 20,25 **** --- 20,32 ---- A source file which imports gen.h should also import nodeclss.h */ /* $Log: gen.hn,v $ + Revision 1.9 90/10/12 21:08:57 wjh + revised yaccpar to eliminate saving parser state. + moved yycompile to gen.c + eliminated ErrorList + made the argument to MapRunError be a ness instead of an ErrorList + + Revision 1.8 89/09/17 08:52:21 wjh declaration of genPushScope *************** *** 96,101 **** --- 103,110 ---- struct nesssym *sym; struct fixupstackrefnode *next; }; + + struct errornode *yycompile(); void genPush(/* */); /* save current state for recursive compile */ void genPop(/* */); /* restore state of outer compile */ *** atk/ness/objects/interp.c Wed Sep 26 16:05:32 1990 --- atk/ness/objects/interp.c.NEW Mon Oct 1 16:08:07 1990 *************** *** 1,12 **** /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/interp.c,v 1.31 90/09/16 20:14:27 wjh Exp $ */ /* $ACIS:$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/interp.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/interp.c,v 1.31 90/09/16 20:14:27 wjh Exp $"; #endif /* interp.c --- 1,12 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/interp.c,v 1.32 90/09/30 09:48:00 wjh Exp $ */ /* $ACIS:$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/interp.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/interp.c,v 1.32 90/09/30 09:48:00 wjh Exp $"; #endif /* interp.c *************** *** 21,26 **** --- 21,29 ---- /* * $Log: interp.c,v $ + * Revision 1.32 90/09/30 09:48:00 wjh + * improved compilability of the bcopys. compliments of Guy Harris + * * Revision 1.31 90/09/16 20:14:27 wjh * see ness/objects/changes.sept.90 * *************** *** 527,534 **** struct ness *SaveInterpInProg = InterpretationInProgress; /* SaveExecExit = ExecutionExit; */ ! bcopy(&ExecutionExit, &SaveExecExit, sizeof(jmp_buf)); ! if (InterpretationInProgress == NULL) { /* reinitialize stack pointer */ --- 530,536 ---- struct ness *SaveInterpInProg = InterpretationInProgress; /* SaveExecExit = ExecutionExit; */ ! bcopy((char *)ExecutionExit, (char *)SaveExecExit, sizeof(jmp_buf)); if (InterpretationInProgress == NULL) { /* reinitialize stack pointer */ *************** *** 592,598 **** /* restore global variables */ /* ExecutionExit = SaveExecExit; */ ! bcopy(&SaveExecExit, &ExecutionExit, sizeof(jmp_buf)); InterpretationInProgress= SaveInterpInProg; FramePtr = SaveFramePtr; --- 594,601 ---- /* restore global variables */ /* ExecutionExit = SaveExecExit; */ ! bcopy((char *)SaveExecExit, (char *)ExecutionExit, ! sizeof(jmp_buf)); InterpretationInProgress= SaveInterpInProg; FramePtr = SaveFramePtr; *** atk/ness/objects/ness.c Wed Sep 26 16:05:36 1990 --- atk/ness/objects/ness.c.NEW Mon Oct 29 10:55:53 1990 *************** *** 2,13 **** * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.c,v 1.29 90/09/17 11:11:17 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.c,v 1.29 90/09/17 11:11:17 wjh Exp $"; #endif /* ness.c --- 2,13 ---- * Copyright IBM Corporation 1988,1989 - All Rights Reserved * * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.c,v 1.30 90/10/12 21:11:20 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.c,v 1.30 90/10/12 21:11:20 wjh Exp $"; #endif /* ness.c *************** *** 16,21 **** --- 16,29 ---- */ /* * $Log: ness.c,v $ + * Revision 1.30 90/10/12 21:11:20 wjh + * Revised the getc/ungetc code in ness__ReadNamedFile to try to make it work on PMAX and Sun4 + * revised yaccpar to eliminate saving parser state. + * moved yycompile to gen.c + * eliminated ErrorList + * made the argument to MapRunError be a ness instead of an ErrorList + * + * * Revision 1.29 90/09/17 11:11:17 wjh * reordered the code of ness__ReadNamedFile to try to make ungetc work on all systems. * *************** *** 221,227 **** #include #include #include - #include #include #include #include --- 229,234 ---- *************** *** 325,331 **** self->arg, self); if (self->ErrorList != NULL) { neventUnpost(self, FALSE); /* remove old postings */ ! MapRunError(self->ErrorList); } /* the arg is only used once ! */ --- 332,338 ---- self->arg, self); if (self->ErrorList != NULL) { neventUnpost(self, FALSE); /* remove old postings */ ! MapRunError(self); } /* the arg is only used once ! */ *** atk/ness/objects/ness.ch Wed Sep 26 16:05:38 1990 --- atk/ness/objects/ness.ch.NEW Mon Oct 29 10:55:55 1990 *************** *** 1,12 **** /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.ch,v 1.14 90/09/16 20:14:55 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.ch,v 1.14 90/09/16 20:14:55 wjh Exp $"; #endif /* --- 1,12 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.ch,v 1.15 90/10/12 21:15:23 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/ness.ch,v 1.15 90/10/12 21:15:23 wjh Exp $"; #endif /* *************** *** 20,25 **** --- 20,28 ---- */ /* * $Log: ness.ch,v $ + Revision 1.15 90/10/12 21:15:23 wjh + change to version 1.5 + Revision 1.14 90/09/16 20:14:55 wjh see ness/objects/changes.sept.90 *************** *** 119,125 **** CURRENTSYNTAXLEVEL because that means we have a new program and an old compiler. */ ! #define CURRENTMODIFICATIONLEVEL 4 /* nessrun generates the VERSION NUMBER as * --- 122,128 ---- CURRENTSYNTAXLEVEL because that means we have a new program and an old compiler. */ ! #define CURRENTMODIFICATIONLEVEL 5 /* nessrun generates the VERSION NUMBER as * *** atk/ness/objects/nesscomp.gra Wed Sep 26 16:05:41 1990 --- atk/ness/objects/nesscomp.gra.NEW Mon Oct 29 10:55:58 1990 *************** *** 1,12 **** %{/* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.gra,v 1.12 90/09/16 20:15:01 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.gra,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! char *ness_gra_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.gra,v 1.12 90/09/16 20:15:01 wjh Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ --- 1,12 ---- %{/* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.gra,v 1.13 90/10/12 21:05:57 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.gra,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! char *ness_gra_rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.gra,v 1.13 90/10/12 21:05:57 wjh Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ *************** *** 24,30 **** #include #include #include - #include #include /* for gen.h */ #include #include --- 24,29 ---- *************** *** 33,41 **** #include /* for integer constants */ #include - /* defining instances of globals from nesscomp.h */ - struct errornode *ErrorList = NULL; - %} --- 32,37 ---- *************** *** 93,99 **** %% /* rules section */ /* $$ is nothing, symbols are linked onto ! *curNess->AttrDest in attrDecl */ script : { /* this code creates the function for the initialization */ --- 89,95 ---- %% /* rules section */ /* $$ is nothing, symbols are linked onto ! *curNess->AttrDest in genLinkGlobal */ script : { /* this code creates the function for the initialization */ *************** *** 117,123 **** ; /* An object is extended with a sequence of attribute declarations */ ! /* $$ is nothing, symbols are linked onto *curNess->AttrDest in attrDecl */ attributes : /* empty */ /* script may be empty */ --- 113,119 ---- ; /* An object is extended with a sequence of attribute declarations */ ! /* $$ is nothing, symbols are linked onto *curNess->AttrDest in genLinkGlobal */ attributes : /* empty */ /* script may be empty */ *************** *** 171,188 **** attrDecl : error FUNCTION ! { if (isFuncStart($2, TRUE, 2)) {abortfunc(); errsynch(0);} ! else YYERROR; } | error EXTEND ! { if (isFuncStart($2, TRUE, 2)) {abortfunc(); ! /* XXX ought to close existing EXTEND, if any */ ! errsynch(0);} ! else YYERROR; } | error type ! { if (isFuncStart($2, FALSE, 3)) {abortfunc(); errsynch(0);} ! else YYERROR; } | error VOID { struct sym *tok, *curtok; --- 167,189 ---- attrDecl : error FUNCTION ! { if (isFuncStart($2, TRUE, 2)) { ! abortfunc(); ! errsynch(0, &yychar, &yyerrflag); ! } else YYERROR; } | error EXTEND ! { if (isFuncStart($2, TRUE, 2)) { ! /* XXX ought to close existing EXTEND, if any */ ! abortfunc(); ! errsynch(0, &yychar, &yyerrflag); ! } else YYERROR; } | error type ! { if (isFuncStart($2, FALSE, 3)) { ! abortfunc(); ! errsynch(0, &yychar, &yyerrflag); ! } else YYERROR; } | error VOID { struct sym *tok, *curtok; *************** *** 191,205 **** which would signal the end of error state */ lex_Repeat(-1); lex_NextToken(&tok); lex_NextToken(&curtok); if (strcmp(sym_GetName(tok), "return") == 0) YYERROR; ! if (isFuncStart($2, FALSE, 3)) {abortfunc(); errsynch(0);} ! else YYERROR; } | error ON eventstart { /* XXX should we open an EXTEND, if none ??? */ /* we accept the ON only if it is the first item on its line */ ! if (lex_RecentIndent(-1) < 999) {abortfunc(); errsynch(-1);} ! else YYERROR; } | ';' /* allow extra semi-colons */ --- 192,210 ---- which would signal the end of error state */ lex_Repeat(-1); lex_NextToken(&tok); lex_NextToken(&curtok); if (strcmp(sym_GetName(tok), "return") == 0) YYERROR; ! if (isFuncStart($2, FALSE, 3)) { ! abortfunc(); ! errsynch(0, &yychar, &yyerrflag); ! } else YYERROR; } | error ON eventstart { /* XXX should we open an EXTEND, if none ??? */ /* we accept the ON only if it is the first item on its line */ ! if (lex_RecentIndent(-1) < 999) { ! abortfunc(); ! errsynch(-1, &yychar, &yyerrflag); ! } else YYERROR; } | ';' /* allow extra semi-colons */ *************** *** 360,380 **** : ';' /* extra semicolon */ { $$ = NULL; } - /* | error - /* ',' - /* { yylex(); /* discard the comma, it ends the stmt */ - /* errsynch(); $$ = NULL; } - /* | error - /* END - /* { errsynch(); $$ = NULL; } - /* | error - /* ELSE - /* { errsynch(); $$ = NULL; } - /* | error - /* ELIF - /* { errsynch(); $$ = NULL; } - */ - | var /* assignment */ COLONEQUAL { $$ = varIsStorable($1); --- 365,370 ---- *************** *** 562,581 **** /* $$ is an exprnode whose type field has type as Txxx */ expr : midexpr - - /* | error - /* afterError - /* { $$ = exprnode_Create(Tunk, NULL, FALSE, - /* errsynch(), 0); } - /* | error - /* THEN - /* { $$ = exprnode_Create(Tbra, NULL, FALSE, - /* errsynch(), 0); } - /* | error - /* DO - /* { $$ = exprnode_Create(Tbra, NULL, FALSE, - /* errsynch(), 0); } - */ | NOT { $$ = lex_RecentPosition(0, 0); --- 552,557 ---- *** atk/ness/objects/nevent.c Wed Sep 26 16:05:46 1990 --- atk/ness/objects/nevent.c.NEW Mon Oct 29 10:56:01 1990 *************** *** 1,12 **** /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nevent.c,v 1.23 90/09/18 10:15:20 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nevent.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nevent.c,v 1.23 90/09/18 10:15:20 wjh Exp $"; #endif /* nevent.c - object extension and event handling for Ness --- 1,12 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nevent.c,v 1.24 90/10/12 21:17:15 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nevent.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nevent.c,v 1.24 90/10/12 21:17:15 wjh Exp $"; #endif /* nevent.c - object extension and event handling for Ness *************** *** 780,786 **** if (ness->ErrorList != NULL) { neventUnpost(ness, FALSE); /* remove old postings */ ! MapRunError(ness->ErrorList); ness_Expose(ness); } } --- 780,786 ---- if (ness->ErrorList != NULL) { neventUnpost(ness, FALSE); /* remove old postings */ ! MapRunError(ness); ness_Expose(ness); } } *** atk/ness/objects/search.c Wed Sep 26 16:05:54 1990 --- atk/ness/objects/search.c.NEW Fri Dec 14 16:52:54 1990 *************** *** 1,12 **** /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/search.c,v 1.19 90/09/16 20:15:35 wjh Exp $ */ /* $ACIS:$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/search.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/search.c,v 1.19 90/09/16 20:15:35 wjh Exp $"; #endif /* --- 1,12 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/search.c,v 1.23 90/12/04 14:58:37 wjh Exp $ */ /* $ACIS:$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/search.c,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/search.c,v 1.23 90/12/04 14:58:37 wjh Exp $"; #endif /* *************** *** 18,23 **** --- 18,37 ---- */ /* * $Log: search.c,v $ + * Revision 1.23 90/12/04 14:58:37 wjh + * corrected search() to check for empty pattern argument + * + * Revision 1.22 90/11/30 15:42:01 wjh + * fixed a bug that caused crash in search.c on pmaxen + * + * Revision 1.21 90/11/28 15:23:54 wjh + * fixed a bug in the search() function which was crashing it during present.n + * + * Revision 1.20 90/10/12 21:16:24 wjh + * added regSearch and regSearchReverse + * made search() faster + * + * * Revision 1.19 90/09/16 20:15:35 wjh * see ness/objects/changes.sept.90 * *************** *** 144,150 **** * */ ! #include /* for bzero() */ #include #include #include --- 158,164 ---- * */ ! #include /* for bzero() bcmp() */ #include #include #include *************** *** 155,160 **** --- 169,175 ---- #include #include #include + #include #include #include *************** *** 237,242 **** --- 252,259 ---- CharTable[simpletext_CorrectGetChar(ptext, pos)] = FALSE; } + #ifdef nodef + /* old search algorithm. slow, but sure */ void search(subject, pat) struct nessmark *subject, *pat; *************** *** 277,283 **** --- 294,566 ---- nessmark_SetPos(subject, spos + slen); nessmark_SetLength(subject, 0); } + #else /* notdef */ + + /* buffers global to the search algorithms */ + static char *patBuf, *bufA, *bufB; + static long patlen, bufAlen, bufBlen; + + /* BufMatch(offset) + check the concatenation of + bufA (length bufAlen) and bufB (length bufBlen) + to see if patBuf (length patlen) matches the portion beginning + at 'offset' + return TRUE for a match and FALSE otherwise + */ + static boolean + BufMatch(offset) + register long offset; + { + register long Apart; /* how much is in A */ + if (offset >= bufAlen) + /* entirely in B */ + return (bcmp(patBuf, bufB + offset - bufAlen, patlen) == 0); + else if (offset + patlen > bufAlen) { + /* spans the boundary */ + Apart = bufAlen - offset; + return (bcmp(patBuf, bufA + offset, Apart) == 0 + && bcmp(patBuf+Apart, bufB, patlen - Apart) == 0); + } + else + /* entirely in A */ + return (bcmp(patBuf, bufA+offset, patlen) == 0); + } + + + /* SimpleSearch() + look for patBuf (length patlen) in the concatenation of + bufA (length bufAlen) and bufB (length bufBlen) + return the offset of the match from the start of bufA + return -1 if not found + + This code is the same as Delta search except: + a) It does not declare or use the delta array, and + b) The increment in the final loops is 1. + */ + static long + SimpleSearch() + { + register char *cx, *curend, target; + register long i, toff; + + /* compute target character: first low probability character in pat + the high probability characters are deemed to be + space, newline, e, t, a, i, o, n, r, s, l, c + (only about 6% of all short words consist entirely of these characters) */ + curend = patBuf + patlen; + target = *(curend-1); /* use last char of pat if none other */ + toff = patlen - 1; + for (cx = patBuf; cx < curend; cx++) + switch(*cx) { + case ' ': case '\n': case 'e': case 't': case 'a': case 'i': + case 'o': case 'n': case 'r': case 's': case 'l': case 'c': + break; + default: + target = *cx; + toff = cx - patBuf; + cx = curend; /* break the for-loop */ + break; /* break the switch */ + } + + /* the value of cx in the algorithm refers to the position + scanned for the target character. The pattern is + being matched against position cx-toff */ + + /* search starting in bufA */ + cx = bufA + toff; + curend = bufA + bufAlen; + if (bufBlen < patlen-toff) + curend -= patlen-toff-bufBlen - 1; + while (cx < curend) { + if (target == *cx) { + i = cx - bufA - toff; + if (BufMatch(i)) + return i; + } + cx ++; + } + if (bufBlen == 0) return -1; + /* search starting in bufB (continue cx from above) */ + cx = bufB + (cx-bufA) - bufAlen; + curend = bufB + bufBlen - patlen + 1 + toff; + while (cx < curend) { + if (target == *cx) { + i = cx - bufB + bufAlen - toff; + if (BufMatch(i)) + return i; + } + cx ++; + } + /* not found */ + return -1; + } + + + static short freq[256] = { + /* ctl chars */ 9,9,9,9,9,9,9,9,9,29,9,9,9,35,9,9, + /* ctl chars */ 9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9, + /* punctuation */ 950,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30, + /* digits */ 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30, + /* uppercase */ 11,88,82,84,83,91,81,82,82,87,12,81,85,83,86,86, + /* uppercase */ 23,12,87,85,87,83,81,81,8,82,12,11,11,11,11,11, + /* lowercase */ 11,889,823,845,832,911,815,824,829,878,82,811,855,832,868,869, + /* lowercase */ 431,82,874,856,871,836,810,811,83,820,82,11,11,11,11,11, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, + }; + + + /* DeltaSearch() + look for patBuf (length patlen) in the concatenation of + bufA (length bufAlen) and bufB (length bufBlen) + return the offset of the match from the start of bufA + return -1 if not found + Use a fast delta search algorithm + */ + static long + DeltaSearch() + { + long delta[256]; + register char *cx, *curend, target; + register long i, toff; + + /* for each character of pattern, compute a delta value + such that if the pattern is aligned at cx-toff + it should next align at + cx-toff+delta[*(cx+patlen)] + If there are multiple instances of a character, + use the rightmost because it advances cx the least + During the scan, find as target the character + with lowest frequency. + */ + toff = patlen + 1; /* delta for chars not in pat (toff is just a convenient register) */ + for (i = 0; i < 64; i++) + delta[i] = toff; + bcopy(&delta[0], &delta[64], 64*sizeof(long)); + bcopy(&delta[0], &delta[128], 128*sizeof(long)); + + toff = patlen - 1; + i = 9999; + curend = patBuf + patlen; + target = *(curend-1); /* use last char of pat if none other */ + + for (cx = patBuf; cx < curend; cx++) { + delta[*cx] = curend - cx; + if (freq[*cx] < i) { + target = *cx; + toff = cx - patBuf; + i = freq[*cx]; + } + } + + /* the value of cx in the algorithm refers to the position + scanned for the target character. The pattern is + being matched against position cx-toff */ + + /* search starting in bufA */ + cx = bufA + toff; + curend = bufA + bufAlen; + if (bufBlen < patlen-toff) + curend -= patlen-toff-bufBlen - 1; + while (cx < curend) { + if (target == *cx) { + i = cx - bufA - toff; + if (BufMatch(i)) + return i; + } + cx += delta[*(cx+patlen-toff)]; + } + /* search starting in bufB (continue cx from above) */ + if (bufBlen == 0) return -1; + cx = bufB + (cx-bufA) - bufAlen; + curend = bufB + bufBlen - patlen + 1 + toff; + while (cx < curend) { + if (target == *cx) { + i = cx - bufB + bufAlen - toff; + if (BufMatch(i)) + return i; + } + cx += delta[*(cx+patlen-toff)]; + } + /* not found */ + return -1; + } + + void + search(subject, pat) + struct nessmark *subject, *pat; + { + struct simpletext *stext, *ptext; + long patpos, spos, slen, failpos; /* (patlen is global) */ + boolean needToFreePat; + long tlen; + + ptext = nessmark_GetText(pat); + patpos = nessmark_GetPos(pat); + patlen = nessmark_GetLength(pat); + + patBuf = simpletext_GetBuf(ptext, patpos, patlen, &tlen); + if (tlen < patlen) { + /* crosses boundary, make a copy of pattern */ + bufA = patBuf; + patBuf = malloc(patlen); + strncpy(patBuf, bufA, tlen); + bufB = simpletext_GetBuf(ptext, patpos+tlen, patlen-tlen, &bufBlen); + if (bufBlen < patlen - tlen) + fprintf(stderr, "ness search: pattern buffer failure\n"); + strncpy(patBuf+tlen, bufB, patlen - tlen); + needToFreePat = TRUE; + } + else + needToFreePat = FALSE; + + stext = nessmark_GetText(subject); + spos = nessmark_GetPos(subject); + slen = nessmark_GetLength(subject); + failpos = spos + slen; + if (patlen == 0) + slen = 0; /* don't search */ + else if (slen == 0) + slen = simpletext_GetLength(stext) - spos; + + bufA = simpletext_GetBuf(stext, spos, slen, &bufAlen); + if (bufAlen < slen) { + /* we need the other buffer, too */ + bufB = simpletext_GetBuf(stext, spos+bufAlen, + slen-bufAlen, &bufBlen); + if (bufAlen + bufBlen < slen) + fprintf(stderr, "Ness search: subject buffer failure\n"); + } + else bufBlen = 0; + + if (slen == 0) + patpos = -1; + else if (slen < 200 || patlen == 1) + /* don't build table, use a simple sequential search */ + patpos = SimpleSearch(); + else + /* use delta search with table */ + patpos = DeltaSearch(); + if (patpos < 0) { + /* fail: return empty mark at end of subject */ + nessmark_SetPos(subject, failpos); + nessmark_SetLength(subject, 0); + } + else { + /* bingo */ + nessmark_SetPos(subject, spos + patpos); + nessmark_SetLength(subject, patlen); + } + if (needToFreePat) free(patBuf); + } + + + #endif /* notdef */ + + /* match(subject, pat) checks subject to see if it begins with pat. If so, returns that substring; otherwise returns finish(subject) *************** *** 306,312 **** && simpletext_CorrectGetChar(stext, pos) == simpletext_CorrectGetChar(ptext, patpos)) pos++, patpos++; ! if (patpos == patend) { /* succeed */ nessmark_SetLength(subject, nessmark_GetLength(pat)); } --- 589,595 ---- && simpletext_CorrectGetChar(stext, pos) == simpletext_CorrectGetChar(ptext, patpos)) pos++, patpos++; ! if (patpos == patend && nessmark_GetLength(pat) > 0) { /* succeed */ nessmark_SetLength(subject, nessmark_GetLength(pat)); } *************** *** 644,649 **** --- 927,933 ---- struct style *style; struct stylist *stelt; char menuname[100]; + static struct SearchPattern *regPat; if (! Inited) { Inited = TRUE; *************** *** 674,681 **** case 'd': span(subject, pat); NSP = popValue(NSP); break; case 'e': token(subject, pat); NSP = popValue(NSP); break; ! /* {"searchforstyle", "Ff", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange},*/ case 'f': pattext = (struct text *)nessmark_GetText(pat); if ( ! class_IsType(pattext, textClass)) goto nosuchstyle; /* no styles in 'pat' */ --- 958,1047 ---- case 'd': span(subject, pat); NSP = popValue(NSP); break; case 'e': token(subject, pat); NSP = popValue(NSP); break; ! /* {"regSearch", "Ff", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange} */ case 'f': + /* forward regular search */ + text = (struct text *)nessmark_GetText(subject); + pos = nessmark_GetPos(subject); + len = nessmark_GetLength(subject); + finish = pos + len; /* failure location */ + cstring = (char *)nessmark_ToC(pat); + cx = search_CompilePattern(cstring, ®Pat); + free(cstring); + /* XXX save pat's cstring and compiled pattern + test and avoid recompilation (? will this really be faster) */ + + if (cx != 0) { + /* not a valid pattern */ + fprintf(stderr, "Ness regSearch: %s\n", cx); + nessmark_Set(subject, EmptyText, 0, 0); + } + else { + if (len != 0) { + /* XXX HACK to delimit the search to the + argument */ + envlen = text_GetLength(text); + ((struct simpletext *)text)->length = finish; + pos = search_MatchPattern(text, pos, regPat); + ((struct simpletext *)text)->length = envlen; + } + else + pos = search_MatchPattern(text, pos, regPat); + + if (pos >= 0) { + /* succeed */ + nessmark_SetPos(subject, pos); + nessmark_SetLength(subject, + search_GetMatchLength()); + } + else { + /* fail */ + nessmark_SetPos(subject, finish); + nessmark_SetLength(subject, 0); + } + } + + NSP = popValue(NSP); /* discard pat, leaving revised subject as result */ + break; + + /* {"regSearchReverse", "Fg", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, */ + case 'g': + /* reverse regular search */ + text = (struct text *)nessmark_GetText(subject); + pos = nessmark_GetPos(subject); + len = nessmark_GetLength(subject); + finish = pos + len; /* failure location */ + cstring = (char *)nessmark_ToC(pat); + cx = search_CompilePattern(cstring, ®Pat); + free(cstring); + /* XXX save cstring and test to avoid recompilation (? is this really faster) */ + if (cx != 0) { + /* not a valid pattern */ + fprintf(stderr, "Ness regSearchRverse: %s\n", cx); + nessmark_Set(subject, EmptyText, 0, 0); + } + else { + envpos = search_MatchPatternReverse(text, finish, regPat); + + if (envpos >= 0 && (len == 0 || envpos >= pos)) { + /* succeed */ + nessmark_SetPos(subject, pos); + nessmark_SetLength(subject, + search_GetMatchLength()); + } + else { + /* fail */ + nessmark_SetPos(subject, finish); + nessmark_SetLength(subject, 0); + } + } + + + NSP = popValue(NSP); /* discard pat, leaving revised subject as result */ + break; + + /* {"searchforstyle", "Fh", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange},*/ + case 'h': pattext = (struct text *)nessmark_GetText(pat); if ( ! class_IsType(pattext, textClass)) goto nosuchstyle; /* no styles in 'pat' */ *************** *** 746,752 **** style = MergeStyles(style, env); } ! cstring = nessmark_ToC(pat); /* style name basis */ /* set menuname and cleaned up name if name has a comma, use name as menuname --- 1112,1118 ---- style = MergeStyles(style, env); } ! cstring = (char *)nessmark_ToC(pat); /* style name basis */ /* set menuname and cleaned up name if name has a comma, use name as menuname *************** *** 872,878 **** and in styles of 'pat' and in the DefinedStyles list*/ ! cstring = nessmark_ToC(pat); style = NULL; text = (struct text *)nessmark_GetText(subject); if (class_IsType(text, textClass)) { --- 1238,1244 ---- and in styles of 'pat' and in the DefinedStyles list*/ ! cstring = (char *)nessmark_ToC(pat); style = NULL; text = (struct text *)nessmark_GetText(subject); if (class_IsType(text, textClass)) { *************** *** 1177,1183 **** /* {"replacewithobject", "Fx", {Tstr, Tstr, Tptr, Tstr, Tvoid}, ness_codeYellow} */ case 'x': { ! cstring = nessmark_ToC(subject); /* get view name */ NSP = popValue(NSP); /* get object pointer */ if (NSP->p.hdr != ptrHdr || NSP->p.v == NULL --- 1543,1549 ---- /* {"replacewithobject", "Fx", {Tstr, Tstr, Tptr, Tstr, Tvoid}, ness_codeYellow} */ case 'x': { ! cstring = (char *)nessmark_ToC(subject); /* get view name */ NSP = popValue(NSP); /* get object pointer */ if (NSP->p.hdr != ptrHdr || NSP->p.v == NULL *************** *** 1204,1210 **** len = nessmark_GetLength(subject); if (*cstring == '\0') { free(cstring); ! cstring = (unsigned char *)freeze(dataobject_ViewName( (struct dataobject *)objval )); } --- 1570,1576 ---- len = nessmark_GetLength(subject); if (*cstring == '\0') { free(cstring); ! cstring = (char *)freeze(dataobject_ViewName( (struct dataobject *)objval )); } *** atk/ness/objects/nesscomp.c Tue Nov 20 14:35:28 1990 --- atk/ness/objects/nesscomp.c.NEW Mon Oct 29 10:56:10 1990 *************** *** 0 **** --- 1,1171 ---- + + # line 1 "nesscomp.z" + /* ********************************************************************** *\ + * Copyright IBM Corporation 1988,1989 - All Rights Reserved * + \* ********************************************************************** */ + /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.c,v 1.1 90/10/12 21:06:32 wjh Exp $ */ + /* $ACIS:$ */ + /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.c,v $ */ + + #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) + char *ness_gra_rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.c,v 1.1 90/10/12 21:06:32 wjh Exp $"; + #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ + + + /* ness.gra + + Grammar for the ness string expression language + */ + + #include + + #include /* for bcopy */ + #include + #include + #include + #include + #include + #include + #include /* for gen.h */ + #include + #include + #include + #include + #include /* for integer constants */ + #include + + # define OR 257 + # define AND 258 + # define NOT 259 + # define NE 260 + # define GE 261 + # define LE 262 + # define UNARYOP 263 + # define setID 264 + # define setSTRINGCON 265 + # define setINTCON 266 + # define setREALCON 267 + # define MARKER 268 + # define BOOLEAN 269 + # define INTEGER 270 + # define REAL 271 + # define OBJECT 272 + # define VOID 273 + # define FUNCTION 274 + # define END 275 + # define ON 276 + # define EXTEND 277 + # define FORWARD 278 + # define MOUSE 279 + # define MENU 280 + # define KEYS 281 + # define EVENT 282 + # define RETURN 283 + # define WHILE 284 + # define DO 285 + # define IF 286 + # define THEN 287 + # define ELSE 288 + # define ELIF 289 + # define EXIT 290 + # define GOTOELSE 291 + # define tokTRUE 292 + # define tokFALSE 293 + # define tokNULL 294 + # define COLONEQUAL 295 + # define APPEND 296 + static char *reswords[] = { + "marker", + "boolean", + "integer", + "real", + "object", + "void", + "function", + "end", + "on", + "extend", + "forward", + "mouse", + "menu", + "keys", + "event", + "return", + "while", + "do", + "if", + "then", + "else", + "elif", + "exit", + "gotoelse", + "true", + "false", + "null", + "and", + "or", + "not", + NULL + }; + static short restoks[] = { + MARKER, + BOOLEAN, + INTEGER, + REAL, + OBJECT, + VOID, + FUNCTION, + END, + ON, + EXTEND, + FORWARD, + MOUSE, + MENU, + KEYS, + EVENT, + RETURN, + WHILE, + DO, + IF, + THEN, + ELSE, + ELIF, + EXIT, + GOTOELSE, + tokTRUE, + tokFALSE, + tokNULL, + AND, + OR, + NOT, + }; + static char *thongs[] = { + "/=", + ">=", + "<=", + "~:=", + ":=", + NULL + }; + static short thongtoks[] = { + NE, + GE, + LE, + APPEND, + COLONEQUAL, + }; + static struct lexdescription lexdescription = { + (unsigned char **)reswords, restoks, + (unsigned char **)thongs, thongtoks, + setID, setINTCON, setREALCON, setSTRINGCON + }; + + struct lexdescription * + nesscomp_lexdesc() + { + return &lexdescription; + } + short yyexca[] ={ + -1, 1, + 0, -1, + -2, 0, + -1, 3, + 274, 10, + -2, 2, + -1, 99, + 41, 118, + -2, 119, + -1, 100, + 41, 40, + -2, 10, + -1, 172, + 275, 72, + -2, 46, + -1, 182, + 275, 74, + -2, 46, + -1, 186, + 275, 72, + -2, 46, + }; + # define YYNPROD 127 + # define YYLAST 414 + short yyact[]={ + + 53, 141, 24, 48, 53, 47, 168, 48, 82, 47, + 102, 145, 105, 103, 178, 30, 28, 29, 31, 173, + 107, 146, 106, 175, 176, 63, 64, 63, 64, 30, + 28, 29, 31, 167, 108, 123, 144, 13, 14, 15, + 16, 17, 21, 18, 64, 22, 19, 13, 14, 15, + 16, 17, 12, 38, 25, 184, 26, 166, 6, 161, + 32, 137, 39, 36, 63, 64, 8, 113, 6, 11, + 67, 78, 68, 23, 174, 20, 49, 54, 7, 45, + 44, 77, 67, 43, 68, 34, 75, 70, 69, 71, + 136, 76, 133, 135, 132, 83, 82, 3, 104, 149, + 116, 99, 81, 95, 80, 79, 87, 86, 65, 27, + 185, 180, 179, 169, 148, 165, 147, 142, 154, 153, + 152, 33, 85, 109, 62, 101, 37, 150, 100, 60, + 35, 4, 2, 115, 114, 61, 41, 46, 55, 66, + 159, 122, 118, 117, 1, 0, 0, 0, 90, 91, + 89, 0, 0, 0, 0, 92, 93, 94, 0, 96, + 97, 0, 0, 0, 0, 0, 0, 119, 0, 0, + 120, 0, 0, 0, 0, 112, 0, 0, 0, 131, + 0, 0, 0, 0, 0, 0, 126, 124, 125, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, + 0, 0, 0, 151, 0, 0, 120, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, + 0, 0, 0, 0, 56, 57, 58, 59, 56, 57, + 58, 59, 40, 0, 121, 0, 0, 0, 0, 0, + 56, 0, 0, 0, 13, 14, 15, 16, 17, 0, + 143, 0, 50, 51, 52, 5, 50, 51, 52, 127, + 129, 187, 130, 138, 139, 5, 128, 13, 14, 15, + 16, 17, 12, 160, 84, 10, 9, 13, 14, 15, + 16, 17, 12, 63, 64, 10, 9, 72, 74, 73, + 0, 171, 172, 170, 0, 0, 0, 0, 88, 177, + 0, 0, 182, 0, 181, 0, 0, 0, 186, 0, + 0, 0, 0, 0, 98, 0, 0, 0, 0, 110, + 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 134, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 155, 0, 0, 0, 0, + 156, 157, 158, 0, 0, 162, 163, 164, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 183 }; + short yypact[]={ + + -1000,-1000,-1000, 9,-1000,-231,-1000,-293,-220,-209, + -250,-204,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-1000, + -1000,-1000,-250, 41,-1000,-201,-1000,-212,-1000,-1000, + -1000,-1000,-1000,-1000,-202, -40,-1000,-1000,-1000,-1000, + -193,-1000,-1000, 27, 44, -55,-1000,-1000,-1000,-1000, + -1000,-1000,-1000,-1000, 56,-1000,-1000,-1000,-1000,-1000, + 55, -1,-1000,-1000,-1000, -40, -36, -36, -36,-1000, + -1000,-1000,-1000,-1000,-1000, -36, -36, -36,-1000, -36, + -36, -40,-1000,-1000,-264,-241, -40, -40,-1000, 39, + 44, 44, -55, -55, -55, -36, -55, -55, 26,-1000, + -221,-1000,-1000,-1000,-1000,-1000,-1000,-1000,-264, -24, + -214,-1000,-1000,-1000, 53, 48, -40, 52, 46,-203, + -1000,-1000,-1000,-1000, -32,-294,-1000, -23,-263,-1000, + -1000,-204,-1000,-1000,-193,-1000,-221,-1000,-1000,-1000, + 41,-1000, -40,-1000,-1000,-1000,-1000, -40, -40, -40, + -1000,-205, -40, -40, -40,-193,-193,-230,-193,-1000, + -242,-1000,-193,-193,-193,-279,-1000,-264,-1000,-1000, + -1000,-256,-265,-264,-261,-1000,-1000,-1000,-264,-1000, + -40,-1000,-1000,-232,-1000,-1000,-265,-1000 }; + short yypgo[]={ + + 0, 144, 143, 142, 122, 141, 74, 78, 73, 140, + 98, 125, 69, 139, 66, 77, 138, 137, 232, 136, + 83, 80, 79, 134, 133, 76, 132, 97, 131, 130, + 129, 128, 127, 126, 124, 123, 120, 119, 118, 117, + 116, 115, 114, 113, 112, 111, 110, 108, 107, 106, + 105, 104, 103, 102, 101, 100, 99 }; + short yyr1[]={ + + 0, 26, 1, 27, 27, 12, 12, 12, 12, 12, + 14, 14, 14, 10, 10, 10, 10, 11, 11, 11, + 11, 11, 11, 28, 28, 28, 28, 28, 28, 28, + 29, 28, 30, 31, 32, 28, 33, 28, 34, 28, + 2, 2, 3, 3, 9, 4, 35, 4, 5, 36, + 5, 37, 5, 5, 38, 5, 5, 39, 5, 5, + 5, 5, 40, 41, 5, 5, 42, 43, 5, 7, + 8, 8, 6, 44, 6, 45, 46, 6, 13, 13, + 13, 13, 13, 13, 18, 47, 18, 48, 18, 49, + 18, 19, 19, 20, 20, 20, 21, 21, 21, 21, + 22, 50, 22, 51, 22, 22, 22, 22, 22, 52, + 22, 53, 22, 17, 17, 54, 25, 23, 23, 55, + 24, 56, 24, 15, 16, 16, 16 }; + short yyr2[]={ + + 0, 0, 2, 0, 2, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 2, 2, 2, 3, 1, 2, + 0, 4, 0, 0, 0, 10, 0, 6, 0, 7, + 0, 1, 2, 4, 3, 0, 0, 3, 1, 0, + 4, 0, 4, 2, 0, 4, 1, 0, 3, 2, + 2, 2, 0, 0, 8, 2, 0, 0, 9, 2, + 0, 3, 0, 0, 3, 0, 0, 7, 1, 1, + 1, 1, 1, 1, 1, 0, 3, 0, 4, 0, + 4, 1, 3, 1, 3, 3, 1, 3, 3, 3, + 1, 0, 3, 0, 3, 1, 1, 1, 1, 0, + 4, 0, 4, 1, 1, 0, 5, 1, 0, 0, + 2, 0, 4, 1, 1, 1, 1 }; + short yychk[]={ + + -1000, -1, -26, -27, -28, 256, 59, -7, -14, 277, + 276, -12, 273, 268, 269, 270, 271, 272, 274, 277, + -12, 273, 276, -8, 295, 274, 265, -10, 280, 281, + 279, 282, 264, -10, 44, -29, 264, -33, 265, 264, + -18, -19, 259, -20, -21, -22, -17, 45, 43, -25, + 292, 293, 294, 40, -15, -16, 264, 265, 266, 267, + -30, -27, -34, 257, 258, -47, -13, 43, 45, 61, + 60, 62, 260, 262, 261, 42, 47, 37, 126, -50, + -51, -53, 40, 40, 275, -4, -48, -49, -18, -20, + -21, -21, -22, -22, -22, -52, -22, -22, -18, -54, + -31, -11, 274, 277, -10, 276, 286, 284, 275, -35, + -18, -18, -22, 41, -23, -24, -55, -2, -3, -14, + -12, -11, -5, 59, -15, -7, -25, 283, 290, 284, + 286, -12, 41, 44, -18, 41, 44, 264, 295, 296, + -8, 295, -39, 273, 59, 274, 284, -40, -42, -56, + -32, -14, -36, -37, -38, -18, -18, -18, -18, -9, + -4, 264, -18, -18, -18, -41, 287, 275, 285, -43, + -11, -4, -4, 275, -6, 288, 289, -11, 275, -44, + -45, -11, -4, -18, 287, -46, -4, -6 }; + short yydef[]={ + + 1, -2, 3, -2, 4, 0, 28, 70, 0, 0, + 0, 12, 11, 5, 6, 7, 8, 9, 23, 24, + 25, 26, 0, 29, 30, 0, 36, 0, 13, 14, + 15, 16, 69, 27, 0, 0, 32, 3, 38, 71, + 31, 84, 85, 91, 93, 96, 100, 101, 103, 105, + 106, 107, 108, 111, 113, 114, 123, 124, 125, 126, + 0, 10, 45, 87, 89, 0, 0, 0, 0, 78, + 79, 80, 81, 82, 83, 0, 0, 0, 109, 0, + 0, 0, 115, 33, 0, 46, 0, 0, 86, 92, + 94, 95, 97, 98, 99, 0, 102, 104, 0, -2, + -2, 37, 17, 18, 19, 20, 21, 22, 0, 0, + 88, 90, 110, 112, 0, 117, 0, 0, 41, 0, + 12, 39, 47, 48, 0, 70, 56, 57, 0, 62, + 66, 0, 116, 121, 120, 34, 10, 42, 49, 51, + 53, 54, 0, 59, 61, 60, 65, 0, 0, 0, + 45, 0, 0, 0, 0, 58, 63, 0, 122, 35, + 46, 43, 50, 52, 55, 0, 67, 0, 45, 45, + 44, 46, -2, 0, 0, 73, 75, 64, 0, 45, + 0, 68, -2, 0, 76, 45, -2, 77 }; + + # line 3 "yaccpar" + /* ********************************************************************** *\ + * Copyright IBM Corporation 1990 - All Rights Reserved * + * For full copyright information see:'andrew/config/COPYRITE' * + \* ********************************************************************** */ + /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.c,v 1.1 90/10/12 21:06:32 wjh Exp $ */ + /* $ACIS:$ */ + /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.c,v $ */ + + #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) + char *yaccpar_rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nesscomp.c,v 1.1 90/10/12 21:06:32 wjh Exp $"; + #endif + + /* + + Ness version of yaccpar + + Parser utilizing the tables generated by yacc + + adapted by revision from code with this notice: + * 5799-WZQ (C) COPYRIGHT = NONE + * LICENSED MATERIALS - PROPERTY OF IBM + * + * Source: /ibm/acis/usr/src/usr.bin/yacc/RCS/yaccpar,v + + however, the original code is a lot like the yaccpar on most systems, + so it is more likely owned by AT&T, if anybody + + For that matter, this version is substantially revised from any other, + including the addition of an exception table index, the elimination of goto's, + and the fact that no variables are global. + */ + + /* semantics routines can reset parser state with these macros */ + # define YYERROR goto yyerrlab + # define YYACCEPT return(0) + # define YYABORT return(1) + # define yyclearin yychar = -1 /* force read next token */ + # define yyerrok yyerrflag = 0 /* force finish error scan mode */ + + /* constants used in the syntax tables to flag errors */ + # define YYERRCODE 256 + # define YYFLAG -1000 + + # ifndef YYMAXDEPTH + # define YYMAXDEPTH 200 + # endif + + # ifdef YYDEBUG + int yydebug = 0; /* 1 for debugging */ + # endif + + yyparse() + { + YYSTYPE yylval; /* side return from yylex + (with lex.h, yylex() is redefined to pass &yylval to lex.c) */ + short yys[YYMAXDEPTH]; /* state stack */ + YYSTYPE yyv[YYMAXDEPTH]; /* store value for each stacked state */ + + int yychar = -1; /* current input token number */ + int yynerrs = 0; /* number of errors */ + short yyerrflag = 0; /* error recovery: assume recovered when this is + decremented back to zero once for each successfully accepted token */ + + register YYSTYPE *yypvt; /* pt to value stack for semantics routines */ + register short yystate; /* current state */ + YYSTYPE yyval; /* current token value */ + register short *yyps; /* pt to state stack */ + register short yyn; /* temporary */ + register YYSTYPE *yypv; /* pt to value stack */ + register short *yyxi; /* temporary */ + short yyj, yym; /* temporaries */ + static short **yyxx = NULL; /* exception table index */ + + yystate = 0; /* bottom state */ + /* yyval = not initialized */ + yynerrs = 0; + yyps= yys-1; /* &yys[-1] */ + yypv= yyv-1; /* &yyv[-1] */ + + if (yyxx == NULL) { + /* build exception table index */ + yyn = 0; /* find maximum state number */ + for ( yyxi = yyexca; yyxi < yyexca + sizeof(yyexca)/sizeof(short); + yyxi+=2 ) + if ( *yyxi == -1 && yyxi[1] > yyn ) + yyn = yyxi[1]; + yyxx = (short **)malloc((yyn+1)*sizeof(short *)); /* allocate table */ + for ( yyxi = yyexca; yyxi < yyexca + sizeof(yyexca)/sizeof(short); + yyxi+=2 ) + if ( *yyxi == -1 ) + yyxx[yyxi[1]] = yyxi+2; /* point to 1st entry */ + } + + while (1) { + + /* in each cycle around this main loop we push a state, and then + generate the next state by shift, reduce, or error processing */ + + /* put a state and value onto the stack */ + + /* ( the following statement had an error: > instead of >= + this would have allowed use of the illegal element + yys[YYMAXDEPTH] ) */ + if( ++yyps >= &yys[YYMAXDEPTH] ) { + yyerror( "yacc stack overflow" ); + return(1); + } + *yyps = yystate; + *++yypv = yyval; + + /* process the new state */ + yyn = yypact[yystate]; + + if( yyn > YYFLAG ) { + /* check for shift */ + + /* read next token */ + if( yychar<0 ) if( (yychar=yylex())<0 ) yychar=0; + yyn += yychar; + if( yyn >= 0 && yyn < YYLAST + && yychk[ yyn = yyact[ yyn ] ] == yychar ) { + /* valid shift */ + + # ifdef YYDEBUG + if( yydebug ) printf( " char 0%o causes shift to state %d\n", + yychar, yyn ); + # endif + + yychar = -1; /* absorb current token */ + yyval = yylval; + yystate = yyn; + if( yyerrflag > 0 ) --yyerrflag; + continue; /* go stack the new state */ + } + } + + /* not a shift operation: take default state action */ + yyn = yydef[yystate]; + if( yyn == -2 ) { + /* be sure we have a token to look at */ + if( yychar<0 ) if( (yychar=yylex())<0 ) yychar = 0; + + /* look through exception table */ + for ( yyxi = yyxx[yystate]; *yyxi >= 0; yyxi += 2 ) + if( *yyxi == yychar ) break; + yyn = yyxi[1]; + if( yyn < 0 ) return(0); /* accept */ + } + + if( yyn == 0 ) { + /* error ... attempt to resume parsing */ + + switch( yyerrflag ) { + + case 0: /* brand new error */ + + yyerror( "syntax error" ); + yyerrlab: + ++yynerrs; + /* DROP THROUGH */ + + case 1: + case 2: /* incompletely recovered error ... try again */ + + yyerrflag = 3; /* must accept 3 tokens + before restarting scan */ + + /* find a state where "error" is a legal shift action */ + + while ( TRUE ) { + if ( yyps < yys ) /* reached stack bottom */ + return (1); /* abort */ + yyn = yypact[*yyps] + YYERRCODE; + if( yyn >= 0 && yyn < YYLAST + && yychk[yyact[yyn]] == YYERRCODE ) + break; /* found a state where "error" is valid */ + # ifdef YYDEBUG + if( yydebug ) printf( "error recovery pops state %d, uncovers %d\n", + *yyps, yyps[-1] ); + # endif + + --yyps; /* pop stack */ + --yypv; + } + yystate = yyact[yyn]; /* simulate a shift of "error" */ + continue; /* go stack the error state */ + + case 3: /* no shift yet; clobber input char */ + + # ifdef YYDEBUG + if( yydebug ) printf( "error recovery discards char %d\n", yychar ); + # endif + + if( yychar == 0 ) + return(1); /* don't discard EOF, abort */ + yychar = -1; + /* try again in the same state */ + yystate = *yyps--; + yyval = *yypv--; + continue; /* go push the state we just popped */ + } /* end switch ( yyerrflag ) */ + } /* end if ( yyn == 0 ) */ + + /* reduction by production yyn */ + + yym = yyn; /* save yyn for the case operand below */ + + /* pop off the states and values for righthand side of rule */ + yyj = yyr2[yyn]; + yyps -= yyj; + yypvt = yypv; /* for semantics: point to values for right-hand-side */ + yypv -= yyj; + yyval = yypv[1]; /* default value is first non-terminal on the right */ + + /* consult goto table to find next state */ + yyn = yyr1[yyn]; + yyj = yypgo[yyn] + *yyps + 1; + if( yyj >= YYLAST || yychk[ yystate = yyact[yyj] ] != -yyn ) + yystate = yyact[yypgo[yyn]]; + /* yystate is set here. yyval will be set in semantics routines */ + + # ifdef YYDEBUG + if( yydebug ) printf("reduce by production %d new state is %d\n",yym, yystate); + # endif + + switch ( yym ) { + + /* semantics rules follow */ + + case 1: + # line 97 "nesscomp.z" + { /* this code creates the function for the initialization */ + boolean junk; + curNess->InitFunc = nesssym_NLocate("init*", + lexdef_GetPrototype(curLex->def), + lex_GetScope(curLex), &junk); + curNess->InitFunc->flags = flag_function | flag_ness; + curNess->InitFunc->type = Tfunc; + curNess->InitFunc->parent.ness = curNess; + startfunc(curNess->InitFunc); + nesssym_NGetINode(curNess->InitFunc, funcnode)->functype + = Tvoid; + genSaveFuncState(); + } break; + case 2: + # line 111 "nesscomp.z" + { /* this code terminates the function for the initialization */ + genRestoreFuncState(curNess->InitFunc); + finishfunc(curNess->InitFunc, NULL); + } break; + case 5: + # line 129 "nesscomp.z" + { yyval.i = Tstr; genSaveStmtStart(0); } break; + case 6: + # line 131 "nesscomp.z" + { yyval.i = Tbool; genSaveStmtStart(0); } break; + case 7: + # line 133 "nesscomp.z" + { yyval.i = Tlong; genSaveStmtStart(0); } break; + case 8: + # line 135 "nesscomp.z" + { yyval.i = Tdbl; genSaveStmtStart(0); } break; + case 9: + # line 137 "nesscomp.z" + { yyval.i = Tptr; genSaveStmtStart(0); } break; + case 10: + # line 143 "nesscomp.z" + { yyval.i = Tstr; } break; + case 11: + # line 145 "nesscomp.z" + { yyval.i = Tvoid; } break; + case 23: + # line 172 "nesscomp.z" + { if (isFuncStart(yypvt[-0].s, TRUE, 2)) { + abortfunc(); + errsynch(0, &yychar, &yyerrflag); + } else YYERROR; } break; + case 24: + # line 178 "nesscomp.z" + { if (isFuncStart(yypvt[-0].s, TRUE, 2)) { + /* XXX ought to close existing EXTEND, if any */ + abortfunc(); + errsynch(0, &yychar, &yyerrflag); + } else YYERROR; } break; + case 25: + # line 185 "nesscomp.z" + { if (isFuncStart(yypvt[-0].i, FALSE, 3)) { + abortfunc(); + errsynch(0, &yychar, &yyerrflag); + } else YYERROR; } break; + case 26: + # line 191 "nesscomp.z" + { struct sym *tok, *curtok; + /* if this is part ot /return void/ we remain in error state; + otherwise, it may be a global declaration + which would signal the end of error state */ + lex_Repeat(-1); lex_NextToken(&tok); lex_NextToken(&curtok); + if (strcmp(sym_GetName(tok), "return") == 0) YYERROR; + if (isFuncStart(yypvt[-0].s, FALSE, 3)) { + abortfunc(); + errsynch(0, &yychar, &yyerrflag); + } else YYERROR; } break; + case 27: + # line 204 "nesscomp.z" + { /* XXX should we open an EXTEND, if none ??? */ + /* we accept the ON only if it is the first item on its line */ + if (lex_RecentIndent(-1) < 999) { + abortfunc(); + errsynch(-1, &yychar, &yyerrflag); + } else YYERROR; } break; + case 29: + # line 215 "nesscomp.z" + { struct nesssym *id, *nid; + yypvt[-1].s->next = yypvt[-0].s; + ProcessIdList(yypvt[-1].s->type, yypvt[-1].s, flag_var | flag_globalvar); + for (id = yypvt[-1].s; id != NULL; id = nid) { + nid = id->next; /* genLinkGlobal changes the link */ + genLinkGlobal(id); + nesssym_NSetInfo(id, TSysMarkRef, makeGlobal()); + /* XXX makeGlobal() may not be right + for all types */ + }} break; + case 30: + # line 228 "nesscomp.z" + { yypvt[-1].s->flags = flag_var | flag_globalvar; + genLinkGlobal(yypvt[-1].s); + nesssym_NSetInfo(yypvt[-1].s, TSysMarkRef, makeGlobal()); + /* XXX makeGlobal() may not be right + for all types */ + yyval.varnode = genvarnode(yypvt[-1].s); + genSaveStmtStart(-2); + genRestoreFuncState(curNess->InitFunc); + predpush(FALSE, yyval.varnode->loc+yyval.varnode->len, 'X'); } break; + case 31: + # line 238 "nesscomp.z" + { predvalue(&yypvt[-0].exprnode->type); predpop(); + demandnodetype(yypvt[-0].exprnode, ((yypvt[-1].varnode)->sym)->type); + exprnode_Destroy(yypvt[-0].exprnode); + genvarstore(yypvt[-1].varnode); + genSaveFuncState(); } break; + case 32: + # line 247 "nesscomp.z" + { long len; + if (yypvt[-0].s->flags == (flag_function | flag_forward)) { + /* we are defining a function that was forward referenced + discard the pointer to the callnode + (the object code still refers to it) */ + yypvt[-0].s->flags = flag_function | flag_ness; + nesssym_NSetINode(yypvt[-0].s, funcnode, NULL); + yyval.s = yypvt[-0].s; + } + else yyval.s = uniqueinscope(yypvt[-0].s, flag_function | flag_ness, 0); + yyval.s->type = Tfunc; + if (curNess->CurrentObject == NULL) + yyval.s->parent.ness = curNess; + else { + yyval.s->parent.nesssym = curNess->CurrentObject; + yyval.s->flags |= flag_xfunc; + } + genSaveStmtStart(-1); + predpush(predcond, lex_RecentPosition(-2, &len), 'L'); + startfunc(yyval.s); + nesssym_NGetINode(yyval.s, funcnode)->functype + = yypvt[-2].i; } break; + case 33: + # line 270 "nesscomp.z" + { yyval.varnode = varnode_Create(lex_RecentPosition(0,0), + 0, yypvt[-1].s, (struct toksym *)yypvt[-0].s); } break; + case 34: + # line 274 "nesscomp.z" + { parencheck(yypvt[-2].varnode, yypvt[-0].s); + yyval.s = yypvt[-2].varnode->sym; + varnode_Destroy(yypvt[-2].varnode); + nesssym_NGetINode(yyval.s, funcnode)->parmlist + = yypvt[-1].s; } break; + case 35: + # line 280 "nesscomp.z" + { predpop(); finishfunc(yypvt[-1].s, yypvt[-0].s); } break; + case 36: + # line 284 "nesscomp.z" + { long len; + genSaveStmtStart(-1); + predpush(predcond, lex_RecentPosition(-1, &len), 'E'); + yyval.s = neventStartExtend(curNess->CurrentObject, yypvt[-0].s); + /* link this extend so codeloc entries from ON xxx + are attached to the Ness */ + genLinkGlobal(yyval.s); + curNess->saveAttrDest = curNess->AttrDest; + curNess->AttrDest = &(nesssym_NGetINode(yyval.s, objnode)->attrs); + curNess->CurrentObject = yyval.s; + curNess->CurrentObject->parent.ness = curNess; } break; + case 37: + # line 298 "nesscomp.z" + { genCheckEndtag(yypvt[-0].s, EXTEND); + neventFinishExtend(yypvt[-3].s); predpop(); + curNess->AttrDest = curNess->saveAttrDest; + curNess->CurrentObject = NULL; } break; + case 38: + # line 306 "nesscomp.z" + { long len; + genSaveStmtStart(-2); + predpush(predcond, lex_RecentPosition(-1, &len), 'V'); + yyval.s = neventStartEvent(curNess->CurrentObject, yypvt[-1].s, yypvt[-0].s); } break; + case 39: + # line 313 "nesscomp.z" + { genCheckEndtag(yypvt[-0].s, ON); + yypvt[-3].s = neventFinishEvent(yypvt[-3].s, yypvt[-2].s, yypvt[-0].s); predpop(); + yypvt[-3].s->parent.nesssym = curNess->CurrentObject; } break; + case 40: + # line 321 "nesscomp.z" + { yyval.s = NULL; } break; + case 42: + # line 330 "nesscomp.z" + { yyval.s = uniqueinscope(yypvt[-0].s, flag_var | flag_parmvar, 0); + yyval.s->type = yypvt[-1].i; } break; + case 43: + # line 337 "nesscomp.z" + { yyval.s = uniqueinscope(yypvt[-0].s, flag_var | flag_parmvar, 0); + yyval.s->type = yypvt[-1].i; + yyval.s->next = yypvt[-3].s; } break; + case 44: + # line 346 "nesscomp.z" + { genCheckEndtag(yypvt[-0].s, FUNCTION); yyval.s = yypvt[-2].s; } break; + case 45: + # line 356 "nesscomp.z" + { yyval.s = NULL; } break; + case 46: + # line 359 "nesscomp.z" + { genSaveStmtStart(0); + yyval.s = yypvt[-0].s; } break; + case 47: + # line 362 "nesscomp.z" + { yyval.s = appendlists(yypvt[-1].s, yypvt[-0].s); } break; + case 48: + # line 368 "nesscomp.z" + { yyval.s = NULL; } break; + case 49: + # line 372 "nesscomp.z" + { yyval.varnode = varIsStorable(yypvt[-1].varnode); + predpush(FALSE, yyval.varnode->loc+yyval.varnode->len, 'X'); } break; + case 50: + # line 375 "nesscomp.z" + { predvalue(&yypvt[-0].exprnode->type); predpop(); + demandnodetype(yypvt[-0].exprnode, yypvt[-1].varnode->sym->type); + exprnode_Destroy(yypvt[-0].exprnode); + genvarstore(yypvt[-1].varnode); yyval.s = NULL; } break; + case 51: + # line 382 "nesscomp.z" + { yyval.varnode = varIsStorable(yypvt[-1].varnode); + demandsymboltype(yypvt[-1].varnode->sym, Tstr); + predpush(predcond, yypvt[-1].varnode->loc, 'X'); /* save loc for runtime error */ + genvarref(yypvt[-1].varnode->sym); + predpop(); } break; + case 52: + # line 388 "nesscomp.z" + { demandnodetype(yypvt[-0].exprnode, Tstr); + if (curNess->accesslevel >= ness_codeYellow) + genop('A'); /* APPEND */ + else { + long loc, len; + loc = yypvt[-1].varnode->loc + yypvt[-1].varnode->len; + len = yypvt[-0].exprnode->loc - loc; + SaveError(":Text append may modify a file", loc, len); + genop('y'); /* pop, leave unchanged original */ + } + exprnode_Destroy(yypvt[-0].exprnode); + genvarstore(yypvt[-1].varnode); + yyval.s = NULL; } break; + case 53: + # line 404 "nesscomp.z" + { yyval.s = yypvt[-1].s; yyval.s->next = yypvt[-0].s; + ProcessIdList(yyval.s->type, yyval.s, flag_var | flag_localvar); } break; + case 54: + # line 409 "nesscomp.z" + { yyval.varnode = genvarnode(yypvt[-1].s); + ProcessIdList(yypvt[-1].s->type, yyval.varnode->sym, + flag_var | flag_localvar); + varIsStorable(yyval.varnode); + predpush(FALSE, yyval.varnode->loc+yyval.varnode->len, 'X'); } break; + case 55: + # line 415 "nesscomp.z" + { predvalue(&yypvt[-0].exprnode->type); predpop(); + demandnodetype(yypvt[-0].exprnode, yypvt[-1].varnode->sym->type); + exprnode_Destroy(yypvt[-0].exprnode); + yyval.s = yypvt[-1].varnode->sym; /* access before destroy varnode */ + genvarstore(yypvt[-1].varnode); } break; + case 56: + # line 422 "nesscomp.z" + { if (yypvt[-0].exprnode->type != Tvoid) + genop('y'); /* POP - discardvalue */ + exprnode_Destroy(yypvt[-0].exprnode); + yyval.s = NULL; } break; + case 57: + # line 428 "nesscomp.z" + { long loc, len; loc = lex_RecentPosition(0, &len); + predpush(FALSE, loc + len, 'X'); } break; + case 58: + # line 431 "nesscomp.z" + { predvalue(&(yypvt[-0].exprnode->type)); predpop(); + genreturn(TRUE); + exprnode_Destroy(yypvt[-0].exprnode); + yyval.s = NULL; } break; + case 59: + # line 438 "nesscomp.z" + { genreturn(FALSE); yyval.s = NULL; } break; + case 60: + # line 442 "nesscomp.z" + { genreturn(FALSE); yyval.s = NULL; } break; + case 61: + # line 447 "nesscomp.z" + { genreturn(FALSE); yyval.s = NULL; } break; + case 62: + # line 450 "nesscomp.z" + { long loc, len; loc = lex_RecentPosition(0, &len); + yyval.predstatenode = predpush(FALSE, loc + len, 'W'); } break; + case 63: + # line 453 "nesscomp.z" + { predbranch(yypvt[-0].exprnode); predfixdropthru(); + exprnode_Destroy(yypvt[-0].exprnode); + yyval.predstatenode = yypvt[-1].predstatenode; } break; + case 64: + # line 460 "nesscomp.z" + { genCheckEndtag(yypvt[-0].s, WHILE); + genbranch('g', yypvt[-4].predstatenode->objloc); + predfixtarget(); predpop(); + yyval.s = yypvt[-2].s; } break; + case 65: + # line 467 "nesscomp.z" + { predexit('W'); yyval.s = NULL; } break; + case 66: + # line 470 "nesscomp.z" + { long loc, len; loc = lex_RecentPosition(0, &len); + predpush(FALSE, loc + len, 'I'); } break; + case 67: + # line 474 "nesscomp.z" + { predbranch(yypvt[-1].exprnode); predfixdropthru(); + exprnode_Destroy(yypvt[-1].exprnode); } break; + case 68: + # line 480 "nesscomp.z" + { genCheckEndtag(yypvt[-0].s, IF); + predpop(); yyval.s = appendlists(yypvt[-3].s, yypvt[-2].s); } break; + case 69: + # line 488 "nesscomp.z" + { yyval.s = uniqueinscope(yypvt[-0].s, flag_var, 0); + yyval.s->type = yypvt[-1].i; } break; + case 70: + # line 495 "nesscomp.z" + { yyval.s =NULL; } break; + case 71: + # line 499 "nesscomp.z" + { yyval.s = appendlists(yypvt[-2].s, uniqueinscope(yypvt[-0].s, flag_var, 0)); } break; + case 72: + # line 506 "nesscomp.z" + { predfixtarget(); yyval.s = NULL; } break; + case 73: + # line 509 "nesscomp.z" + { yyval.i = genbranch('g', 0); predfixtarget(); } break; + case 74: + # line 511 "nesscomp.z" + { fixbranch(yypvt[-1].i); yyval.s = yypvt[-0].s; } break; + case 75: + # line 514 "nesscomp.z" + { long loc, len; int fixloc = genbranch('g', 0); + predfixtarget(); + loc = lex_RecentPosition(0, &len); + yyval.predstatenode = predpush(FALSE, loc + len, 'I'); + yyval.predstatenode->fixuploc = fixloc; } break; + case 76: + # line 521 "nesscomp.z" + { predbranch(yypvt[-1].exprnode); predfixdropthru(); + exprnode_Destroy(yypvt[-1].exprnode); } break; + case 77: + # line 525 "nesscomp.z" + { fixbranch(yypvt[-5].predstatenode->fixuploc); + predpop(); yyval.s = appendlists(yypvt[-1].s, yypvt[-0].s); } break; + case 78: + # line 533 "nesscomp.z" + { yyval.i = predEQ; } break; + case 79: + # line 535 "nesscomp.z" + { yyval.i = predLT; } break; + case 80: + # line 537 "nesscomp.z" + { yyval.i = predGT; } break; + case 81: + # line 539 "nesscomp.z" + { yyval.i = predNE; } break; + case 82: + # line 541 "nesscomp.z" + { yyval.i = predLE; } break; + case 83: + # line 543 "nesscomp.z" + { yyval.i = predGE; } break; + case 85: + # line 559 "nesscomp.z" + { yyval.i = lex_RecentPosition(0, 0); + predcond = ! predcond; } break; + case 86: + # line 562 "nesscomp.z" + { predbranch(yypvt[-0].exprnode); predcond = ! predcond; + yyval.exprnode = yypvt[-0].exprnode; yyval.exprnode->type = Tbra; + yyval.exprnode->len += yyval.exprnode->loc - yypvt[-1].i; + yyval.exprnode->loc = yypvt[-1].i; } break; + case 87: + # line 569 "nesscomp.z" + { long loc, len; + predbranch(yypvt[-1].exprnode); preddropthru(predOR); + if (predcond == FALSE) predfixtarget(); + else predfixdropthru(); + yyval.exprnode = yypvt[-1].exprnode; + loc = lex_RecentPosition (0, &len); + predpush(predcond, loc + len, 'X'); } break; + case 88: + # line 577 "nesscomp.z" + { predbranch(yypvt[-0].exprnode); + predfixdropthru(); predpop(); + yyval.exprnode = exprnode_Combine(yypvt[-1].exprnode, yypvt[-0].exprnode, Tbra); } break; + case 89: + # line 583 "nesscomp.z" + { predbranch(yypvt[-1].exprnode); preddropthru(predAND); + if (predcond == TRUE) predfixtarget(); + yyval.exprnode = yypvt[-1].exprnode; } break; + case 90: + # line 587 "nesscomp.z" + { predbranch(yypvt[-0].exprnode); + yyval.exprnode = exprnode_Combine(yypvt[-1].exprnode, yypvt[-0].exprnode, Tbra); } break; + case 92: + # line 599 "nesscomp.z" + { gencomp(yypvt[-2].exprnode, yypvt[-0].exprnode); + predtarget (yypvt[-1].i); + yyval.exprnode = exprnode_Combine(yypvt[-2].exprnode, yypvt[-0].exprnode, Tbra); } break; + case 94: + # line 609 "nesscomp.z" + { yyval.exprnode = genarith('+', yypvt[-2].exprnode, yypvt[-0].exprnode); } break; + case 95: + # line 612 "nesscomp.z" + { yyval.exprnode = genarith('-', yypvt[-2].exprnode, yypvt[-0].exprnode); } break; + case 97: + # line 620 "nesscomp.z" + { yyval.exprnode = genarith('*', yypvt[-2].exprnode, yypvt[-0].exprnode); } break; + case 98: + # line 623 "nesscomp.z" + { yyval.exprnode = genarith('/', yypvt[-2].exprnode, yypvt[-0].exprnode); } break; + case 99: + # line 626 "nesscomp.z" + { yyval.exprnode = genarith('%', yypvt[-2].exprnode, yypvt[-0].exprnode); } break; + case 100: + # line 632 "nesscomp.z" + { yyval.exprnode = exprnode_Create(yypvt[-0].varnode->sym->type, NULL, FALSE, + yypvt[-0].varnode->loc, yypvt[-0].varnode->len); + predpush(predcond, yypvt[-0].varnode->loc, 'X'); /* save loc for runtime error */ + if (yypvt[-0].varnode->sym->flags & flag_const) + genconstref(yypvt[-0].varnode->sym); + else + genvarref(yypvt[-0].varnode->sym); + predpop(); + varnode_Destroy(yypvt[-0].varnode); } break; + case 101: + # line 643 "nesscomp.z" + { yyval.i = lex_RecentPosition(0, 0); } break; + case 102: + # line 645 "nesscomp.z" + { if (yypvt[-0].exprnode->type == Tdbl) {genop('H'); genop('_');} + else {demandnodetype(yypvt[-0].exprnode, Tlong); genop('_');} + yyval.exprnode = yypvt[-0].exprnode; yyval.exprnode->len += yyval.exprnode->loc - yypvt[-1].i; + yyval.exprnode->loc = yypvt[-1].i; } break; + case 103: + # line 651 "nesscomp.z" + { yyval.i = lex_RecentPosition(0, 0); } break; + case 104: + # line 653 "nesscomp.z" + { yyval.exprnode = yypvt[-0].exprnode; yyval.exprnode->len += yyval.exprnode->loc - yypvt[-1].i; + yyval.exprnode->loc = yypvt[-1].i; } break; + case 105: + # line 657 "nesscomp.z" + { if (yypvt[-0].exprnode->type == Tvoid) { + genop('0'); + yypvt[-0].exprnode->type = Tlong; + } + yyval.exprnode = yypvt[-0].exprnode; } break; + case 106: + # line 664 "nesscomp.z" + { long loc, len; + loc = lex_RecentPosition(0, &len); + yyval.exprnode = exprnode_Create(Tbool, NULL, FALSE, loc, len); + genop('1'); } break; + case 107: + # line 670 "nesscomp.z" + { long loc, len; + loc = lex_RecentPosition(0, &len); + yyval.exprnode = exprnode_Create(Tbool, NULL, FALSE, loc, len); + genop('9'); } break; + case 108: + # line 676 "nesscomp.z" + { long loc, len; + loc = lex_RecentPosition(0, &len); + yyval.exprnode = exprnode_Create(Tptr, NULL, FALSE, loc, len); + genop('^'); } break; + case 109: + # line 683 "nesscomp.z" + { demandnodetype(yypvt[-1].exprnode, Tstr); + if ( ! yypvt[-1].exprnode->IsCat) { + genop('q'); /* NEWBASE */ + genop('z'); /* SWAP */ + genop('r'); /* REPLACE */ + } + yyval.exprnode = yypvt[-1].exprnode; } break; + case 110: + # line 691 "nesscomp.z" + { demandnodetype(yypvt[-0].exprnode, Tstr); + genop('A'); /* append */ + yyval.exprnode = exprnode_Combine(yypvt[-1].exprnode, yypvt[-0].exprnode, Tstr); + yyval.exprnode->IsCat = TRUE; } break; + case 111: + # line 697 "nesscomp.z" + { long loc, len; + loc = lex_RecentPosition(0, &len); + yyval.varnode = varnode_Create(loc, 0, NULL, (struct toksym *)yypvt[-0].s); + predpush(predcond, loc + len, 'X'); } break; + case 112: + # line 703 "nesscomp.z" + { long loc, len; + parencheck(yypvt[-2].varnode, yypvt[-0].s); + loc = lex_RecentPosition(0, &len); + predfixdropthru(); predpop(); + yypvt[-1].exprnode->len = loc+len - yypvt[-2].varnode->loc; + yypvt[-1].exprnode->loc = yypvt[-2].varnode->loc; yyval.exprnode = yypvt[-1].exprnode; + varnode_Destroy(yypvt[-2].varnode); } break; + case 113: + # line 716 "nesscomp.z" + { yyval.varnode = yypvt[-0].varnode; } break; + case 114: + # line 719 "nesscomp.z" + { yyval.varnode = yypvt[-0].varnode; } break; + case 115: + # line 726 "nesscomp.z" + { yyval.varnode = varIsFunction(yypvt[-1].varnode); + yyval.varnode->paren = (struct toksym *)yypvt[-0].s; + predpush(predcond, yyval.varnode->loc, 'A'); } break; + case 116: + # line 731 "nesscomp.z" + { parencheck(yypvt[-2].varnode , yypvt[-0].s); + yyval.exprnode = callFunc(yypvt[-2].varnode, yypvt[-1].exprnode); + predpop(); } break; + case 117: + # line 739 "nesscomp.z" + { yyval.exprnode = yypvt[-0].exprnode; } break; + case 118: + # line 742 "nesscomp.z" + { yyval.exprnode = NULL; } break; + case 119: + # line 749 "nesscomp.z" + { long loc, len; loc = lex_RecentPosition(0, &len); + predpush(FALSE, loc + len, 'A'); } break; + case 120: + # line 752 "nesscomp.z" + { predvalue(&yypvt[-0].exprnode->type); predpop(); + yyval.exprnode = yypvt[-0].exprnode; } break; + case 121: + # line 757 "nesscomp.z" + { long loc, len; loc = lex_RecentPosition(0, &len); + predpush(FALSE, loc + len, 'A'); } break; + case 122: + # line 760 "nesscomp.z" + { predvalue(&yypvt[-0].exprnode->type); predpop(); + yyval.exprnode = yypvt[-0].exprnode; yypvt[-0].exprnode->next = yypvt[-3].exprnode; } break; + case 123: + # line 769 "nesscomp.z" + { yyval.varnode = genvarnode(yypvt[-0].s); } break; + case 124: + # line 775 "nesscomp.z" + { /* there are 4 cases: EmptyStringToken, short string, + styled short string, and long string. + The EmptyStringToken has name '"'. + A short string has a name beginning with " and + continuing with the \ reduced value of the string. + A styled short string has the name ~ddd and + a long string has a name /ddd, where + ddd is an integer. */ + long loc, len; + loc = lex_RecentPosition(0, &len); + if ( ! (yypvt[-0].s->flags & flag_const)) + /* need to allocate new const */ + nesssym_NSetInfo(yypvt[-0].s, TSysMarkRef, + makeStyledConst(curNess, /*the text*/ + yypvt[-0].s->header.toksym.loc, + yypvt[-0].s->header.toksym.len, + (*nesssym_NGetName(yypvt[-0].s) == '"' + || *nesssym_NGetName(yypvt[-0].s) == '~') + )); + yypvt[-0].s->type = Tstr; yypvt[-0].s->flags = flag_const; + yyval.varnode = varnode_Create(loc, len, yypvt[-0].s, NULL); } break; + case 125: + # line 798 "nesscomp.z" + { long loc, len; + if ( ! (yypvt[-0].s->flags & flag_const)) { + /* need to allocate new const */ + TSysMarkRef g = makeGlobal(); + struct longstkelt *l; + l = (struct longstkelt *)(&SysMarkLowEnd[g]); + l->hdr = longHdr; + l->v = nesssym_NGetInfo(yypvt[-0].s, long); + nesssym_NSetInfo(yypvt[-0].s, TSysMarkRef, g); + yypvt[-0].s->type = Tlong; yypvt[-0].s->flags = flag_const; + } + loc = lex_RecentPosition(0, &len); + yyval.varnode = varnode_Create(loc, len, yypvt[-0].s, NULL); } break; + case 126: + # line 812 "nesscomp.z" + { long loc, len; + if ( ! (yypvt[-0].s->flags & flag_const)) { + /* need to allocate new const */ + double *dp; + TSysMarkRef g = makeGlobal(); + struct dblstkelt *d; + d = (struct dblstkelt *)(&SysMarkLowEnd[g]); + d->hdr = dblHdr; + dp = nesssym_NGetInfo(yypvt[-0].s, double *); + d->v = *dp; + nesssym_NSetInfo(yypvt[-0].s, TSysMarkRef, g); + yypvt[-0].s->type = Tdbl; yypvt[-0].s->flags = flag_const; + } + loc = lex_RecentPosition(0, &len); + yyval.varnode = varnode_Create(loc, len, yypvt[-0].s, NULL); } break; + # line 226 "yaccpar" + /* semantics rules precede */ + + } /* end of switch( yym ) */ + + } /* end while(1) main loop */ + + } /* end of Ness version of yaccpar */ *** atk/ness/objects/y.tab.h Tue Nov 20 14:35:41 1990 --- atk/ness/objects/y.tab.h.NEW Thu Nov 1 14:44:21 1990 *************** *** 0 **** --- 1,41 ---- + # define OR 257 + # define AND 258 + # define NOT 259 + # define NE 260 + # define GE 261 + # define LE 262 + # define UNARYOP 263 + # define setID 264 + # define setSTRINGCON 265 + # define setINTCON 266 + # define setREALCON 267 + # define MARKER 268 + # define BOOLEAN 269 + # define INTEGER 270 + # define REAL 271 + # define OBJECT 272 + # define VOID 273 + # define FUNCTION 274 + # define END 275 + # define ON 276 + # define EXTEND 277 + # define FORWARD 278 + # define MOUSE 279 + # define MENU 280 + # define KEYS 281 + # define EVENT 282 + # define RETURN 283 + # define WHILE 284 + # define DO 285 + # define IF 286 + # define THEN 287 + # define ELSE 288 + # define ELIF 289 + # define EXIT 290 + # define GOTOELSE 291 + # define tokTRUE 292 + # define tokFALSE 293 + # define tokNULL 294 + # define COLONEQUAL 295 + # define APPEND 296 + # define ZZLASTTOKEN 297 *** atk/ness/objects/changes.sept.90 Tue Nov 20 14:35:52 1990 --- atk/ness/objects/changes.sept.90.NEW Mon Oct 1 16:08:11 1990 *************** *** 0 **** --- 1,129 ---- + The following changes to ness were released in September 1990. + + A. Changes Visible to Users + + 1. Change CURRENTMODIFICATIONLEVEL to 4. Nessrun will now display the version number "1.4". (ness.ch) + + 2. Added the function + launchApplication(marker, title, programname, enablecommands) + As described in nessfunc.doc, this function allows a program started with + nessrun to open a window and display an application in it. Event + interceptions specified in the progam will be honored during interaction. + (nevent.c, call.c, nessfunc.d, nessauth.d, nessman.d) + + 3. Implemented the event "becameVisible", which (after celv.c is fixed) will + enable an application started with launchApplication to initialize views + as they are displayed. (nevent.c) + + 4. If Ness loops for more than 7 seconds, a message is displayed mentioning control-G. (interp.c) + + 5. TellUser() now calls im_ForceUpdate so that messages are immediately + displayed to the user. (nevent.c) + + + B. Documentation Modifications + + The modified files are all in atk/ness/doc and get installed in + ${ANDREWDIR}/doc/atk/ness. + + 1. Removed subsection 5.2 on framecommands for launching applications and + renumbered subsections. (nessfunc.d) + + 2. Added description of the play module for playing notes on the RT. + (nessfunc.d) + + 3. Added documentation of date.n. (nessfunc.d) + + 4. Described the -f switch. (nessuser.d) + + 5. Added descriptions of concatenation, seaarch, and replace. (nesstut.d) + + 6. Added happybday.d. (nesstut.d) + + 7. Added description of $Ness 1. (nessman.d) + + + C. Demonstration Software Modifications + + The sources for these demos are in atk/ness/demos and get installed in + ${ANDREWDIR}/lib/ness/demos. + + 1. Added a new demo for launchApplication. It is started with the command + nessrun -f /usr/andrew/lib/ness/demos/happybday.n + (happybday.n) + + 2. Extended function main so when executed it clears the text of + Jingle Bells. (xmas.d) + + 3. An old demo which shows how ness can do shell functions was converted to + the new search conventions. (badsub.n) + + 4. The bank letter demo was given an entirely new screen image and the code + was updated by removing semi-colons and putting commas in declarations. + (bank.d) + + + D. Improved Error Processing + + 1. Installed tests of the return values from im_create and frame_New + so memory exhaustion or other frame creation failure will not crash ness. (ness.c) + + 2. Repaired library processing so core will no longer be dumped if a Ness + program calls a function like rest_X() where rest is an internal function + and there is no library named rest. (call.c) + + 3. Produce a reasonable error message for recursive compilation. (ness.c) + + 4. If an error is detected during execution, the stack is--as always--popped. + In some circumstances this popping could cause a core dump, so setjmp is now + used to detect and handle such errors. (interp.c) + + 5. The stack pointer NSP is stored after every push or pop so + there is less likelihood of an error while popping the stack. + (interp.c, real.c, search.c, call.c nevent.c) + + 6. The instruction location is saved on every cycle so the location of errors + can be reported precisely when there are BUS or SEGV faults. (interp.c) + + + E. Bugs Corrected + + 1. Fixed value_SetString and value_SetArrayElt so they do not crash when + their first argument is NULL. (nevent.c) + + 2. When a Ness object value is passed to a C function, an effort is made to + find the correct object type as required by the function. For instance, if + the Ness object is a scroll and the function requires a textview, the child of + the scroll is checked to see if it is a textview. The set of such container + objects has now been extended to include frame and buffer. (nevent.c) + + 3. There was a bug wherein a local symbol referenced immediately after its + declaration was treated as a global symbol. The grammar has now been + rearranged to treat the symbol correctly. (nesscomp.gra) + + + F. Internal Improvements + + (These changes will only be visible to users as faster execution or improved + maintainability.) + + 1. Added the CLASS macro to text a value to see if it is of a given class. + (envt.h) + + 2. Decreased startup time by removing global variables and initializations + of arbiterviewClass, matteClass, and scrollClass (interp.c) + + 3. Use CLASS for references to arbiterviewClass, matteClass, and scrollClass + since these are no longer global. (nevent.c) + + 4. The routine ProperPtr which checks to see if a container object has the + desired contents was simplified and regularized so it handles more containers + and is easier to extend. (nevent.c) + + 5. BUG 1334 was corrected by saving the error message in a global variable instead of passing it as a return value through longjmp. (interp.c) + + 6. Removed some XXX comments which suggested problems that no longer exist. + (interp.c, nevent.c) + + + *** atk/ness/objects/changes.Oct.90 Tue Nov 20 14:36:07 1990 --- atk/ness/objects/changes.Oct.90.NEW Mon Oct 29 10:56:13 1990 *************** *** 0 **** --- 1,78 ---- + \begindata{text,269108352} + \textdsversion{12} + \template{default} + + + + \bold{Changes to Ness released October 12, 1990} + + + These changes correspond to Ness version 1.5. (ness.ch) File names in + parentheses indicate files changed to affect the change. + + + Note to maintainers: With this revision two files are no longer part of the + distribution and should be explicitly deleted: ness/objects/yypshpop.c and + ness/objects/nesscomp.h. + + + \heading{New feature} + + + Added functions regSearch and regSearchReverse to do regular expression + pattern matching in both directions. The search algorithms are the same as + those used for the search commands in ez. (search.c, ../doc/nessfunc.d) + + + \heading{Improvements} + + + Revised the implementation of search() to be much faster, based on the + simplest of Daniel Sunday's algorithms in the August 1990 CACM. (search.c) + + + \heading{Bugs corrected} + + + Added a NotifyObservers call in value_SetArrayElt(). Now when the latter is + called the clicklistV--or other observer of the value--will display the + modified string. (nevent.c) + + + Fixed a syntax error in calc.d. + + + \heading{Machine independence} + + + Revised the getc/ungetc code in ness__ReadNamedFile to try to make it work on + PMAX and Sun4. (ness.c) + + + Eliminated the dependency on the local version of Yacc. Previously + recursively compilation required a messy routine to save the state of the + compilation as retained in yaccpar, which was automatically inserted in the + code by yacc. Since diferent platforms have different yaccpars, the state was + not saved correctly on some systems. Two steps were taken to correct the + problem. First, nesscomp.c is distributed as well as nesscomp.gra so Ness can + be recompiled without running yacc. Second a special version of yaccpar was + written which has no global variables so no state needs to be preserved. (The + new version also has no goto's!) (nesscomp.gra, nesscomp.c, call.c, dump.c, + gen.c, error.c, ness.c, gen.hn, Imakefile, tokens/yaccpar, tokens/buildy.c, + tokens/reyacc.c, tokens/Imakefile, \bold{NOTE: yypshpop.c and nesscomp.h are + no longer part of Ness}) + + + Cosmetic code changes + + + Changed the implementation of the Ness function value_SetArraySize to use the + C function value_SetStrArrayAndSize, so changes to value.c will not adversely + affect Ness functions. (nevent.c) + + + Changed MapRunError so its argument is a ness instead of an errornode. This + was necessary as an indirect result of the elimination of the global + ErrorList. (error.c, error.h, call.c, nevent.c, ness.c) + + \enddata{text,269108352} *** atk/ness/nesslib/funchdr.n Wed Nov 22 12:22:43 1989 --- atk/ness/nesslib/funchdr.n.NEW Mon Oct 29 10:56:19 1990 *************** *** 1,59 **** -- funchdr.n ! -- Convert method declarations from a .ch file into a routine header -- ! -- Instructions: -- - Copy the method declarations from your .ch file into the .c file. -- - Select them and type ESC-ESC. -- - At the Ness: prompt type -- funchdr_cvt("") ! -- - replacing with the name of the class -- a .ch header has an initial indent of a tab and the form: -- functionNameTail ( type-1 arg-1 , ... ) returns type-r; -- /* comment*/ -- where the -returns type-r- is optional (-void- if omitted) ! -- type-i is one of -- unsigned char [*] char [*] long [*] unsigned long [*] -- struct xxx * boolean [*] real [*] - -- actually we take everything to the comma and assume the last word is the arg - -- The list of words is only used when trying to identify a functionNameTail ( ... -- corresponding output: -- /* comment -- */ -- type-r ! -- classname__functionNameTail(self, arg-1, arg-2, ...) ! -- struct classname *self; -- type-1 arg-1; -- . . . -- { -- } - -- The basic approach is to produce a converted version of the header - -- and replace the entire header with the converted value. ! -- any syntax error in the input is processed by inserting the string "ERROR" ! -- and quitting ! ! - marker CurTok; -- current token about to be processed - marker EndTok; -- end of text to search for decls - - marker Letters; -- the set which may start a word - marker IdChars; -- the set of characters that may appear in words - - marker LastName; -- side result from ParseAnArg - function init() Letters := "qwertyuiopasdfghjklzxcvbnm_" ! ~ "QWERTYUIOPASDFGHJKLZXCVBNM"; ! IdChars := Letters ~ "0123456789"; end function --- 1,73 ---- -- funchdr.n ! -- Convert declarations from a .ch file into routine headers -- ! -- Author: WJHansen ! ! -- HERE'S HOW ! ! -- To convert a few methods: -- - Copy the method declarations from your .ch file into the .c file. -- - Select them and type ESC-ESC. -- - At the Ness: prompt type -- funchdr_cvt("") ! -- - where is the name of the class + + -- To convert a few classprocedures: + -- - Copy the class procedure declarations from your .ch file into the .c file. + -- - Select them and type ESC-ESC. + -- - At the Ness: prompt type + -- funchdr_cvtclassprocs("") + -- - where is the name of the class + + + -- To convert an entire .ch file and append the result to the .c file: + -- give the command + -- nessrun /usr/andrew/lib/ness/funchdr.n .ch + + + + -- input and output syntax: -- a .ch header has an initial indent of a tab and the form: -- functionNameTail ( type-1 arg-1 , ... ) returns type-r; -- /* comment*/ -- where the -returns type-r- is optional (-void- if omitted) ! -- in order to locate functionNameTail, it is assumed that type-1 is one of -- unsigned char [*] char [*] long [*] unsigned long [*] -- struct xxx * boolean [*] real [*] -- corresponding output: -- /* comment -- */ -- type-r ! -- classname__functionNameTail(arg-0, arg-1, arg-2, ...) ! -- type-0 arg-0; -- type-1 arg-1; -- . . . -- { -- } + -- + -- where for methods and overrides type-0 arg-0 is + -- struct *self + -- and for classprocedures: + -- struct classhdr *ClassID ! marker CurTok -- current token about to be processed ! marker EndTok -- end of text to search for decls + marker Letters -- the set which may start a word + marker IdChars -- the set of characters that may appear in words + marker LastName -- side result from ParseAnArg function init() Letters := "qwertyuiopasdfghjklzxcvbnm_" ! ~ "QWERTYUIOPASDFGHJKLZXCVBNM" ! IdChars := Letters ~ "0123456789" end function *************** *** 63,190 **** -- set LastName to last word encountered -- function ParseAnArg() ! integer parencnt; ! marker thebeginning; ! parencnt := 0; ! thebeginning := CurTok; while CurTok /= "," and (CurTok /= ")" or parencnt > 0) do if CurTok = "(" then ! parencnt := parencnt + 1; elif CurTok = ")" then elif search(Letters, front(CurTok)) /= "" then ! LastName := CurTok; ! end if; ! CurTok := tokens_getC(CurTok); ! end while; ! return extent(thebeginning, start(CurTok)); end function ! function DoADecl(classname) ! marker funcname; ! marker functype; ! marker names; ! marker types; ! marker comment; ! marker m; ! funcname := CurTok; ! --printline("funcname: " ~ funcname); ! CurTok := tokens_getC(CurTok); -- get "(" ! names := newbase() ~ "self"; ! types := "\tstruct " ~ classname ~ " *self;\n"; ! CurTok := tokens_getC(CurTok); -- get ")" or first token of an arg while CurTok /= ")" do if CurTok = "," then -- advance to start of arg decl ! CurTok := tokens_getC(CurTok); ! end if; ! types ~:= "\t" ~ ParseAnArg() ~ ";\n"; ! names ~:= ", " ~ LastName; -- side result of ParseAnArg ! --printline(" arg name: " ~ LastName); ! end while; ! CurTok := tokens_getC(CurTok); -- get token after ")" -- CurTok is either ";" or "returns" if CurTok = "returns" then ! functype := newbase(); ! CurTok := tokens_getC(CurTok); -- get token after "returns" while CurTok /= ";" do ! functype ~:= CurTok; ! CurTok := tokens_getC(CurTok); end while else ! functype := "void"; ! end if; -- now CurTok is ";" ! CurTok := tokens_getC(CurTok); -- skip ";" -- and load trailing comment into tokens_PreSpace() ! comment := tokens_PreSpace(); ! m := search(comment, "/*"); ! if m = "" or extent(m, comment) = "" then ! -- there was no comment ! comment := "\t" ~ extent(finish(match(names, "self, ")), names) ~ " - \n"; ! m := search(comment, ", "); ! while m /= "" do ! replace (m, " - \n\t"); ! m := search(finish(m), ", "); ! end while; ! if functype /= "void" then ! comment ~:= "\tReturns: "; ! end if; else -- strip comment to the part between /* and */ ! comment := extent(next(m), comment); ! m := search(m, "*/"); ! if previous(m) = "\n" then ! m := previous(m); ! end if; ! comment := extent(comment, start(m)); ! end if; ! comment := "/* " ~ classname ~ "__" ~ funcname ~"(" ~ names ~ ")\n" ! ~ comment ~ "\n" ! ~ "*/\n"; return ! "\n" ~ comment ~ "\t" ~ functype ~ "\n" ~ classname ~ "__" ~ funcname ~ "(" ~ names ~ ")\n" ~ types ! ~ "{\n}\n"; ! end function; ! function funchdr_convertsection(s, classname) ! marker tok1 tok2; ! marker cvted; ! marker m; ! EndTok := finish(s); ! tok1 := tokens_getC(start(s)); -- get first token ! tok2 := tokens_getC(tok1); -- get second token if tok2 /= ":" then ! CurTok := tok1; else ! CurTok := tokens_getC(tok2); ! end if; ! cvted := newbase(); while CurTok /= "" and extent(CurTok, s) /= "" do ! cvted ~:= DoADecl(classname); ! end while; ! return cvted; ! end function; function funchdr_cvt(classname) ! marker s; ! s := currentselection(); ! replace (s, funchdr_convertsection(s, classname)); ! end function; -- SectionStart(t) -- finds the next section start after the end of text -- a section start is a colon preceded by one of the words --- 77,239 ---- -- set LastName to last word encountered -- function ParseAnArg() ! integer parencnt ! marker thebeginning ! parencnt := 0 ! thebeginning := CurTok while CurTok /= "," and (CurTok /= ")" or parencnt > 0) do if CurTok = "(" then ! parencnt := parencnt + 1 elif CurTok = ")" then elif search(Letters, front(CurTok)) /= "" then ! LastName := CurTok ! end if ! CurTok := tokens_getC(CurTok) ! if CurTok = "" then ! return(printline("ERROR: missing comma")) ! end if ! end while ! return extent(thebeginning, start(CurTok)) end function ! function DoADecl(classname, boolean classproc) ! marker funcname, functype, names, types, comment, m, t ! funcname := CurTok ! printline("funcname: " ~ funcname) ! CurTok := tokens_getC(CurTok) -- get "(" ! if classproc then ! names := copy("ClassID") ! types := copy("\tstruct classhdr *ClassID;\n") ! else ! names := copy("self") ! types := "\tstruct " ~ classname ~ " *self;\n" ! end if ! CurTok := tokens_getC(CurTok) -- get ")" or first token of an arg while CurTok /= ")" do + if CurTok = "" then + types ~:= printline("ERROR: missing right paren") + exit while + end if if CurTok = "," then -- advance to start of arg decl ! CurTok := tokens_getC(CurTok) ! end if ! types ~:= "\t" ~ ParseAnArg() ~ ";\n" ! names ~:= ", " ~ LastName -- side result of ParseAnArg ! -- printline(" arg name: " ~ LastName) ! end while ! CurTok := tokens_getC(CurTok) -- get token after ")" -- CurTok is either ";" or "returns" if CurTok = "returns" then ! functype := newbase() ! CurTok := tokens_getC(CurTok) -- get token after "returns" while CurTok /= ";" do ! functype ~:= CurTok ! CurTok := tokens_getC(CurTok) ! functype ~:= tokens_PreSpace() ! if CurTok = "" then ! functype ~:= printline("ERROR: missing semicolon") ! exit while ! end if end while else ! functype := "void" ! end if -- now CurTok is ";" ! CurTok := tokens_getC(CurTok) -- skip ";" -- and load trailing comment into tokens_PreSpace() ! comment := tokens_PreSpace() ! m := search(comment, "/*") ! if m = "" then ! -- there was no comment. Build one with room to describe args ! t := search(names, ",") ! if t /= "" then ! comment := "\t" ~ extent(finish(next(t)), names) ~ " - \n" ! m := search(comment, ", ") ! while m /= "" do ! replace (m, " - \n\t") ! m := search(finish(m), ", ") ! end while ! else comment := newbase() ! end if else + -- set t to space on line before "/*" + t := previous(m) + while t /= "" and t /= "\n" do + t := previous(t) + end while + t := extent(t, start(m)) + -- strip comment to the part between /* and */ ! -- strip trailing whitespace ! comment := extent(next(m), comment) ! m := search(comment, "*/") ! while search("\n\t ", previous(m)) /= "" do ! m := previous(m) ! end while ! comment := "\t" ~ extent(comment, start(m)) ~ "\n" + -- if "/*" is preceded by n tabs, strip n-1 tabs from front of each line + m := search(comment, t) + while m /= "" do + m := search( + extent(finish(replace (m, "\n\t")), comment), + t) + end while + + end if + if functype /= "void" and search(comment, "Returns") = "" then + comment ~:= "\tReturns: \n" + end if return ! "\n/* " ~ classname ~ "__" ~ funcname ~"(" ~ names ~ ")\n" ! ~ comment ! ~ "*/\n" ~ "\t" ~ functype ~ "\n" ~ classname ~ "__" ~ funcname ~ "(" ~ names ~ ")\n" ~ types ! ~ "{\n}\n" ! end function ! function funchdr_convertsection(s, classname, boolean classproc) ! marker tok1, tok2, cvted, m ! EndTok := finish(s) ! tok1 := tokens_getC(start(s)) -- get first token ! tok2 := tokens_getC(tok1) -- get second token if tok2 /= ":" then ! CurTok := tok1 else ! CurTok := tokens_getC(tok2) ! end if ! cvted := newbase() while CurTok /= "" and extent(CurTok, s) /= "" do ! cvted ~:= DoADecl(classname, classproc) ! end while ! return cvted ! end function function funchdr_cvt(classname) ! marker s ! s := currentselection() ! replace (s, funchdr_convertsection(s, classname, FALSE)) ! end function + function funchdr_cvtclassprocs(classname) + marker s + s := currentselection() + replace (s, funchdr_convertsection(s, classname, TRUE)) + end function + -- SectionStart(t) -- finds the next section start after the end of text -- a section start is a colon preceded by one of the words *************** *** 191,210 **** -- methods overrides classprocedures macromethods data -- function SectionStart(t) ! marker w; while True do ! t := search(finish(t), ":"); ! if t = "" then return t; end if; -- find word before the colon ! w := previous(t); ! while search(" \t\r\n", w) /= "" do w := previous(w); end while; ! while search(Letters, w) /= "" do w := previous(w); end while; ! --printline("SS: " ~ extent(finish(w), start(t))); if search(" methods overrides classprocedures macromethods macros data ", " " ~ extent(finish(w), start(t)) ~ " ") /= "" then -- bingo ! return extent(w, t); ! end if; end while end function --- 240,259 ---- -- methods overrides classprocedures macromethods data -- function SectionStart(t) ! marker w while True do ! t := search(finish(t), ":") ! if t = "" then return t end if -- find word before the colon ! w := previous(t) ! while search(" \t\r\n", w) /= "" do w := previous(w) end while ! while search(Letters, w) /= "" do w := previous(w) end while ! -- printline("SS: " ~ extent(finish(w), start(t))) if search(" methods overrides classprocedures macromethods macros data ", " " ~ extent(finish(w), start(t)) ~ " ") /= "" then -- bingo ! return extent(w, t) ! end if end while end function *************** *** 213,288 **** -- returns the next section following the argument, which must be a section -- a Section extends from one keyword-colon until just before the next function NextSection(text) ! marker m; ! text := SectionStart(finish(text)); ! if text = "" then return allnext(start(text)); end if; -- everything after the arg section ! m := SectionStart(finish(text)); if m = "" then ! return allnext(start(text)); -- everything after the arg section else ! return extent(text, start(m)); -- from one keyword to the next ! end if; end function function main(args) ! marker filename; ! marker outname; ! marker text; ! marker outtext; ! marker ClassName; ! marker keyword; ! marker m; ! filename := token(args, IdChars ~ "./"); ! m := extent(previous(previous(last(filename))), filename); -- last 3 characters if m /= ".ch" then ! outname := filename ~ ".c"; -- append .c else ! outname := extent(filename, start(m)) ~ ".c"; -- change .ch to .c ! end if; ! text := readfile(filename); if text = "" then ! printline("empty input file: " ~ filename); ! return; ! end if; ! keyword := search(text, "class"); if keyword /= "" then ! ClassName := token(finish(keyword), IdChars); else -- use filename as classname ! classname := start(filename); ! m := search(classname, "/"); while m = "/" and extent(m, filename) /= "" do ! classname := finish(m); ! m := search(classname, "/"); ! end while; ! ClassName := span(ClassName, IdChars); ! end if; printline("funchdr: " ~ filename ~ " >> " ~ outname ! ~ " Class: " ~ ClassName); ! outtext := newbase(); ! m := NextSection(finish(keyword)); ! keyword := token(m, Letters); while m /= "" and keyword /= "" do ! --printline("Found section: " ~ keyword); if keyword = "methods" or keyword = "overrides" then ! outtext ~:= funchdr_convertsection(m, ClassName) ! ~ "\n"; ! end if; ! m := NextSection(finish(m)); ! keyword := token(m, Letters); end while ! m := "/tmp/t" ~ system("echo -n $$"); ! writefile(m, outtext); ! system("cat " ~ m ~ " >> " ~ outname); ! printline("Appended to " ~ outname); ! system ("rm " ~ m); ! end function; --- 262,334 ---- -- returns the next section following the argument, which must be a section -- a Section extends from one keyword-colon until just before the next function NextSection(text) ! marker m ! text := SectionStart(finish(text)) ! if text = "" then return allnext(start(text)) end if -- everything after the arg section ! m := SectionStart(finish(text)) if m = "" then ! return allnext(start(text)) -- everything after the arg section else ! return extent(text, start(m)) -- from one keyword to the next ! end if end function function main(args) ! marker filename, outname, text, outtext, ClassName, keyword, m ! filename := token(args, IdChars ~ "./") ! m := extent(previous(previous(last(filename))), filename) -- last 3 characters if m /= ".ch" then ! outname := filename ~ ".c" -- append .c else ! outname := extent(filename, start(m)) ~ ".c" -- change .ch to .c ! end if ! text := readfile(filename) if text = "" then ! printline("empty input file: " ~ filename) ! exit function ! end if ! keyword := search(text, "class") if keyword /= "" then ! ClassName := token(finish(keyword), IdChars) else -- use filename as classname ! classname := start(filename) ! m := search(classname, "/") while m = "/" and extent(m, filename) /= "" do ! classname := finish(m) ! m := search(classname, "/") ! end while ! ClassName := span(ClassName, IdChars) ! end if printline("funchdr: " ~ filename ~ " >> " ~ outname ! ~ " Class: " ~ ClassName) ! outtext := newbase() ! m := NextSection(finish(keyword)) ! keyword := token(m, Letters) while m /= "" and keyword /= "" do ! -- printline("Found section: " ~ keyword) if keyword = "methods" or keyword = "overrides" then ! outtext ~:= funchdr_convertsection ! (m, ClassName, FALSE) ~ "\n" ! elif keyword = "classprocedures" then ! outtext ~:= funchdr_convertsection ! (m, ClassName, TRUE) ~ "\n" ! end if ! m := NextSection(finish(m)) ! keyword := token(m, Letters) end while ! m := "/tmp/t" ~ system("echo -n $$") ! writefile(m, outtext) ! system("cat " ~ m ~ " >> " ~ outname) ! printline("Appended to " ~ outname) ! system ("rm " ~ m) ! end function *** atk/ness/nesslib/doubleword.n Tue Nov 20 14:36:34 1990 --- atk/ness/nesslib/doubleword.n.NEW Mon Oct 29 10:56:21 1990 *************** *** 0 **** --- 1,38 ---- + -- Bind ESC-x-2 to find double words in text. + -- Each press of ESC-x-2 will search forward from the end of the current selection + -- for the next occurence of two duplicate words in a row ("the the"). + -- The second of the words will be highlighted. + + -- To add this function to all text add the following to your ~/.atkinit + -- load ness + -- call ness-load + + -- To just use it in a document, insert a Ness inset (with ESC-tab-ness-CR), + -- put a copy of this file within it and select DoMain from the Ness menu. + + marker alphabet := "qwertyuiopasdfghjklzxcvbnm" + ~ "QWERTYUIOPASDFGHJKLZXCVBNM" + + + function nextdouble(s) + marker t := "" + while TRUE do + s := token (finish(s), alphabet) + if s = "" then return finish(base(s)) end if + if s = t then return s end if + t := s + end while + end function + + function main() + setcurrentselection(defaulttext, + nextdouble(currentselection(defaulttext))) + focus(defaulttext) + end function + + extend "view:text" + on keys "\ex2" + setcurrentselection(currentinset, + nextdouble(currentselection(currentinset))) + end keys + end extend *** atk/ness/demos/calc.d Wed Sep 26 16:06:10 1990 --- atk/ness/demos/calc.d.NEW Thu Oct 11 14:50:31 1990 *************** *** 1,4 **** ! \begindata{text,269418368} \textdsversion{12} \template{default} --- 1,4 ---- ! \begindata{text,268727060} \textdsversion{12} \template{default} *************** *** 10,32 **** }}}}}}} ! \begindata{lset,269427872} \V 1 ! \begindata{lset,269406676} \V 1 ! \begindata{lset,269387728} \V 1 ! \begindata{cel,269427756} \V 2 ! \begindata{value,269399676} >1 ! \enddata{value,269399676} ! 10 269399676 1 0 0 0 >OBJ< value >VIEW< buttonV >REF< allclear >LINK< ! \begindata{text,268701188} \textdsversion{12} [long] (22) --- 10,32 ---- }}}}}}} ! \begindata{lset,269129164} \V 1 ! \begindata{lset,269141008} \V 1 ! \begindata{lset,269540376} \V 1 ! \begindata{cel,269764532} \V 2 ! \begindata{value,269763444} >1 ! \enddata{value,269763444} ! 10 269763444 1 0 0 0 >OBJ< value >VIEW< buttonV >REF< allclear >LINK< ! \begindata{text,269184852} \textdsversion{12} [long] (22) *************** *** 34,61 **** [string]