Comment: These are patches to produce the Andrew component of the X.V11R4 distribution, patch level 7 Andrew-Patch: 7 Date: Tue, 4 Sep 1990 17:30:32 -0400 (EDT) Date-span: 90/7/27 12:42:29 through 90/9/4 15:59:37 Bugs addressed: Count of patched files: 227 SPECIAL PATCH NOTES: You must create the directory ./atk/console/stats/ps_aix12 by hand before you can patch. RCS logs: Source file: README.ez Current version: 1.33 revision 1.33 date: 90/09/07 17:17:11; author: gk5g; state: Exp; lines added/del: 163/46 Updated this document to reflect reality. Source file: config/allsys.h Current version: 1.14 revision 1.14 date: 90/08/31 15:40:57; author: gk5g; state: Exp; lines added/del: 3/0 Added new build variable PRE_X11R4. X11R4 added function prototypes and some new types. ---------------------------- revision 1.13 date: 90/08/28 13:01:26; author: susan; state: Exp; lines added/del: 1/1 fixed typo in comment line that caused entire file to be a comment ! (Thanks, Adam.) ---------------------------- revision 1.12 date: 90/07/27 13:24:45; author: gk5g; state: Exp; lines added/del: 3/0 Created token OLD_ULTRIX to be defined when Andrew is being built on an older version of Ultrix that has the disabling-pty-ECHO-mode bug that shows up in typescript. Source file: config/allsys.mcr Current version: 1.13 revision 1.13 date: 90/07/27 13:27:50; author: gk5g; state: Exp; lines added/del: 1/1 Changed references to /usr/andy to /usr/andrew. Source file: config/andrew.rls Current version: 2.101 revision 2.101 date: 90/08/28 15:03:04; author: gk5g; state: Exp; lines added/del: 6/5 Added DESTDIR to depends target list. ---------------------------- revision 2.100 date: 90/08/13 17:58:53; author: gk5g; state: Exp; lines added/del: 16/0 Added -L flag to TestProgramTarget for RS/6000. ---------------------------- revision 2.99 date: 90/08/01 13:03:21; author: susan; state: Exp; lines added/del: 2/3 removed space before tab in CC line ---------------------------- revision 2.98 date: 90/07/30 18:40:48; author: gk5g; state: Exp; lines added/del: 18/1 Changes to ProgramTarget rule so RS/6000 gets linked -L $DESTDIR/lib. Source file: config/andyenv.h Current version: 2.25 revision 2.25 date: 90/08/27 16:06:40; author: gk5g; state: Exp; lines added/del: 1/1 Now includes andrewos.h instead of system.h. Source file: config/depend.csh Current version: 2.16 revision 2.16 date: 90/08/28 15:03:42; author: gk5g; state: Exp; lines added/del: 10/8 Added DESTDIR to depends target list. Source file: config/imake.tmpl Current version: 1.22 revision 1.22 date: 90/08/14 10:31:46; author: gk5g; state: Exp; lines added/del: 2/2 Patch from Craig Everhart: The ``dependInstallClean'' target in the new imake.tmpl seems a little mis-defined in the case where IHaveSubdirs isn't defined. Seems to me that the recursive code shouldn't be included. ---------------------------- revision 1.21 date: 90/08/13 13:01:26; author: gk5g; state: Exp; lines added/del: 1/1 If RiscAIX is defined then this is a RS/6000 machine. Source file: config/hp300/system.h Current version: 1.17 revision 1.17 date: 90/09/07 14:41:23; author: susan; state: Exp; lines added/del: 1/0 Added define of PRE_X11R4 to handle the fact that hp's X does not have R4 include files, therefore it has some missing declarations. Source file: config/i386_mach/system.h Current version: 1.3 revision 1.3 date: 90/08/20 17:09:42; author: gk5g; state: Exp; lines added/del: 1/1 The check for In_Imake was tested incorrectly. Source file: config/ps_aix12/system.h Current version: 1.5 revision 1.5 date: 90/08/13 12:58:29; author: gk5g; state: Exp; lines added/del: 5/0 Added hack for bug in AFS/NFS bridge that causes file locking to hang. Source file: config/rs_aix31/system.h Current version: 1.5 revision 1.5 date: 90/08/13 12:59:49; author: gk5g; state: Exp; lines added/del: 5/1 Added definition of _IBMR2. People porting to RS/6000 should no have to edit imake.c to add _IBMR2. Source file: config/vax_3/system.h Current version: 1.12 revision 1.12 date: 90/08/20 11:29:15; author: gk5g; state: Exp; lines added/del: 5/0 Added missing definition of osi_Times and declaration of osi_GetSecs(). Source file: ams/libs/cui/cuilib.c Current version: 2.45 revision 2.45 date: 90/08/14 10:29:24; author: gk5g; state: Exp; lines added/del: 11/2 Patch sent in by Craig Everhart: This fix dodges core dumps on badly-formatted vote request headers. Source file: ams/libs/ms/cvtold.c Current version: 2.16 revision 2.16 date: 90/08/09 14:26:35; author: gk5g; state: Exp; lines added/del: 30/3 This fix changes the "From " lines (not headers) that are prepended to each message in /usr/spool/mail/xxx by normal UNIX delivery mechanisms. The presence of that line causes "re-sends" of multimedia messages to be broken because of a stupid BSD sendmail behavior. This fix eliminates that possibility by turning the "From " line into a Return-path header. Because it is in cvtold.c, it obviously doesn't affect anything unless you're running with non-AMS delivery. Source file: ams/libs/ms/direx.c Current version: 2.13 revision 2.13 date: 90/08/14 15:40:22; author: gk5g; state: Exp; lines added/del: 3/3 Patch sent by Craig Everhart: RS/6000's posix or X/Open compliance keeps flock()/lockf() from working unless the application has a file open for writing. Under AFS, this means that the caller needs the ``w'' permission bit on in the parent directory. Currently, ~/Mailbox directories are created with owner permissions of ``rlidka'', but to work under RS/6000, they should be ``rlidwka'' instead. This patch changes the permissions to which the message server (and all the AMS user interfaces) will initialize any ~/Mailbox directories it creates. Source file: ams/libs/ms/init.c Current version: 2.39 revision 2.39 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.46 revision 2.46 ---------------------------- 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. ---------------------------- date: 90/08/29 11:59:13; author: gk5g; state: Exp; lines added/del: 3/3 In CheckGlobalAlias(), ThisYPDomain was being initialized and it should have been LocalYPDomain. ---------------------------- revision 2.44 date: 90/08/14 10:55:55; author: gk5g; state: Exp; lines added/del: 6/4 Patch sent by Craig Everhart: This one fixes a bug in getting lots of matches for usernames in cs.cmu.edu. The problem is the result of an incomplete porting job that I did some time ago, when AMS started doing WP lookups in cs.cmu.edu. ---------------------------- revision 2.43 date: 90/08/09 14:37:35; author: gk5g; state: Exp; lines added/del: 18/16 Source file: ams/libs/ms/recon.c Current version: 2.20 revision 2.20 date: 90/08/13 12:55:55; author: gk5g; state: Exp; lines added/del: 4/4 The 7th bcopy left out the third argument which is the size of the memory to copy. Source file: ams/libs/ms/update.c Current version: 2.11 revision 2.11 date: 90/08/22 15:37:51; author: ajp; state: Exp; lines added/del: 9/6 Fixes to get code to work for both hpux 65 and 70. ---------------------------- revision 2.10 date: 90/08/13 10:59:06; author: ajp; state: Exp; lines added/del: 12/5 Changes for hp systems. Source file: ams/msclients/cui/cui.c Current version: 2.31 revision 2.31 date: 90/08/29 15:16:57; author: gk5g; state: Exp; lines added/del: 3/3 In ReconstructDirectory() the variable TrustTimeStamp was being set incorrectly. Source file: ams/msclients/vui/lmenus.c Current version: 2.6 revision 2.6 date: 90/08/14 15:37:45; author: gk5g; state: Exp; lines added/del: 2/1 Patch sent by Craig Everhart: VUI doesn't work on rs/6000 because its tty driver is set to translate CR to LF but VUI itself looks for CR and not LF. VUI has about four places where it looks for CR, and one of them already looked for LF also; this pair of patches (panelp.c and lmenus.c) makes them all work with LF also. Source file: ams/msclients/vui/panelp.c Current version: 1.17 revision 1.17 date: 90/08/14 15:36:12; author: gk5g; state: Exp; lines added/del: 2/1 Patch sent by Craig Everhart: VUI doesn't work on rs/6000 because its tty driver is set to translate CR to LF but VUI itself looks for CR and not LF. VUI has about four places where it looks for CR, and one of them already looked for LF also; this pair of patches (panelp.c and lmenus.c) makes them all work with LF also. Source file: ams/msclients/vui/vui.c Current version: 2.31 revision 2.31 date: 90/08/14 10:48:26; author: gk5g; state: Exp; lines added/del: 2/1 Patch sent in by Craig Everhart: The following patch causes files that VUI creates in /tmp to be protected so that only their owners may read them. This proves real useful when more than one person has access to a machine. Source file: ams/utils/nntp/lib/getdate.y Current version: 1.7 revision 1.7 date: 90/08/14 11:04:08; author: gk5g; state: Exp; lines added/del: 5/6 Patch sent by Craig Everhart: RS/6000 patch, where ``daylight'' is a macro. The given file tries to use that string to name an identifier. Solution is to change the name; I called it ``nowdaylight''. Source file: ams/utils/reauth/reauth.c Current version: 1.9 revision 1.9 date: 90/08/29 12:50:11; author: gk5g; state: Exp; lines added/del: 1/0 Included ctype.h for isspace(). ---------------------------- revision 1.8 date: 90/08/13 18:03:37; author: gk5g; state: Exp; lines added/del: 115/19 Patch from Craig Everhart: The facility that this captures is the ability to maintain authentications in multiple cells up-to-date; you point the ``reauth'' program at a directory filled with files containing accounts and passwords for various other cells. Source file: ams/delivery/trymail/strong.c Current version: 1.40 revision 1.40 date: 90/08/23 15:02:51; author: gk5g; state: Exp; lines added/del: 15/2 Patch sent by Craig Everhart: This is partially cosmetic but pretty useful; it adds more information to the error message that a user gets when he sends undeliverable mail, telling the guy where he reached.\ Source file: ams/delivery/queuem/queuem.c Current version: 1.65 revision 1.65 date: 90/08/20 11:20:51; author: gk5g; state: Exp; lines added/del: 4/3 Patch sent by Craig Everhart: Often AMDS will automatically dump an advisory message that's eventually to be delivered to the local postmaster. Sometimes, though, it's hard to see where the messages are coming from. This fix addresses this problem by prepending Received: lines to these for-postmaster-consumption messages. ---------------------------- revision 1.64 date: 90/08/14 11:06:38; author: gk5g; state: Exp; lines added/del: 6/1 Patch sent by Craig Everhart: This simply fixes the declarations of malloc() and realloc() in the conventional manner so that they don't happen on rs/6000 systems. Source file: ams/delivery/vicemail/vicemail.c Current version: 1.11 revision 1.11 date: 90/08/20 11:17:44; author: gk5g; state: Exp; lines added/del: 6/7 Patch sent by Craig Everhart: Often AMDS will automatically dump an advisory message that's eventually to be delivered to the local postmaster. Sometimes, though, it's hard to see where the messages are coming from. This fix addresses this problem by prepending Received: lines to these for-postmaster-consumption messages. Source file: atk/apps/Imakefile Current version: 2.25 revision 2.25 date: 90/08/31 16:16:43; author: gk5g; state: Exp; lines added/del: 7/1 Changes to make sure that RESOLVLIB is linked in only if RESOLVER_ENV is defined. Previously, if RESOLVER_ENV wasn't defined but RESOLVLIB was pointed at a valid resolver library, then the resolver versions of gethostbyname were used. ---------------------------- revision 2.24 date: 90/08/10 13:25:43; author: gk5g; state: Exp; lines added/del: 2/5 Backed out using -lX11 and returned to using the full path to libX11.a. Source file: atk/apt/tree/treev.c Current version: 1.29 revision 1.29 date: 90/07/30 12:57:43; author: gk5g; state: Exp; lines added/del: 37/20 Made a fix in treev_ObservedChanged(). Added checks for whether or not the node that is being added/deleted is in an expoded tree. If it is in an exploded tree we then do a full update on the whole tree. We could probably be more efficient with which portion of the tree we really need to redraw but this is OK. Source file: atk/apt/tree/treev.ch Current version: 1.2 Source file: atk/atkvers/atkvers.num Current version: 1.43 revision 1.43 date: 90/08/23 15:34:47; author: susan; state: Exp; lines added/del: 1/1 Bump the global ATK Version number Source file: atk/basics/wm/wim.c Current version: 1.17 Source file: atk/basics/x/xgraphic.c Current version: 1.17 revision 1.17 date: 90/08/10 13:14:15; author: gk5g; state: Exp; lines added/del: 4/4 The declaration of the third argument to xgraphic__InsertGraphicRegion was mal-formed. Source file: atk/basics/x/xim.c Current version: 1.41 revision 1.41 date: 90/08/31 15:35:07; author: gk5g; state: Exp; lines added/del: 4/4 Added cpp checks for the new build symbol PRE_X11R4. X11R4 added some new types and function prototypes. ---------------------------- revision 1.40 date: 90/08/29 14:41:29; author: gk5g; state: Exp; lines added/del: 4/4 Not worth mentioning. ---------------------------- revision 1.39 date: 90/08/24 13:51:38; author: gk5g; state: Exp; lines added/del: 4/4 Added checks for function prototypes. ---------------------------- revision 1.38 date: 90/08/22 14:53:30; author: gk5g; state: Exp; lines added/del: 4/4 Made a simple mistake. ---------------------------- revision 1.37 date: 90/08/22 13:47:15; author: gk5g; state: Exp; lines added/del: 4/8 Added more cruft so that platforms that don't have X with function prototypes will compile. ---------------------------- revision 1.36 date: 90/08/13 12:26:10; author: gk5g; state: Exp; lines added/del: 5/5 Typedef XErrorHandler if _IBMR2 or PS/2. ---------------------------- revision 1.35 date: 90/08/13 11:05:38; author: ajp; state: Exp; lines added/del: 7/3 Added ifdef fo hp ---------------------------- revision 1.34 date: 90/07/30 14:36:03; author: gk5g; state: Exp; lines added/del: 6/2 Added a typedef for XErrorHandler for RS/6000. Source file: atk/basics/common/app.c Current version: 2.18 revision 2.18 date: 90/08/11 19:00:08; author: ajp; state: Exp; lines added/del: 13/13 Put in casts for calls to init_Load Source file: atk/basics/common/app.ch Current version: 2.11 revision 2.11 date: 90/08/11 18:59:19; author: ajp; state: Exp; lines added/del: 5/5 Fixed type declarations in InitializeObject and FinalizeObject Source file: atk/basics/common/atom.ch Current version: 2.7 revision 2.7 date: 90/08/11 18:44:20; author: ajp; state: Exp; lines added/del: 4/4 Fixed type declaration of FinalizeObject procedure Source file: atk/basics/common/bind.c Current version: 2.5 revision 2.5 date: 90/08/11 19:03:04; author: ajp; state: Exp; lines added/del: 4/4 Put in cast for call to proctable_DefineProc Source file: atk/basics/common/dataobj.c Current version: 2.12 Source file: atk/basics/common/filetype.ch Current version: 2.6 revision 2.6 date: 90/08/11 19:32:16; author: ajp; state: Exp; lines added/del: 4/4 Added type declarations to CanonicalizeFilename procedure Source file: atk/basics/common/fontdesc.c Current version: 2.8 revision 2.8 date: 90/08/17 14:44:38; author: ajp; state: Exp; lines added/del: 4/4 Type fixes Source file: atk/basics/common/fontdesc.ch Current version: 2.8 revision 2.8 date: 90/08/11 19:34:20; author: ajp; state: Exp; lines added/del: 4/4 Added missing variable to Dellocate procedure Source file: atk/basics/common/graphic.c Current version: 2.11 revision 2.11 date: 90/08/11 23:36:17; author: ajp; state: Exp; lines added/del: 4/3 Fixed some more types Source file: atk/basics/common/graphic.ch Current version: 2.13 revision 2.13 date: 90/08/11 20:42:23; author: ajp; state: Exp; lines added/del: 5/5 Added missing types to method declarations Source file: atk/basics/common/im.c Current version: 2.34 revision 2.34 date: 90/08/17 14:41:23; author: ajp; state: Exp; lines added/del: 4/4 Type fixes ---------------------------- revision 2.33 date: 90/08/13 10:55:12; author: ajp; state: Exp; lines added/del: 14/7 Fixed ifdefs for hp systems. ---------------------------- revision 2.32 date: 90/08/11 23:56:36; author: ajp; state: Exp; lines added/del: 1/1 Type fixes ---------------------------- revision 2.31 date: 90/08/11 23:32:20; author: ajp; state: Exp; lines added/del: 13/13 Fixed types of several method declarations Source file: atk/basics/common/im.ch Current version: 2.15 revision 2.15 date: 90/08/11 23:56:21; author: ajp; state: Exp; lines added/del: 3/3 Type fixes ---------------------------- revision 2.14 date: 90/08/11 23:33:09; author: ajp; state: Exp; lines added/del: 5/5 Fixed types of arguments in methods Source file: atk/basics/common/init.c Current version: 2.11 revision 2.11 date: 90/08/11 23:46:35; author: ajp; state: Exp; lines added/del: 3/3 Changed type of currentErrorProc to avoid type differences. ---------------------------- revision 2.10 date: 90/08/11 23:00:43; author: ajp; state: Exp; lines added/del: 8/8 Fixed call to menulist_ChainAfterML with proper cast Fixed definition of Load to match declaration in ch file. Source file: atk/basics/common/init.ch Current version: 2.6 Source file: atk/basics/common/initfls.help Current version: 1.5 revision 1.5 date: 90/08/20 14:57:24; author: gk5g; state: Exp; lines added/del: 14/12 Improvements made by Guy Harris. Source file: atk/basics/common/keystate.c Current version: 2.5 revision 2.5 date: 90/08/11 19:47:13; author: ajp; state: Exp; lines added/del: 4/4 Changed declaration of keystate__ApplyKey to match declaration on ch file. Source file: atk/basics/common/menulist.ch Current version: 2.10 revision 2.10 date: 90/08/11 23:07:25; author: ajp; state: Exp; lines added/del: 4/4 Fixed types of arguments to the methods AddToML and NextME ---------------------------- revision 2.9 date: 90/08/11 19:55:12; author: ajp; state: Exp; lines added/del: 1/1 Fixed declartion of NextME method ---------------------------- revision 2.8 date: 90/08/11 19:50:56; author: ajp; state: Exp; lines added/del: 4/4 Fixed declaration of FinalizeObject Source file: atk/basics/common/message.c Current version: 2.6 revision 2.6 date: 90/08/11 23:13:39; author: ajp; state: Exp; lines added/del: 4/3 Changed arguments to match the declaration in the ch file. ---------------------------- revision 2.5 date: 90/08/11 19:57:27; author: ajp; state: Exp; lines added/del: 4/4 Fixed declaration of AskForStringCompleted Source file: atk/basics/common/message.ch Current version: 2.8 revision 2.8 date: 90/08/11 23:12:04; author: ajp; state: Exp; lines added/del: 1/1 Rolled back the last change. ---------------------------- revision 2.7 date: 90/08/11 23:08:47; author: ajp; state: Exp; lines added/del: 4/4 Fixed declaration of AskForStringCOmpleted. Source file: atk/basics/common/msghndlr.c Current version: 2.9 revision 2.9 date: 90/08/12 00:07:43; author: ajp; state: Exp; lines added/del: 1/1 Another type fix. ---------------------------- revision 2.8 date: 90/08/11 23:14:13; author: ajp; state: Exp; lines added/del: 4/3 Changed arguments to match the declaration in the ch file. ---------------------------- revision 2.7 date: 90/08/11 19:58:47; author: ajp; state: Exp; lines added/del: 4/4 Fixed declaration of AskForStringCompleted Source file: atk/basics/common/observe.ch Current version: 2.13 revision 2.13 date: 90/08/11 23:21:01; author: ajp; state: Exp; lines added/del: 3/3 Changed type of parameter to ObservedChanged to note proper type. ---------------------------- revision 2.12 date: 90/08/11 20:01:34; author: ajp; state: Exp; lines added/del: 5/5 Fixed declarations of DefineTrigger and ListTrigger Source file: atk/basics/common/pixelimg.c Current version: 2.10 revision 2.10 date: 90/08/11 20:41:40; author: ajp; state: Exp; lines added/del: 6/6 Fixed declarations of classhdr to classheader Source file: atk/basics/common/proctbl.ch Current version: 2.10 revision 2.10 date: 90/08/11 20:03:44; author: ajp; state: Exp; lines added/del: 3/3 Fixed declaration of DefineTypedProc ---------------------------- revision 2.9 date: 90/08/11 18:46:19; author: ajp; state: Exp; lines added/del: 6/6 Fixed misuse of procedure type. Source file: atk/basics/common/profile.c Current version: 2.11 revision 2.11 date: 90/08/10 13:24:56; author: gk5g; state: Exp; lines added/del: 2/2 Don't include /usr/include/sys/gprof.h if HP300_ENV is defined. Source file: atk/basics/common/profile.ch Current version: 2.4 revision 2.4 date: 90/08/11 20:05:27; author: ajp; state: Exp; lines added/del: 1/1 Fixed declaration of StartClass Source file: atk/basics/common/rm.c Current version: 2.8 revision 2.8 date: 90/08/17 14:44:31; author: ajp; state: Exp; lines added/del: 9/9 Type fixes ---------------------------- revision 2.7 date: 90/08/11 23:53:10; author: ajp; state: Exp; lines added/del: 8/10 Fixed type mismatches Source file: atk/basics/common/rm.ch Current version: 2.6 revision 2.6 date: 90/08/11 23:16:57; author: ajp; state: Exp; lines added/del: 4/4 Added missing type to ContextualPostResource Source file: atk/basics/common/view.c Current version: 2.10 revision 2.10 date: 90/08/17 14:42:45; author: ajp; state: Exp; lines added/del: 5/5 Type fixes Source file: atk/basics/common/view.ch Current version: 2.13 revision 2.13 date: 90/08/13 14:03:37; author: sg08; state: Exp; lines added/del: 6/6 Fixed the Get{Fore,Back}groundColor macros to reflect the correct parameters (including "name"). ---------------------------- revision 2.12 date: 90/08/11 23:20:18; author: ajp; state: Exp; lines added/del: 3/3 Changed type of parameter to ObservedChanged to note proper type. ---------------------------- revision 2.11 date: 90/08/11 20:43:05; author: ajp; state: Exp; lines added/del: 4/4 Added missing types to method declarations Source file: atk/champ/match.c Current version: 2.9 revision 2.9 date: 90/08/14 10:52:09; author: gk5g; state: Exp; lines added/del: 3/1 Patch sent by Craig Everhart: This fixes an error I made in computing the date of Easter, for champ. Of course, it's pretty stupid, since the alg I used (and attributed) comes from one exercise in Knuth vol. 1, and this correction is the subject of the next exercise! Source file: atk/console/cmd/Imakefile Current version: 2.18 revision 2.18 date: 90/08/31 15:59:17; author: gk5g; state: Exp; lines added/del: 7/1 Changes to make sure that RESOLVLIB is linked in only if RESOLVER_ENV is defined. Previously, if RESOLVER_ENV wasn't defined but RESOLVLIB was pointed at a valid resolver library, then the resolver versions of gethostbyname were used. Source file: atk/console/cmd/consolea.c Current version: 1.12 revision 1.12 date: 90/08/09 15:16:01; author: gk5g; state: Exp; lines added/del: 13/4 This fix adds a "-C" switch to console, which is just the opposite of the current "-c" switch. That is, it tells console that it should NOT open /dev/console for error monitoring. This is important in the situation where you're running console via an X terminal from a large shared machine, a situation that I suspect will be increasingly common. Source file: atk/console/lib/errmonf.c Current version: 2.10 revision 2.10 date: 90/08/13 10:38:15; author: ajp; state: Exp; lines added/del: 5/3 ifdef'ed out include of arpa/inet.h for hp machine. Source file: atk/console/lib/errormon.c Current version: 2.20 revision 2.20 date: 90/08/20 17:35:06; author: gk5g; state: Exp; lines added/del: 2/12 Removed "horendous compatibility hack" having to do with the TIOCSCONS ioctl call. ---------------------------- revision 2.19 date: 90/08/09 15:23:43; author: gk5g; state: Exp; lines added/del: 4/4 More of the fix that adds a "-C" switch to console, which is just the opposite of the current "-c" switch. That is, it tells console that it should NOT open /dev/console for error monitoring. Source file: atk/console/stats/ps_aix12/Imakefile Current version: 1.1 Source file: atk/console/stats/ps_aix12/getstats.c Current version: 1.1 Source file: atk/ctext/ctext.tpl Current version: 2.2 revision 2.2 locked by: gk5g; date: 90/07/31 17:02:46; author: gk5g; state: Exp; lines added/del: 2/2 Changed the definition of the comment style such that it is now a fixed size font. Source file: atk/ez/eza.c Current version: 2.12 revision 2.12 date: 90/08/24 11:19:18; author: ajp; state: Exp; lines added/del: 4/3 type fixes ---------------------------- revision 2.11 date: 90/08/23 14:47:20; author: ajp; state: Exp; lines added/del: 9/9 type fixes Source file: atk/extensions/Imakefile Current version: 2.16 revision 2.16 date: 90/08/21 13:15:27; author: rr2b; state: Exp; lines added/del: 7/3 added metax package Source file: atk/extensions/ezdiff.c Current version: 2.12 revision 2.12 date: 90/08/13 10:49:03; author: ajp; state: Exp; lines added/del: 3/3 Fixed ifdef of sys/wait.h for hpux Source file: atk/extensions/metax.c Current version: 1.1 revision 1.1 date: 90/08/21 13:27:35; author: rr2b; state: Exp; Initial revision Source file: atk/extensions/metax.ch Current version: 1.1 revision 1.1 date: 90/08/21 13:28:29; author: rr2b; state: Exp; Initial revision Source file: atk/extensions/metax.help Current version: 1.1 revision 1.1 date: 90/08/21 13:28:39; author: rr2b; state: Exp; Initial revision Source file: atk/frame/frame.c Current version: 2.17 revision 2.17 date: 90/08/23 14:48:08; author: ajp; state: Exp; lines added/del: 11/11 type fixes Source file: atk/frame/frame.ch Current version: 2.10 revision 2.10 date: 90/08/23 16:32:00; author: ajp; state: Exp; lines added/del: 5/5 type fixes Source file: atk/frame/framecmd.c Current version: 2.41 revision 2.41 date: 90/08/23 16:32:13; author: ajp; state: Exp; lines added/del: 6/6 type fixes ---------------------------- revision 2.40 date: 90/08/23 14:48:34; author: ajp; state: Exp; lines added/del: 14/14 type fixes ---------------------------- revision 2.39 date: 90/08/23 13:37:44; author: wjh; state: Exp; lines added/del: 163/5 added proctable entries: framecmds-set-window-title framecmds-set-command-enable framecmds-interact framecmds-open-file framecmds-open-view framecmds-set-program-name Source file: atk/frame/framecmd.ch Current version: 2.8 revision 2.8 date: 90/08/23 16:32:35; author: ajp; state: Exp; lines added/del: 4/4 type fixes Source file: atk/frame/framemsg.c Current version: 1.10 revision 1.10 date: 90/08/23 16:32:47; author: ajp; state: Exp; lines added/del: 7/7 type fixes ---------------------------- revision 1.9 date: 90/08/23 14:49:26; author: ajp; state: Exp; lines added/del: 5/5 type fixes Source file: atk/frame/framemsg.ch Current version: 1.8 revision 1.8 date: 90/08/23 16:32:55; author: ajp; state: Exp; lines added/del: 4/4 type fixes Source file: atk/frame/framev.c Current version: 2.16 revision 2.16 date: 90/08/23 14:50:10; author: ajp; state: Exp; lines added/del: 6/6 type fixes Source file: atk/help/src/Imakefile Current version: 2.18 revision 2.18 date: 90/08/31 16:03:16; author: gk5g; state: Exp; lines added/del: 7/1 Changes to make sure that RESOLVLIB is linked in only if RESOLVER_ENV is defined. Previously, if RESOLVER_ENV wasn't defined but RESOLVLIB was pointed at a valid resolver library, then the resolver versions of gethostbyname were used. Source file: atk/help/src/helpa.c Current version: 2.31 revision 2.31 date: 90/07/31 12:14:29; author: gk5g; state: Exp; lines added/del: 4/2 When dealing with the -s switch in ParseArgs, it the last character is '/' then remove it and replace with '\0'. Source file: atk/help/src/helpdb.c Current version: 1.13 revision 1.13 date: 90/07/31 12:20:55; author: gk5g; state: Exp; lines added/del: 2/4 Enabled code that adds the user-supplied search path provided via the -s switch. Source file: atk/ness/tokens/lex.c Current version: 1.15 revision 1.15 date: 90/07/29 14:54:13; author: wjh; state: Exp; lines added/del: 47/11 fixed so styles and objects are fully supported in short strings Source file: atk/ness/objects/call.c Current version: 1.36 ---------------------------- 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 ---------------------------- revision 1.36 locked by: wjh; date: 90/07/28 17:52:13; author: wjh; state: Exp; lines added/del: 5/2 added functions searchforstyle, definestyle, and addstylebyname fixed bugs in addstyles Source file: atk/ness/objects/call.hn Current version: 1.11 ---------------------------- revision 1.11 date: 90/09/16 20:14:12; author: wjh; state: Exp; lines added/del: 5/9 see ness/objects/changes.sept.90 ---------------------------- Source file: atk/ness/objects/envt.h Current version: 1.7 ---------------------------- revision 1.7 date: 90/09/16 20:14:20; author: wjh; state: Exp; lines added/del: 10/5 see ness/objects/changes.sept.90 ---------------------------- Source file: atk/ness/objects/interp.c Current version: 1.31 ---------------------------- 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.27 Source file: atk/ness/objects/ness.ch Current version: 1.14 ---------------------------- 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.12 ---------------------------- 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 ---------------------------- revision 1.11 locked by: wjh; date: 90/07/29 14:54:56; author: wjh; state: Exp; lines added/del: 10/8 changed comment to reflect new styled short string Source file: atk/ness/objects/nevent.c Current version: 1.23 ---------------------------- 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/nevent.hn Current version: 1.11 ---------------------------- revision 1.11 date: 90/09/16 20:15:25; author: wjh; state: Exp; lines added/del: 3/3 see ness/objects/changes.sept.90 ---------------------------- Source file: atk/ness/objects/real.c Current version: 1.12 ---------------------------- revision 1.12 date: 90/09/16 20:15:29; author: wjh; state: Exp; lines added/del: 17/20 see ness/objects/changes.sept.90 ---------------------------- Source file: atk/ness/objects/search.c Current version: 1.19 ---------------------------- 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 ---------------------------- revision 1.18 locked by: wjh; date: 90/07/28 17:53:29; author: wjh; state: Exp; lines added/del: 379/33 added functions searchforstyle, definestyle, and addstylebyname fixed bugs in addstyles Source file: atk/ness/objects/nessruna.c Current version: 1.3 revision 1.3 date: 90/08/01 16:27:53; author: wjh; state: Exp; lines added/del: 14/11 fixed a bug introduced last week where it mistakenly included the file name in the args as given to main() Source file: atk/ness/nesslib/date.n Current version: 1.2 Source file: atk/ness/demos/badsub.n Current version: 1.2 Source file: atk/ness/demos/bank.d Current version: 1.5 Source file: atk/ness/demos/calc.d Current version: 1.3 Source file: atk/ness/demos/happybday.n Current version: 1.1 Source file: atk/ness/demos/xmas.d Current version: 1.8 Source file: atk/ness/doc/nessauth.d Current version: 1.4 Source file: atk/ness/doc/nessfunc.d Current version: 1.6 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 ---------------------------- revision 1.6 locked by: wjh; date: 90/07/29 21:40:35; author: wjh; state: Exp; lines added/del: 121/16 documented date.n ---------------------------- revision 1.5 date: 90/07/28 17:53:48; author: wjh; state: Exp; lines added/del: 106/10 added functions searchforstyle, definestyle, and addstylebyname Source file: atk/ness/doc/nessman.d Current version: 1.5 ---------------------------- revision 1.6 date: 90/09/16 21:19:08; author: wjh; state: Exp; lines added/del: 51/16 see atk/ness/objects/changes.sept.90 ---------------------------- revision 1.5 locked by: wjh; date: 90/07/29 15:05:04; author: wjh; state: Exp; lines added/del: 51/9 gave an example of a long string. Source file: atk/ness/doc/nesstut.d Current version: 1.3 ---------------------------- 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/ness/doc/nessuser.d Current version: 1.2 ---------------------------- revision 1.3 date: 90/09/16 21:19:54; author: wjh; state: Exp; lines added/del: 31/25 see atk/ness/objects/changes.sept.90 ---------------------------- Source file: atk/org/orgv.c Current version: 1.36 revision 1.36 date: 90/09/04 12:25:25; author: gk5g; state: Exp; lines added/del: 2/2 Changed declaration of sys_nerr from long to int. Source file: atk/support/buffer.c Current version: 2.24 revision 2.24 date: 90/08/17 15:37:30; author: ajp; state: Exp; lines added/del: 3/3 Type fixes ---------------------------- revision 2.23 date: 90/08/13 13:29:06; author: ajp; state: Exp; lines added/del: 4/4 Changed declaration of EnumerateViews to match ch file. Source file: atk/support/complete.c Current version: 2.11 revision 2.11 date: 90/08/13 13:55:40; author: ajp; state: Exp; lines added/del: 6/6 Type fixes. Source file: atk/support/envrment.c Current version: 2.12 revision 2.12 date: 90/08/13 14:27:15; author: ajp; state: Exp; lines added/del: 9/9 More type fixes. Source file: atk/support/envrment.ch Current version: 2.9 revision 2.9 date: 90/08/13 14:27:31; author: ajp; state: Exp; lines added/del: 4/4 More type fixes. ---------------------------- revision 2.8 date: 90/08/13 13:58:08; author: ajp; state: Exp; lines added/del: 6/6 Type fixes Source file: atk/support/list.c Current version: 1.5 revision 1.5 date: 90/08/17 15:38:28; author: ajp; state: Exp; lines added/del: 4/4 Type fixes ---------------------------- revision 1.4 date: 90/08/13 13:59:26; author: ajp; state: Exp; lines added/del: 4/4 Type fix Source file: atk/support/list.ch Current version: 1.4 Source file: atk/support/nstdmark.c Current version: 2.11 revision 2.11 locked by: ajp; date: 90/08/17 15:38:37; author: ajp; state: Exp; lines added/del: 4/4 Type fixes ---------------------------- revision 2.10 date: 90/08/13 14:05:43; author: ajp; state: Exp; lines added/del: 11/11 Type fixes Source file: atk/support/rectlist.c Current version: 2.5 revision 2.5 date: 90/08/24 11:14:05; author: ajp; state: Exp; lines added/del: 3/3 fix of typo ---------------------------- revision 2.4 date: 90/08/13 14:08:39; author: ajp; state: Exp; lines added/del: 10/10 Type fixes Source file: atk/support/rectlist.ch Current version: 2.6 revision 2.6 date: 90/08/13 14:29:11; author: ajp; state: Exp; lines added/del: 3/3 Removed extranous semi-colon ---------------------------- revision 2.5 date: 90/08/13 14:08:30; author: ajp; state: Exp; lines added/del: 4/4 Type fixes Source file: atk/support/style.c Current version: 2.12 revision 2.12 date: 90/08/17 15:37:58; author: ajp; state: Exp; lines added/del: 3/3 Type fixes ---------------------------- revision 2.11 date: 90/08/13 14:13:17; author: ajp; state: Exp; lines added/del: 5/5 Type fixes Source file: atk/support/style.ch Current version: 2.6 revision 2.6 date: 90/08/13 14:13:47; author: ajp; state: Exp; lines added/del: 4/4 Type fixes Source file: atk/support/tree23.ch Current version: 2.7 revision 2.7 date: 90/08/13 14:34:05; author: ajp; state: Exp; lines added/del: 1/1 Fixed mistype ---------------------------- revision 2.6 date: 90/08/13 14:15:47; author: ajp; state: Exp; lines added/del: 4/4 Type fixes Source file: atk/support/bufferlist.c Current version: 1.2 revision 1.2 date: 90/08/17 15:37:51; author: ajp; state: Exp; lines added/del: 3/3 Type fixes Source file: atk/support/bufferlist.ch Current version: 1.2 revision 1.2 date: 90/08/13 13:31:10; author: ajp; state: Exp; lines added/del: 4/4 Fixed incorrect types for InitializeObject and FinlizeObject procedures. Source file: atk/supportviews/bpair.c Current version: 2.9 revision 2.9 date: 90/08/13 17:16:24; author: ajp; state: Exp; lines added/del: 5/5 Type fixes Source file: atk/supportviews/label.c Current version: 2.10 revision 2.10 date: 90/08/13 16:02:09; author: ajp; state: Exp; lines added/del: 5/5 Type fixes Source file: atk/supportviews/labelv.c Current version: 2.11 revision 2.11 date: 90/08/13 17:16:42; author: ajp; state: Exp; lines added/del: 11/11 Type fixes Source file: atk/supportviews/lpair.ch Current version: 2.11 revision 2.11 date: 90/08/23 15:55:19; author: ajp; state: Exp; lines added/del: 3/3 type fix ---------------------------- revision 2.10 date: 90/08/13 17:16:50; author: ajp; state: Exp; lines added/del: 4/4 Type fixes Source file: atk/supportviews/lprruler.c Current version: 2.8 revision 2.8 date: 90/08/13 16:03:32; author: ajp; state: Exp; lines added/del: 6/5 Type fixes Source file: atk/supportviews/lprrulv.c Current version: 2.8 revision 2.8 date: 90/08/13 17:16:55; author: ajp; state: Exp; lines added/del: 64/64 Type fixes Source file: atk/supportviews/lprrulv.ch Current version: 2.8 revision 2.8 date: 90/08/13 17:17:11; author: ajp; state: Exp; lines added/del: 5/5 Type fixes Source file: atk/supportviews/palette.c Current version: 2.8 revision 2.8 date: 90/08/13 17:17:17; author: ajp; state: Exp; lines added/del: 4/4 Type fixes Source file: atk/supportviews/palette.ch Current version: 2.7 revision 2.7 date: 90/08/13 17:17:25; author: ajp; state: Exp; lines added/del: 5/5 Type fixes Source file: atk/supportviews/scroll.c Current version: 2.20 revision 2.20 date: 90/08/24 11:16:45; author: ajp; state: Exp; lines added/del: 4/4 type fixes ---------------------------- revision 2.19 date: 90/08/13 17:17:29; author: ajp; state: Exp; lines added/del: 6/6 Type fixes Source file: atk/supportviews/strtbl.c Current version: 2.7 revision 2.7 date: 90/08/13 16:04:47; author: ajp; state: Exp; lines added/del: 5/5 Type fixes Source file: atk/supportviews/strtblv.c Current version: 2.6 revision 2.6 date: 90/08/13 17:17:48; author: ajp; state: Exp; lines added/del: 47/47 Type fixes Source file: atk/supportviews/strtblv.ch Current version: 2.6 revision 2.6 date: 90/08/13 17:17:56; author: ajp; state: Exp; lines added/del: 6/6 Type fixes Source file: atk/text/be1be2.c Current version: 2.7 revision 2.7 date: 90/08/23 11:41:40; author: ajp; state: Exp; lines added/del: 2/2 type fixes Source file: atk/text/bpv.c Current version: 1.2 revision 1.2 date: 90/08/23 11:42:13; author: ajp; state: Exp; lines added/del: 5/5 type fixes Source file: atk/text/content.ch Current version: 1.7 revision 1.7 date: 90/08/23 11:42:42; author: ajp; state: Exp; lines added/del: 3/2 type fixes Source file: atk/text/drawtxtv.c Current version: 2.28 revision 2.28 date: 90/08/31 12:26:51; author: ajp; state: Exp; lines added/del: 4/4 type fix Source file: atk/text/fnote.c Current version: 1.6 revision 1.6 date: 90/08/23 11:42:50; author: ajp; state: Exp; lines added/del: 4/4 type fixes Source file: atk/text/fnotev.c Current version: 1.8 revision 1.8 date: 90/08/23 11:43:01; author: ajp; state: Exp; lines added/del: 4/4 type fixes Source file: atk/text/fnotev.ch Current version: 1.5 revision 1.5 date: 90/08/23 11:43:09; author: ajp; state: Exp; lines added/del: 6/6 type fixes Source file: atk/text/search.c Current version: 2.7 revision 2.7 date: 90/08/23 11:43:19; author: ajp; state: Exp; lines added/del: 34/34 type fixes Source file: atk/text/search.ch Current version: 2.3 revision 2.3 date: 90/08/23 11:43:27; author: ajp; state: Exp; lines added/del: 2/2 type fixes Source file: atk/text/smpltext.ch Current version: 2.10 revision 2.10 date: 90/08/23 11:43:30; author: ajp; state: Exp; lines added/del: 7/7 type fixes Source file: atk/text/text.c Current version: 2.28 revision 2.28 locked by: ajp; date: 90/08/03 16:13:09; author: tpn; state: Exp; lines added/del: 9/6 Put in real fix for bug that limmited the number of sub-objects in text. ---------------------------- revision 2.27 date: 90/08/01 18:12:44; author: gk5g; state: Exp; lines added/del: 4/4 Changed a mal-formed call to realloc in text_ListObjects. Source file: atk/text/text.ch Current version: 2.11 revision 2.11 locked by: ajp; date: 90/08/23 11:43:35; author: ajp; state: Exp; lines added/del: 3/3 type fixes Source file: atk/text/textrefv.c Current version: 1.5 revision 1.5 date: 90/08/23 11:43:40; author: ajp; state: Exp; lines added/del: 4/4 type fixes Source file: atk/text/textv.c Current version: 2.23 revision 2.23 date: 90/08/23 11:43:44; author: ajp; state: Exp; lines added/del: 11/11 type fixes ---------------------------- revision 2.22 date: 90/08/06 15:26:13; author: gk5g; state: Exp; lines added/del: 3/3 Finally fixed the problem wherein portions of an embedded inset would remain at the bottom of the textview after being scrolled up the page. When setting the dimensions of the rectangle to be whited out was using wrong height value. Source file: atk/text/textv.ch Current version: 2.10 revision 2.10 date: 90/08/23 11:44:04; author: ajp; state: Exp; lines added/del: 4/4 type fixes Source file: atk/text/tindex.c Current version: 1.6 revision 1.6 date: 90/08/23 11:44:11; author: ajp; state: Exp; lines added/del: 15/15 type fixes Source file: atk/text/tpllist.c Current version: 2.10 revision 2.10 date: 90/08/23 11:44:15; author: ajp; state: Exp; lines added/del: 4/4 type fixes Source file: atk/text/txtstvec.h Current version: 2.5 revision 2.5 date: 90/08/23 14:34:45; author: tpn; state: Exp; lines added/del: 4/3 added parameters to support color styles. Source file: atk/text/txttroff.ch Current version: 2.7 revision 2.7 date: 90/08/23 11:44:21; author: ajp; state: Exp; lines added/del: 5/5 type fixes Source file: atk/text/txtvcmds.c Current version: 2.48 revision 2.48 date: 90/08/23 11:45:11; author: ajp; state: Exp; lines added/del: 6/6 type fixes ---------------------------- revision 2.47 date: 90/07/30 11:06:49; author: gk5g; state: Exp; lines added/del: 3/3 Fixed a typo. Source file: atk/text/txtvinfo.h Current version: 2.10 revision 2.10 date: 90/08/23 14:43:08; author: tpn; state: Exp; lines added/del: 3/2 added macro for color parameter ---------------------------- revision 2.9 date: 90/08/23 14:35:19; author: tpn; state: Exp; lines added/del: 4/3 added parameters to support color styles. Source file: atk/text/pcompch.c Current version: 1.14 revision 1.14 locked by: rr2b; date: 90/08/13 10:27:49; author: ajp; state: Exp; lines added/del: 1/2 Removed include of strings.h, since it is included in andrewos.h and set properly for the specific operating system. Source file: atk/textaux/compchar.c Current version: 1.11 revision 1.11 locked by: rr2b; date: 90/08/13 10:29:16; author: ajp; state: Exp; lines added/del: 4/5 Removed include of strings.h, since it is included in andrewos.h and set properly for the specific operating system. Source file: atk/typescript/tscript.c Current version: 2.38 revision 2.38 date: 90/08/24 11:21:40; author: ajp; state: Exp; lines added/del: 30/30 Type fixes ---------------------------- revision 2.37 date: 90/08/06 12:46:24; author: gk5g; state: Exp; lines added/del: 31/7 Attempted fix for the ghost-shell problem where a typescript process where toggle between two different shells. One of the shells was associated with a typescript process that died. Added a routine TypescriptEXITProcessCommand() that calls kill(0,SIGKIL). Also, disabled the call to signal(SIGTTOU,SIG_IGN) in typescript_InitializeObject() for SY_AIX221 platform. Source file: atk/typescript/tscripta.c Current version: 2.12 revision 2.12 date: 90/08/24 11:21:25; author: ajp; state: Exp; lines added/del: 4/4 Type fixes Source file: atk/zip/lib/zip.ch Current version: 2.11 revision 2.11 date: 90/08/21 14:12:24; author: sg08; state: Exp; lines added/del: 37/4 Added numerous color and line style method declarations Source file: atk/zip/lib/zip.h Current version: 2.8 revision 2.8 date: 90/08/21 14:12:59; author: sg08; state: Exp; lines added/del: 16/0 Added zip_color_values and zip_color struct declarations Source file: atk/zip/lib/zipd000.c Current version: 2.9 revision 2.9 date: 90/08/21 14:13:27; author: sg08; state: Exp; lines added/del: 231/4 Add Contextual methods for color and line style attributes Add Allocate methods for dynamic color structures Source file: atk/zip/lib/zipdf00.c Current version: 2.6 revision 2.6 date: 90/08/21 14:14:25; author: sg08; state: Exp; lines added/del: 178/3 Add Set_Figure_ methods for color and line styles (SCG) Source file: atk/zip/lib/zipdf01.c Current version: 2.8 revision 2.8 date: 90/08/21 14:14:57; author: sg08; state: Exp; lines added/del: 124/3 Add Superior_Image_ methods for color and line styles Source file: atk/zip/lib/zipdi00.c Current version: 2.7 revision 2.7 date: 90/08/21 14:15:29; author: sg08; state: Exp; lines added/del: 179/4 Add Set_Image_ methods for color and line styles Source file: atk/zip/lib/zipds00.c Current version: 2.8 revision 2.8 date: 90/08/21 14:16:37; author: sg08; state: Exp; lines added/del: 166/3 Add Set_Stream_ for colors and line styles Add proper defaults for line style attributes Source file: atk/zip/lib/zipds01.c Current version: 2.7 revision 2.7 date: 90/08/21 14:18:46; author: sg08; state: Exp; lines added/del: 107/19 Add code to deparse color and line style attributes Source file: atk/zip/lib/zipds02.c Current version: 2.6 revision 2.6 date: 90/08/21 14:19:24; author: sg08; state: Exp; lines added/del: 110/10 Add code to enparse color and line style attributes Source file: atk/zip/lib/zipedit.c Current version: 2.14 revision 2.14 date: 90/08/21 14:20:55; author: sg08; state: Exp; lines added/del: 10/3 Added Show_Enclosure in Update to improve enclosure behavior Source file: atk/zip/lib/zipfig.h Current version: 2.5 revision 2.5 date: 90/08/21 14:21:48; author: sg08; state: Exp; lines added/del: 10/2 Revise figure struct for new color and line style attributes Source file: atk/zip/lib/zipimage.h Current version: 2.4 revision 2.4 date: 90/08/21 14:22:19; author: sg08; state: Exp; lines added/del: 10/1 Revise image struct for new color and line style attributes Source file: atk/zip/lib/zipoarc.c Current version: 2.8 revision 2.8 date: 90/08/21 14:22:58; author: sg08; state: Exp; lines added/del: 4/5 Use Ensure_Line_Attributes on Draw and Print Source file: atk/zip/lib/zipoarrw.c Current version: 2.12 revision 2.12 date: 90/08/21 14:25:18; author: sg08; state: Exp; lines added/del: 4/5 Use Ensure_Line_Attributes on Draw and Print Source file: atk/zip/lib/zipobj.c Current version: 2.10 revision 2.10 date: 90/08/21 14:26:33; author: sg08; state: Exp; lines added/del: 16/12 Add Contains stub. Remove Object_Visible stub Source file: atk/zip/lib/zipobj.ch Current version: 2.9 revision 2.9 date: 90/08/21 14:27:04; author: sg08; state: Exp; lines added/del: 6/4 Add Contains stub. Remove Object_Visible stub (SCG) Source file: atk/zip/lib/zipocapt.c Current version: 2.12 revision 2.12 date: 90/08/21 14:27:34; author: sg08; state: Exp; lines added/del: 3/1 Use Ensure_Line_Attributes on Draw Source file: atk/zip/lib/zipocirc.c Current version: 2.10 revision 2.10 date: 90/08/21 14:28:05; author: sg08; state: Exp; lines added/del: 41/15 Add Ensure_Attributes usage. Set both x and y radii in Set_Object_Point Source file: atk/zip/lib/zipocirc.ch Current version: 2.7 revision 2.7 date: 90/08/21 14:28:56; author: sg08; state: Exp; lines added/del: 5/3 Add Contains method Source file: atk/zip/lib/zipoelli.c Current version: 2.9 revision 2.9 date: 90/08/21 14:29:43; author: sg08; state: Exp; lines added/del: 13/13 Add Ensure_Attribute usage on Draw and Print Source file: atk/zip/lib/zipoline.c Current version: 2.7 revision 2.7 date: 90/08/21 14:30:21; author: sg08; state: Exp; lines added/del: 31/5 Add Ensure_Attribute usage on Draw and Print. Add Contains method Source file: atk/zip/lib/zipoline.ch Current version: 2.7 revision 2.7 date: 90/08/21 14:30:48; author: sg08; state: Exp; lines added/del: 6/5 Add Contains method Source file: atk/zip/lib/zipopath.c Current version: 2.13 revision 2.13 date: 90/08/21 14:31:31; author: sg08; state: Exp; lines added/del: 88/13 Use Ensure_Attributes on Draw and Print. Add Contains method Source file: atk/zip/lib/zipopath.ch Current version: 2.7 revision 2.7 date: 90/08/21 14:33:04; author: sg08; state: Exp; lines added/del: 5/4 Add Contains Method Source file: atk/zip/lib/zipopoly.c Current version: 2.10 revision 2.10 date: 90/08/21 14:33:45; author: sg08; state: Exp; lines added/del: 10/8 Use Ensure_Attribute on Draw and Print Source file: atk/zip/lib/ziporang.c Current version: 2.9 revision 2.9 date: 90/08/21 14:34:23; author: sg08; state: Exp; lines added/del: 10/11 Modify Build to handle non-refresh of pane on build completion Source file: atk/zip/lib/ziporect.c Current version: 2.10 revision 2.10 date: 90/08/21 14:38:09; author: sg08; state: Exp; lines added/del: 5/1 Fixed history log , ---------------------------- revision 2.9 date: 90/08/21 14:34:53; author: sg08; state: Exp; lines added/del: 35/9 Use Ensure_Attribute on Draw and Print Source file: atk/zip/lib/ziporect.ch Current version: 2.7 revision 2.7 date: 90/08/21 14:39:29; author: sg08; state: Exp; lines added/del: 5/4 Add Contains method Source file: atk/zip/lib/zipprint.ch Current version: 2.7 revision 2.7 date: 90/08/21 14:40:00; author: sg08; state: Exp; lines added/del: 5/3 Add Ensure_Line_Attributes method Source file: atk/zip/lib/zipprint.h Current version: 2.4 revision 2.4 date: 90/08/21 14:41:41; author: sg08; state: Exp; lines added/del: 8/0 Add fields for line styles to zip_printing struct Source file: atk/zip/lib/zipstrm.h Current version: 2.5 revision 2.5 date: 90/08/21 14:42:11; author: sg08; state: Exp; lines added/del: 10/1 Add color and line style fields Source file: atk/zip/lib/zipv.c Current version: 2.11 revision 2.11 date: 90/08/21 14:42:48; author: sg08; state: Exp; lines added/del: 10/3 Add Normalize_Line_Attributes in {Highlight,Normalize}_View Source file: atk/zip/lib/zipv.ch Current version: 2.11 revision 2.11 date: 90/08/21 14:43:39; author: sg08; state: Exp; lines added/del: 12/3 Add {Ensure,Normalize}_{Line,Fill}_Attributes methods Add square, zipmin, zipmax macros Source file: atk/zip/lib/zipv000.c Current version: 2.8 revision 2.8 date: 90/08/21 14:44:11; author: sg08; state: Exp; lines added/del: 74/3 Add {Ensure,Normalize}_{Fill,Line}_Attributes methods Source file: atk/zip/lib/zipve02.c Current version: 2.14 revision 2.14 date: 90/08/21 14:44:39; author: sg08; state: Exp; lines added/del: 12/5 Improve Re-Highlight handles on Change_Shade, to work all the time Source file: atk/zip/lib/zipve03.c Current version: 2.14 revision 2.14 date: 90/08/21 14:45:19; author: sg08; state: Exp; lines added/del: 8/6 Remove old color and line_style attribute copying from Duplicate_Selection Source file: atk/zip/lib/zipvf00.c Current version: 2.9 revision 2.9 date: 90/08/21 14:46:08; author: sg08; state: Exp; lines added/del: 9/5 Suppress usage of unimplemented Object_Visible() (wait for "Intersects" method) Source file: atk/zip/lib/zipvp02.c Current version: 2.8 revision 2.8 date: 90/08/21 14:46:57; author: sg08; state: Exp; lines added/del: 5/3 Add Normalize_Line_Attributes on Initiate_Panning Source file: atk/zip/lib/zipvp03.c Current version: 2.10 revision 2.10 date: 90/08/21 14:47:50; author: sg08; state: Exp; lines added/del: 9/4 Add Normalize_Line_Attributes in Draw_Pane_Border Source file: atk/zip/lib/zipvr00.c Current version: 2.16 revision 2.16 date: 90/08/21 14:48:35; author: sg08; state: Exp; lines added/del: 102/24 Add support for printing with line styles Source file: atkams/messages/lib/Imakefile Current version: 2.14 revision 2.14 date: 90/07/27 15:13:46; author: gk5g; state: Exp; lines added/del: 2/1 Provided override of the orgview that was the interface to the bboard structure with the fldtreev [foldertreev] class. Changed what was placed in the title bar of the message bodies window when the -w command line argument is used. It used to put the string "Message Bodies" and now it initially puts "Message Bodies" but also puts the current caption when there is one. Source file: atkams/messages/lib/capaux.c Current version: 1.15 revision 1.15 date: 90/07/27 16:40:42; author: gk5g; state: Exp; lines added/del: 2/3 Backed out change that would put the current caption in the title bar of the bodies window when -w was used. ---------------------------- revision 1.14 date: 90/07/27 15:17:06; author: gk5g; state: Exp; lines added/del: 4/3 Provided override of the orgview that was the interface to the bboard structure with the fldtreev [foldertreev] class. Changed what was placed in the title bar of the message bodies window when the -w command line argument is used. It used to put the string "Message Bodies" and now it initially puts "Message Bodies" but also puts the current caption when there is one. Source file: atkams/messages/lib/captions.c Current version: 2.30 Source file: atkams/messages/lib/captions.ch Current version: 2.11 revision 2.11 date: 90/07/27 16:42:28; author: gk5g; state: Exp; lines added/del: 2/3 Backed out change that would put the current caption in the title bar of the bodies window when -w was used. ---------------------------- revision 2.10 date: 90/07/27 15:17:14; author: gk5g; state: Exp; lines added/del: 4/3 Provided override of the orgview that was the interface to the bboard structure with the fldtreev [foldertreev] class. Changed what was placed in the title bar of the message bodies window when the -w command line argument is used. It used to put the string "Message Bodies" and now it initially puts "Message Bodies" but also puts the current caption when there is one. Source file: atkams/messages/lib/folders.c Current version: 1.29 revision 1.29 date: 90/08/21 16:56:49; author: gk5g; state: Exp; lines added/del: 5/5 In folders__ActionHit(), a call to strcmp was being made with folders_GetCaptions(ci)->FullName. FullName may be NULL. Source file: atkams/messages/lib/messages.c Current version: 2.34 revision 2.34 date: 90/07/27 15:17:19; author: gk5g; state: Exp; lines added/del: 33/28 Provided override of the orgview that was the interface to the bboard structure with the fldtreev [foldertreev] class. Changed what was placed in the title bar of the message bodies window when the -w command line argument is used. It used to put the string "Message Bodies" and now it initially puts "Message Bodies" but also puts the current caption when there is one. Source file: atkams/messages/lib/messages.ch Current version: 2.9 revision 2.9 date: 90/07/27 15:17:38; author: gk5g; state: Exp; lines added/del: 4/4 Provided override of the orgview that was the interface to the bboard structure with the fldtreev [foldertreev] class. Changed what was placed in the title bar of the message bodies window when the -w command line argument is used. It used to put the string "Message Bodies" and now it initially puts "Message Bodies" but also puts the current caption when there is one. Source file: atkams/messages/lib/messaux.c Current version: 1.3 Source file: atkams/messages/lib/fldtreev.c Current version: 1.1 revision 1.1 date: 90/07/27 15:11:37; author: gk5g; state: Exp; Initial revision Source file: atkams/messages/lib/fldtreev.ch Current version: 1.1 revision 1.1 date: 90/07/27 15:13:12; author: gk5g; state: Exp; Initial revision Source file: contrib/Imakefile Current version: 1.4 revision 1.4 date: 90/08/09 16:37:07; author: gk5g; state: Exp; lines added/del: 1/1 Added eatmail to SUBDIRS list. Source file: contrib/eatmail/Imakefile Source file: contrib/eatmail/eatmail.c Source file: install/install.c Current version: 1.4 revision 1.4 date: 90/08/10 12:35:16; author: gk5g; state: Exp; lines added/del: 4/4 RS/6000 doesn't define struct exec so we moved the #ifdef ZMAGIC to before the declaration of struct exec {bug, *head} in quickStrip(). Source file: overhead/class/machdep/aix_31/Imakefile Current version: 1.2 revision 1.2 date: 90/07/30 17:17:34; author: gk5g; state: Exp; lines added/del: 1/1 Change the line that cp'ed eplist.c to globals.c. It now simply touchs globals.c. Source file: overhead/class/machdep/dec_mips/doload.c Current version: 1.12 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/i386_mach/doload.h Current version: 1.1 revision 1.1 date: 90/08/22 13:50:16; author: gk5g; state: Exp; Initial revision Source file: overhead/class/lib/class.c Current version: 2.28 Source file: overhead/class/lib/class.h Current version: 2.17 Source file: overhead/class/testing/Imakefile Current version: 2.16 revision 2.16 date: 90/08/20 11:24:58; author: gk5g; state: Exp; lines added/del: 1/1 Backed out change that set the MAKEDOFLAGS to -b ../cmd -g. Now set to: -b ../cmd -g -d $(BASEDIR)/lib Source file: overhead/cmenu/cmactiv.c Current version: 2.12 revision 2.12 date: 90/09/06 15:42:44; author: gk5g; state: Exp; lines added/del: 6/6 Changed PRE_X11R4 to PRE_X11R4_ENV. ---------------------------- date: 90/08/31 15:25:35; author: gk5g; state: Exp; lines added/del: 6/6 Added cpp checks for the new build symbol PRE_X11R4. X11R4 added some new types and function prototypes. ---------------------------- revision 2.9 date: 90/08/24 13:10:54; author: gk5g; state: Exp; lines added/del: 8/3 Surrounded function prototypes for SuitableEvent and DiscardableEvents with proper cpp checks. ---------------------------- revision 2.8 date: 90/08/02 12:37:13; author: gk5g; state: Exp; lines added/del: 8/2 Added function prototypes for SuitableEvent and DiscardableEvents. Source file: overhead/mail/hdrs/mailconf.h Current version: 2.26 revision 2.26 date: 90/08/09 14:41:25; author: gk5g; state: Exp; lines added/del: 3/0 Added value to not always append the local domain name to local mail. Source file: overhead/mail/lib/dropoff.c Current version: 2.16 revision 2.16 date: 90/08/14 10:58:07; author: gk5g; state: Exp; lines added/del: 1/1 Patch sent by Craig Everhart: This is an rs/6000-related patch. It's like the qmail.c patch, related to lockability of files under Posix or X/Open. The patch recreates .Outgoing directories with permissions that allow file locking. Source file: overhead/mail/lib/mailconf.c Current version: 2.45 revision 2.45 date: 90/08/09 14:44:04; author: gk5g; state: Exp; lines added/del: 5/0 Added configuration boolean, AMS_NoDomainPreferredOnLocalMail, to not always append the local domain name to local mail. Source file: overhead/mail/lib/qmail.c Current version: 2.15 revision 2.15 date: 90/08/14 10:43:16; author: gk5g; state: Exp; lines added/del: 8/6 Patch sent in by Craig Everhart: This patch fixes a problem in RS/6000 and AMS that Bob Oesterlin told me about. It also fixes other Posix or X/Open compliant systems, where flock()ing doesn't work unless the user has write permissions on the target. Source file: overhead/snap2/guardian/cmd/Imakefile Current version: 2.36 revision 2.36 date: 90/08/23 17:17:59; author: gk5g; state: Exp; lines added/del: 5/3 Added variable LIBRAUTH to factor out that old AFS library from G_LIBSI. ---------------------------- revision 2.35 date: 90/08/20 11:34:48; author: gk5g; state: Exp; lines added/del: 2/0 Only include $(AFSBASEDIR)/lib/librauth.a if AFS30_ENV is defined. Source file: overhead/snap2/pcserver/Imakefile Current version: 2.29 revision 2.29 date: 90/08/23 17:38:27; author: gk5g; state: Exp; lines added/del: 5/3 Factored out the old AFS library librauth.a. It's only included in PCS_SERVER_LIBSI if AFS30_ENV is defined. ---------------------------- revision 2.28 date: 90/08/20 11:36:47; author: gk5g; state: Exp; lines added/del: 2/0 Only include $(AFSBASEDIR)/lib/librauth.a if AFS30_ENV is defined. Source file: overhead/sys/sys.c Current version: 2.8 revision 2.8 date: 90/08/27 13:13:16; author: gk5g; state: Exp; lines added/del: 1/2 Removed inclusion of system.h. Use andrewos.h instead. Source file: overhead/util/lib/config.c Current version: 2.15 revision 2.15 date: 90/08/09 16:03:17; author: gk5g; state: Exp; lines added/del: 29/5 This patch allows you to make preferences that are dependent on ANY environment variable. Source file: overhead/util/lib/times.c Current version: 1.10 revision 1.10 date: 90/08/10 13:29:14; author: gk5g; state: Exp; lines added/del: 2/2 Don't declare extern char *timezone() if _IBMR2, SY_AIXx, or HP300. ---------------------------- revision 1.9 date: 90/08/06 12:54:16; author: gk5g; state: Exp; lines added/del: 2/2 Disabled the external declaration of the routine char* timezone() if the platform is the RIOS or SY_AIX221. ---------------------------- revision 1.8 date: 90/07/30 14:26:05; author: gk5g; state: Exp; lines added/del: 2/0 Don't include extern char *timezone() if RS/6000. Source file: overhead/wputil/makeboth.c Current version: 5.28 revision 5.28 date: 90/08/14 11:01:33; author: gk5g; state: Exp; lines added/del: 4/3 Patch sent by Craig Everhart: This is a new fix for rs/6000. The file overhead/wputil/makeboth.c builds in-memory ``struct passwd'' structures, but the exact fields present is vendor-dependent. This fix replaces its use of lots of field assignments with a call to bzero that doesn't have to know exactly which fields are present. Source file: overhead/wpi/wpi.c Current version: 1.22 revision 1.22 date: 90/08/20 11:45:41; author: gk5g; state: Exp; lines added/del: 2/1 A call to puts() has as it's argument the function WPI_Value() which may return NULL. Added check for NULL-ness. Source file: overhead/pobbconf/Imakefile Current version: 1.25 revision 1.25 date: 90/08/14 10:45:37; author: gk5g; state: Exp; lines added/del: 1/1 InstallDocs rule was installing them into DESTDIR. Should be DESTDIR/help. Source file: overhead/pobbconf/config.awk.pobb Current version: 1.34 revision 1.34 date: 90/08/13 18:08:50; author: gk5g; state: Exp; lines added/del: 7/2 Patch from Craig Everhart: This is a companion to the reauth.c patch. This change was also sent in on 5/4/90 originally. This change invokes ``reauth'' (on a po/bb machine) in such a way as to (a) use the local authentication program, not just ``log'' and, (b) use multiple authentications. Source file: overhead/pobbconf/pobb-install.pobb Current version: 1.48 revision 1.48 date: 90/08/14 15:46:14; author: gk5g; state: Exp; lines added/del: 15/9 Patch sent by Craig Everhart: RS/6000's posix or X/Open compliance keeps flock()/lockf() from working unless the application has a file open for writing. Under AFS, this means that the caller needs the ``w'' permission bit on in the parent directory. Currently, ~/Mailbox directories are created with owner permissions of ``rlidka'', but to work under RS/6000, they should be ``rlidwka'' instead. This patch causes AMDS installations to set Mailbox permissions to be ``rlidwka'' rather than ``rlidka''. This patch also fixes the bug wherein pobb-install.pobb wouldn't compile if AFS_ENV was off: this was one of Sean McLinden's complaints in the bugs.open file. *** patchlevel.h Mon Aug 6 10:57:01 1990 --- patchlevel.h.NEW Tue Sep 4 16:18:05 1990 *************** *** 1 **** ! This is the Andrew component of the X.V11R4 distribution, patch level 6 --- 1 ---- ! This is the Andrew component of the X.V11R4 distribution, patch level 7 No differences encountered *** README.ez Tue Dec 12 14:52:05 1989 --- README.ez.NEW Thu Sep 13 17:59:19 1990 *************** *** 1,4 **** ! \begindata{text,2499632} \textdsversion{12} \template{default} \define{note --- 1,4 ---- ! \begindata{text,268929316} \textdsversion{12} \template{default} \define{note *************** *** 58,69 **** (info-andrew-request@andrew.cmu.edu for subscriptions) ! Newsgroup: comp.soft-sys.andrew}}\majorheading{ ! } ! \begindata{bp,2576576} ! \enddata{bp,2576576} ! \view{bpv,2576576,19,0,0} \chapter{1 Installation Instructions for the Andrew Distribution --- 58,69 ---- (info-andrew-request@andrew.cmu.edu for subscriptions) ! Newsgroup: internet.info-andrew ! }} ! \begindata{bp,268943396} ! \enddata{bp,268943396} ! \view{bpv,268943396,4,0,0} \chapter{1 Installation Instructions for the Andrew Distribution *************** *** 90,98 **** } 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 --- 90,98 ---- } 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 *************** *** 131,137 **** 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 --- 131,137 ---- 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 *************** *** 209,217 **** DEC MIPS Ultrix 3.0 pmax_3 ! IBM PS/2 Model 70 AIX 1.1 ps_aix11 } \subsection{1.2.1 The allsys.mcr, system.mcr, and site.mcr Files} --- 209,220 ---- 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 + } \subsection{1.2.1 The allsys.mcr, system.mcr, and site.mcr Files} *************** *** 320,326 **** \bold{XSRCDIR} [Default: empty string] } ! \indent{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 point to where libX11.a is installed. --- 323,329 ---- \bold{XSRCDIR} [Default: empty string] } ! \indent{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 point to where libX11.a is installed. *************** *** 389,395 **** \bold{CC} [Default: cc] \bold{ ! }\indent{C compiler to use. On IBM equipment, it is the hc Metaware compiler. On other systems, it is the pcc compiler. } --- 392,398 ---- \bold{CC} [Default: cc] \bold{ ! }\indent{C compiler to use. On the IBM RT/PC, it is the hc Metaware compiler. On other systems, it is the pcc compiler. } *************** *** 555,561 **** see RUN_AMDS_ENV in a following section. } ! \bold{WHITEPAGES_ENV} [Defined: not defined] \bold{ }\indent{WHITEPAGES_ENV is defined if the white pages facility (including --- 558,564 ---- see RUN_AMDS_ENV in a following section. } ! \bold{WHITEPAGES_ENV} [Default: not defined] \bold{ }\indent{WHITEPAGES_ENV is defined if the white pages facility (including *************** *** 583,588 **** --- 586,600 ---- Window System. } + \bold{PRE_X11R4_ENV} [Default: not defined] + + + \indent{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. + + } \bold{ANDREW_MALLOC_ENV} [Default: defined] \bold{ *************** *** 804,814 **** \bold{RESOLVER_ENV} [Default: defined] \bold{ ! }\indent{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. } \bold{DITROFF_ENV} [Default: defined] --- 816,825 ---- \bold{RESOLVER_ENV} [Default: defined] \bold{ ! }\indent{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. } \bold{DITROFF_ENV} [Default: defined] *************** *** 994,1010 **** 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:" --- 1005,1026 ---- 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:" *************** *** 1024,1032 **** method is unreliable at best, the real solution is for Sun to fix the shell. ! \begindata{bp,2517616} ! \enddata{bp,2517616} ! \view{bpv,2517616,20,0,0} \chapter{2 Building the System } --- 1040,1060 ---- 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. ! ! ! \subheading{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. ! ! \begindata{bp,268923068} ! \enddata{bp,268923068} ! \view{bpv,268923068,5,0,0} \chapter{2 Building the System } *************** *** 1100,1108 **** 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 \leftindent{\smaller{\typewriter{make dependInstall SUBDIRS="glist rofftext --- 1128,1136 ---- 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 \leftindent{\smaller{\typewriter{make dependInstall SUBDIRS="glist rofftext *************** *** 1113,1119 **** 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 \leftindent{\typewriter{\smaller{make dependInstall SUBDIRS="ams atkams --- 1141,1147 ---- 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 \leftindent{\typewriter{\smaller{make dependInstall SUBDIRS="ams atkams *************** *** 1255,1269 **** is not along your path, ez will not be able to perform this 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: \leftindent{addmenu "spell-check-document" "Search/Spell~1,Check Spelling~30" textview} ! \begindata{bp,2517568} ! \enddata{bp,2517568} ! \view{bpv,2517568,21,0,0} \section{2.2 System Components } --- 1283,1383 ---- is not along your path, ez will not be able to perform this 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: \leftindent{addmenu "spell-check-document" "Search/Spell~1,Check Spelling~30" textview} ! ! \italic{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: ! ! ! \indent{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: ! ! ! % \bold{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) \bold{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 \bold{raster} you would use this command on a ! Sun: ! ! (gdb)\bold{ add-file raster.dog 0x10046594} ! ! ! and on an RT: ! ! (gdb) \bold{set-rel 0x10046594} ! ! (gdb) \bold{add-file raster.dog} ! ! ! and on a DECstation: ! ! (gdb) \bold{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. ! ! \begindata{bp,268923024} ! \enddata{bp,268923024} ! \view{bpv,268923024,6,0,0} \section{2.2 System Components } *************** *** 1366,1372 **** - \bold{org} - an organizational chart editor ! - \bold{bush} - a directory tree/file browser (built on org) - \bold{zip} - an hierarchical drawing editor --- 1480,1486 ---- - \bold{org} - an organizational chart editor ! - \bold{bush} - a directory tree/file browser - \bold{zip} - an hierarchical drawing editor *************** *** 1461,1468 **** - \bold{hyplink} - a hypertext-like link inset ! - \bold{tm }- an alternative typescript }} \subsection{2.2.6 ODA Package\indent{ --- 1575,1585 ---- - \bold{hyplink} - a hypertext-like link inset ! - \bold{tm }- an alternative to typescript + - \bold{eatmail} - a program which transfers mail from /usr/spool/mail/\{uid\} + into separate files in uid's Mailbox directory + }} \subsection{2.2.6 ODA Package\indent{ *************** *** 1695,1703 **** Total: 41M} ! \begindata{bp,2587080} ! \enddata{bp,2587080} ! \view{bpv,2587080,22,0,0} \chapter{3 Setting up the Environment to Run Applications} --- 1812,1820 ---- Total: 41M} ! \begindata{bp,268922980} ! \enddata{bp,268922980} ! \view{bpv,268922980,7,0,0} \chapter{3 Setting up the Environment to Run Applications} *************** *** 1721,1728 **** 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 --- 1838,1845 ---- where appname is the name of the application (i.e. console, ez, etc.). ! If you want the \italic{\bold{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 *************** *** 1971,1974 **** subscribe to the netnews group through us, and the netnews group contains ONLY non-multi-media posts. ! \enddata{text,2499632} --- 2088,2091 ---- subscribe to the netnews group through us, and the netnews group contains ONLY non-multi-media posts. ! \enddata{text,268929316} *** config/allsys.h Mon Aug 6 10:57:13 1990 --- config/allsys.h.NEW Fri Sep 7 13:40:19 1990 *************** *** 99,105 **** --- 99,108 ---- /* Defined for building for X11 */ #define X11_ENV 1 + /* Define if you're building against an older version of X11 (pre-release 4) */ + /* #define PRE_X11R4_ENV 1 */ + /* Defined for building the wm window manager */ /* #define WM_ENV 1 */ *************** *** 175,177 **** --- 178,183 ---- /* but only a file into a directory */ /* #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 */ *** config/allsys.mcr Fri Aug 3 16:06:19 1990 --- config/allsys.mcr.NEW Tue Jul 31 09:08:48 1990 *************** *** 24,30 **** /* Thus, $(AFSBASEDIR)/lib/afs $(AFSBASEDIR)/include/afs should both exist. */ /* for historical reasons the default is set to /usr/andy; */ /* if you need to change this setting, you can do so in site.h . */ ! AFSBASEDIR = /usr/andy #endif /* AFS_ENV */ /* set DESTDIR to where you want Andrew installed */ /* it is necessary that it be installed incrementally, while it is built */ --- 24,30 ---- /* Thus, $(AFSBASEDIR)/lib/afs $(AFSBASEDIR)/include/afs should both exist. */ /* for historical reasons the default is set to /usr/andy; */ /* if you need to change this setting, you can do so in site.h . */ ! AFSBASEDIR = /usr/andrew #endif /* AFS_ENV */ /* set DESTDIR to where you want Andrew installed */ /* it is necessary that it be installed incrementally, while it is built */ *** config/andrew.rls Mon Aug 6 10:57:15 1990 --- config/andrew.rls.NEW Tue Aug 28 15:29:38 1990 *************** *** 205,220 **** --- 205,236 ---- #endif /* (defined(AIX) || defined(hpux)) */ + #ifdef _IBMR2 + #define TestProgramTarget(program, objs, libs, syslibs) @@\ test:: program @@\ @@\ program: objs libs @@\ $(RM) $@ @@\ + $(CC) $(CFLAGS) -o $@ objs libs syslibs -L ${DESTDIR}/lib @@\ + @@\ + clean:: @@\ + $(RM) program + + #else /* _IBMR2 */ + + #define TestProgramTarget(program, objs, libs, syslibs) @@\ + test:: program @@\ + @@\ + program: objs libs @@\ + $(RM) $@ @@\ $(CC) $(CFLAGS) -o $@ objs libs syslibs @@\ @@\ clean:: @@\ $(RM) program + #endif /* _IBMR2 */ + #ifdef _IBMR2 #define ProgramTarget(program, objs, libs, syslibs) @@\ *************** *** 271,284 **** #ifdef AFS_ENV #define DependTarget(dependencies) @@\ depend:: dependencies @@\ ! $(DEPENDSCRIPT) $(XMAKEDEPEND) $(BASEDIR) $(XINCDIR) \ @@\ ! "$(CC)" $(CLASS) "-I. $(LOCALINCLUDES) $(INCLUDES)" \ @@\ ! $(AFSBASEDIR) #else /* AFS_ENV */ #define DependTarget(dependencies) @@\ depend:: dependencies @@\ ! $(DEPENDSCRIPT) $(XMAKEDEPEND) $(BASEDIR) $(XINCDIR) \ @@\ ! "$(CC)" $(CLASS) "-I. $(LOCALINCLUDES) $(INCLUDES)" #endif /* AFS_ENV */ /* ***************************************************************** *\ --- 287,301 ---- #ifdef AFS_ENV #define DependTarget(dependencies) @@\ depend:: dependencies @@\ ! $(DEPENDSCRIPT) $(XMAKEDEPEND) $(BASEDIR) $(DESTDIR) \ @@\ ! $(XINCDIR) "$(CC)" $(CLASS) "-I. $(LOCALINCLUDES) \ @@\ ! $(INCLUDES)" $(AFSBASEDIR) #else /* AFS_ENV */ #define DependTarget(dependencies) @@\ depend:: dependencies @@\ ! $(DEPENDSCRIPT) $(XMAKEDEPEND) $(BASEDIR) $(DESTDIR) \ @@\ ! $(XINCDIR) "$(CC)" $(CLASS) "-I. $(LOCALINCLUDES) \ @@\ ! $(INCLUDES)" #endif /* AFS_ENV */ /* ***************************************************************** *\ *** config/andyenv.h Wed Nov 22 11:28:42 1989 --- config/andyenv.h.NEW Mon Aug 27 16:07:53 1990 *************** *** 4,8 **** \* ********************************************************************** */ #ifndef _ANDREWENV_ #define _ANDREWENV_ ! #include #endif /* _ANDREWENV_ */ --- 4,8 ---- \* ********************************************************************** */ #ifndef _ANDREWENV_ #define _ANDREWENV_ ! #include #endif /* _ANDREWENV_ */ *** config/depend.csh Thu Dec 7 16:45:58 1989 --- config/depend.csh.NEW Tue Aug 28 15:29:40 1990 *************** *** 3,21 **** set nonomatch ################################################ ################################################ ! if ( "$#argv" < 6) then ! echo 'usage: depends ${DEPEND} ${BASEDIR} ${XINCDIR} ${CC} ${CLASS} ${INCLUDES} [${AFSBASEDIR}]' exit(1) endif ################################################ set DEPEND=$1 set BASEDIR=$2 ! set XINCDIR=$3 ! set CC="$4" ! set CLASS=$5 ! set INCLUDES="$6" ! if ($#argv == 7) then ! set AFSBASEDIR=$7 else set AFSBASEDIR="/no/afs/includes/to/look/for" endif --- 3,22 ---- set nonomatch ################################################ ################################################ ! if ( "$#argv" < 7) then ! echo 'usage: depends ${DEPEND} ${BASEDIR} ${DESTDIR} ${XINCDIR} ${CC} ${CLASS} ${INCLUDES} [${AFSBASEDIR}]' exit(1) endif ################################################ set DEPEND=$1 set BASEDIR=$2 ! set DESTDIR = $3 ! set XINCDIR=$4 ! set CC="$5" ! set CLASS=$6 ! set INCLUDES="$7" ! if ($#argv == 8) then ! set AFSBASEDIR=$8 else set AFSBASEDIR="/no/afs/includes/to/look/for" endif *************** *** 56,61 **** --- 57,63 ---- cat ${C_DEPENDS} | sed \ -e s+${BASEDIR}+\$\{BASEDIR\}/+g \ + -e s+${DESTDIR}+\$\{DESTDIR\}/+g \ -e s+${XINCDIR}+\$\{XINCDIR\}/+g \ -e s+${AFSBASEDIR}+\$\{AFSBASEDIR\}/+g \ -e s+//+/+g \ *** config/imake.tmpl Mon Aug 6 10:57:19 1990 --- config/imake.tmpl.NEW Thu Aug 23 15:36:05 1990 *************** *** 8,14 **** /**/# The following comes from the macro file /**/# ! #if defined(_IBMR2) #include #define MacroIncludeFile rs_aix31/system.mcr #endif /* RS6000 */ --- 8,14 ---- /**/# The following comes from the macro file /**/# ! #if defined(_IBMR2) || defined(RiscAIX) #include #define MacroIncludeFile rs_aix31/system.mcr #endif /* RS6000 */ *************** *** 221,226 **** --- 221,228 ---- Makefiles:: Makefile + #ifdef IHaveSubdirs + dependInstallClean:: @case '$(MFLAGS)' in *[ik]*) set +e;; esac; \ for i in $(SUBDIRS); \ *************** *** 228,235 **** (cd $$i; echo "building (dependInstall) (`pwd`)"; \ $(MAKE) $(MFLAGS) DESTDIR='$(DESTDIR)' dependInstallClean) \ done - - #ifdef IHaveSubdirs MakeSubdirs($(SUBDIRS) $(EXTRASUBDIRS)) DependMakeSubdirs($(SUBDIRS) $(EXTRASUBDIRS)) --- 230,235 ---- *** config/hp300/system.h Mon Aug 6 10:57:25 1990 --- config/hp300/system.h.NEW Fri Sep 7 14:42:23 1990 *************** *** 124,129 **** --- 124,130 ---- #define GETDOMAIN_ENV 1 #define BUILDANDREWINSTALL_ENV 1 + #define PRE_X11R4 1 /* Now follow the site-specific customizations. */ #include *** config/i386_mach/system.h Mon Aug 6 10:57:29 1990 --- config/i386_mach/system.h.NEW Thu Aug 23 15:36:13 1990 *************** *** 18,24 **** #undef SY_B43 #define SY_B43 1 /* This system is most like bsd 4.3 */ ! #ifdef In_Imake /* Get major data types (esp. caddr_t) */ #include --- 18,24 ---- #undef SY_B43 #define SY_B43 1 /* This system is most like bsd 4.3 */ ! #ifndef In_Imake /* Get major data types (esp. caddr_t) */ #include *** config/ps_aix12/system.h Mon Aug 6 10:57:40 1990 --- config/ps_aix12/system.h.NEW Thu Aug 23 15:36:21 1990 *************** *** 46,53 **** --- 46,58 ---- #define osi_readlink(PATH,BUF,SIZE) readlink((PATH),(BUF),(SIZE)) #include + #if SY_AIX12 && defined(AFS_ENV) /* hack for BSD NFS/AFS bridge flock bug */ + #define osi_ExclusiveLockNoBlock(fid) (0) + #define osi_UnLock(fid) (0) + #else #define osi_ExclusiveLockNoBlock(fid) lockf((fid), F_TLOCK, 0) #define osi_UnLock(fid) lockf((fid), F_ULOCK, 0) + #endif /* SY_AIX12 && defined(AFS_ENV) */ #define osi_O_READLOCK O_RDWR #define osi_F_READLOCK "r+" *** config/rs_aix31/system.h Mon Aug 6 10:57:44 1990 --- config/rs_aix31/system.h.NEW Thu Aug 23 15:36:27 1990 *************** *** 12,18 **** #ifndef IBM032_ENV #define IBM032_ENV #endif /* IBM032_ENV */ ! /* These are here for AIX support. */ #undef SY_AIX31 --- 12,22 ---- #ifndef IBM032_ENV #define IBM032_ENV #endif /* IBM032_ENV */ ! ! #ifndef _IBMR2 ! #define _IBMR2 1 ! #endif /* _IBMR2 */ ! /* These are here for AIX support. */ #undef SY_AIX31 *** config/vax_3/system.h Mon Aug 6 10:58:06 1990 --- config/vax_3/system.h.NEW Thu Aug 23 15:36:42 1990 *************** *** 49,54 **** --- 49,59 ---- #define osi_setjmp _setjmp #define osi_longjmp _longjmp + + /* Make a time standard. */ + struct osi_Times {unsigned long int Secs; unsigned long int USecs;}; + /* Set one of the above with a call to osi_GetTimes(&foo) */ + #define osi_GetSecs() time((long int *) 0) extern void osi_SetZone(); extern char *osi_ZoneNames[]; extern long int osi_SecondsWest; *** ams/libs/cui/cuilib.c Mon Aug 6 10:58:22 1990 --- ams/libs/cui/cuilib.c.NEW Thu Aug 23 15:37:05 1990 *************** *** 3,9 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/cui/RCS/cuilib.c,v 2.44 90/06/04 16:26:42 gk5g Exp $ $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/cui/RCS/cuilib.c,v $ */ #include --- 3,9 ---- * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/cui/RCS/cuilib.c,v 2.45 90/08/14 10:29:24 gk5g Exp $ $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/cui/RCS/cuilib.c,v $ */ #include *************** *** 2422,2430 **** /* Process the three current vote headers */ char *dumstr; ! if (FindQuotedString(VoteRequest, &VoteVector[0], &s) || FindQuotedString(s, &VoteVector[2], &dumstr) || VoteVector[0] == NULL || VoteVector[2] == NULL) { ReportSuccess("Badly-quoted string in vote header"); return(-1); } if (CUI_GetHeaderContents(cuid,(char *) NULL, HP_VOTETO, VoteTo, sizeof(VoteTo) - 1) != NULL) { /* error already reported */ --- 2422,2439 ---- /* Process the three current vote headers */ char *dumstr; ! if (FindQuotedString(VoteRequest, &VoteVector[0], &s) || VoteVector[0] == NULL) { ReportSuccess("Badly-quoted string in vote header"); return(-1); + } + if (s == NULL) { /* assume that the vote-ID is missing. */ + VoteVector[2] = VoteVector[0]; + VoteVector[0] = ""; + } else { + if (FindQuotedString(s, &VoteVector[2], &dumstr) || VoteVector[2] == NULL) { + ReportSuccess("Badly-quoted string in vote header"); + return(-1); + } } if (CUI_GetHeaderContents(cuid,(char *) NULL, HP_VOTETO, VoteTo, sizeof(VoteTo) - 1) != NULL) { /* error already reported */ *** ams/libs/ms/cvtold.c Mon Aug 6 10:58:42 1990 --- ams/libs/ms/cvtold.c.NEW Thu Aug 23 15:37:41 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/cvtold.c,v 2.15 90/07/13 11:16:03 tpn Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/cvtold.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/cvtold.c,v 2.15 90/07/13 11:16:03 tpn 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/cvtold.c,v 2.16 90/08/09 14:26:35 gk5g Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/cvtold.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/cvtold.c,v 2.16 90/08/09 14:26:35 gk5g Exp $ "; #endif /* lint */ #include *************** *** 262,267 **** --- 262,294 ---- AnyWrittenToThisOne = 1; ReadyToStartAgain = 0; } + } else if (!AnyWrittenToThisOne && strncmp(buffer, "From ", 5) == 0) { + /* UNIX From lines make sendmail barf on re-send, so we pre-empt by rewriting them here with a patch from Lennart Lovstrand. The format of a "From " line is: "From [remote from ]" There is a chance sender will contain spaces (enclosed in quotes or escaped by backslash), so we can't just index on a space. */ + char *p; + int quoted = FALSE, escaped = FALSE; + + for (p = &buffer[5]; *p != '\0'; p++) { + if (escaped) + escaped = FALSE; + else if (*p == '\\') + escaped = TRUE; + else if (*p == '"') + quoted = !quoted; + else if (*p == ' ') + break; + } + *p = '\0'; + if ((writeall(wfd, "Return-Path: <", 14) != 14) + || (writeall(wfd, &buffer[5], strlen(&buffer[5])) != strlen(&buffer[5])) + || (writeall(wfd, ">\n", 2) != 2)) { + errsave = errno; + fclose(fp); + close(wfd); + if (AMS_StrictStandaloneLocking) rmlock(CurLock, LockFD); + AMS_RETURN_ERRCODE(errsave, EIN_WRITE, EVIA_CONVERTINCOMING); + } + AnyWrittenToThisOne = TRUE; + ReadyToStartAgain = FALSE; } else { ReadyToStartAgain = (buffer[0] == '\n') ? 1 : 0; blen = strlen(buffer); *** ams/libs/ms/direx.c Wed Nov 22 11:32:40 1989 --- ams/libs/ms/direx.c.NEW Thu Aug 23 15:37:44 1990 *************** *** 3,10 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/ams/libs/ms/RCS/direx.c,v 2.12 89/07/15 05:24:21 cfe Exp $ ! $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/ams/libs/ms/RCS/direx.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/direx.c,v 2.13 90/08/14 15:40:22 gk5g Exp $ ! $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/direx.c,v $ */ #include #include *************** *** 143,149 **** #ifdef AFS_ENV if (AMS_ViceIsRunning) { if (SemiPrivate) { ! sprintf(myprotstuff, "2\n0\n%s %d\nSystem:AnyUser %d\n", Me, PRSFS_READ | PRSFS_LOOKUP | PRSFS_INSERT | PRSFS_DELETE | PRSFS_LOCK | PRSFS_ADMINISTER, PRSFS_LOOKUP | PRSFS_INSERT | PRSFS_LOCK); } else { sprintf(myprotstuff, "1\n0\n%s %d\n", Me, PRSFS_READ | PRSFS_LOOKUP | PRSFS_INSERT | PRSFS_DELETE | PRSFS_WRITE | PRSFS_LOCK | PRSFS_ADMINISTER); } --- 143,149 ---- #ifdef AFS_ENV if (AMS_ViceIsRunning) { if (SemiPrivate) { ! sprintf(myprotstuff, "2\n0\n%s %d\nSystem:AnyUser %d\n", Me, PRSFS_READ | PRSFS_LOOKUP | PRSFS_INSERT | PRSFS_DELETE | PRSFS_WRITE | PRSFS_LOCK | PRSFS_ADMINISTER, PRSFS_LOOKUP | PRSFS_INSERT | PRSFS_LOCK); } else { sprintf(myprotstuff, "1\n0\n%s %d\n", Me, PRSFS_READ | PRSFS_LOOKUP | PRSFS_INSERT | PRSFS_DELETE | PRSFS_WRITE | PRSFS_LOCK | PRSFS_ADMINISTER); } *** ams/libs/ms/init.c Mon Aug 6 10:58:57 1990 --- ams/libs/ms/init.c.NEW Fri Sep 21 14:13:23 1990 *************** *** 3,9 **** * 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.38 90/06/04 16:47:46 gk5g Exp $ $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/init.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/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 *************** *** 315,327 **** } strcpy(NameBuf, newname); free(newname); ! strcat(NameBuf, "@"); ! strcat(NameBuf, MyMailDomain); } else { strcpy(NameBuf, Me); if (homeUsesAMSDelivery > 0) strcat(NameBuf, "+"); ! strcat(NameBuf, "@"); ! strcat(NameBuf, MyMailDomain); } MyShortAddress = permanentmalloc(1+strlen(NameBuf)); if (!MyShortAddress) { --- 315,331 ---- } strcpy(NameBuf, newname); free(newname); ! if (!AMS_NoDomainPreferredOnLocalMail) { ! strcat(NameBuf, "@"); ! strcat(NameBuf, MyMailDomain); ! } } else { strcpy(NameBuf, Me); if (homeUsesAMSDelivery > 0) strcat(NameBuf, "+"); ! if (!AMS_NoDomainPreferredOnLocalMail) { ! strcat(NameBuf, "@"); ! strcat(NameBuf, MyMailDomain); ! } } MyShortAddress = permanentmalloc(1+strlen(NameBuf)); if (!MyShortAddress) { *** ams/libs/ms/mswp.c Mon Aug 6 10:59:09 1990 --- ams/libs/ms/mswp.c.NEW Fri Sep 21 14:13:34 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.42 90/06/04 16:50:10 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.42 90/06/04 16:50:10 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.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 *************** *** 1450,1470 **** ADDRESS_HOST *HostPtr; HadHost = 0; ! myhost = malloc(1+strlen(Domain)); ! if (!myhost) { ! if (IDpart) free(IDpart); ! AMS_RETURN_ERRCODE(ENOMEM, EIN_MALLOC, EVIA_REWRITEADDRESS); } - strcpy(myhost, Domain); - HostPtr = MakeHost(myhost); - if (!HostPtr) { - if (IDpart) free(IDpart); - AMS_RETURN_ERRCODE(ENOMEM, EIN_MALLOC, EVIA_REWRITEADDRESS); - } - if (AddHost(Addr, HostPtr) != PA_OK) { - if (IDpart) free(IDpart); - AMS_RETURN_ERRCODE(ENOMEM, EIN_MALLOC, EVIA_REWRITEADDRESS); - } } } else { if (IDpart) free(IDpart); --- 1450,1472 ---- ADDRESS_HOST *HostPtr; HadHost = 0; ! if (!AMS_NoDomainPreferredOnLocalMail) { ! myhost = malloc(1+strlen(Domain)); ! if (!myhost) { ! if (IDpart) free(IDpart); ! AMS_RETURN_ERRCODE(ENOMEM, EIN_MALLOC, EVIA_REWRITEADDRESS); ! } ! strcpy(myhost, Domain); ! HostPtr = MakeHost(myhost); ! if (!HostPtr) { ! if (IDpart) free(IDpart); ! AMS_RETURN_ERRCODE(ENOMEM, EIN_MALLOC, EVIA_REWRITEADDRESS); ! } ! if (AddHost(Addr, HostPtr) != PA_OK) { ! if (IDpart) free(IDpart); ! AMS_RETURN_ERRCODE(ENOMEM, EIN_MALLOC, EVIA_REWRITEADDRESS); ! } } } } else { if (IDpart) free(IDpart); *************** *** 1632,1638 **** break; } } else { ! *ErrCode = MSWP_UNKNOWNNETMAIL; } if (IDpart) free(IDpart); errno = 0; --- 1634,1640 ---- break; } } else { ! *ErrCode = AMS_UUCPSupported ? MSWP_GOODNETMAIL : MSWP_UNKNOWNNETMAIL; } if (IDpart) free(IDpart); errno = 0; *************** *** 2213,2220 **** } SetAMSDelNameSep(DomainToUse, &AMSDel, &AMSNameSep); if (AMSDel < 0 && ULstrcmp(DomainToUse, MyMailDomain) != 0) { ! FreeAddressList(Addr); ! AMS_RETURN_ERRCODE(EPROTONOSUPPORT, EIN_GETCELLFROMFILE, EVIA_WRITEALLMATCHES); } /* At this point, the address is either in the local domain or in a cell using AMS delivery. */ DomainCopy = NewString(DomainToUse); /* don't let it disappear */ --- 2215,2224 ---- } SetAMSDelNameSep(DomainToUse, &AMSDel, &AMSNameSep); if (AMSDel < 0 && ULstrcmp(DomainToUse, MyMailDomain) != 0) { ! if (CheckAMSValidationMask(DomainToUse) != vld_WPValid) { ! FreeAddressList(Addr); ! AMS_RETURN_ERRCODE(EPROTONOSUPPORT, EIN_GETCELLFROMFILE, EVIA_WRITEALLMATCHES); ! } } /* At this point, the address is either in the local domain or in a cell using AMS delivery. */ DomainCopy = NewString(DomainToUse); /* don't let it disappear */ *************** *** 2280,2286 **** FILE *fp; int Found; #ifdef YELLOWPAGES_ENV ! static char *ThisYPDomain = NULL; char *alias; int Len; #endif /* YELLOWPAGES_ENV */ --- 2284,2290 ---- FILE *fp; int Found; #ifdef YELLOWPAGES_ENV ! static char *LocalYPDomain = NULL; char *alias; int Len; #endif /* YELLOWPAGES_ENV */ *** ams/libs/ms/recon.c Mon Aug 6 10:59:34 1990 --- ams/libs/ms/recon.c.NEW Thu Aug 23 15:38:00 1990 *************** *** 4,11 **** \* ********************************************************************** */ /* ! $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/recon.c,v 2.19 90/06/22 20:05:05 bobg Exp $ ! $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/recon.c,v $ */ #include --- 4,11 ---- \* ********************************************************************** */ /* ! $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/recon.c,v 2.20 90/08/13 12:55:55 gk5g Exp $ ! $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/recon.c,v $ */ #include *************** *** 37,43 **** #define MS_DB_VERSION 4 ! static char ams_reconstruct_rcsid[] = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/recon.c,v 2.19 90/06/22 20:05:05 bobg Exp $"; struct hashlist { unsigned long *hashes; --- 37,43 ---- #define MS_DB_VERSION 4 ! static char ams_reconstruct_rcsid[] = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/recon.c,v 2.20 90/08/13 12:55:55 gk5g Exp $"; struct hashlist { unsigned long *hashes; *************** *** 1164,1170 **** bcopy(AMS_DATE(MsgList_GetSnapshot(&newMsgList, (MsgList_Size(&newMsgList) - 1))), headBuf + sizeof(AMS_DIRECTORY_PREFIX_STRING) ! + (3 * PADSIZE) + 4 + ATTNAMESLEN); } /* Write out the header of the new MSDir */ --- 1164,1170 ---- bcopy(AMS_DATE(MsgList_GetSnapshot(&newMsgList, (MsgList_Size(&newMsgList) - 1))), headBuf + sizeof(AMS_DIRECTORY_PREFIX_STRING) ! + (3 * PADSIZE) + 4 + ATTNAMESLEN, AMS_DATESIZE); } /* Write out the header of the new MSDir */ *** ams/libs/ms/update.c Mon Aug 6 10:59:57 1990 --- ams/libs/ms/update.c.NEW Thu Aug 23 15:38:03 1990 *************** *** 2,24 **** * 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/update.c,v 2.9 90/06/06 14:04:40 ajp Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/update.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/update.c,v 2.9 90/06/06 14:04:40 ajp Exp $ "; #endif /* lint */ #include #include #include ! #ifndef hp9000s300 ! #include ! #else /* hp9000s300 */ #include #include ! #endif /* hp9000s300 */ #ifdef WHITEPAGES_ENV #define CLOSE_WP_DELTA (10*60) /* close WP every 10 minutes */ --- 2,24 ---- * 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/update.c,v 2.11 90/08/22 15:37:51 ajp Exp $ */ /* $ACIS: $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/update.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/libs/ms/RCS/update.c,v 2.11 90/08/22 15:37:51 ajp Exp $ "; #endif /* lint */ #include #include #include ! #if defined(hpux) && HP_OS < 70 #include #include ! #else /* hpux */ ! #include ! #endif /* hpux */ #ifdef WHITEPAGES_ENV #define CLOSE_WP_DELTA (10*60) /* close WP every 10 minutes */ *************** *** 77,83 **** { #ifndef hpux union wait status; ! #endif /* hpux */ int pid, retcode = 0, errct = 0; #ifdef WHITEPAGES_ENV static long time_when_wp_last_closed = 0; --- 77,89 ---- { #ifndef hpux union wait status; ! #else /* hpux */ ! #if HP_OS >= 70 ! #define WNOHANG 1 ! int *status; ! #endif /* HP_OS >= 70 */ ! #endif /* not hpux */ ! int pid, retcode = 0, errct = 0; #ifdef WHITEPAGES_ENV static long time_when_wp_last_closed = 0; *************** *** 135,145 **** timer.it_value.tv_sec = 0; timer.it_value.tv_usec = 0; setitimer(ITIMER_REAL, &timer, 0); ! #else /* hpux */ do { /* Have you checked the children? */ pid = wait3(&status, WNOHANG, NULL); - } while (pid > 0); #endif /* hpux */ } NeedToTimeOut = 0; if (errct > 1) { --- 141,155 ---- timer.it_value.tv_sec = 0; timer.it_value.tv_usec = 0; setitimer(ITIMER_REAL, &timer, 0); ! #else /* any system except HP_OS < 70 */ do { /* Have you checked the children? */ + #ifdef hpux /* HP_OS >= 70 */ + pid = (int) wait3(status, WNOHANG, NULL); + #else /* non hpux system */ pid = wait3(&status, WNOHANG, NULL); #endif /* hpux */ + } while (pid > 0); + #endif /* hp_os < 70 */ } NeedToTimeOut = 0; if (errct > 1) { *** ams/msclients/cui/cui.c Mon Aug 6 11:00:09 1990 --- ams/msclients/cui/cui.c.NEW Tue Sep 4 16:01:53 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.30 90/06/04 17:22:37 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.30 90/06/04 17:22:37 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.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 */ *************** *** 3251,3257 **** s = index(arg, ' '); if (s) { *s++ = '\0'; ! TrustTimeStamp = atoi(s); } else if (Interactive) { TrustTimeStamp = (ChooseFromList(HowToVec, 1) == 1) ? 1 : 0; } --- 3251,3257 ---- s = index(arg, ' '); if (s) { *s++ = '\0'; ! TrustTimeStamp = (atoi(s) == 1)?1:0; } else if (Interactive) { TrustTimeStamp = (ChooseFromList(HowToVec, 1) == 1) ? 1 : 0; } *** ams/msclients/vui/lmenus.c Wed Nov 22 11:38:24 1989 --- ams/msclients/vui/lmenus.c.NEW Thu Aug 23 15:38:34 1990 *************** *** 7,13 **** * Extracted from code by Mark Chance */ ! /* $Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/ams/msclients/vui/RCS/lmenus.c,v 2.5 89/04/13 11:57:23 kf0s Exp $ */ #include #include --- 7,13 ---- * Extracted from code by Mark Chance */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/vui/RCS/lmenus.c,v 2.6 90/08/14 15:37:45 gk5g Exp $ */ #include #include *************** *** 31,36 **** --- 31,37 ---- KEYCODE_SHIFT_TAB, MenuCursorLeft, /* Shift Tab */ KEYCODE_HOME, MenuCursorHome, /* Ctrl-home */ KEYCODE_RETURN, MenuReturnKey, /* Enter */ + KEYCODE_FAKERETURN, MenuReturnKey, /* Enter */ KEYCODE_ESCAPE, MenuEscapeKey, /* Esc */ KEYCODE_REDRAW, MenuRedrawScreen, /* ^L */ MATCHANY, MenuAnyKey, *** ams/msclients/vui/panelp.c Mon Aug 6 11:00:17 1990 --- ams/msclients/vui/panelp.c.NEW Thu Aug 23 15:38:38 1990 *************** *** 21,27 **** * */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/vui/RCS/panelp.c,v 1.16 90/06/05 14:27:01 gk5g Exp $ */ #include #include --- 21,27 ---- * */ ! /* $Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/ams/msclients/vui/RCS/panelp.c,v 1.17 90/08/14 15:36:12 gk5g Exp $ */ #include #include *************** *** 1243,1248 **** --- 1243,1249 ---- KEYTAB ee_keys [] = { KEYCODE_ESCAPE, InpEscapeKey, /* Esc */ KEYCODE_RETURN, InpReturnKey, /* Enter */ + KEYCODE_FAKERETURN, InpReturnKey, /* Enter */ KEYCODE_F1, HelpKey2, /* F1 */ #ifdef DEBUG KEYCODE_ALT_F1, DebugKey2, /* Alt-F1 */ *** ams/msclients/vui/vui.c Mon Aug 6 11:00:19 1990 --- ams/msclients/vui/vui.c.NEW Thu Aug 23 15:38:44 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/vui.c,v 2.30 90/05/01 10:33:07 bobg Exp $ */ /* * This module contains the mainline VUI code for access --- 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/vui.c,v 2.31 90/08/14 10:48:26 gk5g Exp $ */ /* * This module contains the mainline VUI code for access *************** *** 116,121 **** --- 116,122 ---- Interactive=FALSE; SetUp(argc, argv, &opt); show_motd = CUI_GetProfileSwitch(ProgramName,"motd",FALSE); /* pdb */ + umask(077); /* pdb - make sure vui temp files are only readable by owner */ while (!quit) { GotoFlag=TRUE; *** ams/utils/nntp/lib/getdate.y Fri Aug 3 16:18:31 1990 --- ams/utils/nntp/lib/getdate.y.NEW Thu Aug 23 15:39:23 1990 *************** *** 18,24 **** short dstflag; }; #include - #include #include "defs.h" --- 18,23 ---- *************** *** 26,32 **** #define daysec (24L*60L*60L) static int timeflag, zoneflag, dateflag, dayflag, relflag; static time_t relsec, relmonth; ! static int hh, mm, ss, merid, daylight; static int dayord, dayreq; static int month, day, year; static int ourzone; --- 25,31 ---- #define daysec (24L*60L*60L) static int timeflag, zoneflag, dateflag, dayflag, relflag; static time_t relsec, relmonth; ! static int hh, mm, ss, merid, nowdaylight; static int dayord, dayreq; static int month, day, year; static int ourzone; *************** *** 69,77 **** {hh = $1; mm = $3; ss = $5; merid = $6;}; zone: ZONE = ! {ourzone = $1; daylight = STANDARD;} | DAYZONE = ! {ourzone = $1; daylight = DAYLIGHT;}; dyspec: DAY = {dayord = 1; dayreq = $1;} --- 68,76 ---- {hh = $1; mm = $3; ss = $5; merid = $6;}; zone: ZONE = ! {ourzone = $1; nowdaylight = STANDARD;} | DAYZONE = ! {ourzone = $1; nowdaylight = DAYLIGHT;}; dyspec: DAY = {dayord = 1; dayreq = $1;} *************** *** 495,501 **** relsec = 0; relmonth = 0; timeflag=zoneflag=dateflag=dayflag=relflag=0; ourzone = now->timezone; ! daylight = MAYBE; hh = mm = ss = 0; merid = 24; --- 494,500 ---- relsec = 0; relmonth = 0; timeflag=zoneflag=dateflag=dayflag=relflag=0; ourzone = now->timezone; ! nowdaylight = MAYBE; hh = mm = ss = 0; merid = 24; *************** *** 508,514 **** if (err) return (-1); if (dateflag || timeflag || dayflag) { ! sdate = dateconv(month,day,year,hh,mm,ss,merid,ourzone,daylight); if (sdate < 0) return -1; } else { --- 507,513 ---- if (err) return (-1); if (dateflag || timeflag || dayflag) { ! sdate = dateconv(month,day,year,hh,mm,ss,merid,ourzone,nowdaylight); if (sdate < 0) return -1; } else { *** ams/utils/reauth/reauth.c Mon Aug 6 11:00:41 1990 --- ams/utils/reauth/reauth.c.NEW Wed Aug 29 14:47:11 1990 *************** *** 3,9 **** * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! Reauthenticate to Vice repeatedly. Run in background with nohup. --- 3,9 ---- * For full copyright information see:'andrew/config/COPYRITE' * \* ********************************************************************** */ /* ! Reauthenticate to Vice repeatedly. Run in background with nohup. *************** *** 20,25 **** --- 20,26 ---- #include /* sys/time.h */ #include #include + #include #define NIL 0 *************** *** 28,34 **** extern int errno; /* ! reauth time who password */ /* basically a no-op - used mostly just to register the fact that the signal was indeed caught */ --- 29,35 ---- extern int errno; /* ! reauth time who password [dirWithAuths] */ /* basically a no-op - used mostly just to register the fact that the signal was indeed caught */ *************** *** 37,49 **** errprintf(myname, ERR_CRITICAL, NIL, NIL, "Signal caught..."); } ! static int logme(name, password) ! char *name, *password; { register int pid; int outStatus, valWait; ! errprintf(myname, ERR_CRITICAL, NIL, NIL, "Attempting Re-Authentication (%s)", name); /* Fork */ pid = fork(); if (pid < 0) { --- 38,50 ---- errprintf(myname, ERR_CRITICAL, NIL, NIL, "Signal caught..."); } ! static int logme(name, password, cellname) ! char *name, *password, *cellname; { register int pid; int outStatus, valWait; ! errprintf(myname, ERR_CRITICAL, NIL, NIL, "Attempting re-authentication as %s@%s", name, (cellname == NULL ? WorkstationCell : cellname)); /* Fork */ pid = fork(); if (pid < 0) { *************** *** 61,83 **** } /* Here's the child */ ! execl(logpgm, "log", name, password, NIL); errprintf(myname, ERR_CRITICAL, NIL, NIL, "Execl failed: %d", errno); _exit(1); } main(argc, argv) int argc; char *argv[]; { ! register int len, nap, pid, LogStatus; struct timeval tv; char password[512]; /* Should be big enough */ if (argc != 4) { errprintf(myname, ERR_CRITICAL, NIL, NIL, "Wrong number of args: %d", argc); exit(1); } /* Copy password & clobber */ len = strlen(argv[3]); --- 62,165 ---- } /* Here's the child */ ! if (cellname == NULL) { ! execl(logpgm, "log", name, password, NIL); ! } else { ! execl(logpgm, "log", "-x", name, password, "-c", cellname, NULL); ! } errprintf(myname, ERR_CRITICAL, NIL, NIL, "Execl failed: %d", errno); _exit(1); } + #ifdef AFS_ENV + #include + static int LogViaDir(dirn) + char *dirn; + {/* Scan the directory ``dirn'' for files corresponding to other-cell authentications. */ + register DIR *dirp = NIL; + register struct direct *dp; + int err, AnyFailed, fd, len; + char FName[1024]; + char FContent[1024]; + char *user, *pw; register char *x; + + AnyFailed = 0; + errno = 0; + dirp = opendir(dirn); + if (dirp == NIL) { + err = errno; + errprintf(myname, ERR_CRITICAL, NIL, NIL, "reauth: can't open dir %s: %s", dirn, UnixError(err)); + return (tfail(err) ? -1 : 0); + } + for (;;) { + errno = 0; + dp = readdir(dirp); + if (dp == NULL) break; + if (strcmp(dp->d_name, ".") == 0 || strcmp(dp->d_name, "..") == 0) continue; + if ((strlen(dirn) + strlen(dp->d_name) + 5) > sizeof(FName)) { + errprintf(myname, ERR_CRITICAL, NIL, NIL, "reauth: pw filename too big (%s/%s)", dirn, dp->d_name); + AnyFailed = 1; + continue; + } + sprintf(FName, "%s/%s", dirn, dp->d_name); + fd = open(FName, O_RDONLY, 0); + if (fd < 0) { + err = errno; + errprintf(myname, ERR_CRITICAL, NIL, NIL, "reauth: can't open pw filename (%s): %s", FName, UnixError(err)); + AnyFailed = 1; + continue; + } + errno = 0; + len = read(fd, FContent, sizeof(FContent)); + err = errno; + close(fd); + if (len <= 0 || len >= sizeof(FContent)) { + err = errno; + errprintf(myname, ERR_CRITICAL, NIL, NIL, "reauth: pw file %s read problem: result %d/%d (%s)", FName, len, sizeof(FContent), UnixError(err)); + AnyFailed = 1; + continue; + } + FContent[len] = '\0'; + /* Now scan the file */ + x = FContent; /* eliminate leading spaces */ + while (*x != '\0' && isspace(*x)) ++x; + user = x; + while (*x != '\0' && !isspace(*x)) ++x; + *x++ = '\0'; + pw = x; /* allow spaces in passwords: assume a single-character delimiter */ + while (*x != '\0' && (*x == ' ' || !iscntrl(*x))) ++x; + *x = '\0'; /* flush a trailing newline */ + if (logme(user, pw, dp->d_name) != 0) AnyFailed = 1; + } + closedir(dirp); + return (AnyFailed); + } + #endif /* AFS_ENV */ + main(argc, argv) int argc; char *argv[]; { ! register int len, nap, pid, LogStatus, SleepTime; struct timeval tv; char password[512]; /* Should be big enough */ + #ifdef AFS_ENV + char DirToScan[1024]; + #endif /* AFS_ENV */ + #ifdef AFS_ENV + if (argc != 4 && argc != 5) { + errprintf(myname, ERR_CRITICAL, NIL, NIL, "Wrong number of args: %d", argc); + fprintf(stderr, "Wrong number of args: %d\nusage: %s time who password [dirWithOtherLog]", argc, (argc >= 1 ? argv[0] : "reauth")); + exit(1); + } + #else /* AFS_ENV */ if (argc != 4) { errprintf(myname, ERR_CRITICAL, NIL, NIL, "Wrong number of args: %d", argc); + fprintf(stderr, "Wrong number of args: %d\nusage: %s time who password", argc, (argc >= 1 ? argv[0] : "reauth")); exit(1); } + #endif /* AFS_ENV */ /* Copy password & clobber */ len = strlen(argv[3]); *************** *** 88,95 **** strcpy(password, argv[3]); bzero(argv[3], len); ! CheckAMSConfiguration(); /* Fork & become daemon */ pid = fork(); if (pid < 0) { --- 170,190 ---- strcpy(password, argv[3]); bzero(argv[3], len); ! #ifdef AFS_ENV ! DirToScan[0] = '\0'; ! if (argc == 5) { ! strncpy(DirToScan, argv[4], sizeof(DirToScan)); ! DirToScan[sizeof(DirToScan)-1] = '\0'; ! bzero(argv[4], strlen(argv[4])); ! } ! #endif /* AFS_ENV */ + len = CheckAMSConfiguration(); + if (len != 0) { + errprintf(myname, ERR_CRITICAL, NIL, NIL, "CheckAMSConfiguration failed: %d", len); + exit(1); + } + /* Fork & become daemon */ pid = fork(); if (pid < 0) { *************** *** 110,127 **** #endif /* SIGUSR2 */ #endif /* SIGXFSZ */ - for (;;) { ! LogStatus = logme(argv[2], password); ! if (LogStatus == 0){ /* forked, execed, no signals, exit stat == 0 */ ! tv.tv_sec = nap; ! tv.tv_usec = 0; ! select(0, NULL, NULL, NULL, &tv); } ! else{ /* only five minutes if we weren't able to authenticate */ ! tv.tv_sec = 5 * 60; ! tv.tv_usec = 0; ! select(0, NULL, NULL, NULL, &tv); ! } } } --- 205,224 ---- #endif /* SIGUSR2 */ #endif /* SIGXFSZ */ for (;;) { ! /* Use `nap' if forked OK, execed OK, no signals, exitstat == 0, or 5 min otherwise. */ ! SleepTime = nap; ! #ifdef AFS_ENV ! if (DirToScan[0] != '\0') { ! LogStatus = LogViaDir(DirToScan); ! /* 15 minutes on cross-cell failure */ ! if (LogStatus != 0) SleepTime = 15*60; } ! #endif /* AFS_ENV */ ! LogStatus = logme(argv[2], password, NULL); ! if (LogStatus != 0) SleepTime = 5*60; ! tv.tv_sec = SleepTime; ! tv.tv_usec = 0; ! select(0, NULL, NULL, NULL, &tv); } } *** ams/delivery/trymail/strong.c Mon Aug 6 11:00:46 1990 --- ams/delivery/trymail/strong.c.NEW Thu Aug 23 15:39:51 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.39 90/05/09 16:23:16 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.40 90/08/23 15:02:51 gk5g Exp $"; #include #include *************** *** 977,983 **** RetF = fdopen(OutD, "w"); if (RetF == NULL) {unlink(RetFileName); close(OutD); ReturnTempFail=TRUE; return -4;} fprintf(RetF, "Date: %s", arpadate()); ! fprintf(RetF, "From: Mailer-daemon <%s>\n", PostmanAddress); fprintf(RetF, "Subject: %s mail", (ReallyEnclose ? "Returned" : "Undeliverable")); if (Subj != NULL) fprintf(RetF, ": %s", Subj); fputs("\nTo: ", RetF); --- 977,983 ---- RetF = fdopen(OutD, "w"); if (RetF == NULL) {unlink(RetFileName); close(OutD); ReturnTempFail=TRUE; return -4;} fprintf(RetF, "Date: %s", arpadate()); ! fprintf(RetF, "From: Mailer-daemon <%s> (%s, %s)\n", PostmanAddress, PostmasterTitle, Organization); fprintf(RetF, "Subject: %s mail", (ReallyEnclose ? "Returned" : "Undeliverable")); if (Subj != NULL) fprintf(RetF, ": %s", Subj); fputs("\nTo: ", RetF); *************** *** 995,1000 **** --- 995,1003 ---- strncpy(MsgID, ams_genid(0), sizeof(MsgID)); for (SDum = MsgID; *SDum != '\0'; ++SDum) if (*SDum == ':') *SDum = '_'; fprintf(RetF, "\nMessage-ID: <%s@%s>\n", MsgID, GlobalDom); + if (*Organization != '\0') fprintf(RetF, "Organization: %s\n", Organization); + if (*DefaultSurfaceAddress != '\0' && strcmp(DefaultSurfaceAddress, "Anytown, Anywhere") != 0) + fprintf(RetF, "Postal-address: %s\n", DefaultSurfaceAddress); RetBES = NULL; RetLPS = NULL; RetLine[0] = '\0'; *************** *** 1268,1273 **** --- 1271,1281 ---- strcat(MsgBf, Addr->LocalPart); strcat(MsgBf, "'' is ambiguous in domain "); strcat(MsgBf, Dom); + if (*Organization != '\0') { + strcat(MsgBf, " ("); + strcat(MsgBf, Organization); + strcat(MsgBf, ")"); + } #ifdef CMU_ENV DoIDWarn = 1; WasIDMatch = 0; *************** *** 1437,1442 **** --- 1445,1455 ---- strcat(MsgBf, Addr->LocalPart); strcat(MsgBf, "'' is not a sufficiently clear match to the name of any local user in domain "); strcat(MsgBf, Dom); + if (*Organization != '\0') { + strcat(MsgBf, " ("); + strcat(MsgBf, Organization); + strcat(MsgBf, ")"); + } strcat(MsgBf, ". "); if (! gotWPIndices) WantWPIndices(); *** ams/delivery/queuem/queuem.c Mon Aug 6 11:01:09 1990 --- ams/delivery/queuem/queuem.c.NEW Thu Aug 23 15:40:06 1990 *************** *** 146,152 **** extern int errno; extern long time(); ! extern char *malloc(), *realloc(), *arpadate(); extern char Qmail_ErrMsg[]; extern int tok_GetStr(); --- 146,157 ---- extern int errno; extern long time(); ! ! #ifndef _IBMR2 ! extern char *malloc(), *realloc(); ! #endif /* _IBMR2 */ ! ! extern char *arpadate(); extern char Qmail_ErrMsg[]; extern int tok_GetStr(); *************** *** 2805,2814 **** register FILE *f; char *msg; { fprintf(f, "From: Queuemail %s <%s+@%s>\n", IsDaemon ? "Daemon" : "Process", PostmasterName, ThisDomain); - fprintf(f, "Date: %s", arpadate()); fprintf(f, "Subject: %s\n\n", msg); } --- 2810,2819 ---- register FILE *f; char *msg; { + fprintf(f, "Date: %s", arpadate()); fprintf(f, "From: Queuemail %s <%s+@%s>\n", IsDaemon ? "Daemon" : "Process", PostmasterName, ThisDomain); fprintf(f, "Subject: %s\n\n", msg); } *************** *** 2871,2876 **** --- 2876,2882 ---- { register FILE * f; register int i; + char current[MAXPATHLEN+1]; debug(8, ("Entering bailout routine\n")); *************** *** 2877,2887 **** if (Debugging & 4) { debug(8, ("Not writing last-ditch error file: %s\n", mesg)); f = stdout; } else { /* Try to create error file */ f = NULL; /* Just in case */ for (i = 0; i < nlastditchprefixes; ++i) { - char current[MAXPATHLEN+1]; sprintf(current, "%s/%s", lastDitchPrefixes[i], ams_genid(1)); f = fopen(current, "w"); --- 2883,2893 ---- if (Debugging & 4) { debug(8, ("Not writing last-ditch error file: %s\n", mesg)); f = stdout; + strcpy(current, "no-file"); } else { /* Try to create error file */ f = NULL; /* Just in case */ for (i = 0; i < nlastditchprefixes; ++i) { sprintf(current, "%s/%s", lastDitchPrefixes[i], ams_genid(1)); f = fopen(current, "w"); *************** *** 2895,2901 **** abort(); } } ! Header(f, mesg); fprintf(f, "Queuemail error: %s\n", mesg); if (auxmsg != NIL) fprintf(f, "Error info: %s\n", auxmsg); --- 2901,2907 ---- abort(); } } ! fprintf(f, "Received: from %s via queuemail(bailout) ID <%s>; %s", host(), current, arpadate()); Header(f, mesg); fprintf(f, "Queuemail error: %s\n", mesg); if (auxmsg != NIL) fprintf(f, "Error info: %s\n", auxmsg); *** ams/delivery/vicemail/vicemail.c Wed Nov 22 11:41:50 1989 --- ams/delivery/vicemail/vicemail.c.NEW Thu Aug 23 15:40:14 1990 *************** *** 85,97 **** return name; } ! static header(f, user, mesg, original) register FILE *f; ! char *user, *mesg, *original; { register char **p; /* Write mail header */ fprintf(f, "Date: %s", arpadate()); fprintf(f, "From: vicemail <%s+@%s>\n", PostmasterName, ThisDomain); fprintf(f, "Subject: %s (%s)\n\n", mesg, user); --- 85,98 ---- return name; } ! static header(f, user, mesg, original, curfile, who) register FILE *f; ! char *user, *mesg, *original, *curfile, *who; { register char **p; /* Write mail header */ + fprintf(f, "Received: from %s via %s ID <%s>; %s", who, host(), curfile, arpadate()); fprintf(f, "Date: %s", arpadate()); fprintf(f, "From: vicemail <%s+@%s>\n", PostmasterName, ThisDomain); fprintf(f, "Subject: %s (%s)\n\n", mesg, user); *************** *** 135,146 **** { register FILE *f; register int i; /* Try to create error file */ f = NIL; /* Just in case */ for (i = 0; i < nbailoutprefixes; ++i) { - char current[MAXPATHLEN+1]; - sprintf(current, "%s/%s", bailoutPrefixes[i], ams_genid(1)); f = fopen(current, "w"); if (f != NIL) break; --- 136,146 ---- { register FILE *f; register int i; + char current[MAXPATHLEN+1]; /* Try to create error file */ f = NIL; /* Just in case */ for (i = 0; i < nbailoutprefixes; ++i) { sprintf(current, "%s/%s", bailoutPrefixes[i], ams_genid(1)); f = fopen(current, "w"); if (f != NIL) break; *************** *** 148,155 **** /* If that fails, I give up */ if (f == NIL) exit(EX_TEMPFAIL); ! ! header(f, PostmasterName, mesg, original); if (body) { if (!compose_message(f, PostmasterName, mesg, original)) exit(EX_TEMPFAIL); --- 148,154 ---- /* If that fails, I give up */ if (f == NIL) exit(EX_TEMPFAIL); ! header(f, PostmasterName, mesg, original, current, "vicemail(bailout)"); if (body) { if (!compose_message(f, PostmasterName, mesg, original)) exit(EX_TEMPFAIL); *************** *** 221,227 **** else ; else ! header(fout, user, mesg, NIL); fclose(fout); if (wait(&stat) < 0) { sprintf(errortext, "WAIT failed: %d", errno); --- 220,226 ---- else ; else ! header(fout, user, mesg, NIL, NIL, "vicemail(to queuemail)"); fclose(fout); if (wait(&stat) < 0) { sprintf(errortext, "WAIT failed: %d", errno); *** atk/apps/Imakefile Mon Aug 6 11:01:16 1990 --- atk/apps/Imakefile.NEW Tue Sep 4 16:03:14 1990 *************** *** 12,23 **** ${BASEDIR}/lib/atk/libsupport.a \ ${BASEDIR}/lib/atk/libbasics.a #ifdef WM_ENV WMLIBS = ${BASEDIR}/lib/libwm.a #endif /* WM_ENV */ #ifdef X11_ENV ! X11LIBS = ${BASEDIR}/lib/libcmenu.a #endif /* X11_ENV */ OTHERLIBS = ${WMLIBS} \ --- 12,30 ---- ${BASEDIR}/lib/atk/libsupport.a \ ${BASEDIR}/lib/atk/libbasics.a + #ifdef RESOLVER_ENV + RESOLVER_LIB = $(RESOLVLIB) + #else + RESOLVER_LIB = + #endif /* RESOLVER_ENV */ + #ifdef WM_ENV WMLIBS = ${BASEDIR}/lib/libwm.a #endif /* WM_ENV */ #ifdef X11_ENV ! X11LIBS = ${BASEDIR}/lib/libcmenu.a \ ! ${XLIBDIR}/libX11.a #endif /* X11_ENV */ OTHERLIBS = ${WMLIBS} \ *************** *** 27,41 **** $(MALLOCLIB) \ ${X11LIBS} - #ifdef X11_ENV - SYSLIBS = -lX11 -lm - #else SYSLIBS = -lm - #endif /* X11_ENV */ NormalObjectRule() ! ProgramTarget(runapp, runapp.o statload.o, ${ATKLIBS} ${OTHERLIBS} ${RESOLVLIB}, ${SYSLIBS}) InstallProgram(runapp, ${DESTDIR}/bin) --- 34,44 ---- $(MALLOCLIB) \ ${X11LIBS} SYSLIBS = -lm NormalObjectRule() ! ProgramTarget(runapp, runapp.o statload.o, ${ATKLIBS} ${OTHERLIBS} ${RESOLVER_LIB}, ${SYSLIBS}) InstallProgram(runapp, ${DESTDIR}/bin) *** atk/apt/tree/treev.c Wed Apr 11 14:18:14 1990 --- atk/apt/tree/treev.c.NEW Thu Aug 23 15:40:56 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.28 90/03/02 18:35:10 gk5g Exp Locker: gk5g $"; #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.29 90/07/30 12:57:43 gk5g Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* *************** *** 826,832 **** register struct observable *changed; register long change; { ! register tree_type_node parent, node; register node_shadow_type shadow; IN(treev_ObservedChanged); --- 826,832 ---- register struct observable *changed; register long change; { ! register tree_type_node parent, tmp_parent, node; register node_shadow_type shadow; IN(treev_ObservedChanged); *************** *** 837,853 **** DEBUGdt(Notification Code,tree_NotificationCode(Tree)); if ( node = tree_NotificationNode(Tree) ) { DEBUGst(Notification Node,NodeName(node)); ! parent = ParentNode(node); switch ( tree_NotificationCode( Tree ) ) { case tree_NodeCreated: DEBUG(NodeCreated); case tree_NodeHooked: DEBUG(NodeHooked); Generate_Shadows( self, node ); ! if ( parent ) ! { ! Check_Dimensions( self, node ); ! treev_ExposeNodeChildren( self, parent ); } else { --- 837,866 ---- DEBUGdt(Notification Code,tree_NotificationCode(Tree)); if ( node = tree_NotificationNode(Tree) ) { + boolean inExplosion = FALSE; + DEBUGst(Notification Node,NodeName(node)); ! tmp_parent = parent = ParentNode(node); ! while(tmp_parent) ! if(NodeExploded(tmp_parent)) { ! inExplosion = TRUE; ! break; ! } ! else tmp_parent = ParentNode(tmp_parent); switch ( tree_NotificationCode( Tree ) ) { case tree_NodeCreated: DEBUG(NodeCreated); case tree_NodeHooked: DEBUG(NodeHooked); Generate_Shadows( self, node ); ! if ( parent ) { ! if(inExplosion) { ! ShadowExposed(NodeShadow(node)) = true; ! treev_FullUpdate(self,view_FullRedraw,0,0,Width,Height); ! } ! else { ! Check_Dimensions( self, node ); ! treev_ExposeNodeChildren( self, parent ); ! } } else { *************** *** 863,885 **** break; case tree_NodeDestroyed: DEBUG(NodeDestroyed); case tree_NodeUnhooked: DEBUG(NodeUnhooked); ! if( parent ) { ! if( treev_NodeHighlighted( self, node ) ) { ! treev_NormalizeNode( self, node ); ! if( CurrentNode = parent ) { ! CurrentNodeShadow = NodeShadow(CurrentNode); ! treev_HighlightNode( self, parent ); ! } } ! Erase_Node_Children(self,NodeShadowNode(parent)); } ! Destroy_Shadows( self, node ); ! Redisplay_Node_Children(self,parent ? NodeShadowNode(parent) : NULL); ! if(parent && !LeftNode(node) && !RightNode(node)) { ShadowChildrenExposed(ShadowNodeDatum(NodeShadowNode(parent))) = false; ShadowChildrenRowCount(ShadowNodeDatum(NodeShadowNode(parent))) = 0; ! } ! break; case tree_NodeChildrenCreated: DEBUG(NodeChildrenCreated); Check_Dimensions( self, node ); Generate_Children_Shadows( self, node ); --- 876,902 ---- break; case tree_NodeDestroyed: DEBUG(NodeDestroyed); case tree_NodeUnhooked: DEBUG(NodeUnhooked); ! if(parent) { ! if(treev_NodeHighlighted(self,node)) { ! treev_NormalizeNode(self,node); ! if(CurrentNode = parent) { ! CurrentNodeShadow = NodeShadow(CurrentNode); ! treev_HighlightNode(self,parent); ! } } ! if(!inExplosion) ! Erase_Node_Children(self,NodeShadowNode(parent)); } ! Destroy_Shadows(self,node); ! if(inExplosion) ! treev_FullUpdate(self,view_FullRedraw,0,0,Width,Height); ! else ! Redisplay_Node_Children(self,parent ? NodeShadowNode(parent) : NULL); ! if(parent && !LeftNode(node) && !RightNode(node)) { ShadowChildrenExposed(ShadowNodeDatum(NodeShadowNode(parent))) = false; ShadowChildrenRowCount(ShadowNodeDatum(NodeShadowNode(parent))) = 0; ! } ! break; case tree_NodeChildrenCreated: DEBUG(NodeChildrenCreated); Check_Dimensions( self, node ); Generate_Children_Shadows( self, node ); *** atk/apt/tree/treev.ch Wed Apr 11 14:18:18 1990 --- atk/apt/tree/treev.ch.NEW Thu Aug 23 15:41:02 1990 *************** *** 4,10 **** \* ********************************************************************** */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidtree_H = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/apt/tree/RCS/treev.ch,v 1.2 89/08/24 16:41:51 tom Exp Locker: gk5g $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* --- 4,10 ---- \* ********************************************************************** */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidtree_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/apt/tree/RCS/treev.ch,v 1.2 89/08/24 16:41:51 tom Exp $"; #endif /** SPECIFICATION -- External Facility Suite ********************************* *** atk/atkvers/atkvers.num Mon Aug 6 11:02:06 1990 --- atk/atkvers/atkvers.num.NEW Thu Aug 23 15:41:06 1990 *************** *** 1 **** ! 15.0 --- 1 ---- ! 15.1 *** atk/basics/wm/wim.c Wed Nov 22 11:46:54 1989 --- atk/basics/wm/wim.c.NEW Tue Sep 4 16:03:41 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/basics/wm/RCS/wim.c,v 1.17 89/10/04 18:48:53 cfe Exp $ */ /* $ACIS:im.c 1.5$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/wm/RCS/wim.c,v $ */ #ifndef lint ! char *wm_rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/wm/RCS/wim.c,v 1.17 89/10/04 18:48:53 cfe 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/wm/RCS/wim.c,v 1.17 89/10/04 18:48:53 cfe Exp Locker: ajp $ */ /* $ACIS:im.c 1.5$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/wm/RCS/wim.c,v $ */ #ifndef lint ! char *wm_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/wm/RCS/wim.c,v 1.17 89/10/04 18:48:53 cfe Exp Locker: ajp $"; #endif /* lint */ /* Put in error messages for handling of keystrokes. *** atk/basics/x/xgraphic.c Mon Aug 6 11:02:19 1990 --- atk/basics/x/xgraphic.c.NEW Mon Aug 13 10:23:24 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/atk/basics/x/RCS/xgraphic.c,v 1.16 90/06/12 11:29:05 sg08 Exp $ */ /* $ACIS:graphic.c 1.11$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xgraphic.c,v $ */ --- 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/atk/basics/x/RCS/xgraphic.c,v 1.17 90/08/10 13:14:15 gk5g Exp $ */ /* $ACIS:graphic.c 1.11$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xgraphic.c,v $ */ *************** *** 9,15 **** #ifndef LINT ! char xgraphic_rcsid[] = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xgraphic.c,v 1.16 90/06/12 11:29:05 sg08 Exp $"; #endif /* LINT */ /* graphic.c --- 9,15 ---- #ifndef LINT ! char xgraphic_rcsid[] = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/x/RCS/xgraphic.c,v 1.17 90/08/10 13:14:15 gk5g Exp $"; #endif /* LINT */ /* graphic.c *************** *** 1623,1629 **** void xgraphic__InsertGraphicRegion(self, EnclosingGraphic, region) struct xgraphic * self; struct xgraphic * EnclosingGraphic; ! struct region; { super_InsertGraphicRegion(self,EnclosingGraphic, region); --- 1623,1629 ---- void xgraphic__InsertGraphicRegion(self, EnclosingGraphic, region) struct xgraphic * self; struct xgraphic * EnclosingGraphic; ! struct region * region; { super_InsertGraphicRegion(self,EnclosingGraphic, region); *** atk/basics/x/xim.c Mon Aug 6 11:02:31 1990 --- atk/basics/x/xim.c.NEW Fri Sep 7 15:13:39 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.34 90/07/30 14:36:03 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.34 90/07/30 14:36:03 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.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. *************** *** 29,37 **** #include #include #include ! #ifdef _IBMR2 typedef int (*XErrorHandler) (); ! #endif #include --- 29,37 ---- #include #include #include ! #if defined(PRE_X11R4_ENV) typedef int (*XErrorHandler) (); ! #endif /* defined(PRE_X11R4_ENV) */ #include *** atk/basics/common/app.c Wed Nov 22 11:48:00 1989 --- atk/basics/common/app.c.NEW Thu Aug 23 15:42:15 1990 *************** *** 2,10 **** * 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/basics/common/RCS/app.c,v 2.17 89/11/06 11:32:18 tpn Exp $ */ /* $ACIS:app.c 1.5$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/app.c,v $ */ #include #include --- 2,10 ---- * 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/app.c,v 2.18 90/08/11 19:00:08 ajp Exp $ */ /* $ACIS:app.c 1.5$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/app.c,v $ */ #include #include *************** *** 182,192 **** if((sitename = environ_GetConfiguration("SiteConfigName")) != NULL){ sprintf(buffer, "%s/lib/%s.atkinit", andrewDir,sitename); ! sitegloinit = init_Load(init, buffer, self->errorProc, self->errorRock,self->forceload) >= 0; if(name != NULL){ sprintf(buffer, "%s/lib/%s.%sinit", andrewDir,sitename, name); ! siteinit = init_Load(init, buffer, self->errorProc, ! self->errorRock, self->forceload) >= 0; } } --- 182,192 ---- if((sitename = environ_GetConfiguration("SiteConfigName")) != NULL){ sprintf(buffer, "%s/lib/%s.atkinit", andrewDir,sitename); ! sitegloinit = init_Load(init, buffer, (procedure) self->errorProc, (long) self->errorRock,self->forceload) >= 0; if(name != NULL){ sprintf(buffer, "%s/lib/%s.%sinit", andrewDir,sitename, name); ! siteinit = init_Load(init, buffer, (procedure) self->errorProc, ! (long) self->errorRock, self->forceload) >= 0; } } *************** *** 193,200 **** /* try for .NAMEinit and quit if succeed */ if (home != NULL && name != NULL) { sprintf(buffer, "%s/.%sinit", home, name); ! if ((init_Load(init, buffer, self->errorProc, ! self->errorRock, self->forceload)) >= 0) return; } --- 193,200 ---- /* try for .NAMEinit and quit if succeed */ if (home != NULL && name != NULL) { sprintf(buffer, "%s/.%sinit", home, name); ! if ((init_Load(init, buffer, (procedure) self->errorProc, ! (long) self->errorRock, self->forceload)) >= 0) return; } *************** *** 201,207 **** /* try for andrew/lib/global.NAMEinit and continue even if succeed */ if (name != NULL) { sprintf(buffer, "%s/lib/global.%sinit", andrewDir, name); ! HadGlobalNameInit = (init_Load(init, buffer, self->errorProc,self->errorRock, self->forceload)) >= 0; } /* try for ~/.atkinit or ~/.be2init either alone or extending --- 201,207 ---- /* try for andrew/lib/global.NAMEinit and continue even if succeed */ if (name != NULL) { sprintf(buffer, "%s/lib/global.%sinit", andrewDir, name); ! HadGlobalNameInit = (init_Load(init, buffer, (procedure) self->errorProc,(long) self->errorRock, self->forceload)) >= 0; } /* try for ~/.atkinit or ~/.be2init either alone or extending *************** *** 208,219 **** global.NAMEinit quit if succeed */ if (home != NULL) { sprintf(buffer, "%s/.atkinit", home); ! if ((init_Load(init, buffer, self->errorProc, ! self->errorRock, self->forceload)) >= 0) return; sprintf(buffer, "%s/.be2init", home); ! if ((init_Load(init, buffer, self->errorProc, ! self->errorRock, self->forceload)) >= 0 ) return; } --- 208,219 ---- global.NAMEinit quit if succeed */ if (home != NULL) { sprintf(buffer, "%s/.atkinit", home); ! if ((init_Load(init, buffer, (procedure) self->errorProc, ! (long) self->errorRock, self->forceload)) >= 0) return; sprintf(buffer, "%s/.be2init", home); ! if ((init_Load(init, buffer, (procedure) self->errorProc, ! (long) self->errorRock, self->forceload)) >= 0 ) return; } *************** *** 220,226 **** /* as a last resort, try for global.atkinit, but only if there was no global.NAMEinit */ if (! HadGlobalNameInit) { sprintf(buffer, "%s/lib/global.atkinit", andrewDir); ! if ((init_Load(init, buffer, self->errorProc, self->errorRock,self->forceload)) >= 0) return; } --- 220,226 ---- /* as a last resort, try for global.atkinit, but only if there was no global.NAMEinit */ if (! HadGlobalNameInit) { sprintf(buffer, "%s/lib/global.atkinit", andrewDir); ! if ((init_Load(init, buffer, (procedure) self->errorProc, (long) self->errorRock,self->forceload)) >= 0) return; } *** atk/basics/common/app.ch Wed Nov 22 11:49:34 1989 --- atk/basics/common/app.ch.NEW Thu Aug 23 15:42:18 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/basics/common/RCS/app.ch,v 2.10 89/08/30 15:43:32 tpn Exp $ */ /* $ACIS:app.ch 1.3$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/app.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidapplication_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/app.ch,v 2.10 89/08/30 15:43:32 tpn 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/app.ch,v 2.11 90/08/11 18:59:19 ajp Exp $ */ /* $ACIS:app.ch 1.3$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/app.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidapplication_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/app.ch,v 2.11 90/08/11 18:59:19 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ *************** *** 45,52 **** classprocedures: DeleteArgs(char **argv, int num); GetATKVersion() returns char *; ! InitializeObject(struct app *self) returns boolean; ! FinalizeObject(struct app *self); data: boolean fork; boolean forceload,readInitFile; --- 45,52 ---- classprocedures: DeleteArgs(char **argv, int num); GetATKVersion() returns char *; ! InitializeObject(struct application *self) returns boolean; ! FinalizeObject(struct application *self); data: boolean fork; boolean forceload,readInitFile; *** atk/basics/common/atom.ch Wed Nov 22 11:49:35 1989 --- atk/basics/common/atom.ch.NEW Thu Aug 23 15:42: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/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/atom.ch,v 2.6 89/09/27 14:34:07 wjh Exp $ */ /* $ACIS:atom.ch 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/atom.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidatom_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/atom.ch,v 2.6 89/09/27 14:34:07 wjh Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ class atom { --- 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/atom.ch,v 2.7 90/08/11 18:44:20 ajp Exp $ */ /* $ACIS:atom.ch 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/atom.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidatom_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/atom.ch,v 2.7 90/08/11 18:44:20 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ class atom { *************** *** 16,22 **** InternRock(long rock) returns struct atom *; InitializeClass() returns boolean; InitializeObject(struct atom *self) returns boolean; ! FinalizeObject(struct observable *self); macromethods: Name() (self->name) data: --- 16,22 ---- InternRock(long rock) returns struct atom *; InitializeClass() returns boolean; InitializeObject(struct atom *self) returns boolean; ! FinalizeObject(struct atom *self); macromethods: Name() (self->name) data: *** atk/basics/common/bind.c Wed Nov 22 11:48:06 1989 --- atk/basics/common/bind.c.NEW Thu Aug 23 15:42:24 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/basics/common/RCS/bind.c,v 2.4 89/02/17 18:35:24 ghoti Exp $ */ /* $ACIS:bind.c 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/bind.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/bind.c,v 2.4 89/02/17 18:35:24 ghoti Exp $"; #endif /* lint */ /* bind.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/common/RCS/bind.c,v 2.5 90/08/11 19:03:04 ajp Exp $ */ /* $ACIS:bind.c 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/bind.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/bind.c,v 2.5 90/08/11 19:03:04 ajp Exp $"; #endif /* lint */ /* bind.c *************** *** 34,40 **** struct proctable_Entry *pe; if(bl->procName!=NULL) ! pe=proctable_DefineProc(bl->procName, bl->proc,type,bl->module,bl->doc); else pe=NULL; --- 34,40 ---- struct proctable_Entry *pe; if(bl->procName!=NULL) ! pe=proctable_DefineProc(bl->procName, (procedure) bl->proc,type,bl->module,bl->doc); else pe=NULL; *** atk/basics/common/dataobj.c Wed Apr 11 14:18:31 1990 --- atk/basics/common/dataobj.c.NEW Thu Aug 23 15:42:28 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/dataobj.c,v 2.12 90/03/22 09:23:44 ajp Exp $ */ /* $ACIS:dataobj.c 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/dataobj.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/dataobj.c,v 2.12 90/03/22 09:23:44 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/dataobj.c,v 2.12 90/03/22 09:23:44 ajp Exp Locker: bader $ */ /* $ACIS:dataobj.c 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/dataobj.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/dataobj.c,v 2.12 90/03/22 09:23:44 ajp Exp Locker: bader $"; #endif /* lint */ #include *** atk/basics/common/filetype.ch Wed Nov 22 11:49:45 1989 --- atk/basics/common/filetype.ch.NEW Thu Aug 23 15:42: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/basics/common/RCS/filetype.ch,v 2.5 89/02/17 18:36:27 ghoti Exp $ */ /* $ACIS:filetype.ch 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/filetype.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidfiletype_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/filetype.ch,v 2.5 89/02/17 18:36:27 ghoti Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* filetype.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/basics/common/RCS/filetype.ch,v 2.6 90/08/11 19:32:16 ajp Exp $ */ /* $ACIS:filetype.ch 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/filetype.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidfiletype_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/filetype.ch,v 2.6 90/08/11 19:32:16 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* filetype.h *************** *** 28,32 **** */ Lookup(FILE *file, char *filename, /* OUT parameter */ long *objectID, /* OUT parameter */ struct attributes **attributes) returns char *; ! CanonicalizeFilename(canonicalName, name, maxSize); }; --- 28,32 ---- */ Lookup(FILE *file, char *filename, /* OUT parameter */ long *objectID, /* OUT parameter */ struct attributes **attributes) returns char *; ! CanonicalizeFilename(char *canonicalName, char *name, int maxSize); }; *** atk/basics/common/fontdesc.c Mon Aug 6 11:02:38 1990 --- atk/basics/common/fontdesc.c.NEW Thu Aug 23 15:42:34 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.7 90/06/06 14:23:55 gk5g 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.7 90/06/06 14:23:55 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/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 *************** *** 344,350 **** fht = fontdesc_HeightTable (font, graphic); if (fwt == NULL || fht == NULL) return 0; ! fontdesc_StringSize (font, graphic, string, &w, &junk); for (p = string, a = 0, d = 0; *p != (char) 0; p += 1) { fontdesc_CharSummary (font, graphic, *p, &ci); --- 344,350 ---- fht = fontdesc_HeightTable (font, graphic); if (fwt == NULL || fht == NULL) return 0; ! fontdesc_StringSize (font, graphic, string, (long *) &w, (long *) &junk); for (p = string, a = 0, d = 0; *p != (char) 0; p += 1) { fontdesc_CharSummary (font, graphic, *p, &ci); *** atk/basics/common/fontdesc.ch Mon Aug 6 11:02:40 1990 --- atk/basics/common/fontdesc.ch.NEW Thu Aug 23 15:42:38 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.ch,v 2.7 90/06/06 14:25:04 gk5g Exp $ */ /* $ACIS:fontdesc.ch 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/fontdesc.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidfontdesc_H = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/fontdesc.ch,v 2.7 90/06/06 14:25:04 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/basics/common/RCS/fontdesc.ch,v 2.8 90/08/11 19:34:20 ajp Exp $ */ /* $ACIS:fontdesc.ch 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/fontdesc.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidfontdesc_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/fontdesc.ch,v 2.8 90/08/11 19:34:20 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ *************** *** 88,94 **** InitializeObject(struct fontdesc *self) returns boolean; FinalizeObject(struct fontdesc * FontDescObject); Allocate() returns struct fontdesc *; ! Deallocate(struct fontdesc *); data: struct fontnamedesc *FontName; long FontStyles; --- 88,94 ---- InitializeObject(struct fontdesc *self) returns boolean; FinalizeObject(struct fontdesc * FontDescObject); Allocate() returns struct fontdesc *; ! Deallocate(struct fontdesc *self); data: struct fontnamedesc *FontName; long FontStyles; *** atk/basics/common/graphic.c Mon Aug 6 11:02:43 1990 --- atk/basics/common/graphic.c.NEW Thu Aug 23 15:42:43 1990 *************** *** 6,12 **** */ #ifndef LINT ! char graphic_rcsid[] = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/graphic.c,v 2.10 90/06/01 15:38:56 ajp Exp $"; #endif /* LINT */ #include --- 6,12 ---- */ #ifndef LINT ! char graphic_rcsid[] = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/graphic.c,v 2.11 90/08/11 23:36:17 ajp Exp $"; #endif /* LINT */ #include *************** *** 75,81 **** } void graphic__DrawString(self, Text, Operation) ! struct xgraphic * self; char * Text; short Operation; { --- 75,81 ---- } void graphic__DrawString(self, Text, Operation) ! struct graphic * self; char * Text; short Operation; { *************** *** 1110,1116 **** } void graphic__SetDefaultColors(classID, foreground, background) ! struct classinfo *classID; char *foreground; char *background; { --- 1110,1116 ---- } void graphic__SetDefaultColors(classID, foreground, background) ! struct classheader *classID; char *foreground; char *background; { *************** *** 1137,1142 **** --- 1137,1143 ---- } void graphic__GetDefaultColors(classID, foreground, background) + struct classheader *classID; char **foreground; char **background; { *** atk/basics/common/graphic.ch Mon Aug 6 11:02:45 1990 --- atk/basics/common/graphic.ch.NEW Thu Aug 23 15:42:46 1990 *************** *** 3,14 **** * 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/graphic.ch,v 2.12 90/05/09 14:05:25 ajp Exp $ */ /* $ACIS:graphic.ch 1.5$ */ /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/graphic.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidgraphic_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/graphic.ch,v 2.12 90/05/09 14:05:25 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #include --- 3,14 ---- * 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/graphic.ch,v 2.13 90/08/11 20:42:23 ajp Exp $ */ /* $ACIS:graphic.ch 1.5$ */ /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/graphic.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidgraphic_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/graphic.ch,v 2.13 90/08/11 20:42:23 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #include *************** *** 150,156 **** GetClippingRegion(struct region *retRegion) returns struct region *; SetClippingRect(struct rectangle * AdditionalRect); ! SetClippingRectSize(long x, y, w, h); ClearClippingRect(); GetClippingRect(struct rectangle * Rect); --- 150,156 ---- GetClippingRegion(struct region *retRegion) returns struct region *; SetClippingRect(struct rectangle * AdditionalRect); ! SetClippingRectSize(long x, long y, long w, long h); ClearClippingRect(); GetClippingRect(struct rectangle * Rect); *************** *** 174,180 **** WhitePattern() returns struct graphic *; BlackPattern() returns struct graphic *; ! GrayPattern(short IntensityNum, IntensityDenom) returns struct graphic *; /* If colorName is NULL, use the RGB. */ SetForegroundColor(char *colorName, long red, long green, long blue); --- 174,180 ---- WhitePattern() returns struct graphic *; BlackPattern() returns struct graphic *; ! GrayPattern(short IntensityNum, short IntensityDenom) returns struct graphic *; /* If colorName is NULL, use the RGB. */ SetForegroundColor(char *colorName, long red, long green, long blue); *** atk/basics/common/im.c Mon Aug 6 11:03:00 1990 --- atk/basics/common/im.c.NEW Thu Aug 23 15:42: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/basics/common/RCS/im.c,v 2.30 90/07/23 15:00:47 rr2b 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.30 90/07/23 15:00:47 rr2b 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.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. *************** *** 66,72 **** struct zombiehandler { struct zombiehandler *next; int pid; ! long (*function)(); long functionData; }; --- 66,72 ---- struct zombiehandler { struct zombiehandler *next; int pid; ! procedure function; long functionData; }; *************** *** 619,625 **** void im__IOMGRSoftSig(classID,aproc,arock) struct classheader * classID; ! int (*aproc) (); char * arock; { #ifdef LWP --- 619,625 ---- void im__IOMGRSoftSig(classID,aproc,arock) struct classheader * classID; ! procedure aproc; char * arock; { #ifdef LWP *************** *** 872,879 **** self->keyEchoEvent= event_Enqueue(event_Now()+ event_MSECtoTU(KEYECHODELAY), ! startKeyEchoing, ! self); } strcat(self->keyEcho,charToPrintable(key)); --- 872,879 ---- self->keyEchoEvent= event_Enqueue(event_Now()+ event_MSECtoTU(KEYECHODELAY), ! (procedure) startKeyEchoing, ! (char *) self); } strcat(self->keyEcho,charToPrintable(key)); *************** *** 1079,1085 **** enum view_MouseAction action; long x; long y; ! int newButtonState; { register long dest = destroycount; if (self->topLevel != NULL && action != view_NoMouseEvent) { --- 1079,1085 ---- enum view_MouseAction action; long x; long y; ! long newButtonState; { register long dest = destroycount; if (self->topLevel != NULL && action != view_NoMouseEvent) { *************** *** 1169,1175 **** self->cursorPostsPending = FALSE; self->LogFile = NULL; ! atom = atom_InternRock(self); self->header.view.name = atomlist_New(); /* can't use setname here because of a class `feature' */ atomlist_Prepend(self->header.view.name,atom); self->header.view.className = atomlist_StringToAtomlist("im"); --- 1169,1175 ---- self->cursorPostsPending = FALSE; self->LogFile = NULL; ! atom = atom_InternRock((long) self); self->header.view.name = atomlist_New(); /* can't use setname here because of a class `feature' */ atomlist_Prepend(self->header.view.name,atom); self->header.view.className = atomlist_StringToAtomlist("im"); *************** *** 1553,1561 **** boolean im__AddFileHandler (classID, file, proc, procdata, priority) struct classheader *classID; FILE *file; ! int (*proc)(); char *procdata; ! int priority; { register long i; register struct FILEHandlers *p = globalFILEHandlers; --- 1553,1561 ---- boolean im__AddFileHandler (classID, file, proc, procdata, priority) struct classheader *classID; FILE *file; ! procedure proc; char *procdata; ! long priority; { register long i; register struct FILEHandlers *p = globalFILEHandlers; *************** *** 1606,1614 **** boolean im__AddCanOutHandler (classID, file, proc, procdata, priority) struct classheader *classID; FILE *file; ! int (*proc)(); char *procdata; ! int priority; { register long i; register struct FILEHandlers *p = CanOutHandlers; --- 1606,1614 ---- boolean im__AddCanOutHandler (classID, file, proc, procdata, priority) struct classheader *classID; FILE *file; ! procedure proc; char *procdata; ! long priority; { register long i; register struct FILEHandlers *p = CanOutHandlers; *************** *** 1735,1741 **** else if (childDied) { childDied = FALSE; if (cleanUpZombies) { ! #if defined(hp9000s300) && HP_OS < 70 struct sigvec vecAlrm; struct itimerval timer; int pid, status; --- 1735,1741 ---- else if (childDied) { childDied = FALSE; if (cleanUpZombies) { ! #if defined(hpux) && HP_OS < 70 struct sigvec vecAlrm; struct itimerval timer; int pid, status; *************** *** 1775,1784 **** timer.it_value.tv_sec = 0; timer.it_value.tv_usec = 0; setitimer(ITIMER_REAL, &timer, 0); ! #else /* hp9000s300 */ int pid; union wait status; ! while ((pid = wait3 (&status, WNOHANG, 0)) > 0) { struct zombiehandler *thisHandler; for ( thisHandler = allZombieHandlers; thisHandler != NULL --- 1775,1791 ---- timer.it_value.tv_sec = 0; timer.it_value.tv_usec = 0; setitimer(ITIMER_REAL, &timer, 0); ! #else /* any system except HP_OS < 70 */ int pid; + #ifdef hpux + #define WNOHANG 1 + int *status; + while ((pid = (int) wait3 (status, WNOHANG, 0)) > 0) + #else /* any system other than hpux */ union wait status; ! while ((pid = wait3 (&status, WNOHANG, 0)) > 0) ! #endif /* hpux */ ! { struct zombiehandler *thisHandler; for ( thisHandler = allZombieHandlers; thisHandler != NULL *************** *** 1793,1799 **** im_RemoveZombieHandler(pid); } } ! #endif /* hp9000s300 */ } /* cleanUpZombies */ } /* childDied */ --- 1800,1806 ---- im_RemoveZombieHandler(pid); } } ! #endif /* defined(hpux) && HP_OS < 70 */ } /* cleanUpZombies */ } /* childDied */ *************** *** 1833,1839 **** void im__AddZombieHandler(classID, pid, function, functionData) struct classheader *classID; int pid; ! long (*function)(); long functionData; /* Actually any 32 bit crufty. */ { --- 1840,1846 ---- void im__AddZombieHandler(classID, pid, function, functionData) struct classheader *classID; int pid; ! procedure function; long functionData; /* Actually any 32 bit crufty. */ { *************** *** 1939,1945 **** struct event *im__SetInteractionEvent(self, interactionFunction, interactionData, timeIncrement) struct im *self; ! void (*interactionFunction)(); long interactionData; long timeIncrement; { --- 1946,1952 ---- struct event *im__SetInteractionEvent(self, interactionFunction, interactionData, timeIncrement) struct im *self; ! procedure interactionFunction; long interactionData; long timeIncrement; { *** atk/basics/common/im.ch Mon Aug 6 11:03:02 1990 --- atk/basics/common/im.ch.NEW Thu Aug 23 15:42: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/basics/common/RCS/im.ch,v 2.13 90/05/03 12:31:39 gk5g Exp $ */ /* $ACIS:im.ch 1.4$ */ /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/im.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidim_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/im.ch,v 2.13 90/05/03 12:31:39 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/basics/common/RCS/im.ch,v 2.15 90/08/11 23:56:21 ajp Exp $ */ /* $ACIS:im.ch 1.4$ */ /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/im.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidim_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/im.ch,v 2.15 90/08/11 23:56:21 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ *************** *** 45,51 **** struct im_InteractionEvent *next; struct im *im; struct event *event; ! void (*function)(); long data; }; --- 45,51 ---- struct im_InteractionEvent *next; struct im *im; struct event *event; ! procedure function; long data; }; *************** *** 163,170 **** GetGraphic() returns struct graphic *; GetGlobalData() returns struct im_GlobalDataType *; IOMGRCancel(char * imPid); ! IOMGRSelect(long maxnum,long *rmask,long *wmask,long wantTime,struct timeval *retTime) returns boolean; ! IOMGRSoftSig(long unknown1, long unknown2); LWPCurrentProcess(char * curProcessID) returns long; vfileopen(char * mode, struct expandstring *buffer) returns FILE *; vfileclose(FILE *f, struct expandstring *buffer); --- 163,170 ---- GetGraphic() returns struct graphic *; GetGlobalData() returns struct im_GlobalDataType *; IOMGRCancel(char * imPid); ! IOMGRSelect(long maxnum,long *rmask,long *wmask,long *emask,struct timeval *retTime) returns boolean; ! IOMGRSoftSig(procedure aproc, char *arock); LWPCurrentProcess(char * curProcessID) returns long; vfileopen(char * mode, struct expandstring *buffer) returns FILE *; vfileclose(FILE *f, struct expandstring *buffer); *** atk/basics/common/init.c Wed Nov 22 11:48:39 1989 --- atk/basics/common/init.c.NEW Thu Aug 23 15:43:01 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/basics/common/RCS/init.c,v 2.9 89/10/04 18:51:16 cfe Exp $ */ /* $ACIS:init.c 1.5$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/init.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/init.c,v 2.9 89/10/04 18:51:16 cfe Exp $"; #endif /* lint */ /* init.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/common/RCS/init.c,v 2.11 90/08/11 23:46:35 ajp Exp $ */ /* $ACIS:init.c 1.5$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/init.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/init.c,v 2.11 90/08/11 23:46:35 ajp Exp $"; #endif /* lint */ /* init.c *************** *** 86,93 **** /* Next three used for error handling. */ static char *currentFile; static int currentLine = 0; ! static void (*currentErrorProc)() = NULL; ! static pointer currentErrorRock; boolean init__InitializeObject(classID, init) struct classheader *classID; --- 86,93 ---- /* Next three used for error handling. */ static char *currentFile; static int currentLine = 0; ! static procedure currentErrorProc = NULL; ! static long currentErrorRock; boolean init__InitializeObject(classID, init) struct classheader *classID; *************** *** 289,295 **** struct menulist *menulist; menulist = GetMenulist(init, class, inheritFlag); ! menulist_AddToML(menulist, binding, proc, parameterString, 0); } } --- 289,295 ---- struct menulist *menulist; menulist = GetMenulist(init, class, inheritFlag); ! menulist_AddToML(menulist, binding, proc, (long) parameterString, 0); } } *************** *** 615,621 **** } freeItem->next = self->usedMenus; self->usedMenus = freeItem; ! menulist_ChainAfterML(freeItem->menulist, topMenulist, topMenulist); topMenulist = freeItem->menulist; } return topMenulist; --- 615,621 ---- } freeItem->next = self->usedMenus; self->usedMenus = freeItem; ! menulist_ChainAfterML(freeItem->menulist, topMenulist, (long) topMenulist); topMenulist = freeItem->menulist; } return topMenulist; *************** *** 752,759 **** int init__Load(init, filename, errorProc, errorRock, executeImmediately) struct init *init; char *filename; ! void (*errorProc)(); ! pointer errorRock; boolean executeImmediately; /* True if modules should be loaded now. Useful for debugging init files. */ { currentErrorProc = errorProc; --- 752,759 ---- int init__Load(init, filename, errorProc, errorRock, executeImmediately) struct init *init; char *filename; ! procedure errorProc; ! long errorRock; boolean executeImmediately; /* True if modules should be loaded now. Useful for debugging init files. */ { currentErrorProc = errorProc; *** atk/basics/common/init.ch Wed Nov 22 11:49:53 1989 --- atk/basics/common/init.ch.NEW Thu Aug 23 15:43:04 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/basics/common/RCS/init.ch,v 2.6 89/09/01 17:40:18 wjh Exp $ */ /* $ACIS:init.ch 1.4$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/init.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidinit_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/init.ch,v 2.6 89/09/01 17:40:18 wjh Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* init.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/basics/common/RCS/init.ch,v 2.6 89/09/01 17:40:18 wjh Exp $ */ /* $ACIS:init.ch 1.4$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/init.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidinit_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/init.ch,v 2.6 89/09/01 17:40:18 wjh Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* init.H *** atk/basics/common/initfls.help Mon Aug 6 11:03:04 1990 --- atk/basics/common/initfls.help.NEW Thu Aug 23 15:43:08 1990 *************** *** 175,182 **** The syntax of an addmenu command is: ! \example{\bold{addmenu \italic{procedure "menustring" }[\italic{class}] [load ! \italic{class}] [\italic{inheritp}]} } Example: The following line adds \bold{Dynamic Forward} searching to the --- 175,182 ---- The syntax of an addmenu command is: ! \example{\bold{addmenu \italic{procedure "menustring" }[\italic{class}] ! [\italic{load_class}] [\italic{inheritp}]} } Example: The following line adds \bold{Dynamic Forward} searching to the *************** *** 254,268 **** this is not always possible. ! \italic{Load} \italic{class} is used to determine which module must be loaded ! to find \italic{procedure}. If \italic{load class} is omitted, EZ infers the desired class from the first part of \italic{procedure} (the part up to the first hyphen), if possible. The \italic{class} parameter must be present for ! the \italic{load class} parameter to be used. The \italic{inheritp} argument determines whether the class test is an ! inclusion test or an equality test.}\leftindent{ }\leftindent{ }\section{Addkey commands} --- 254,273 ---- this is not always possible. ! \italic{Load_class} is used to determine which module must be loaded ! to find \italic{procedure}. If \italic{load_class} is omitted, EZ infers the desired class from the first part of \italic{procedure} (the part up to the first hyphen), if possible. The \italic{class} parameter must be present for ! the \italic{load_class} parameter to be used. The \italic{inheritp} argument determines whether the class test is an ! inclusion test or an equality test. It is either \bold{inherit} if the ! class test is an inclusion test (i.e., if the menu item is to be added ! to subclasses of \italic{class}) or \bold{noinherit} if the class test ! is an equality test (i.e., if the menu item is to be added to ! \italic{class} but not to its subclasses). If \italic{inheritp} is ! omitted, the test is an inclusion test.}\leftindent{ }\leftindent{ }\section{Addkey commands} *************** *** 277,284 **** The syntax for an addkey command entry is: \leftindent{ ! }\example{\bold{addkey \italic{procedure keysequence} [\italic{class}] [load ! \italic{class}] [\italic{inheritp}]} } Example. The following line binds dynamic searching to the keystroke "^S". --- 282,289 ---- The syntax for an addkey command entry is: \leftindent{ ! }\example{\bold{addkey \italic{procedure keysequence} [\italic{class}] ! [\italic{load_class}] [\italic{inheritp}]} } Example. The following line binds dynamic searching to the keystroke "^S". *************** *** 291,297 **** The addkey command binds the procedure \italic{procedure} to a sequence of ! keystrokes \italic{keysequence}. \italic{Class}, \italic{load class} and \italic{inheritp} are used the same way as with addmenu. --- 296,302 ---- The addkey command binds the procedure \italic{procedure} to a sequence of ! keystrokes \italic{keysequence}. \italic{Class}, \italic{load_class} and \italic{inheritp} are used the same way as with addmenu. *************** *** 298,306 **** To indicate the Esc(ape) key in \italic{keysequence}, use \\e. To indicate the Ctrl (control) key, use ^. - - - \italic{Load class} and\italic{ inheritp} work as described in Addmenu, above. }\section{Addfiletype commands}\leftindent{ --- 303,308 ---- *** atk/basics/common/keystate.c Wed Nov 22 11:48:50 1989 --- atk/basics/common/keystate.c.NEW Thu Aug 23 15:43:10 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/basics/common/RCS/keystate.c,v 2.4 89/02/17 18:37:57 ghoti Exp $ */ /* $ACIS:keystate.c 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/keystate.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/keystate.c,v 2.4 89/02/17 18:37:57 ghoti Exp $"; #endif /* lint */ /* keystate.ch -- A class that keep track of partially evaluated sequences 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/keystate.c,v 2.5 90/08/11 19:47:13 ajp Exp $ */ /* $ACIS:keystate.c 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/keystate.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/keystate.c,v 2.5 90/08/11 19:47:13 ajp Exp $"; #endif /* lint */ /* keystate.ch -- A class that keep track of partially evaluated sequences of keystrokes. *************** *** 67,73 **** enum keystate_ApplyKeyValues keystate__ApplyKey(self, key, ppe, rockP, pobject) struct keystate *self; ! long key; struct proctable_Entry **ppe; long *rockP; struct basicobject **pobject; --- 67,73 ---- enum keystate_ApplyKeyValues keystate__ApplyKey(self, key, ppe, rockP, pobject) struct keystate *self; ! char key; struct proctable_Entry **ppe; long *rockP; struct basicobject **pobject; *** atk/basics/common/menulist.ch Wed Nov 22 11:50:01 1989 --- atk/basics/common/menulist.ch.NEW Thu Aug 23 15:43:12 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/basics/common/RCS/menulist.ch,v 2.7 89/11/12 14:22:34 zs01 Exp $ */ /* $ACIS:menulist.ch 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/menulist.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidmenulist_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/menulist.ch,v 2.7 89/11/12 14:22:34 zs01 Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* menulist.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/basics/common/RCS/menulist.ch,v 2.10 90/08/11 23:07:25 ajp Exp $ */ /* $ACIS:menulist.ch 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/menulist.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidmenulist_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/menulist.ch,v 2.10 90/08/11 23:07:25 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* menulist.H *************** *** 38,47 **** methods: DuplicateML(struct view *view) returns struct menulist *; SetView(struct view *view); ! AddToML(char *menuString, struct procTableEntry *menuProc, long functionData, long mask); DeleteFromML(char *menustring); ClearML(); ! NextME(char **outString, long *outData, struct procTable **outProc) returns boolean; NextBeforeMC() returns struct menulist *; NextAfterMC() returns struct menulist *; ChainBeforeML(struct menulist *chainee, long key); --- 38,47 ---- methods: DuplicateML(struct view *view) returns struct menulist *; SetView(struct view *view); ! AddToML(char *menuString, struct proctable_Entry *menuProc, long functionData, long mask); DeleteFromML(char *menustring); ClearML(); ! NextME(char **outString, long *outData, struct proctable_Entry **outProc) returns boolean; NextBeforeMC() returns struct menulist *; NextAfterMC() returns struct menulist *; ChainBeforeML(struct menulist *chainee, long key); *************** *** 59,65 **** classprocedures: InitializeObject(struct menulist *self) returns boolean; ! FinalizeObject(); Create(struct view *view) returns struct menulist *; /* Version control functions for use by internal modules only. */ NextMLVersion() returns int; --- 59,65 ---- classprocedures: InitializeObject(struct menulist *self) returns boolean; ! FinalizeObject(struct menulist *self); Create(struct view *view) returns struct menulist *; /* Version control functions for use by internal modules only. */ NextMLVersion() returns int; *** atk/basics/common/message.c Wed Nov 22 11:48:54 1989 --- atk/basics/common/message.c.NEW Thu Aug 23 15:43:16 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/basics/common/RCS/message.c,v 2.4 89/02/17 18:38:22 ghoti Exp $ */ /* $ACIS:message.c 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/message.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/message.c,v 2.4 89/02/17 18:38:22 ghoti Exp $"; #endif /* lint */ /* message.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/common/RCS/message.c,v 2.6 90/08/11 23:13:39 ajp Exp $ */ /* $ACIS:message.c 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/message.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/message.c,v 2.6 90/08/11 23:13:39 ajp Exp $"; #endif /* lint */ /* message.c *************** *** 74,81 **** char *prompt, *defaultString, *buffer; int bufferSize; struct keymap *keystate; ! int (*completionProc)(), (*helpProc)(); ! long functionData, flags; { struct msghandler *handler; --- 74,82 ---- char *prompt, *defaultString, *buffer; int bufferSize; struct keymap *keystate; ! procedure completionProc, helpProc; ! long functionData; ! int flags; { struct msghandler *handler; *** atk/basics/common/message.ch Wed Nov 22 11:50:04 1989 --- atk/basics/common/message.ch.NEW Thu Aug 23 15:43:18 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/basics/common/RCS/message.ch,v 2.6 89/06/16 11:57:24 wjh Exp $ */ /* $ACIS:message.ch 1.5$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/message.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidmessage_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/message.ch,v 2.6 89/06/16 11:57:24 wjh Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* message.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/basics/common/RCS/message.ch,v 2.8 90/08/11 23:12:04 ajp Exp $ */ /* $ACIS:message.ch 1.5$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/message.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidmessage_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/message.ch,v 2.8 90/08/11 23:12:04 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* message.H *** atk/basics/common/msghndlr.c Wed Nov 22 11:48:58 1989 --- atk/basics/common/msghndlr.c.NEW Thu Aug 23 15:43: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/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/msghndlr.c,v 2.6 89/02/23 14:05:48 ghoti Exp $ */ /* $ACIS:msghndlr.c 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/msghndlr.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/msghndlr.c,v 2.6 89/02/23 14:05:48 ghoti Exp $"; #endif /* lint */ /* Complete bogosity. */ --- 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/msghndlr.c,v 2.9 90/08/12 00:07:43 ajp Exp $ */ /* $ACIS:msghndlr.c 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/msghndlr.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/msghndlr.c,v 2.9 90/08/12 00:07:43 ajp Exp $"; #endif /* lint */ /* Complete bogosity. */ *************** *** 37,45 **** int priority; char *prompt, *defaultString, *buffer; int bufferSize; ! struct keymap *keystate; ! int (*completionProc)(), (*helpProc)(); ! long functionData, flags; { return -1; } --- 37,46 ---- int priority; char *prompt, *defaultString, *buffer; int bufferSize; ! struct keystate *keystate; ! procedure completionProc, helpProc; ! long functionData; ! int flags; { return -1; } *** atk/basics/common/observe.ch Wed Nov 22 11:50:12 1989 --- atk/basics/common/observe.ch.NEW Thu Aug 23 15:43:23 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/basics/common/RCS/observe.ch,v 2.11 89/06/23 16:45:02 wjh Exp $ */ /* $ACIS:observe.ch 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/observe.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidobservable_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/observe.ch,v 2.11 89/06/23 16:45:02 wjh Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #define observable_VERSION 1 --- 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/observe.ch,v 2.13 90/08/11 23:21:01 ajp Exp $ */ /* $ACIS:observe.ch 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/observe.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidobservable_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/observe.ch,v 2.13 90/08/11 23:21:01 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #define observable_VERSION 1 *************** *** 18,24 **** AddObserver (struct thisobject *observer); RemoveObserver (struct thisobject *observer); NotifyObservers (long value); ! ObservedChanged (struct thisobject *changed, long value); /* the following methods implement a scheme for "triggers", a set of named messages, each trigger must first be --- 18,24 ---- AddObserver (struct thisobject *observer); RemoveObserver (struct thisobject *observer); NotifyObservers (long value); ! ObservedChanged (struct observable *changed, long value); /* the following methods implement a scheme for "triggers", a set of named messages, each trigger must first be *************** *** 61,71 **** InitializeObject(struct observable *self) returns boolean; FinalizeObject(struct observable *self); ! DefineTrigger(struct basicsobject *classinstance, struct atom *trigger); /* associate the atom as a possible trigger for the class. The xxx_InitializeClass routine can use xxx_classinfo as the first argument. */ ! ListTriggers(struct basicsobject *classinstance) returns struct atomlist *; /* returns a list of the triggers defined for the class and all super classes. The returned value has been newly created and must be atomlist_Destroy()ed by the caller. --- 61,71 ---- InitializeObject(struct observable *self) returns boolean; FinalizeObject(struct observable *self); ! DefineTrigger(struct basicobject *classinstance, struct atom *trigger); /* associate the atom as a possible trigger for the class. The xxx_InitializeClass routine can use xxx_classinfo as the first argument. */ ! ListTriggers(struct basicobject *classinstance) returns struct atomlist *; /* returns a list of the triggers defined for the class and all super classes. The returned value has been newly created and must be atomlist_Destroy()ed by the caller. *** atk/basics/common/pixelimg.c Wed Nov 22 11:49:05 1989 --- atk/basics/common/pixelimg.c.NEW Thu Aug 23 15:43:26 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/basics/common/RCS/pixelimg.c,v 2.9 89/08/03 12:05:20 ghoti Exp $ */ /* $ACIS:pixelimg.c 1.7$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/pixelimg.c,v $ */ #ifndef lint ! char *pixelimage_rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/pixelimg.c,v 2.9 89/08/03 12:05:20 ghoti 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/basics/common/RCS/pixelimg.c,v 2.10 90/08/11 20:41:40 ajp Exp $ */ /* $ACIS:pixelimg.c 1.7$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/pixelimg.c,v $ */ #ifndef lint ! char *pixelimage_rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/pixelimg.c,v 2.10 90/08/11 20:41:40 ajp Exp $"; #endif /* lint */ *************** *** 41,47 **** */ void pixelimage__ClipRange(ClassID, tstart, tlength, start, length) ! struct classhdr *ClassID; long *tstart, *tlength; register long start, length; { --- 41,47 ---- */ void pixelimage__ClipRange(ClassID, tstart, tlength, start, length) ! struct classheader *ClassID; long *tstart, *tlength; register long start, length; { *************** *** 840,846 **** Frees the 'bits', if any. */ void pixelimage__FinalizeObject(ClassID, self) ! struct classhdr *ClassID; register struct pixelimage *self; { if (self->bits != NULL) --- 840,846 ---- Frees the 'bits', if any. */ void pixelimage__FinalizeObject(ClassID, self) ! struct classheader *ClassID; register struct pixelimage *self; { if (self->bits != NULL) *************** *** 855,861 **** Returns the new pixelimage object. */ struct pixelimage *pixelimage__Create(ClassID, width, height) ! struct classhdr *ClassID; long width, height; { struct pixelimage *ras = pixelimage_New(); --- 855,861 ---- Returns the new pixelimage object. */ struct pixelimage *pixelimage__Create(ClassID, width, height) ! struct classheader *ClassID; long width, height; { struct pixelimage *ras = pixelimage_New(); *** atk/basics/common/proctbl.ch Wed Nov 22 11:50:15 1989 --- atk/basics/common/proctbl.ch.NEW Thu Aug 23 15:43:31 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/basics/common/RCS/proctbl.ch,v 2.8 89/05/21 22:58:20 wjh Exp $ */ /* $ACIS:proctbl.ch 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/proctbl.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidproctable_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/proctbl.ch,v 2.8 89/05/21 22:58:20 wjh Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* proctbl.ch -- A module that manages a mapping from strings to procedure pointers. --- 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/proctbl.ch,v 2.10 90/08/11 20:03:44 ajp Exp $ */ /* $ACIS:proctbl.ch 1.2$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/proctbl.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidproctable_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/proctbl.ch,v 2.10 90/08/11 20:03:44 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* proctbl.ch -- A module that manages a mapping from strings to procedure pointers. *************** *** 71,83 **** classprocedures: InitializeClass() returns boolean; /* called automagically */ /* Only the name field is required. Later calls to DefineProc will update an existing entry. */ ! DefineProc(char *name, procedure *proc, struct classinfo *type, char *module, char *doc) returns struct proctable_Entry *; DefineProcs(struct proctable_Description *procs); ! DefineTypedProc(char *name, procedure *proc, struct classinfo *type, ! char *module, char *doc, enum proctable_Type returntype) returns struct proctable_Entry *; DefineProcsWithTypes(struct proctable_DescriptionWithType *procs); Lookup(char *name) returns struct proctable_Entry *; ! Enumerate(procedure *proc, char *procdata); ForceLoaded(struct proctable_Entry *pe); }; --- 71,83 ---- classprocedures: InitializeClass() returns boolean; /* called automagically */ /* Only the name field is required. Later calls to DefineProc will update an existing entry. */ ! DefineProc(char *name, procedure proc, struct classinfo *type, char *module, char *doc) returns struct proctable_Entry *; DefineProcs(struct proctable_Description *procs); ! DefineTypedProc(char *name, procedure proc, struct classinfo *type, ! char *module, char *doc, enum proctable_type returntype) returns struct proctable_Entry *; DefineProcsWithTypes(struct proctable_DescriptionWithType *procs); Lookup(char *name) returns struct proctable_Entry *; ! Enumerate(procedure proc, char *procdata); ForceLoaded(struct proctable_Entry *pe); }; *** atk/basics/common/profile.c Mon Aug 6 11:03:09 1990 --- atk/basics/common/profile.c.NEW Thu Aug 23 15:43:33 1990 *************** *** 18,26 **** #endif /* #ifndef SYSV */ #endif /* #ifdef AIX */ ! #if (!defined(AIX) && !defined(_IBMR2)) #include ! #endif /* (!defined(AIX) && !defined(_IBMR2)) */ #include --- 18,26 ---- #endif /* #ifndef SYSV */ #endif /* #ifdef AIX */ ! #if (!defined(AIX) && !defined(_IBMR2) && !defined(HP300_ENV)) #include ! #endif /* (!defined(AIX) && !defined(_IBMR2) && !defined(HP300_ENV)) */ #include *** atk/basics/common/profile.ch Wed Nov 22 11:50:16 1989 --- atk/basics/common/profile.ch.NEW Thu Aug 23 15:43:35 1990 *************** *** 19,25 **** package profile { classprocedures: Start(char *textbase, long textlength, char *filename) returns int; ! StartClass(char *classname, *filename) returns int; Stop() returns int; Active() returns int; macros: --- 19,25 ---- package profile { classprocedures: Start(char *textbase, long textlength, char *filename) returns int; ! StartClass(char *classname, char *filename) returns int; Stop() returns int; Active() returns int; macros: *** atk/basics/common/rm.c Mon Aug 6 11:03:13 1990 --- atk/basics/common/rm.c.NEW Thu Aug 23 15:43: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/projects/andrew/atk/basics/common/RCS/rm.c,v 2.6 90/06/04 13:38:55 gk5g Exp $ */ /* $ACIS:rm.c 1.5$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/rm.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/rm.c,v 2.6 90/06/04 13:38:55 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/atk/basics/common/RCS/rm.c,v 2.8 90/08/17 14:44:31 ajp Exp $ */ /* $ACIS:rm.c 1.5$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/rm.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/rm.c,v 2.8 90/08/17 14:44:31 ajp Exp $"; #endif /* lint */ #include *************** *** 88,94 **** { if (namespace_Boundp( (*tree)->children, atomlist_TraversalAtom(name, namecar), ! &nexttree ) && FindResource( name, namecdr, class, classcdr, &nexttree )) { #if DEBUG_RM --- 88,94 ---- { if (namespace_Boundp( (*tree)->children, atomlist_TraversalAtom(name, namecar), ! (long *) &nexttree ) && FindResource( name, namecdr, class, classcdr, &nexttree )) { #if DEBUG_RM *************** *** 108,114 **** != atomlist_TraversalAtom(name,namecar) && namespace_Boundp( (*tree)->children, atomlist_TraversalAtom(class, classcar), ! &nexttree ) && FindResource(name, namecdr, class, classcdr, &nexttree )) { #if DEBUG_RM --- 108,114 ---- != atomlist_TraversalAtom(name,namecar) && namespace_Boundp( (*tree)->children, atomlist_TraversalAtom(class, classcar), ! (long *) &nexttree ) && FindResource(name, namecdr, class, classcdr, &nexttree )) { #if DEBUG_RM *************** *** 200,206 **** { if (namespace_Boundp( (*tree)->children, atomlist_TraversalAtom(name, namecar), ! &nexttree ) && FindManyResources( resources, name, namecdr, class, classcdr, &nexttree )) { #if DEBUG_RM --- 200,206 ---- { if (namespace_Boundp( (*tree)->children, atomlist_TraversalAtom(name, namecar), ! (long *) &nexttree ) && FindManyResources( resources, name, namecdr, class, classcdr, &nexttree )) { #if DEBUG_RM *************** *** 220,226 **** != atomlist_TraversalAtom(name,namecar) && namespace_Boundp( (*tree)->children, atomlist_TraversalAtom(class, classcar), ! &nexttree ) && FindManyResources(resources, name, namecdr, class, classcdr, &nexttree )) { --- 220,226 ---- != atomlist_TraversalAtom(name,namecar) && namespace_Boundp( (*tree)->children, atomlist_TraversalAtom(class, classcar), ! (long *) &nexttree ) && FindManyResources(resources, name, namecdr, class, classcdr, &nexttree )) { *************** *** 296,303 **** if (namespace_Boundp( tree->data, type, data )) gotgooddata = TRUE; else ! if (namespace_Boundp( converters, type, &toconverters ) && ! ((fromtype = namespace_Enumerate(tree->data, Convertp, toconverters)) >= 0)) { converter = (procedure)namespace_GetValue( toconverters, --- 296,303 ---- if (namespace_Boundp( tree->data, type, data )) gotgooddata = TRUE; else ! if (namespace_Boundp( converters, type, (long *) &toconverters ) && ! ((fromtype = namespace_Enumerate(tree->data, Convertp, (long) toconverters)) >= 0)) { converter = (procedure)namespace_GetValue( toconverters, *************** *** 329,341 **** { struct namespace * toconverters; ! if (!namespace_Boundp( converters, to, &toconverters )) { toconverters = namespace_New(); ! namespace_SetValue( converters, to, toconverters ); } ! namespace_SetValue( toconverters, from, converter ); } --- 329,341 ---- { struct namespace * toconverters; ! if (!namespace_Boundp( converters, to, (long *) &toconverters )) { toconverters = namespace_New(); ! namespace_SetValue( converters, to, (long) toconverters ); } ! namespace_SetValue( toconverters, from, (long) converter ); } *************** *** 349,355 **** while (car != NULL) { if (!namespace_Boundp( tree->children, ! atomlist_TraversalAtom(path,car), &tree )) { struct resourceTree * newTree; newTree = (struct resourceTree *)malloc(sizeof( struct resourceTree )); --- 349,355 ---- while (car != NULL) { if (!namespace_Boundp( tree->children, ! atomlist_TraversalAtom(path,car), (long *) &tree )) { struct resourceTree * newTree; newTree = (struct resourceTree *)malloc(sizeof( struct resourceTree )); *************** *** 357,363 **** newTree->children = namespace_New(); namespace_SetValue( tree->children, atomlist_TraversalAtom(path,car), ! newTree ); tree = newTree; } car = atomlist_TraversalNext( path, car ); --- 357,363 ---- newTree->children = namespace_New(); namespace_SetValue( tree->children, atomlist_TraversalAtom(path,car), ! (long) newTree ); tree = newTree; } car = atomlist_TraversalNext( path, car ); *************** *** 472,484 **** } ! void rm__GetManyResources( classID, resources, name, class, type, data ) struct classheader *classID; struct resourceList* resources; struct atomlist * name; struct atomlist * class; - struct atom * type; - long * data; { int x; struct resourceTree * tree = resourceTree; --- 472,482 ---- } ! void rm__GetManyResources( classID, resources, name, class) struct classheader *classID; struct resourceList* resources; struct atomlist * name; struct atomlist * class; { int x; struct resourceTree * tree = resourceTree; *** atk/basics/common/rm.ch Wed Nov 22 11:50:19 1989 --- atk/basics/common/rm.ch.NEW Thu Aug 23 15:43: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/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/rm.ch,v 2.5 89/02/17 18:40:29 ghoti Exp $ */ /* $ACIS:rm.ch 1.5$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/rm.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidrm_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/basics/common/RCS/rm.ch,v 2.5 89/02/17 18:40:29 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/basics/common/RCS/rm.ch,v 2.6 90/08/11 23:16:57 ajp Exp $ */ /* $ACIS:rm.ch 1.5$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/rm.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidrm_H = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/rm.ch,v 2.6 90/08/11 23:16:57 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ *************** *** 26,32 **** { classprocedures: InitializeClass() returns boolean; ! ContextualPostResource( struct atomlist * context, * path, long data, struct atom * type ); PostResource( struct atomlist * path, long data, struct atom * type ); --- 26,32 ---- { classprocedures: InitializeClass() returns boolean; ! ContextualPostResource( struct atomlist * context, struct atomlist *path, long data, struct atom * type ); PostResource( struct atomlist * path, long data, struct atom * type ); *** atk/basics/common/view.c Mon Aug 6 11:03:15 1990 --- atk/basics/common/view.c.NEW Thu Aug 23 15:43: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/src/projects/andrew/atk/basics/common/RCS/view.c,v 2.9 90/05/09 14:05:15 ajp Exp $ */ /* $ACIS:view.c 1.5$ */ /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/view.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/view.c,v 2.9 90/05/09 14:05:15 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/basics/common/RCS/view.c,v 2.10 90/08/17 14:42:45 ajp Exp $ */ /* $ACIS:view.c 1.5$ */ /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/view.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/basics/common/RCS/view.c,v 2.10 90/08/17 14:42:45 ajp Exp $"; #endif /* lint */ *************** *** 99,105 **** if (!self->name_explicitly_set) if (dataobject != NULL && ! dataobject_Get(dataobject, A_name, &A_atomlist, &newname)) self->name = atomlist_Copy(newname); else if (self->name == NULL) self->name = atomlist_StringToAtomlist(class_GetTypeName(self)); --- 99,105 ---- if (!self->name_explicitly_set) if (dataobject != NULL && ! dataobject_Get(dataobject, A_name, &A_atomlist, (long *) &newname)) self->name = atomlist_Copy(newname); else if (self->name == NULL) self->name = atomlist_StringToAtomlist(class_GetTypeName(self)); *************** *** 108,114 **** self->className = atomlist_StringToAtomlist(class_GetTypeName(self)); if (dataobject != NULL && ! dataobject_Get(dataobject, A_context, &A_atomlist, &context)) { atomlist_JoinToBeginning(self->name, context); atomlist_JoinToBeginning(self->className, context); --- 108,114 ---- self->className = atomlist_StringToAtomlist(class_GetTypeName(self)); if (dataobject != NULL && ! dataobject_Get(dataobject, A_context, &A_atomlist, (long *) &context)) { atomlist_JoinToBeginning(self->name, context); atomlist_JoinToBeginning(self->className, context); *** atk/basics/common/view.ch Mon Aug 6 11:03:17 1990 --- atk/basics/common/view.ch.NEW Thu Aug 23 15:44:01 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.10 90/05/09 14:06:07 ajp 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.10 90/05/09 14:06:07 ajp 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.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) */ *************** *** 71,77 **** class view : observable[observe] { overrides: ! ObservedChanged (struct thisobject *changed, long value); methods: SetName( struct atomlist * name ); GetName() returns struct atomlist *; --- 71,77 ---- class view : observable[observe] { overrides: ! ObservedChanged (struct observable *changed, long value); methods: SetName( struct atomlist * name ); GetName() returns struct atomlist *; *************** *** 116,122 **** /* View linking/unlinking functions. */ LinkTree(struct view *parent); UnlinkTree(); ! IsAncestor(possibleAncestor) returns boolean; UnlinkNotification(struct view *unlinkedTree); GetWindowManagerType() returns char *; --- 116,122 ---- /* View linking/unlinking functions. */ LinkTree(struct view *parent); UnlinkTree(); ! IsAncestor(struct view *possibleAncestor) returns boolean; UnlinkNotification(struct view *unlinkedTree); GetWindowManagerType() returns char *; *************** *** 240,248 **** GrayPattern(IntensityNum, IntensityDenom) (graphic_GrayPattern((self)->drawable,(IntensityNum),(IntensityDenom))) SetForegroundColor(char *colorName, red, green, blue) (graphic_SetForegroundColor((self)->drawable, (colorName), (red), (green), (blue))) ! GetForegroundColor(retred, retblue, retgreen) (graphic_GetForegroundColor((self)->drawable,(retred), (retgreen), (retblue))) ! SetBackgroundColor(char *colorName, red, green, blue ) (graphic_SetBackgroundColor((self)->drawable, (colorName), (red),(green),(blue))) ! GetBackgroundColor(retred, retgreen, retblue) (graphic_GetBackgroundColor((self)->drawable,(retred), (retgreen),(retblue))) SetFGColor(red, green, blue) (graphic_SetFGColor((self)->drawable,(red),(green),(blue))) GetFGColor(red, green, blue) (graphic_GetFGColor((self)->drawable,(red),(green),(blue))) --- 240,248 ---- GrayPattern(IntensityNum, IntensityDenom) (graphic_GrayPattern((self)->drawable,(IntensityNum),(IntensityDenom))) SetForegroundColor(char *colorName, red, green, blue) (graphic_SetForegroundColor((self)->drawable, (colorName), (red), (green), (blue))) ! GetForegroundColor(name, retred, retgreen, retblue) (graphic_GetForegroundColor((self)->drawable, (name), (retred), (retgreen), (retblue))) ! SetBackgroundColor(char *colorName, red, green, blue ) (graphic_SetBackgroundColor((self)->drawable, (colorName), (red),(green),(blue))) ! GetBackgroundColor(name, retred, retgreen, retblue) (graphic_GetBackgroundColor((self)->drawable,(name), (retred), (retgreen),(retblue))) SetFGColor(red, green, blue) (graphic_SetFGColor((self)->drawable,(red),(green),(blue))) GetFGColor(red, green, blue) (graphic_GetFGColor((self)->drawable,(red),(green),(blue))) *** atk/champ/match.c Wed Nov 22 11:53:33 1989 --- atk/champ/match.c.NEW Thu Aug 23 15:44:29 1990 *************** *** 149,155 **** X = ((3*C) / 4) - 12; /* Count of dropped leap years */ Z = ((8*C+5)/25) - 5; /* Moon-orbit static correction */ D = ((5*year)/4) - X - 10; ! E = (11*G + 20 + Z - X) % 30; if ((E == 24) || (E == 25 && G > 11)) ++E; /* ``Epact'' */ N = 44 - E; if (N < 21) N += 30; /* Paschal full moon */ --- 149,157 ---- X = ((3*C) / 4) - 12; /* Count of dropped leap years */ Z = ((8*C+5)/25) - 5; /* Moon-orbit static correction */ D = ((5*year)/4) - X - 10; ! E = (11*G + 20 + Z - X); ! while (E < 0) E += 30; ! E = E % 30; if ((E == 24) || (E == 25 && G > 11)) ++E; /* ``Epact'' */ N = 44 - E; if (N < 21) N += 30; /* Paschal full moon */ *** atk/console/cmd/Imakefile Mon Aug 6 11:04:09 1990 --- atk/console/cmd/Imakefile.NEW Tue Sep 4 16:04:50 1990 *************** *** 5,10 **** --- 5,16 ---- LOCALINCLUDES = -I../lib + #ifdef RESOLVER_ENV + RESOLVER_LIB = $(RESOLVLIB) + #else + RESOLVER_LIB = + #endif /* RESOLVER_ENV */ + DOBJS = $(VICEDOBJS) consolea.do IHFILES = $(VICEIHFILES) consolea.ih OBJS = consolea.o mailmon.o notop.o $(VICEOBJS) frlibcmu.o *************** *** 13,19 **** ../lib/libconsole.a \ $(BASEDIR)/lib/liberrors.a \ $(UTILLIB) \ ! $(RESOLVLIB) NormalObjectRule() NormalATKRule() --- 19,25 ---- ../lib/libconsole.a \ $(BASEDIR)/lib/liberrors.a \ $(UTILLIB) \ ! $(RESOLVER_LIB) NormalObjectRule() NormalATKRule() *** atk/console/cmd/consolea.c Wed Nov 22 11:55:30 1989 --- atk/console/cmd/consolea.c.NEW Thu Aug 23 15:44:50 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/sm/releases/X.V11R4/andrew/atk/console/cmd/RCS/consolea.c,v 1.11 89/10/04 18:56:59 cfe Exp $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/console/cmd/RCS/consolea.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/console/cmd/RCS/consolea.c,v 1.11 89/10/04 18:56:59 cfe 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.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 */ /* *************** *** 30,37 **** #include #include #include - boolean consoleapp__InitializeObject(classID,self) struct classheader *classID; struct consoleapp *self; --- 30,37 ---- #include #include #include + #include boolean consoleapp__InitializeObject(classID,self) struct classheader *classID; struct consoleapp *self; *************** *** 56,61 **** --- 56,62 ---- * These 3 routines are the heart of the consoleapp interface */ int ForceErrorMonitoring = FALSE; + int InhibitErrorMonitoring = FALSE; boolean consoleapp__ParseArgs(self,argc,argv) struct consoleapp *self; *************** *** 82,87 **** --- 83,91 ---- case 'c': ForceErrorMonitoring = TRUE; break; + case 'C': + InhibitErrorMonitoring = TRUE; + break; case 'D': MYDEBUGGING = TRUE; mydbg(("Entering my debugging mode\n")); *************** *** 143,149 **** --- 147,158 ---- boolean consoleapp__InitializeClass(classID) struct classheader *classID; { + char *s; consoleClass_StaticEntry; logview_StaticEntry; + if ((s = environ_GetConfiguration("InhibitErrorMonitoring")) != NULL) + InhibitErrorMonitoring = TRUE; + if ((s = environ_GetConfiguration("ForceErrorMonitoring")) != NULL) + ForceErrorMonitoring = TRUE; return(TRUE); } *** atk/console/lib/errmonf.c Mon Aug 6 11:04:19 1990 --- atk/console/lib/errmonf.c.NEW Thu Aug 23 15:45:09 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/src/projects/andrew/atk/console/lib/RCS/errmonf.c,v 2.9 90/07/16 16:17:17 gk5g Exp $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/console/lib/RCS/errmonf.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/console/lib/RCS/errmonf.c,v 2.9 90/07/16 16:17:17 gk5g 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/atk/console/lib/RCS/errmonf.c,v 2.10 90/08/13 10:38:15 ajp Exp $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/lib/RCS/errmonf.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/lib/RCS/errmonf.c,v 2.10 90/08/13 10:38:15 ajp Exp $"; #endif /* lint */ /* *************** *** 30,36 **** --- 30,38 ---- #include #include #include + #ifndef HP300_ENV #include + #endif /* HP300_ENV */ #include /* #include */ #include *** atk/console/lib/errormon.c Mon Aug 6 11:04:21 1990 --- atk/console/lib/errormon.c.NEW Thu Aug 23 15:45:14 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/src/projects/andrew/atk/console/lib/RCS/errormon.c,v 2.18 90/06/19 19:36:00 gk5g Exp Locker: gk5g $ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/console/lib/RCS/errormon.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/console/lib/RCS/errormon.c,v 2.18 90/06/19 19:36:00 gk5g Exp Locker: gk5g $"; #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/atk/console/lib/RCS/errormon.c,v 2.20 90/08/20 17:35:06 gk5g Exp $ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/lib/RCS/errormon.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/console/lib/RCS/errormon.c,v 2.20 90/08/20 17:35:06 gk5g Exp $"; #endif /* lint */ /* *************** *** 53,59 **** #define TIOCSCONS _IO(t, 104) #endif /* ibm032 */ ! extern int ForceErrorMonitoring; extern CheckErrorsIn(); extern CheckConsoleSocket(); --- 53,59 ---- #define TIOCSCONS _IO(t, 104) #endif /* ibm032 */ ! extern int ForceErrorMonitoring, InhibitErrorMonitoring; extern CheckErrorsIn(); extern CheckConsoleSocket(); *************** *** 97,103 **** int flags; mydbg(("entering: InitErrorMonitoring\n")); ! if (environ_Get("WMHOST") && !ForceErrorMonitoring) { ReportInternalError(self, "console: Not monitoring errors on remote machine"); return(-1); } --- 97,103 ---- int flags; mydbg(("entering: InitErrorMonitoring\n")); ! if (InhibitErrorMonitoring || environ_Get("WMHOST") && !ForceErrorMonitoring) { ReportInternalError(self, "console: Not monitoring errors on remote machine"); return(-1); } *************** *** 116,130 **** ReportInternalError(self, ErrTxt); return(-1); } - #ifdef ibm032 - /* Horrendous compatibility hack */ - if (ioctl (tempfd, TIOCSCONS) < 0) { - if (ioctl (tempfd, TIOCCONS, 0) < 0) { - ReportInternalError(self, "console: Incomplete error monitoring: ioctl (TIOCSCONS) failed"); - return(-1); - } - } - #else /* ibm032 */ #ifdef TIOCCONS { int ON = 1; --- 116,121 ---- *************** *** 208,214 **** } #endif /* vax */ #endif /* TIOCCONS */ - #endif /* ibm032 */ ErrorsIn = fdopen(SubChannel, "r"); flags = fcntl(fileno(ErrorsIn), F_GETFL, 0); fcntl(fileno(ErrorsIn), F_SETFL, flags | FNDELAY); --- 199,204 ---- *** atk/console/stats/ps_aix12/Imakefile Tue Sep 4 16:39:57 1990 --- atk/console/stats/ps_aix12/Imakefile.NEW Fri Aug 24 09:36:08 1990 *************** *** 0 **** --- 1,11 ---- + /* ********************************************************************** *\ + * Copyright IBM Corporation 1988,1989 - All Rights Reserved * + * For full copyright information see:'andrew/config/COPYRITE' * + \* ********************************************************************** */ + LOCALINCLUDES = -I../../lib + + DependTarget() + NormalObjectRule() + + LibraryTarget(libgs.a, getstats.o) + *** atk/console/stats/ps_aix12/getstats.c Tue Sep 4 16:40:18 1990 --- atk/console/stats/ps_aix12/getstats.c.NEW Fri Aug 24 09:36:11 1990 *************** *** 0 **** --- 1,76 ---- + /* ********************************************************************** *\ + * 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/stats/ps_aix12/RCS/getstats.c,v 1.1 89/09/29 13:03:52 cfe Exp $ */ + /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/console/stats/ps_aix12/RCS/getstats.c,v $ */ + + #ifndef lint + static char *getstats_c_id = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/console/stats/ps_aix12/RCS/getstats.c,v 1.1 89/09/29 13:03:52 cfe Exp $"; + #endif /* lint */ + + /* ********************************************************************** + * **************** + * STUB LIBRARY FILE---NOT YET IMPLEMENTED FOR THIS SYSTEM + * THIS CODE SHOULD BE REPLACED BY AN IMPLEMENTATION OF + * THE RELEVANT ROUTINES FOR YOUR MACHINE TYPE. + * Please contribute your implementations to info-andrew-bugs@andrew.cmu.edu. + * You may use any of the other ..//getstats.c files as templates. + * **************** + * + * This code is designed to read what might be priveledged (setuid) + * information regarding both Disk Statistics (% full) and a host of + * stats from /dev/kmem (including but not limited to, CPU, I/O, and VM) + * + * When retriving the data - this program will print out to stdout + * a string in the form of either "%d:%d\n" or "%d:%d:%s\n" + * The latter case is for passing the name of where a disk is mounted + * back to the parent program. + * + * The parent program (Console, or any other program which wishes to get + * at this information) is responsible for setting up a pipe, binding the + * child's (this program) stdout to one end of a pipe, and parsing the + * strings which are passed back. + * + * The basic string format is an ID (int), a colon, a value (int), and + * optionally another colon followed by a string. The ID is coded from + * the included file "getstats.h" - ID values 50 and over represent + * ERRORS as documented in the above mentioned inclued file. When an + * ERROR or the optional string is passed, the value (second parameter) + * can be safely ignored, and is usually set to 0. + * + * The arguments to be passed to this program are the effective UID from + * the parent program, a polling frequency (# of seconds) for checking + * /dev/kmem (usually between 1 and 5, must be > 0), and a polling + * frequency for checking how full the local disks are (generally higher + * than the value for /dev/kmem, but could vary greatly). Thus the call + * is: + * + * execvp("getstats", argv) + * + * with argv as: + * + * argv[0]="getstats"; + * argv[1]=~ ("%d", UID); + * argv[2]=~ ("%d", kmempollfrequency); + * argv[3]=~ ("%d", diskpollfrequency); + * argv[4]=NULL; + * + ********************************************************************** */ + #include + + #include + + GetGVMStats(UsersID) + int UsersID; + { + } + + InitGVMStats() + { + } + + GetDiskStats(Init) + int Init; + { + } *** atk/ctext/ctext.tpl Wed Nov 22 12:00:58 1989 --- atk/ctext/ctext.tpl.NEW Tue Sep 4 16:05:50 1990 *************** *** 2,10 **** \textdsversion{12} \define{comment attr:[FontFace Italic Int Set] ! attr:[FontFace FixedFace Int Clear] attr:[FontSize PreviousFontSize Point 2] ! attr:[FontFamily Andy Int 0]} \define{function attr:[FontFace Bold Int Set]} \define{global --- 2,10 ---- \textdsversion{12} \define{comment attr:[FontFace Italic Int Set] ! attr:[FontFace FixedFace Int Set] attr:[FontSize PreviousFontSize Point 2] ! attr:[FontFamily AndyType Int 0]} \define{function attr:[FontFace Bold Int Set]} \define{global *** atk/ez/eza.c Mon Aug 6 11:06:02 1990 --- atk/ez/eza.c.NEW Fri Aug 24 11:47:16 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.10 90/07/09 14:59:34 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.10 90/07/09 14:59:34 gk5g 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.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 *************** *** 150,156 **** result.buffer = NULL; result.bufferclock = CkpLatency - 1; /* (number + 1) * CKPINTERVAL seconds is how often a given buffer can be checkpointed. */ ! buffer_Enumerate(FindCkpBuffer, &result); if (result.buffer != NULL) { int closeCode; --- 150,156 ---- result.buffer = NULL; result.bufferclock = CkpLatency - 1; /* (number + 1) * CKPINTERVAL seconds is how often a given buffer can be checkpointed. */ ! buffer_Enumerate(FindCkpBuffer, (long) &result); if (result.buffer != NULL) { int closeCode; *************** *** 157,163 **** im_SetProcessCursor(waitCursor); if (buffer_Visible(result.buffer)) ! buffer_EnumerateViews(result.buffer, CkpMessage, "Checkpointing..."); im_ForceUpdate(); if ((closeCode = buffer_WriteToFile(result.buffer, buffer_GetCkpFilename(result.buffer), 0)) >= 0) { --- 157,163 ---- im_SetProcessCursor(waitCursor); if (buffer_Visible(result.buffer)) ! buffer_EnumerateViews(result.buffer, CkpMessage, (long) "Checkpointing..."); im_ForceUpdate(); if ((closeCode = buffer_WriteToFile(result.buffer, buffer_GetCkpFilename(result.buffer), 0)) >= 0) { *************** *** 166,175 **** } if (buffer_Visible(result.buffer)) ! buffer_EnumerateViews(result.buffer, CkpMessage, closeCode ? "Checkpoint Failed." : "Checkpointed."); im_SetProcessCursor(NULL); } ! im_EnqueueEvent(Checkpoint, 0, event_SECtoTU(CkpInterval)); } void SetBufferCkpLatency(frame, key) --- 166,175 ---- } if (buffer_Visible(result.buffer)) ! buffer_EnumerateViews(result.buffer, CkpMessage, (long)(closeCode ? "Checkpoint Failed." : "Checkpointed.")); im_SetProcessCursor(NULL); } ! im_EnqueueEvent((procedure) Checkpoint, 0, event_SECtoTU(CkpInterval)); } void SetBufferCkpLatency(frame, key) *************** *** 494,500 **** /* A CheckPointInterval of 0 means don't checkpoint. */ if ((CkpInterval = environ_GetProfileInt("CheckpointInterval", DEFAULTCKPINTERVAL)) != 0) { CkpLatency = environ_GetProfileInt("CheckpointMinimum", DEFAULTCKPLATENCY * CkpInterval) / CkpInterval; ! im_EnqueueEvent(Checkpoint, 0, event_SECtoTU(CkpInterval)); } im_KeyboardProcessor(); --- 494,500 ---- /* A CheckPointInterval of 0 means don't checkpoint. */ if ((CkpInterval = environ_GetProfileInt("CheckpointInterval", DEFAULTCKPINTERVAL)) != 0) { CkpLatency = environ_GetProfileInt("CheckpointMinimum", DEFAULTCKPLATENCY * CkpInterval) / CkpInterval; ! im_EnqueueEvent((procedure) Checkpoint, 0, event_SECtoTU(CkpInterval)); } im_KeyboardProcessor(); *************** *** 502,511 **** return 0; } ! boolean ezapp__InitializeClass() { ! proctable_DefineProc("ezapp-set-buffer-checkpoint-latency", SetBufferCkpLatency, class_Load("frame"), NULL, "Set the number of checkpoint intervals to wait before checkpointing the current buffer."); return TRUE; } --- 502,512 ---- return 0; } ! boolean ezapp__InitializeClass(classID) ! struct classheader *classID; { ! proctable_DefineProc("ezapp-set-buffer-checkpoint-latency", (procedure) SetBufferCkpLatency, class_Load("frame"), NULL, "Set the number of checkpoint intervals to wait before checkpointing the current buffer."); return TRUE; } *** atk/extensions/Imakefile Mon Aug 6 11:06:03 1990 --- atk/extensions/Imakefile.NEW Thu Aug 23 16:01:09 1990 *************** *** 11,17 **** isearch.do \ spell.do \ tags.do \ ! deskey.do IHFILES = compile.ih \ dsearch.ih \ --- 11,18 ---- isearch.do \ spell.do \ tags.do \ ! deskey.do \ ! metax.do IHFILES = compile.ih \ dsearch.ih \ *************** *** 21,32 **** isearch.ih \ spell.ih \ tags.ih \ ! deskey.ih NormalObjectRule() NormalATKRule() DynamicObject(deskey, ${UTILLIB},) DynamicObject(compile, ${BASEDIR}/lib/atk/libbasics.a,) DynamicObject(filter, ${UTILLIB},) --- 22,35 ---- isearch.ih \ spell.ih \ tags.ih \ ! deskey.ih \ ! metax.ih NormalObjectRule() NormalATKRule() + DynamicObject(metax, ${UTILLIB},) DynamicObject(deskey, ${UTILLIB},) DynamicObject(compile, ${BASEDIR}/lib/atk/libbasics.a,) DynamicObject(filter, ${UTILLIB},) *************** *** 38,49 **** DependTarget() NormalHelpRule() ! InstallDocs(tags.help ezdiff.help compile.help search.help ezdproc.help comproc.help desproc.help dsrproc.help gsrproc.help isrproc.help ftrproc.help splproc.help tgsproc.help, ${DESTDIR}/help) InstallHelpAlias(ftrproc, filterproc filterprocs) InstallHelpAlias(splproc, spellproc spellprocs) InstallHelpAlias(tgsproc, tagsproc tagsprocs) InstallHelpAlias(ezdproc, ezdiffproc ezdiffprocs ez-diffproc) InstallHelpAlias(comproc, compileproc compileprocs) InstallHelpAlias(desproc, deskey deskeyproc deskeyprocs) InstallHelpAlias(dsrproc, dsearch dsearchproc dsearchprocs) InstallHelpAlias(gsrproc, gsearch gsearchproc gsearchprocs) --- 41,53 ---- DependTarget() NormalHelpRule() ! InstallDocs(tags.help ezdiff.help compile.help search.help ezdproc.help comproc.help metax.help desproc.help dsrproc.help gsrproc.help isrproc.help ftrproc.help splproc.help tgsproc.help, ${DESTDIR}/help) InstallHelpAlias(ftrproc, filterproc filterprocs) InstallHelpAlias(splproc, spellproc spellprocs) InstallHelpAlias(tgsproc, tagsproc tagsprocs) InstallHelpAlias(ezdproc, ezdiffproc ezdiffprocs ez-diffproc) InstallHelpAlias(comproc, compileproc compileprocs) + InstallHelpAlias(mxproc, metax metaxproc metaxprocs meta-x) InstallHelpAlias(desproc, deskey deskeyproc deskeyprocs) InstallHelpAlias(dsrproc, dsearch dsearchproc dsearchprocs) InstallHelpAlias(gsrproc, gsearch gsearchproc gsearchprocs) *** atk/extensions/ezdiff.c Mon Aug 6 11:06:05 1990 --- atk/extensions/ezdiff.c.NEW Thu Aug 23 16:01:12 1990 *************** *** 2,18 **** * 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/ezdiff.c,v 2.11 90/06/06 13:56:19 ajp Exp $ */ /* $ACIS:ezdiff.c 1.4$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/ezdiff.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/ezdiff.c,v 2.11 90/06/06 13:56:19 ajp Exp $"; #endif /* lint */ #include #include /* sys/file.h */ ! #if (! defined(hpux)) || HP_OS < 70 #include #endif /* hpux */ #if defined(AIX) || defined(hpux) --- 2,18 ---- * 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/ezdiff.c,v 2.12 90/08/13 10:49:03 ajp Exp $ */ /* $ACIS:ezdiff.c 1.4$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/ezdiff.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/extensions/RCS/ezdiff.c,v 2.12 90/08/13 10:49:03 ajp Exp $"; #endif /* lint */ #include #include /* sys/file.h */ ! #ifndef hpux #include #endif /* hpux */ #if defined(AIX) || defined(hpux) *** atk/extensions/metax.c Tue Sep 4 16:41:44 1990 --- atk/extensions/metax.c.NEW Thu Aug 23 16:01:15 1990 *************** *** 0 **** --- 1,291 ---- + /*********************************************************************** *\ + * 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 + + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + + static struct style *fixed=NULL,*boldulined=NULL,*heading=NULL,*columns=NULL; + + struct helpRock { + procedure HelpWork; + struct text *text; + long rock; + char *partial; + }; + + static char spaces[]=" "; + #define MAXFUNLEN sizeof(spaces) + + static void LoadClass(partial) + char *partial; + { + char class[100]; + int i; + for(i = 0; (i < strlen(partial)) && (partial[i] != '-'); i++) class[i] = partial[i]; + if(i <= 99) { + class[i]=0; + (void) class_Load(class); + } + } + + long match(pe,h) + struct proctable_Entry *pe; + struct helpRock *h; + { + char buf[1024]; + int len; + char *name=proctable_GetName(pe); + char *doc=proctable_GetDocumentation(pe); + if(!name) name=""; + if(!doc) doc=""; + if(!strncmp(name, h->partial, strlen(h->partial))) { + bzero(buf,sizeof(buf)); + strncpy(buf,name,254); + len=strlen(buf); + if(lenHelpWork)(h->rock,message_HelpGenericItem,buf,NULL); + } + return 0; + } + + + static void helpProc(partial,myrock,HelpWork,rock) + char *partial; + struct helpRock *myrock; + procedure HelpWork; + long rock; + { + struct text *t=myrock->text; + if(!HelpWork) return; + (*HelpWork)(rock, + message_HelpGenericItem, + "Proctable Listing\nName\t\t\t\tDocumentation\n", + NULL); + + myrock->HelpWork=HelpWork; + myrock->rock=rock; + myrock->partial=partial; + (void) LoadClass(partial); + (void)proctable_Enumerate(match,(long)myrock); + if(!fixed) return; + text_SetGlobalStyle(t,fixed); + text_AddStyle(t,0,17,heading); + text_AddStyle(t,18,4,boldulined); + text_AddStyle(t,26,13,boldulined); + text_AddStyle(t,39,text_GetLength(t)-39,columns); + } + + static char *GetProcName(pe) + struct proctable_Entry *pe; + { + return proctable_GetName(pe)?proctable_GetName(pe):""; + } + + static boolean myCompletionWork(pe, data) + struct proctable_Entry *pe; + struct result *data; + { + completion_CompletionWork(GetProcName(pe), data); + return FALSE; + } + + enum message_CompletionCode mycomplete(partial, dummyData, buffer, bufferSize) + char *partial; + long dummyData; /* Just along for the ride... */ + char *buffer; + int bufferSize; + { + struct result result; + char textBuffer[1024]; + *textBuffer = 0; + result.partial = partial; + result.partialLen = strlen(partial); + result.bestLen = 0; + result.code = message_Invalid; + result.best = textBuffer; + result.max = sizeof(textBuffer) - 1; /* Leave extra room for a NUL. */ + (void) LoadClass(partial); + (void)proctable_Enumerate(myCompletionWork, &result); + + strncpy(buffer, result.best, bufferSize); + if (result.bestLen == bufferSize) /* Now make sure buffer ends in a NUL. */ + buffer[result.bestLen] = 0; + return result.code; + } + + int donothing(vw) + struct view *vw; + { + message_DisplayString(vw, 0, "No such function."); + im_ForceUpdate(); + } + + int (*dofunc(func))() + char *func; + { + struct proctable_Entry *proc = proctable_Lookup(func); + if(proc) return proctable_GetFunction(proc); + else return donothing; + } + + boolean getfunction(v,buf,size,prompt,initial) + struct view *v; + char *buf,*prompt,*initial; + int size; + { + struct helpRock myrock; + struct framemessage *fmsg=(struct framemessage *)view_WantHandler(v,"message"); + if(!class_IsTypeByName(class_GetTypeName(fmsg),"framemessage")) return; + + if(fmsg) { + struct buffer *b=frame_GetHelpBuffer(fmsg->frame); + myrock.text=(struct text *)buffer_GetData(b); + } else myrock.text=NULL; + + if(message_AskForStringCompleted(v, 0, prompt, initial, buf, size, NULL, mycomplete, helpProc, &myrock, message_MustMatch | (initial?0:message_NoInitialString))) { + message_DisplayString(v,0,"Cancelled"); + return FALSE; + } + return TRUE; + } + + boolean getarg(v,arg,size,prompt,initial,result) + struct view *v; + char *arg,*prompt,*initial; + long *result; + { + + if(message_AskForString(v, 0,prompt, initial, arg, size) != 0) return FALSE; + switch(*arg) { + case '"': + *result=(long)arg+1; + break; + case '#': + *result=(long)atol(arg+1); + break; + case '\'': + *result=(long) *(arg+1); + break; + default: + *result=(long)arg; + } + return TRUE; + } + + void metax(tv,argument) + struct view *tv; + long argument; + { + char cbuf[500]; + struct proctable_Entry *proc; + struct im *im = view_GetIM(tv); + if(!getfunction(tv,cbuf,sizeof(cbuf),"Function: ",NULL)) return; + proc = proctable_Lookup(cbuf); + if(proc) { + switch(keystate_DoProc(im->keystate, proc, argument, tv)) { + case keystate_NoProc: + message_DisplayString(im, 0, "Could not load procedure"); + break; + case keystate_TypeMismatch: + message_DisplayString(im, 0, "Bad command"); + break; + } + } + else + donothing((struct view *)tv); + } + + void metax2(tv,argument) + struct view *tv; + long argument; + { + char cbuf[500], arg[500]; + struct proctable_Entry *proc; + struct im *im = view_GetIM(tv); + if(!getfunction(tv,cbuf,sizeof(cbuf),"Function: ",NULL)) return; + if(!getarg(tv,arg,sizeof(arg),"Argument: ",NULL,&argument)) + return; + proc = proctable_Lookup(cbuf); + if(proc) { + switch(keystate_DoProc(im->keystate, proc, argument, tv)) { + case keystate_NoProc: + message_DisplayString(im, 0, "Could not load procedure"); + break; + case keystate_TypeMismatch: + message_DisplayString(im, 0, "Bad command"); + break; + } + } + else + donothing((struct view *)tv); + } + + boolean metax__InitializeClass(classID) + struct classheader *classID; + { + struct classinfo *info = class_Load("view"); + fixed=style_New(); + if(!fixed) return FALSE; + boldulined=style_New(); + if(!boldulined) { + style_Destroy(fixed); + return FALSE; + } + heading=style_New(); + if(!heading) { + style_Destroy(fixed); + style_Destroy(boldulined); + return FALSE; + } + columns=style_New(); + if(!columns) { + style_Destroy(heading); + style_Destroy(fixed); + style_Destroy(boldulined); + return FALSE; + } + + style_SetNewLeftMargin(columns, style_LeftMargin, 550000, style_CM); + style_SetNewIndentation(columns, style_LeftMargin, -550000, style_CM); + style_SetFontSize(heading,style_ConstantFontSize,20); + style_SetJustification(heading,style_Centered); + style_SetFontFamily(fixed, "AndyType"); + style_AddNewFontFace(fixed, fontdesc_Fixed); + style_SetFontSize(fixed,style_ConstantFontSize,10); + style_Copy(fixed,boldulined); + style_AddUnderline(boldulined); + style_AddNewFontFace(boldulined,fontdesc_Bold); + proctable_DefineProc("metax", metax, info, NULL, "Executes a proctable function by name."); + proctable_DefineProc("metax-with-arg", metax2, info, NULL, "Executes a function by name, prompting for an argument."); + return TRUE; + } *** atk/extensions/metax.ch Tue Sep 4 16:42:00 1990 --- atk/extensions/metax.ch.NEW Thu Aug 23 16:01:18 1990 *************** *** 0 **** --- 1,6 ---- + /* metax package for ATK by Rob Ryan March 19, 1989 */ + + package metax { + classprocedures: + InitializeClass() returns boolean; + }; *** atk/extensions/metax.help Tue Sep 4 16:42:17 1990 --- atk/extensions/metax.help.NEW Thu Aug 23 16:01:20 1990 *************** *** 0 **** --- 1,73 ---- + \begindata{text,269586428} + \textdsversion{12} + \template{help} + \define{^ + } + \define{sym + } + \chapter{Meta-X: Accessing ATK Functions + + } + \section{What Meta-X is + + } + Meta-X is a package which enables you to access by name all the various + functions ATK applications provide. + + + \section{Starting Meta-X + + } + To use Meta-X you need to add a line or two to your .atkinit (or .ezinit) + like: + + + \example{addkey metax \\ex view metax + + + and + + + addkey metax-with-arg \\em view metax + + } + If you then type ESC-x you will be prompted for a function, typing a '?' will + give you a list of all the functions available, the spacebar can be used to + fill in any unique completion of the current line (try it out after you've + typed a character or two and you'll see what this means.) + + + If instead you type ESC-m you will be prompted for a function as above and + then for an argument to be passed to the function. The first character of + this argument is special, it determines what kind of argument is being + passed. The special characters are: + + + ': the character after the ' is passed to the function. + + ": the rest of the line is passed to the function as a string. + + #: the decimal number following the # is passed to the function. + + + If the first character isn't one of the above the line is passed to the + function as a string. + + + \section{Program Author} + + \leftindent{ + Rob Ryan (rr2b@andrew.cmu.edu)} + + + \section{Related tools} + + + Select (highlight) one of the italicized names and choose "Show Help on + Selected Word" from the pop-up menu to see the help file for: + + + \leftindent{initfiles + + + }\enddata{text,269586428} *** atk/frame/frame.c Mon Aug 6 11:06:25 1990 --- atk/frame/frame.c.NEW Thu Aug 23 16:01: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/frame/RCS/frame.c,v 2.16 90/05/08 12:13:35 gk5g Exp $ */ /* $ACIS:frame.c 1.6$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/frame.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/frame.c,v 2.16 90/05/08 12:13:35 gk5g Exp $"; #endif /* lint */ /* frame.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/frame.c,v 2.17 90/08/23 14:48:08 ajp Exp $ */ /* $ACIS:frame.c 1.6$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/frame.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/frame.c,v 2.17 90/08/23 14:48:08 ajp Exp $"; #endif /* lint */ /* frame.c *************** *** 87,93 **** if ((defaultStyle = frameview_GetDefaultStyle(self->messageView)) == NULL) return DEFAULTHEIGHT; style_GetFontFamily(defaultStyle, fontFamily, sizeof (fontFamily)); ! style_GetFontSize(defaultStyle, &refBasis, &fontSize); refOperand = style_GetAddedFontFaces(defaultStyle); defaultFont = fontdesc_Create(fontFamily, refOperand, fontSize); if ((fontSummary = fontdesc_FontSummary(defaultFont, frame_GetDrawable(self))) == NULL) --- 87,93 ---- if ((defaultStyle = frameview_GetDefaultStyle(self->messageView)) == NULL) return DEFAULTHEIGHT; style_GetFontFamily(defaultStyle, fontFamily, sizeof (fontFamily)); ! style_GetFontSize(defaultStyle, (enum style_FontSize *) &refBasis, &fontSize); refOperand = style_GetAddedFontFaces(defaultStyle); defaultFont = fontdesc_Create(fontFamily, refOperand, fontSize); if ((fontSummary = fontdesc_FontSummary(defaultFont, frame_GetDrawable(self))) == NULL) *************** *** 428,434 **** if(self->IsAsking ){ if((menulist != NULL) && self->hasDialogMessage && menulist->object == (struct basicobject *) self->dialogView){ menulist_ClearChain(self->mymenus); ! menulist_ChainBeforeML(self->mymenus, menulist, menulist); view_PostMenus(self->header.view.parent,self->mymenus); } else { --- 428,434 ---- if(self->IsAsking ){ if((menulist != NULL) && self->hasDialogMessage && menulist->object == (struct basicobject *) self->dialogView){ menulist_ClearChain(self->mymenus); ! menulist_ChainBeforeML(self->mymenus, menulist, (long) menulist); view_PostMenus(self->header.view.parent,self->mymenus); } else { *************** *** 437,443 **** } else if ((menulist == NULL) || (menulist->object != (struct basicobject *) self->messageView)) { menulist_ClearChain(self->menulist); ! menulist_ChainBeforeML(self->menulist, menulist, menulist); view_PostMenus(self->header.view.parent, self->menulist); } else --- 437,443 ---- } else if ((menulist == NULL) || (menulist->object != (struct basicobject *) self->messageView)) { menulist_ClearChain(self->menulist); ! menulist_ChainBeforeML(self->menulist, menulist, (long) menulist); view_PostMenus(self->header.view.parent, self->menulist); } else *************** *** 932,938 **** ComputeSize(self) struct frame *self; { ! int i, xw, yw, curht, totht, totwid,realwid, curleft, maxheight, boxheight,maxwid = 0; maxheight = 0; if (!self->HeightsOfAnswer) { --- 932,938 ---- ComputeSize(self) struct frame *self; { ! long i, xw, yw, curht, totht, totwid,realwid, curleft, maxheight, boxheight,maxwid = 0; maxheight = 0; if (!self->HeightsOfAnswer) { *************** *** 1326,1335 **** { char c[2], *s; mykm = keymap_New(); ! returnconsidered = proctable_DefineProc("frame-consider-coming", ConsiderReturning, &frame_classinfo, NULL, "consider selecting an answer"); ! cancel = proctable_DefineProc("frame-cancel", Cancel, &frame_classinfo, NULL, "Try to cancel dialog box"); ! confirmAnswer = proctable_DefineProc("frame-confirm", ConfirmDefaultAnswer, &frame_classinfo, NULL, "Select the default answer"); ! gotkey = proctable_DefineProc("frame-got-key", GotKey, &frame_classinfo, NULL, "change the default answer"); c[1] = '\0'; s = c; for (*s = 'a'; *s <= 'z'; ++*s) { --- 1326,1335 ---- { char c[2], *s; mykm = keymap_New(); ! returnconsidered = proctable_DefineProc("frame-consider-coming", (procedure) ConsiderReturning, &frame_classinfo, NULL, "consider selecting an answer"); ! cancel = proctable_DefineProc("frame-cancel", (procedure) Cancel, &frame_classinfo, NULL, "Try to cancel dialog box"); ! confirmAnswer = proctable_DefineProc("frame-confirm", (procedure) ConfirmDefaultAnswer, &frame_classinfo, NULL, "Select the default answer"); ! gotkey = proctable_DefineProc("frame-got-key", (procedure) GotKey, &frame_classinfo, NULL, "change the default answer"); c[1] = '\0'; s = c; for (*s = 'a'; *s <= 'z'; ++*s) { *** atk/frame/frame.ch Wed Apr 11 14:19:11 1990 --- atk/frame/frame.ch.NEW Fri Aug 24 09:40:08 1990 *************** *** 2,19 **** * 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/frame.ch,v 2.9 90/03/12 19:25:50 gk5g Exp $ */ /* $ACIS:frame.ch 1.5$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/frame.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidframe_H = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/frame.ch,v 2.9 90/03/12 19:25:50 gk5g Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* frame.H * Class definition for frame module. * ! * $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/frame.ch,v 2.9 90/03/12 19:25:50 gk5g Exp $ * $ACIS:frame.ch 1.5$ * */ --- 2,19 ---- * 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/frame.ch,v 2.10 90/08/23 16:32:00 ajp Exp $ */ /* $ACIS:frame.ch 1.5$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/frame.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidframe_H = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/frame.ch,v 2.10 90/08/23 16:32:00 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* frame.H * Class definition for frame module. * ! * $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/frame.ch,v 2.10 90/08/23 16:32:00 ajp Exp $ * $ACIS:frame.ch 1.5$ * */ *************** *** 38,44 **** GetHelpBuffer() returns struct buffer *; SetHelpBuffer(struct buffer *buf, boolean setInputFocus) returns struct buffer *; SetTitle(char *title); ! Advice(enum message_Preference); DisplayString(int priority, char *string) returns int; AskForString(int priority, char *prompt, char *defaultString, char *buffer, int bufferSize) returns int; AskForStringCompleted(int priority, char *prompt, char *defaultString, char *buffer, int bufferSize, struct keystate *keystate, --- 38,44 ---- GetHelpBuffer() returns struct buffer *; SetHelpBuffer(struct buffer *buf, boolean setInputFocus) returns struct buffer *; SetTitle(char *title); ! Advice(enum message_Preference pp); DisplayString(int priority, char *string) returns int; AskForString(int priority, char *prompt, char *defaultString, char *buffer, int bufferSize) returns int; AskForStringCompleted(int priority, char *prompt, char *defaultString, char *buffer, int bufferSize, struct keystate *keystate, *** atk/frame/framecmd.c Mon Aug 6 11:06:28 1990 --- atk/frame/framecmd.c.NEW Fri Aug 24 09:40: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/src/projects/andrew/atk/frame/RCS/framecmd.c,v 2.38 90/05/09 14:03:55 gk5g Exp Locker: wjh $ */ /* $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.38 90/05/09 14:03:55 gk5g Exp Locker: wjh $"; #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.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 *************** *** 423,429 **** returnCode.anyModified = returnCode.modifiedWithoutFilenames = FALSE; im_SetProcessCursor(waitCursor); ! buffer_Enumerate(saveAllWork, &returnCode); im_SetProcessCursor(NULL); if (returnCode.lengthLeft != origLen) { --- 423,429 ---- returnCode.anyModified = returnCode.modifiedWithoutFilenames = FALSE; im_SetProcessCursor(waitCursor); ! buffer_Enumerate(saveAllWork, (long) &returnCode); im_SetProcessCursor(NULL); if (returnCode.lengthLeft != origLen) { *************** *** 628,634 **** { long count = 0; ! frame_Enumerate(countFrames, &count); if (count > 1) { struct im *im = frame_GetIM(self); frame_SetView(self,NULL); --- 628,634 ---- { long count = 0; ! frame_Enumerate(countFrames, (long) &count); if (count > 1) { struct im *im = frame_GetIM(self); frame_SetView(self,NULL); *************** *** 668,674 **** { if(frame_GetQuitWindowFlag(self)) { long count = 0; ! frame_Enumerate(countFrames, &count); if (count > 1) { /* if more than one window, don't quit */ struct im *im = frame_GetIM(self); frame_SetView(self,NULL); --- 668,674 ---- { if(frame_GetQuitWindowFlag(self)) { long count = 0; ! frame_Enumerate(countFrames, (long) &count); if (count > 1) { /* if more than one window, don't quit */ struct im *im = frame_GetIM(self); frame_SetView(self,NULL); *************** *** 734,740 **** result.best = textBuffer; result.max = sizeof(textBuffer) - 1; /* Leave extra room for a NUL. */ ! buffer_Enumerate(BufferCompletionWork, &result); strncpy(buffer, result.best, bufferSize); if (result.bestLen == bufferSize) /* Now make sure buffer ends in a NUL. */ --- 734,740 ---- result.best = textBuffer; result.max = sizeof(textBuffer) - 1; /* Leave extra room for a NUL. */ ! buffer_Enumerate(BufferCompletionWork, (long) &result); strncpy(buffer, result.best, bufferSize); if (result.bestLen == bufferSize) /* Now make sure buffer ends in a NUL. */ *************** *** 820,826 **** helpData.textFunction = helpTextFunction; helpData.textRock = helpTextRock; ! buffer_Enumerate(BufferHelpWork, &helpData); } static char lastBuffer[100] = ""; --- 820,826 ---- helpData.textFunction = helpTextFunction; helpData.textRock = helpTextRock; ! buffer_Enumerate(BufferHelpWork, (long) &helpData); } static char lastBuffer[100] = ""; *************** *** 841,847 **** if (*lastBuffer == '\0') { buffer = frame_GetBuffer(self); /* Any except current */ ! buffer = buffer_Enumerate(FindFirstBuffer, buffer); if (buffer != NULL) strcpy(lastBuffer, buffer_GetName(buffer)); } --- 841,847 ---- if (*lastBuffer == '\0') { buffer = frame_GetBuffer(self); /* Any except current */ ! buffer = buffer_Enumerate(FindFirstBuffer, (long) buffer); if (buffer != NULL) strcpy(lastBuffer, buffer_GetName(buffer)); } *************** *** 852,859 **** if (message_AskForStringCompleted(self, 0, prompt, (*lastBuffer == '\0') ? NULL : lastBuffer, bufferName, ! sizeof(bufferName), NULL, BufferComplete, ! BufferHelp, 0, message_MustMatch | message_NoInitialString) == -1) return; --- 852,859 ---- if (message_AskForStringCompleted(self, 0, prompt, (*lastBuffer == '\0') ? NULL : lastBuffer, bufferName, ! sizeof(bufferName), NULL, (procedure) BufferComplete, ! (procedure) BufferHelp, 0, message_MustMatch | message_NoInitialString) == -1) return; *************** *** 872,878 **** if (*lastBuffer == '\0') { buffer = frame_GetBuffer(self); /* Any except current */ ! buffer = buffer_Enumerate(FindFirstBuffer, buffer); if (buffer != NULL) strcpy(lastBuffer, buffer_GetName(buffer)); else --- 872,878 ---- if (*lastBuffer == '\0') { buffer = frame_GetBuffer(self); /* Any except current */ ! buffer = buffer_Enumerate(FindFirstBuffer, (long) buffer); if (buffer != NULL) strcpy(lastBuffer, buffer_GetName(buffer)); else *************** *** 880,887 **** } sprintf(prompt, "Visit buffer [%.100s] : ", lastBuffer); if (message_AskForStringCompleted(self, 0, prompt, ! lastBuffer, bufferName, sizeof(bufferName), NULL, BufferComplete, ! BufferHelp, 0, message_NoInitialString) == -1) return; buffer = buffer_FindBufferByName(bufferName); if (buffer == NULL) --- 880,887 ---- } sprintf(prompt, "Visit buffer [%.100s] : ", lastBuffer); if (message_AskForStringCompleted(self, 0, prompt, ! lastBuffer, bufferName, sizeof(bufferName), NULL, (procedure) BufferComplete, ! (procedure) BufferHelp, 0, message_NoInitialString) == -1) return; buffer = buffer_FindBufferByName(bufferName); if (buffer == NULL) *************** *** 1017,1023 **** buffers.buffer1 = oldBuffer; if ((buffers.buffer2 = newBuffer) == oldBuffer) return; ! frame_Enumerate(ReplaceBufferWork, &buffers); } void frame_DeleteBuffer(self) --- 1017,1023 ---- buffers.buffer1 = oldBuffer; if ((buffers.buffer2 = newBuffer) == oldBuffer) return; ! frame_Enumerate(ReplaceBufferWork, (long) &buffers); } void frame_DeleteBuffer(self) *************** *** 1032,1038 **** sprintf(prompt, "Delete buffer [%.100s] : ", defaultName); if (message_AskForStringCompleted(self, 0, prompt, defaultName, bufferName, sizeof(bufferName), NULL, ! BufferComplete, BufferHelp, 0, message_NoInitialString) == -1) return; --- 1032,1038 ---- sprintf(prompt, "Delete buffer [%.100s] : ", defaultName); if (message_AskForStringCompleted(self, 0, prompt, defaultName, bufferName, sizeof(bufferName), NULL, ! (procedure) BufferComplete, (procedure) BufferHelp, 0, message_NoInitialString) == -1) return; *************** *** 1056,1062 **** if (newBuffer == targetBuffer) newBuffer = NULL; if (newBuffer == NULL) ! newBuffer = buffer_Enumerate(FindFirstBuffer, targetBuffer); if (newBuffer == NULL) newBuffer = buffer_Create("Scratch", NULL, NULL, NULL); if (newBuffer == NULL) { --- 1056,1062 ---- if (newBuffer == targetBuffer) newBuffer = NULL; if (newBuffer == NULL) ! newBuffer = buffer_Enumerate(FindFirstBuffer, (long) targetBuffer); if (newBuffer == NULL) newBuffer = buffer_Create("Scratch", NULL, NULL, NULL); if (newBuffer == NULL) { *************** *** 1533,1539 **** struct frame *desiredFrame; ! desiredFrame = frame_Enumerate(FindFrame, self); if (desiredFrame != NULL) im_SetWMFocus(frame_GetIM( desiredFrame)); } --- 1533,1539 ---- struct frame *desiredFrame; ! desiredFrame = frame_Enumerate(FindFrame, (long) self); if (desiredFrame != NULL) im_SetWMFocus(frame_GetIM( desiredFrame)); } *************** *** 1602,1607 **** --- 1602,1737 ---- message_DisplayString(self, 0, "Reset buffer modified status."); } + + /* frame-open-file(filename) returns frame + Ness-callable: create a window and edit file in it. + commands (framecommand_Bindings) are enabled if this is true + arg is filename. Returns im + */ + static struct frame * + framecmd_OpenFile(filename) + char *filename; + { + struct buffer *buffer; + struct frame *frame; + struct im *window; + + if ((window = im_Create(NULL)) == NULL) + return NULL; + + if ((buffer = LocalGetBufferOnFile(NULL, filename, TRUE)) == 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")); + message_DisplayString(frame, 0, ""); + + preventOutofSyncLossage(frame, buffer); + view_WantInputFocus(frame_GetView(frame), frame_GetView(frame)); + /* (I don't know why this is needed since WantInputFocus should be done in + frame_SetBuffer as called from frame_Create -wjh) */ + return frame; + } + + /* frame-open-view(object) returns frame + Ness-callable: create a window and display the view in it. + args: object, buffer name + */ + static struct frame * + framecmd_OpenView(v) + struct observable *v; + { + struct buffer *buffer; + struct frame *frame; + struct im *window; + struct dataobject *dobj; + char name[50]; + struct osi_Times blk; + struct tm *This; + + /* get a buffer on a view on the given data object (if given a view, extract its data object) + choose an artificial name of the form Ness-hh:mm */ + if (class_IsType(v, class_Load("dataobject"))) + dobj = (struct dataobject *)v; + else if (class_IsType(v, class_Load("view"))) { + /* want to view a view. create a new one for the same data object */ + dobj = view_GetDataObject((struct view *)v); + if (dobj == NULL) return NULL; + } + else + return NULL; + + osi_GetTimes(&blk); + This = localtime(&blk.Secs); + sprintf(name, "Ness-%d:%02d", This->tm_hour, This->tm_min); + + 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")); + message_DisplayString(frame, 0, ""); + + frame_SetBuffer(frame, buffer, TRUE); + view_WantInputFocus(frame_GetView(frame), frame_GetView(frame)); + + return frame; + } + + /* frame-set-window-title(frame, title) + Ness-callable: changes the title for the buffer currently displayed in the frame + */ + static void + framecmd_SetTitle(self, title) + struct frame *self; + char *title; + { + buffer_SetName(frame_GetBuffer(self), title); + } + + /* framecmds-set-program-name + Ness-callable: set program name (for preferences). args: name + */ + static void + framecmd_SetProgramName(name) + char *name; + { + im_SetProgramName(name); + } + + /* frame-set-command-enable(frame, enable) + Ness-callable: enables/disables the frame commands. args: frame, boolean + returns prior state + */ + static boolean + framecmd_SetCommands(self, enable) + struct frame *self; + boolean enable; + { + boolean wasenabled = frame_GetCommandEnable(self); + frame_SetCommandEnable(self, enable); + return wasenabled; + } + + /* framecmd_Interact(self) + call im_Interact() + */ + static void + framecmd_Interact(self) + struct frame *self; + { + im_KeyboardProcessor(); + } + + static struct bind_Description framecmdBindings[]={ /* the functions called by these first few check their second argument. *************** *** 1683,1689 **** "Hides all other windows and expands the current window."}, NULL }; ! struct proctable_DescriptionWithType typetable[] = { {"frame-visit-file", NULL, NULL, NULL, NULL, proctable_Long}, /* returns 0 or greater for success */ {"frame-visit-file-new-window", NULL, NULL, NULL, NULL, proctable_Long}, --- 1813,1819 ---- "Hides all other windows and expands the current window."}, NULL }; ! struct proctable_DescriptionWithType procswithframearg[] = { {"frame-visit-file", NULL, NULL, NULL, NULL, proctable_Long}, /* returns 0 or greater for success */ {"frame-visit-file-new-window", NULL, NULL, NULL, NULL, proctable_Long}, *************** *** 1692,1700 **** --- 1822,1854 ---- /* returns TRUE for success */ {"frame-current-directory", NULL, NULL, NULL, NULL, proctable_StaticString}, /* returns a string with the current directory name */ + + {"framecmds-set-window-title", (int (*)())framecmd_SetTitle, NULL, + "Ness-callable: set window title. args: frame, title", + "framecmds", proctable_Void}, + {"framecmds-set-command-enable", (int (*)())framecmd_SetCommands, NULL, + "Ness-callable: enable/disable frame commands. args: frame, enable. Returns prior state.", + "framecmds", proctable_Boolean}, NULL }; + struct proctable_DescriptionWithType procswithrandomarg[] = { + {"framecmds-interact", (int (*)())framecmd_Interact, NULL, + "Ness-callable: interact with user", + "framecmds", proctable_Void}, + {"framecmds-open-file", (int (*)())framecmd_OpenFile, NULL, + "Ness-callable: create a window and edit a file in it. arg: filename. Returns frame", + "framecmds", proctable_Object}, + {"framecmds-open-view", (int (*)())framecmd_OpenView, NULL, + "Ness-callable: create a window and display the view in it. args: object. Returns frame", + "framecmds", proctable_Object}, + {"framecmds-set-program-name", (int (*)())framecmd_SetProgramName, NULL, + "Ness-callable: set program name (for preferences). args: name", + "framecmds", proctable_Void}, + NULL + }; + + struct keymap *framecmds__InitKeymap(classID, menuOut) struct classheader *classID; struct menulist **menuOut; *************** *** 1707,1712 **** --- 1861,1867 ---- struct classheader *classID; { struct classinfo *classInfo; + struct proctable_DescriptionWithType *pt; framecmdsKeymap = keymap_New(); framecmdsMenus = menulist_New(); *************** *** 1716,1721 **** classInfo = class_Load("frame"); bind_BindList(framecmdBindings, framecmdsKeymap, framecmdsMenus, classInfo); ! proctable_DefineProcsWithTypes(typetable); return TRUE; } --- 1871,1879 ---- classInfo = class_Load("frame"); bind_BindList(framecmdBindings, framecmdsKeymap, framecmdsMenus, classInfo); ! proctable_DefineProcsWithTypes(procswithrandomarg); ! for (pt = &procswithframearg[0]; pt->name != NULL; pt++) ! pt->type = classInfo; ! proctable_DefineProcsWithTypes(procswithframearg); return TRUE; } *** atk/frame/framecmd.ch Wed Nov 22 12:13:23 1989 --- atk/frame/framecmd.ch.NEW Fri Aug 24 09:40: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/sm/releases/X.V11R4/andrew/atk/frame/RCS/framecmd.ch,v 2.7 89/02/24 17:01:43 ghoti Exp $ */ /* $ACIS:framecmd.ch 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/frame/RCS/framecmd.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidframecmds_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/frame/RCS/framecmd.ch,v 2.7 89/02/24 17:01:43 ghoti Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* framecmd.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/frame/RCS/framecmd.ch,v 2.8 90/08/23 16:32:35 ajp Exp $ */ /* $ACIS:framecmd.ch 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framecmd.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidframecmds_H = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framecmd.ch,v 2.8 90/08/23 16:32:35 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* framecmd.H *************** *** 17,22 **** package framecmds[framecmd] { classprocedures: ! InitKeymap(struct menuslit **menuOut) returns struct keymap *; InitializeClass() returns boolean; }; --- 17,22 ---- package framecmds[framecmd] { classprocedures: ! InitKeymap(struct menulist **menuOut) returns struct keymap *; InitializeClass() returns boolean; }; *** atk/frame/framemsg.c Wed Apr 11 14:19:22 1990 --- atk/frame/framemsg.c.NEW Fri Aug 24 09:40: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/frame/RCS/framemsg.c,v 1.8 90/04/02 14:16:53 tpn Exp $ */ /* $ACIS:framemsg.c 1.4$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framemsg.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framemsg.c,v 1.8 90/04/02 14:16:53 tpn Exp $"; #endif /* lint */ /* framemsg.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/framemsg.c,v 1.10 90/08/23 16:32:47 ajp Exp $ */ /* $ACIS:framemsg.c 1.4$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framemsg.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framemsg.c,v 1.10 90/08/23 16:32:47 ajp Exp $"; #endif /* lint */ /* framemsg.c *************** *** 102,109 **** self->messageLen = length; if(length>0) self->erasureEvent = im_SetInteractionEvent(frameview_GetIM(self->messageView), ! EraseDisplayedMessage, ! self, event_SECtoTU(messageTimeout)); } --- 102,109 ---- self->messageLen = length; if(length>0) self->erasureEvent = im_SetInteractionEvent(frameview_GetIM(self->messageView), ! (procedure) EraseDisplayedMessage, ! (long) self, event_SECtoTU(messageTimeout)); } *************** *** 459,467 **** int framemessage__InsertCharacters(self, pos, string, len) struct framemessage *self; ! long pos; char *string; ! long len; { if (!framemessage_Asking(self)){ --- 459,467 ---- int framemessage__InsertCharacters(self, pos, string, len) struct framemessage *self; ! int pos; char *string; ! int len; { if (!framemessage_Asking(self)){ *************** *** 476,483 **** int framemessage__DeleteCharacters(self, pos, len) struct framemessage *self; ! long pos; ! long len; { if (!framemessage_Asking(self)){ --- 476,483 ---- int framemessage__DeleteCharacters(self, pos, len) struct framemessage *self; ! int pos; ! int len; { if (!framemessage_Asking(self)){ *************** *** 505,511 **** int framemessage__SetCursorPos(self, pos) struct framemessage *self; ! long pos; { if (!framemessage_Asking(self)){ --- 505,511 ---- int framemessage__SetCursorPos(self, pos) struct framemessage *self; ! int pos; { if (!framemessage_Asking(self)){ *** atk/frame/framemsg.ch Wed Nov 22 12:13:36 1989 --- atk/frame/framemsg.ch.NEW Fri Aug 24 09:40: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/sm/releases/X.V11R4/andrew/atk/frame/RCS/framemsg.ch,v 1.7 89/09/08 16:29:22 ghoti Exp $ */ /* $ACIS:framemsg.ch 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/frame/RCS/framemsg.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidframemessage_H = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/frame/RCS/framemsg.ch,v 1.7 89/09/08 16:29:22 ghoti Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* framemsg.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/frame/RCS/framemsg.ch,v 1.8 90/08/23 16:32:55 ajp Exp $ */ /* $ACIS:framemsg.ch 1.2$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framemsg.ch,v $ */ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *rcsidframemessage_H = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framemsg.ch,v 1.8 90/08/23 16:32:55 ajp Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ /* framemsg.H *************** *** 39,45 **** SetCompanion(struct msghandler *companion); classprocedures: ! FinalizeObject(); Create(struct frame *myFrame) returns struct framemessage *; InitializeClass() returns boolean; InitializeObject(struct framemessage *self) returns boolean; --- 39,45 ---- SetCompanion(struct msghandler *companion); classprocedures: ! FinalizeObject(struct framemessage *self); Create(struct frame *myFrame) returns struct framemessage *; InitializeClass() returns boolean; InitializeObject(struct framemessage *self) returns boolean; *** atk/frame/framev.c Mon Aug 6 11:06:31 1990 --- atk/frame/framev.c.NEW Thu Aug 23 16:02:03 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/framev.c,v 2.15 90/05/07 15:11:27 gk5g Exp $ */ /* $ACIS:framev.c 1.4$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framev.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/.andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framev.c,v 2.15 90/05/07 15:11:27 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/atk/frame/RCS/framev.c,v 2.16 90/08/23 14:50:10 ajp Exp $ */ /* $ACIS:framev.c 1.4$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framev.c,v $ */ #ifndef lint ! static char *rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/frame/RCS/framev.c,v 2.16 90/08/23 14:50:10 ajp Exp $"; #endif /* lint */ #include *************** *** 126,132 **** { if (menulist != self->menulist) { menulist_ClearChain(self->menulist); ! menulist_ChainAfterML(self->menulist, menulist, menulist); } super_PostMenus(self, self->menulist); } --- 126,132 ---- { if (menulist != self->menulist) { menulist_ClearChain(self->menulist); ! menulist_ChainAfterML(self->menulist, menulist, (long) menulist); } super_PostMenus(self, self->menulist); } *************** *** 213,222 **** pos = text_GetLength(Text(self)); mark_SetPos(self->transientMark, pos); text_AlwaysInsertCharacters(Text(self), pos, message, len = strlen(message)); ! keystate_SetOverride(self->keystate, KeyEraseMessage, self); frameview_WantUpdate(self, self); mark_SetLength(self->transientMark, len); ! self->event = im_EnqueueEvent(EraseMessage, self, event_SECtoTU(4)); } static void Punt(self, key) --- 213,222 ---- pos = text_GetLength(Text(self)); mark_SetPos(self->transientMark, pos); text_AlwaysInsertCharacters(Text(self), pos, message, len = strlen(message)); ! keystate_SetOverride(self->keystate, KeyEraseMessage, (long) self); frameview_WantUpdate(self, self); mark_SetLength(self->transientMark, len); ! self->event = im_EnqueueEvent((procedure) EraseMessage, (char *) self, event_SECtoTU(4)); } static void Punt(self, key) *** atk/help/src/Imakefile Fri Feb 2 12:25:01 1990 --- atk/help/src/Imakefile.NEW Tue Sep 4 16:08:08 1990 *************** *** 5,10 **** --- 5,16 ---- DOBJS = help.do helpa.do helpdb.do IHFILES = help.ih helpa.ih helpdb.ih + #ifdef RESOLVER_ENV + RESOLVER_LIB = $(RESOLVLIB) + #else + RESOLVER_LIB = + #endif /* RESOLVER_ENV */ + NormalObjectRule() NormalATKRule() *************** *** 12,18 **** InstallFile(helpmac.an, $(INSTINCFLAGS), $(DESTDIR)/lib/tmac) ! DynamicMultiObject(helpa.do, helpa.o, $(RESOLVLIB),) DynamicMultiObject(helpdb.do, helpdb.o, ${BASEDIR}/lib/libindex.a,) --- 18,24 ---- InstallFile(helpmac.an, $(INSTINCFLAGS), $(DESTDIR)/lib/tmac) ! DynamicMultiObject(helpa.do, helpa.o, $(RESOLVER_LIB),) DynamicMultiObject(helpdb.do, helpdb.o, ${BASEDIR}/lib/libindex.a,) *** atk/help/src/helpa.c Mon Aug 6 11:06:55 1990 --- atk/help/src/helpa.c.NEW Thu Aug 23 16:02: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/helpa.c,v 2.30 90/07/19 14:00: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.30 90/07/19 14:00:03 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.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) */ /*---------------------------------------------------------------------------*/ *************** *** 380,385 **** --- 380,387 ---- searchDirs = thd; thd->dirName = malloc(strlen(temp) + 1); strcpy(thd->dirName, temp); + if(thd->dirName[strlen(thd->dirName) - 1] == '/') + thd->dirName[strlen(thd->dirName) - 1] = '\0'; break; case 'n': newWindow=TRUE; *** atk/help/src/helpdb.c Mon Aug 6 11:06:57 1990 --- atk/help/src/helpdb.c.NEW Thu Aug 23 16:02: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/help/src/RCS/helpdb.c,v 1.12 90/07/19 14:00:15 gk5g Exp $ */ /* $ACIS$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/helpdb.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/helpdb.c,v 1.12 90/07/19 14:00:15 gk5g Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #ifdef CCH --- 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/helpdb.c,v 1.13 90/07/31 12:20:55 gk5g Exp $ */ /* $ACIS$ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/help/src/RCS/helpdb.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/helpdb.c,v 1.13 90/07/31 12:20:55 gk5g Exp $"; #endif /* !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) */ #ifdef CCH *************** *** 790,796 **** *ef = t; } - #if 0 /* now add the auxiliary help units */ for(thd = firstHelpDirs; thd; thd = thd->next) { --- 790,795 ---- *************** *** 816,822 **** } else tmplist = AddFilesFromDir(thd->dirName, aname, tmplist); } - #endif /* 0 */ #ifdef DEBUGGING DEBUG(("db: For topic %s:\n", aname)); --- 815,820 ---- *** atk/ness/tokens/lex.c Wed Nov 22 12:18:45 1989 --- atk/ness/tokens/lex.c.NEW Wed Aug 1 15:10:44 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.c,v 1.14 89/09/10 17:36:28 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/tokens/RCS/lex.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/lex.c,v 1.14 89/09/10 17:36:28 wjh Exp $"; #endif /* lex.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/tokens/RCS/lex.c,v 1.15 90/07/29 14:54:13 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/tokens/RCS/lex.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/lex.c,v 1.15 90/07/29 14:54:13 wjh Exp $"; #endif /* lex.c *************** *** 16,21 **** --- 16,24 ---- */ /* * $Log: lex.c,v $ + * Revision 1.15 90/07/29 14:54:13 wjh + * fixed so styles and objects are fully supported in short strings + * * Revision 1.14 89/09/10 17:36:28 wjh * added SetPragmatParser * *************** *** 55,62 **** --- 58,70 ---- #include #include #include + #include + #undef environment_GetParent + #define environment_GetParent(env) \ + ((struct environment *)(env)->header.nestedmark.parent) + /* a set of routines to access text objects like a file */ #define CurCh(self) (self->curchar) *************** *** 72,78 **** --- 80,88 ---- static struct lex *CurLex; /* backdoor arg to NextToken() */ + static struct classinfo *textClass = NULL; + struct lex * lex__Create(ClassID, def) struct classhdr *ClassID; *************** *** 568,578 **** " if characters follow in name, the \ reduced version of the string follows in name the original string is indexed by the loc/len fields ! / long string. The name contains only a sequence number. ! The actual text is in the file as indexed by loc and len ! The loc/len values select only the string contents, not the delimiters. Error messages for strings contain loc/len value which select the delimiters as well. - XXX Eventually, the info field will point to a list of places where styles change in the string */ --- 578,589 ---- " if characters follow in name, the \ reduced version of the string follows in name the original string is indexed by the loc/len fields ! ~ a short string with styles ! / long string. ! ! For ~ and /, the name contains only a sequence number. ! In all cases, the loc/len values select only the string contents, not the delimiters. Error messages for strings contain loc/len value which select the delimiters as well. */ *************** *** 600,606 **** unsigned char *cend = buf + 257; /* just past last char acceptable */ register unsigned long c; register struct toksym *t; ! boolean new; long startpos = TellCh(self); /* loc of initial delimiter */ long endpos; --- 611,617 ---- unsigned char *cend = buf + 257; /* just past last char acceptable */ register unsigned long c; register struct toksym *t; ! boolean new, styled; long startpos = TellCh(self); /* loc of initial delimiter */ long endpos; *************** *** 667,687 **** ReportError(self, ":String constant longer than 256 characters", startpos, endpos - startpos); /* pos'n arith XXX */ ! if (cx == buf+1) ! t = self->def->EmptyStringToken; else { t = toksym_TLocate(buf, self->def->prototype, self->constScope, &new); if (new) { StorePos(t, startpos+1, endpos); /* position arith XXX */ if (delim == '\'') { t->toknum = self->def->IntConTokNum; ! t->info.intval = buf[1]; /* store character value */ } else t->toknum = self->def->StringConTokNum; } } - return (t); } --- 678,723 ---- ReportError(self, ":String constant longer than 256 characters", startpos, endpos - startpos); /* pos'n arith XXX */ ! if (cx == buf+1) ! return self->def->EmptyStringToken; ! ! if (textClass == NULL) ! textClass = class_Load("text"); ! if (! class_IsType(self->source, textClass)) ! styled = FALSE; else { + struct environment *env; + env = environment_GetInnerMost(self->source->rootEnvironment, + startpos+1); + while (env != NULL && (env->type != environment_Style + || env->data.style == NULL)) + env = environment_GetParent(env); + styled = ( ! env == NULL) + || environment_GetNextChange(self->source->rootEnvironment, + startpos+1) < endpos - startpos - 1; + } + if (styled) { + /* short styled string */ + char buf[50]; + sprintf(buf, "~%d", self->def->nextlongstring); + self->def->nextlongstring ++; t = toksym_TLocate(buf, self->def->prototype, self->constScope, &new); + t->info.str = NULL; + t->toknum = self->def->StringConTokNum; + StorePos(t, startpos+1, endpos); /* position arith XXX */ + } + else { + t = toksym_TLocate(buf, self->def->prototype, self->constScope, &new); if (new) { StorePos(t, startpos+1, endpos); /* position arith XXX */ if (delim == '\'') { t->toknum = self->def->IntConTokNum; ! t->info.intval = buf[1]; /* store character value */ } else t->toknum = self->def->StringConTokNum; } } return (t); } *** atk/ness/objects/call.c Mon Aug 6 11:07:25 1990 --- atk/ness/objects/call.c.NEW Mon Sep 17 12:30:47 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.35 90/07/15 15:23:37 wjh Exp Locker: wjh $ */ /* $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.35 90/07/15 15:23:37 wjh Exp Locker: wjh $"; #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.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 /* *************** *** 78,84 **** static struct builtindef { char *name, *defn; Texpr types[8]; /* the first in this list is the return type, ! the rest is args in reverse order the end of list indicator is Tend Tunk is special for an optional textview arg if the list has only one type, the name is a predefined --- 78,84 ---- static struct builtindef { char *name, *defn; Texpr types[8]; /* the first in this list is the return type, ! the rest is args in REVERSE ORDER the end of list indicator is Tend Tunk is special for an optional textview arg if the list has only one type, the name is a predefined *************** *** 115,122 **** --- 115,125 ---- {"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}, + {"addstylebyname", "Fl", {Tstr, Tstr, Tstr, Tend}, ness_codeYellow}, /* SearchOp's with one marker arg */ {"parseint", "Fp", {Tlong, Tstr, Tend}, ness_codeOrange}, {"parsereal", "Fq", {Tdbl, Tstr, Tend}, ness_codeOrange}, *************** *** 138,146 **** {"print", "j", {Tstr, Tstr, Tend}, ness_codeOrange}, {"printline", "jN", {Tstr, Tstr, Tend}, ness_codeOrange}, {"system", "X", {Tstr, Tstr, Tend}, ness_codeGreen}, {"telluser", "UT", {Tvoid, Tstr, Tend}, ness_codeOrange}, {"askuser", "UU", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, - {"isreadonly", "UR", {Tbool, Tstr, Tend}, ness_codeOrange}, {"currentselection", "Ss", {Tstr, Tunk, Tend}, ness_codeOrange}, {"currentmark", "Sm", {Tstr, Tunk, Tend}, ness_codeOrange}, --- 141,150 ---- {"print", "j", {Tstr, Tstr, Tend}, ness_codeOrange}, {"printline", "jN", {Tstr, Tstr, Tend}, ness_codeOrange}, {"system", "X", {Tstr, Tstr, Tend}, ness_codeGreen}, + {"launchapplication", "UP", {Tvoid, Tbool, Tstr, Tstr, Tstr, Tend}, ness_codeGreen}, + {"isreadonly", "UR", {Tbool, Tstr, Tend}, ness_codeOrange}, {"telluser", "UT", {Tvoid, Tstr, Tend}, ness_codeOrange}, {"askuser", "UU", {Tstr, Tstr, Tstr, Tend}, ness_codeOrange}, {"currentselection", "Ss", {Tstr, Tunk, Tend}, ness_codeOrange}, {"currentmark", "Sm", {Tstr, Tunk, Tend}, ness_codeOrange}, *************** *** 285,291 **** sym->type = b->types[0]; sym->flags = flag_var | flag_builtin; } ! LibScope = nesssym_NNewScope(Gscope); } --- 289,295 ---- sym->type = b->types[0]; sym->flags = flag_var | flag_builtin; } ! LibScope = nesssym_NNewScope(nesssym_GLOBAL); } *************** *** 680,685 **** --- 684,708 ---- return TRUE; } + static struct hack { + char procmod[15]; + char modname[9]; + } ModuleHack [] = { + {"bodies", "text822v"}, + {"folder", "folders"}, + {"frame", "framecmd"}, + {"self", "zipedit"}, + {"self_insert", "spread"}, + {"wraplook", "stylesht"}, + + {"exit", "im"}, /* obsolete */ + {"redraw", "im"}, /* obsolete */ + {"start", "im"}, /* obsolete */ + {"stop", "im"}, /* obsolete */ + {"raster", "rasterv"}, /* obsolete */ + {0, 0} + }; + /* callCheckProcTable(func) check to see if function called is in the proctable (try loading if needed) *************** *** 699,704 **** --- 722,728 ---- struct callnode *call; long nargs, i; struct exprnode *e; + struct hack *gack; func = varnode->sym; *************** *** 715,720 **** --- 739,749 ---- *dash = '-'; if ((pe=proctable_Lookup(procname)) == NULL) { + for (gack = &ModuleHack[0]; gack->procmod[0] != 0; gack++) + if (strcmp(modname, &gack->procmod[0]) == 0) { + strcpy(modname, &gack->modname[0]); + break; + } class_Load(modname); if ((pe=proctable_Lookup(procname)) == NULL) return FALSE; *************** *** 943,953 **** at compile time. Forward references should be done with fixups at the end of the compilation (and should use 'O' instead of 'C') */ void ! callCheck (call, NSP, iar, ness) struct callnode *call; - union stackelement *NSP; unsigned char *iar; struct ness *ness; { --- 972,983 ---- at compile time. Forward references should be done with fixups at the end of the compilation (and should use 'O' instead of 'C') + XXX this function does not test the types of the values on the stack + */ void ! callCheck (call, iar, ness) struct callnode *call; unsigned char *iar; struct ness *ness; { *************** *** 1055,1061 **** static union stackelement * startPush(NSP, size, hdr, v) ! union stackelement *NSP; long size; TType hdr; long v; --- 1085,1091 ---- static union stackelement * startPush(NSP, size, hdr, v) ! register union stackelement *NSP; long size; TType hdr; long v; *************** *** 1063,1068 **** --- 1093,1099 ---- NSP = (union stackelement *)(((unsigned long)NSP) - size); NSP->l.hdr = hdr; NSP->l.v = v; + NSPstore = NSP; return NSP; } *************** *** 1100,1112 **** 5. free allocated values 6. push return value onto stack */ ! union stackelement * ! callCfunc(call, NSP, iar, ness) struct callnode *call; - union stackelement *NSP; unsigned char *iar; struct ness *ness; { union anytype arg[10]; /* arguments (from stack) */ union anytype retval; /* returned value (push to stack) */ boolean malloced[10]; /* T if arg[i] pts to malloced space */ --- 1131,1143 ---- 5. free allocated values 6. push return value onto stack */ ! void ! callCfunc(call, iar, ness) struct callnode *call; unsigned char *iar; struct ness *ness; { + register union stackelement *NSP = NSPstore; union anytype arg[10]; /* arguments (from stack) */ union anytype retval; /* returned value (push to stack) */ boolean malloced[10]; /* T if arg[i] pts to malloced space */ *************** *** 1169,1182 **** switch (lasttype) { case ptrHdr: arg[n].p = NSP->p.v; ! NSP = (union stackelement *)(((unsigned long)NSP) ! + sizeof(struct ptrstkelt)); break; case longHdr: case boolHdr: arg[n].l = NSP->l.v; ! NSP = (union stackelement *)(((unsigned long)NSP) ! + sizeof(struct longstkelt)); break; #ifdef notdef case dblHdr: { --- 1200,1211 ---- switch (lasttype) { case ptrHdr: arg[n].p = NSP->p.v; ! NSPopSpace(ptrstkelt); break; case longHdr: case boolHdr: arg[n].l = NSP->l.v; ! NSPopSpace(longstkelt); break; #ifdef notdef case dblHdr: { *************** *** 1200,1207 **** arg[n+1].l = kludge.l.l1; arg[n].l = kludge.l.l2; #endif /* VAX_ENV */ ! NSP = (union stackelement *)(((unsigned long)NSP) ! + sizeof(struct dblstkelt)); } break; #endif /* notdef */ default: --- 1229,1235 ---- arg[n+1].l = kludge.l.l1; arg[n].l = kludge.l.l2; #endif /* VAX_ENV */ ! NSPopSpace(dblstkelt); } break; #endif /* notdef */ default: *************** *** 1208,1215 **** if (NSP->l.hdr == nessmarkHdr) { arg[n].s = nessmark_ToC(&NSP->m); malloced[n] = TRUE; ! NSP = (union stackelement *) ! (((unsigned long)NSP) + sizeof(struct nessmark)); } else /* ERROR: unknown arg type */ --- 1236,1242 ---- if (NSP->l.hdr == nessmarkHdr) { arg[n].s = nessmark_ToC(&NSP->m); malloced[n] = TRUE; ! NSPopSpace(nessmark); } else /* ERROR: unknown arg type */ *************** *** 1339,1345 **** NSP = startPush(NSP, sizeof(struct longstkelt), longHdr, 0); break; } - return NSP; } --- 1366,1371 ---- *************** *** 1349,1364 **** * \* = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ ! /* callCheat(op, NSP, iar, ness) implement the cheat_ functions */ ! union stackelement * ! callCheat(op, NSP, iar, ness) unsigned char op; - union stackelement *NSP; unsigned char *iar; struct ness *ness; { switch (op) { /* eventually the following ought to move to nevent.c */ --- 1375,1390 ---- * \* = = = = = = = = = = = = = = = = = = = = = = = = = = = = */ ! /* callCheat(op, iar, ness) implement the cheat_ functions */ ! void ! callCheat(op, iar, ness) unsigned char op; unsigned char *iar; struct ness *ness; { + register union stackelement *NSP = NSPstore; switch (op) { /* eventually the following ought to move to nevent.c */ *************** *** 1380,1387 **** free(s); } NSP = popValue(NSP); /* discard string */ ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct ptrstkelt)); NSP->p.hdr = ptrHdr; NSP->p.v = (struct basicobject *)v; } break; --- 1406,1412 ---- free(s); } NSP = popValue(NSP); /* discard string */ ! NSPushSpace(ptrstkelt); NSP->p.hdr = ptrHdr; NSP->p.v = (struct basicobject *)v; } break; *************** *** 1392,1401 **** RunError(":arg was not a non-NULL pointer", iar); ci = (struct classinfo *)NSP->p.v; NSP = popValue(NSP); ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct ptrstkelt)); NSP->p.hdr = ptrHdr; ! NSP->p.v = (struct basicobject *)(ci->procs->routines[0])(ci, ci->versionnumber); } break; case 't': { /* class */ /* arg is string naming the class */ --- 1417,1426 ---- RunError(":arg was not a non-NULL pointer", iar); ci = (struct classinfo *)NSP->p.v; NSP = popValue(NSP); ! NSPushSpace(ptrstkelt); NSP->p.hdr = ptrHdr; ! NSP->p.v = (struct basicobject *)(ci->procs->routines[0])(ci, ! ci->versionnumber); } break; case 't': { /* class */ /* arg is string naming the class */ *************** *** 1417,1430 **** else RunError(":arg is neither a mark nor an object (is it initialized?)", iar); NSP = popValue(NSP); ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct ptrstkelt)); NSP->p.hdr = ptrHdr; NSP->p.v = (struct basicobject *)cip; } break; } /* end switch(op) */ - return NSP; } --- 1442,1453 ---- else RunError(":arg is neither a mark nor an object (is it initialized?)", iar); NSP = popValue(NSP); ! NSPushSpace(ptrstkelt); NSP->p.hdr = ptrHdr; NSP->p.v = (struct basicobject *)cip; } break; } /* end switch(op) */ } *** atk/ness/objects/call.hn Wed Nov 22 12:20:50 1989 --- atk/ness/objects/call.hn.NEW Mon Sep 17 12:30:52 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/call.hn,v 1.10 89/09/27 16:25:24 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/call.hn,v $ */ /* call.hn - definitions for nesscomp function call routines --- 1,9 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/call.hn,v 1.11 90/09/16 20:14:12 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/call.hn,v $ */ /* call.hn - definitions for nesscomp function call routines *************** *** 17,23 **** #define _ness_call_h_ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *call_hn_rcsid = "$Header: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/call.hn,v 1.10 89/09/27 16:25:24 wjh Exp $"; #endif #include "nesssym.ih" --- 17,23 ---- #define _ness_call_h_ #if !defined(lint) && !defined(LOCORE) && defined(RCS_HDRS) ! static char *call_hn_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/call.hn,v 1.11 90/09/16 20:14:12 wjh Exp $"; #endif #include "nesssym.ih" *************** *** 67,81 **** void callUnknown(/* struct nesssym *sym */); /* make undefined function */ void callPredefId(/* struct nesssym *var */); /* generate code for predefined id */ struct errornode *callInitAll(/* struct ness *ness */); /* call init() for ness and libraries */ ! void callCheck(/* struct callnode *call, union stackelement *NSP, unsigned char *iar */); /* resolve reference and do a call at run-time */ ! union stackelement *callCfunc(/* struct callnode *call, union stackelement *NSP, unsigned char *iar, struct textview *textview */); ! union stackelement *callCheat(/* unsigned char op, union stackelement *NSP, ! unsigned char *iar, struct ness *ness */); ! long callCheatNargs(/* unsigned char op, long nargs, ! union stackelement *NSP, ! unsigned char *iar, struct ness *ness */); void callDirLibs(/* */); /* find out what files are in directories in NessPath */ enum libstate callCheckLib(/* char *fun, struct funcnode **fnode */); --- 67,77 ---- void callUnknown(/* struct nesssym *sym */); /* make undefined function */ void callPredefId(/* struct nesssym *var */); /* generate code for predefined id */ struct errornode *callInitAll(/* struct ness *ness */); /* call init() for ness and libraries */ ! void callCheck(/* struct callnode *call, unsigned char *iar */); /* resolve reference and do a call at run-time */ ! void callCfunc(/* struct callnode *call, unsigned char *iar, struct textview *textview */); ! void callCheat(/* unsigned char op, unsigned char *iar, struct ness *ness */); void callDirLibs(/* */); /* find out what files are in directories in NessPath */ enum libstate callCheckLib(/* char *fun, struct funcnode **fnode */); *** atk/ness/objects/envt.h Wed Nov 22 12:20:58 1989 --- atk/ness/objects/envt.h.NEW Mon Sep 17 12:30:57 1990 *************** *** 2,10 **** * 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/objects/RCS/envt.h,v 1.6 89/09/03 22:49:46 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/envt.h,v $ */ #ifndef _ness_envt_ #define _ness_envt_ --- 2,10 ---- * 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/envt.h,v 1.7 90/09/16 20:14:20 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/envt.h,v $ */ #ifndef _ness_envt_ #define _ness_envt_ *************** *** 21,26 **** --- 21,29 ---- /* * $Log: envt.h,v $ + * Revision 1.7 90/09/16 20:14:20 wjh + * see ness/objects/changes.sept.90 + * * Revision 1.6 89/09/03 22:49:46 wjh * newness * *************** *** 52,72 **** #include "interp.h" /* for TType */ ! /* each of the following are initialized to point to the value needed for class_IsType() */ extern struct classinfo *celClass; - extern struct classinfo *arbiterviewClass; extern struct classinfo *textClass; extern struct classinfo *textviewClass; extern struct classinfo *dataobjectClass; extern struct classinfo *lpairClass; - extern struct classinfo *scrollClass; - extern struct classinfo *matteClass; extern struct classinfo *viewClass; extern struct classinfo *celviewClass; extern struct classinfo *valueviewClass; extern struct classinfo *imClass; extern struct simpletext *ObjectCode; /* the compiled bytecode for the functions */ extern struct simpletext *EmptyText; /* points to the special mark for error extent */ --- 55,75 ---- #include "interp.h" /* for TType */ ! /* each of the following are initialized (in interp.c) to point to the value needed for class_IsType() */ ! extern struct classinfo *celClass; extern struct classinfo *textClass; extern struct classinfo *textviewClass; extern struct classinfo *dataobjectClass; extern struct classinfo *lpairClass; extern struct classinfo *viewClass; extern struct classinfo *celviewClass; extern struct classinfo *valueviewClass; extern struct classinfo *imClass; + #define CLASS(d) ((d/**/Class == NULL) ? (d/**/Class = class_Load("d")) : d/**/Class) + extern struct simpletext *ObjectCode; /* the compiled bytecode for the functions */ extern struct simpletext *EmptyText; /* points to the special mark for error extent */ *************** *** 172,177 **** --- 175,182 ---- /* in interp.c */ union stackelement *popValue(/* union stackelement *NSP */); + #define NSPushSpace(type) (NSPstore=NSP=(union stackelement *)(((unsigned long)NSP) - sizeof(struct type))) + #define NSPopSpace(type) (NSPstore=NSP=(union stackelement *)(((unsigned long)NSP) + sizeof(struct type))) #endif _ness_envt_ *** atk/ness/objects/interp.c Mon Aug 6 11:07:34 1990 --- atk/ness/objects/interp.c.NEW Mon Sep 17 12:31:05 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.30 90/07/16 15:41:54 gk5g 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.30 90/07/16 15:41:54 gk5g 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.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 *************** *** 21,26 **** --- 21,29 ---- /* * $Log: interp.c,v $ + * Revision 1.31 90/09/16 20:14:27 wjh + * see ness/objects/changes.sept.90 + * * Revision 1.30 90/07/16 15:41:54 gk5g * The second argument to longjmp was being casted to (char*) when it should have been casted to (int). * *************** *** 215,221 **** #include #include #include - #include #include #include #include --- 218,223 ---- *************** *** 249,261 **** long NSSize = InitialNSSize; /* the number of words in the stack. */ /* long nArgsGiven = 0; number of arguments on stack when interpreter is called */ struct classinfo *celClass = NULL; - struct classinfo *arbiterviewClass = NULL; struct classinfo *textClass = NULL; struct classinfo *textviewClass = NULL; struct classinfo *dataobjectClass = NULL; struct classinfo *lpairClass = NULL; - struct classinfo *scrollClass = NULL; - struct classinfo *matteClass = NULL; struct classinfo *viewClass = NULL; struct classinfo *celviewClass = NULL; struct classinfo *valueviewClass = NULL; --- 251,260 ---- *************** *** 263,272 **** struct ness *InterpretationInProgress = NULL; /* used in ness.c */ static jmp_buf ExecutionExit; ! static unsigned char *errIAR; ! static unsigned char *FuncIAR; /*RunError(msg, iar) execution errors call this routine, which passes the error along. --- 262,273 ---- struct ness *InterpretationInProgress = NULL; /* used in ness.c */ static jmp_buf ExecutionExit; ! static unsigned char *iarStore; ! static char *ErrorMsg; ! static struct errornode *SavedMsg; + /* XXX the iar is no longer needed as an argument since it is saved in memory on every cycle */ /*RunError(msg, iar) execution errors call this routine, which passes the error along. *************** *** 280,287 **** char *msg; unsigned char *iar; { ! errIAR = iar; ! longjmp (ExecutionExit, (int)msg); return TRUE; /* more stuff to fool compiler */ } --- 281,289 ---- char *msg; unsigned char *iar; { ! /* printf("RunError @ %d: %s\n", iar, msg); */ ! ErrorMsg = msg; ! longjmp (ExecutionExit, 99); return TRUE; /* more stuff to fool compiler */ } *************** *** 288,299 **** void SigHandler() { ! RunError(":! ! ! Disastrous Ness error in this function. Quit soon. !!!!!!!!!!", ! FuncIAR); } - /* initializeEnvt() initialize all facets of the Ness environment */ --- 290,299 ---- void SigHandler() { ! RunError(":! ! ! Disastrous Ness error in this function. Quit soon. !!!!!!!!!!", 0); } /* initializeEnvt() initialize all facets of the Ness environment */ *************** *** 307,319 **** Initialized = TRUE; celClass = class_Load("cel"); - arbiterviewClass = class_Load("arbiterview"); textClass = class_Load("text"); textviewClass = class_Load("textview"); dataobjectClass = class_Load("dataobject"); lpairClass = class_Load("lpair"); - scrollClass = class_Load("scroll"); - matteClass = class_Load("matte"); viewClass = class_Load("view"); celviewClass = class_Load("celview"); valueviewClass = class_Load("valueview"); --- 307,316 ---- *************** *** 358,363 **** --- 355,361 ---- /* nArgsGiven = 0; */ } + /* popValue(NSP) removes topmost value from stack unlinks marks and frames *************** *** 368,403 **** { switch (NSP->l.hdr) { case (longHdr): ! NSP = (union stackelement *)(((unsigned long)NSP) + sizeof(struct longstkelt)); break; case (boolHdr): ! NSP = (union stackelement *)(((unsigned long)NSP) + sizeof(struct boolstkelt)); break; case (dblHdr): ! NSP = (union stackelement *)(((unsigned long)NSP) + sizeof(struct dblstkelt)); break; case (ptrHdr): ! NSP = (union stackelement *)(((unsigned long)NSP) + sizeof(struct ptrstkelt)); break; case (frameHdr): if (((long)NSP) >= ((long)FramePtr)) FramePtr = NSP->f.prevframe; else {}; /* XXX illegal framepointer skipped ??? */ ! NSP = (union stackelement *)(((unsigned long)NSP) + sizeof(struct frameelt)); break; default: if (NSP->l.hdr == nessmarkHdr) { /* remove link to this mark. */ nessmark_Finalize(&NSP->m); ! NSP = (union stackelement *) ! (((unsigned long)NSP) + sizeof(struct nessmark)); } else /* ERROR: just discard one long word */ ! NSP = (union stackelement *)(((unsigned long)NSP) + sizeof(long)); break; } ! return NSP; } --- 366,401 ---- { switch (NSP->l.hdr) { case (longHdr): ! NSPopSpace(longstkelt); break; case (boolHdr): ! NSPopSpace(boolstkelt); break; case (dblHdr): ! NSPopSpace(dblstkelt); break; case (ptrHdr): ! NSPopSpace(ptrstkelt); break; case (frameHdr): if (((long)NSP) >= ((long)FramePtr)) FramePtr = NSP->f.prevframe; else {}; /* XXX illegal framepointer skipped ??? */ ! NSPopSpace(frameelt); break; default: if (NSP->l.hdr == nessmarkHdr) { /* remove link to this mark. */ nessmark_Finalize(&NSP->m); ! NSPopSpace(nessmark); } else /* ERROR: just discard one long word */ ! NSPstore=NSP=(union stackelement *)(((unsigned long)NSP) ! + sizeof(long)); break; } ! return NSPstore = NSP; } *************** *** 422,428 **** union argType *arg; TType type; { ! if (NSPstore-1 <= NSLowEnd) { /* stack overflow */ /* XXX */ return FALSE; --- 420,427 ---- union argType *arg; TType type; { ! register union stackelement *NSP = NSPstore; ! if (NSP-1 <= NSLowEnd) { /* stack overflow */ /* XXX */ return FALSE; *************** *** 431,460 **** switch (type) { case (longHdr): case (boolHdr): ! NSPstore = (union stackelement *)((unsigned long)NSPstore ! - sizeof(struct longstkelt)); ! NSPstore->l.hdr = type; ! NSPstore->l.v = arg->l; break; case (dblHdr): ! NSPstore = (union stackelement *)((unsigned long)NSPstore ! - sizeof(struct dblstkelt)); ! NSPstore->d.hdr = type; ! NSPstore->d.v = arg->d; break; case (ptrHdr): if ((TType)arg->m->header.nessmark_methods == nessmarkHdr) { ! NSPstore = (union stackelement *)((unsigned long)NSPstore ! - sizeof(struct nessmark)); ! nessmark_InitFrom(&NSPstore->m, arg->m); } else { /* some other kind of pointer */ ! NSPstore = (union stackelement *)((unsigned long)NSPstore ! - sizeof(struct ptrstkelt)); ! NSPstore->p.hdr = type; ! NSPstore->p.v = arg->p; } break; } --- 430,455 ---- switch (type) { case (longHdr): case (boolHdr): ! NSPushSpace(longstkelt); ! NSP->l.hdr = type; ! NSP->l.v = arg->l; break; case (dblHdr): ! NSPushSpace(dblstkelt); ! NSP->d.hdr = type; ! NSP->d.v = arg->d; break; case (ptrHdr): if ((TType)arg->m->header.nessmark_methods == nessmarkHdr) { ! NSPushSpace(nessmark); ! nessmark_InitFrom(&NSP->m, arg->m); } else { /* some other kind of pointer */ ! NSPushSpace(ptrstkelt); ! NSP->p.hdr = type; ! NSP->p.v = arg->p; } break; } *************** *** 490,505 **** RunError(msg, iar); } - - #define sRunError(msg, iar) (NSPstore = NSP, RunError(msg, iar)) - #define PTSTOMARK(arg,iar) ((TType)((struct nessmark *)arg)->header.nessmark_methods \ == nessmarkHdr) ? TRUE : \ ! sRunError(":Not a pointer to a mark (uninitialized variable?)", iar); ! #define PUSHMARK(src) { \ ! NSP = (union stackelement *)((unsigned long)NSP - sizeof(struct nessmark)); \ ! nessmark_InitFrom(&NSP->m, src); } /* interpretNess(func, ness) -- interpret the code for the ness function func --- 485,495 ---- RunError(msg, iar); } #define PTSTOMARK(arg,iar) ((TType)((struct nessmark *)arg)->header.nessmark_methods \ == nessmarkHdr) ? TRUE : \ ! RunError(":Not a pointer to a mark (uninitialized variable?)", iar); ! #define PUSHMARK(src) {NSPushSpace(nessmark); nessmark_InitFrom(&NSP->m, src); } /* interpretNess(func, ness) -- interpret the code for the ness function func *************** *** 521,609 **** register unsigned char *iar; /* next opcode to execute */ unsigned char *iarzero; /* point to first byte of object code */ unsigned char *PrevAddr; /* former value of iar before goto or call */ ! long objend; /* position of next opcode to interpret */ long nextiar; /* beginning of func */ long lengthgotten; long CondCode; /* set by compares; tested by branches 0: EQ 1:GT -1:LT -2:error */ ! int (*oldBus)(), (*oldSeg)(); /* save signal handlers */ boolean Success; - char *ErrMsg; long gocount; ! if (InterpretationInProgress != NULL) ! /* XXX recursive entries don't work yet */ ! return NULL; - /* XXX The next three lines move the gap to the end of ObjectCode */ - objend = simpletext_GetLength(ObjectCode); - simpletext_InsertCharacters(ObjectCode, objend, " ", 1); - simpletext_DeleteCharacters(ObjectCode, objend, 1); - NSP = NSPbase; - FramePtr = &NSPbase->f; InterpretationInProgress = ness; ! NSPstore = NSP; nextiar = nessmark_GetPos(&SysMarkLowEnd[func]); iar = (unsigned char *)simpletext_GetBuf(ObjectCode, nextiar, ! objend - nextiar, &lengthgotten); iarzero = iar - nextiar; /* for debugging */ ! if (lengthgotten < objend-nextiar) return LocateErrorFunc(iar, iarzero, ":Object code management failure !! Quit soon!", ness); ! PrevAddr = NULL; /* this will terminate the while loop */ ! /* the first frame will be built by the EnterFunction operator at the beginning ! of the function */ ! if (arg != NULL) ! PUSHMARK(arg); ! ! if ((ErrMsg=(char *)setjmp(ExecutionExit)) != 0) { ! /* return here from longjmp */ ! /* ( even a normal exit uses longjmp) */ ! struct errornode *msg; signal(SIGBUS, oldBus); signal(SIGSEGV, oldSeg); ! InterpretationInProgress = NULL; ! if (ErrMsg == (char *)-1) ! /* normal exit */ ! msg = NULL; ! else ! msg = LocateErrorFunc(errIAR, iarzero, ErrMsg, ness); - /* pop stack. Necessary to free up marks to text */ - NSP = NSPstore; - while (FramePtr != NULL) - NSP = popValue(NSP); return msg; } ! else { ! /* normal setjmp return location */ ! gocount = 0; - /* catch disasterous errors */ - oldBus = signal(SIGBUS, SigHandler); - oldSeg = signal(SIGSEGV, SigHandler); - while (TRUE) { ! switch(*iar++) { ! default: sRunError(":Illegal Opcode. Compiler failure!", iar-1); break; case '\n': break; /* No-Op */ case '^': /* push NULL */ ! NSP = (union stackelement *)(((unsigned long)NSP) - sizeof(struct ptrstkelt)); NSP->p.hdr = ptrHdr; NSP->p.v = NULL; break; case '_': /* unary minus */ if (NSP->l.hdr != longHdr) ! sRunError(":operand is not an integer value", iar-1); NSP->l.v = - NSP->l.v; break; case '+': --- 511,633 ---- register unsigned char *iar; /* next opcode to execute */ unsigned char *iarzero; /* point to first byte of object code */ unsigned char *PrevAddr; /* former value of iar before goto or call */ ! long objlen = simpletext_GetLength(ObjectCode); long nextiar; /* beginning of func */ long lengthgotten; long CondCode; /* set by compares; tested by branches 0: EQ 1:GT -1:LT -2:error */ ! int (*oldBus)(), (*oldSeg)(); /* save signal handlers */ boolean Success; long gocount; + struct osi_Times starttime; + boolean Gmessaged = FALSE; + long exitcode; + jmp_buf SaveExecExit; + struct frameelt *SaveFramePtr = FramePtr; + struct ness *SaveInterpInProg = InterpretationInProgress; ! /* SaveExecExit = ExecutionExit; */ ! bcopy(&ExecutionExit, &SaveExecExit, sizeof(jmp_buf)); + if (InterpretationInProgress == NULL) { + /* reinitialize stack pointer */ + NSPstore = NSPbase; + + /* XXX The next two lines attempt to move the gap to the end of ObjectCode + XXX so iar++ will sequence through the code */ + simpletext_InsertCharacters(ObjectCode, objlen, " ", 1); + simpletext_DeleteCharacters(ObjectCode, objlen, 1); + } InterpretationInProgress = ness; ! NSP = NSPstore; ! FramePtr = NULL; /* terminate the unstacking loop */ ! PrevAddr = NULL; /* this will terminate the while loop */ ! /* the first frame will be built by the EnterFunction ('P') operator ! at the beginning of the first function */ ! if (arg != NULL) ! PUSHMARK(arg); nextiar = nessmark_GetPos(&SysMarkLowEnd[func]); iar = (unsigned char *)simpletext_GetBuf(ObjectCode, nextiar, ! objlen - nextiar, &lengthgotten); iarzero = iar - nextiar; /* for debugging */ ! /* printf("iarzero: %d\n", iarzero); */ ! if (lengthgotten < objlen-nextiar) return LocateErrorFunc(iar, iarzero, ":Object code management failure !! Quit soon!", ness); + gocount = 0; + osi_GetTimes(&starttime); ! if ((exitcode=setjmp(ExecutionExit)) != 0) { ! struct errornode *msg; ! /* return here from longjmp after execution terminates ! either an error or normal end of execution */ ! /* reset the destination of the error longjmp ! (in case popValue fails) */ ! /* printf("ExitCode: %d\n", exitcode); */ ! if (setjmp(ExecutionExit) == 0) { ! /* setjmp returns 0 when first called */ ! InterpretationInProgress = NULL; ! if (exitcode == 1) ! msg = NULL; /* normal exit */ ! else if (exitcode == 8) ! msg = SavedMsg; ! else ! msg = LocateErrorFunc(iarStore, iarzero, ! ErrorMsg, ness); ! ! /* pop stack. Necessary to free up marks to text */ ! NSP = NSPstore; ! while (FramePtr != NULL) ! NSP = popValue(NSP); ! } ! ! /* restore error traps */ signal(SIGBUS, oldBus); signal(SIGSEGV, oldSeg); ! /* restore global variables */ ! /* ExecutionExit = SaveExecExit; */ ! bcopy(&SaveExecExit, &ExecutionExit, sizeof(jmp_buf)); ! InterpretationInProgress= SaveInterpInProg; ! FramePtr = SaveFramePtr; ! if (exitcode != 1 && ! InterpretationInProgress != NULL) { ! /* we erred in a nested execution ! (most likely from an event within ! launchApplication) ! exit from the outer ness. */ ! /* printf("ReExit for: %s\n", msg->msg); */ ! SavedMsg = msg; ! longjmp (ExecutionExit, 8); ! } return msg; } ! /* when first called setjmp returns zero so execution initially continues here */ ! /* catch disasterous errors */ ! oldBus = signal(SIGBUS, SigHandler); ! oldSeg = signal(SIGSEGV, SigHandler); while (TRUE) { ! iarStore = iar; ! switch(*iar++) { ! default: RunError(":Illegal Opcode. Compiler failure!", iar-1); break; case '\n': break; /* No-Op */ case '^': /* push NULL */ ! NSPushSpace(ptrstkelt); NSP->p.hdr = ptrHdr; NSP->p.v = NULL; break; case '_': /* unary minus */ if (NSP->l.hdr != longHdr) ! RunError(":operand is not an integer value", iar-1); NSP->l.v = - NSP->l.v; break; case '+': *************** *** 613,645 **** case '%': { register struct longstkelt *left ; if (NSP->l.hdr != longHdr) ! sRunError(":right operand is not an integer value", iar-1); left = &(&(NSP->l))[1]; if (left->hdr != longHdr) ! sRunError(":left operand is not an integer value", iar-1); switch (*(iar-1)) { case '+': left->v += NSP->l.v; break; case '-': left->v -= NSP->l.v; break; case '*': left->v *= NSP->l.v; break; ! case '/': if (NSP->l.v == 0) sRunError(":divide by zero", iar-1); else left->v /= NSP->l.v; break; ! case '%': if (NSP->l.v == 0) sRunError(":divide by zero", iar-1); else left->v %= NSP->l.v; break; } NSP = popValue(NSP); /* discard right operand */ } break; case '0': /* push zero long */ ! NSP = (union stackelement *)(((unsigned long)NSP) - sizeof(struct longstkelt)); NSP->l.hdr = longHdr; NSP->l.v = 0; break; case '1': /* push TRUE */ ! NSP = (union stackelement *)(((unsigned long)NSP) - sizeof(struct boolstkelt)); NSP->b.hdr = boolHdr; NSP->b.v = TRUE; /* use C version for now */ break; case '9': /* push FALSE */ ! NSP = (union stackelement *)(((unsigned long)NSP) - sizeof(struct boolstkelt)); NSP->b.hdr = boolHdr; NSP->b.v = FALSE; /* use C version for now */ break; --- 637,669 ---- case '%': { register struct longstkelt *left ; if (NSP->l.hdr != longHdr) ! RunError(":right operand is not an integer value", iar-1); left = &(&(NSP->l))[1]; if (left->hdr != longHdr) ! RunError(":left operand is not an integer value", iar-1); switch (*(iar-1)) { case '+': left->v += NSP->l.v; break; case '-': left->v -= NSP->l.v; break; case '*': left->v *= NSP->l.v; break; ! case '/': if (NSP->l.v == 0) RunError(":divide by zero", iar-1); else left->v /= NSP->l.v; break; ! case '%': if (NSP->l.v == 0) RunError(":divide by zero", iar-1); else left->v %= NSP->l.v; break; } NSP = popValue(NSP); /* discard right operand */ } break; case '0': /* push zero long */ ! NSPushSpace(longstkelt); NSP->l.hdr = longHdr; NSP->l.v = 0; break; case '1': /* push TRUE */ ! NSPushSpace(boolstkelt); NSP->b.hdr = boolHdr; NSP->b.v = TRUE; /* use C version for now */ break; case '9': /* push FALSE */ ! NSPushSpace(boolstkelt); NSP->b.hdr = boolHdr; NSP->b.v = FALSE; /* use C version for now */ break; *************** *** 674,681 **** unsigned char chi, clo; if (gocount++ >1000) { if (im_CheckForInterrupt()) ! sRunError(":Interrupted !", iar - 3); ! else gocount = 0; } chi = *iar++; clo = *iar++; --- 698,715 ---- unsigned char chi, clo; if (gocount++ >1000) { if (im_CheckForInterrupt()) ! RunError(":Interrupted !", iar - 3); ! if (! Gmessaged) { ! struct osi_Times now; ! osi_GetTimes(&now); ! if (now.Secs > starttime.Secs + 7) { ! message_DisplayString(im_GetLastUsed(), 0, ! "You can use control-G if your script is stuck in a loop"); ! im_ForceUpdate(); ! Gmessaged = TRUE; ! } ! } ! gocount = 0; } chi = *iar++; clo = *iar++; *************** *** 701,713 **** char *msg = malloc(strlen(s)+40); sprintf(msg, "*readfile is unable to open file \"%s\"", s); free(s); ! sRunError(msg, iar-1); } NSP = popValue(NSP); /* discard filename */ t = text_New(); /* create a new mark for the file to read into */ ! NSP = (union stackelement *)((unsigned long)NSP - sizeof(struct nessmark)); nessmark_Initialize(&NSP->m); nessmark_Set(&NSP->m, t, 0, 0); --- 735,747 ---- char *msg = malloc(strlen(s)+40); sprintf(msg, "*readfile is unable to open file \"%s\"", s); free(s); ! RunError(msg, iar-1); } NSP = popValue(NSP); /* discard filename */ t = text_New(); /* create a new mark for the file to read into */ ! NSPushSpace(nessmark); nessmark_Initialize(&NSP->m); nessmark_Set(&NSP->m, t, 0, 0); *************** *** 717,723 **** char *msg = malloc(strlen(s)+70); sprintf(msg, "*readfile format failure %d for file \"%s\"", val, s); free(s); ! sRunError(msg, iar-1); } fclose(f); free(s); --- 751,757 ---- char *msg = malloc(strlen(s)+70); sprintf(msg, "*readfile format failure %d for file \"%s\"", val, s); free(s); ! RunError(msg, iar-1); } fclose(f); free(s); *************** *** 778,784 **** simpletext_GetLength(nessmark_GetText(&NSP->m))); break; case 'q': { /* string newbase() */ ! NSP = (union stackelement *)((unsigned long)NSP - sizeof(struct nessmark)); nessmark_Initialize(&NSP->m); nessmark_SetText(&NSP->m, text_New()); } break; --- 812,818 ---- simpletext_GetLength(nessmark_GetText(&NSP->m))); break; case 'q': { /* string newbase() */ ! NSPushSpace(nessmark); nessmark_Initialize(&NSP->m); nessmark_SetText(&NSP->m, text_New()); } break; *************** *** 887,893 **** break; case 'n': if (NSP->l.hdr != longHdr) ! sRunError(":tried to nextn with non-integer value", iar - 2); n = NSP->l.v; NSP = popValue(NSP); /* leave mark on stack and revise its value */ --- 921,927 ---- break; case 'n': if (NSP->l.hdr != longHdr) ! RunError(":tried to nextn with non-integer value", iar - 2); n = NSP->l.v; NSP = popValue(NSP); /* leave mark on stack and revise its value */ *************** *** 899,906 **** n = nessmark_Length(&NSP->m); NSP = popValue(NSP); /* push n */ ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct longstkelt)); NSP->l.hdr = longHdr; NSP->l.v = n; break; --- 933,939 ---- n = nessmark_Length(&NSP->m); NSP = popValue(NSP); /* push n */ ! NSPushSpace(longstkelt); NSP->l.hdr = longHdr; NSP->l.v = n; break; *************** *** 1002,1010 **** + (unsigned long)*iar++); Bload: if (src->hdr != boolHdr) ! sRunError(":tried to load non-Boolean value", opiar); ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct boolstkelt)); NSP->b = *src; break; case 's': /* store to stack */ --- 1035,1042 ---- + (unsigned long)*iar++); Bload: if (src->hdr != boolHdr) ! RunError(":tried to load non-Boolean value", opiar); ! NSPushSpace(boolstkelt); NSP->b = *src; break; case 's': /* store to stack */ *************** *** 1018,1034 **** dest = (struct boolstkelt *)&SysMarkLowEnd[sysloc]; Bstore: if (NSP->b.hdr != boolHdr) ! sRunError(":tried to store non-Boolean value", opiar); *dest = NSP->b; ! NSP = (union stackelement *)((unsigned long)NSP ! + sizeof(struct boolstkelt)); break; case 't': /* compare */ src = &(&(NSP->b))[1]; if (NSP->b.hdr != boolHdr) ! sRunError(":right operand is not a boolean value", opiar); if (src->hdr != boolHdr) ! sRunError(":left operand is not a boolean value", opiar); CondCode = (NSP->b.v == src->v) ? 0 : (src->v < NSP->b.v) ? -1 : 1; NSP = popValue(NSP); /* discard right operand */ --- 1050,1065 ---- dest = (struct boolstkelt *)&SysMarkLowEnd[sysloc]; Bstore: if (NSP->b.hdr != boolHdr) ! RunError(":tried to store non-Boolean value", opiar); *dest = NSP->b; ! NSPopSpace(boolstkelt); break; case 't': /* compare */ src = &(&(NSP->b))[1]; if (NSP->b.hdr != boolHdr) ! RunError(":right operand is not a boolean value", opiar); if (src->hdr != boolHdr) ! RunError(":left operand is not a boolean value", opiar); CondCode = (NSP->b.v == src->v) ? 0 : (src->v < NSP->b.v) ? -1 : 1; NSP = popValue(NSP); /* discard right operand */ *************** *** 1054,1060 **** if (pcall.call->variety == callSym) /* go find out what is being called and check arg types This will CHANGE pcall.call->variety */ ! callCheck(pcall.call, NSP, iar-5, ness); /* now execute function as C code or Ness code */ if (pcall.call->variety == callNess) { --- 1085,1091 ---- if (pcall.call->variety == callSym) /* go find out what is being called and check arg types This will CHANGE pcall.call->variety */ ! callCheck(pcall.call, iar-5, ness); /* now execute function as C code or Ness code */ if (pcall.call->variety == callNess) { *************** *** 1067,1093 **** else { /* callC, callPE, callGet, callSet, callMethod, callClProc */ ! NSP = callCfunc(pcall.call, NSP, iar-5, ness); } } break; case 'E': /* load to stack top a pointer to the current textview object */ if (ness_GetDefaultText(ness) == NULL) ! sRunError(":there is no default text", iar-1); ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct ptrstkelt)); NSP->p.hdr = ptrHdr; NSP->p.v = (struct basicobject *)ness_GetDefaultText(ness); break; case 'F': { /* one of the search functions */ unsigned char op = *iar++; ! NSP = (union stackelement *) ! SearchOp(op, NSPstore=NSP, iar-2); } break; case 'G': { /* make inset have input focus */ struct view *v; if (NSP->p.hdr != ptrHdr || NSP->p.v == NULL || ! class_IsType(NSP->p.v, viewClass)) ! sRunError(":Arg was not a pointer to a view", iar-1); else v = (struct view *)NSP->p.v; NSP = popValue(NSP); /* discard view pointer */ view_WantInputFocus(v, v); /* try to give it the input focus */ --- 1098,1123 ---- else { /* callC, callPE, callGet, callSet, callMethod, callClProc */ ! callCfunc(pcall.call, iar-5, ness); } } break; case 'E': /* load to stack top a pointer to the current textview object */ if (ness_GetDefaultText(ness) == NULL) ! RunError(":there is no default text", iar-1); ! NSPushSpace(ptrstkelt); NSP->p.hdr = ptrHdr; NSP->p.v = (struct basicobject *)ness_GetDefaultText(ness); break; case 'F': { /* one of the search functions */ unsigned char op = *iar++; ! SearchOp(op, iar-2); ! NSP= NSPstore; } break; case 'G': { /* make inset have input focus */ struct view *v; if (NSP->p.hdr != ptrHdr || NSP->p.v == NULL || ! class_IsType(NSP->p.v, viewClass)) ! RunError(":Arg was not a pointer to a view", iar-1); else v = (struct view *)NSP->p.v; NSP = popValue(NSP); /* discard view pointer */ view_WantInputFocus(v, v); /* try to give it the input focus */ *************** *** 1094,1100 **** } break; case 'H': { /* unary operations on real values */ unsigned char op = *iar++; ! NSP = (union stackelement *)realUnary(op, NSPstore=NSP, iar-2); } break; case 'I': { /* integer operations */ unsigned char *opiar = iar-1; --- 1124,1130 ---- } break; case 'H': { /* unary operations on real values */ unsigned char op = *iar++; ! realUnary(op, iar-2); } break; case 'I': { /* integer operations */ unsigned char *opiar = iar-1; *************** *** 1114,1122 **** + (unsigned long)*iar++); Iload: if (src->hdr != longHdr) ! sRunError(":tried to load non-integer value", opiar); ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct longstkelt)); NSP->l = *src; break; case 's': /* store to stack */ --- 1144,1151 ---- + (unsigned long)*iar++); Iload: if (src->hdr != longHdr) ! RunError(":tried to load non-integer value", opiar); ! NSPushSpace(longstkelt); NSP->l = *src; break; case 's': /* store to stack */ *************** *** 1130,1146 **** dest = (struct longstkelt *)&SysMarkLowEnd[sysloc]; Istore: if (NSP->l.hdr != longHdr) ! sRunError(":tried to store non-integer value", opiar); *dest = NSP->l; ! NSP = (union stackelement *)((unsigned long)NSP ! + sizeof(struct longstkelt)); break; case 't': /* compare */ src = &(&(NSP->l))[1]; if (NSP->l.hdr != longHdr) ! sRunError(":right operand is not an integer value", opiar); if (src->hdr != longHdr) ! sRunError(":left operand is not an integer value", opiar); t = src->v - NSP->l.v; CondCode = (t == 0) ? 0 : (t<0) ? -1 : 1; NSP = popValue(NSP); /* discard right operand */ --- 1159,1174 ---- dest = (struct longstkelt *)&SysMarkLowEnd[sysloc]; Istore: if (NSP->l.hdr != longHdr) ! RunError(":tried to store non-integer value", opiar); *dest = NSP->l; ! NSPopSpace(longstkelt); break; case 't': /* compare */ src = &(&(NSP->l))[1]; if (NSP->l.hdr != longHdr) ! RunError(":right operand is not an integer value", opiar); if (src->hdr != longHdr) ! RunError(":left operand is not an integer value", opiar); t = src->v - NSP->l.v; CondCode = (t == 0) ? 0 : (t<0) ? -1 : 1; NSP = popValue(NSP); /* discard right operand */ *************** *** 1150,1156 **** } break; case 'J': { /* call one of various object functions */ unsigned char op = *iar++; ! NSP = callCheat(op, NSPstore=NSP, iar-2, ness); } break; case 'K': { /* dokeys(obj, keys) or DoMenu(obj, item) */ struct view *OldIF; --- 1178,1185 ---- } break; case 'J': { /* call one of various object functions */ unsigned char op = *iar++; ! callCheat(op, iar-2, ness); ! NSP = NSPstore; } break; case 'K': { /* dokeys(obj, keys) or DoMenu(obj, item) */ struct view *OldIF; *************** *** 1165,1172 **** t = (struct view *)p->v; if (p->hdr != ptrHdr || t == NULL || ! class_IsType(t, viewClass)) ! sRunError(":first argument was not a view", iar-2); ! /* XXX can't this use ProperPtr ? */ if (t == ness->CurrentInset && class_IsType(t, celviewClass)) { /* is celview: use application or truechild */ if (celview_GetApplication((struct celview *)t) != NULL) --- 1194,1201 ---- t = (struct view *)p->v; if (p->hdr != ptrHdr || t == NULL || ! class_IsType(t, viewClass)) ! RunError(":first argument was not a view", iar-2); ! /* can't use ProperPtr because we do not know the type of the child of the cel */ if (t == ness->CurrentInset && class_IsType(t, celviewClass)) { /* is celview: use application or truechild */ if (celview_GetApplication((struct celview *)t) != NULL) *************** *** 1234,1248 **** XXX should probably make a copy */ break; } ! else sRunError(":cannot convert value to string", iar-1); NSP = popValue(NSP); /* discard value */ ! NSP = (union stackelement *)((unsigned long)NSP - sizeof(struct nessmark)); nessmark_Initialize(&NSP->m); nessmark_MakeConst(&NSP->m, buf); } break; case 'M': { /* operations on real numbers */ unsigned char op = *iar++; ! NSP = (union stackelement *)realOther(op, NSPstore=NSP, iar-2); } break; case 'N': /* print a newline */ putchar('\n'); --- 1263,1278 ---- XXX should probably make a copy */ break; } ! else RunError(":cannot convert value to string", iar-1); NSP = popValue(NSP); /* discard value */ ! NSPushSpace(nessmark); nessmark_Initialize(&NSP->m); nessmark_MakeConst(&NSP->m, buf); } break; case 'M': { /* operations on real numbers */ unsigned char op = *iar++; ! realOther(op, iar-2); ! NSP = NSPstore; } break; case 'N': /* print a newline */ putchar('\n'); *************** *** 1253,1259 **** long lengthgotten; if (gocount++ >1000) { if (im_CheckForInterrupt()) ! sRunError(":Interrupted !", iar - 3); else gocount = 0; } funcloc = (unsigned long)*iar++ << 8; --- 1283,1289 ---- long lengthgotten; if (gocount++ >1000) { if (im_CheckForInterrupt()) ! RunError(":Interrupted !", iar - 3); else gocount = 0; } funcloc = (unsigned long)*iar++ << 8; *************** *** 1267,1283 **** register unsigned long NlocBytes = (unsigned long)*iar++; unsigned long *t = (unsigned long *)NSP; - FuncIAR = iar-2; /* for SigHandler() */ - NSP = (union stackelement *)((unsigned long)NSP - NlocBytes); if (NSP - FUNCSTACKSLOP <= NSLowEnd) ! sRunError(":stack overflow on function entry", iar-2); /* zero out the locals */ /* bzero(NSP, NlocBytes); */ while (--t >= (unsigned long *)NSP) *t = NULL; ! NSP = (union stackelement *)((unsigned long)NSP - sizeof(struct frameelt)); ! NSP->f.hdr = frameHdr; NSP->f.returnaddress = PrevAddr; NSP->f.prevframe = FramePtr; --- 1297,1314 ---- register unsigned long NlocBytes = (unsigned long)*iar++; unsigned long *t = (unsigned long *)NSP; NSP = (union stackelement *)((unsigned long)NSP - NlocBytes); + /* NSPstore gets set with NSPushSpace(frameelt) below */ + if (NSP - FUNCSTACKSLOP <= NSLowEnd) ! RunError(":stack overflow on function entry", iar-2); ! /* zero out the locals */ /* bzero(NSP, NlocBytes); */ while (--t >= (unsigned long *)NSP) *t = NULL; ! ! NSPushSpace(frameelt); NSP->f.hdr = frameHdr; NSP->f.returnaddress = PrevAddr; NSP->f.prevframe = FramePtr; *************** *** 1326,1332 **** src = (unsigned long *)tsp + nwords; dest = (unsigned long *)NSP; NSP = (union stackelement *)((unsigned long) NSP - eltsize); ! /* it is slower to unroll the following loop because it fits in the instruction cache */ while (src > (unsigned long *)tsp) *--dest = *--src; --- 1357,1364 ---- src = (unsigned long *)tsp + nwords; dest = (unsigned long *)NSP; NSP = (union stackelement *)((unsigned long) NSP - eltsize); ! NSPstore = NSP; ! /* it is (allegedly) slower to unroll the following loop because it fits in the instruction cache */ while (src > (unsigned long *)tsp) *--dest = *--src; *************** *** 1338,1352 **** } else { /* unknown type, push 0L */ ! NSP = (union stackelement *)(((unsigned long)NSP) ! - sizeof(struct longstkelt)); NSP->l.hdr = longHdr; NSP->l.v = 0; } ! if (iar == 0) { ! NSPstore = NSP; ! longjmp(ExecutionExit, (int)-1); ! } } break; case 'R': { /* operations on real numbers */ unsigned char *opiar = iar-1; --- 1370,1381 ---- } else { /* unknown type, push 0L */ ! NSPushSpace(longstkelt); NSP->l.hdr = longHdr; NSP->l.v = 0; } ! if (iar == 0) ! longjmp(ExecutionExit, 1); } break; case 'R': { /* operations on real numbers */ unsigned char *opiar = iar-1; *************** *** 1367,1375 **** goto Rload; Rload: if (src->hdr != dblHdr) ! sRunError(":tried to load non-real value", opiar); ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct dblstkelt)); NSP->d = *src; break; case 's': /* store to stack */ --- 1396,1403 ---- goto Rload; Rload: if (src->hdr != dblHdr) ! RunError(":tried to load non-real value", opiar); ! NSPushSpace(dblstkelt); NSP->d = *src; break; case 's': /* store to stack */ *************** *** 1384,1406 **** goto Rstore; Rstore: if (NSP->d.hdr != dblHdr) ! sRunError(":tried to store non-real value", opiar); #if !defined(VAX_ENV) && !defined(PMAX_ENV) #if (! SY_U5x && ! SY_AIXx) if (isnan(NSP->d.v) == 1) ! sRunError(":tried to store NaN value", opiar); #endif /* (!SYSV && !AIX) */ #endif /* !defined(VAX_ENV) && !defined(PMAX_ENV) */ *dest = NSP->d; ! NSP = (union stackelement *)((unsigned long)NSP ! + sizeof(struct dblstkelt)); break; case 't': /* compare */ src = &(&(NSP->d))[1]; if (NSP->d.hdr != dblHdr) ! sRunError(":right operand is not a real value", opiar); if (src->hdr != dblHdr) ! sRunError(":left operand is not a real value", opiar); t = src->v - NSP->d.v; CondCode = (t == 0) ? 0 : (t<0) ? -1 : 1; NSP = popValue(NSP); /* discard right operand */ --- 1412,1433 ---- goto Rstore; Rstore: if (NSP->d.hdr != dblHdr) ! RunError(":tried to store non-real value", opiar); #if !defined(VAX_ENV) && !defined(PMAX_ENV) #if (! SY_U5x && ! SY_AIXx) if (isnan(NSP->d.v) == 1) ! RunError(":tried to store NaN value", opiar); #endif /* (!SYSV && !AIX) */ #endif /* !defined(VAX_ENV) && !defined(PMAX_ENV) */ *dest = NSP->d; ! NSPopSpace(dblstkelt); break; case 't': /* compare */ src = &(&(NSP->d))[1]; if (NSP->d.hdr != dblHdr) ! RunError(":right operand is not a real value", opiar); if (src->hdr != dblHdr) ! RunError(":left operand is not a real value", opiar); t = src->v - NSP->d.v; CondCode = (t == 0) ? 0 : (t<0) ? -1 : 1; NSP = popValue(NSP); /* discard right operand */ *************** *** 1415,1423 **** if (NSP->p.hdr != ptrHdr || (v=(struct textview *)ProperPtr((struct basicobject *)NSP->p.v, textviewClass)) == NULL) ! sRunError(":Arg was not a pointer to a textview", opiar); NSP = popValue(NSP); /* discard view pointer */ ! NSP = (union stackelement *)((unsigned long)NSP - sizeof(struct nessmark)); nessmark_Initialize(&NSP->m); if (v == NULL) {} else if (op == 's') { --- 1442,1450 ---- if (NSP->p.hdr != ptrHdr || (v=(struct textview *)ProperPtr((struct basicobject *)NSP->p.v, textviewClass)) == NULL) ! RunError(":Arg was not a pointer to a textview", opiar); NSP = popValue(NSP); /* discard view pointer */ ! NSPushSpace(nessmark); nessmark_Initialize(&NSP->m); if (v == NULL) {} else if (op == 's') { *************** *** 1437,1449 **** } break; case 'T': /* test TOS for TRUE (or FALSE) */ if (NSP->b.hdr != boolHdr) ! sRunError(":Not a pointer to a mark", iar); CondCode = (NSP->b.v == TRUE) ? 0 : -1; NSP = popValue(NSP); /* discard value */ break; case 'U': { /* call a user interface information function */ unsigned char op = *iar++; ! NSP = neventInfo(op, NSPstore=NSP, iar-2, ness); } break; case 'V': { /* pointer operations */ unsigned char *opiar = iar-1; --- 1464,1477 ---- } break; case 'T': /* test TOS for TRUE (or FALSE) */ if (NSP->b.hdr != boolHdr) ! RunError(":Not a pointer to a mark", iar); CondCode = (NSP->b.v == TRUE) ? 0 : -1; NSP = popValue(NSP); /* discard value */ break; case 'U': { /* call a user interface information function */ unsigned char op = *iar++; ! neventInfo(op, iar-2, ness); ! NSP = NSPstore; } break; case 'V': { /* pointer operations */ unsigned char *opiar = iar-1; *************** *** 1463,1471 **** + (unsigned long)*iar++); Vload: if (src->hdr != ptrHdr) ! sRunError(":tried to load non-pointer value", opiar); ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct ptrstkelt)); NSP->p = *src; break; case 's': /* store to stack */ --- 1491,1498 ---- + (unsigned long)*iar++); Vload: if (src->hdr != ptrHdr) ! RunError(":tried to load non-pointer value", opiar); ! NSPushSpace(ptrstkelt); NSP->p = *src; break; case 's': /* store to stack */ *************** *** 1479,1495 **** dest = (struct ptrstkelt *)&SysMarkLowEnd[sysloc]; Vstore: if (NSP->p.hdr != ptrHdr) ! sRunError(":tried to store non-pointer value", opiar); *dest = NSP->p; ! NSP = (union stackelement *)((unsigned long)NSP ! + sizeof(struct ptrstkelt)); break; case 't': /* compare */ src = &(&(NSP->p))[1]; if (NSP->p.hdr != ptrHdr) ! sRunError(":right operand is not a pointer value", opiar); if (src->hdr != ptrHdr) ! sRunError(":left operand is not a pointer value", opiar); t = ((long)src->v) - ((long)NSP->p.v); CondCode = (t == 0) ? 0 : (t<0) ? -1 : 1; NSP = popValue(NSP); /* discard right operand */ --- 1506,1521 ---- dest = (struct ptrstkelt *)&SysMarkLowEnd[sysloc]; Vstore: if (NSP->p.hdr != ptrHdr) ! RunError(":tried to store non-pointer value", opiar); *dest = NSP->p; ! NSPopSpace(ptrstkelt); break; case 't': /* compare */ src = &(&(NSP->p))[1]; if (NSP->p.hdr != ptrHdr) ! RunError(":right operand is not a pointer value", opiar); if (src->hdr != ptrHdr) ! RunError(":left operand is not a pointer value", opiar); t = ((long)src->v) - ((long)NSP->p.v); CondCode = (t == 0) ? 0 : (t<0) ? -1 : 1; NSP = popValue(NSP); /* discard right operand */ *************** *** 1518,1524 **** f = fopen(s=nessmark_ToC(filename), "w"); free(s); if (f == NULL) ! sRunError(":Could not open file for writing", iar-1); /* write contents to file */ pos = nessmark_GetPos(contents); --- 1544,1550 ---- f = fopen(s=nessmark_ToC(filename), "w"); free(s); if (f == NULL) ! RunError(":Could not open file for writing", iar-1); /* write contents to file */ pos = nessmark_GetPos(contents); *************** *** 1566,1574 **** free(buf); NSP = popValue(NSP); /* discard the argument */ ! /* create a new mark for the file to read into ! XXX most of this is from readfile() do we want a common subr? */ ! NSP = (union stackelement *)((unsigned long)NSP - sizeof(struct nessmark)); nessmark_Initialize(&NSP->m); t = simpletext_New(); nessmark_Set(&NSP->m, t, 0, 0); --- 1592,1599 ---- free(buf); NSP = popValue(NSP); /* discard the argument */ ! /* create a new mark for the file to read into */ ! NSPushSpace(nessmark); nessmark_Initialize(&NSP->m); t = simpletext_New(); nessmark_Set(&NSP->m, t, 0, 0); *************** *** 1601,1607 **** if (p->hdr != ptrHdr || (t=(struct textview *)ProperPtr((struct basicobject *)p->v, textviewClass)) == NULL) ! sRunError(":first argument was not a textview", iar-1); if ((struct simpletext *)t->header.view.dataobject == nessmark_GetText(&NSP->m)) { textview_SetDotPosition(t, nessmark_GetPos(&NSP->m)); --- 1626,1632 ---- if (p->hdr != ptrHdr || (t=(struct textview *)ProperPtr((struct basicobject *)p->v, textviewClass)) == NULL) ! RunError(":first argument was not a textview", iar-1); if ((struct simpletext *)t->header.view.dataobject == nessmark_GetText(&NSP->m)) { textview_SetDotPosition(t, nessmark_GetPos(&NSP->m)); *************** *** 1609,1615 **** textview_FrameDot(t, nessmark_GetPos(&NSP->m)); } else ! sRunError(":marker was not for text in the given object", iar-1); NSP = popValue(NSP); /* discard selection marker */ NSP = popValue(NSP); /* discard object */ } break; --- 1634,1640 ---- textview_FrameDot(t, nessmark_GetPos(&NSP->m)); } else ! RunError(":marker was not for text in the given object", iar-1); NSP = popValue(NSP); /* discard selection marker */ NSP = popValue(NSP); /* discard object */ } break; *************** *** 1624,1632 **** } break; ! } /* end switch(*iar++) */ } /* end while(TRUE) */ - } /* end else */ } /* end interpretNess() */ --- 1649,1656 ---- } break; ! } /* end switch(*iar++) */ } /* end while(TRUE) */ } /* end interpretNess() */ *** atk/ness/objects/ness.c Wed Jan 17 16:38:12 1990 --- atk/ness/objects/ness.c.NEW Mon Sep 17 12:31:15 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/ness/objects/RCS/ness.c,v 1.27 89/11/18 20:57:18 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/.andrew.cmu.edu/itc/src/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/andrew/atk/ness/objects/RCS/ness.c,v 1.27 89/11/18 20:57:18 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.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 *************** *** 16,21 **** --- 16,27 ---- */ /* * $Log: ness.c,v $ + * 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. + * + * Revision 1.28 90/09/16 20:14:42 wjh + * see ness/objects/changes.sept.90 + * * Revision 1.27 89/11/18 20:57:18 wjh * removed two declarations of unused variables: version and origin * *************** *** 762,770 **** return dataobject_PREMATUREEOF; } /* check to see if we might be a shell script ! */ ! if ((c=getc(inputfile)) == '#') /* skip first line */ ! while ( ! feof(inputfile) && getc(inputfile) != '\n') {} else ungetc(c, inputfile); val = ReadTextFileStream((struct text *)self, name, inputfile); --- 768,781 ---- return dataobject_PREMATUREEOF; } /* check to see if we might be a shell script ! */ ! c = getc(inputfile); ! if (c == '#') { /* skip first line */ ! while ( ! feof(inputfile)) { ! c = getc(inputfile); ! if (c == '\n') break; ! } ! } else ungetc(c, inputfile); val = ReadTextFileStream((struct text *)self, name, inputfile); *************** *** 856,869 **** { static char *RedMsg = ":You must Empower this Ness before trying to compile"; ENTER(Compile); ! if (InterpretationInProgress != NULL) { ! InterpretationInProgress->ToldUser = TRUE; ! message_DisplayString(NULL, 0, "Cannot compile while execution in progress"); ! return NULL; ! } ! releaseResources(self); if (self->accesslevel < ness_codeOrange) --- 867,881 ---- { static char *RedMsg = ":You must Empower this Ness before trying to compile"; + static char *RecurMsg = + ":Ness cannot compile while an execution is in progress"; + ENTER(Compile); ! if (InterpretationInProgress != NULL) ! return (self->ErrorList = ! errornode_Create(self, 0, 0, 0, RecurMsg, ! FALSE, NULL)); releaseResources(self); if (self->accesslevel < ness_codeOrange) *************** *** 1076,1083 **** if (LibFrame == NULL) { /* we need to create a LibFrame window */ im_SetProgramName("NessLibrary"); ! im = im_Create(NULL); /* (argument can be hostname) */ ! LibFrame = frame_New(); /* use a frame to get message line */ im_SetView(im, LibFrame); frame_PostDefaultHandler(LibFrame, "message", frame_WantHandler(LibFrame, "message")); --- 1088,1103 ---- if (LibFrame == NULL) { /* we need to create a LibFrame window */ im_SetProgramName("NessLibrary"); ! im = im_Create(NULL); ! if (im == NULL) { ! fprintf(stderr, "ness: Could not create new window.\n"); ! return; ! } ! LibFrame = frame_New(); ! if (LibFrame == NULL) { ! fprintf(stderr, "ness: Could not allocate enough memory to display library file.\n"); ! return; ! } im_SetView(im, LibFrame); frame_PostDefaultHandler(LibFrame, "message", frame_WantHandler(LibFrame, "message")); *** atk/ness/objects/ness.ch Mon Aug 6 11:07:36 1990 --- atk/ness/objects/ness.ch.NEW Mon Sep 17 12:31:20 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.13 90/07/15 15:24:09 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.13 90/07/15 15:24:09 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.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 /* *************** *** 20,25 **** --- 20,28 ---- */ /* * $Log: ness.ch,v $ + Revision 1.14 90/09/16 20:14:55 wjh + see ness/objects/changes.sept.90 + Revision 1.13 90/07/15 15:24:09 wjh call.c: fix a coreleak in class() ness.ch: defined CURRENTMODIFICATIONLEVEL *************** *** 116,122 **** CURRENTSYNTAXLEVEL because that means we have a new program and an old compiler. */ ! #define CURRENTMODIFICATIONLEVEL 3 /* nessrun generates the VERSION NUMBER as * --- 119,125 ---- CURRENTSYNTAXLEVEL because that means we have a new program and an old compiler. */ ! #define CURRENTMODIFICATIONLEVEL 4 /* nessrun generates the VERSION NUMBER as * *** atk/ness/objects/nesscomp.gra Wed Nov 22 12:21:36 1989 --- atk/ness/objects/nesscomp.gra.NEW Mon Sep 17 12:31:27 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/nesscomp.gra,v 1.10 89/09/17 08:52:58 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/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/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/nesscomp.gra,v 1.10 89/09/17 08:52:58 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.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) */ *************** *** 80,86 **** %type parmList nonEmptyParmList ! %type stmtList stmt elsePart declIdList funcend eventstart endtag %type type relop functype --- 80,86 ---- %type parmList nonEmptyParmList ! %type stmtList stmt elsePart declHead declIdList funcend eventstart endtag %type type relop functype *************** *** 203,213 **** | ';' /* allow extra semi-colons */ ! | type /* variable declaration */ declIdList { struct nesssym *id, *nid; ! ProcessIdList($1, $2, flag_var | flag_globalvar); ! for (id = $2; id != NULL; id = nid) { nid = id->next; /* genLinkGlobal changes the link */ genLinkGlobal(id); nesssym_NSetInfo(id, TSysMarkRef, makeGlobal()); --- 203,214 ---- | ';' /* allow extra semi-colons */ ! | declHead /* variable declaration */ declIdList { struct nesssym *id, *nid; ! $1->next = $2; ! ProcessIdList($1->type, $1, flag_var | flag_globalvar); ! for (id = $1; id != NULL; id = nid) { nid = id->next; /* genLinkGlobal changes the link */ genLinkGlobal(id); nesssym_NSetInfo(id, TSysMarkRef, makeGlobal()); *************** *** 215,238 **** for all types */ }} ! | type /* variable declaration with initialization */ ! setID COLONEQUAL ! { $2 = uniqueinscope($2, flag_var | flag_globalvar, -1); ! $2->type = $1; ! genLinkGlobal($2); ! nesssym_NSetInfo($2, TSysMarkRef, makeGlobal()); /* XXX makeGlobal() may not be right for all types */ ! $$ = genvarnode($2); genSaveStmtStart(-2); genRestoreFuncState(curNess->InitFunc); predpush(FALSE, $$->loc+$$->len, 'X'); } expr ! { predvalue(&$5->type); predpop(); ! demandnodetype($5, (($4)->sym)->type); ! exprnode_Destroy($5); ! genvarstore($4); genSaveFuncState(); } | functype --- 216,237 ---- for all types */ }} ! | declHead /* variable declaration with initialization */ COLONEQUAL ! { $1->flags = flag_var | flag_globalvar; ! genLinkGlobal($1); ! nesssym_NSetInfo($1, TSysMarkRef, makeGlobal()); /* XXX makeGlobal() may not be right for all types */ ! $$ = genvarnode($1); genSaveStmtStart(-2); genRestoreFuncState(curNess->InitFunc); predpush(FALSE, $$->loc+$$->len, 'X'); } expr ! { predvalue(&$4->type); predpop(); ! demandnodetype($4, (($3)->sym)->type); ! exprnode_Destroy($4); ! genvarstore($3); genSaveFuncState(); } | functype *************** *** 408,431 **** genvarstore($3); $$ = NULL; } ! | type /* declaration */ declIdList ! { ProcessIdList($1, $2, flag_var | flag_localvar); ! $$ = $2; } ! | type /* initialized declaration */ ! setID COLONEQUAL ! { $$ = genvarnode(uniqueinscope($2, flag_var, 0)); ! ProcessIdList($1, $$->sym, flag_var | flag_localvar); varIsStorable($$); predpush(FALSE, $$->loc+$$->len, 'X'); } expr ! { predvalue(&$5->type); predpop(); ! demandnodetype($5, $4->sym->type); ! exprnode_Destroy($5); ! $$ = $4->sym; /* access before destroy varnode */ ! genvarstore($4); } | funcCall { if ($1->type != Tvoid) --- 407,430 ---- genvarstore($3); $$ = NULL; } ! | declHead /* declaration */ declIdList ! { $$ = $1; $$->next = $2; ! ProcessIdList($$->type, $$, flag_var | flag_localvar); } ! | declHead /* initialized declaration */ COLONEQUAL ! { $$ = genvarnode($1); ! ProcessIdList($1->type, $$->sym, ! flag_var | flag_localvar); varIsStorable($$); predpush(FALSE, $$->loc+$$->len, 'X'); } expr ! { predvalue(&$4->type); predpop(); ! demandnodetype($4, $3->sym->type); ! exprnode_Destroy($4); ! $$ = $3->sym; /* access before destroy varnode */ ! genvarstore($3); } | funcCall { if ($1->type != Tvoid) *************** *** 490,503 **** predpop(); $$ = appendlists($6, $7); } ; /* $$ is the list of defined vars as nesssym's */ declIdList ! : setID ! { $$ = uniqueinscope($1, flag_var, 0); } | declIdList ',' setID ! { $$ = appendlists($1, uniqueinscope($3, flag_var, 0)); } ; --- 489,510 ---- predpop(); $$ = appendlists($6, $7); } ; + /* $$ is a nesssym for the defined variable */ + declHead : + type + setID + { $$ = uniqueinscope($2, flag_var, 0); + $$->type = $1; } + ; + /* $$ is the list of defined vars as nesssym's */ declIdList ! : /* empty */ ! { $$ =NULL; } | declIdList ',' setID ! { $$ = appendlists($1, uniqueinscope($3, flag_var, 0)); } ; *************** *** 787,798 **** /* $$ is a varnode */ constant : setSTRINGCON ! { /* there are 3 cases: EmptyStringToken, short string, ! and long string. The EmptyStringToken has name '"'. ! A short string has a name beginning ! with ". A long string has a name /ddd, where ! ddd is an integer. For a short string, the name gives ! the contents with \ reduction. */ long loc, len; loc = lex_RecentPosition(0, &len); if ( ! ($1->flags & flag_const)) --- 794,807 ---- /* $$ is a varnode */ constant : setSTRINGCON ! { /* 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 ( ! ($1->flags & flag_const)) *************** *** 801,807 **** makeStyledConst(curNess, /*the text*/ $1->header.toksym.loc, $1->header.toksym.len, ! (*nesssym_NGetName($1) == '"') )); $1->type = Tstr; $1->flags = flag_const; $$ = varnode_Create(loc, len, $1, NULL); } --- 810,817 ---- makeStyledConst(curNess, /*the text*/ $1->header.toksym.loc, $1->header.toksym.len, ! (*nesssym_NGetName($1) == '"' ! || *nesssym_NGetName($1) == '~') )); $1->type = Tstr; $1->flags = flag_const; $$ = varnode_Create(loc, len, $1, NULL); } *** atk/ness/objects/nevent.c Wed Jan 17 16:38:18 1990 --- atk/ness/objects/nevent.c.NEW Tue Sep 18 12:28:58 1990 *************** *** 1,12 **** /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/andrew/atk/ness/objects/RCS/nevent.c,v 1.21 89/12/12 15:05:01 ghoti Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/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/andrew/atk/ness/objects/RCS/nevent.c,v 1.21 89/12/12 15:05:01 ghoti 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.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 *************** *** 14,19 **** --- 14,20 ---- #include /* for index() */ #include + #include /* for FOLDEDEQ */ #include #include *************** *** 28,38 **** --- 29,46 ---- #include #include #include + #include /* for value_NEWVALUE */ #include #include #include #include + /* for FrameMark */ + #include + #include + #include + #include + #include #include #include *************** *** 53,58 **** --- 61,71 ---- static unsigned char *LastKeys = NULL; static unsigned char *LastMenu = NULL; + static struct classinfo *scrollClass = NULL; + static struct classinfo *matteClass = NULL; + static struct classinfo *frameClass = NULL; + static struct classinfo *bufferClass = NULL; + static struct classinfo *arbiterviewClass = NULL; static struct init *globalInit = NULL; *************** *** 162,168 **** static long nextevent = 0; if (strlen(nesssym_NGetName(spec)) > 300) { ReportError(":specification truncated to 300 characters", 0); ! spec->header.sym.name[300] = '\0'; /* GACK UGH XXX */ } sprintf(buf, "\\ Event %d (%s)", nextevent++, nesssym_NGetName(spec)); --- 175,181 ---- static long nextevent = 0; if (strlen(nesssym_NGetName(spec)) > 300) { ReportError(":specification truncated to 300 characters", 0); ! spec->header.sym.name[300] = '\0'; /* UGH */ } sprintf(buf, "\\ Event %d (%s)", nextevent++, nesssym_NGetName(spec)); *************** *** 233,240 **** if (NSP->l.hdr != longHdr) RunError(":arg should be an integer", iar); *pLong = NSP->l.v; ! return (union stackelement *)((unsigned long)NSP ! + sizeof(struct longstkelt)); } --- 246,252 ---- if (NSP->l.hdr != longHdr) RunError(":arg should be an integer", iar); *pLong = NSP->l.v; ! return NSPopSpace(longstkelt); } *************** *** 277,284 **** class_GetTypeName(type)); RunError(buf, iar); } ! return (union stackelement *)((unsigned long)NSP ! + sizeof(struct ptrstkelt)); } /* ProperPtr(ptr, type) --- 289,295 ---- class_GetTypeName(type)); RunError(buf, iar); } ! return NSPopSpace(ptrstkelt); } /* ProperPtr(ptr, type) *************** *** 293,298 **** --- 304,311 ---- { struct dataobject *dobj; struct view *view; + long i; + boolean issame; if (ptr == NULL) return ptr; if (class_IsType(ptr, type)) return ptr; *************** *** 305,310 **** --- 318,330 ---- if (class_IsType(dobj, type)) return (struct basicobject *)dobj; } + /* maybe it's a buffer */ + if (class_IsType(ptr, CLASS(buffer))) { + dobj = buffer_GetData((struct buffer *)ptr); + if (class_IsType(dobj, type)) + return (struct basicobject *)dobj; + } + return NULL; } /* it is a view. If data object is wanted, check this one's */ *************** *** 313,383 **** if (class_IsType(dobj, type)) return (struct basicobject *)dobj; } /* it is a view, try various kinds of containers */ ! if (class_IsType(ptr, arbiterviewClass)) { /* sometimes an arbiter isn't really in the tree */ /* sometimes it has a child pointer pointing to a bogus place */ return NULL; } ! else if (class_IsType(ptr, celviewClass)) { ! view = celview_GetApplication((struct celview *)ptr); ! if (view != NULL && (view=(struct view *)ProperPtr((struct basicobject *)view, ! type)) != NULL) ! return (struct basicobject *)view; ! view = celview_GetTrueChild((struct celview *)ptr); ! if (view != NULL && (view=(struct view *)ProperPtr((struct basicobject *)view, ! type)) != NULL) ! return (struct basicobject *)view; ! } ! else if (class_IsType(ptr, lpairClass)) { ! view = lpair_GetNth((struct lpair *)ptr, 0); ! if (view != NULL && (view=(struct view *)ProperPtr((struct basicobject *)view, ! type)) != NULL) ! return (struct basicobject *)view; ! view = lpair_GetNth((struct lpair *)ptr, 1); ! if (view != NULL && (view=(struct view *)ProperPtr((struct basicobject *)view, ! type)) != NULL) ! return (struct basicobject *)view; ! } ! else if (class_IsType(ptr, scrollClass)) { ! view = scroll_GetChild((struct scroll *)ptr); ! if (view != NULL && (view=(struct view *)ProperPtr((struct basicobject *)view, ! type)) != NULL) ! return (struct basicobject *)view; view = scroll_GetScrollee((struct scroll *)ptr); ! if (view != NULL && (view=(struct view *)ProperPtr((struct basicobject *)view, ! type)) != NULL) return (struct basicobject *)view; ! } ! else if (class_IsType(ptr, matteClass)) { ! view = ((struct matte *)ptr)->child; ! if (view != NULL && (view=(struct view *) ! ProperPtr((struct basicobject *)view, type)) ! != NULL) ! return (struct basicobject *)view; ! } ! else if (class_IsType(ptr, imClass)) { ! view = ((struct im *)ptr)->topLevel; ! if (view != NULL && (view=(struct view *) ! ProperPtr((struct basicobject *)view, type)) ! != NULL) ! return (struct basicobject *)view; ! } ! /* we give up */ return NULL; } ! /* neventInfo(op, NSP, iar, ness) return information about the most recent interactive input */ ! union stackelement * ! neventInfo(op, NSP, iar, ness) unsigned char op; - union stackelement *NSP; unsigned char *iar; struct ness *ness; { long v; boolean bv; unsigned char *s; --- 333,468 ---- if (class_IsType(dobj, type)) return (struct basicobject *)dobj; } + + /* it is a view, try various kinds of containers */ ! ! if (class_IsType(ptr, CLASS(arbiterview))) { /* sometimes an arbiter isn't really in the tree */ /* sometimes it has a child pointer pointing to a bogus place */ return NULL; } ! ! #define NCLASSES 9 ! for (i = 1; i <= NCLASSES; i++) { ! view = NULL; ! switch (i) { ! case 1: if ( (issame = class_IsType(ptr, celviewClass)) ) ! view = celview_GetApplication((struct celview *)ptr); ! break; ! ! case 2: if (issame) ! view = celview_GetTrueChild((struct celview *)ptr); ! break; ! ! case 3: if ( (issame = class_IsType(ptr, lpairClass)) ) ! view = lpair_GetNth((struct lpair *)ptr, 0); ! break; ! ! case 4: if (issame) ! view = lpair_GetNth((struct lpair *)ptr, 1); ! break; ! ! case 5: if ( (issame = class_IsType(ptr, CLASS(scroll))) ) ! view = scroll_GetChild((struct scroll *)ptr); ! break; ! ! case 6: if (issame) view = scroll_GetScrollee((struct scroll *)ptr); ! break; ! ! case 7: if (class_IsType(ptr, CLASS(matte))) ! view = ((struct matte *)ptr)->child; ! break; ! ! case 8: if (class_IsType(ptr, imClass)) ! view = ((struct im *)ptr)->topLevel; ! break; ! ! case 9: if (class_IsType(ptr, CLASS(frame))) ! view = frame_GetChildView((struct frame *)ptr); ! break; ! ! } /* end of switch(i) */ ! ! /* test the value of view left by the latest case */ ! if (view != NULL && ! (view=(struct view *) ProperPtr((struct basicobject *)view, type)) != NULL) return (struct basicobject *)view; ! } /* end of for(i) */ ! #undef NCLASSES ! return NULL; } + static struct text * + FrameMark(ness, m, title, pgmnm, enablecommands, pPos, pLen) + struct ness *ness; + struct nessmark *m; + char *pgmnm, *title; + boolean enablecommands; + long *pPos, *pLen; + { + struct text *text; + struct textview *textview; + struct buffer *buffer; + struct frame *frame; + struct im *window; + char *oldpgmnm; + char *lastslash; ! text = (struct text *)nessmark_GetText(m); ! ! oldpgmnm = im_GetProgramName(); ! if (pgmnm != NULL && *pgmnm != '\0') ! im_SetProgramName(pgmnm); ! ! lastslash = rindex(title, '/'); ! if (lastslash == NULL) ! lastslash = title; ! else lastslash++; ! buffer = buffer_Create(lastslash, NULL, NULL, text); ! if ((frame = frame_Create(buffer)) == NULL) ! return NULL; ! if ((window = im_Create(NULL)) == NULL) ! return NULL; ! im_SetView(window, frame); ! frame_PostDefaultHandler(frame, "message", frame_WantHandler(frame, "message")); ! message_DisplayString(frame, 0, ""); ! frame_SetBuffer(frame, buffer, TRUE); ! frame_SetCommandEnable(frame, enablecommands); ! ! textview = (struct textview *)frame_GetView(frame); ! textview_SetDotPosition(textview, nessmark_GetPos(m)); ! textview_SetDotLength(textview, nessmark_GetLength(m)); ! textview_FrameDot(textview, nessmark_GetPos(m)); ! textview_WantInputFocus(textview, textview); ! ! ness_SetDefaultText(ness, textview); ! ness_SetArbiter(ness, arbiterview_FindArb((struct view *)textview)); ! neventPost (ness, FALSE); ! ! ness_AddObserver(ness, ness); ! ! im_KeyboardProcessor(); /* DO IT - wait while user interacts*/ ! ! *pPos = textview_GetDotPosition(textview); ! *pLen = textview_GetDotLength(textview); ! textview_Destroy(textview); ! im_SetProgramName(oldpgmnm); ! return text; ! } ! ! /* neventInfo(op, iar, ness) return information about the most recent interactive input */ ! void ! neventInfo(op, iar, ness) unsigned char op; unsigned char *iar; struct ness *ness; { + union stackelement *NSP = NSPstore; long v; boolean bv; unsigned char *s; *************** *** 453,463 **** vobj = (struct value *)vvwobj->header.view.dataobject; if (v != value_GetArraySize(vobj)) { /* create new array of the given size ! XXX never freed */ ! value_SetArraySize(vobj, v); ! value_SetStringArray(vobj, ! calloc(v, sizeof(unsigned char *))); ! /* init to 000 */ } break; --- 538,546 ---- vobj = (struct value *)vvwobj->header.view.dataobject; if (v != value_GetArraySize(vobj)) { /* create new array of the given size ! XXX never freed */ value_SetStrArrayAndSize(vobj, ! calloc(v, sizeof(unsigned char *)), v); ! /* init to NULL ptrs */ } break; *************** *** 476,482 **** unsigned char **sar; PTSTOMARK(&NSP->m, iar); s = nessmark_ToC(&NSP->m); ! NSP = popValue(NSP); NSP = unstackLong(NSP, iar, &index); NSP = unstackObject(NSP, iar, &vvwobj, valueviewClass); vobj = (struct value *)vvwobj->header.view.dataobject; --- 559,565 ---- unsigned char **sar; PTSTOMARK(&NSP->m, iar); s = nessmark_ToC(&NSP->m); ! NSP = popValue(NSP); /* discard the marker now */ NSP = unstackLong(NSP, iar, &index); NSP = unstackObject(NSP, iar, &vvwobj, valueviewClass); vobj = (struct value *)vvwobj->header.view.dataobject; *************** *** 486,491 **** --- 569,575 ---- XXX never freed */ sar = (unsigned char **)value_GetStringArray(vobj); sar[index] = s; + value_NotifyObservers(vobj, value_NEWVALUE); } break; case 'v': /* value_setnotify(obj, bool) */ /* NSP = unstackBool(NSP, iar, &v); */ *************** *** 492,499 **** if (NSP->b.hdr != boolHdr) RunError(":arg should be a boolean", iar); v = NSP->b.v; ! NSP = (union stackelement *)((unsigned long)NSP ! + sizeof(struct boolstkelt)); NSP = unstackObject(NSP, iar, &vvwobj, valueviewClass); vobj = (struct value *)vvwobj->header.view.dataobject; value_SetNotify(vobj, v); --- 576,582 ---- if (NSP->b.hdr != boolHdr) RunError(":arg should be a boolean", iar); v = NSP->b.v; ! NSPopSpace(boolstkelt); NSP = unstackObject(NSP, iar, &vvwobj, valueviewClass); vobj = (struct value *)vvwobj->header.view.dataobject; value_SetNotify(vobj, v); *************** *** 530,537 **** if (NSP->p.hdr != ptrHdr) RunError(":arg should be an object", iar); inset = (struct view *)NSP->p.v; ! NSP = (union stackelement *)((unsigned long)NSP ! + sizeof(struct ptrstkelt)); if (inset == NULL || ! class_IsType(inset, viewClass)) RunError(":first arg should be a view", iar); if (ness->CurrentInset == inset && class_IsType(inset, celviewClass)) { --- 613,619 ---- if (NSP->p.hdr != ptrHdr) RunError(":arg should be an object", iar); inset = (struct view *)NSP->p.v; ! NSPopSpace(ptrstkelt); if (inset == NULL || ! class_IsType(inset, viewClass)) RunError(":first arg should be a view", iar); if (ness->CurrentInset == inset && class_IsType(inset, celviewClass)) { *************** *** 572,577 **** --- 654,691 ---- vptr = (struct view *)view_GetIM(vptr); goto stackPointer; + /* launchApplication(marker, title, programname, enablecommands) + {"launchApplication", "UP", {Tvoid, Tstr, Tstr, Tstr, Tbool, Tend}, ness_codeGreen}, */ + + case 'P': { + boolean enablecommands; + char *pgmnm, * title; + struct text *text; + long pos, len; + + if (NSP->l.hdr != boolHdr) + RunError(":last argument should be a boolean value", iar); + enablecommands = NSP->b.v; + NSP = popValue(NSP); + + PTSTOMARK(&NSP->m, iar); + pgmnm = nessmark_ToC(&NSP->m); + NSP = popValue(NSP); + + PTSTOMARK(&NSP->m, iar); + title = nessmark_ToC(&NSP->m); + NSP = popValue(NSP); + + PTSTOMARK(&NSP->m, iar); + text = FrameMark(ness, &NSP->m, + title, pgmnm, enablecommands, &pos, &len); + + free(pgmnm); + free(title); + nessmark_Set(&NSP->m, text, pos, len); + } break; + + case 'R': /* isreadonly(string) */ PTSTOMARK(&NSP->m, iar); bv = simpletext_GetReadOnly(nessmark_GetText(&NSP->m)); *************** *** 582,587 **** --- 696,702 ---- PTSTOMARK(&NSP->m, iar); buf = nessmark_ToC(&NSP->m); message_DisplayString(im_GetLastUsed(), 0, buf); + im_ForceUpdate(); free(buf); NSP = popValue(NSP); ness->ToldUser = TRUE; *************** *** 607,638 **** ness->ToldUser = FALSE; } goto stackString; stackBool: ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct boolstkelt)); NSP->b.hdr = boolHdr; NSP->b.v = bv; break; stackLong: ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct longstkelt)); NSP->l.hdr = longHdr; NSP->l.v = v; break; stackString: ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct nessmark)); nessmark_Initialize(&NSP->m); nessmark_MakeConst(&NSP->m, s); break; stackPointer: ! NSP = (union stackelement *)((unsigned long)NSP ! - sizeof(struct ptrstkelt)); NSP->p.hdr = ptrHdr; NSP->p.v = (struct basicobject *)vptr; break; } /* end switch(op) */ - return NSP; } /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = *\ --- 722,749 ---- ness->ToldUser = FALSE; } goto stackString; + stackBool: ! NSPushSpace(boolstkelt); NSP->b.hdr = boolHdr; NSP->b.v = bv; break; stackLong: ! NSPushSpace(longstkelt); NSP->l.hdr = longHdr; NSP->l.v = v; break; stackString: ! NSPushSpace(nessmark); nessmark_Initialize(&NSP->m); nessmark_MakeConst(&NSP->m, s); break; stackPointer: ! NSPushSpace(ptrstkelt); NSP->p.hdr = ptrHdr; NSP->p.v = (struct basicobject *)vptr; break; } /* end switch(op) */ } /* = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = *\ *************** *** 874,879 **** --- 985,996 ---- struct eventnode *enode; { struct atom *trigger; + + if (FOLDEDEQ("becamevisible", enode->spec)) { + enode->enabled = TRUE; + return; + } + if (onode->ExtendAView) return; trigger = atom_Intern(enode->spec); *************** *** 982,989 **** /* it is an extended object (ExtendAView is false)*/ /* set onode->obj or give error ! look up the object by name again in case it has been cut from the base text ! XXX should use ObservedChanged instead */ if (ness_GetArbiter(ness) == NULL || (onode->obj=arbiterview_GetNamedCelview( ness_GetArbiter(ness), --- 1099,1105 ---- /* it is an extended object (ExtendAView is false)*/ /* set onode->obj or give error ! look up the object by name again in case it has been cut from the base text */ if (ness_GetArbiter(ness) == NULL || (onode->obj=arbiterview_GetNamedCelview( ness_GetArbiter(ness), *************** *** 1056,1061 **** --- 1172,1178 ---- struct ness *n; struct nesssym *attr; struct objnode *onode; + struct nesssym *xattr; c = (struct cel *)cv->header.view.dataobject; if (c == NULL || cel_GetRefName(c) == NULL) return; *************** *** 1072,1082 **** textviewClass)); attr = nesssym_NFind(tname, n->constScope); if (attr == NULL || attr->flags != flag_xobj) continue; ! onode = nesssym_NGetINode(attr, objnode); onode->obj = cv; attr->parent.ness = n; /* set parent */ postevents(n, attr); return; } } --- 1189,1214 ---- textviewClass)); attr = nesssym_NFind(tname, n->constScope); if (attr == NULL || attr->flags != flag_xobj) continue; ! ! /* 'attr' is the symbol entry for an EXTEND block for the given name */ ! onode = nesssym_NGetINode(attr, objnode); onode->obj = cv; attr->parent.ness = n; /* set parent */ postevents(n, attr); + + /* check to see if it has an enode for 'becameVisible' */ + + for (xattr = onode->attrs; xattr != NULL; xattr = xattr->next) + if (xattr->flags == flag_event) { + struct eventnode *enode = nesssym_NGetINode(xattr, eventnode); + if (enode->varsym->header.toksym.toknum== EVENT && + FOLDEDEQ ("becamevisible", enode->spec)) { + /* it has "becameVisible": call it */ + EventEventStub(n, (struct view *)cv, enode); + break; /* from the for(xattr) */ + } + } /* end if (and for) */ return; } } *** atk/ness/objects/nevent.hn Wed Nov 22 12:22:06 1989 --- atk/ness/objects/nevent.hn.NEW Mon Sep 17 12:31:37 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/nevent.hn,v 1.10 89/10/08 07:28:29 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/nevent.hn,v $ */ /* nevent.hn - definitions for support of events: mouse, keys, menu --- 1,9 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nevent.hn,v 1.11 90/09/16 20:15:25 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nevent.hn,v $ */ /* nevent.hn - definitions for support of events: mouse, keys, menu *************** *** 17,23 **** #define _ness_nevent_h_ #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/nevent.hn,v 1.10 89/10/08 07:28:29 wjh Exp $"; #endif #include "nesssym.ih" --- 17,23 ---- #define _ness_nevent_h_ #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.hn,v 1.11 90/09/16 20:15:25 wjh Exp $"; #endif #include "nesssym.ih" *************** *** 71,77 **** /* run time routines */ struct basicobject *ProperPtr(/* struct basicobject *ptr, struct classinfo *type */); /* finds "nearby" ptr of desired type */ ! union stackelement *neventInfo(/* char op, union stackelement *NSP, char *iar*/); /* dispatches for many event related routines */ #endif --- 71,77 ---- /* run time routines */ struct basicobject *ProperPtr(/* struct basicobject *ptr, struct classinfo *type */); /* finds "nearby" ptr of desired type */ ! void neventInfo(/* char op, union stackelement *NSP, char *iar*/); /* dispatches for many event related routines */ #endif *** atk/ness/objects/real.c Wed Nov 22 12:22:14 1989 --- atk/ness/objects/real.c.NEW Mon Sep 17 12:31:42 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/real.c,v 1.11 89/10/25 22:32:57 zs01 Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/sm/releases/X.V11R4/andrew/atk/ness/objects/RCS/real.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/real.c,v 1.11 89/10/25 22:32:57 zs01 Exp $"; #endif #include /* for xyz_ENV */ --- 1,12 ---- /* ********************************************************************** *\ * Copyright IBM Corporation 1988,1989 - All Rights Reserved * \* ********************************************************************** */ ! /* $Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/real.c,v 1.12 90/09/16 20:15:29 wjh Exp $ */ /* $ACIS:$ */ ! /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/real.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/real.c,v 1.12 90/09/16 20:15:29 wjh Exp $"; #endif #include /* for xyz_ENV */ *************** *** 63,74 **** /* single argument real functions */ ! union stackelement * ! realUnary(op, NSP, iar) char op; - union stackelement *NSP; unsigned char *iar; { if (NSP->d.hdr != dblHdr) RunError(": arg is not a real value (uninitialized ?)", iar); switch(op) { --- 63,74 ---- /* single argument real functions */ ! void ! realUnary(op, iar) char op; unsigned char *iar; { + union stackelement *NSP = NSPstore; if (NSP->d.hdr != dblHdr) RunError(": arg is not a real value (uninitialized ?)", iar); switch(op) { *************** *** 108,122 **** default: RunError(":unimplemented operation requested", iar); } - return NSP; } ! union stackelement * ! realOther(op, NSP, iar) char op; - union stackelement *NSP; unsigned char *iar; { double x; long l; register struct dblstkelt *left ; --- 108,121 ---- default: RunError(":unimplemented operation requested", iar); } } ! void ! realOther(op, iar) char op; unsigned char *iar; { + union stackelement *NSP = NSPstore; double x; long l; register struct dblstkelt *left ; *************** *** 137,143 **** if (left->hdr != dblHdr) RunError(":left operand is not a real value", iar); x = NSP->d.v; ! NSP = (union stackelement *)(((unsigned long)NSP) + sizeof(struct dblstkelt)); break; case 'c': case 'd': --- 136,142 ---- if (left->hdr != dblHdr) RunError(":left operand is not a real value", iar); x = NSP->d.v; ! NSPopSpace(dblstkelt); break; case 'c': case 'd': *************** *** 146,153 **** if (NSP->d.hdr != dblHdr) RunError(":operand is not a real value", iar); x = NSP->d.v; ! NSP = (union stackelement *)(((unsigned long)NSP) ! + (sizeof(struct dblstkelt)-sizeof (struct longstkelt))); NSP->l.hdr = longHdr; break; case 'f': --- 145,152 ---- if (NSP->d.hdr != dblHdr) RunError(":operand is not a real value", iar); x = NSP->d.v; ! NSPopSpace(dblstkelt); ! NSPushSpace(longstkelt); NSP->l.hdr = longHdr; break; case 'f': *************** *** 156,163 **** if (NSP->d.hdr != dblHdr) RunError(":operand is not a real value", iar); x = NSP->d.v; ! NSP = (union stackelement *)(((unsigned long)NSP) ! + (sizeof(struct dblstkelt)-sizeof (struct boolstkelt))); NSP->b.hdr = boolHdr; break; case 'j': --- 155,162 ---- if (NSP->d.hdr != dblHdr) RunError(":operand is not a real value", iar); x = NSP->d.v; ! NSPopSpace(dblstkelt); ! NSPushSpace(boolstkelt); NSP->b.hdr = boolHdr; break; case 'j': *************** *** 165,172 **** if (NSP->l.hdr != longHdr) RunError(":operand is not an integer value", iar); l = NSP->l.v; ! NSP = (union stackelement *)(((unsigned long)NSP) ! + (sizeof(struct longstkelt)-sizeof (struct dblstkelt))); NSP->d.hdr = dblHdr; break; case 'k': /* jn(n, x) */ --- 164,171 ---- if (NSP->l.hdr != longHdr) RunError(":operand is not an integer value", iar); l = NSP->l.v; ! NSPopSpace(longstkelt); ! NSPushSpace(dblstkelt); NSP->d.hdr = dblHdr; break; case 'k': /* jn(n, x) */ *************** *** 179,185 **** RunError(":right operand is not a real value", iar); x = NSP->d.v; l = ((struct longstkelt *)left)->v; ! NSP = (union stackelement *)(((unsigned long)NSP) - sizeof(struct longstkelt)); NSP->d.hdr = dblHdr; break; } --- 178,184 ---- RunError(":right operand is not a real value", iar); x = NSP->d.v; l = ((struct longstkelt *)left)->v; ! NSPopSpace(longstkelt); /* pop dbl, pop long, push dbl */ NSP->d.hdr = dblHdr; break; } *************** *** 242,247 **** default: RunError(":unimplemented operation requested", iar); } - - return NSP; } --- 241,244 ---- *** atk/ness/objects/search.c Mon Aug 6 11:07:42 1990 --- atk/ness/objects/search.c.NEW Mon Sep 17 12:31:47 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.17 90/07/15 15:24:24 wjh Exp Locker: wjh $ */ /* $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.17 90/07/15 15:24:24 wjh Exp Locker: wjh $"; #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.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 /* *************** *** 18,23 **** --- 18,30 ---- */ /* * $Log: search.c,v $ + * Revision 1.19 90/09/16 20:15:35 wjh + * see ness/objects/changes.sept.90 + * + * Revision 1.18 90/07/28 17:53:29 wjh + * added functions searchforstyle, definestyle, and addstylebyname + * fixed bugs in addstyles + * * Revision 1.17 90/07/15 15:24:24 wjh * call.c: fix a coreleak in class() * ness.ch: defined CURRENTMODIFICATIONLEVEL *************** *** 138,143 **** --- 145,151 ---- */ #include /* for bzero() */ + #include #include #include #include *************** *** 158,164 **** --- 166,185 ---- /* XXX KLUDGE. The following definition should be exported by text.ch */ #define TEXT_VIEWREFCHAR '\377' + #define PTSTOMARK(arg,iar) ((TType)((struct nessmark *)arg)->header.nessmark_methods \ + == nessmarkHdr) ? TRUE : \ + RunError(":not a pointer to a mark (uninitialized variable?)", iar); + + + /* The list of styles created with DefineStyle is maintained + so it can be used for addstylebyname */ + static struct stylist { + struct style *s; + struct stylist *next; + } *DefinedStyles = NULL; + + /* conventions for search-type functions: the subject in which the search is made is the first argument if this is an empty string, the search extends to the end of the base *************** *** 385,411 **** static void AddStyles(text, pos, len, env) struct text *text; long pos, len; struct environment *env; { - struct style *style; struct environment *dad = environment_GetParent(env); if (dad != NULL) AddStyles(text, pos, len, dad); ! if (env->type == environment_Style) { ! style = stylesheet_Find(text->styleSheet, env->data.style->name); ! if (style == NULL) { ! /* XXX Why doesn't text_AddStyle do this ??? */ ! /* XXX How do we decide we should use default.template */ ! style = style_New(); ! style_Copy(env->data.style, style); ! style->template = FALSE; ! stylesheet_Add(text->styleSheet, style); ! } ! text_AddStyle(text, pos, len, env->data.style); ! } } --- 406,442 ---- static void + AddOneStyle(text, pos, len, style) + struct text *text; + long pos, len; + struct style *style; + { + struct style *newstyle; + if (style == NULL) return; + newstyle = stylesheet_Find(text->styleSheet, style_GetName(style)); + if (newstyle == NULL) { + /* XXX Why doesn't text_AddStyle do this ??? */ + /* XXX How do we decide we should use default.template */ + newstyle = style_New(); + style_Copy(style, newstyle); + newstyle->template = FALSE; + stylesheet_Add(text->styleSheet, newstyle); + } + text_AddStyle(text, pos, len, newstyle); + } + + static void AddStyles(text, pos, len, env) struct text *text; long pos, len; struct environment *env; { struct environment *dad = environment_GetParent(env); if (dad != NULL) AddStyles(text, pos, len, dad); ! if (env->type == environment_Style) ! AddOneStyle(text, pos, len, env->data.style); ! text_NotifyObservers(text, 0); } *************** *** 419,424 **** --- 450,456 ---- { char *pname, *name; enum nametype {None, Name, Menu} nt = None; + if (penv->data.style == NULL) return TRUE; pname = style_GetName(penv->data.style); if (pname != NULL) nt = Name; else { *************** *** 443,454 **** return FALSE; /* not found */ } - #define PTSTOMARK(arg,iar) ((TType)((struct nessmark *)arg)->header.nessmark_methods \ - == nessmarkHdr) ? TRUE : \ - RunError(":not a pointer to a mark (uninitialized variable?)", iar); /* SearchOp(op, NSP, opiar) First five ops perform searches, depending on op. Each search routine modifies its first argument marker to indicate the --- 475,618 ---- return FALSE; /* not found */ } + /* HasAllStyles(env, penv) + checks to see if env has all styles that are around penv + return bolean value + return TRUE unless we find a style on penv that is not on env + */ + static boolean + HasAllStyles(env, penv) + struct environment *env, *penv; + { + for ( ; penv != NULL; penv = environment_GetParent(penv)) + if (penv->type == environment_Style && ! HasStyle(env, penv)) + /* could not find a pat style */ + return FALSE; + return TRUE; + } + /* AdjustOperandValue(s, p, isConst) + KLUDGE + s and p point to struct marginstyle or struct fontscriptstyle, BOTH + OF WHICH HAVE THE SAME FORMAT (right now) + The value of s is adjusted per that of p. + If isConst is TRUE, the value of s is set to that of p, + otherwise {the value of s is incremented by that of p, + the Units are reset to RawDots, + and the DotCvtOperand is used as the Operand value.} + It would be preferable to do this is a cleaner fashion, + but there is no good way to add Operands if Units differ. + */ + AdjustOperandValue(s, p, isConst) + struct marginstyle *s, *p; + boolean isConst; + { + if (isConst) { + /* just change to the size set by p */ + *s = *p; + } + else if (p->DotCvtOperand != 0) { + /* p makes a relative change to s */ + s->DotCvtOperand += p->DotCvtOperand; + s->MarginUnit = style_RawDots; + s->Operand = s->DotCvtOperand; + } + } + + + /* MergeStyles(style, env) + merges all styles from the env and its parents into style + returns style as modified + Recurses to merge parent styles first so pat itself will override its parents + This would be better if style.c had a method to apply + one style to another. + As it is, we process only some of the attributes. + The style attributes + LeftMargin, RightMargin, Indent, Script, andFontSize + are treated incrementally. The attributes + Justification, Flags, FontFamily, FontFace + are treated as new values. + */ + static struct style * + MergeStyles(style, env) + struct style *style; + struct environment *env; + { + struct environment *penv; + struct style *patstyle; + + enum style_FontSize SizeBasis; + long Operand, newOperand; + enum style_Justification Justification; + long mask; + + penv = environment_GetParent(env); + if (penv != NULL) + /* recur to do parent styles */ + style = MergeStyles(style, penv); + + patstyle = env->data.style; + if (env->type != environment_Style || patstyle == NULL) + return style; + + /* LeftMargin */ + AdjustOperandValue(&style->NewLeftMargin, + &patstyle->NewLeftMargin, + patstyle->NewLeftMargin.MarginBasis == + style_ConstantMargin); + /* RightMargin */ + AdjustOperandValue(&style->NewRightMargin, + &patstyle->NewRightMargin, + patstyle->NewRightMargin.MarginBasis == + style_ConstantMargin); + /* Indent */ + AdjustOperandValue(&style->NewIndentation, + &patstyle->NewIndentation, + patstyle->NewIndentation.MarginBasis == + style_ConstantMargin); + /* Script */ + AdjustOperandValue((struct marginstyle *)&style->FontScript, + (struct marginstyle *)&patstyle->FontScript, + patstyle->FontScript.ScriptBasis == + style_ConstantScriptMovement); + /* FontSize */ + style_GetFontSize(patstyle, &SizeBasis, &Operand); + if (SizeBasis == style_ConstantFontSize) + style_SetFontSize(style, SizeBasis, Operand); + else if (SizeBasis == style_PreviousFontSize) { + style_GetFontSize(style, &SizeBasis, &newOperand); + style_SetFontSize(style, SizeBasis, + newOperand+Operand); + } + /* FontFamily */ + if (patstyle->FontFamily != NULL) + style_SetFontFamily(style, patstyle->FontFamily); + /* Justification */ + Justification = style_GetJustification(patstyle); + if (Justification != style_PreviousJustification) + style_SetJustification(style, Justification); + /* Flags */ + mask = patstyle->AddMiscFlags | ~ patstyle->OutMiscFlags; + style->AddMiscFlags = + (mask & patstyle->AddMiscFlags) + | ((~mask) & style->AddMiscFlags); + style->OutMiscFlags = + (mask & patstyle->OutMiscFlags) + | ((~mask) & style->OutMiscFlags); + /* FontFace */ + mask = patstyle->AddFontFaces | ~ patstyle->OutFontFaces; + style->AddFontFaces = + (mask & patstyle->AddFontFaces) + | ((~mask) & style->AddFontFaces); + style->OutFontFaces = + (mask & patstyle->OutFontFaces) + | ((~mask) & style->OutFontFaces); + return style; + } + + /* SearchOp(op, NSP, opiar) First five ops perform searches, depending on op. Each search routine modifies its first argument marker to indicate the *************** *** 455,466 **** result of searching for the second. Other operations parse strings, handle objects, and process styles. */ ! union stackelement * ! SearchOp(op, NSP, opiar) unsigned char op; - union stackelement *NSP; unsigned char *opiar; /* iar of the opcode */ { /* these definitions are global because GDB can't get at local decls. */ --- 619,630 ---- result of searching for the second. Other operations parse strings, handle objects, and process styles. */ ! void ! SearchOp(op, opiar) unsigned char op; unsigned char *opiar; /* iar of the opcode */ { + register union stackelement *NSP = NSPstore; /* these definitions are global because GDB can't get at local decls. */ *************** *** 468,476 **** boolean boolval; long intval; double realval; ! unsigned char *cstring; struct basicobject *objval; ! long pos, len; struct text *text, *pattext; struct viewref *vr; static boolean Inited = FALSE; --- 632,640 ---- boolean boolval; long intval; double realval; ! char *cstring, *cx; struct basicobject *objval; ! long pos, len, finish; struct text *text, *pattext; struct viewref *vr; static boolean Inited = FALSE; *************** *** 477,482 **** --- 641,649 ---- long success; long envpos, envlen; struct environment *env, *penv, *tenv; + struct style *style; + struct stylist *stelt; + char menuname[100]; if (! Inited) { Inited = TRUE; *************** *** 487,495 **** if (op == 'w') {} /* no args */ else { /* at least one arg */ if (op >= 'p') { /* this is both one and three arg ops */ - PTSTOMARK(&NSP->m, opiar); subject = &NSP->m; } else { --- 654,662 ---- if (op == 'w') {} /* no args */ else { /* at least one arg */ + PTSTOMARK(&NSP->m, opiar); if (op >= 'p') { /* this is both one and three arg ops */ subject = &NSP->m; } else { *************** *** 507,512 **** --- 674,807 ---- 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' */ + penv = environment_GetInnerMost(pattext->rootEnvironment, + nessmark_GetPos(pat)); + + text = (struct text *)nessmark_GetText(subject); + if ( ! class_IsType(text, textClass)) + goto nosuchstyle; /* subject has no styles */ + + pos = nessmark_GetPos(subject); + finish = pos + nessmark_GetLength(subject); + if (finish == pos) + finish = text_GetLength(text); + + do { + /* loop through each change position and see if + the required style is at that point */ + env = environment_GetInnerMost(text->rootEnvironment, + pos); + if (HasAllStyles(env, penv)) + break; + pos += environment_GetNextChange(text->rootEnvironment, + pos); + if (pos >= finish) + goto nosuchstyle; + } while ( TRUE); + nessmark_SetPos(subject, pos); /* the start of the style */ + + do { + /* continue looping through each change position + until we find a place that doesn't have the style */ + pos += environment_GetNextChange(text->rootEnvironment, + pos); + if (pos >= finish) { + /* style extends beyond finish */ + pos = finish; + break; + } + env = environment_GetInnerMost(text->rootEnvironment, + pos); + } while (HasAllStyles(env, penv)); + nessmark_SetLength(subject, pos - nessmark_GetPos(subject)); + + /* succeed. The Pos and Length of subject have been set */ + NSP = popValue(NSP); /* discard style marker */ + break; + + nosuchstyle: + /* fail, return finish(subject) */ + nessmark_Next(subject); + nessmark_Start(subject); + NSP = popValue(NSP); /* discard style marker */ + break; + + /* {"definestyle", "zFi", {Tvoid, Tstr, Tstr, Tend}, ness_codeOrange},*/ + /* (The arguments are swapped by the z operator.) + 'pat' is style name. 'subject' is text with desired style set + return value is a copy of the stylename text, but with the defined style + */ + case 'i': + /* create a style and merge into it the styles from the source */ + style = style_New(); + text = (struct text *)nessmark_GetText(subject); + if (class_IsType(text, textClass)) { + env = environment_GetInnerMost(text->rootEnvironment, + nessmark_GetPos(subject)); + 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 + and then discard the part before the comma + otherwise construct a name putting it on "Style" menu card + the name itself is cleaned by terminating at + first non-alphameric and + changing uppercase to lower + */ + if (strlen(cstring) > 80) + cstring[80] = '\0'; /* truncate to 80 characters */ + cx = index(cstring, ','); + if (cx != NULL) { + style_SetMenuName(style, cstring); + strcpy(cstring, cx+1); /* discard prefix */ + } + else { + if (islower(*cstring)) *cstring = toupper(*cstring); + sprintf(menuname, "Style~8,%s", cstring); + style_SetMenuName(style, menuname); + } + + len = 0; + for (cx = cstring; *cx != '\0'; cx++) { + if ( ! isalnum(*cx)) {*cx = '\0'; break;} + len++; + if (isupper(*cx)) *cx = tolower(*cx); + } + style_SetName(style, cstring); + + /* Add to DefinedStyles list */ + for (stelt = DefinedStyles; stelt != NULL; stelt = stelt->next) + if (strcmp(style_GetName(stelt->s), cstring) == 0) + break; + if (stelt == NULL) { + /* create a new element in DefinedStyles list */ + stelt = (struct stylist *)malloc(sizeof(struct stylist)); + stelt->next = DefinedStyles; + DefinedStyles = stelt; + } + stelt->s = style; + /* CORELEAK: styles are never discarded (can't be) */ + + /* replace subject marker with one for result */ + /* give the new style to the result */ + text = text_New(); + text_InsertCharacters(text, 0, cstring, len); + AddOneStyle(text, 0, len, style); + nessmark_Set(subject, text, 0, len); + + free(cstring); + NSP = popValue(NSP); /* discard topmost arg (i.e., pat) */ + + break; + /* {"addstyles", "Fj", {Tstr, Tstr, Tstr, Tvoid}, ness_codeYellow} */ case 'j': /* revise subject to have style of pat */ *************** *** 513,528 **** text = (struct text *)nessmark_GetText(subject); if (text_GetReadOnly(text)) RunError(":Tried to change styles on a constant", opiar); ! pattext = (struct text *)nessmark_GetText(pat); ! if (class_IsType(text, textClass) ! && class_IsType(pattext, textClass)) AddStyles(text, nessmark_GetPos(subject), nessmark_GetLength(subject), environment_GetInnerMost( pattext->rootEnvironment, nessmark_GetPos(pat))); ! ! NSP = popValue(NSP); /* discard style */ break; /* {"hasstyles", "Fk", {Tbool,Tstr,Tstr,Tvoid}, ness_codeOrange} */ case 'k': /* set boolval indicating whether subject has style of pat */ --- 808,823 ---- text = (struct text *)nessmark_GetText(subject); if (text_GetReadOnly(text)) RunError(":Tried to change styles on a constant", opiar); ! pattext = (struct text *)nessmark_GetText(pat); ! if (class_IsType(pattext, textClass) ! && class_IsType(text, textClass)) AddStyles(text, nessmark_GetPos(subject), nessmark_GetLength(subject), environment_GetInnerMost( pattext->rootEnvironment, nessmark_GetPos(pat))); ! NSP = popValue(NSP); /* discard pat, leaving revised subject as result */ break; + /* {"hasstyles", "Fk", {Tbool,Tstr,Tstr,Tvoid}, ness_codeOrange} */ case 'k': /* set boolval indicating whether subject has style of pat */ *************** *** 556,568 **** /* now we know text and pattext both have at least one style return TRUE unless we find a style on pat that is not on text */ ! for ( ; penv != NULL; penv = environment_GetParent(penv)) ! if (penv->type == environment_Style ! && ! HasStyle(env, penv)) { ! /* could not find a pat style: FALSE */ ! boolval = FALSE; ! break; ! } /* found all styles of pat, return the TRUE set far above */ --- 851,857 ---- /* now we know text and pattext both have at least one style return TRUE unless we find a style on pat that is not on text */ ! boolval = HasAllStyles(env, penv); /* found all styles of pat, return the TRUE set far above */ *************** *** 571,581 **** NSP = popValue(NSP); /* push boolval */ ! NSP = (union stackelement *)(((unsigned long)NSP) ! - sizeof(struct boolstkelt)); NSP->b.hdr = boolHdr; NSP->b.v = boolval; break; /* {"parseint", "Fp", {Tlong, Tstr, Tvoid}, ness_codeOrange} */ case 'p': /* set intval by scanning subject, use -2**31 for error --- 860,910 ---- NSP = popValue(NSP); /* push boolval */ ! NSPushSpace(boolstkelt); NSP->b.hdr = boolHdr; NSP->b.v = boolval; break; + + /* {"addstylebyname", "Fl", {Tstr, Tstr, Tstr, Tend}, ness_codeYellow}, */ + case 'l': + /* look up the style name 'pat' in the styles of 'subject' + and in Default template (added to subject) + 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)) { + style = stylesheet_Find(text_GetStyleSheet(text), cstring); + if (style == NULL && text->templateName == NULL) { + text_ReadTemplate(text, "default", + text_GetLength(text) == 0); + style = stylesheet_Find(text_GetStyleSheet(text), + cstring); + } + } + if (style == NULL) { + pattext = (struct text *)nessmark_GetText(pat); + if (class_IsType(pattext, textClass)) + style = stylesheet_Find(text_GetStyleSheet(pattext), + cstring); + } + if (style == NULL) { + for (stelt = DefinedStyles; stelt != NULL; stelt = stelt->next) + if (strcmp(style_GetName(stelt->s), cstring) == 0) { + style = stelt->s; + break; + } + } + AddOneStyle(text, nessmark_GetPos(subject), + nessmark_GetLength(subject), style); + text_NotifyObservers(text, 0); + + free(cstring); + NSP = popValue(NSP); /* discard the marker for stylename */ + break; + /* {"parseint", "Fp", {Tlong, Tstr, Tvoid}, ness_codeOrange} */ case 'p': /* set intval by scanning subject, use -2**31 for error *************** *** 590,597 **** NSP = popValue(NSP); /* push intval */ ! NSP = (union stackelement *)(((unsigned long)NSP) ! - sizeof(struct longstkelt)); NSP->l.hdr = longHdr; NSP->l.v = intval; break; --- 919,925 ---- NSP = popValue(NSP); /* push intval */ ! NSPushSpace(longstkelt); NSP->l.hdr = longHdr; NSP->l.v = intval; break; *************** *** 612,619 **** NSP = popValue(NSP); /* push realval */ ! NSP = (union stackelement *)(((unsigned long)NSP) ! - sizeof(struct dblstkelt)); NSP->d.hdr = dblHdr; NSP->d.v = realval; break; --- 940,946 ---- NSP = popValue(NSP); /* push realval */ ! NSPushSpace(dblstkelt); NSP->d.hdr = dblHdr; NSP->d.v = realval; break; *************** *** 647,654 **** } NSP = popValue(NSP); /* push objval */ ! NSP = (union stackelement *)(((unsigned long)NSP) ! - sizeof(struct ptrstkelt)); NSP->p.hdr = ptrHdr; NSP->p.v = objval; break; --- 974,980 ---- } NSP = popValue(NSP); /* push objval */ ! NSPushSpace(ptrstkelt); NSP->p.hdr = ptrHdr; NSP->p.v = objval; break; *************** *** 677,682 **** --- 1003,1009 ---- tenv = env; while (tenv != NULL && (tenv->type != environment_Style + || tenv->data.style == NULL || tenv->header.nestedmark.length <= len)) tenv = environment_GetParent(tenv); if (tenv != NULL && environment_Eval(tenv) == pos) { *************** *** 843,850 **** /* push marker WhereItWas onto stack */ if (WhereItWas == NULL) WhereItWas = nessmark_New(); ! NSP = (union stackelement *)(((unsigned long)NSP) ! - sizeof(struct nessmark)); nessmark_Initialize(&NSP->m); nessmark_SetFrom(&NSP->m, WhereItWas); break; --- 1170,1176 ---- /* push marker WhereItWas onto stack */ if (WhereItWas == NULL) WhereItWas = nessmark_New(); ! NSPushSpace(nessmark); nessmark_Initialize(&NSP->m); nessmark_SetFrom(&NSP->m, WhereItWas); break; *************** *** 892,896 **** nessmark_SetLength(subject, 1); /* set returned mark */ } break; } - return NSP; } --- 1218,1221 ---- *** atk/ness/objects/nessruna.c Mon Aug 6 11:07:45 1990 --- atk/ness/objects/nessruna.c.NEW Wed Aug 1 16:34:47 1990 *************** *** 2,13 **** * Copyright IBM Corporation 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/nessruna.c,v 1.2 90/07/25 16:35:22 wjh Exp $ */ /* $ACIS: $ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nessruna.c,v $ */ #ifndef lint ! char *nessrunapp_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nessruna.c,v 1.2 90/07/25 16:35:22 wjh Exp $ "; #endif /* lint */ /* --- 2,13 ---- * Copyright IBM Corporation 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/nessruna.c,v 1.3 90/08/01 16:27:53 wjh Exp $ */ /* $ACIS: $ */ /* $Source: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nessruna.c,v $ */ #ifndef lint ! char *nessrunapp_rcsid = "$Header: /afs/andrew.cmu.edu/itc/src/projects/andrew/atk/ness/objects/RCS/nessruna.c,v 1.3 90/08/01 16:27:53 wjh Exp $ "; #endif /* lint */ /* *************** *** 27,32 **** --- 27,35 ---- /* * $Log: nessruna.c,v $ + * Revision 1.3 90/08/01 16:27:53 wjh + * fixed a bug introduced last week where it mistakenly included the file name in the args as given to main() + * * Revision 1.2 90/07/25 16:35:22 wjh * fix core dump on Sun3 * *************** *** 138,148 **** } } ! /* are there any arguments to the ness program? */ ! if (*argv != NULL) { ! self->inputfile = *argv; /* concatenate args to pass to theNess */ blank = nessmark_New(); --- 141,157 ---- } } ! if (*argv == NULL) { ! fprintf(stderr,"%s: no programfilename specified\n", ! nessrunapp_GetName(self)); ! show_usage(self); ! return FALSE; ! } ! /* get the name of the ness program file */ ! self->inputfile = *argv++; + if (*argv != NULL) { /* concatenate args to pass to theNess */ blank = nessmark_New(); *************** *** 160,171 **** } nessmark_Base(args); ness_SupplyMarkerArg(self->theNess, args); - } - else { - fprintf(stderr,"%s: no programfilename specified\n", - nessrunapp_GetName(self)); - show_usage(self); - return FALSE; } return TRUE; } --- 169,174 ---- *** atk/ness/nesslib/date.n Mon Aug 6 11:07:53 1990 --- atk/ness/nesslib/date.n.NEW Wed Sep 19 15:40:54 1990 *************** *** 1,320 **** ! -- date module -- styles accepted: -- separator styles: -- slashes: 7/17/1989 -- dashes: 7-17-1989 -- periods: 1989.198 -- month styles: -- digits: 7 -- abbr: Jul (must have legal first 3 letters) -- full: July -- year styles: -- digits: 89 -- abbr: '89 (a number with an apostrophe in front) ! -- full: 1989 (a number > 1900) -- value styles: -- 3 values: 7/17/1989 (month, day, year) -- 2 values: 1989.198 (year, number days from 1/1) ! -- 1 value: 32340 (number of days from 1/1/1901) -- position styles: -- month day year: July 17, 1989 -- day month year: 17-July-1989 (month must be abbr or full) -- year day: 1989.198 (year must be abbr or full) -- extraneous text: -- ignores extraneous text before and after date -- takes leftmost combination of characters to form date -- text between the parts of the date can not contain numbers except a time -- times must have parts separated by colons (no spaces in time allowed) -- -- date limits: - -- this module only handles dates from 1/1/1901 - 12/31/2000. -- external routines ! -- int function date_canonical(marker m): -- returns canonical integer representation for the date in the marker m. ! -- this canonical integer is the number of days from 1/1/1901. -- marker function date_text(int n): -- returns a text representation (eg: July 17, 1989) for the canonical -- date given in the integer parameter n. -- marker function date_slashed(int n): -- returns a slashed representation (eg: 7/17/1989) for the canonical date -- given in the integer parameter n. -- marker function date_dashed(int n): -- returns a dashed representation (eg: 7-17-1989) for the canonical date -- given in the integer parameter n. -- marker function date_julian(int n): -- returns a two-value representation (eg: 1989.198) for the canonical date -- given in the integer parameter n (note: format is year.day). ! -- useful constants ! integer base := 1901 -- base year for the canonical date representation ! integer ndays_4yrs := 1461 -- number days from 1/1/1901 to 12/31/1904 ! integer ndays_limit := 36265 -- number days from 1/1/1901 to 12/31/1999 ! marker ndays_UpToMonth -- total number of days up to a certain month ! := "31 59 90 120 151 181 212 243 273 304 334" ! marker month_text -- text name of the months ! := "January February March April May June July August September October November December " marker month_abbr -- abbreviated text name of the months := "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec " ! -- global variables ! marker where_int_was -- used to keep track where an integer was found - -- returns the marker for where the last integer found by SearchInt() was. - marker function WhereIntWas() ! return (where_int_was) - end function -- searches for and returns the the first integer found in the given text -- ignore times (integers with colons before or after them) ! integer function FirstInt(marker text) ! integer number ! where_int_was := token( text, "0123456789" ) ! while previous(where_int_was) = ":" or next(where_int_was) = ":" do ! where_int_was := token( toend( finish(where_int_was)), "0123456789" ) ! end while ! if where_int_was = "" then ! number := 0 ! else ! number := parseint( copy(where_int_was) ) ! end if ! return (number) ! end function ! -- searches for and returns the next integer after the last integer found by FirstInt() or NextInt() ! integer function NextInt() ! integer number ! if WhereIntWas() = "" then ! number := 0 ! else ! number := FirstInt( toend( finish( WhereIntWas() ) ) ) ! end if ! return (number) end function - -- returns a marker consisting of the year, month, and day - -- based on the given canonical date representation. - -- there are three formats for dates returned: - -- 3 values: year, month, day. - -- 2 values: year, number of days from 1/1. - -- 1 value: number of days from 1/1/1901. - -- any errors will result in the return value of "0 0 0", - -- so that the year, month, and day values are all zero. - marker function IntToDate(integer n, integer n_values) ! marker date -- text of date to be returned ! integer year ! integer month ! integer day ! integer temp ! integer x, y ! if n_values = 1 then - date := textimage(n) ! elif n_values > 3 or n_values < 1 or n > ndays_limit then ! -- date error ! date := "0 0 0" ! else ! -- count years at 4 yrs at a time ! temp :=n / ndays_4yrs ! year := base + 4* temp ! n := n - temp * ndays_4yrs ! -- count number years left ! temp := n / 365 ! year := year + temp ! n := n - temp * 365 ! if n_values = 2 then ! -- number of days from 1/1 ! day := n ! -- make date string ! date := textimage(year) ~ " " ~ textimage(day) ! elif n_values = 3 then ! -- count number of months ! month := 1 ! y := 0 ! x := parseint(ndays_UpToMonth) ! while ( n > x) do ! month := month + 1 ! y := x ! x := parseint( next( next ( WhereItWas() ) ) ) ! end while ! -- count number of days ! day := n - y ! -- make date string ! date := textimage(year) ~ " " ~ textimage(month) ! ~ " " ~ textimage(day) ! end if end if ! return (date) end function ! -- returns an integer representation for the given year, month, and day. ! -- there are three ways to specify the year, month, and day: ! -- if month = 0, then the day field contains number of days from 1/1. ! -- if year & month both = 0, then the day field is the number of days from 1/1/1901. ! -- if none of the fields = 0, then it is the standard year, month, day format. ! integer function DateToInt(integer year, integer month, integer day) ! integer n -- integer representation for date ! integer temp ! integer m ! integer x, y ! if year > 0 then ! -- count days for the years from base ! temp := year - base ! n := temp * 365 ! -- add in leap year days ! n := n + temp / 4 else ! -- no year is specified ! n := 0 end if ! -- add in days for the month ! -- note: if month = 0, then y = 0 also. ! m := month ! x := parseint(ndays_UpToMonth) ! y := 0 ! while ( m > 1) do ! y := x ! x := parseint( next( next ( WhereItWas() ) ) ) ! m := m - 1 ! end while ! n := n + y - -- add in days remaining - n := n + day ! -- return integer ! return (n) ! end function ! -- returns the full text of the given month ! marker function monthtext(integer month) ! integer m ! marker x, y, z ! m := month ! x := start(month_text) ! while (m > 0) do ! z := search(finish(x), " ") ! y := extent(finish(x), start(z)) ! x := z ! m := m - 1 end while ! return (y) end function ! -- returns the abbreviated text of the given month ! marker function monthabbr(integer month) ! integer m ! marker x, y, z ! m := month ! x := start(month_abbr) ! while (m > 0) do ! z := search(finish(x), " ") ! y := extent(finish(x), start(z)) ! x := z ! m := m - 1 ! end while ! return (y) end function - -- returns the slashed date for the canonical integer n ! marker function date_slashed(integer n) ! integer year, month, day ! marker date ! marker slashed - date := IntToDate(n,3) - year := parseint(date) - month := parseint( next( next( WhereItWas() ) ) ) - day := parseint( next( next( WhereItWas() ) ) ) ! slashed := textimage(month) ~ "/" ~ textimage(day) ~ "/" ~ textimage(year) ! return (slashed) ! end function ! -- returns the dashed date for the canonical integer n - marker function date_dashed(integer n) ! integer year, month, day ! marker date ! marker dashed date := IntToDate(n,3) --- 1,447 ---- ! \begindata{text,269395500} ! \textdsversion{12} ! \template{default} -- date module + -- styles accepted: + -- separator styles: + -- slashes: 7/17/1989 + -- dashes: 7-17-1989 + -- periods: 1989.198 + -- month styles: + -- digits: 7 + -- abbr: Jul (must have legal first 3 letters) + -- full: July + -- year styles: + -- digits: 89 + -- abbr: '89 (a number with an apostrophe in front) ! ! -- full: 1989 (a number between 1970 and 2069) ! -- value styles: + -- 3 values: 7/17/1989 (month, day, year) + -- 2 values: 1989.198 (year, number days from 1/1) ! ! -- 1 value: 726666 (number of days after 12/31/1BC) ! -- position styles: + -- month day year: July 17, 1989 + -- day month year: 17-July-1989 (month must be abbr or full) + -- year day: 1989.198 (year must be abbr or full) + -- extraneous text: + -- ignores extraneous text before and after date + -- takes leftmost combination of characters to form date + -- text between the parts of the date can not contain numbers except a time + -- times must have parts separated by colons (no spaces in time allowed) + -- + -- date limits: + -- this module is not limited as to date + + -- when an assumption is necessary, it assumes the date is + + -- from 1/1/1970 - 12/31/2069, inclusive + + -- external routines ! ! -- integer function date_today() ! ! -- returns canonical integer representation for the current date ! ! -- integer function date_canonical(marker m): ! -- returns canonical integer representation for the date in the marker m. ! ! -- this canonical integer is the number of days from 1/1/1970. ! ! -- the canonical integer for 1/1/1970 is 1 ! -- marker function date_text(int n): + -- returns a text representation (eg: July 17, 1989) for the canonical + -- date given in the integer parameter n. + -- marker function date_slashed(int n): + -- returns a slashed representation (eg: 7/17/1989) for the canonical date + -- given in the integer parameter n. + -- marker function date_dashed(int n): + -- returns a dashed representation (eg: 7-17-1989) for the canonical date + -- given in the integer parameter n. + -- marker function date_julian(int n): + -- returns a two-value representation (eg: 1989.198) for the canonical date + -- given in the integer parameter n (note: format is year.day). ! -- Canonical date representation ! -- The canonical date representation is an integer giving the number of ! -- days from the beginning of a putative year zero. ! -- The counting uses only the Gregorian calendar scheme of leap years, + -- so it assigns incorrect numbers to dates prior to the transition. + + -- Jan 1 of the putative year zero is day 1. Year 0 is taken as a leap year. + + -- (Since counting really began with year one, there will be no date + + -- to which the integers 1...366 are assigned.) + + -- + + -- For dates since the transition to the Gregorian calendar, the canonical + + -- date integer is suitable for doing arithmetic to compute the number of + + -- days between two dates. + + + -- restrictions + + -- one and two digit year values + + -- are taken to be within 50 years of the current year + + -- so years prior to 100 AD are not parsed properly + + + + boolean dateGotten := False -- indicate if the next two are set yet + + integer ThisYear -- current year + + integer todaysDate -- canonical date for today + + + integer ParsedYear -- return values from IntToParsed and ParseDate + + integer ParsedMonth + + integer ParsedDay + + + integer NoValue := -999999999 -- value if no value found + + marker Letters := "qwertyuiopasdfghjklzxcvbnm" + + ~ "QWERTYUIOPASDFGHJKLZXCVBNM" + + + marker ndays_UpToMonth -- total number of days prior to a certain month + + := "000 031 059 090 120 151 181 212 243 273 304 334 " + + + marker whichmonth := + + \typewriter{ "0000000000000000000000000000000" -- Jan + + ~ "1111111111111111111111111111" -- Feb + + ~ "2222222222222222222222222222222" -- Mar + + ~ "333333333333333333333333333333" -- Apr + + ~ "4444444444444444444444444444444" -- May + + ~ "555555555555555555555555555555" -- Jun + + ~ "6666666666666666666666666666666" -- Jul + + ~ "7777777777777777777777777777777" -- Aug + + ~ "888888888888888888888888888888" -- Sep + + ~ "9999999999999999999999999999999" -- Oct + + ~ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" -- Nov + + ~ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" -- Dec + + } + marker month_names -- text name of the months + + := "1 January 2 February 3 March 4 April 5 May 6 June 7 July " + + ~ "8 August 9 September 10 October 11 November 12 December " + + marker month_abbr -- abbreviated text name of the months + := "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec " ! marker monthcodes := ! " jan Jan 1 feb Feb 2 mar Mar 3 apr Apr 4 may May 5 jun Jun 6" + ~ " jul Jul 7 aug Aug 8 sep Sep 9 oct Oct 10 nov Nov 11 dec Dec 12" ! -- global variables + marker where_int_was -- used to keep track where an integer was found + -- searches for and returns the the first integer found in the given text + -- ignore times (integers with colons before or after them) ! -- ! integer function \bold{FirstInt}(marker text) ! integer t ! where_int_was := start(text) ! while True do ! where_int_was := ! token( extent(finish(where_int_was), text), + "0123456789" ) ! if previous(where_int_was) /= ":" ! and next(where_int_was) /= ":" then ! exit while ! end if ! end while + t := parseint( copy(where_int_was) ) + + if whereItWas() = "" then t := NoValue end if + + return t + end function ! ------------------------------------------ ! -- MONTH FUNCTIONS ! -- monthIndex(day, leap) ! -- day is day of year, leap indicates if it is a leap year ! -- returns an integer from 1 to 12 giving the month ! -- leap must be True for leap years ! -- The trick is to extract an index value from a huge string ! -- with one digit per day. ! -- ! integer function \bold{monthIndex}(integer day, boolean leap) ! marker m ! if leap and day > 31+28 then day := day-1 end if ! m := nextn(start(whichMonth), day) ! if m = "a" then return 11 ! elif m = "b" then return 12 + else return 1+parseint(copy(m)) + end if ! end function + + -- return the number of days prior to month index + + -- + + integer function \bold{daysBeforeMonth}(integer index, boolean leap) + + marker m := nextn(front(ndays_UpToMonth), 4*(index-1)) + + integer r := parseint(extent(m, ndays_UpToMonth)) + + if leap and index > 2 then r := r + 1 end if + + return r + end function ! -- return the abbreviated name for the month ! -- ! function \bold{monthAbbr}(integer index) ! marker m := nextn(front(month_abbr), (index-1)*4) ! return extent(m, nextn(m, 2)) ! end function + + -- returns the full name of the given month + + -- + + marker function \bold{monthFullName}(integer month) + + marker m := search(month_names, textimage(month)) + + if m = "" then return "NoMonth" + else ! return token(finish(m), Letters) end if ! end function ! -- returns the integer value for a month found in the given text, or 0 if none ! is found. ! -- looks for the abbreviated month text as key + -- ! integer function \bold{SearchMonth}(marker text) ! marker w ! while True do ! w := token(text, Letters) ! ! if w = "" then return NoValue end if ! ! text := extent(finish(w), text) ! ! if length(w) >= 3 then ! ! w := search(monthcodes, extent(w, next(second(w)))) ! ! if w /= "" then ! ! return FirstInt(extent(finish(w), ! ! monthcodes)) ! ! end if ! ! end if ! end while ! end function + + + -- return yy or yyyy + + -- use the two digit form if within twenty years of the current year + + -- + + function \bold{yeardigits}(integer year) + + GetTodaysDate() + + if year >= ThisYear - 20 and year <= ThisYear+20 then + + year := year % 100 + + end if + + if year < 10 then return "0"~textimage(year) end if + + return textimage(year) + end function ! -- return True if year is a leap year ! -- ! boolean function \bold{IsLeap}(integer year) ! return year /= NoValue and (year % 400 = 0 ! or (year % 4 = 0 and year % 100 /= 0)) end function ! -------------------------------------------------- ! -- INTERNAL FUNCTIONS ! -- Set Parsed Year, ParsedMonth, and ParsedDay ! -- ! marker function \bold{IntToParsed}(integer days) + integer t, y ! boolean Leap ! days := days - 366 -- year 1 is first year of cycle y := 1 -- so remove year 0 *************** *** 316,485 **** marker date marker dashed ! date := IntToDate(n,3) - year := parseint(date) - month := parseint( next( next( WhereItWas() ) ) ) - day := parseint( next( next( WhereItWas() ) ) ) ! dashed := textimage(month) ~ "-" ~ textimage(day) ~ "-" ~ textimage(year) ! return (dashed) ! end function ! -- returns the text date for the canonical integer n ! marker function date_text(integer n) ! integer year, month, day ! marker date ! marker text - date := IntToDate(n,3) ! year := parseint(date) ! month := parseint( next( next( WhereItWas() ) ) ) ! day := parseint( next( next( WhereItWas() ) ) ) ! text := monthtext(month) ~ " " ~ textimage(day) ~ ", " ~ textimage(year) ! return (text) - end function ! -- returns the text date for the canonical integer n ! marker function date_julian(integer n) - integer year, day - marker date - marker text ! date := IntToDate(n,2) ! year := parseint(date) ! day := parseint( next( next( WhereItWas() ) ) ) ! text := textimage(year) ~ "." ~ textimage(day) ! return (text) end function ! -- returns the integer value for a month found in the given text, or 0 if none is found. ! -- looks for the abbreviated month text as key ! integer function SearchMonth(marker text) ! integer month ! month := 12 ! while ( month > 0 ) do ! if search(text,monthabbr(month)) = "" then ! month := month - 1 ! else ! exit while ! end if ! end while ! return (month) end function - -- returns the canonical integer representation for the date represented by the given marker text ! integer function date_canonical(marker date) integer temp1, temp2, temp3 - integer month, day, year - marker new_start -- get first number in date temp1 := FirstInt(date) ! if WhereIntWas() = "" then ! -- invalid: no numbers found ! return (0) end if -- look for month text in front of the first number ! temp2 := SearchMonth( extent( date, WhereIntWas() ) ) ! if temp2 = 0 then -- month not found before first number ! new_start := finish( WhereIntWas() ); -- get next number ! temp2 := NextInt() ! if WhereIntWas() = "" then ! -- valid: days only (no month or year given) ! month := 0 ! day := temp1 ! year := 0 else -- look for month text between 1st two numbers ! temp3 := SearchMonth( extent( new_start, WhereIntWas() ) ) ! if temp3 = 0 then -- no month text found: get 3rd number ! temp3 := NextInt() ! if WhereIntWas() = "" then ! -- valid: year and day only (no month) ! month := 0 ! day := temp2 ! year := temp1 else ! -- valid: month, day, and year ! month := temp1 ! day := temp2 ! year := temp3 end if ! else ! -- valid: day, month, and year (month in middle) ! month := temp3 ! day := temp1 ! year := temp2 end if end if ! else ! -- month found before 1st number: look for next number ! temp3 := NextInt() ! if WhereIntWas() = "" then ! -- invalid: month, day, but no year ! return (0) ! else ! -- valid: month, day, and year ! month := temp2 ! day := temp1 ! year := temp3 end if end if ! -- convert year to to full, if necessary ! if year > 0 and year < 100 then ! year := year + 1900 end if -- return canonical integer representation - return DateToInt(year, month, day) end function - function main() ! printline( "result = " ~ textimage( date_canonical("July 17, 1989") ) ) ! printline( "result = " ~ textimage( date_canonical("17 Jul 1989") ) ) ! printline( "result = " ~ textimage( date_canonical("7-17-89") ) ) ! printline( "result = " ~ textimage( date_canonical("7/17 '89") ) ) ! printline( "result = " ~ textimage( date_canonical("Mon, 17 Jul 89 14:03:19 -0500 (EST)") ) ) ! printline( "result = " ~ textimage( date_canonical("Tue Jul 17 17:34:09 EST 1989") ) ) ! printline( "result = " ~ textimage( date_canonical("1989.198") ) ) ! printline( "result = " ~ textimage( date_canonical("89.198") ) ) ! printline( "result = " ~ textimage( date_canonical("'89.198") ) ) ! printline( "result = " ~ textimage( date_canonical("32340") ) ) ! printline( "result = " ~ textimage( date_canonical("July 17") ) ) ! end function --- 443,1034 ---- days := days - 366 -- year 1 is first year of cycle ! y := 1 -- so remove year 0 ! t := days / 146097 -- 400 years: 97 leap years ! days := days - t * 146097 ! y := y + 400 * t ! t := days / 36524 -- 100 years: 24 leap years ! days := days - t * 36524 ! y := y + 100 * t ! t := days / 1461 -- 4 years: 1 leap year ! days := days - t * 1461 ! y := y + 4 * t + t := floor((float(days) - .15) / 365.25) -- fudge to get day 1461 right ! days := days - t * 365 ! y := y + t ! ParsedYear := y ! Leap := IsLeap(y) ! ParsedMonth := monthIndex(days, Leap) ! ParsedDay := days - daysBeforeMonth(ParsedMonth, Leap) end function ! -- return an integer representation for the given year, month, and day. ! -- assume year zero has 366 days ! -- ignore change from Julian to Gregorian calendar ! -- ! integer function \bold{DateToInt}(integer year, integer month, integer day) + return year* 365 + (year-1)/4 - (year-1)/100 + (year-1)/400 +1 + + + daysBeforeMonth(month, IsLeap(year)) + + + day + end function ! -- set the global ParsedXxxx variables + -- If year, month or day is not found, the value 0 is assigned. + + -- This function does nothing about filling in defaults. + + -- + + function \bold{ParseDate}(date) + integer temp1, temp2, temp3 + marker loc1 -- location of first integer + + + ParsedYear := NoValue + + ParsedMonth := NoValue + + ParsedDay := NoValue + + -- get first number in date + temp1 := FirstInt(date) ! ! if temp1 = NoValue then -- invalid: no numbers found ! ! exit function ! end if + loc1 := where_int_was + + -- look for month text in front of the first number ! ! temp2 := SearchMonth( extent( date, start(loc1))) ! ! if temp2 /= NoValue then ! ! -- month found before 1st number: year is next ! ! -- printline("mmm dd yyyy") ! ! ParsedYear := FirstInt(extent(finish(loc1), date)) ! ! ParsedMonth := temp2 ! ! ParsedDay := temp1 ! ! else ! -- month not found before first number ! -- get next number ! ! temp2 := FirstInt(extent(finish(loc1), date)) ! ! if temp2 = NoValue then ! ! -- only one integer found: assume canonical date ! ! ParsedDay := temp1 ! ! -- printline("canon") ! else + -- look for month text between 1st two numbers ! ! temp3 := SearchMonth(extent(finish(loc1), ! ! start(where_int_was))) ! ! if temp3 /= NoValue then ! ! -- month in middle ! ! ParsedMonth := temp3 ! ! ParsedDay := temp1 ! ! ParsedYear := temp2 ! ! -- printline("dd mmm yyyy") ! ! else ! -- no month text found: get 3rd number ! ! temp3 := FirstInt(extent ! ! (finish(where_int_was), date)) ! ! if temp3 = NoValue then ! ! -- no month: Julian date ! ! ParsedYear := temp1 ! ! -- printline("yyyy dd") ! else ! ! -- found month, day, and year ! ! ParsedMonth := temp1 ! ! ParsedYear := temp3 ! ! -- printline("mm dd yyyy") ! end if ! ! ParsedDay := temp2 ! end if + end if ! ! end if ! ! end function ! ! ! ! -- return the canonical integer for today ! ! -- ! ! function \bold{GetTodaysDate}() ! ! if not dateGotten then ! ! dateGotten := True ! ! ParseDate(system("date")) ! ! ThisYear := ParsedYear ! ! todaysDate := DateToInt(ParsedYear, ! ! ParsedMonth, ParsedDay) ! ! end if ! ! return todaysDate ! ! end function ! ! ! -------------------------------------------------- ! ! -- EXTERNAL FUNCTIONS ! ! ! -- returns the canonical integer for today ! ! -- ! ! integer function \bold{date_today}() ! ! return GetTodaysDate() ! ! end function ! ! ! function \bold{date_DayOfWeek}(integer n) ! ! -- day 1 (Jan 1, 0AD) was a Saturday ! ! marker m := start("Friday Saturday Sunday Monday Tuesday Wednesday Thursday ! ") ! ! ! n := n % 7 ! ! while n >= 0 do ! ! m := token(finish(m), Letters) ! ! n := n - 1 ! ! end while ! ! return m ! ! end function ! ! ! -- returns the slashed date (mm/dd/yy) for the canonical integer n ! ! -- ! ! marker function \bold{date_slashed}(integer n) ! ! IntToParsed(n) ! ! return textimage(ParsedMonth) ! ! ~ "/" ~ textimage(ParsedDay) ! ! ~ "/" ~ yeardigits(ParsedYear) ! ! end function ! ! ! ! -- returns the dashed date (mm-dd-yy) for the canonical integer n ! ! -- ! ! marker function\bold{ date_dashed}(integer n) ! ! IntToParsed(n) ! ! return textimage(ParsedMonth) ! ! ~ "-" ~ textimage(ParsedDay) ! ! ~ "-" ~ yeardigits(ParsedYear) ! ! end function ! ! ! ! -- returns the text date (Month dd, yyyy) for the canonical integer n ! ! -- ! ! marker function \bold{date_text}(integer n) ! ! IntToParsed(n) ! ! return monthFullName(ParsedMonth) ! ! ~ " " ~ textimage(ParsedDay) ! ! ~ ", " ~ textimage(ParsedYear) ! ! end function ! ! ! ! -- returns the julian date (yyyy.ddd) for the canonical integer n ! ! -- ! ! marker function \bold{date_julian}(integer n) ! ! IntToParsed(n) ! ! return textimage(ParsedYear) ~ "." ! ! ~ textimage(daysBeforeMonth(ParsedMonth, ! ! IsLeap(ParsedYear)) ! ! + ParsedDay) ! ! end function ! ! ! ! -- returns the canonical integer representation for the date represented by ! the given marker text ! ! -- If no day is found, returns 0. ! ! -- If one integer is found and it is greater than 366, ! ! -- it is assumed to be a canonical date ! ! -- If two integers are found, they are assumed to be year and Julian day ! ! -- If year is less than 100, it is adjusted to be within fifty years of this ! ! -- current year by adding an appropriate century ! ! ! integer function \bold{date_canonical}(marker date) ! ! integer T -- last two digits of current year ! ! GetTodaysDate() ! ! ParseDate(date) ! ! ! if ParsedDay = NoValue then ! ! return 0 ! ! end if ! ! ! if ParsedYear = NoValue then ! ! if ParsedDay > 366 then ! ! -- must be a canonical date ! ! return ParsedDay ! end if + + -- there is no year: assume current year + + ParsedYear := ThisYear + end if ! ! -- convert year to full, if necessary ! ! if ParsedYear >= 0 and ParsedYear < 100 then ! ! T := ThisYear % 100 ! ! if T < 50 and ParsedYear > T + 50 then ! ! -- previous century ! ! ParsedYear := ParsedYear + ThisYear - T - 100 ! ! elif T > 50 and ParsedYear < T - 50 then ! ! -- next century ! ! ParsedYear := ParsedYear + ThisYear - T + 100 ! ! else -- current century ! ! ParsedYear := ParsedYear + ThisYear - T ! ! end if ! end if + + if ParsedMonth = NoValue then + + -- assume that days are Julian + + boolean Leap := IsLeap(ParsedYear) + + ParsedMonth := monthIndex(ParsedDay, Leap) + + ParsedDay := ParsedDay + + - daysBeforeMonth(ParsedMonth, Leap) + + end if + + + -- return canonical integer representation + return DateToInt(ParsedYear, ParsedMonth, ParsedDay) + end function ! ------------------------------------------------ + -- TEST + + -- + + function \bold{dumpday}(integer i) + + printline(textimage(i) ~ " " + + ~ date_slashed(i) ~ " " ~ date_dashed(i) ~ " " + + ~ date_julian(i) ~ " " ~ date_text(i) ~ " " + + ~ date_DayOfWeek(i)) + end function + + function \bold{testCanonical}(d, integer c) + + integer i := date_canonical(d) + + if i /= c then print("XXX date_canonical failedXXX ") end if + + print(d ~ ": ") + + dumpday(i) + + end function + + + function \bold{dumpyear}(integer days, integer expected) + + IntToParsed(days) + + if expected /= ParsedYear then print(" XXX IntToParsed failed:") end if + + print (" " ~ textimage(ParsedYear)) + + end function + + + function \bold{testIntToParsed}(integer year, integer Qleap) + + integer days + + days := year* 365 + (year-1)/4 - (year-1)/100 + (year+399)/400 + + print (textimage(year) ~ ": ") dumpday(days+1) + + printline("days before " ~ textimage(year) + + ~ " = " ~ textimage(days)) + + dumpyear(days-1, year-1) + + dumpyear(days, year-1) + + dumpyear(days+1, year) + + dumpyear(days+365, year) + + dumpyear(days+366, Qleap) + + dumpyear(days+367, year+1) + + printline(" ") + + end function + + + function \bold{main}() + + integer today := date_today() + + printline("ParsedYear: " ~ textimage(ParsedYear)) + + printline("ParsedMonth: " ~ textimage(ParsedMonth)) + + printline("ParsedDay: " ~ textimage(ParsedDay)) + + print ("Today is ") + + print(textimage(today) ~ " ") + + print(date_dayOfWeek(today) ~ " ") + + printline(date_text(today)) + + printline("ParsedYear: " ~ textimage(ParsedYear)) + + printline("ParsedMonth: " ~ textimage(ParsedMonth)) + + printline("ParsedDay: " ~ textimage(ParsedDay)) + + dumpday(date_today()) + + + testCanonical("July 17, 1989", 726666) + + testCanonical("17 Jul 1989", 726666) + + testCanonical("7-17-89", 726666) + + testCanonical("7/17 '89", 726666) + + testCanonical("Mon, 17 Jul 89 14:03:19 -0500 (EST)", 726666) + + testCanonical("Tue Jul 17 17:34:09 EST 1989", 726666) + + testCanonical("1989.198", 726666) + + testCanonical("89.198", 726666) + + testCanonical("'89.198", 726666) + + testCanonical("726666", 726666) + + testCanonical("July 17", 726666+365) -- assumes current year is 1990 + + testCanonical("31 Dec 1999", 730485) + + testCanonical("1 Jan 2000", 730486) + + + testIntToParsed(0, 0) + + testIntToParsed(1, 2) + + testIntToParsed(2, 3) + + testIntToParsed(3, 4) + + testIntToParsed(4, 4) + + testIntToParsed(1899, 1900) + + testIntToParsed(1900, 1901) + + testIntToParsed(1901, 1902) + + testIntToParsed(1902, 1903) + + testIntToParsed(1903, 1904) + + testIntToParsed(1904, 1904) + + testIntToParsed(1999, 2000) + + testIntToParsed(2000, 2000) + + testIntToParsed(2001, 2002) + + testIntToParsed(2002, 2003) + + testIntToParsed(2003, 2004) + + testIntToParsed(2004, 2004) + + end function + + \enddata{text,269395500} *** atk/ness/demos/badsub.n Wed Nov 22 12:23:04 1989 --- atk/ness/demos/badsub.n.NEW Mon Sep 17 12:32:06 1990 *************** *** 19,54 **** -- end ! integer nusers; -- number of users ! integer nopref; -- count people without preferences ! integer hiddenpref; -- count those without read permission ! integer notempl; -- count readable prefs without templatepaths ! integer nglobal; -- count global paths mention in template path lines ! integer nlocal; -- count users with their own template llibraries -- number of users with templatepaths but without their own preferences is -- nusers - nopref - hiddenpref - notempl - nlocal ! marker GlobalTemplatePaths; -- template paths not containing the name of the user who references them ! marker UsersToNotify; -- users who have problems function Notify(user) if search(UsersToNotify, user) = "" then ! UsersToNotify ~:= user ~ " "; ! end if; end function integer function countlines(text) ! marker m; ! integer count; ! count := 0; ! m := search(text, "\n"); while m /= "" and extent(finish(text), m) = "" do ! count := count + 1; ! m := search(next(m), "\n"); ! end while; ! return count; end function -- check each path mentioned in a TemplatePath --- 19,55 ---- -- end ! integer nusers -- number of users ! integer nopref -- count people without preferences ! integer hiddenpref -- count those without read permission ! integer notempl -- count readable prefs without templatepaths ! integer nglobal -- count global paths mention in template path lines ! integer nlocal -- count users with their own template llibraries -- number of users with templatepaths but without their own preferences is -- nusers - nopref - hiddenpref - notempl - nlocal ! marker GlobalTemplatePaths -- template paths not containing the name ! -- of the user who references them ! marker UsersToNotify -- users who have problems function Notify(user) if search(UsersToNotify, user) = "" then ! UsersToNotify ~:= user ~ " " ! end if end function integer function countlines(text) ! marker m ! integer count ! count := 0 ! m := search(text, "\n") while m /= "" and extent(finish(text), m) = "" do ! count := count + 1 ! m := search(finish(m), "\n") ! end while ! return count end function -- check each path mentioned in a TemplatePath *************** *** 57,112 **** -- otherwise it is added to a list GlobalTemplatePaths -- function CheckTemplate(user, path) ! marker v; if search(path ~ "", user) /= "" then -- it belongs to user. check it for -393 ! nlocal := nlocal +1; ! v := system ("egrep '\\-393' " ~ path ~ "/*.template /dev/null"); if v /= "" then ! printline(v); ! Notify (user); ! end if; elif search(GlobalTemplatePaths, path) = "" then -- hitherto unseen global template path ! nglobal := nglobal + 1; ! GlobalTemplatePaths ~:= ":" ~ path; ! end if; ! end function; -- check one line of the list of templatelist lines -- function CheckTemplateLine(user, line, boolean print) ! marker templ; ! marker colon; ! templ := anyof(line, ":\n"); while templ = ":" do -- templ has the colon before a path in the list ! colon := anyof(next(templ), ":\n"); if colon = "" then ! colon := finish(line); ! end if; ! templ := extent(next(span(start(templ), " \t")), start(colon)); if match(templ, "~/") /= "" then ! replace(first(templ), "/afs/andrew.cmu.edu/usr/" ~ user); elif match(templ, "/cmu") /= "" then ! printline (user ~ " has a template reference to /cmu"); ! Notify(user); ! end if; if print then ! printline(templ); ! end if; if first(templ) = "~" then ! printline("For user " ~ user ~ " cannot check " ~ templ); else ! CheckTemplate(user, templ); ! end if; ! templ := next(templ); ! end while; ! end function; -- the 'list' argument may be several templatepath lines --- 58,113 ---- -- otherwise it is added to a list GlobalTemplatePaths -- function CheckTemplate(user, path) ! marker v if search(path ~ "", user) /= "" then -- it belongs to user. check it for -393 ! nlocal := nlocal +1 ! v := system ("egrep '\\-393' " ~ path ~ "/*.template /dev/null") if v /= "" then ! printline(v) ! Notify (user) ! end if elif search(GlobalTemplatePaths, path) = "" then -- hitherto unseen global template path ! nglobal := nglobal + 1 ! GlobalTemplatePaths ~:= ":" ~ path ! end if ! end function -- check one line of the list of templatelist lines -- function CheckTemplateLine(user, line, boolean print) ! marker templ ! marker colon ! templ := anyof(line, ":\n") while templ = ":" do -- templ has the colon before a path in the list ! colon := anyof(finish(templ), ":\n") if colon = "" then ! colon := finish(line) ! end if ! templ := extent(next(span(start(templ), " \t")), start(colon)) if match(templ, "~/") /= "" then ! replace(first(templ), "/afs/andrew.cmu.edu/usr/" ~ user) elif match(templ, "/cmu") /= "" then ! printline (user ~ " has a template reference to /cmu") ! Notify(user) ! end if if print then ! printline(templ) ! end if if first(templ) = "~" then ! printline("For user " ~ user ~ " cannot check " ~ templ) else ! CheckTemplate(user, templ) ! end if ! templ := next(templ) ! end while ! end function -- the 'list' argument may be several templatepath lines *************** *** 114,211 **** -- assumption: list = base(list) -- function CheckTemplateList(user, list, boolean print) ! marker line; ! marker nextline; ! line := first(list); while line /= "" do -- 'line' is the first character of a line if line = "#" then ! line := next(search(line, "\n")); else -- process a line ! nextline := search(line, "\n"); if nextline = "" then ! line := extent(line, list); else ! line := extent(line, start(nextline)); ! end if; ! CheckTemplateLine(user, line, print); ! line := next(nextline); ! end if; end while ! end function; -- Call CheckTemplateList for each user of Andrew -- function main(args) ! marker users; ! marker user; ! marker idletters; ! marker pref; ! nopref := 0; ! hiddenpref := 0; ! notempl := 0; ! nglobal := 0; ! nlocal := 0; ! GlobalTemplatePaths := newbase(); ! UsersToNotify := newbase(); -- get a list of all users if args /= "" then ! printline("Checking all users in " ~ args); ! users := system ("ls -1 " ~ args); else ! users := system("whoami"); ! end if; ! nusers := countlines(users); ! printline("There are " ~ textimage(nusers) ~ " users\n\n"); ! idletters := "1234567890qwertyuiopasdfghjklzxcvbnm"; ! user := token(users, idletters); while user /= "" do ! pref := system("file /afs/andrew.cmu.edu/usr/" ~ user ~ "/preferences"); if search(pref, "Permission denied") /= "" then ! hiddenpref := hiddenpref + 1; elif search(pref, "No such file or directory") /= "" then ! nopref := nopref + 1; else pref := system ("grep -i templatepath /afs/andrew.cmu.edu/usr/" ! ~ user ~ "/preferences"); if pref = "" then ! notempl := notempl + 1; else ! CheckTemplateList(user, pref, False); ! end if; ! end if; ! user := token(next(user), idletters); ! end while; ! printline("\n\nTotal number of users " ~ textimage(nusers)); ! printline("Number of users without preferences " ~ textimage(nopref)); ! printline("Number of users with unreadable preferences " ~ textimage(hiddenpref)); ! printline("Number of preference files without templatepaths " ~ textimage(notempl)); ! printline("Number of personal template directories checked " ~ textimage(nlocal)); ! printline("Number of global template paths " ~ textimage(nglobal) ~ "\n\n"); printline("The following users had problems with their templates: \n" ! ~ UsersToNotify); -- check the global templates -- BOGOSITY: pass user name "and" which string should be contained in -- all paths. ! pref := GlobalTemplatePaths; ! GlobalTemplatePaths := newbase(); ! printline("\n\nNow checking template paths that did not belong to the users that mentioned them"); ! CheckTemplateLine("and", pref, True); if GlobalTemplatePaths /= "" then printline("\nNon-AFS template paths (not checked): \n" ! ~ GlobalTemplatePaths); ! end if; end function --- 115,212 ---- -- assumption: list = base(list) -- function CheckTemplateList(user, list, boolean print) ! marker line ! marker nextline ! line := first(list) while line /= "" do -- 'line' is the first character of a line if line = "#" then ! line := next(search(start(line), "\n")) else -- process a line ! nextline := search(start(line), "\n") if nextline = "" then ! line := extent(line, list) else ! line := extent(line, start(nextline)) ! end if ! CheckTemplateLine(user, line, print) ! line := next(nextline) ! end if end while ! end function -- Call CheckTemplateList for each user of Andrew -- function main(args) ! marker users ! marker user ! marker idletters ! marker pref ! nopref := 0 ! hiddenpref := 0 ! notempl := 0 ! nglobal := 0 ! nlocal := 0 ! GlobalTemplatePaths := newbase() ! UsersToNotify := newbase() -- get a list of all users if args /= "" then ! printline("Checking all users in " ~ args) ! users := system ("ls -1 " ~ args) else ! users := system("whoami") ! end if ! nusers := countlines(users) ! printline("There are " ~ textimage(nusers) ~ " users\n\n") ! idletters := "1234567890qwertyuiopasdfghjklzxcvbnm" ! user := token(users, idletters) while user /= "" do ! pref := system("file /afs/andrew.cmu.edu/usr/" ~ user ~ "/preferences") if search(pref, "Permission denied") /= "" then ! hiddenpref := hiddenpref + 1 elif search(pref, "No such file or directory") /= "" then ! nopref := nopref + 1 else pref := system ("grep -i templatepath /afs/andrew.cmu.edu/usr/" ! ~ user ~ "/preferences") if pref = "" then ! notempl := notempl + 1 else ! CheckTemplateList(user, pref, False) ! end if ! end if ! user := token(next(user), idletters) ! end while ! printline("\n\nTotal number of users " ~ textimage(nusers)) ! printline("Number of users without preferences " ~ textimage(nopref)) ! printline("Number of users with unreadable preferences " ~ textimage(hiddenpref)) ! printline("Number of preference files without templatepaths " ~ textimage(notempl)) ! printline("Number of personal template directories checked " ~ textimage(nlocal)) ! printline("Number of global template paths " ~ textimage(nglobal) ~ "\n\n") printline("The following users had problems with their templates: \n" ! ~ UsersToNotify) -- check the global templates -- BOGOSITY: pass user name "and" which string should be contained in -- all paths. ! pref := GlobalTemplatePaths ! GlobalTemplatePaths := newbase() ! printline("\n\nNow checking template paths that did not belong to the users that mentioned them") ! CheckTemplateLine("and", pref, True) if GlobalTemplatePaths /= "" then printline("\nNon-AFS template paths (not checked): \n" ! ~ GlobalTemplatePaths) ! end if end function *** atk/ness/demos/bank.d Wed Nov 22 12:22:55 1989 --- atk/ness/demos/bank.d.NEW Mon Sep 17 12:32:10 1990 *************** *** 1,51 **** ! \begindata{arbiter,956244} \V 2 ! \begindata{text,964784} \textdsversion{12} \template{default} \define{plus } ! \plus{Dear Valued Customer: ! ! \leftindent{Your loan application has been approved in the amount of ! \begindata{cel,949556} \V 2 ! \begindata{value,949420} ! >20 ! \enddata{value,949420} ! 10 949420 1 0 0 0 >OBJ< value >VIEW< sliderV >REF< Amount ! \begindata{text,949308} \textdsversion{12} [long] (20) [long] (300) ! [long] (22) [string] (andysans) [string]