home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.x
- From: gregor@kafka.saic.com (gregg hanna)
- Subject: v21i043: mrolo - Motif rolodex, Patch01
- Message-ID: <1993Nov9.003809.12874@sparky.sterling.com>
- X-Md4-Signature: 75427f1f7634f42180e72fc86c6fb3d9
- Sender: chris@sparky.sterling.com (Chris Olson)
- Organization: Sterling Software
- Date: Tue, 9 Nov 1993 00:38:09 GMT
- Approved: chris@sterling.com
-
- Submitted-by: gregor@kafka.saic.com (gregg hanna)
- Posting-number: Volume 21, Issue 43
- Archive-name: mrolo/patch01
- Environment: X11, OSF/Motif
- Patch-To: mrolo: Volume 21, Issue 8-10
-
- Thanks to all for reporting bugs and suggestion enhancements.
- This patch does the following:
-
- Fixes boundary conditions in crolo.c which caused core dumps.
-
- Fixes two "as of" bugs: "as of:" didn't work as the first line
- in an entry, and garbage appeared if the line ended w/o a nl.
-
- Adds portability enhancements to Imakefile.
-
- Fixes app-defaults installation to install under correct name
- (mrolo instead of MRolo).
-
- Adds an extern declaration for a previously undeclared value
- that some compilers complained about.
-
- Extends ifdef in crolo to handle OSF/1.
-
- This patch creates a new file "mrolo.ad" which replaces "MRolo.ad".
- The latter may safely be removed.
-
- To apply this patch, simply go to the mrolo13 directory and send
- this message into patch:
-
- patch < thismsg
-
- -gregor
-
- #! /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.p1
- # Wrapped by chris@sparky on Mon Nov 8 18:35:38 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.p1' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'mrolo.p1'\"
- else
- echo shar: Extracting \"'mrolo.p1'\" \(9874 characters\)
- sed "s/^X//" >'mrolo.p1' <<'END_OF_FILE'
- XIndex: patchlevel.h
- XPrereq: 0
- X*** distrib/patchlevel.h Mon Oct 11 16:33:49 1993
- X--- mrolo13/patchlevel.h Mon Oct 11 16:33:05 1993
- X***************
- X*** 1 ****
- X! #define PATCHLEVEL 0
- X--- 1 ----
- X! #define PATCHLEVEL 1
- XIndex: CHANGES
- X*** distrib/CHANGES Mon Oct 11 16:33:39 1993
- X--- mrolo13/CHANGES Mon Oct 11 16:59:47 1993
- X***************
- X*** 56,58 ****
- X--- 56,75 ----
- X Uses argv[0] as the app name, so if you put app-defaults for
- X different names and symlink the application you can get different
- X looks. Especially useful for making non-phone rolo files.
- X+
- X+ Version 1.3 pl 1
- X+
- X+ Fixed boundary conditions in crolo.c which caused core dumps.
- X+
- X+ Fixed two "as of" bugs: "as of:" didn't work as the first line
- X+ in an entry, and garbage appeared if the line ended w/o a nl.
- X+
- X+ Portability enhancements to Imakefile.
- X+
- X+ Fixed app-defaults installation to install under correct name
- X+ (mrolo instead of MRolo).
- X+
- X+ Added an extern declaration for a previously undeclared value
- X+ that only some compilers complained about.
- X+
- X+ Extended ifdefs in crolo to support OSF/1.
- XIndex: Imakefile
- X*** distrib/Imakefile Mon Oct 11 16:33:39 1993
- X--- mrolo13/Imakefile Mon Oct 11 16:51:14 1993
- X***************
- X*** 1,10 ****
- X SRCS = callback.c creation.c mrolo.c rolo.c rolox.c compat.c getopt.c
- X OBJS = callback.o creation.o mrolo.o rolo.o rolox.o compat.o getopt.o
- X! LDLIBS = -lXm $(SYSLIBS)
- X TERMLIBS = -lcurses -ltermcap
- X
- X ComplexProgramTarget(mrolo)
- X! InstallAppDefaults(MRolo)
- X
- X all:: prolo crolo
- X
- X--- 1,10 ----
- X SRCS = callback.c creation.c mrolo.c rolo.c rolox.c compat.c getopt.c
- X OBJS = callback.o creation.o mrolo.o rolo.o rolox.o compat.o getopt.o
- X! LDLIBS = -lXm $(SYSLIBS) $(DEPLIBS)
- X TERMLIBS = -lcurses -ltermcap
- X
- X ComplexProgramTarget(mrolo)
- X! InstallAppDefaults(mrolo)
- X
- X all:: prolo crolo
- X
- 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 mrolo.ad.h
- X
- X InstallProgram(crolo,$(BINDIR))
- X InstallProgram(prolo,$(BINDIR))
- X***************
- X*** 24,33 ****
- X InstallManPage(prolo,$(MANDIR))
- X InstallManPage(xr2mr,$(MANDIR))
- X
- 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--- 24,33 ----
- X InstallManPage(prolo,$(MANDIR))
- X InstallManPage(xr2mr,$(MANDIR))
- X
- 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
- XIndex: Makefile.std
- X*** distrib/Makefile.std Mon Oct 11 16:33:41 1993
- X--- mrolo13/Makefile.std Mon Oct 11 17:03:31 1993
- X***************
- 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! 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--- 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! 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***************
- X*** 56,62 ****
- X cp prolo $(BINDIR)
- X cp xr2mr $(BINDIR)
- X chmod +x $(BINDIR)/xr2mr
- X! cp MRolo.ad $(APPDIR)/MRolo
- X
- X install.man:
- X cp mrolo.man $(MANDIR)/mrolo.$(MANEXT)
- X--- 56,62 ----
- X cp prolo $(BINDIR)
- X cp xr2mr $(BINDIR)
- X chmod +x $(BINDIR)/xr2mr
- X! cp mrolo.ad $(APPDIR)/mrolo
- X
- X install.man:
- X cp mrolo.man $(MANDIR)/mrolo.$(MANEXT)
- XIndex: creation.c
- X*** distrib/creation.c Mon Oct 11 16:33:58 1993
- X--- mrolo13/creation.c Mon Oct 11 14:14:32 1993
- X***************
- X*** 172,177 ****
- X--- 172,178 ----
- X Widget clearButton;
- X Widget button;
- X char *s, *t, c;
- X+ extern int selectFilter;
- X
- X XmRegisterConverters();
- X
- XIndex: crolo.c
- X*** distrib/crolo.c Mon Oct 11 16:33:55 1993
- X--- mrolo13/crolo.c Mon Oct 11 16:30:43 1993
- X***************
- X*** 53,59 ****
- X idlok(listWin,TRUE);
- X cbreak();
- X noecho();
- X! #ifdef SYSV
- X atexit(Cleanup);
- X #else
- X on_exit(Cleanup,NULL);
- X--- 53,59 ----
- X idlok(listWin,TRUE);
- X cbreak();
- X noecho();
- X! #if defined(SYSV) || defined(__osf__)
- X atexit(Cleanup);
- X #else
- X on_exit(Cleanup,NULL);
- X***************
- X*** 227,234 ****
- X PutLineOnScreen(active_line);
- X break;
- X case MY_KEY_DOWN:
- X if ( active_line == top_of_screen + linec - 1 ) {
- X- if ( active_line == NumRoloOn() - 1 ) break;
- X wmove(listWin,0,0);
- X wdeleteln(listWin);
- X top_of_screen++;
- X--- 227,234 ----
- X PutLineOnScreen(active_line);
- X break;
- X case MY_KEY_DOWN:
- X+ if ( active_line == NumRoloOn() - 1 ) break;
- X if ( active_line == top_of_screen + linec - 1 ) {
- X wmove(listWin,0,0);
- X wdeleteln(listWin);
- X top_of_screen++;
- X***************
- X*** 242,248 ****
- X--- 242,250 ----
- X top_of_screen += (linec-1);
- X if ( top_of_screen + linec >= NumRoloOn() ) {
- X active_line = NumRoloOn() - 1;
- X+ if ( active_line < 0 ) active_line = 0;
- X top_of_screen = NumRoloOn() - linec;
- X+ if ( top_of_screen < 0 ) top_of_screen = 0;
- X }
- X PutListOnScreen();
- X break;
- XIndex: mrolo.ad
- X*** /dev/null Mon Oct 11 16:53:18 1993
- X--- mrolo13/mrolo.ad Fri Aug 13 13:09:25 1993
- X***************
- X*** 0 ****
- X--- 1,66 ----
- X+ ! fonts: note that addressList ought to have a fixed width font
- X+ *fontList: -*-helvetica-*-r-*-*-14-*-*-*-*-*-*-*
- X+ *addressList*fontList: -misc-fixed-*-r-*-*-14-*-*-*-*-*-*-*
- X+
- X+ ! default size of the comment box on the card info screen
- X+ *commentText.rows: 10
- X+ *commentText.cols: 80
- X+
- X+ ! size of the filter text field
- X+ *filterText.columns: 11
- X+
- X+ ! these control the way buttons look, if you change to
- X+ ! XmPACK_TIGHT you probably want to make resizeWidth False
- X+ *XmRowColumn*packing: XmPACK_COLUMN
- X+ *rowColumn.resizeWidth: True
- X+ *rowColumn.width: 500
- X+
- X+ ! custom resources, shown here with default values
- X+ *showSecondary: True
- X+ *sizePrimary: 20
- X+ *selectFilter: False
- X+
- X+ ! colors you *might* like
- 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+
- X+ ! labels
- 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+
- X+ ! tranversals
- X+ *quitButton.traversalOn: True
- X+ *addCardButton.traversalOn: True
- X+ *clearButton.traversalOn: True
- X+
- X+ ! indexes on side of screen
- 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+
- X+ ! default spacing
- X+ *form.leftOffset: 2
- X+ *form.rightOffset: 2
- X+ *form.topOffset: 2
- X+ *form.bottomOffset: 2
- X+
- X+ ! Toggle buttons, and thus filter settings.
- X+ *tbutton0.set: True
- X+ *tbutton1.set: True
- X+ *tbutton2.set: True
- X+ *tbutton3.set: True
- XIndex: mrolo.c
- X*** distrib/mrolo.c Mon Oct 11 16:33:47 1993
- X--- mrolo13/mrolo.c Mon Oct 11 17:06:40 1993
- X***************
- X*** 53,59 ****
- X };
- X
- X static char *appDefaults[] = {
- X! #include "MRolo.ad.h"
- X NULL
- X };
- X
- X--- 53,59 ----
- X };
- X
- X static char *appDefaults[] = {
- X! #include "mrolo.ad.h"
- X NULL
- X };
- X
- XIndex: rolo.c
- X*** distrib/rolo.c Mon Oct 11 16:33:56 1993
- X--- mrolo13/rolo.c Mon Oct 11 16:10:16 1993
- X***************
- X*** 43,54 ****
- X int i;
- X
- X if ( field == NULL ) return field;
- X! if ((r=mystrstrcase(field,"\nas of:"))!=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 *t = *s;
- X! for ( i = 0; i < 7; i++, t++, s++ )
- X *t = *s;
- X for ( ; *s == ' ' || *s == '\t'; t++, s++ )
- X *t = *s;
- X--- 43,60 ----
- X int i;
- X
- X if ( field == NULL ) return field;
- X! if ( mystrncasecmp(field,"as of:",6) == 0 )
- X! r = field;
- X! else {
- 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 *t = *s;
- X! for ( i = 0; i < 6; i++, t++, s++ )
- X *t = *s;
- X for ( ; *s == ' ' || *s == '\t'; t++, s++ )
- X *t = *s;
- X***************
- X*** 58,68 ****
- X sprintf(t,"%s",ctime(&time_val));
- X /* skip to eol in old & new string (i.e. skip old AS OF line) */
- X while ( *s != '\n' && *s != '\0' ) s++;
- X! s++;
- X while ( *t != '\n' && *t != '\0' ) t++;
- X! t++;
- X /* copy rest of buffer */
- X! strcat(t,s);
- X return buf;
- X }
- X return field;
- X--- 64,75 ----
- X sprintf(t,"%s",ctime(&time_val));
- X /* skip to eol in old & new string (i.e. skip old AS OF line) */
- X while ( *s != '\n' && *s != '\0' ) s++;
- X! if (*s=='\n') s++;
- 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
- END_OF_FILE
- if test 9874 -ne `wc -c <'mrolo.p1'`; then
- echo shar: \"'mrolo.p1'\" unpacked with wrong size!
- fi
- # end of 'mrolo.p1'
- 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+
-