home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume21 / mrolo / patch01 < prev    next >
Encoding:
Text File  |  1993-11-08  |  12.7 KB  |  450 lines

  1. Newsgroups: comp.sources.x
  2. From: gregor@kafka.saic.com (gregg hanna)
  3. Subject: v21i043:  mrolo - Motif rolodex, Patch01
  4. Message-ID: <1993Nov9.003809.12874@sparky.sterling.com>
  5. X-Md4-Signature: 75427f1f7634f42180e72fc86c6fb3d9
  6. Sender: chris@sparky.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Tue, 9 Nov 1993 00:38:09 GMT
  9. Approved: chris@sterling.com
  10.  
  11. Submitted-by: gregor@kafka.saic.com (gregg hanna)
  12. Posting-number: Volume 21, Issue 43
  13. Archive-name: mrolo/patch01
  14. Environment: X11, OSF/Motif
  15. Patch-To: mrolo: Volume 21, Issue 8-10
  16.  
  17. Thanks to all for reporting bugs and suggestion enhancements.
  18. This patch does the following:
  19.  
  20.   Fixes boundary conditions in crolo.c which caused core dumps.
  21.  
  22.   Fixes two "as of" bugs:  "as of:" didn't work as the first line
  23.   in an entry, and garbage appeared if the line ended w/o a nl.
  24.  
  25.   Adds portability enhancements to Imakefile.
  26.  
  27.   Fixes app-defaults installation to install under correct name
  28.   (mrolo instead of MRolo).
  29.  
  30.   Adds an extern declaration for a previously undeclared value
  31.   that some compilers complained about.
  32.  
  33.   Extends ifdef in crolo to handle OSF/1.
  34.  
  35. This patch creates a new file "mrolo.ad" which replaces "MRolo.ad".
  36. The latter may safely be removed.
  37.  
  38. To apply this patch, simply go to the mrolo13 directory and send
  39. this message into patch:
  40.  
  41.     patch < thismsg
  42.  
  43.  -gregor
  44.  
  45. #! /bin/sh
  46. # This is a shell archive.  Remove anything before this line, then feed it
  47. # into a shell via "sh file" or similar.  To overwrite existing files,
  48. # type "sh file -c".
  49. # Contents:  mrolo.p1
  50. # Wrapped by chris@sparky on Mon Nov  8 18:35:38 1993
  51. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
  52. echo If this archive is complete, you will see the following message:
  53. echo '          "shar: End of archive 1 (of 1)."'
  54. if test -f 'mrolo.p1' -a "${1}" != "-c" ; then 
  55.   echo shar: Will not clobber existing file \"'mrolo.p1'\"
  56. else
  57.   echo shar: Extracting \"'mrolo.p1'\" \(9874 characters\)
  58.   sed "s/^X//" >'mrolo.p1' <<'END_OF_FILE'
  59. XIndex: patchlevel.h
  60. XPrereq: 0
  61. X*** distrib/patchlevel.h    Mon Oct 11 16:33:49 1993
  62. X--- mrolo13/patchlevel.h    Mon Oct 11 16:33:05 1993
  63. X***************
  64. X*** 1 ****
  65. X! #define PATCHLEVEL 0
  66. X--- 1 ----
  67. X! #define PATCHLEVEL 1
  68. XIndex: CHANGES
  69. X*** distrib/CHANGES    Mon Oct 11 16:33:39 1993
  70. X--- mrolo13/CHANGES    Mon Oct 11 16:59:47 1993
  71. X***************
  72. X*** 56,58 ****
  73. X--- 56,75 ----
  74. X    Uses argv[0] as the app name, so if you put app-defaults for
  75. X    different names and symlink the application you can get different
  76. X    looks.  Especially useful for making non-phone rolo files.
  77. X+ 
  78. X+ Version 1.3 pl 1
  79. X+ 
  80. X+   Fixed boundary conditions in crolo.c which caused core dumps.
  81. X+ 
  82. X+   Fixed two "as of" bugs:  "as of:" didn't work as the first line
  83. X+   in an entry, and garbage appeared if the line ended w/o a nl.
  84. X+ 
  85. X+   Portability enhancements to Imakefile.
  86. X+ 
  87. X+   Fixed app-defaults installation to install under correct name
  88. X+   (mrolo instead of MRolo).
  89. X+ 
  90. X+   Added an extern declaration for a previously undeclared value
  91. X+   that only some compilers complained about.
  92. X+ 
  93. X+   Extended ifdefs in crolo to support OSF/1.
  94. XIndex: Imakefile
  95. X*** distrib/Imakefile    Mon Oct 11 16:33:39 1993
  96. X--- mrolo13/Imakefile    Mon Oct 11 16:51:14 1993
  97. X***************
  98. X*** 1,10 ****
  99. X  SRCS = callback.c creation.c mrolo.c rolo.c rolox.c compat.c getopt.c
  100. X  OBJS = callback.o creation.o mrolo.o rolo.o rolox.o compat.o getopt.o
  101. X! LDLIBS = -lXm $(SYSLIBS)
  102. X  TERMLIBS = -lcurses -ltermcap
  103. X  
  104. X  ComplexProgramTarget(mrolo)
  105. X! InstallAppDefaults(MRolo)
  106. X  
  107. X  all:: prolo crolo
  108. X  
  109. X--- 1,10 ----
  110. X  SRCS = callback.c creation.c mrolo.c rolo.c rolox.c compat.c getopt.c
  111. X  OBJS = callback.o creation.o mrolo.o rolo.o rolox.o compat.o getopt.o
  112. X! LDLIBS = -lXm $(SYSLIBS) $(DEPLIBS)
  113. X  TERMLIBS = -lcurses -ltermcap
  114. X  
  115. X  ComplexProgramTarget(mrolo)
  116. X! InstallAppDefaults(mrolo)
  117. X  
  118. X  all:: prolo crolo
  119. X  
  120. X***************
  121. X*** 15,21 ****
  122. X      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o crolo crolo.c rolo.o roloc.o arrows.o compat.o getopt.o $(TERMLIBS)
  123. X  
  124. X  clean::
  125. X!     $(RM) prolo crolo rolo.samp- xdef MRolo.ad.h
  126. X  
  127. X  InstallProgram(crolo,$(BINDIR))
  128. X  InstallProgram(prolo,$(BINDIR))
  129. X--- 15,21 ----
  130. X      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o crolo crolo.c rolo.o roloc.o arrows.o compat.o getopt.o $(TERMLIBS)
  131. X  
  132. X  clean::
  133. X!     $(RM) prolo crolo rolo.samp- xdef mrolo.ad.h
  134. X  
  135. X  InstallProgram(crolo,$(BINDIR))
  136. X  InstallProgram(prolo,$(BINDIR))
  137. X***************
  138. X*** 24,33 ****
  139. X  InstallManPage(prolo,$(MANDIR))
  140. X  InstallManPage(xr2mr,$(MANDIR))
  141. X  
  142. X! xdef: MRolo.ad
  143. X!     sed -e '1,$$s/^#/!/g' -e '1,$$s/^*/mrolo*/g' MRolo.ad > xdef
  144. X  
  145. X! MRolo.ad.h: MRolo.ad
  146. X!       ./ad2c MRolo.ad > MRolo.ad.h
  147. X  
  148. X! mrolo.o: MRolo.ad.h
  149. X--- 24,33 ----
  150. X  InstallManPage(prolo,$(MANDIR))
  151. X  InstallManPage(xr2mr,$(MANDIR))
  152. X  
  153. X! xdef: mrolo.ad
  154. X!     sed -e '1,$$s/^#/!/g' -e '1,$$s/^*/mrolo*/g' mrolo.ad > xdef
  155. X  
  156. X! mrolo.ad.h: mrolo.ad
  157. X!       ./ad2c mrolo.ad > mrolo.ad.h
  158. X  
  159. X! mrolo.o: mrolo.ad.h
  160. XIndex: Makefile.std
  161. X*** distrib/Makefile.std    Mon Oct 11 16:33:41 1993
  162. X--- mrolo13/Makefile.std    Mon Oct 11 17:03:31 1993
  163. X***************
  164. X*** 45,54 ****
  165. X  crolo: crolo.c rolo.o roloc.o compat.o arrows.o getopt.o
  166. X      $(LINK.c) -o crolo crolo.c rolo.o roloc.o compat.o arrows.o getopt.o $(TERMLIBS)
  167. X  
  168. X! MRolo.ad.h: MRolo.ad
  169. X!     ./ad2c MRolo.ad > MRolo.ad.h
  170. X  
  171. X! mrolo.o: MRolo.ad.h
  172. X  
  173. X  
  174. X  install: all
  175. X--- 45,54 ----
  176. X  crolo: crolo.c rolo.o roloc.o compat.o arrows.o getopt.o
  177. X      $(LINK.c) -o crolo crolo.c rolo.o roloc.o compat.o arrows.o getopt.o $(TERMLIBS)
  178. X  
  179. X! mrolo.ad.h: mrolo.ad
  180. X!     ./ad2c mrolo.ad > mrolo.ad.h
  181. X  
  182. X! mrolo.o: mrolo.ad.h
  183. X  
  184. X  
  185. X  install: all
  186. X***************
  187. X*** 56,62 ****
  188. X      cp prolo $(BINDIR)
  189. X      cp xr2mr $(BINDIR)
  190. X      chmod +x $(BINDIR)/xr2mr
  191. X!     cp MRolo.ad $(APPDIR)/MRolo
  192. X  
  193. X  install.man:
  194. X      cp mrolo.man $(MANDIR)/mrolo.$(MANEXT)
  195. X--- 56,62 ----
  196. X      cp prolo $(BINDIR)
  197. X      cp xr2mr $(BINDIR)
  198. X      chmod +x $(BINDIR)/xr2mr
  199. X!     cp mrolo.ad $(APPDIR)/mrolo
  200. X  
  201. X  install.man:
  202. X      cp mrolo.man $(MANDIR)/mrolo.$(MANEXT)
  203. XIndex: creation.c
  204. X*** distrib/creation.c    Mon Oct 11 16:33:58 1993
  205. X--- mrolo13/creation.c    Mon Oct 11 14:14:32 1993
  206. X***************
  207. X*** 172,177 ****
  208. X--- 172,178 ----
  209. X      Widget    clearButton;
  210. X      Widget    button;
  211. X      char        *s, *t, c;
  212. X+     extern int selectFilter;
  213. X  
  214. X      XmRegisterConverters();
  215. X   
  216. XIndex: crolo.c
  217. X*** distrib/crolo.c    Mon Oct 11 16:33:55 1993
  218. X--- mrolo13/crolo.c    Mon Oct 11 16:30:43 1993
  219. X***************
  220. X*** 53,59 ****
  221. X    idlok(listWin,TRUE);
  222. X    cbreak();
  223. X    noecho();
  224. X! #ifdef SYSV
  225. X    atexit(Cleanup);
  226. X  #else
  227. X    on_exit(Cleanup,NULL);
  228. X--- 53,59 ----
  229. X    idlok(listWin,TRUE);
  230. X    cbreak();
  231. X    noecho();
  232. X! #if defined(SYSV) || defined(__osf__)
  233. X    atexit(Cleanup);
  234. X  #else
  235. X    on_exit(Cleanup,NULL);
  236. X***************
  237. X*** 227,234 ****
  238. X      PutLineOnScreen(active_line);
  239. X      break;
  240. X    case MY_KEY_DOWN:
  241. X      if ( active_line == top_of_screen + linec - 1 ) {
  242. X-       if ( active_line == NumRoloOn() - 1 ) break;
  243. X        wmove(listWin,0,0);
  244. X        wdeleteln(listWin);
  245. X        top_of_screen++;
  246. X--- 227,234 ----
  247. X      PutLineOnScreen(active_line);
  248. X      break;
  249. X    case MY_KEY_DOWN:
  250. X+     if ( active_line == NumRoloOn() - 1 ) break;
  251. X      if ( active_line == top_of_screen + linec - 1 ) {
  252. X        wmove(listWin,0,0);
  253. X        wdeleteln(listWin);
  254. X        top_of_screen++;
  255. X***************
  256. X*** 242,248 ****
  257. X--- 242,250 ----
  258. X      top_of_screen += (linec-1);
  259. X      if ( top_of_screen + linec >= NumRoloOn() ) {
  260. X        active_line = NumRoloOn() - 1;
  261. X+       if ( active_line < 0 ) active_line = 0;
  262. X        top_of_screen = NumRoloOn() - linec;
  263. X+       if ( top_of_screen < 0 ) top_of_screen = 0;
  264. X      }
  265. X      PutListOnScreen();
  266. X      break;
  267. XIndex: mrolo.ad
  268. X*** /dev/null    Mon Oct 11 16:53:18 1993
  269. X--- mrolo13/mrolo.ad    Fri Aug 13 13:09:25 1993
  270. X***************
  271. X*** 0 ****
  272. X--- 1,66 ----
  273. X+ ! fonts:  note that addressList ought to have a fixed width font
  274. X+ *fontList: -*-helvetica-*-r-*-*-14-*-*-*-*-*-*-*
  275. X+ *addressList*fontList: -misc-fixed-*-r-*-*-14-*-*-*-*-*-*-*
  276. X+ 
  277. X+ ! default size of the comment box on the card info screen
  278. X+ *commentText.rows: 10
  279. X+ *commentText.cols: 80
  280. X+ 
  281. X+ ! size of the filter text field
  282. X+ *filterText.columns:    11
  283. X+ 
  284. X+ ! these control the way buttons look, if you change to
  285. X+ ! XmPACK_TIGHT you probably want to make resizeWidth False
  286. X+ *XmRowColumn*packing:    XmPACK_COLUMN
  287. X+ *rowColumn.resizeWidth:    True
  288. X+ *rowColumn.width:    500
  289. X+ 
  290. X+ ! custom resources, shown here with default values
  291. X+ *showSecondary:    True
  292. X+ *sizePrimary:    20
  293. X+ *selectFilter:    False
  294. X+ 
  295. X+ ! colors you *might* like
  296. X+ *foreground:    black
  297. X+ *background:    white
  298. X+ *XmPushButton*foreground:    black
  299. X+ *XmPushButton*background:    pink
  300. X+ *XmText*foreground:    black
  301. X+ *XmText*background:    alice blue
  302. X+ *addressList*foreground:    black
  303. X+ *addressList*background:    honeydew
  304. X+ 
  305. X+ ! labels
  306. X+ *quitButton.labelString:    Quit
  307. X+ *addCardButton.labelString:    Add Card
  308. X+ *clearButton.labelString:    Clear Filter
  309. X+ *deleteCardButton.labelString:    Delete Card
  310. X+ *pickerButton.labelString:    Fields
  311. X+ *okButton.labelString:        OK
  312. X+ *cancelButton.labelString:    Cancel
  313. X+ *primaryLabel.labelString:    Phone
  314. X+ *secondaryLabel.labelString:    Phone #2
  315. X+ *nameLabel.labelString:        Name
  316. X+ *messageBox.okLabelString:    Yes
  317. X+ *messageBox.cancelLabelString:    No
  318. X+ *messageBox.helpLabelString:    Help
  319. X+ 
  320. X+ ! tranversals
  321. X+ *quitButton.traversalOn:    True
  322. X+ *addCardButton.traversalOn:    True
  323. X+ *clearButton.traversalOn:    True
  324. X+ 
  325. X+ ! indexes on side of screen
  326. 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
  327. X+ 
  328. X+ ! default spacing
  329. X+ *form.leftOffset:    2
  330. X+ *form.rightOffset:    2
  331. X+ *form.topOffset:    2
  332. X+ *form.bottomOffset:    2
  333. X+ 
  334. X+ ! Toggle buttons, and thus filter settings.
  335. X+ *tbutton0.set:    True
  336. X+ *tbutton1.set:    True
  337. X+ *tbutton2.set:    True
  338. X+ *tbutton3.set:    True
  339. XIndex: mrolo.c
  340. X*** distrib/mrolo.c    Mon Oct 11 16:33:47 1993
  341. X--- mrolo13/mrolo.c    Mon Oct 11 17:06:40 1993
  342. X***************
  343. X*** 53,59 ****
  344. X  };
  345. X  
  346. X  static char *appDefaults[] = {
  347. X! #include "MRolo.ad.h"
  348. X        NULL
  349. X  };
  350. X  
  351. X--- 53,59 ----
  352. X  };
  353. X  
  354. X  static char *appDefaults[] = {
  355. X! #include "mrolo.ad.h"
  356. X        NULL
  357. X  };
  358. X  
  359. XIndex: rolo.c
  360. X*** distrib/rolo.c    Mon Oct 11 16:33:56 1993
  361. X--- mrolo13/rolo.c    Mon Oct 11 16:10:16 1993
  362. X***************
  363. X*** 43,54 ****
  364. X    int i;
  365. X  
  366. X    if ( field == NULL ) return field;
  367. X!   if ((r=mystrstrcase(field,"\nas of:"))!=NULL) {
  368. X      buf = (char*)malloc(strlen(field)+30);  /* allocate bigger buffer */
  369. X      /* copy text up to & including AS OF marker into buffer */
  370. X      for ( t = buf, s = field; s != r; t++, s++ )
  371. X        *t = *s;
  372. X!     for ( i = 0; i < 7; i++, t++, s++ )
  373. X        *t = *s;
  374. X      for ( ; *s == ' ' || *s == '\t'; t++, s++ )
  375. X        *t = *s;
  376. X--- 43,60 ----
  377. X    int i;
  378. X  
  379. X    if ( field == NULL ) return field;
  380. X!   if ( mystrncasecmp(field,"as of:",6) == 0 )
  381. X!     r = field;
  382. X!   else {
  383. X!     r = mystrstrcase(field,"\nas of:");
  384. X!     if (r) r++; /* skip nl */
  385. X!   }
  386. X!   if (r) {
  387. X      buf = (char*)malloc(strlen(field)+30);  /* allocate bigger buffer */
  388. X      /* copy text up to & including AS OF marker into buffer */
  389. X      for ( t = buf, s = field; s != r; t++, s++ )
  390. X        *t = *s;
  391. X!     for ( i = 0; i < 6; i++, t++, s++ )
  392. X        *t = *s;
  393. X      for ( ; *s == ' ' || *s == '\t'; t++, s++ )
  394. X        *t = *s;
  395. X***************
  396. X*** 58,68 ****
  397. X      sprintf(t,"%s",ctime(&time_val));
  398. X      /* skip to eol in old & new string (i.e. skip old AS OF line) */
  399. X      while ( *s != '\n' && *s != '\0' ) s++;
  400. X!     s++;
  401. X      while ( *t != '\n' && *t != '\0' ) t++;
  402. X!     t++;
  403. X      /* copy rest of buffer */
  404. X!     strcat(t,s);
  405. X      return buf;
  406. X    }
  407. X    return field;
  408. X--- 64,75 ----
  409. X      sprintf(t,"%s",ctime(&time_val));
  410. X      /* skip to eol in old & new string (i.e. skip old AS OF line) */
  411. X      while ( *s != '\n' && *s != '\0' ) s++;
  412. X!     if (*s=='\n') s++;
  413. X      while ( *t != '\n' && *t != '\0' ) t++;
  414. X!     if (*t=='\n') t++;
  415. X      /* copy rest of buffer */
  416. X!     /*strcat(t,s);*/
  417. X!     mystrcpy(t,s);
  418. X      return buf;
  419. X    }
  420. X    return field;
  421. X
  422. END_OF_FILE
  423.   if test 9874 -ne `wc -c <'mrolo.p1'`; then
  424.     echo shar: \"'mrolo.p1'\" unpacked with wrong size!
  425.   fi
  426.   # end of 'mrolo.p1'
  427. fi
  428. echo shar: End of archive 1 \(of 1\).
  429. cp /dev/null ark1isdone
  430. MISSING=""
  431. for I in 1 ; do
  432.     if test ! -f ark${I}isdone ; then
  433.     MISSING="${MISSING} ${I}"
  434.     fi
  435. done
  436. if test "${MISSING}" = "" ; then
  437.     echo You have the archive.
  438.     rm -f ark[1-9]isdone
  439. else
  440.     echo You still must unpack the following archives:
  441.     echo "        " ${MISSING}
  442. fi
  443. exit 0
  444. exit 0 # Just in case...
  445. -- 
  446.   // chris@Sterling.COM           | Send comp.sources.x submissions to:
  447. \X/  Amiga - The only way to fly! |    sources-x@sterling.com
  448.  "It's intuitively obvious to the |
  449.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  450.