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

  1. Newsgroups: comp.sources.x
  2. From: gregor@kafka.saic.com (gregg hanna)
  3. Subject: v21i044:  mrolo - Motif rolodex, Patch02
  4. Message-ID: <1993Nov23.161734.14714@sparky.sterling.com>
  5. X-Md4-Signature: 7d595206e4ffecddc6f8a80ac3d05752
  6. Sender: chris@sparky.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Tue, 23 Nov 1993 16:17:34 GMT
  9. Approved: chris@sterling.com
  10.  
  11. Submitted-by: gregor@kafka.saic.com (gregg hanna)
  12. Posting-number: Volume 21, Issue 44
  13. Archive-name: mrolo/patch02
  14. Environment: X11, OSF/Motif
  15. Patch-To: mrolo: Volume 21, Issue 8-10
  16.  
  17. Second patch for
  18.   v21i008-v21i010 mrolo version 1.3 pl 0 + first patch
  19.  
  20. Version 1.3 pl 2
  21.  
  22.   Fixed potential NULL dereference in AllSpace().
  23.  
  24.   Added crolo and crolo.1 to install.man target in Makefile.std.
  25.  
  26.   Fixed makefiles to use new lower-case app-default filename,
  27.   repaired minor Imakefile problem (tabs vs. spaces).
  28.  
  29.   Improved app-default feature by stripping initial pathname
  30.   components.
  31.  
  32.   prolo now quotes back-slashes so PostScript will print them.
  33.  
  34.   Updated mrolo.man to reflect X11-option handling.
  35.  
  36.   Cleaned up the code and repaired some memory leaks, fixed
  37.   bad memory reference in rolo.c:WriteRolo().
  38.  
  39.   Fixed prolo bug:  didn't always clear stack of arguments
  40.   in tshow, lead to stack overflows.
  41.  
  42. -gregor
  43.  
  44. --------snip------X----------snip--------------X-------snip-----------
  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.p2
  50. # Wrapped by chris@sparky on Tue Nov 23 10:13:12 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.p2' -a "${1}" != "-c" ; then 
  55.   echo shar: Will not clobber existing file \"'mrolo.p2'\"
  56. else
  57.   echo shar: Extracting \"'mrolo.p2'\" \(22685 characters\)
  58.   sed "s/^X//" >'mrolo.p2' <<'END_OF_FILE'
  59. X
  60. X# Please remove the following files before applying this patch.
  61. X# (You can feed this patch to 'sh' to do so.)
  62. X
  63. Xrm -f MRolo.ad
  64. Xrm -f ad2c
  65. Xexit
  66. X
  67. XIndex: patchlevel.h
  68. XPrereq: 1
  69. X*** mrolo13.old/patchlevel.h    Thu Oct 14 23:52:51 1993
  70. X--- mrolo13/patchlevel.h    Mon Oct 11 17:49:39 1993
  71. X***************
  72. X*** 1 ****
  73. X! #define PATCHLEVEL 1
  74. X--- 1 ----
  75. X! #define PATCHLEVEL 2
  76. XIndex: CHANGES
  77. X*** mrolo13.old/CHANGES    Thu Oct 14 23:52:51 1993
  78. X--- mrolo13/CHANGES    Fri Oct 15 00:28:03 1993
  79. X***************
  80. X*** 73,75 ****
  81. X--- 73,97 ----
  82. X    that only some compilers complained about.
  83. X  
  84. X    Extended ifdefs in crolo to support OSF/1.
  85. X+ 
  86. X+ Version 1.3 pl 2
  87. X+ 
  88. X+   Fixed potential NULL dereference in AllSpace().
  89. X+ 
  90. X+   Added crolo and crolo.1 to install.man target in Makefile.std.
  91. X+ 
  92. X+   Fixed makefiles to use new lower-case app-default filename,
  93. X+   repaired minor Imakefile problem (tabs vs. spaces).
  94. X+ 
  95. X+   Improved app-default feature by stripping initial pathname
  96. X+   components.
  97. X+ 
  98. X+   prolo now quotes back-slashes so PostScript will print them.
  99. X+ 
  100. X+   Updated mrolo.man to reflect X11-option handling.
  101. X+ 
  102. X+   Cleaned up the code and repaired some memory leaks, fixed
  103. X+   bad memory reference in rolo.c:WriteRolo().
  104. X+ 
  105. X+   Fixed prolo bug:  didn't always clear stack of arguments
  106. X+   in tshow, lead to stack overflows.
  107. XIndex: Imakefile
  108. X*** mrolo13.old/Imakefile    Thu Oct 14 23:52:51 1993
  109. X--- mrolo13/Imakefile    Thu Oct 14 02:49:11 1993
  110. X***************
  111. X*** 15,21 ****
  112. X      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o crolo crolo.c rolo.o roloc.o arrows.o compat.o getopt.o $(TERMLIBS)
  113. X  
  114. X  clean::
  115. X!     $(RM) prolo crolo rolo.samp- xdef mrolo.ad.h
  116. X  
  117. X  InstallProgram(crolo,$(BINDIR))
  118. X  InstallProgram(prolo,$(BINDIR))
  119. X--- 15,21 ----
  120. X      $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o crolo crolo.c rolo.o roloc.o arrows.o compat.o getopt.o $(TERMLIBS)
  121. X  
  122. X  clean::
  123. X!     $(RM) prolo crolo rolo.samp- xdef
  124. X  
  125. X  InstallProgram(crolo,$(BINDIR))
  126. X  InstallProgram(prolo,$(BINDIR))
  127. X***************
  128. X*** 27,33 ****
  129. X  xdef: mrolo.ad
  130. X      sed -e '1,$$s/^#/!/g' -e '1,$$s/^*/mrolo*/g' mrolo.ad > xdef
  131. X  
  132. X- mrolo.ad.h: mrolo.ad
  133. X-       ./ad2c mrolo.ad > mrolo.ad.h
  134. X- 
  135. X- mrolo.o: mrolo.ad.h
  136. X--- 27,29 ----
  137. XIndex: MANIFEST
  138. X*** mrolo13.old/MANIFEST    Thu Oct 14 23:52:19 1993
  139. X--- mrolo13/MANIFEST    Fri Oct 15 00:33:22 1993
  140. X***************
  141. X*** 3,12 ****
  142. X   CHANGES                    1        change file
  143. X   Imakefile                  1        template for imake
  144. X   MANIFEST                   1        this file
  145. X-  MRolo.ad                   1        application defaults
  146. X   Makefile.std               1        non-imake makefile
  147. X   README                     1        read this first
  148. X-  ad2c                       1        converts AD file to .h
  149. X   arrows.c                   1        handles arrows under BSD curses
  150. X   arrows.h                   1        handles arrows under BSD curses
  151. X   callback.c                 1        X callbacks for mrolo
  152. X--- 3,10 ----
  153. X***************
  154. X*** 13,35 ****
  155. X   compat.c                   1        compatibility functions
  156. X   compat.h                   1        compatibility function headers
  157. X   creation.c                 3        X window creation for mrolo
  158. X!  crolo.c                    1        curses rolo main program
  159. X   crolo.man                  1        curses rolo man page
  160. X   getopt.c                   1        portable getopt(3)
  161. X   mrolo.bm                   1        bitmap for mrolo
  162. X   mrolo.c                    1        Motif rolo main program
  163. X   mrolo.man                  2        Motif rolo man page
  164. X   myregexp.h                 1        portable regexp
  165. X!  patchlevel.h               1        patchlevel file
  166. X   prolo.c                    2        rolo printer main program
  167. X   prolo.man                  1        rolo printer man page
  168. X   rolo.c                     2        rolo functions (used by *rolo)
  169. X   rolo.h                     1        headers for rolo functions
  170. X-  sample.Z.uu                2        sample rolo file (compressed/uuencoded)
  171. X   roloP.h                    1        private header for rolo.c
  172. X   roloc.c                    1        curses rolo functions
  173. X   rolox.c                    1        X windows rolo functions
  174. X   rolox.h                    1        headers for X windows rolo functions
  175. X   xr2mr                      1        converter from xrolodex file to rolo file
  176. X   xr2mr.man                  1        manual page for converter
  177. X  
  178. X--- 11,36 ----
  179. X   compat.c                   1        compatibility functions
  180. X   compat.h                   1        compatibility function headers
  181. X   creation.c                 3        X window creation for mrolo
  182. X!  crolo.c                    2        curses rolo main program
  183. X   crolo.man                  1        curses rolo man page
  184. X   getopt.c                   1        portable getopt(3)
  185. X+  mrolo.ad                   1        application defaults
  186. X+  mrolo.ad.h                 1        application defaults (c version)
  187. X   mrolo.bm                   1        bitmap for mrolo
  188. X   mrolo.c                    1        Motif rolo main program
  189. X   mrolo.man                  2        Motif rolo man page
  190. X   myregexp.h                 1        portable regexp
  191. X!  patchlevel.h               1        current patch state
  192. X   prolo.c                    2        rolo printer main program
  193. X   prolo.man                  1        rolo printer man page
  194. X   rolo.c                     2        rolo functions (used by *rolo)
  195. X   rolo.h                     1        headers for rolo functions
  196. X   roloP.h                    1        private header for rolo.c
  197. X   roloc.c                    1        curses rolo functions
  198. X+  roloc.h                    1        curses rolo functions headers
  199. X   rolox.c                    1        X windows rolo functions
  200. X   rolox.h                    1        headers for X windows rolo functions
  201. X+  sample.Z.uu                2        sample rolo file (compressed/uuencoded)
  202. X   xr2mr                      1        converter from xrolodex file to rolo file
  203. X   xr2mr.man                  1        manual page for converter
  204. X  
  205. XIndex: Makefile.std
  206. X*** mrolo13.old/Makefile.std    Thu Oct 14 23:52:52 1993
  207. X--- mrolo13/Makefile.std    Thu Oct 14 02:49:18 1993
  208. X***************
  209. X*** 2,8 ****
  210. X  # HP/UX users:  use -DUSE_REGCOMP -DSYSV, LDFLAGS and INCLUDES
  211. X  # everyone else:  read through the makefile
  212. X  
  213. X! RM = /bin/rm
  214. X  BINDIR = /usr/bin/X11
  215. X  APPDIR = /usr/lib/X11/app-defaults
  216. X  MANDIR = /usr/man/mann
  217. X--- 2,8 ----
  218. X  # HP/UX users:  use -DUSE_REGCOMP -DSYSV, LDFLAGS and INCLUDES
  219. X  # everyone else:  read through the makefile
  220. X  
  221. X! RM = /bin/rm -f
  222. X  BINDIR = /usr/bin/X11
  223. X  APPDIR = /usr/lib/X11/app-defaults
  224. X  MANDIR = /usr/man/mann
  225. X***************
  226. X*** 45,59 ****
  227. X  crolo: crolo.c rolo.o roloc.o compat.o arrows.o getopt.o
  228. X      $(LINK.c) -o crolo crolo.c rolo.o roloc.o compat.o arrows.o getopt.o $(TERMLIBS)
  229. X  
  230. X- mrolo.ad.h: mrolo.ad
  231. X-     ./ad2c mrolo.ad > mrolo.ad.h
  232. X- 
  233. X- mrolo.o: mrolo.ad.h
  234. X- 
  235. X- 
  236. X  install: all
  237. X      cp mrolo $(BINDIR)
  238. X      cp prolo $(BINDIR)
  239. X      cp xr2mr $(BINDIR)
  240. X      chmod +x $(BINDIR)/xr2mr
  241. X      cp mrolo.ad $(APPDIR)/mrolo
  242. X--- 45,54 ----
  243. X  crolo: crolo.c rolo.o roloc.o compat.o arrows.o getopt.o
  244. X      $(LINK.c) -o crolo crolo.c rolo.o roloc.o compat.o arrows.o getopt.o $(TERMLIBS)
  245. X  
  246. X  install: all
  247. X      cp mrolo $(BINDIR)
  248. X      cp prolo $(BINDIR)
  249. X+     cp crolo $(BINDIR)
  250. X      cp xr2mr $(BINDIR)
  251. X      chmod +x $(BINDIR)/xr2mr
  252. X      cp mrolo.ad $(APPDIR)/mrolo
  253. X***************
  254. X*** 61,66 ****
  255. X--- 56,62 ----
  256. X  install.man:
  257. X      cp mrolo.man $(MANDIR)/mrolo.$(MANEXT)
  258. X      cp prolo.man $(MANDIR)/prolo.$(MANEXT)
  259. X+     cp crolo.man $(MANDIR)/prolo.$(MANEXT)
  260. X      cp xr2mr.man $(MANDIR)/xr2mr.$(MANEXT)
  261. X  
  262. X  clean:
  263. XIndex: README
  264. X*** mrolo13.old/README    Thu Oct 14 23:52:21 1993
  265. X--- mrolo13/README    Thu Oct 14 02:45:42 1993
  266. X***************
  267. X*** 98,103 ****
  268. X--- 98,104 ----
  269. X    AT&T and Rich Salz and Jim for the PD getopt(3).
  270. X    Everyone who generously offered their suggestions.
  271. X  
  272. X+ 
  273. X  Copyright 1993 by gregg hanna.  Permission is granted to use,
  274. X  modify, and distribute this program.  Basically do anything
  275. X  you want with it, but if you want to use it or any part of it
  276. XIndex: arrows.c
  277. X*** mrolo13.old/arrows.c    Thu Oct 14 23:52:22 1993
  278. X--- mrolo13/arrows.c    Thu Oct 14 03:05:10 1993
  279. X***************
  280. X*** 22,27 ****
  281. X--- 22,28 ----
  282. X   * curses uses the global variable ttytype to specify what it
  283. X   * thinks your terminal type is
  284. X   */
  285. X+ int
  286. X  get_arrow_info()
  287. X  {
  288. X  
  289. X***************
  290. X*** 48,53 ****
  291. X--- 49,55 ----
  292. X   * read in the escape sequence and compare it to what we got from
  293. X   * termcap entry.
  294. X   */
  295. X+ int
  296. X  do_escape(c)
  297. X    int c;
  298. X  {
  299. X***************
  300. X*** 95,100 ****
  301. X--- 97,103 ----
  302. X  }
  303. X  
  304. X  #if 0
  305. X+ int
  306. X  main()
  307. X  {
  308. X      WINDOW *screen;
  309. XIndex: callback.c
  310. X*** mrolo13.old/callback.c    Thu Oct 14 23:52:23 1993
  311. X--- mrolo13/callback.c    Thu Oct 14 02:58:23 1993
  312. X***************
  313. X*** 59,65 ****
  314. X       Widget w;
  315. X       caddr_t client, call;
  316. X  {
  317. X-   Boolean v;
  318. X    int n;
  319. X    XmToggleButtonCallbackStruct *event = (XmToggleButtonCallbackStruct*)call;
  320. X  
  321. X--- 59,64 ----
  322. X***************
  323. X*** 75,85 ****
  324. X       caddr_t client, call;
  325. X  {
  326. X    extern Widget picker;
  327. X-   XmToggleButtonCallbackStruct *event = (XmToggleButtonCallbackStruct*)call;
  328. X-   Widget wi = (Widget)client;
  329. X-   XButtonEvent *bevent;
  330. X-   Position x, y;
  331. X- 
  332. X    UpDialog(picker);
  333. X  }
  334. X  
  335. X--- 74,79 ----
  336. XIndex: creation.c
  337. X*** mrolo13.old/creation.c    Thu Oct 14 23:52:52 1993
  338. X--- mrolo13/creation.c    Thu Oct 14 03:00:03 1993
  339. X***************
  340. X*** 59,65 ****
  341. X    XmString xstr;
  342. X    int n;
  343. X    Boolean bool;
  344. X-   extern int selectFilter;
  345. X    extern int RoloSearch[4];
  346. X  
  347. X    n = 0;
  348. X--- 59,64 ----
  349. X***************
  350. X*** 76,82 ****
  351. X    XtSetArg(args[n],XmNalignment,XmALIGNMENT_CENTER); n++;
  352. X    bu = XmCreatePushButton(di,"Done",args,n);
  353. X    XtManageChild(bu);
  354. X!   XtAddCallback(bu,XmNactivateCallback,PickDone,di);
  355. X  
  356. X    n = 0;
  357. X    XtSetArg(args[n],XmNtopAttachment,XmATTACH_FORM); n++;
  358. X--- 75,81 ----
  359. X    XtSetArg(args[n],XmNalignment,XmALIGNMENT_CENTER); n++;
  360. X    bu = XmCreatePushButton(di,"Done",args,n);
  361. X    XtManageChild(bu);
  362. X!   XtAddCallback(bu,XmNactivateCallback,PickDone,(caddr_t)di);
  363. X  
  364. X    n = 0;
  365. X    XtSetArg(args[n],XmNtopAttachment,XmATTACH_FORM); n++;
  366. X***************
  367. X*** 140,146 ****
  368. X    XtManageChild(t3);
  369. X    XtAddCallback(t3,XmNvalueChangedCallback,PickChange,(caddr_t)3);
  370. X  
  371. X!   XtAddCallback(pickerButton, XmNactivateCallback, ManageArgAtClick, picker);
  372. X  
  373. X    /* Init search flags to whatever the defaults were */
  374. X    XtVaGetValues(t0,XmNset,&bool,NULL);
  375. X--- 139,145 ----
  376. X    XtManageChild(t3);
  377. X    XtAddCallback(t3,XmNvalueChangedCallback,PickChange,(caddr_t)3);
  378. X  
  379. X!   XtAddCallback(pickerButton, XmNactivateCallback, ManageArgAtClick, (caddr_t)picker);
  380. X  
  381. X    /* Init search flags to whatever the defaults were */
  382. X    XtVaGetValues(t0,XmNset,&bool,NULL);
  383. X***************
  384. X*** 342,348 ****
  385. X      Widget    cancelButton;
  386. X      Widget    separator;
  387. X      Widget    rowColumn1;
  388. X-     extern int selectFilter;
  389. X  
  390. X      XmRegisterConverters();
  391. X   
  392. X--- 341,346 ----
  393. XIndex: crolo.c
  394. X*** mrolo13.old/crolo.c    Thu Oct 14 23:52:53 1993
  395. X--- mrolo13/crolo.c    Thu Oct 14 03:07:53 1993
  396. X***************
  397. X*** 1,5 ****
  398. X--- 1,7 ----
  399. X  #include <curses.h>
  400. X  #include "roloP.h"
  401. X+ #include "rolo.h"
  402. X+ #include "roloc.h"
  403. X  #include "arrows.h"
  404. X  
  405. X  void Cleanup()
  406. XIndex: mrolo.ad.h
  407. X*** /dev/null    Fri Oct 15 00:29:01 1993
  408. X--- mrolo13/mrolo.ad.h    Mon Oct 11 17:43:08 1993
  409. X***************
  410. X*** 0 ****
  411. X--- 1,44 ----
  412. X+ "*fontList: -*-helvetica-*-r-*-*-14-*-*-*-*-*-*-*",
  413. X+ "*addressList*fontList: -misc-fixed-*-r-*-*-14-*-*-*-*-*-*-*",
  414. X+ "*commentText.rows: 10",
  415. X+ "*commentText.cols: 80",
  416. X+ "*filterText.columns:    11",
  417. X+ "*XmRowColumn*packing:    XmPACK_COLUMN",
  418. X+ "*rowColumn.resizeWidth:    True",
  419. X+ "*rowColumn.width:    500",
  420. X+ "*showSecondary:    True",
  421. X+ "*sizePrimary:    20",
  422. X+ "*selectFilter:    False",
  423. X+ "*foreground:    black",
  424. X+ "*background:    white",
  425. X+ "*XmPushButton*foreground:    black",
  426. X+ "*XmPushButton*background:    pink",
  427. X+ "*XmText*foreground:    black",
  428. X+ "*XmText*background:    alice blue",
  429. X+ "*addressList*foreground:    black",
  430. X+ "*addressList*background:    honeydew",
  431. X+ "*quitButton.labelString:    Quit",
  432. X+ "*addCardButton.labelString:    Add Card",
  433. X+ "*clearButton.labelString:    Clear Filter",
  434. X+ "*deleteCardButton.labelString:    Delete Card",
  435. X+ "*pickerButton.labelString:    Fields",
  436. X+ "*okButton.labelString:        OK",
  437. X+ "*cancelButton.labelString:    Cancel",
  438. X+ "*primaryLabel.labelString:    Phone",
  439. X+ "*secondaryLabel.labelString:    Phone #2",
  440. X+ "*nameLabel.labelString:        Name",
  441. X+ "*messageBox.okLabelString:    Yes",
  442. X+ "*messageBox.cancelLabelString:    No",
  443. X+ "*messageBox.helpLabelString:    Help",
  444. X+ "*quitButton.traversalOn:    True",
  445. X+ "*addCardButton.traversalOn:    True",
  446. X+ "*clearButton.traversalOn:    True",
  447. 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",
  448. X+ "*form.leftOffset:    2",
  449. X+ "*form.rightOffset:    2",
  450. X+ "*form.topOffset:    2",
  451. X+ "*form.bottomOffset:    2",
  452. X+ "*tbutton0.set:    True",
  453. X+ "*tbutton1.set:    True",
  454. X+ "*tbutton2.set:    True",
  455. X+ "*tbutton3.set:    True",
  456. XIndex: mrolo.c
  457. X*** mrolo13.old/mrolo.c    Thu Oct 14 23:52:53 1993
  458. X--- mrolo13/mrolo.c    Thu Oct 14 18:39:16 1993
  459. X***************
  460. X*** 9,14 ****
  461. X--- 9,15 ----
  462. X  /*
  463. X   * REQUIRED MOTIF INCLUDE FILES
  464. X   */
  465. X+ #include <X11/IntrinsicP.h>
  466. X  #include <Xm/Xm.h>
  467. X  #include <X11/Shell.h>
  468. X  #include <Xm/DialogS.h>
  469. X***************
  470. X*** 97,106 ****
  471. X    XtResizeWidget(Shell000,width,height,bwidth);
  472. X  }
  473. X  
  474. X  /* MAIN PROGRAM */
  475. X  main(argc, argv)
  476. X! int argc;
  477. X! char **argv;
  478. X  {
  479. X      Arg     args[256];
  480. X      int     argcnt;
  481. X--- 98,126 ----
  482. X    XtResizeWidget(Shell000,width,height,bwidth);
  483. X  }
  484. X  
  485. X+ /* removes leading pathname components */
  486. X+ static char *clean_up(s)
  487. X+      char *s;
  488. X+ {
  489. X+   char *r;
  490. X+ 
  491. X+   if (s==NULL) return NULL;
  492. X+   for ( r = s; *r != '\0'; r++ );
  493. X+ #ifndef VMS
  494. X+   for ( ; r != s && *r != '/'; r-- );
  495. X+   if ( *r == '/' ) r++;
  496. X+ #else
  497. X+   for ( ; r != s && *r != '.' && *r != ':'; r-- );
  498. X+   if ( *r == '.' || *r == ':' ) r++;
  499. X+ #endif
  500. X+   return r;
  501. X+ }
  502. X+ 
  503. X  /* MAIN PROGRAM */
  504. X+ int
  505. X  main(argc, argv)
  506. X!   int argc;
  507. X!   char **argv;
  508. X  {
  509. X      Arg     args[256];
  510. X      int     argcnt;
  511. X***************
  512. X*** 111,118 ****
  513. X      XmRegisterConverters();
  514. X      argcnt = 0;
  515. X      XtSetArg(args[argcnt], XmNtitle, "Rolodex"); argcnt++;
  516. X!     Shell000 = XtAppInitialize(&context,APP_NAME,NULL,0,(Cardinal*)&argc,argv,
  517. X!                    appDefaults,args,argcnt);
  518. X      SetResources(Shell000);
  519. X  
  520. X      InitRolo(argc,argv,1);
  521. X--- 131,138 ----
  522. X      XmRegisterConverters();
  523. X      argcnt = 0;
  524. X      XtSetArg(args[argcnt], XmNtitle, "Rolodex"); argcnt++;
  525. X!     Shell000 = XtAppInitialize(&context,clean_up(APP_NAME),NULL,0,
  526. X!                    (Cardinal*)&argc,argv,appDefaults,args,argcnt);
  527. X      SetResources(Shell000);
  528. X  
  529. X      InitRolo(argc,argv,1);
  530. XIndex: mrolo.man
  531. X*** mrolo13.old/mrolo.man    Thu Oct 14 23:52:35 1993
  532. X--- mrolo13/mrolo.man    Thu Oct 14 02:09:02 1993
  533. X***************
  534. X*** 4,9 ****
  535. X--- 4,11 ----
  536. X  .SH SYNOPSIS
  537. X  .B mrolo
  538. X  [
  539. X+ .B X11-options
  540. X+ ] [
  541. X  .B -vhs
  542. X  ] [
  543. X  .B -f filename
  544. XIndex: prolo.c
  545. X*** mrolo13.old/prolo.c    Thu Oct 14 23:52:36 1993
  546. X--- mrolo13/prolo.c    Thu Oct 14 03:04:15 1993
  547. X***************
  548. X*** 2,7 ****
  549. X--- 2,39 ----
  550. X  #include "rolo.h"
  551. X  #include "roloP.h"
  552. X  
  553. X+ static char *fixit_buf = NULL;
  554. X+ static int fixit_size = 0;
  555. X+ 
  556. X+ char *fixit(s)
  557. X+   char *s;
  558. X+ {
  559. X+   char *t, *r;
  560. X+ 
  561. X+   if ( s == NULL ) return NULL;
  562. X+ 
  563. X+   if ( fixit_size == 0 ) {
  564. X+     fixit_size = 1024;
  565. X+     fixit_buf = (char*)malloc(fixit_size);
  566. X+   }
  567. X+ 
  568. X+   if ( fixit_size <= strlen(s) * 2 ) {
  569. X+     fixit_size = strlen(s) * 2 + 1;
  570. X+     fixit_buf = (char*)realloc(fixit_buf,fixit_size);
  571. X+   }
  572. X+ 
  573. X+   for ( t = s, r = fixit_buf; *t != '\0'; t++, r++ ) {
  574. X+     *r = *t;
  575. X+     if ( *t == '\\' ) {
  576. X+       r++;
  577. X+       *r = *t;
  578. X+     }
  579. X+   }
  580. X+   *r = *t;
  581. X+ 
  582. X+   return fixit_buf;
  583. X+ }
  584. X+ 
  585. X  int complines(rr)
  586. X      RoloRec *rr;
  587. X  {
  588. X***************
  589. X*** 59,64 ****
  590. X--- 91,97 ----
  591. X    }
  592. X  }
  593. X  
  594. X+ int
  595. X  main(argc,argv)
  596. X       int argc;
  597. X       char *argv[];
  598. X***************
  599. X*** 154,160 ****
  600. X  
  601. X    printf("\n%% find widest entry\n");
  602. X    for ( rr = RoloList; rr != NULL; rr = rr->next )
  603. X!     if ( rr->on ) printf("(%s) sizestr chmax\n",rr->name);
  604. X  
  605. X    printf("/mw mw fontsize add def\n");
  606. X  
  607. X--- 187,193 ----
  608. X  
  609. X    printf("\n%% find widest entry\n");
  610. X    for ( rr = RoloList; rr != NULL; rr = rr->next )
  611. X!     if ( rr->on ) printf("(%s) sizestr chmax\n",fixit(rr->name));
  612. X  
  613. X    printf("/mw mw fontsize add def\n");
  614. X  
  615. X***************
  616. X*** 161,167 ****
  617. X    printf("\n%% find widest text\n");
  618. X    for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  619. X      if ( ! rr->on ) continue;
  620. X!     text = rr->text;
  621. X      while ( *text != '\0' ) {
  622. X        printf("(");
  623. X        while (*text != '\n' && *text != '\0') putc(*text++,stdout);
  624. X--- 194,200 ----
  625. X    printf("\n%% find widest text\n");
  626. X    for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  627. X      if ( ! rr->on ) continue;
  628. X!     text = fixit(rr->text);
  629. X      while ( *text != '\0' ) {
  630. X        printf("(");
  631. X        while (*text != '\n' && *text != '\0') putc(*text++,stdout);
  632. X***************
  633. X*** 173,179 ****
  634. X    printf("\n%% find widest primary number\n");
  635. X    for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  636. X      if ( ! rr->on ) continue;
  637. X!     printf("(%s) sizestr chmax3\n",rr->number);
  638. X    }
  639. X  
  640. X    printf("/mw3 mw3 fontsize add def\n");
  641. X--- 206,212 ----
  642. X    printf("\n%% find widest primary number\n");
  643. X    for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  644. X      if ( ! rr->on ) continue;
  645. X!     printf("(%s) sizestr chmax3\n",fixit(rr->number));
  646. X    }
  647. X  
  648. X    printf("/mw3 mw3 fontsize add def\n");
  649. X***************
  650. X*** 181,187 ****
  651. X    printf("\n%% find widest secondary number\n");
  652. X    for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  653. X      if ( ! rr->on ) continue;
  654. X!     printf("(%s) sizestr chmax4\n",rr->number2);
  655. X    }
  656. X  
  657. X    printf("mw3 mw4 add mw2 gt { /mw2 mw3 mw4 add def } if\n");
  658. X--- 214,220 ----
  659. X    printf("\n%% find widest secondary number\n");
  660. X    for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  661. X      if ( ! rr->on ) continue;
  662. X!     printf("(%s) sizestr chmax4\n",fixit(rr->number2));
  663. X    }
  664. X  
  665. X    printf("mw3 mw4 add mw2 gt { /mw2 mw3 mw4 add def } if\n");
  666. X***************
  667. X*** 196,205 ****
  668. X      height = complines(rr);
  669. X      printf("%d checkloc\n",height);
  670. X      printf("%d boxit\n",height);
  671. X!     printf("(%s) nshow\n",rr->name);
  672. X!     printf("(%s) pshow1\n",rr->number);
  673. X!     printf("(%s) pshow2\n",rr->number2);
  674. X!     text = rr->text;
  675. X      while ( *text != '\0' ) {
  676. X        printf("(");
  677. X        while (*text != '\n' && *text != '\0') putc(*text++,stdout);
  678. X--- 229,238 ----
  679. X      height = complines(rr);
  680. X      printf("%d checkloc\n",height);
  681. X      printf("%d boxit\n",height);
  682. X!     printf("(%s) nshow\n",fixit(rr->name));
  683. X!     printf("(%s) pshow1\n",fixit(rr->number));
  684. X!     printf("(%s) pshow2\n",fixit(rr->number2));
  685. X!     text = fixit(rr->text);
  686. X      while ( *text != '\0' ) {
  687. X        printf("(");
  688. X        while (*text != '\n' && *text != '\0') putc(*text++,stdout);
  689. XIndex: rolo.c
  690. X*** mrolo13.old/rolo.c    Thu Oct 14 23:52:54 1993
  691. X--- mrolo13/rolo.c    Thu Oct 14 19:38:41 1993
  692. X***************
  693. X*** 18,23 ****
  694. X--- 18,24 ----
  695. X  
  696. X  RoloRec *RoloList = NULL;
  697. X  static char *rolofile = NULL;
  698. X+ static char rolobuf[512];
  699. X  int verbose = 0;
  700. X  int RoloSearch[4] = {1,1,1,1};
  701. X  int selectFilter = 0;
  702. X***************
  703. X*** 43,48 ****
  704. X--- 44,50 ----
  705. X    int i;
  706. X  
  707. X    if ( field == NULL ) return field;
  708. X+   r = NULL;
  709. X    if ( mystrncasecmp(field,"as of:",6) == 0 )
  710. X      r = field;
  711. X    else {
  712. X***************
  713. X*** 49,55 ****
  714. X      r = mystrstrcase(field,"\nas of:");
  715. X      if (r) r++; /* skip nl */
  716. X    }
  717. X!   if (r) {
  718. X      buf = (char*)malloc(strlen(field)+30);  /* allocate bigger buffer */
  719. X      /* copy text up to & including AS OF marker into buffer */
  720. X      for ( t = buf, s = field; s != r; t++, s++ )
  721. X--- 51,57 ----
  722. X      r = mystrstrcase(field,"\nas of:");
  723. X      if (r) r++; /* skip nl */
  724. X    }
  725. X!   if (r!=NULL) {
  726. X      buf = (char*)malloc(strlen(field)+30);  /* allocate bigger buffer */
  727. X      /* copy text up to & including AS OF marker into buffer */
  728. X      for ( t = buf, s = field; s != r; t++, s++ )
  729. X***************
  730. X*** 68,78 ****
  731. X      while ( *t != '\n' && *t != '\0' ) t++;
  732. X      if (*t=='\n') t++;
  733. X      /* copy rest of buffer */
  734. X-     /*strcat(t,s);*/
  735. X      mystrcpy(t,s);
  736. X      return buf;
  737. X    }
  738. X-   return field;
  739. X  }
  740. X  #endif
  741. X  
  742. X--- 70,80 ----
  743. X      while ( *t != '\n' && *t != '\0' ) t++;
  744. X      if (*t=='\n') t++;
  745. X      /* copy rest of buffer */
  746. X      mystrcpy(t,s);
  747. X      return buf;
  748. X+   } else {
  749. X+     return mystrdup(field);
  750. X    }
  751. X  }
  752. X  #endif
  753. X  
  754. X***************
  755. X*** 101,107 ****
  756. X  
  757. X  #ifndef NO_TIME
  758. X    if ( checkfield )
  759. X!     rr->text = CheckField(mystrdup(text));
  760. X    else
  761. X  #endif
  762. X      rr->text = mystrdup(text);
  763. X--- 103,109 ----
  764. X  
  765. X  #ifndef NO_TIME
  766. X    if ( checkfield )
  767. X!     rr->text = CheckField(text);
  768. X    else
  769. X  #endif
  770. X      rr->text = mystrdup(text);
  771. X***************
  772. X*** 142,148 ****
  773. X      rolofile = getenv("HOME");
  774. X      if ( rolofile == NULL ) rolofile = ROLOFILENAME;
  775. X      else {
  776. X!       rolofile = (char*)malloc(512);
  777. X  #ifndef VMS
  778. X        sprintf(rolofile,"%s/%s",getenv("HOME"),ROLOFILENAME);
  779. X  #else
  780. X--- 144,150 ----
  781. X      rolofile = getenv("HOME");
  782. X      if ( rolofile == NULL ) rolofile = ROLOFILENAME;
  783. X      else {
  784. X!       rolofile = rolobuf;
  785. X  #ifndef VMS
  786. X        sprintf(rolofile,"%s/%s",getenv("HOME"),ROLOFILENAME);
  787. X  #else
  788. X***************
  789. X*** 316,322 ****
  790. X      else fputc('\n',f);
  791. X      if ( rr->text ) fprintf(f,"%s",rr->text);
  792. X      /* do new-line check to make xrolo happy */
  793. X!     for ( s = &rr->text[strlen(rr->text)-1]; *s == ' ' || *s == '\t'; s-- );
  794. X      if ( *s != '\n' ) fputc('\n',f);
  795. X      fputc((char)12,f);
  796. X      fputc('\n',f);
  797. X--- 318,325 ----
  798. X      else fputc('\n',f);
  799. X      if ( rr->text ) fprintf(f,"%s",rr->text);
  800. X      /* do new-line check to make xrolo happy */
  801. X!     for ( s = rr->text; *s != '\0'; s++ );
  802. X!     for ( ; *s == ' ' && *s == '\t' && s != rr->text; s-- );
  803. X      if ( *s != '\n' ) fputc('\n',f);
  804. X      fputc((char)12,f);
  805. X      fputc('\n',f);
  806. X***************
  807. X*** 384,389 ****
  808. X--- 387,393 ----
  809. X  static int AllSpace(s)
  810. X       char *s;
  811. X  {
  812. X+   if (s==NULL) return 1;
  813. X    for ( ; *s != '\0'; s++)
  814. X      if ( ! isspace(*s) ) return 0;
  815. X    return 1;
  816. XIndex: rolo.h
  817. X*** mrolo13.old/rolo.h    Thu Oct 14 23:52:29 1993
  818. X--- mrolo13/rolo.h    Thu Oct 14 02:59:09 1993
  819. X***************
  820. X*** 11,16 ****
  821. X--- 11,17 ----
  822. X  void PutListOnScreen();
  823. X  void DeleteRoloCard();
  824. X  void WriteRolo();
  825. X+ void RoloFilter();
  826. X  char *GetCardName();
  827. X  char *GetNumber();
  828. X  char *GetNumber2();
  829. XIndex: roloc.h
  830. X*** /dev/null    Fri Oct 15 00:29:01 1993
  831. X--- mrolo13/roloc.h    Thu Oct 14 03:07:17 1993
  832. X***************
  833. X*** 0 ****
  834. X--- 1,7 ----
  835. X+ #ifndef _ROLOC_H
  836. X+ #define _ROLOC_H
  837. X+ 
  838. X+ void PutLineOnScreen (/* int ln */);
  839. X+ void PutListOnScreen (/* void */);
  840. X+ 
  841. X+ #endif
  842. XIndex: rolox.c
  843. X*** mrolo13.old/rolox.c    Thu Oct 14 23:52:31 1993
  844. X--- mrolo13/rolox.c    Thu Oct 14 03:02:38 1993
  845. X***************
  846. X*** 9,14 ****
  847. X--- 9,15 ----
  848. X  #include "patchlevel.h"
  849. X  #include "rolo.h"
  850. X  #include "roloP.h"
  851. X+ #include "compat.h"
  852. X  
  853. X  extern Boolean showSecondary;
  854. X  extern int sizePrimary;
  855. XIndex: xr2mr
  856. X*** mrolo13.old/xr2mr    Thu Oct 14 23:52:32 1993
  857. X--- mrolo13/xr2mr    Tue Oct 12 12:59:11 1993
  858. X***************
  859. X*** 1,3 ****
  860. X  #!/bin/sh
  861. X! sed '1,$s/^####$/\014/g' $1 | tail +2
  862. X! echo "\014"
  863. X--- 1,3 ----
  864. X  #!/bin/sh
  865. X! sed '1,$s/^####$/ /g' $1 | tail +2
  866. X! echo " "
  867. X
  868. END_OF_FILE
  869.   if test 22685 -ne `wc -c <'mrolo.p2'`; then
  870.     echo shar: \"'mrolo.p2'\" unpacked with wrong size!
  871.   fi
  872.   # end of 'mrolo.p2'
  873. fi
  874. echo shar: End of archive 1 \(of 1\).
  875. cp /dev/null ark1isdone
  876. MISSING=""
  877. for I in 1 ; do
  878.     if test ! -f ark${I}isdone ; then
  879.     MISSING="${MISSING} ${I}"
  880.     fi
  881. done
  882. if test "${MISSING}" = "" ; then
  883.     echo You have the archive.
  884.     rm -f ark[1-9]isdone
  885. else
  886.     echo You still must unpack the following archives:
  887.     echo "        " ${MISSING}
  888. fi
  889. exit 0
  890. exit 0 # Just in case...
  891. -- 
  892.   // chris@Sterling.COM           | Send comp.sources.x submissions to:
  893. \X/  Amiga - The only way to fly! |    sources-x@sterling.com
  894.  "It's intuitively obvious to the |
  895.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  896.