home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.x
- From: gregor@kafka.saic.com (gregg hanna)
- Subject: v21i044: mrolo - Motif rolodex, Patch02
- Message-ID: <1993Nov23.161734.14714@sparky.sterling.com>
- X-Md4-Signature: 7d595206e4ffecddc6f8a80ac3d05752
- Sender: chris@sparky.sterling.com (Chris Olson)
- Organization: Sterling Software
- Date: Tue, 23 Nov 1993 16:17:34 GMT
- Approved: chris@sterling.com
-
- Submitted-by: gregor@kafka.saic.com (gregg hanna)
- Posting-number: Volume 21, Issue 44
- Archive-name: mrolo/patch02
- Environment: X11, OSF/Motif
- Patch-To: mrolo: Volume 21, Issue 8-10
-
- Second patch for
- v21i008-v21i010 mrolo version 1.3 pl 0 + first patch
-
- Version 1.3 pl 2
-
- Fixed potential NULL dereference in AllSpace().
-
- Added crolo and crolo.1 to install.man target in Makefile.std.
-
- Fixed makefiles to use new lower-case app-default filename,
- repaired minor Imakefile problem (tabs vs. spaces).
-
- Improved app-default feature by stripping initial pathname
- components.
-
- prolo now quotes back-slashes so PostScript will print them.
-
- Updated mrolo.man to reflect X11-option handling.
-
- Cleaned up the code and repaired some memory leaks, fixed
- bad memory reference in rolo.c:WriteRolo().
-
- Fixed prolo bug: didn't always clear stack of arguments
- in tshow, lead to stack overflows.
-
- -gregor
-
- --------snip------X----------snip--------------X-------snip-----------
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # Contents: mrolo.p2
- # Wrapped by chris@sparky on Tue Nov 23 10:13:12 1993
- PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive 1 (of 1)."'
- if test -f 'mrolo.p2' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mrolo.p2'\"
- else
- echo shar: Extracting \"'mrolo.p2'\" \(22685 characters\)
- sed "s/^X//" >'mrolo.p2' <<'END_OF_FILE'
- X
- X# Please remove the following files before applying this patch.
- X# (You can feed this patch to 'sh' to do so.)
- X
- Xrm -f MRolo.ad
- Xrm -f ad2c
- Xexit
- X
- XIndex: patchlevel.h
- XPrereq: 1
- X*** mrolo13.old/patchlevel.h Thu Oct 14 23:52:51 1993
- X--- mrolo13/patchlevel.h Mon Oct 11 17:49:39 1993
- X***************
- X*** 1 ****
- X! #define PATCHLEVEL 1
- X--- 1 ----
- X! #define PATCHLEVEL 2
- XIndex: CHANGES
- X*** mrolo13.old/CHANGES Thu Oct 14 23:52:51 1993
- X--- mrolo13/CHANGES Fri Oct 15 00:28:03 1993
- X***************
- X*** 73,75 ****
- X--- 73,97 ----
- X that only some compilers complained about.
- X
- X Extended ifdefs in crolo to support OSF/1.
- X+
- X+ Version 1.3 pl 2
- X+
- X+ Fixed potential NULL dereference in AllSpace().
- X+
- X+ Added crolo and crolo.1 to install.man target in Makefile.std.
- X+
- X+ Fixed makefiles to use new lower-case app-default filename,
- X+ repaired minor Imakefile problem (tabs vs. spaces).
- X+
- X+ Improved app-default feature by stripping initial pathname
- X+ components.
- X+
- X+ prolo now quotes back-slashes so PostScript will print them.
- X+
- X+ Updated mrolo.man to reflect X11-option handling.
- X+
- X+ Cleaned up the code and repaired some memory leaks, fixed
- X+ bad memory reference in rolo.c:WriteRolo().
- X+
- X+ Fixed prolo bug: didn't always clear stack of arguments
- X+ in tshow, lead to stack overflows.
- XIndex: Imakefile
- X*** mrolo13.old/Imakefile Thu Oct 14 23:52:51 1993
- X--- mrolo13/Imakefile Thu Oct 14 02:49:11 1993
- X***************
- X*** 15,21 ****
- X $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o crolo crolo.c rolo.o roloc.o arrows.o compat.o getopt.o $(TERMLIBS)
- X
- X clean::
- X! $(RM) prolo crolo rolo.samp- xdef mrolo.ad.h
- X
- X InstallProgram(crolo,$(BINDIR))
- X InstallProgram(prolo,$(BINDIR))
- X--- 15,21 ----
- X $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o crolo crolo.c rolo.o roloc.o arrows.o compat.o getopt.o $(TERMLIBS)
- X
- X clean::
- X! $(RM) prolo crolo rolo.samp- xdef
- X
- X InstallProgram(crolo,$(BINDIR))
- X InstallProgram(prolo,$(BINDIR))
- X***************
- X*** 27,33 ****
- X xdef: mrolo.ad
- X sed -e '1,$$s/^#/!/g' -e '1,$$s/^*/mrolo*/g' mrolo.ad > xdef
- X
- X- mrolo.ad.h: mrolo.ad
- X- ./ad2c mrolo.ad > mrolo.ad.h
- X-
- X- mrolo.o: mrolo.ad.h
- X--- 27,29 ----
- XIndex: MANIFEST
- X*** mrolo13.old/MANIFEST Thu Oct 14 23:52:19 1993
- X--- mrolo13/MANIFEST Fri Oct 15 00:33:22 1993
- X***************
- X*** 3,12 ****
- X CHANGES 1 change file
- X Imakefile 1 template for imake
- X MANIFEST 1 this file
- X- MRolo.ad 1 application defaults
- X Makefile.std 1 non-imake makefile
- X README 1 read this first
- X- ad2c 1 converts AD file to .h
- X arrows.c 1 handles arrows under BSD curses
- X arrows.h 1 handles arrows under BSD curses
- X callback.c 1 X callbacks for mrolo
- X--- 3,10 ----
- X***************
- X*** 13,35 ****
- X compat.c 1 compatibility functions
- X compat.h 1 compatibility function headers
- X creation.c 3 X window creation for mrolo
- X! crolo.c 1 curses rolo main program
- X crolo.man 1 curses rolo man page
- X getopt.c 1 portable getopt(3)
- X mrolo.bm 1 bitmap for mrolo
- X mrolo.c 1 Motif rolo main program
- X mrolo.man 2 Motif rolo man page
- X myregexp.h 1 portable regexp
- X! patchlevel.h 1 patchlevel file
- X prolo.c 2 rolo printer main program
- X prolo.man 1 rolo printer man page
- X rolo.c 2 rolo functions (used by *rolo)
- X rolo.h 1 headers for rolo functions
- X- sample.Z.uu 2 sample rolo file (compressed/uuencoded)
- X roloP.h 1 private header for rolo.c
- X roloc.c 1 curses rolo functions
- X rolox.c 1 X windows rolo functions
- X rolox.h 1 headers for X windows rolo functions
- X xr2mr 1 converter from xrolodex file to rolo file
- X xr2mr.man 1 manual page for converter
- X
- X--- 11,36 ----
- X compat.c 1 compatibility functions
- X compat.h 1 compatibility function headers
- X creation.c 3 X window creation for mrolo
- X! crolo.c 2 curses rolo main program
- X crolo.man 1 curses rolo man page
- X getopt.c 1 portable getopt(3)
- X+ mrolo.ad 1 application defaults
- X+ mrolo.ad.h 1 application defaults (c version)
- X mrolo.bm 1 bitmap for mrolo
- X mrolo.c 1 Motif rolo main program
- X mrolo.man 2 Motif rolo man page
- X myregexp.h 1 portable regexp
- X! patchlevel.h 1 current patch state
- X prolo.c 2 rolo printer main program
- X prolo.man 1 rolo printer man page
- X rolo.c 2 rolo functions (used by *rolo)
- X rolo.h 1 headers for rolo functions
- X roloP.h 1 private header for rolo.c
- X roloc.c 1 curses rolo functions
- X+ roloc.h 1 curses rolo functions headers
- X rolox.c 1 X windows rolo functions
- X rolox.h 1 headers for X windows rolo functions
- X+ sample.Z.uu 2 sample rolo file (compressed/uuencoded)
- X xr2mr 1 converter from xrolodex file to rolo file
- X xr2mr.man 1 manual page for converter
- X
- XIndex: Makefile.std
- X*** mrolo13.old/Makefile.std Thu Oct 14 23:52:52 1993
- X--- mrolo13/Makefile.std Thu Oct 14 02:49:18 1993
- X***************
- X*** 2,8 ****
- X # HP/UX users: use -DUSE_REGCOMP -DSYSV, LDFLAGS and INCLUDES
- X # everyone else: read through the makefile
- X
- X! RM = /bin/rm
- X BINDIR = /usr/bin/X11
- X APPDIR = /usr/lib/X11/app-defaults
- X MANDIR = /usr/man/mann
- X--- 2,8 ----
- X # HP/UX users: use -DUSE_REGCOMP -DSYSV, LDFLAGS and INCLUDES
- X # everyone else: read through the makefile
- X
- X! RM = /bin/rm -f
- X BINDIR = /usr/bin/X11
- X APPDIR = /usr/lib/X11/app-defaults
- X MANDIR = /usr/man/mann
- X***************
- X*** 45,59 ****
- X crolo: crolo.c rolo.o roloc.o compat.o arrows.o getopt.o
- X $(LINK.c) -o crolo crolo.c rolo.o roloc.o compat.o arrows.o getopt.o $(TERMLIBS)
- X
- X- mrolo.ad.h: mrolo.ad
- X- ./ad2c mrolo.ad > mrolo.ad.h
- X-
- X- mrolo.o: mrolo.ad.h
- X-
- X-
- X install: all
- X cp mrolo $(BINDIR)
- X cp prolo $(BINDIR)
- X cp xr2mr $(BINDIR)
- X chmod +x $(BINDIR)/xr2mr
- X cp mrolo.ad $(APPDIR)/mrolo
- X--- 45,54 ----
- X crolo: crolo.c rolo.o roloc.o compat.o arrows.o getopt.o
- X $(LINK.c) -o crolo crolo.c rolo.o roloc.o compat.o arrows.o getopt.o $(TERMLIBS)
- X
- X install: all
- X cp mrolo $(BINDIR)
- X cp prolo $(BINDIR)
- X+ cp crolo $(BINDIR)
- X cp xr2mr $(BINDIR)
- X chmod +x $(BINDIR)/xr2mr
- X cp mrolo.ad $(APPDIR)/mrolo
- X***************
- X*** 61,66 ****
- X--- 56,62 ----
- X install.man:
- X cp mrolo.man $(MANDIR)/mrolo.$(MANEXT)
- X cp prolo.man $(MANDIR)/prolo.$(MANEXT)
- X+ cp crolo.man $(MANDIR)/prolo.$(MANEXT)
- X cp xr2mr.man $(MANDIR)/xr2mr.$(MANEXT)
- X
- X clean:
- XIndex: README
- X*** mrolo13.old/README Thu Oct 14 23:52:21 1993
- X--- mrolo13/README Thu Oct 14 02:45:42 1993
- X***************
- X*** 98,103 ****
- X--- 98,104 ----
- X AT&T and Rich Salz and Jim for the PD getopt(3).
- X Everyone who generously offered their suggestions.
- X
- X+
- X Copyright 1993 by gregg hanna. Permission is granted to use,
- X modify, and distribute this program. Basically do anything
- X you want with it, but if you want to use it or any part of it
- XIndex: arrows.c
- X*** mrolo13.old/arrows.c Thu Oct 14 23:52:22 1993
- X--- mrolo13/arrows.c Thu Oct 14 03:05:10 1993
- X***************
- X*** 22,27 ****
- X--- 22,28 ----
- X * curses uses the global variable ttytype to specify what it
- X * thinks your terminal type is
- X */
- X+ int
- X get_arrow_info()
- X {
- X
- X***************
- X*** 48,53 ****
- X--- 49,55 ----
- X * read in the escape sequence and compare it to what we got from
- X * termcap entry.
- X */
- X+ int
- X do_escape(c)
- X int c;
- X {
- X***************
- X*** 95,100 ****
- X--- 97,103 ----
- X }
- X
- X #if 0
- X+ int
- X main()
- X {
- X WINDOW *screen;
- XIndex: callback.c
- X*** mrolo13.old/callback.c Thu Oct 14 23:52:23 1993
- X--- mrolo13/callback.c Thu Oct 14 02:58:23 1993
- X***************
- X*** 59,65 ****
- X Widget w;
- X caddr_t client, call;
- X {
- X- Boolean v;
- X int n;
- X XmToggleButtonCallbackStruct *event = (XmToggleButtonCallbackStruct*)call;
- X
- X--- 59,64 ----
- X***************
- X*** 75,85 ****
- X caddr_t client, call;
- X {
- X extern Widget picker;
- X- XmToggleButtonCallbackStruct *event = (XmToggleButtonCallbackStruct*)call;
- X- Widget wi = (Widget)client;
- X- XButtonEvent *bevent;
- X- Position x, y;
- X-
- X UpDialog(picker);
- X }
- X
- X--- 74,79 ----
- XIndex: creation.c
- X*** mrolo13.old/creation.c Thu Oct 14 23:52:52 1993
- X--- mrolo13/creation.c Thu Oct 14 03:00:03 1993
- X***************
- X*** 59,65 ****
- X XmString xstr;
- X int n;
- X Boolean bool;
- X- extern int selectFilter;
- X extern int RoloSearch[4];
- X
- X n = 0;
- X--- 59,64 ----
- X***************
- X*** 76,82 ****
- X XtSetArg(args[n],XmNalignment,XmALIGNMENT_CENTER); n++;
- X bu = XmCreatePushButton(di,"Done",args,n);
- X XtManageChild(bu);
- X! XtAddCallback(bu,XmNactivateCallback,PickDone,di);
- X
- X n = 0;
- X XtSetArg(args[n],XmNtopAttachment,XmATTACH_FORM); n++;
- X--- 75,81 ----
- X XtSetArg(args[n],XmNalignment,XmALIGNMENT_CENTER); n++;
- X bu = XmCreatePushButton(di,"Done",args,n);
- X XtManageChild(bu);
- X! XtAddCallback(bu,XmNactivateCallback,PickDone,(caddr_t)di);
- X
- X n = 0;
- X XtSetArg(args[n],XmNtopAttachment,XmATTACH_FORM); n++;
- X***************
- X*** 140,146 ****
- X XtManageChild(t3);
- X XtAddCallback(t3,XmNvalueChangedCallback,PickChange,(caddr_t)3);
- X
- X! XtAddCallback(pickerButton, XmNactivateCallback, ManageArgAtClick, picker);
- X
- X /* Init search flags to whatever the defaults were */
- X XtVaGetValues(t0,XmNset,&bool,NULL);
- X--- 139,145 ----
- X XtManageChild(t3);
- X XtAddCallback(t3,XmNvalueChangedCallback,PickChange,(caddr_t)3);
- X
- X! XtAddCallback(pickerButton, XmNactivateCallback, ManageArgAtClick, (caddr_t)picker);
- X
- X /* Init search flags to whatever the defaults were */
- X XtVaGetValues(t0,XmNset,&bool,NULL);
- X***************
- X*** 342,348 ****
- X Widget cancelButton;
- X Widget separator;
- X Widget rowColumn1;
- X- extern int selectFilter;
- X
- X XmRegisterConverters();
- X
- X--- 341,346 ----
- XIndex: crolo.c
- X*** mrolo13.old/crolo.c Thu Oct 14 23:52:53 1993
- X--- mrolo13/crolo.c Thu Oct 14 03:07:53 1993
- X***************
- X*** 1,5 ****
- X--- 1,7 ----
- X #include <curses.h>
- X #include "roloP.h"
- X+ #include "rolo.h"
- X+ #include "roloc.h"
- X #include "arrows.h"
- X
- X void Cleanup()
- XIndex: mrolo.ad.h
- X*** /dev/null Fri Oct 15 00:29:01 1993
- X--- mrolo13/mrolo.ad.h Mon Oct 11 17:43:08 1993
- X***************
- X*** 0 ****
- X--- 1,44 ----
- X+ "*fontList: -*-helvetica-*-r-*-*-14-*-*-*-*-*-*-*",
- X+ "*addressList*fontList: -misc-fixed-*-r-*-*-14-*-*-*-*-*-*-*",
- X+ "*commentText.rows: 10",
- X+ "*commentText.cols: 80",
- X+ "*filterText.columns: 11",
- X+ "*XmRowColumn*packing: XmPACK_COLUMN",
- X+ "*rowColumn.resizeWidth: True",
- X+ "*rowColumn.width: 500",
- X+ "*showSecondary: True",
- X+ "*sizePrimary: 20",
- X+ "*selectFilter: False",
- X+ "*foreground: black",
- X+ "*background: white",
- X+ "*XmPushButton*foreground: black",
- X+ "*XmPushButton*background: pink",
- X+ "*XmText*foreground: black",
- X+ "*XmText*background: alice blue",
- X+ "*addressList*foreground: black",
- X+ "*addressList*background: honeydew",
- X+ "*quitButton.labelString: Quit",
- X+ "*addCardButton.labelString: Add Card",
- X+ "*clearButton.labelString: Clear Filter",
- X+ "*deleteCardButton.labelString: Delete Card",
- X+ "*pickerButton.labelString: Fields",
- X+ "*okButton.labelString: OK",
- X+ "*cancelButton.labelString: Cancel",
- X+ "*primaryLabel.labelString: Phone",
- X+ "*secondaryLabel.labelString: Phone #2",
- X+ "*nameLabel.labelString: Name",
- X+ "*messageBox.okLabelString: Yes",
- X+ "*messageBox.cancelLabelString: No",
- X+ "*messageBox.helpLabelString: Help",
- X+ "*quitButton.traversalOn: True",
- X+ "*addCardButton.traversalOn: True",
- X+ "*clearButton.traversalOn: True",
- X+ "mrolo*indexElements: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z",
- X+ "*form.leftOffset: 2",
- X+ "*form.rightOffset: 2",
- X+ "*form.topOffset: 2",
- X+ "*form.bottomOffset: 2",
- X+ "*tbutton0.set: True",
- X+ "*tbutton1.set: True",
- X+ "*tbutton2.set: True",
- X+ "*tbutton3.set: True",
- XIndex: mrolo.c
- X*** mrolo13.old/mrolo.c Thu Oct 14 23:52:53 1993
- X--- mrolo13/mrolo.c Thu Oct 14 18:39:16 1993
- X***************
- X*** 9,14 ****
- X--- 9,15 ----
- X /*
- X * REQUIRED MOTIF INCLUDE FILES
- X */
- X+ #include <X11/IntrinsicP.h>
- X #include <Xm/Xm.h>
- X #include <X11/Shell.h>
- X #include <Xm/DialogS.h>
- X***************
- X*** 97,106 ****
- X XtResizeWidget(Shell000,width,height,bwidth);
- X }
- X
- X /* MAIN PROGRAM */
- X main(argc, argv)
- X! int argc;
- X! char **argv;
- X {
- X Arg args[256];
- X int argcnt;
- X--- 98,126 ----
- X XtResizeWidget(Shell000,width,height,bwidth);
- X }
- X
- X+ /* removes leading pathname components */
- X+ static char *clean_up(s)
- X+ char *s;
- X+ {
- X+ char *r;
- X+
- X+ if (s==NULL) return NULL;
- X+ for ( r = s; *r != '\0'; r++ );
- X+ #ifndef VMS
- X+ for ( ; r != s && *r != '/'; r-- );
- X+ if ( *r == '/' ) r++;
- X+ #else
- X+ for ( ; r != s && *r != '.' && *r != ':'; r-- );
- X+ if ( *r == '.' || *r == ':' ) r++;
- X+ #endif
- X+ return r;
- X+ }
- X+
- X /* MAIN PROGRAM */
- X+ int
- X main(argc, argv)
- X! int argc;
- X! char **argv;
- X {
- X Arg args[256];
- X int argcnt;
- X***************
- X*** 111,118 ****
- X XmRegisterConverters();
- X argcnt = 0;
- X XtSetArg(args[argcnt], XmNtitle, "Rolodex"); argcnt++;
- X! Shell000 = XtAppInitialize(&context,APP_NAME,NULL,0,(Cardinal*)&argc,argv,
- X! appDefaults,args,argcnt);
- X SetResources(Shell000);
- X
- X InitRolo(argc,argv,1);
- X--- 131,138 ----
- X XmRegisterConverters();
- X argcnt = 0;
- X XtSetArg(args[argcnt], XmNtitle, "Rolodex"); argcnt++;
- X! Shell000 = XtAppInitialize(&context,clean_up(APP_NAME),NULL,0,
- X! (Cardinal*)&argc,argv,appDefaults,args,argcnt);
- X SetResources(Shell000);
- X
- X InitRolo(argc,argv,1);
- XIndex: mrolo.man
- X*** mrolo13.old/mrolo.man Thu Oct 14 23:52:35 1993
- X--- mrolo13/mrolo.man Thu Oct 14 02:09:02 1993
- X***************
- X*** 4,9 ****
- X--- 4,11 ----
- X .SH SYNOPSIS
- X .B mrolo
- X [
- X+ .B X11-options
- X+ ] [
- X .B -vhs
- X ] [
- X .B -f filename
- XIndex: prolo.c
- X*** mrolo13.old/prolo.c Thu Oct 14 23:52:36 1993
- X--- mrolo13/prolo.c Thu Oct 14 03:04:15 1993
- X***************
- X*** 2,7 ****
- X--- 2,39 ----
- X #include "rolo.h"
- X #include "roloP.h"
- X
- X+ static char *fixit_buf = NULL;
- X+ static int fixit_size = 0;
- X+
- X+ char *fixit(s)
- X+ char *s;
- X+ {
- X+ char *t, *r;
- X+
- X+ if ( s == NULL ) return NULL;
- X+
- X+ if ( fixit_size == 0 ) {
- X+ fixit_size = 1024;
- X+ fixit_buf = (char*)malloc(fixit_size);
- X+ }
- X+
- X+ if ( fixit_size <= strlen(s) * 2 ) {
- X+ fixit_size = strlen(s) * 2 + 1;
- X+ fixit_buf = (char*)realloc(fixit_buf,fixit_size);
- X+ }
- X+
- X+ for ( t = s, r = fixit_buf; *t != '\0'; t++, r++ ) {
- X+ *r = *t;
- X+ if ( *t == '\\' ) {
- X+ r++;
- X+ *r = *t;
- X+ }
- X+ }
- X+ *r = *t;
- X+
- X+ return fixit_buf;
- X+ }
- X+
- X int complines(rr)
- X RoloRec *rr;
- X {
- X***************
- X*** 59,64 ****
- X--- 91,97 ----
- X }
- X }
- X
- X+ int
- X main(argc,argv)
- X int argc;
- X char *argv[];
- X***************
- X*** 154,160 ****
- X
- X printf("\n%% find widest entry\n");
- X for ( rr = RoloList; rr != NULL; rr = rr->next )
- X! if ( rr->on ) printf("(%s) sizestr chmax\n",rr->name);
- X
- X printf("/mw mw fontsize add def\n");
- X
- X--- 187,193 ----
- X
- X printf("\n%% find widest entry\n");
- X for ( rr = RoloList; rr != NULL; rr = rr->next )
- X! if ( rr->on ) printf("(%s) sizestr chmax\n",fixit(rr->name));
- X
- X printf("/mw mw fontsize add def\n");
- X
- X***************
- X*** 161,167 ****
- X printf("\n%% find widest text\n");
- X for ( rr = RoloList; rr != NULL; rr = rr->next ) {
- X if ( ! rr->on ) continue;
- X! text = rr->text;
- X while ( *text != '\0' ) {
- X printf("(");
- X while (*text != '\n' && *text != '\0') putc(*text++,stdout);
- X--- 194,200 ----
- X printf("\n%% find widest text\n");
- X for ( rr = RoloList; rr != NULL; rr = rr->next ) {
- X if ( ! rr->on ) continue;
- X! text = fixit(rr->text);
- X while ( *text != '\0' ) {
- X printf("(");
- X while (*text != '\n' && *text != '\0') putc(*text++,stdout);
- X***************
- X*** 173,179 ****
- X printf("\n%% find widest primary number\n");
- X for ( rr = RoloList; rr != NULL; rr = rr->next ) {
- X if ( ! rr->on ) continue;
- X! printf("(%s) sizestr chmax3\n",rr->number);
- X }
- X
- X printf("/mw3 mw3 fontsize add def\n");
- X--- 206,212 ----
- X printf("\n%% find widest primary number\n");
- X for ( rr = RoloList; rr != NULL; rr = rr->next ) {
- X if ( ! rr->on ) continue;
- X! printf("(%s) sizestr chmax3\n",fixit(rr->number));
- X }
- X
- X printf("/mw3 mw3 fontsize add def\n");
- X***************
- X*** 181,187 ****
- X printf("\n%% find widest secondary number\n");
- X for ( rr = RoloList; rr != NULL; rr = rr->next ) {
- X if ( ! rr->on ) continue;
- X! printf("(%s) sizestr chmax4\n",rr->number2);
- X }
- X
- X printf("mw3 mw4 add mw2 gt { /mw2 mw3 mw4 add def } if\n");
- X--- 214,220 ----
- X printf("\n%% find widest secondary number\n");
- X for ( rr = RoloList; rr != NULL; rr = rr->next ) {
- X if ( ! rr->on ) continue;
- X! printf("(%s) sizestr chmax4\n",fixit(rr->number2));
- X }
- X
- X printf("mw3 mw4 add mw2 gt { /mw2 mw3 mw4 add def } if\n");
- X***************
- X*** 196,205 ****
- X height = complines(rr);
- X printf("%d checkloc\n",height);
- X printf("%d boxit\n",height);
- X! printf("(%s) nshow\n",rr->name);
- X! printf("(%s) pshow1\n",rr->number);
- X! printf("(%s) pshow2\n",rr->number2);
- X! text = rr->text;
- X while ( *text != '\0' ) {
- X printf("(");
- X while (*text != '\n' && *text != '\0') putc(*text++,stdout);
- X--- 229,238 ----
- X height = complines(rr);
- X printf("%d checkloc\n",height);
- X printf("%d boxit\n",height);
- X! printf("(%s) nshow\n",fixit(rr->name));
- X! printf("(%s) pshow1\n",fixit(rr->number));
- X! printf("(%s) pshow2\n",fixit(rr->number2));
- X! text = fixit(rr->text);
- X while ( *text != '\0' ) {
- X printf("(");
- X while (*text != '\n' && *text != '\0') putc(*text++,stdout);
- XIndex: rolo.c
- X*** mrolo13.old/rolo.c Thu Oct 14 23:52:54 1993
- X--- mrolo13/rolo.c Thu Oct 14 19:38:41 1993
- X***************
- X*** 18,23 ****
- X--- 18,24 ----
- X
- X RoloRec *RoloList = NULL;
- X static char *rolofile = NULL;
- X+ static char rolobuf[512];
- X int verbose = 0;
- X int RoloSearch[4] = {1,1,1,1};
- X int selectFilter = 0;
- X***************
- X*** 43,48 ****
- X--- 44,50 ----
- X int i;
- X
- X if ( field == NULL ) return field;
- X+ r = NULL;
- X if ( mystrncasecmp(field,"as of:",6) == 0 )
- X r = field;
- X else {
- X***************
- X*** 49,55 ****
- X r = mystrstrcase(field,"\nas of:");
- X if (r) r++; /* skip nl */
- X }
- X! if (r) {
- X buf = (char*)malloc(strlen(field)+30); /* allocate bigger buffer */
- X /* copy text up to & including AS OF marker into buffer */
- X for ( t = buf, s = field; s != r; t++, s++ )
- X--- 51,57 ----
- X r = mystrstrcase(field,"\nas of:");
- X if (r) r++; /* skip nl */
- X }
- X! if (r!=NULL) {
- X buf = (char*)malloc(strlen(field)+30); /* allocate bigger buffer */
- X /* copy text up to & including AS OF marker into buffer */
- X for ( t = buf, s = field; s != r; t++, s++ )
- X***************
- X*** 68,78 ****
- X while ( *t != '\n' && *t != '\0' ) t++;
- X if (*t=='\n') t++;
- X /* copy rest of buffer */
- X- /*strcat(t,s);*/
- X mystrcpy(t,s);
- X return buf;
- X }
- X- return field;
- X }
- X #endif
- X
- X--- 70,80 ----
- X while ( *t != '\n' && *t != '\0' ) t++;
- X if (*t=='\n') t++;
- X /* copy rest of buffer */
- X mystrcpy(t,s);
- X return buf;
- X+ } else {
- X+ return mystrdup(field);
- X }
- X }
- X #endif
- X
- X***************
- X*** 101,107 ****
- X
- X #ifndef NO_TIME
- X if ( checkfield )
- X! rr->text = CheckField(mystrdup(text));
- X else
- X #endif
- X rr->text = mystrdup(text);
- X--- 103,109 ----
- X
- X #ifndef NO_TIME
- X if ( checkfield )
- X! rr->text = CheckField(text);
- X else
- X #endif
- X rr->text = mystrdup(text);
- X***************
- X*** 142,148 ****
- X rolofile = getenv("HOME");
- X if ( rolofile == NULL ) rolofile = ROLOFILENAME;
- X else {
- X! rolofile = (char*)malloc(512);
- X #ifndef VMS
- X sprintf(rolofile,"%s/%s",getenv("HOME"),ROLOFILENAME);
- X #else
- X--- 144,150 ----
- X rolofile = getenv("HOME");
- X if ( rolofile == NULL ) rolofile = ROLOFILENAME;
- X else {
- X! rolofile = rolobuf;
- X #ifndef VMS
- X sprintf(rolofile,"%s/%s",getenv("HOME"),ROLOFILENAME);
- X #else
- X***************
- X*** 316,322 ****
- X else fputc('\n',f);
- X if ( rr->text ) fprintf(f,"%s",rr->text);
- X /* do new-line check to make xrolo happy */
- X! for ( s = &rr->text[strlen(rr->text)-1]; *s == ' ' || *s == '\t'; s-- );
- X if ( *s != '\n' ) fputc('\n',f);
- X fputc((char)12,f);
- X fputc('\n',f);
- X--- 318,325 ----
- X else fputc('\n',f);
- X if ( rr->text ) fprintf(f,"%s",rr->text);
- X /* do new-line check to make xrolo happy */
- X! for ( s = rr->text; *s != '\0'; s++ );
- X! for ( ; *s == ' ' && *s == '\t' && s != rr->text; s-- );
- X if ( *s != '\n' ) fputc('\n',f);
- X fputc((char)12,f);
- X fputc('\n',f);
- X***************
- X*** 384,389 ****
- X--- 387,393 ----
- X static int AllSpace(s)
- X char *s;
- X {
- X+ if (s==NULL) return 1;
- X for ( ; *s != '\0'; s++)
- X if ( ! isspace(*s) ) return 0;
- X return 1;
- XIndex: rolo.h
- X*** mrolo13.old/rolo.h Thu Oct 14 23:52:29 1993
- X--- mrolo13/rolo.h Thu Oct 14 02:59:09 1993
- X***************
- X*** 11,16 ****
- X--- 11,17 ----
- X void PutListOnScreen();
- X void DeleteRoloCard();
- X void WriteRolo();
- X+ void RoloFilter();
- X char *GetCardName();
- X char *GetNumber();
- X char *GetNumber2();
- XIndex: roloc.h
- X*** /dev/null Fri Oct 15 00:29:01 1993
- X--- mrolo13/roloc.h Thu Oct 14 03:07:17 1993
- X***************
- X*** 0 ****
- X--- 1,7 ----
- X+ #ifndef _ROLOC_H
- X+ #define _ROLOC_H
- X+
- X+ void PutLineOnScreen (/* int ln */);
- X+ void PutListOnScreen (/* void */);
- X+
- X+ #endif
- XIndex: rolox.c
- X*** mrolo13.old/rolox.c Thu Oct 14 23:52:31 1993
- X--- mrolo13/rolox.c Thu Oct 14 03:02:38 1993
- X***************
- X*** 9,14 ****
- X--- 9,15 ----
- X #include "patchlevel.h"
- X #include "rolo.h"
- X #include "roloP.h"
- X+ #include "compat.h"
- X
- X extern Boolean showSecondary;
- X extern int sizePrimary;
- XIndex: xr2mr
- X*** mrolo13.old/xr2mr Thu Oct 14 23:52:32 1993
- X--- mrolo13/xr2mr Tue Oct 12 12:59:11 1993
- X***************
- X*** 1,3 ****
- X #!/bin/sh
- X! sed '1,$s/^####$/\014/g' $1 | tail +2
- X! echo "\014"
- X--- 1,3 ----
- X #!/bin/sh
- X! sed '1,$s/^####$//g' $1 | tail +2
- X! echo ""
- X
- END_OF_FILE
- if test 22685 -ne `wc -c <'mrolo.p2'`; then
- echo shar: \"'mrolo.p2'\" unpacked with wrong size!
- fi
- # end of 'mrolo.p2'
- fi
- echo shar: End of archive 1 \(of 1\).
- cp /dev/null ark1isdone
- MISSING=""
- for I in 1 ; do
- if test ! -f ark${I}isdone ; then
- MISSING="${MISSING} ${I}"
- fi
- done
- if test "${MISSING}" = "" ; then
- echo You have the archive.
- rm -f ark[1-9]isdone
- else
- echo You still must unpack the following archives:
- echo " " ${MISSING}
- fi
- exit 0
- exit 0 # Just in case...
- --
- // chris@Sterling.COM | Send comp.sources.x submissions to:
- \X/ Amiga - The only way to fly! | sources-x@sterling.com
- "It's intuitively obvious to the |
- most casual observer..." | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
-