home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / x / volume21 / mrolo / part02 < prev    next >
Encoding:
Text File  |  1993-10-08  |  44.4 KB  |  1,518 lines

  1. Newsgroups: comp.sources.x
  2. From: gregor@kafka.saic.com (gregg hanna)
  3. Subject: v21i009:  mrolo - Motif rolodex, Part02/03
  4. Message-ID: <1993Oct9.011944.19165@sparky.sterling.com>
  5. X-Md4-Signature: 487d5e81ef44427909aea66fce48b398
  6. Sender: chris@sparky.sterling.com (Chris Olson)
  7. Organization: Sterling Software
  8. Date: Sat, 9 Oct 1993 01:19:44 GMT
  9. Approved: chris@sterling.com
  10.  
  11. Submitted-by: gregor@kafka.saic.com (gregg hanna)
  12. Posting-number: Volume 21, Issue 9
  13. Archive-name: mrolo/part02
  14. Environment: X11, OSF/Motif
  15. Supersedes: mrolo: Volume 20, Issue 96-97
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then unpack
  19. # it by saving it into a file and typing "sh file".  To overwrite existing
  20. # files, type "sh file -c".  You can also feed this as standard input via
  21. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  22. # will see the following message at the end:
  23. #        "End of archive 2 (of 3)."
  24. # Contents:  mrolo13/crolo.c mrolo13/mrolo.man mrolo13/prolo.c
  25. #   mrolo13/rolo.c mrolo13/sample.Z.uu
  26. # Wrapped by gregor@kafka on Fri Sep  3 01:45:26 1993
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'mrolo13/crolo.c' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'mrolo13/crolo.c'\"
  30. else
  31. echo shar: Extracting \"'mrolo13/crolo.c'\" \(6980 characters\)
  32. sed "s/^X//" >'mrolo13/crolo.c' <<'END_OF_FILE'
  33. X#include <curses.h>
  34. X#include "roloP.h"
  35. X#include "arrows.h"
  36. X
  37. Xvoid Cleanup()
  38. X{
  39. X  endwin();
  40. X}
  41. X
  42. X#ifndef SYSV
  43. X#define waddchso(win,ch) waddch((win),(ch)|_STANDOUT)
  44. X#else
  45. X#define waddchso(win,ch) waddch((win),(ch)); waddch((win),')')
  46. X#endif
  47. X
  48. XWINDOW *w;
  49. XWINDOW *inst;
  50. XWINDOW *listWin;
  51. Xint linew, linec;
  52. Xint top_of_screen;
  53. Xint active_line;
  54. Xint re_x, re_y;
  55. X
  56. Xvoid Startup()
  57. X{
  58. X
  59. X  w = initscr();
  60. X
  61. X  inst = subwin(stdscr,2,COLS-4,LINES-2,1);
  62. X  waddchso(inst,'A');
  63. X  waddstr(inst,"dd Card  ");
  64. X  waddchso(inst,'D');
  65. X  waddstr(inst,"elete Card  ");
  66. X  waddchso(inst,'R');
  67. X  waddstr(inst,"edraw  ");
  68. X  waddchso(inst,'Q');
  69. X  waddstr(inst,"uit  ");
  70. X  waddchso(inst,'C');
  71. X  waddstr(inst,"lear Filter  ");
  72. X  waddchso(inst,'F');
  73. X  waddstr(inst,"ilter: ");
  74. X  getyx(inst,re_y,re_x);
  75. X
  76. X  linew = COLS;
  77. X  linec = LINES - 3;
  78. X  listWin = subwin(stdscr,linec,linew,0,0);
  79. X  leaveok(stdscr,FALSE);
  80. X  leaveok(listWin,FALSE);
  81. X  leaveok(inst,FALSE);
  82. X
  83. X  top_of_screen = active_line = 0;
  84. X
  85. X  idlok(listWin,TRUE);
  86. X  cbreak();
  87. X  noecho();
  88. X#ifdef SYSV
  89. X  atexit(Cleanup);
  90. X#else
  91. X  on_exit(Cleanup,NULL);
  92. X#endif
  93. X
  94. X  get_arrow_info();
  95. X}
  96. X
  97. Xint c;
  98. X
  99. Xvoid ShowMain()
  100. X{
  101. X  /*PutListOnScreen();*/
  102. X}
  103. X
  104. Xvoid GetInput()
  105. X{
  106. X  c = getch();
  107. X}
  108. X
  109. Xint InputEq(n)
  110. X     int n;
  111. X{
  112. X  return ( c == n );
  113. X}
  114. X
  115. Xstatic void mygetstr(win,str)
  116. X     WINDOW *win;
  117. X     char *str;
  118. X{
  119. X  int c, sx, sy, cx, n;
  120. X  char killc, erasec;
  121. X
  122. X  erasec = erasechar();
  123. X  killc = killchar();
  124. X  getyx(win,sy,sx);
  125. X  cx = 0;
  126. X  str[0] = '\0';
  127. X
  128. X  c = wgetch(win);
  129. X  while ( c != '\n' && c != '\r' ) {
  130. X    if ( c == erasec ) {
  131. X      if ( cx > 0 ) {
  132. X        cx--;
  133. X        mvwaddch(win,sy,sx+cx,' ');
  134. X      }
  135. X    } else if ( c == killc ) {
  136. X      wmove(win,sy,sx);
  137. X      for ( n = 0; n < cx; n++ )
  138. X    waddch(win,' ');
  139. X      cx = 0;
  140. X    } else {
  141. X      str[cx] = c & 255;
  142. X      cx++;
  143. X      waddch(win,c);
  144. X    }
  145. X    wmove(win,sy,sx+cx);
  146. X    wrefresh(win);
  147. X    c = wgetch(win);
  148. X  }
  149. X  str[cx] = '\0';
  150. X}
  151. X
  152. Xvoid DoFilter()
  153. X{
  154. X  char buf[500];
  155. X
  156. X  wmove(inst,re_y,re_x);
  157. X  wclrtoeol(inst);
  158. X  wrefresh(inst);
  159. X  mygetstr(inst,buf);
  160. X  RoloFilter(buf);
  161. X  top_of_screen = active_line = 0;
  162. X  PutListOnScreen();
  163. X}
  164. X
  165. Xvoid ClearFilter()
  166. X{
  167. X  RoloFilter(NULL);
  168. X  wmove(inst,re_y,re_x);
  169. X  wclrtoeol(inst);
  170. X  wrefresh(inst);
  171. X  PutListOnScreen();
  172. X}
  173. X
  174. X#ifndef DEFAULT_EDITOR
  175. X#ifdef SYSV
  176. X#define DEFAULT_EDITOR "/usr/bin/vi"
  177. X#else
  178. X#define DEFAULT_EDITOR "/usr/ucb/vi"
  179. X#endif
  180. X#endif
  181. X
  182. Xvoid ShowDetail(n)
  183. X     int n;
  184. X{
  185. X  RoloRec *rr;
  186. X  char *fn, *ed, cmd[500];
  187. X  char name[STRSIZE], number[STRSIZE], number2[STRSIZE], text[STRSIZE];
  188. X  extern char *getenv();
  189. X  FILE *f;
  190. X  int cnt, same;
  191. X
  192. X  if ( n < 0 ) rr = NULL;
  193. X  else rr = GetN(n);
  194. X
  195. X  fn = tmpnam(NULL);
  196. X  f = fopen(fn,"w");
  197. X  if ( f == NULL ) return;
  198. X  if ( rr != NULL )
  199. X    fprintf(f,"%s\n%s\n%s\n%s",
  200. X        (rr->name==NULL)?"":rr->name,
  201. X        (rr->number==NULL)?"":rr->number,
  202. X        (rr->number2==NULL)?"":rr->number2,
  203. X        (rr->text==NULL)?"":rr->text);
  204. X  else
  205. X    fprintf(f,"\n\n\n");
  206. X  fclose(f);
  207. X
  208. X  ed = getenv("EDITOR");
  209. X  if ( ed == NULL )
  210. X    ed = DEFAULT_EDITOR;
  211. X  sprintf(cmd,"%s %s",ed,fn);
  212. X  system(cmd);
  213. X  clearok(curscr,TRUE);
  214. X
  215. X  f = fopen(fn,"r");
  216. X  if ( f == NULL ) return;
  217. X  fgets(name,STRSIZE,f);
  218. X  fgets(number,STRSIZE,f);
  219. X  fgets(number2,STRSIZE,f);
  220. X  cnt = fread(text,1,STRSIZE-1,f);
  221. X  text[cnt] = '\0';
  222. X  fclose(f);
  223. X  unlink(fn);
  224. X
  225. X  if ( n < 0 ) same = 0;
  226. X  else {
  227. X    same = (( strcmp(name,rr->name) == 0 ) &&
  228. X        ( strcmp(number,rr->number) == 0 ) &&
  229. X        ( strcmp(number2,rr->number2) == 0 ) &&
  230. X        ( strcmp(text,rr->text) == 0 ));
  231. X    if ( !same ) DeleteRoloCard(n);
  232. X  }
  233. X
  234. X  if ( ! same ) {
  235. X    MakeNewRolo(name,number,number2,text,1);
  236. X    WriteRolo();
  237. X    PutListOnScreen();
  238. X  }
  239. X}
  240. X
  241. Xvoid NewCard()
  242. X{
  243. X  ShowDetail(-1);
  244. X}
  245. X
  246. Xvoid DoDir(dir)
  247. X  int dir;
  248. X{
  249. X  switch(dir) {
  250. X  case MY_KEY_UP:
  251. X    if ( active_line == top_of_screen ) {
  252. X      if ( active_line == 0 ) break;
  253. X      wmove(listWin,0,0);
  254. X      winsertln(listWin);
  255. X      top_of_screen--;
  256. X    }
  257. X    active_line--;
  258. X    PutLineOnScreen(active_line+1);
  259. X    PutLineOnScreen(active_line);
  260. X    break;
  261. X  case MY_KEY_DOWN:
  262. X    if ( active_line == top_of_screen + linec - 1 ) {
  263. X      if ( active_line == NumRoloOn() - 1 ) break;
  264. X      wmove(listWin,0,0);
  265. X      wdeleteln(listWin);
  266. X      top_of_screen++;
  267. X    }
  268. X    active_line++;
  269. X    PutLineOnScreen(active_line-1);
  270. X    PutLineOnScreen(active_line);
  271. X    break;
  272. X  case MY_KEY_RIGHT:
  273. X    active_line += (linec-1);
  274. X    top_of_screen += (linec-1);
  275. X    if ( top_of_screen + linec >= NumRoloOn() ) {
  276. X      active_line = NumRoloOn() - 1;
  277. X      top_of_screen = NumRoloOn() - linec;
  278. X    }
  279. X    PutListOnScreen();
  280. X    break;
  281. X  case MY_KEY_LEFT:
  282. X    active_line -= (linec-1);
  283. X    top_of_screen -= (linec-1);
  284. X    if ( top_of_screen < 0 ) {
  285. X      active_line = 0;
  286. X      top_of_screen = 0;
  287. X    }
  288. X    PutListOnScreen();
  289. X    break;
  290. X  }
  291. X}
  292. X
  293. Xvoid HandleEscape()
  294. X{
  295. X  c = do_escape(c);
  296. X  DoDir(c);
  297. X}
  298. X
  299. Xvoid Redraw()
  300. X{
  301. X  clearok(curscr,TRUE);
  302. X}
  303. X
  304. Xint Check(m)
  305. X     char *m;
  306. X{
  307. X  WINDOW *chWin;
  308. X  int c;
  309. X
  310. X  chWin = newwin(2,COLS-4,LINES-2,1);
  311. X  wmove(chWin,re_y,re_x);
  312. X  wclrtoeol(chWin);
  313. X  wmove(chWin,re_y,re_x+2);
  314. X  waddstr(chWin,m);
  315. X  wrefresh(chWin);
  316. X  do
  317. X    c = wgetch(chWin);
  318. X  while ( c != 'y' && c != 'Y' && c != 'n' && c != 'N' );
  319. X  delwin(chWin);
  320. X  touchwin(inst);
  321. X
  322. X  return ( c == 'y' || c == 'Y' );
  323. X}
  324. X
  325. Xvoid DeleteCard(n)
  326. X     int n;
  327. X{
  328. X  if ( ! Check("Really?") ) return;
  329. X  DeleteRoloCard(n);
  330. X  WriteRolo();
  331. X  if ( active_line > NumRoloOn() - 1 ) 
  332. X    active_line = NumRoloOn() - 1;
  333. X  PutListOnScreen();
  334. X}
  335. X
  336. Xvoid DoGoto()
  337. X{
  338. X  char s[2];
  339. X  int n, oa;
  340. X
  341. X  if ( isalpha(c) && isupper(c) ) {
  342. X    s[0] = c;
  343. X    s[1] = '\0';
  344. X    n = GetIndex(s);
  345. X    if ( n < top_of_screen + linec && n >= top_of_screen ) {
  346. X      /* no scrolling needed */
  347. X      oa = active_line;
  348. X      active_line = n;
  349. X      PutLineOnScreen(oa);
  350. X      PutLineOnScreen(active_line);
  351. X    } else {
  352. X      /* scrolling needed */
  353. X      active_line = n;
  354. X      top_of_screen = NumRoloOn() - linec; /* lowest it should ever be */
  355. X      if ( n < top_of_screen ) top_of_screen = n;
  356. X      PutListOnScreen();
  357. X    }
  358. X  }
  359. X}
  360. X
  361. X#define CTRL_L 12
  362. X
  363. Xmain(argc,argv)
  364. X     int argc;
  365. X     char *argv[];
  366. X{
  367. X  InitRolo(argc,argv,1);
  368. X  SetupRolo();
  369. X  Startup();
  370. X  PutListOnScreen();
  371. X  while (1) {
  372. X    ShowMain();
  373. X    wmove(inst,re_y,re_x);
  374. X    refresh();
  375. X    wrefresh(listWin);
  376. X    wrefresh(inst);
  377. X    GetInput();
  378. X    if ( InputEq('q') ) return 0;
  379. X    else if ( InputEq('f') ) DoFilter();
  380. X    else if ( InputEq('a') ) NewCard();
  381. X    else if ( InputEq('c') ) ClearFilter();
  382. X    else if ( InputEq('\n') || InputEq('\r') || InputEq(' ') ) ShowDetail(active_line);
  383. X    else if ( InputEq(CTRL_L) ) Redraw();
  384. X    else if ( InputEq('r') ) Redraw();
  385. X    else if ( InputEq('d') ) DeleteCard(active_line);
  386. X    else if ( InputEq(ESCAPE) ) HandleEscape();
  387. X    else if ( InputEq('+') || InputEq('=') || InputEq('j') ) DoDir(MY_KEY_DOWN);
  388. X    else if ( InputEq('-') || InputEq('k') ) DoDir(MY_KEY_UP);
  389. X    else if ( InputEq(6) || InputEq(4) ) DoDir(MY_KEY_RIGHT);
  390. X    else if ( InputEq(2) || InputEq(21) ) DoDir(MY_KEY_LEFT);
  391. X    else DoGoto();
  392. X  }
  393. X}
  394. X
  395. END_OF_FILE
  396. if test 6980 -ne `wc -c <'mrolo13/crolo.c'`; then
  397.     echo shar: \"'mrolo13/crolo.c'\" unpacked with wrong size!
  398. fi
  399. # end of 'mrolo13/crolo.c'
  400. fi
  401. if test -f 'mrolo13/mrolo.man' -a "${1}" != "-c" ; then 
  402.   echo shar: Will not clobber existing file \"'mrolo13/mrolo.man'\"
  403. else
  404. echo shar: Extracting \"'mrolo13/mrolo.man'\" \(7572 characters\)
  405. sed "s/^X//" >'mrolo13/mrolo.man' <<'END_OF_FILE'
  406. X.TH mrolo L "19 April 1993"
  407. X.SH NAME
  408. Xmrolo \- Motif-based card file manager
  409. X.SH SYNOPSIS
  410. X.B mrolo
  411. X[
  412. X.B -vhs
  413. X] [
  414. X.B -f filename
  415. X]
  416. X.SH DESCRIPTION
  417. X.LP
  418. X.I MRolo
  419. Xis a program for maintaining a simple card-file,
  420. Xspecifically oriented for saving address-book
  421. Xinformation.
  422. X.LP
  423. XThe default database file read is
  424. X.IR $HOME/.rolo ,
  425. Xalthough this can be overridden with the
  426. X.B ROLODEX
  427. Xenvironment variable or the
  428. X.B -f
  429. Xcommand-line argument.
  430. XIf the file does not exist, it is created empty.
  431. XThe database is stored in a format similar to that of the
  432. X.I xrolo
  433. Xprogram:  Blocks of text separated by lines containing just
  434. Xa ctrl-L.  In addition,
  435. X.I MRolo
  436. Xassumes that the first line in a block is the primary name,
  437. Xthe second line is the primary number, the third line
  438. Xis a secondary number, and the rest is for other names,
  439. Xnumbers, and comments.  (You don't need
  440. Xto understand the file format to use
  441. X.IR MRolo .)
  442. X.LP
  443. XWhen invoked
  444. X.I MRolo
  445. Xwill present the user with a screen summarizing the database.
  446. XThe user may scroll through the summary with the scroll-bar,
  447. Xor they may click on one of the large letters along the left
  448. Xedge of the window and jump right to that part of the database.
  449. XSelecting an individual summary entry
  450. Xwill display a window containing the full information of
  451. Xthat entry, ready for editing or viewing.
  452. X.LP
  453. XOn the main
  454. X.I MRolo
  455. Xscreen there are three buttons and a text field.
  456. XThe three buttons are as follows:
  457. X.TP 2
  458. X.B Quit
  459. XExit the
  460. X.I MRolo
  461. Xprogram immediately.
  462. X.TP 2
  463. X.B "Add Card"
  464. XDisplay a blank detail window, into which new card information
  465. Xmay be entered.
  466. X.TP 2
  467. X.B "Clear Filter"
  468. XClear the selection filter, as described in the next paragraph.
  469. X.LP
  470. XTyping some text in the text field and pressing
  471. X.I return
  472. Xwill limit the summary display to only those cards which contain
  473. Xthat text somewhere in their entry (the entire entry,
  474. Xnot just the summary).  All of the cards are still in the database,
  475. Xthey just aren't all accessible.  To see all of the cards again,
  476. Xdelete all the text from the text field and press
  477. X.I return
  478. Xor just press the
  479. X.B "Clear Filter"
  480. Xbutton.  Usually, this text is matched as simple, case-insensitive
  481. Xtext, but if the first letter in the filter text is a back-slash
  482. Xthen the rest of the text is interpreted as a regular expression.
  483. X.LP
  484. XAny time you change a card, add a new card, or delete a card
  485. X(by pressing "Delete Card" on the detail screen), you will
  486. Xbe asked before the data is written to the disk.  You never
  487. Xhave to explicitly save the database, it is done by validating
  488. Xthe individual changes.  Likewise the screen always reflects
  489. Xthe current contents of the database, except when a filter has
  490. Xbeen applied thus hiding some of the database from view.
  491. X.LP
  492. XThere are companion programs included in this package but
  493. Xdocumented separately.  They are:
  494. X.IP "\fIcrolo\fR"
  495. Xcurses-based card file database manager
  496. X.IP "\fIprolo\fR"
  497. Xprints card file databases in postscript
  498. X.IP "\fIxr2mr\fR"
  499. Xconverts xrolodex files to crolo format
  500. X.SH OPTIONS
  501. X.TP
  502. X.B \-v
  503. XDisplay the version number and show error messages.
  504. X.TP
  505. X.B \-s
  506. XInclude a field selection menu, to allow restriction
  507. Xof filter searches to certain fields.
  508. X.TP
  509. X.B \-f filename
  510. XRun using the specified file as the default database.
  511. X.SH ADVANCED TECHNIQUES
  512. X.LP
  513. XIf you start a line in the comment section of your
  514. Xcard entry with the phrase "as of:" (note that the space
  515. Xand the colon are important) then mrolo will put the
  516. Xcurrent date in the format of ctime(3) after the colon
  517. Xwhenever the field is changed.  This keeps track of how
  518. Xcurrent the card is.
  519. X.LP
  520. XIf you like using
  521. X.I mrolo
  522. Xthen there are some "advanced" techniques you might
  523. Xwant to know about.  These tricks allow you to
  524. Xget more power and flexibility out of the simple
  525. X.I mrolo
  526. Xinterface.
  527. X.LP
  528. XRemember that everything is optional and the program doesn't
  529. Xcare what is where.  You can put text in the slots traditionally
  530. Xused for phone numbers, so if there is no secondary number some
  531. Xadditional descriptive text can go there.
  532. X.LP
  533. XWhile the program was developed for an address book, exploit
  534. Xit for whatever you need, for example record or video collection
  535. Xdatabases would work well.
  536. X.LP
  537. XYou can simulate having several address books by including codes
  538. Xin the comment section of the cards.  For example, I use
  539. Xthe code "~p" for personal entries, and "~w" for work
  540. Xrelated entries.
  541. XIf I want to see just work entries I can
  542. Xenter "~w" in the filter.
  543. XNote that cards can appear in multiple lists by including
  544. Xall applicable codes:  for example, Karen's entry has a "~p~w"
  545. Xcode since she is my friend and I work with her.
  546. X.LP
  547. XPeople who use
  548. X.I mrolo
  549. Xa lot will want to know about
  550. X.IR prolo ,
  551. Xwhich is used for printing card file databases.  Once you
  552. Xknow how this program works (see the manpage for
  553. X.IR prolo )
  554. Xyou can optimize your entries to look better on paper.
  555. X.SH XDEFAULTS
  556. X.LP
  557. XThere are a number of values you may wish to tweek in your
  558. XX-Defaults.  Look at the app defaults file for a more complete
  559. Xlist than is given here.
  560. X.TP
  561. Xmrolo*showSecondary
  562. XIf set to True (the default) the main screen will
  563. Xshow both primary and secondary numbers, if False
  564. Xonly the primary number will be shown.  This does
  565. Xnot affect the card screen or the file format.
  566. X.TP
  567. Xmrolo*sizePrimary
  568. XIf showSecondary is True then this resource defines
  569. Xhow wide the column containing the primary number
  570. Xis.  The default is 20 characters.
  571. X.TP
  572. Xmrolo*fontList
  573. XThe default font for everything in
  574. X.IR mrolo .
  575. X.TP
  576. Xmrolo*addressList*fontList
  577. XFont used in address list on main screen.  This
  578. Xshould be a fixed width font if you want the
  579. Xcolumns to line up.
  580. X.TP
  581. Xmrolo*commentText.rows and mrolo*commentText.cols
  582. XThe default size of the card text area.  You can
  583. Xscroll beyond this size or resize the window,
  584. Xbut you might want to change this if you have a lot
  585. Xof extremely large cards.
  586. X.TP
  587. Xmrolo*filterText.columns
  588. XThis is the size of the text field on the main screen.
  589. X.TP
  590. Xmrolo*{various}.foreground and mrolo*{various}.background
  591. XChange the colors to suit your tastes; some
  592. Xgood values for {various} are:
  593. Xnothing (default colors for application),
  594. XXmPushButton (all buttons),
  595. XXmText (all text fields),
  596. XaddressList (summary screen).
  597. X.TP
  598. Xmrolo*XmRowColumn*packing
  599. XIf you like your buttons only as big as the text they
  600. Xhold, try XmPACK_TIGHT here.  If you do that, you will
  601. Xwant to do the following also...
  602. X.TP
  603. Xmrolo*rowColumn*resizeWidth and mrolo*rowColumn*width
  604. XExplicitly set the width of the main screen, it usually
  605. Xdefaults to size based on the buttons and input field
  606. Xon the main screen.
  607. X.TP
  608. Xmrolo*selectFilter
  609. XWhen set to True, is the same as using the -s option.
  610. XFalse is the default.
  611. X.TP
  612. Xmrolo*indexElements
  613. XThis string is a white-space delimited list of elements
  614. Xto be made into index tabs.  The default is:
  615. X.nf
  616. X    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
  617. X.fi
  618. X.LP
  619. XThis can modified to break up dense groups of entries or
  620. Xto provide indexes for non-english letters.
  621. X.SH FILES
  622. X.TP 20
  623. X.B ~/.rolo
  624. XDefault database.
  625. X.SH ENVIRONMENT
  626. X.TP 20
  627. XROLODEX
  628. XDefault database, overrides ~/.rolo, but not the -f option.
  629. X.SH "SEE ALSO"
  630. X.PD
  631. X.BR xr2mr (1),
  632. X.BR prolo (1),
  633. X.BR crolo (1)
  634. X.br
  635. X.ne 5
  636. X.SH BUGS
  637. X.LP
  638. XNone known.  Report bugs to gregor@kafka.saic.com
  639. X.SH AUTHOR
  640. X.nf
  641. X.LP
  642. Xgregg hanna (gregor@kafka.saic.com)
  643. XScience Applications International Corporation
  644. X10260 Campus Point Drive, MS C3
  645. XSan Diego, California  92121
  646. X.fi
  647. X.LP
  648. XCopyright 1993 by gregg hanna.  Permission is granted
  649. Xto use, modify, and distribute this program.  Basically
  650. Xdo anything you want with it, but if you want to use
  651. Xit or any part of it to make money you must get further
  652. Xpermission from me.
  653. X
  654. X
  655. END_OF_FILE
  656. if test 7572 -ne `wc -c <'mrolo13/mrolo.man'`; then
  657.     echo shar: \"'mrolo13/mrolo.man'\" unpacked with wrong size!
  658. fi
  659. # end of 'mrolo13/mrolo.man'
  660. fi
  661. if test -f 'mrolo13/prolo.c' -a "${1}" != "-c" ; then 
  662.   echo shar: Will not clobber existing file \"'mrolo13/prolo.c'\"
  663. else
  664. echo shar: Extracting \"'mrolo13/prolo.c'\" \(6532 characters\)
  665. sed "s/^X//" >'mrolo13/prolo.c' <<'END_OF_FILE'
  666. X#include <stdio.h>
  667. X#include "rolo.h"
  668. X#include "roloP.h"
  669. X
  670. Xint complines(rr)
  671. X    RoloRec *rr;
  672. X{
  673. X  int n;
  674. X  char *s;
  675. X  for ( n = 1, s = rr->text; *s != '\0'; s++ )
  676. X    if ( *s == '\n' ) n++;
  677. X  if ( s != rr->text )
  678. X    if ( *(s-1) != '\n' ) n++;
  679. X  return n;
  680. X}
  681. X
  682. Xint box, equal, fontsize, card;
  683. Xchar *filtertext;
  684. X
  685. Xvoid InitProlo(argc,argv)
  686. X     int argc;
  687. X     char *argv[];
  688. X{
  689. X  int c, n;
  690. X  char buf[255];
  691. X  extern char *optarg;
  692. X
  693. X  box = equal = card = 0;
  694. X  filtertext = NULL;
  695. X  fontsize = 5;
  696. X
  697. X  while ((c = getopt(argc, argv, "cf:beF:hs:")) != -1) {
  698. X    switch (c) {
  699. X    case 'c':
  700. X      card = 1;
  701. X      break;
  702. X    case 'f':
  703. X      sprintf(buf,"ROLODEX=%s",optarg);
  704. X      putenv(buf);
  705. X      break;
  706. X    case 'b':
  707. X      box = 1;
  708. X      break;
  709. X    case 'e':
  710. X      equal = 1;
  711. X      break;
  712. X    case 'F':
  713. X      filtertext = optarg;
  714. X      break;
  715. X    case 'h':
  716. X      fprintf(stderr,"%s [-c] [-b] [-e] [-F filtertext] [-h] [-f rolofile] [-s fontsize]\n",argv[0]);
  717. X      exit(1);
  718. X      break;
  719. X    case 's':
  720. X      n = sscanf(optarg,"%d",&fontsize);
  721. X      if ( n == 0 ) fontsize = 5;
  722. X      break;
  723. X    }
  724. X  }
  725. X}
  726. X
  727. Xmain(argc,argv)
  728. X     int argc;
  729. X     char *argv[];
  730. X{
  731. X  char *text;
  732. X  RoloRec *rr;
  733. X  int high, height;
  734. X
  735. X  InitProlo(argc,argv);
  736. X  InitRolo(argc,argv,0);
  737. X  SetupRolo();
  738. X
  739. X  RoloFilter(filtertext);
  740. X
  741. X  /* find tallest entry */
  742. X  high = 0;
  743. X  for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  744. X    if ( ! rr->on ) continue;
  745. X    height = complines(rr);
  746. X    if ( height > high ) high = height;
  747. X  }
  748. X
  749. X  printf("%%!\n\n");
  750. X  printf("\n%% user parameters:  feel free to change the following parameters\n");
  751. X  printf("/fontsize %d def  %% size for font, play with this!\n",fontsize);
  752. X  printf("/equalbox %d def  %% if 1, put each entry in equal sized boxes\n",equal);
  753. X  printf("/boxmode %d def   %% if 1, draw boxes around each entry\n",box);
  754. X  printf("/cardinfo %d def  %% if 1, print card contents\n",card);
  755. X  printf("\n%% other parameters\n");
  756. X  printf("/ystart 750 def\n");
  757. X  printf("/xwidth 525 def\n");
  758. X  printf("/tallest %d def   %% tallest entry in # of lines\n",high);
  759. X  printf("cardinfo 0 eq { /tallest 1 def } if\n");
  760. X  printf("0.1 setlinewidth\n");
  761. X  printf("/Times-Roman findfont fontsize scalefont setfont\n");
  762. X  printf("/mw 0 def\n");
  763. X  printf("/mw2 0 def\n\n");
  764. X  printf("/mw3 0 def\n\n");
  765. X  printf("/mw4 0 def\n\n");
  766. X
  767. X  printf("\n%% define procedures\n");
  768. X  printf("/newpage { showpage fontsize 5 mul 750 moveto } def\n");
  769. X  printf("/movecol { currentpoint pop mw add mw2 add ystart moveto } def\n");
  770. X  printf("\n/newcol {  %% shift to a new column, if no more columns shift to new page\n");
  771. X  printf("  movecol\n");
  772. X  printf("  currentpoint pop mw2 add\n");
  773. X  printf("  xwidth gt { newpage } if\n");
  774. X  printf("} def\n");
  775. X
  776. X  printf("\n/checkloc {  %% given # of lines, check if we can fit in this column\n");
  777. X  printf("  equalbox 1 eq { pop tallest } if  %% if in equal box mode, ignore # lines tall\n");
  778. X  printf("  height mul 100 add      %% projected location after next printing (with padding)\n");
  779. X  printf("  currentpoint exch pop   %% space left in column\n");
  780. X  printf("  gt { newcol } if        %% if it won't fit, start new column\n");
  781. X  printf("} def\n");
  782. X
  783. X  printf("\n/boxit {  %% given # of lines, draw a box mw+mw2 wide and # lines tall\n");
  784. X  printf("  boxmode 1 eq {\n");
  785. X  printf("    equalbox 1 eq { pop tallest } if  %% if in equal box mode, ignore # lines tall\n");
  786. X  printf("    gsave\n");
  787. X  printf("      currentpoint\n");
  788. X  printf("      newpath\n");
  789. X  printf("        exch 1 sub exch height sub 1 sub moveto\n");
  790. X  printf("        height mul\n");
  791. X  printf("        dup 0 exch rlineto\n");
  792. X  printf("        mw mw2 add 0 rlineto\n");
  793. X  printf("        neg 0 exch rlineto\n");
  794. X  printf("      closepath\n");
  795. X  printf("      stroke\n");
  796. X  printf("    grestore\n");
  797. X  printf("  } if\n");
  798. X  printf("} def\n");
  799. X
  800. X  printf("\n/fixloc { %% # of lines just printed, adjust for equalbox\n");
  801. X  printf("  equalbox 1 eq {\n");
  802. X  printf("    height mul neg vjump add  %% compute how much farther down we need to go\n");
  803. X  printf("    0 exch rmoveto\n");
  804. X  printf("  } if\n");
  805. X  printf("} def\n");
  806. X
  807. X  printf("\n");
  808. X  printf("/sizestr { stringwidth /h exch def /w exch def } def\n");
  809. X  printf("/chmax { w mw gt { /mw w def } if } def\n");
  810. X  printf("/chmax2 { w mw2 gt { /mw2 w def } if } def\n");
  811. X  printf("/chmax3 { w mw3 gt { /mw3 w def } if } def\n");
  812. X  printf("/chmax4 { w mw4 gt { /mw4 w def } if } def\n");
  813. X  printf("/nshow { dup show sizestr mw w sub 0 rmoveto } def\n");
  814. X  printf("/tshow { cardinfo 1 eq { dup show sizestr w neg height rmoveto } if } def\n");
  815. X  printf("/pshow1 { dup show sizestr mw3 w sub 0 rmoveto } def\n");
  816. X  printf("/pshow2 { dup show sizestr mw3 w add neg height rmoveto } def\n");
  817. X  printf("/height fontsize neg def\n");
  818. X  printf("/vjump height tallest mul def\n");
  819. X
  820. X  printf("\n%% find widest entry\n");
  821. X  for ( rr = RoloList; rr != NULL; rr = rr->next )
  822. X    if ( rr->on ) printf("(%s) sizestr chmax\n",rr->name);
  823. X
  824. X  printf("/mw mw fontsize add def\n");
  825. X
  826. X  printf("\n%% find widest text\n");
  827. X  for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  828. X    if ( ! rr->on ) continue;
  829. X    text = rr->text;
  830. X    while ( *text != '\0' ) {
  831. X      printf("(");
  832. X      while (*text != '\n' && *text != '\0') putc(*text++,stdout);
  833. X      printf(") sizestr chmax2\n");
  834. X      if ( *text != '\0' ) text++;
  835. X    }
  836. X  }
  837. X
  838. X  printf("\n%% find widest primary number\n");
  839. X  for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  840. X    if ( ! rr->on ) continue;
  841. X    printf("(%s) sizestr chmax3\n",rr->number);
  842. X  }
  843. X
  844. X  printf("/mw3 mw3 fontsize add def\n");
  845. X
  846. X  printf("\n%% find widest secondary number\n");
  847. X  for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  848. X    if ( ! rr->on ) continue;
  849. X    printf("(%s) sizestr chmax4\n",rr->number2);
  850. X  }
  851. X
  852. X  printf("mw3 mw4 add mw2 gt { /mw2 mw3 mw4 add def } if\n");
  853. X
  854. X  printf("/mw2 mw2 fontsize add def\n");
  855. X
  856. X  printf("\n%% setup and print\n");
  857. X  printf("fontsize 5 mul 750 moveto\n");
  858. X
  859. X  for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  860. X    if ( ! rr->on ) continue;
  861. X    height = complines(rr);
  862. X    printf("%d checkloc\n",height);
  863. X    printf("%d boxit\n",height);
  864. X    printf("(%s) nshow\n",rr->name);
  865. X    printf("(%s) pshow1\n",rr->number);
  866. X    printf("(%s) pshow2\n",rr->number2);
  867. X    text = rr->text;
  868. X    while ( *text != '\0' ) {
  869. X      printf("(");
  870. X      while (*text != '\n' && *text != '\0') putc(*text++,stdout);
  871. X      printf(") tshow\n");
  872. X      if ( *text != '\0' ) text++;
  873. X    }
  874. X    printf("mw neg 0 rmoveto\n");
  875. X    printf("%d fixloc\n",height);
  876. X  }
  877. X
  878. X  printf("showpage\n");
  879. X  return 0;
  880. X}
  881. X
  882. END_OF_FILE
  883. if test 6532 -ne `wc -c <'mrolo13/prolo.c'`; then
  884.     echo shar: \"'mrolo13/prolo.c'\" unpacked with wrong size!
  885. fi
  886. # end of 'mrolo13/prolo.c'
  887. fi
  888. if test -f 'mrolo13/rolo.c' -a "${1}" != "-c" ; then 
  889.   echo shar: Will not clobber existing file \"'mrolo13/rolo.c'\"
  890. else
  891. echo shar: Extracting \"'mrolo13/rolo.c'\" \(8819 characters\)
  892. sed "s/^X//" >'mrolo13/rolo.c' <<'END_OF_FILE'
  893. X/* Copyright 1993 by gregg hanna */
  894. X#include <stdio.h>
  895. X#include <stdlib.h>
  896. X#include <errno.h>
  897. X#ifdef NO_X
  898. X#include <ctype.h>
  899. X#include <strings.h>
  900. X#else
  901. X#include <X11/Xos.h>
  902. X#endif
  903. X
  904. X#include "patchlevel.h"
  905. X#include "rolo.h"
  906. X#include "roloP.h"
  907. X#include "compat.h"
  908. X
  909. X#define EXPSIZE 1024
  910. X
  911. XRoloRec *RoloList = NULL;
  912. Xstatic char *rolofile = NULL;
  913. Xint verbose = 0;
  914. Xint RoloSearch[4] = {1,1,1,1};
  915. Xint selectFilter = 0;
  916. X
  917. X#include "myregexp.h"
  918. X
  919. Xint NumRoloOn()
  920. X{
  921. X  RoloRec *rr;
  922. X  int n;
  923. X
  924. X  for ( n = 0, rr = RoloList; rr != NULL; rr = rr->next )
  925. X    if ( rr->on ) n++;
  926. X  return n;
  927. X}
  928. X
  929. X#ifndef NO_TIME
  930. Xstatic char *CheckField(field)
  931. X     char *field;
  932. X{
  933. X  char *s, *t , *r, *buf;
  934. X  time_t time_val;
  935. X  int i;
  936. X
  937. X  if ( field == NULL ) return field;
  938. X  if ((r=mystrstrcase(field,"\nas of:"))!=NULL) {
  939. X    buf = (char*)malloc(strlen(field)+30);  /* allocate bigger buffer */
  940. X    /* copy text up to & including AS OF marker into buffer */
  941. X    for ( t = buf, s = field; s != r; t++, s++ )
  942. X      *t = *s;
  943. X    for ( i = 0; i < 7; i++, t++, s++ )
  944. X      *t = *s;
  945. X    for ( ; *s == ' ' || *s == '\t'; t++, s++ )
  946. X      *t = *s;
  947. X    *t = '\0';
  948. X    /* write new AS OF entry into buffer */
  949. X    time_val = time((time_t*)NULL);
  950. X    sprintf(t,"%s",ctime(&time_val));
  951. X    /* skip to eol in old & new string (i.e. skip old AS OF line) */
  952. X    while ( *s != '\n' && *s != '\0' ) s++;
  953. X    s++;
  954. X    while ( *t != '\n' && *t != '\0' ) t++;
  955. X    t++;
  956. X    /* copy rest of buffer */
  957. X    strcat(t,s);
  958. X    return buf;
  959. X  }
  960. X  return field;
  961. X}
  962. X#endif
  963. X
  964. Xvoid MakeNewRolo(name,number,number2,text,checkfield)
  965. X     char *name, *number, *number2, *text;
  966. X     int checkfield;
  967. X{
  968. X  RoloRec *rr, *pp;
  969. X  char *s;
  970. X
  971. X  rr = (RoloRec*)malloc(sizeof(RoloRec));
  972. X
  973. X  rr->next = NULL;
  974. X
  975. X  rr->name = mystrdup(name);
  976. X  s = index(rr->name,'\n');
  977. X  if ( s != NULL ) *s = '\0';
  978. X
  979. X  rr->number = mystrdup(number);
  980. X  s = index(rr->number,'\n');
  981. X  if ( s != NULL ) *s = '\0';
  982. X
  983. X  rr->number2 = mystrdup(number2);
  984. X  s = index(rr->number2,'\n');
  985. X  if ( s != NULL ) *s = '\0';
  986. X
  987. X#ifndef NO_TIME
  988. X  if ( checkfield )
  989. X    rr->text = CheckField(mystrdup(text));
  990. X  else
  991. X#endif
  992. X    rr->text = mystrdup(text);
  993. X
  994. X  rr->on = 1;
  995. X
  996. X  if ( RoloList == NULL ) RoloList = rr;
  997. X  else if ( mystrcasecmp(RoloList->name,rr->name) > 0 ) {
  998. X    rr->next = RoloList;
  999. X    RoloList = rr;
  1000. X  } else {
  1001. X    for ( pp = RoloList; pp->next != NULL; pp = pp->next )
  1002. X      if ( mystrcasecmp(pp->next->name,rr->name) > 0 ) break;
  1003. X    rr->next = pp->next;
  1004. X    pp->next = rr;
  1005. X  }
  1006. X}
  1007. X
  1008. X#ifndef ROLOFILENAME
  1009. X#ifdef VMS
  1010. X#define ROLOFILENAME "rolo-file"
  1011. X#else
  1012. X#define ROLOFILENAME ".rolo"
  1013. X#endif
  1014. X#endif
  1015. X
  1016. Xvoid InitRolo(argc,argv,stop)
  1017. X     int argc;
  1018. X     char *argv[];
  1019. X     int stop;
  1020. X{
  1021. X  int c;
  1022. X  extern char *optarg;
  1023. X  FILE *f;
  1024. X
  1025. X  rolofile = getenv("ROLODEX");
  1026. X  if ( rolofile == NULL ) {
  1027. X    rolofile = getenv("HOME");
  1028. X    if ( rolofile == NULL ) rolofile = ROLOFILENAME;
  1029. X    else {
  1030. X      rolofile = (char*)malloc(512);
  1031. X#ifndef VMS
  1032. X      sprintf(rolofile,"%s/%s",getenv("HOME"),ROLOFILENAME);
  1033. X#else
  1034. X      sprintf(rolofile,"%s%s",getenv("HOME"),ROLOFILENAME);
  1035. X#endif
  1036. X    }
  1037. X  }
  1038. X
  1039. X  verbose = 0;
  1040. X  while ((c = getopt(argc, argv, "sf:hv")) != -1) {
  1041. X    switch (c) {
  1042. X    case 's':
  1043. X      selectFilter = 1;
  1044. X      break;
  1045. X    case 'f':
  1046. X      rolofile = optarg;
  1047. X      break;
  1048. X    case 'v':
  1049. X      verbose = 1;
  1050. X      break;
  1051. X    case 'h':
  1052. X    case '?':
  1053. X    default:
  1054. X      if (!stop) break;
  1055. X      fprintf(stderr,"usage:  %s [-v] [-f rolodexfile]\n",argv[0]);
  1056. X      exit(1);
  1057. X      break;
  1058. X    }
  1059. X  }
  1060. X  if (verbose)
  1061. X    fprintf(stderr,"%s Version %d.%d Patch Level %d\n",argv[0],VERSION_MAJOR,VERSION_MINOR,PATCHLEVEL);
  1062. X  f = fopen(rolofile,"r");
  1063. X  if ( f == NULL ) {
  1064. X    if (verbose) fprintf(stderr,"Creating new rolodex file %s\n",rolofile);
  1065. X    f = fopen(rolofile,"w");
  1066. X  }
  1067. X  fclose(f);
  1068. X}
  1069. X
  1070. Xvoid SetupRolo()
  1071. X{
  1072. X  char name[STRSIZE], number[STRSIZE], number2[STRSIZE], text[STRSIZE], *s;
  1073. X  FILE *f;
  1074. X  int c;
  1075. X
  1076. X  f = fopen(rolofile,"r");
  1077. X  if ( f == NULL ) {
  1078. X    perror(rolofile);
  1079. X    exit(1);
  1080. X  }
  1081. X
  1082. X  while (!feof(f)) {
  1083. X
  1084. X    name[0] = number[0] = number2[0] = '\0';
  1085. X
  1086. X    /* get three lines, if we hit a ^L, punt */
  1087. X    fgets(name,STRSIZE,f);
  1088. X    if ( feof(f) ) /* yikes! eof in a record, or maybe empty file */
  1089. X      break;
  1090. X    s = index(name,'\f');
  1091. X    if ( s == NULL ) {
  1092. X      fgets(number,STRSIZE,f);
  1093. X      s = index(number,'\f');
  1094. X      if ( s == NULL ) {
  1095. X    fgets(number2,STRSIZE,f);
  1096. X    s = index(number2,'\f');
  1097. X      }
  1098. X    }
  1099. X    if ( s != NULL ) {
  1100. X      ungetc(12,f);
  1101. X      *s = '\0';
  1102. X    }
  1103. X
  1104. X    s = text;
  1105. X    while(1){
  1106. X      c = fgetc(f);
  1107. X      if ( c < 1 || c == 12 ) { *s = '\0'; break; }
  1108. X      *s = (char)c;
  1109. X      s++;
  1110. X    }
  1111. X    while ( c != 12 && !feof(f) ) c = fgetc(f);
  1112. X
  1113. X    MakeNewRolo(name,number,number2,text,0);
  1114. X
  1115. X    for ( c = fgetc(f); c == '\n'; c = fgetc(f) );
  1116. X
  1117. X    if ( c != -1 ) ungetc((char)c,f);
  1118. X  }
  1119. X
  1120. X  fclose(f);
  1121. X}
  1122. X
  1123. Xvoid DeleteRoloCard(n)
  1124. X     int n;
  1125. X{
  1126. X  RoloRec *rr, *pp;
  1127. X
  1128. X  if ( n < 0 ) return;
  1129. X
  1130. X  rr = GetN(n);
  1131. X  if ( rr == RoloList ) RoloList = RoloList->next;
  1132. X  else {
  1133. X    for ( pp = RoloList; pp->next != rr; pp = pp->next );
  1134. X    pp->next = rr->next;
  1135. X  }
  1136. X  if (rr->name != NULL)   free(rr->name);
  1137. X  if (rr->number != NULL) free(rr->number);
  1138. X  if (rr->number2 != NULL) free(rr->number2);
  1139. X  if (rr->text != NULL)   free(rr->text);
  1140. X  free((char*)rr);
  1141. X}
  1142. X
  1143. Xint backedUp = 0;
  1144. X
  1145. Xvoid Backup()
  1146. X{
  1147. X  char bakfile[STRSIZE], buf[10240];
  1148. X  FILE *in, *out;
  1149. X  int n;
  1150. X
  1151. X  sprintf(bakfile, "%s-", rolofile);
  1152. X  if (verbose)
  1153. X    fprintf(stderr,"Backing up '%s' to '%s'.\n",rolofile,bakfile);
  1154. X
  1155. X  if ((in = fopen(rolofile, "r")) == NULL) {
  1156. X    if (errno != ENOENT) {
  1157. X      perror(rolofile);
  1158. X      exit(1);
  1159. X    }
  1160. X  } else if ((out = fopen(bakfile, "w")) == NULL) {
  1161. X    perror(bakfile);
  1162. X    fprintf(stderr,"Unable to create backup rolodex file.\n");
  1163. X    fclose(in);
  1164. X  } else {
  1165. X    while ((n = fread(buf, 1, 10240, in)) > 0) 
  1166. X      fwrite(buf, 1, n, out);
  1167. X
  1168. X    fclose(in);
  1169. X    fclose(out);
  1170. X  }
  1171. X
  1172. X  backedUp = 1;
  1173. X}
  1174. X
  1175. Xvoid WriteRolo()
  1176. X{
  1177. X  FILE *f;
  1178. X  char  *s;
  1179. X  RoloRec *rr;
  1180. X
  1181. X  if ( ! backedUp ) Backup();
  1182. X
  1183. X  f = fopen(rolofile,"w");
  1184. X  if ( f == NULL ) {
  1185. X    perror("WriteRolo");
  1186. X    fprintf(stderr,"An error occured while trying to write your\n");
  1187. X    fprintf(stderr,"rolodex file.  The attempt is being aborted\n");
  1188. X    fprintf(stderr,"so your most recent changes might not be saved.\n");
  1189. X    fprintf(stderr,"The error occurred while attempting to open the\n");
  1190. X    fprintf(stderr,"file %s for writing.\n",rolofile);
  1191. X    return;
  1192. X  }
  1193. X
  1194. X  for ( rr = RoloList; rr != NULL; rr = rr->next ) {
  1195. X    /* write data */
  1196. X    if ( rr->name ) fprintf(f,"%s\n",rr->name);
  1197. X    else fputc('\n',f);
  1198. X    if ( rr->number ) fprintf(f,"%s\n",rr->number);
  1199. X    else fputc('\n',f);
  1200. X    if ( rr->number2 ) fprintf(f,"%s\n",rr->number2);
  1201. X    else fputc('\n',f);
  1202. X    if ( rr->text ) fprintf(f,"%s",rr->text);
  1203. X    /* do new-line check to make xrolo happy */
  1204. X    for ( s = &rr->text[strlen(rr->text)-1]; *s == ' ' || *s == '\t'; s-- );
  1205. X    if ( *s != '\n' ) fputc('\n',f);
  1206. X    fputc((char)12,f);
  1207. X    fputc('\n',f);
  1208. X  }
  1209. X  fclose(f);
  1210. X}
  1211. X
  1212. Xint GetIndex(s)
  1213. X     char *s;
  1214. X{
  1215. X  RoloRec *rr;
  1216. X  int n;
  1217. X
  1218. X  for ( rr = RoloList, n = 0; rr != NULL; rr = rr->next, n++ )
  1219. X    if ( rr->on && mystrcasecmp(rr->name,s) >= 0 ) break;
  1220. X
  1221. X  return n;
  1222. X}
  1223. X
  1224. XRoloRec *GetN(n)
  1225. X     int n;
  1226. X{
  1227. X  RoloRec *rr;
  1228. X
  1229. X  for ( rr = RoloList; rr != NULL && ! rr->on; rr = rr->next );
  1230. X  for ( ; rr != NULL; rr = rr->next ) {
  1231. X    if ( rr->on ) n--;
  1232. X    if ( n < 0 ) break;
  1233. X  }
  1234. X  return rr;
  1235. X}
  1236. X
  1237. Xchar *GetCardName(n)
  1238. X     int n;
  1239. X{
  1240. X  RoloRec *rr;
  1241. X  rr = GetN(n);
  1242. X  return (rr?rr->name:"");
  1243. X}
  1244. X
  1245. Xchar *GetNumber(n)
  1246. X     int n;
  1247. X{
  1248. X  RoloRec *rr;
  1249. X  rr = GetN(n);
  1250. X  return (rr?rr->number:"");
  1251. X}
  1252. X
  1253. Xchar *GetNumber2(n)
  1254. X     int n;
  1255. X{
  1256. X  RoloRec *rr;
  1257. X  rr = GetN(n);
  1258. X  return (rr?rr->number2:"");
  1259. X}
  1260. X
  1261. Xchar *GetText(n)
  1262. X     int n;
  1263. X{
  1264. X  RoloRec *rr;
  1265. X  rr = GetN(n);
  1266. X  return (rr?rr->text:"");
  1267. X}
  1268. X
  1269. Xstatic int AllSpace(s)
  1270. X     char *s;
  1271. X{
  1272. X  for ( ; *s != '\0'; s++)
  1273. X    if ( ! isspace(*s) ) return 0;
  1274. X  return 1;
  1275. X}
  1276. X
  1277. Xvoid RoloFilter(s)
  1278. X     char *s;
  1279. X{
  1280. X  RoloRec *rr;
  1281. X  char expbuf[EXPSIZE], *t;
  1282. X
  1283. X  if ( s == NULL || AllSpace(s) )
  1284. X    for ( rr = RoloList; rr != NULL; rr = rr->next )
  1285. X      rr->on = 1;
  1286. X  else {
  1287. X#ifndef DONT_REGEXP
  1288. X    if ( s[0] == '\\' ) {
  1289. X      s++;
  1290. X      t = re_comp(s);
  1291. X      if ( t != NULL ) { if ( verbose ) fprintf(stderr,"%s\n",t); }
  1292. X      else
  1293. X    for ( rr = RoloList; rr != NULL; rr = rr->next )
  1294. X      rr->on = ( (re_exec(rr->name) && RoloSearch[0]) ||
  1295. X             (re_exec(rr->number) && RoloSearch[1]) ||
  1296. X             (re_exec(rr->number2) && RoloSearch[2]) ||
  1297. X             (re_exec(rr->text) && RoloSearch[3]) );
  1298. X      re_free();
  1299. X    } else
  1300. X#endif
  1301. X      for ( rr = RoloList; rr != NULL; rr = rr->next )
  1302. X        rr->on = ( (mystrstrcase(rr->name,s) != NULL && RoloSearch[0]) ||
  1303. X           (mystrstrcase(rr->number,s) != NULL && RoloSearch[1]) ||
  1304. X           (mystrstrcase(rr->number2,s) != NULL && RoloSearch[2]) ||
  1305. X           (mystrstrcase(rr->text,s) != NULL && RoloSearch[3]) );
  1306. X  }
  1307. X}
  1308. END_OF_FILE
  1309. if test 8819 -ne `wc -c <'mrolo13/rolo.c'`; then
  1310.     echo shar: \"'mrolo13/rolo.c'\" unpacked with wrong size!
  1311. fi
  1312. # end of 'mrolo13/rolo.c'
  1313. fi
  1314. if test -f 'mrolo13/sample.Z.uu' -a "${1}" != "-c" ; then 
  1315.   echo shar: Will not clobber existing file \"'mrolo13/sample.Z.uu'\"
  1316. else
  1317. echo shar: Extracting \"'mrolo13/sample.Z.uu'\" \(10273 characters\)
  1318. sed "s/^X//" >'mrolo13/sample.Z.uu' <<'END_OF_FILE'
  1319. Xbegin 644 sample.Z
  1320. XM'YV03=[4H?/�L00=B(*2.'3A@%-2*VR%'#Q@V($F/4H''Q#)LZ;4!,">.&
  1321. XM3IHP9]Z 4* @S!P0;\SH  $BH!N$=<[0S $B1@X=,'[.H-$S1XX9+!DH:%*&
  1322. XMC9TT!FN^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IX]!*!VD *Y /HH*U$I3N9:YB(!\!AOC5S]PKW %$W%0
  1480. XMLA74,(Y- SD:2KM&,OPGV1H">R0"!3VS@Q*0SUWI<?MA<&!-*M(5] CT\&W.
  1481. XMA'.(*Z)R%X#5T@!N-^;T.8;X\D+O#'+(9(5$[#D%\A&JMD4/X42=:W/XIRCT
  1482. XM)72#*;%E"@ 0*3BF(56R!_"I-+1KNL"6Z1(LL0Z!8S-_C!6QBN10!U8&2O")
  1483. XMW(%B!(NCV )PP(C $Q10V &232$<BD/'N@DL IJT-#&CWII"E1D.R3%L0 8!
  1484. XM R72!)5P4HSA9O8%O6@7@L>ITW#D\O9@KOT3;'X5UQ*?V,%QA!'U0*S@V9OQ
  1485. X*.KKSOB'(_HG7 /8%
  1486. Xend
  1487. END_OF_FILE
  1488. if test 10273 -ne `wc -c <'mrolo13/sample.Z.uu'`; then
  1489.     echo shar: \"'mrolo13/sample.Z.uu'\" unpacked with wrong size!
  1490. fi
  1491. # end of 'mrolo13/sample.Z.uu'
  1492. fi
  1493. echo shar: End of archive 2 \(of 3\).
  1494. cp /dev/null ark2isdone
  1495. MISSING=""
  1496. for I in 1 2 3 ; do
  1497.     if test ! -f ark${I}isdone ; then
  1498.     MISSING="${MISSING} ${I}"
  1499.     fi
  1500. done
  1501. if test "${MISSING}" = "" ; then
  1502.     echo You have unpacked all 3 archives.
  1503.     rm -f ark[1-9]isdone
  1504. else
  1505.     echo You still need to unpack the following archives:
  1506.     echo "        " ${MISSING}
  1507. fi
  1508. ##  End of shell archive.
  1509. exit 0
  1510.  
  1511. exit 0 # Just in case...
  1512. -- 
  1513.   // chris@Sterling.COM           | Send comp.sources.x submissions to:
  1514. \X/  Amiga - The only way to fly! |    sources-x@sterling.com
  1515.  "It's intuitively obvious to the |
  1516.   most casual observer..."        | GCS d+/-- p+ c++ l+ m+ s++/+ g+ w+ t+ r+ x+
  1517.