home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / misc / volume13 / faces-1.4.5 / patch01 < prev    next >
Encoding:
Text File  |  1990-07-09  |  42.3 KB  |  1,308 lines

  1. Newsgroups: comp.sources.misc
  2. subject: v13i108: Official patch #6 for faces v1.4 - please apply it.
  3. from: rburridge@Sun.COM (Rich Burridge)
  4. Sender: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  5.  
  6. Posting-number: Volume 13, Issue 108
  7. Submitted-by: rburridge@Sun.COM (Rich Burridge)
  8. Archive-name: faces-1.4.5/patch01
  9.  
  10. Brandon, could you please post this to comp.sources.misc (and subsequently
  11. archive it). I've also sent a copy to comp.sources.bugs.
  12.  
  13. Thanks.
  14.  
  15. Rich Burridge,          DOMAIN: richb@Aus.Sun.COM
  16. PHONE: +61 2 413 2666   ACSnet: richb@sunaus.sun.oz.au
  17.  
  18. ------CUT HERE------CUT HERE------
  19.  
  20. This is official patch #6 to faces v1.4 - please apply it.
  21.  
  22. [**NOTE: faces v1.4 was posted to comp.sources.misc at patchlevel #5. **]
  23.  
  24. You should use the -p0 option to Larry Wall's patch program, to
  25. allow the patches for the filters directory files to be correctly
  26. applied. Then recompile, and reinstall. For example:
  27.  
  28. # Save this news item in a file called "patchfile"
  29. cd faces_src
  30. patch -p0 <patchfile
  31. make xview                   # Or Sunview, X11 or NeWS.
  32. make install                 # You might have to be super-user.
  33.  
  34. [Please note that I'm going to be overseas from the weekend until the
  35.  first week in August, so if you send me any mail with bugs, fixes or
  36.  enhancements, I probably won't reply until I return. Please don't let
  37.  that stop you making a dent in the TODO list (which has grown again
  38.  with this patch). :-) ]
  39.  
  40. This patch makes the following changes:
  41.  
  42.        * From Tony Landells <ahl@technix.oz.au>
  43.          Change all the .LP macros in the manual pages to .PP, since .PP is
  44.          an alternative to .LP is newer versions of the manual pages, while
  45.          it is the alternative to .P in older versions; but older versions
  46.          don't have .LP and newer ones don't have .P.  Thus .PP seems to be
  47.          the only universally accepted one.
  48.  
  49.        * From Pat Lashley <patl@Sun.COM>
  50.          make_iconname() is broken with respect to multi-level domains. One
  51.          symptom is that `unknown' will always come from misc.. The problem
  52.          is that the for loops are nested backwards.
  53.  
  54.        * From Pat Lashley <patl@Sun.COM>
  55.          Code to impliment simple NIS lookup for hosts not explicitly
  56.          mentioned in the machines table. Note there is another definition
  57.          at the front of the Makefile (NISLOOKUP), then should be uncommented
  58.          to use this feature. The README file has been updated.
  59.  
  60.        * From Dave Glowacki <dglo@ads.com>
  61.          From Steven M. Miller <miller@SCTC.COM>
  62.          If the geometry has been set with -geometry you don't want to try
  63.          and get the default. Additionally if no default is set XGetDefault
  64.          returns NULL which crashes the faces program.
  65.  
  66.        * From Chris Steinbroner <hesh@lll-crg.llnl.gov>
  67.          For system V and varients, there is no <strings.h>; it is <string.h>.
  68.          I've added yet another definition (SYSV) to the Makefile, that
  69.          should be uncommented, if this is the case for your machine. The
  70.          README file has been updated.
  71.  
  72.        * From Chris Steinbroner <hesh@lll-crg.llnl.gov>
  73.          Making rs2icon fails because my machine has no rasterfile.h
  74.          include file. The #include <rasterfile.h> has been removed from
  75.          this file, and the structure definition added to the source file.
  76.  
  77.        * From Chris Steinbroner <hesh@lll-crg.llnl.gov>
  78.          ikon2icon in the filters directory uses index(), so you have to do
  79.          the NOINDEX define stuff there too.
  80.  
  81. A copy of this patch has been sent to the moderator of comp.sources.misc,
  82. for posting, and subsequent archiving.
  83.  
  84. ------- main.c -------
  85. *** /tmp/da18469    Thu Jul  5 16:57:42 1990
  86. --- main.c    Thu Jul  5 15:49:42 1990
  87. ***************
  88. *** 17,28 ****
  89. --- 17,38 ----
  90.    */
  91.   
  92.   #include <stdio.h>
  93. + #ifdef SYSV
  94. + #include <string.h>
  95. + #else
  96.   #include <strings.h>
  97. + #endif /*SYSV*/
  98.   #include <sys/types.h>
  99.   #include <sys/stat.h>
  100.   #include <netdb.h>
  101. + #ifdef NISLOOKUP
  102. + #include <rpcsvc/ypclnt.h>
  103. + #endif /*NISLOOKUP*/
  104.   #include "faces.h"
  105.   
  106.   unsigned short noface_image[] = {
  107.   #include "noface.icon"
  108.   } ;
  109. ***************
  110. *** 73,79 ****
  111.   char face_user[MAXLINE] ;   /* Pointer to user name from the "From" line. */
  112.   char facedir[MAXLINE] ;          /* Alternate face image directory. */
  113.   char fname[MAXTYPES][MAXLINE] ;  /* Array of various face name types. */
  114. ! char geometry[MAXLINE] ;    /* X11 geometry information. */
  115.   char hostname[MAXLINE] ;    /* Machine name to monitor. */
  116.   char iconname[MAXLINE] ;    /* Name of the icon file for this person. */
  117.   char line[MAXLINE] ;        /* Next line from users mail spool file. */
  118. --- 83,90 ----
  119.   char face_user[MAXLINE] ;   /* Pointer to user name from the "From" line. */
  120.   char facedir[MAXLINE] ;          /* Alternate face image directory. */
  121.   char fname[MAXTYPES][MAXLINE] ;  /* Array of various face name types. */
  122. ! char geometry[MAXLINE] ;         /* X11 geometry information. */
  123. ! char hostcommunity[MAXLINE] ;    /* The community of the host machine */
  124.   char hostname[MAXLINE] ;    /* Machine name to monitor. */
  125.   char iconname[MAXLINE] ;    /* Name of the icon file for this person. */
  126.   char line[MAXLINE] ;        /* Next line from users mail spool file. */
  127. ***************
  128. *** 88,93 ****
  129. --- 99,109 ----
  130.   char *username ;            /* This users name. */
  131.   char userprog[MAXLINE] ;    /* User supplied program to run. */
  132.   
  133. + #ifdef NISLOOKUP
  134. + char *hostdomain ;               /* NIS domain of host machine */
  135. + char domaincommunity[MAXLINE] ;  /* Community for the current domain */
  136. + #endif /*NISLOOKUP*/
  137.   int beeps ;             /* Number of beeps for arrival of new mail. */
  138.   int column ;            /* Column number for next icon. */
  139.   int doing_xface = 0 ;   /* Set if we've started to process an X-Face: */
  140. ***************
  141. *** 199,204 ****
  142. --- 215,258 ----
  143.   #endif /*REVORDER*/
  144.     make_area(DISP_ICON, imagewidth, imageheight) ;
  145.   
  146. + /*  Initialize the host community to the official name of the current host
  147. +  *  (or it's translation via the machines table.)
  148. +  */
  149. +   {
  150. +     struct hostent *hp ;
  151. +     char hostname[MAXLINE] ;
  152. +     GETHOSTNAME(hostname, MAXLINE) ;
  153. +     hp = gethostbyname (hostname) ;
  154. +     if (hp != NULL) STRCPY(hostname, hp->h_name) ;
  155. +     h_to_c(hostname, hostcommunity) ;
  156. +   }
  157. + #ifdef NISLOOKUP
  158. +   {
  159. +     struct machinfo *temp ;
  160. +     yp_get_default_domain (&hostdomain) ;
  161. +     STRCPY(domaincommunity, hostdomain) ;
  162. + /*  We can't call h_to_c() to setup the default because it expects
  163. +  *  it to be set already; so we grovel through the machine/community
  164. +  *  association list directly.
  165. +  */
  166. +     for (temp = machines; temp != NULL; temp = temp->next)
  167. +       if (strcmp(temp->machine, domaincommunity) == 0)
  168. +         {
  169. +           STRCPY(domaincommunity, temp->community) ;
  170. +           break ;
  171. +         }
  172. +     IF_DEBUG( FPRINTF(stderr, "main: domain community is `%s`\n",
  173. +                       domaincommunity) ; )
  174. +   }
  175. + #endif /*NISLOOKUP*/
  176.     make_icon() ;                 /* Create default faces icon. */
  177.     make_frame(argc, argv) ;      /* Create faces window/icon. */
  178.     do_check() ;                  /* Generate initial faces display. */
  179. ***************
  180. *** 300,323 ****
  181.   {
  182.     struct hostent *hp ;
  183.     struct machinfo *temp ;      /* Pointer to next machine record. */
  184. !  
  185. !   temp = machines ;            /* Point to list of machine/communitys. */
  186.     if (host[0] == '\0')
  187.       {
  188. !       GETHOSTNAME(community, MAXLINE) ;
  189. !       hp = gethostbyname(community) ;
  190. !       if (hp != NULL) STRCPY(community, hp->h_name) ;
  191.       }
  192.     else STRCPY(community, host) ;   /* Copied in case machine name not found. */
  193. !   while (temp != NULL)
  194.       {
  195. !       if (!strcmp(temp->machine, community))
  196. !         {
  197. !           STRCPY(community, temp->community) ;
  198. !           return ;
  199. !         }
  200. !       temp = temp->next ;      /* Point to next record. */
  201.       }
  202.   }
  203.   
  204.   
  205. --- 354,407 ----
  206.   {
  207.     struct hostent *hp ;
  208.     struct machinfo *temp ;      /* Pointer to next machine record. */
  209. !   char *hostinfo ;             /* Info returned from yp_match */
  210. !   int len ;                    /* Length of returned hostinfo */
  211. !   int yp_err ;                 /* Result from yp_match() */
  212.     if (host[0] == '\0')
  213.       {
  214. ! /* Host not specified means use current host - return cached community. */
  215. !       STRCPY(community, hostcommunity) ;
  216. !       return ;
  217.       }
  218.     else STRCPY(community, host) ;   /* Copied in case machine name not found. */
  219. ! /* Grovel through the machine/community association list. */
  220. !   for (temp = machines; temp != NULL; temp = temp->next)
  221. !     if (strcmp(temp->machine, community) == 0)
  222. !       {
  223. !         STRCPY(community, temp->community) ;
  224. !         IF_DEBUG( FPRINTF(stderr,
  225. !                           "h_to_c(): machine `%s` found in community '%s'\n",
  226. !                           temp->machine, community) ; )
  227. !         return ;
  228. !       }
  229. ! #ifdef NISLOOKUP
  230. ! /*  yp_match() returns zero on success. We will treat any failure as
  231. !  *  a simple `no match' condition.
  232. !  */
  233. !   yp_err = yp_match(hostdomain, "hosts.byname",
  234. !                     host, strlen(host), &hostinfo, &len) ;
  235. !   if (yp_err == 0)
  236.       {
  237. ! /* We aren't interested in the value returned, only whether the key
  238. !  * was found...
  239. !  */
  240. !       STRCPY(community, domaincommunity) ;
  241. !       IF_DEBUG( FPRINTF(stderr, "NISlookup: found %s\n", host) ; )
  242.       }
  243. +   IF_DEBUG( else FPRINTF(stderr, "NISlookup: Error %d\n", yp_err) ; )
  244. +   IF_DEBUG( FPRINTF(stderr, "h_to_c(): community = '%s'\n", community) ; )
  245. + #endif /*NISLOOKUP*/
  246.   }
  247.   
  248.   
  249. ***************
  250. *** 346,354 ****
  251.   
  252.     old_style = 0 ;     /* Reset before checking this face. */
  253.   
  254.     if (strlen(facedir))
  255. !     for (i = -1; i < maxtypes; i++)
  256. !       for (cptr = community; cptr != NULL; cptr = index(cptr, '.'))
  257.           {
  258.             if (*cptr == '.') cptr++ ;
  259.             if (i < 0)
  260. --- 430,440 ----
  261.   
  262.     old_style = 0 ;     /* Reset before checking this face. */
  263.   
  264. +   IF_DEBUG( FPRINTF(stderr, "make_iconname: %s[%s] ", community, user) ; )
  265. +   
  266.     if (strlen(facedir))
  267. !     for (cptr = community; cptr != NULL; cptr = index(cptr, '.'))
  268. !       for (i = -1; i < maxtypes; i++)
  269.           {
  270.             if (*cptr == '.') cptr++ ;
  271.             if (i < 0)
  272. ***************
  273. *** 358,363 ****
  274. --- 444,450 ----
  275.                 if ((buf.st_mode & S_IFMT) == S_IFREG)
  276.                   {
  277.                     old_style = 1 ;
  278. +                   IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  279.                     return 1 ;
  280.                   }
  281.               }
  282. ***************
  283. *** 364,376 ****
  284.             else
  285.               {
  286.                 SPRINTF(iconname, "%s/%s/%s/%s", facedir, cptr, user, fname[i]) ;
  287. !               if (stat(iconname, &buf) != -1) return 1 ;
  288.               }
  289.           }
  290.   
  291.   mi1:
  292. !   for (i = -1; i < maxtypes; i++)
  293. !     for (cptr = community; cptr != NULL; cptr = index(cptr, '.'))
  294.         {
  295.           if (*cptr == '.') cptr++ ;
  296.           if (i < 0)
  297. --- 451,467 ----
  298.             else
  299.               {
  300.                 SPRINTF(iconname, "%s/%s/%s/%s", facedir, cptr, user, fname[i]) ;
  301. !               if (stat(iconname, &buf) != -1)
  302. !                 {
  303. !                   IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  304. !                   return 1 ;
  305. !                 }
  306.               }
  307.           }
  308.   
  309.   mi1:
  310. !   for (cptr = community; cptr != NULL; cptr = index(cptr, '.'))
  311. !     for (i = -1; i < maxtypes; i++)
  312.         {
  313.           if (*cptr == '.') cptr++ ;
  314.           if (i < 0)
  315. ***************
  316. *** 379,384 ****
  317. --- 470,476 ----
  318.               if (stat(iconname, &buf) == -1) goto mi2 ;
  319.               if ((buf.st_mode & S_IFMT) == S_IFREG)
  320.                 {    
  321. +                 IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  322.                   old_style = 1 ;
  323.                   return 1 ;
  324.                 }
  325. ***************
  326. *** 386,392 ****
  327.           else
  328.             {
  329.               SPRINTF(iconname, "%s/%s/%s/%s", defdir, cptr, user, fname[i]) ;
  330. !             if (stat(iconname, &buf) != -1) return 1 ;
  331.             }
  332.         }
  333.    
  334. --- 478,488 ----
  335.           else
  336.             {
  337.               SPRINTF(iconname, "%s/%s/%s/%s", defdir, cptr, user, fname[i]) ;
  338. !             if (stat(iconname, &buf) != -1)
  339. !               {
  340. !                 IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  341. !                 return 1 ;
  342. !               }
  343.             }
  344.         }
  345.    
  346. ***************
  347. *** 399,404 ****
  348. --- 495,501 ----
  349.             if (stat(iconname, &buf) == -1) goto mi3 ;
  350.             if ((buf.st_mode & S_IFMT) == S_IFREG)
  351.               {
  352. +               IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  353.                 old_style = 1 ;
  354.                 return 1 ;
  355.               }
  356. ***************
  357. *** 409,414 ****
  358. --- 506,512 ----
  359.             if (stat(iconname, &buf) != -1)
  360.               {
  361.                 if (!x_face) STRCPY(community, "misc.") ;
  362. +               IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  363.                 return 1 ;
  364.               }
  365.           }
  366. ***************
  367. *** 421,426 ****
  368. --- 519,525 ----
  369.           if (stat(iconname, &buf) == -1) goto mi4 ;
  370.           if ((buf.st_mode & S_IFMT) == S_IFREG)
  371.             {
  372. +             IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  373.               old_style = 1 ;
  374.               return 1 ;
  375.             }
  376. ***************
  377. *** 430,435 ****
  378. --- 529,535 ----
  379.           SPRINTF(iconname, "%s/misc./%s/%s", defdir, user, fname[i]) ;
  380.           if (stat(iconname, &buf) != -1)
  381.             {
  382. +             IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  383.               if (!x_face) STRCPY(community, "misc.") ;
  384.               return 1 ;
  385.             }
  386. ***************
  387. *** 437,444 ****
  388.    
  389.   mi4:
  390.     if (strlen(facedir))
  391. !     for (i = -1; i < maxtypes; i++)
  392. !       for (cptr = community; cptr != NULL; cptr = index(cptr, '.'))
  393.           {
  394.             if (*cptr == '.') cptr++ ;
  395.             if (i < 0)
  396. --- 537,544 ----
  397.    
  398.   mi4:
  399.     if (strlen(facedir))
  400. !     for (cptr = community; cptr != NULL; cptr = index(cptr, '.'))
  401. !       for (i = -1; i < maxtypes; i++)
  402.           {
  403.             if (*cptr == '.') cptr++ ;
  404.             if (i < 0)
  405. ***************
  406. *** 447,452 ****
  407. --- 547,553 ----
  408.                 if (stat(iconname, &buf) == -1) goto mi5 ;
  409.                 if ((buf.st_mode & S_IFMT) == S_IFREG)
  410.                   {    
  411. +                   IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  412.                     old_style = 1 ;
  413.                     return 1 ;
  414.                   }
  415. ***************
  416. *** 456,461 ****
  417. --- 557,563 ----
  418.                 SPRINTF(iconname, "%s/%s/unknown/%s", facedir, cptr, fname[i]) ;
  419.                 if (stat(iconname, &buf) != -1)
  420.                   {
  421. +                   IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  422.                     if (mtype == MONALL && !x_face) STRCPY(user, "unknown") ;
  423.                     return 1 ;
  424.                   }
  425. ***************
  426. *** 463,470 ****
  427.           }
  428.   
  429.   mi5:
  430. !   for (i = -1; i < maxtypes; i++)
  431. !     for (cptr = community; cptr != NULL; cptr = index(cptr, '.'))
  432.         {
  433.           if (*cptr == '.') cptr++ ;
  434.           if (i < 0)
  435. --- 565,572 ----
  436.           }
  437.   
  438.   mi5:
  439. !   for (cptr = community; cptr != NULL; cptr = index(cptr, '.'))
  440. !     for (i = -1; i < maxtypes; i++)
  441.         {
  442.           if (*cptr == '.') cptr++ ;
  443.           if (i < 0)
  444. ***************
  445. *** 473,478 ****
  446. --- 575,581 ----
  447.               if (stat(iconname, &buf) == -1) goto mi6 ;
  448.               if ((buf.st_mode & S_IFMT) == S_IFREG)
  449.                 {    
  450. +                 IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  451.                   old_style = 1 ;
  452.                   return 1 ;
  453.                 }
  454. ***************
  455. *** 482,487 ****
  456. --- 585,591 ----
  457.               SPRINTF(iconname, "%s/%s/unknown/%s", defdir, cptr, fname[i]) ;
  458.               if (stat(iconname, &buf) != -1)
  459.                 {
  460. +                 IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  461.                   if (mtype == MONALL && !x_face) STRCPY(user, "unknown") ;
  462.                   return 1 ;
  463.                 }
  464. ***************
  465. *** 497,502 ****
  466. --- 601,607 ----
  467.             if (stat(iconname, &buf) == -1) goto mi7 ;
  468.             if ((buf.st_mode & S_IFMT) == S_IFREG)
  469.               {
  470. +               IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  471.                 old_style = 1 ;
  472.                 return 1 ;
  473.               }
  474. ***************
  475. *** 506,511 ****
  476. --- 611,617 ----
  477.             SPRINTF(iconname, "%s/misc./unknown/%s", facedir, fname[i]) ;
  478.             if (stat(iconname, &buf) != -1)
  479.               {
  480. +               IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  481.                 if (!x_face) STRCPY(community, "misc.") ;
  482.                 if (mtype == MONALL && !x_face) STRCPY(user, "unknown") ;
  483.                 return 1 ;
  484. ***************
  485. *** 520,525 ****
  486. --- 626,632 ----
  487.           if (stat(iconname, &buf) == -1) return 0 ;
  488.           if ((buf.st_mode & S_IFMT) == S_IFREG)
  489.             {
  490. +             IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  491.               old_style = 1 ;
  492.               return 1 ;
  493.             }  
  494. ***************
  495. *** 529,534 ****
  496. --- 636,642 ----
  497.           SPRINTF(iconname, "%s/misc./unknown/%s", defdir, fname[i]) ;
  498.           if (stat(iconname, &buf) != -1)
  499.             {
  500. +             IF_DEBUG( FPRINTF(stderr, "found as %s\n", iconname) ; )
  501.               if (!x_face) STRCPY(community, "misc.") ;
  502.               if (mtype == MONALL && !x_face) STRCPY(user, "unknown") ;
  503.               return 1 ;
  504.  
  505. ------- mon.c -------
  506. *** /tmp/da18472    Thu Jul  5 16:57:44 1990
  507. --- mon.c    Thu Jul  5 15:50:52 1990
  508. ***************
  509. *** 15,21 ****
  510. --- 15,25 ----
  511.    */
  512.   
  513.   #include <stdio.h>
  514. + #ifdef SYSV
  515. + #include <string.h>
  516. + #else
  517.   #include <strings.h>
  518. + #endif /*SYSV*/
  519.   #include <sys/types.h>
  520.   #include <sys/stat.h>
  521.   #include <sys/time.h>
  522.  
  523. ------- rec.c -------
  524. *** /tmp/da18475    Thu Jul  5 16:57:45 1990
  525. --- rec.c    Thu Jul  5 15:57:19 1990
  526. ***************
  527. *** 15,21 ****
  528. --- 15,25 ----
  529.    */
  530.   
  531.   #include <stdio.h>
  532. + #ifdef SYSV
  533. + #include <string.h>
  534. + #else
  535.   #include <strings.h>
  536. + #endif /*SYSV*/
  537.   #include "faces.h"
  538.   #include "extern.h"
  539.   
  540.  
  541. ------- faces.h -------
  542. *** /tmp/da18478    Thu Jul  5 16:57:46 1990
  543. --- faces.h    Thu Jul  5 13:20:44 1990
  544. ***************
  545. *** 14,19 ****
  546. --- 14,25 ----
  547.    *  reported to me then an attempt will be made to fix them.
  548.    */
  549.   
  550. + #ifdef DEBUG
  551. + #define  IF_DEBUG(stmt)  stmt
  552. + #else
  553. + #define  IF_DEBUG(stmt)
  554. + #endif /*DEBUG*/
  555.   #define  FCLOSE        (void) fclose      /* To make lint happy. */
  556.   #define  FFLUSH        (void) fflush
  557.   #define  FGETS         (void) fgets
  558.  
  559. ------- patchlevel.h -------
  560. *** /tmp/da18482    Thu Jul  5 16:57:47 1990
  561. --- patchlevel.h    Thu Jul  5 12:46:00 1990
  562. ***************
  563. *** 14,17 ****
  564.    *  reported to me then an attempt will be made to fix them.
  565.    */
  566.   
  567. ! #define  PATCHLEVEL  5
  568. --- 14,17 ----
  569.    *  reported to me then an attempt will be made to fix them.
  570.    */
  571.   
  572. ! #define  PATCHLEVEL  6
  573.  
  574. ------- README -------
  575. *** /tmp/da18485    Thu Jul  5 16:57:48 1990
  576. --- README    Thu Jul  5 16:46:35 1990
  577. ***************
  578. *** 109,114 ****
  579. --- 109,115 ----
  580.   INVERT        - inverse video.
  581.   NEWSINCDIR    - NeWS only: location of the NeWS #include files.
  582.   NEWSLIBDIR    - NeWS only: location of the NeWS libraries.
  583. + NISLOOKUP     - uncomment to use Sun NIS (formerly YP) to look for hosts.
  584.   NODOMAINS     - uncomment if you don't want full host domain names.
  585.   NOINDEX       - uncomment if you don't have the index() function.
  586.   PERIOD        - alternate period in seconds before recheck.
  587. ***************
  588. *** 115,120 ****
  589. --- 116,122 ----
  590.   REVORDER      - byte reversal for little-endian machines.
  591.   SELTYPE       - uncomment for old select(2) calls.
  592.   SPOOLFILE     - alternate default spoolfile to monitor.
  593. + SYSV          - uncomment if you are running Unix System V.
  594.   TTEXT         - SunView only: uncomment on SunOS v3.x systems.
  595.   UPDATE        - alternate mail alias for faces database updating.
  596.   X11INCDIR     - X11 only: location of the X11 #include files.
  597. ***************
  598. *** 249,255 ****
  599.   James Ashton for the mail header face compression / uncompression code.
  600.   
  601.   Pat Lashley for fixing up the NeWS version; modifying it to use cps, and
  602. ! improving the quality of the NeWS code.
  603.   
  604.   Chris Maltby for the parsefrom routine used to extract the username and
  605.   hostname from the "From " and "From:"lines. Chris also supplied a shell
  606. --- 251,258 ----
  607.   James Ashton for the mail header face compression / uncompression code.
  608.   
  609.   Pat Lashley for fixing up the NeWS version; modifying it to use cps, and
  610. ! improving the quality of the NeWS code. Pat also added the ability to use
  611. ! the Sun NIS, to look for hosts not found in the machines.tab file.
  612.   
  613.   Chris Maltby for the parsefrom routine used to extract the username and
  614.   hostname from the "From " and "From:"lines. Chris also supplied a shell
  615. ***************
  616. *** 282,288 ****
  617.   parsing.
  618.   
  619.   Dave Cohrs for several fixes and enhancements, the addition of X11 bitmap
  620. ! support, and generally sorting out most of the problems with the X11 version.
  621.   
  622.   Greg Dudek for an alternative version of "on-the-fly" X-Face imaging which
  623.   hasn't been used.
  624. --- 285,292 ----
  625.   parsing.
  626.   
  627.   Dave Cohrs for several fixes and enhancements, the addition of X11 bitmap
  628. ! support, and generally sorting out most of the problems with the previous
  629. ! X11 version.
  630.   
  631.   Greg Dudek for an alternative version of "on-the-fly" X-Face imaging which
  632.   hasn't been used.
  633. ***************
  634. *** 289,296 ****
  635.   
  636.   Also thanks to Jeremy Cook, John Machin, Neil Crellin, Mark Andrews, Sjoerd
  637.   Mullender, Cameron Humphries, Rick Gunderson, Rich McAllister, Hakon Lie,
  638. ! John Fong, Chris Maltby, Darryl K. Ramm, Steve Piette, Tony Landells and
  639. ! Pat Lashley for various bug reports, fixes and suggestions for improvement.
  640.   
  641.   
  642.   ----------------------------------------------------------------------------
  643. --- 293,301 ----
  644.   
  645.   Also thanks to Jeremy Cook, John Machin, Neil Crellin, Mark Andrews, Sjoerd
  646.   Mullender, Cameron Humphries, Rick Gunderson, Rich McAllister, Hakon Lie,
  647. ! John Fong, Chris Maltby, Darryl K. Ramm, Steve Piette, Tony Landells, Pat
  648. ! Lashley, Dave Glowacki, Chris Steinbroner and Steven M. Miller for various
  649. ! bug reports, fixes and suggestions for improvement.
  650.   
  651.   
  652.   ----------------------------------------------------------------------------
  653.  
  654. ------- faces.1 -------
  655. *** /tmp/da18488    Thu Jul  5 16:57:49 1990
  656. --- faces.1    Thu Jul  5 12:54:32 1990
  657. ***************
  658. *** 94,100 ****
  659.   monitor mail, print queues or users on a system.. It contains graphical
  660.   interfaces for NeWS, SunView, XView and X11. It has five different modes of
  661.   operation:
  662. ! .LP
  663.   The default (no
  664.   .BR -a ,
  665.   .BR -H ,
  666. --- 94,100 ----
  667.   monitor mail, print queues or users on a system.. It contains graphical
  668.   interfaces for NeWS, SunView, XView and X11. It has five different modes of
  669.   operation:
  670. ! .PP
  671.   The default (no
  672.   .BR -a ,
  673.   .BR -H ,
  674. ***************
  675. *** 108,114 ****
  676.   or the time the mail message arrived. You can clear this area to the
  677.   background pattern by hitting the Delete key. The icon shows the image
  678.   of the last message to arrive.
  679. ! .LP
  680.   The second choice
  681.   .RB ( -a )
  682.   is to monitor the whole of a mail file. The open window will
  683. --- 108,114 ----
  684.   or the time the mail message arrived. You can clear this area to the
  685.   background pattern by hitting the Delete key. The icon shows the image
  686.   of the last message to arrive.
  687. ! .PP
  688.   The second choice
  689.   .RB ( -a )
  690.   is to monitor the whole of a mail file. The open window will
  691. ***************
  692. *** 117,123 ****
  693.   message from that user. The icon will display the image of the last
  694.   message, and a count of the total number of messages in the spool
  695.   file or mail folder.
  696. ! .LP
  697.   The third option
  698.   .RB ( -P )
  699.   allows this program to monitor a given print queue.
  700. --- 117,123 ----
  701.   message from that user. The icon will display the image of the last
  702.   message, and a count of the total number of messages in the spool
  703.   file or mail folder.
  704. ! .PP
  705.   The third option
  706.   .RB ( -P )
  707.   allows this program to monitor a given print queue.
  708. ***************
  709. *** 126,138 ****
  710.   number of jobs to be printed. Opening the window will show images of all
  711.   the jobs in the queue. The text on each image can be toggled, choices
  712.   being the owners' name and the size of the job in bytes.
  713. ! .LP
  714.   With the fourth mode
  715.   .RB ( -H ),
  716.   you can monitor who is logged in a machine.
  717.   For each user, a face image is displayed. Text can be either the username
  718.   or the time they logged on. The iconic form displays the total number of users.
  719. ! .LP
  720.   Finally
  721.   you can specify a program or shell script to run
  722.   .RB ( -e ).
  723. --- 126,138 ----
  724.   number of jobs to be printed. Opening the window will show images of all
  725.   the jobs in the queue. The text on each image can be toggled, choices
  726.   being the owners' name and the size of the job in bytes.
  727. ! .PP
  728.   With the fourth mode
  729.   .RB ( -H ),
  730.   you can monitor who is logged in a machine.
  731.   For each user, a face image is displayed. Text can be either the username
  732.   or the time they logged on. The iconic form displays the total number of users.
  733. ! .PP
  734.   Finally
  735.   you can specify a program or shell script to run
  736.   .RB ( -e ).
  737. ***************
  738. *** 140,146 ****
  739.   from this program will be read by the faces program, and the appropriate faces
  740.   displayed using the information provided. The format of this face information
  741.   is given in the faces manual page.
  742. ! .LP
  743.   There are special displays for no mail, no faces found, no print jobs,
  744.   no paper in the printer, and no users logged into a machine.
  745.   .SH OPTIONS
  746. --- 140,146 ----
  747.   from this program will be read by the faces program, and the appropriate faces
  748.   displayed using the information provided. The format of this face information
  749.   is given in the faces manual page.
  750. ! .PP
  751.   There are special displays for no mail, no faces found, no print jobs,
  752.   no paper in the printer, and no users logged into a machine.
  753.   .SH OPTIONS
  754. ***************
  755. *** 290,296 ****
  756.   .I username
  757.   level is a plain file (not a directory) it is assumed to be a
  758.   Blit icon.
  759. ! .LP
  760.   To access the face for the mail name
  761.   .I machine!uid
  762.   take the result of the first successful open from the following list of files:
  763. --- 290,296 ----
  764.   .I username
  765.   level is a plain file (not a directory) it is assumed to be a
  766.   Blit icon.
  767. ! .PP
  768.   To access the face for the mail name
  769.   .I machine!uid
  770.   take the result of the first successful open from the following list of files:
  771. ***************
  772. *** 332,338 ****
  773.   .I uucp.
  774.   If the faces directory hierarchy is not found, then a blank face image
  775.   will be used.
  776. ! .LP
  777.   Faces information is administered by a pair of ASCII files in the faces
  778.   directory that associate related machines and faces. The machine table
  779.   .I machine.tab
  780. --- 332,338 ----
  781.   .I uucp.
  782.   If the faces directory hierarchy is not found, then a blank face image
  783.   will be used.
  784. ! .PP
  785.   Faces information is administered by a pair of ASCII files in the faces
  786.   directory that associate related machines and faces. The machine table
  787.   .I machine.tab
  788. ***************
  789. *** 354,360 ****
  790.   .I richb
  791.   for the community
  792.   .I sunaus
  793. ! .LP
  794.   Note that you still need to use
  795.   .I mailtool
  796.   or some other mail reading utility to actually read the mail that this program
  797. --- 354,360 ----
  798.   .I richb
  799.   for the community
  800.   .I sunaus
  801. ! .PP
  802.   Note that you still need to use
  803.   .I mailtool
  804.   or some other mail reading utility to actually read the mail that this program
  805. ***************
  806. *** 361,367 ****
  807.   monitors;
  808.   .I faces
  809.   simply displays who the mail is from.
  810. ! .LP
  811.   When new mail arrives,
  812.   .B faces
  813.   will beep and flash appropriately, depending upon the set parameters in
  814. --- 361,367 ----
  815.   monitors;
  816.   .I faces
  817.   simply displays who the mail is from.
  818. ! .PP
  819.   When new mail arrives,
  820.   .B faces
  821.   will beep and flash appropriately, depending upon the set parameters in
  822. ***************
  823. *** 368,374 ****
  824.   the users
  825.   .I .mailrc
  826.   file.
  827. ! .LP
  828.   If you are using the NeWS version and creating face images of the
  829.   .I face.ps
  830.   form, then the following points should be noted:
  831. --- 368,374 ----
  832.   the users
  833.   .I .mailrc
  834.   file.
  835. ! .PP
  836.   If you are using the NeWS version and creating face images of the
  837.   .I face.ps
  838.   form, then the following points should be noted:
  839. ***************
  840. *** 375,381 ****
  841.   All graphics operations should be performed on the unit square; and
  842.   the final image will be translated to a 64 x 64 square image at
  843.   the appropriate position in the faces display.
  844. ! .LP
  845.   If you are using the
  846.   .B \-e
  847.   option, then the user program or shell script should firstly generate a
  848. --- 375,381 ----
  849.   All graphics operations should be performed on the unit square; and
  850.   the final image will be translated to a 64 x 64 square image at
  851.   the appropriate position in the faces display.
  852. ! .PP
  853.   If you are using the
  854.   .B \-e
  855.   option, then the user program or shell script should firstly generate a
  856. ***************
  857. *** 385,391 ****
  858.   .RE
  859.   where mm is the size in columns for the faces window and icon, and
  860.   nn is the size in rows. A window will be generated with these dimensions.
  861. ! .LP
  862.   This record is followed by the face information records, which are again
  863.   in fixed format. As well as providing the username and hostname, there are
  864.   four other fields which can be filled in, which denote what is displayed
  865. --- 385,391 ----
  866.   .RE
  867.   where mm is the size in columns for the faces window and icon, and
  868.   nn is the size in rows. A window will be generated with these dimensions.
  869. ! .PP
  870.   This record is followed by the face information records, which are again
  871.   in fixed format. As well as providing the username and hostname, there are
  872.   four other fields which can be filled in, which denote what is displayed
  873. ***************
  874. *** 404,410 ****
  875.   icon left      61    10
  876.   icon right    71    10
  877.   .TE
  878. ! .LP
  879.   Any of these fields may be left blank. There are also four special usernames,
  880.   which will display the appropriate standard icons. These are
  881.   .B "NOMAIL, NOPAPER, NOPRINT "
  882. --- 404,410 ----
  883.   icon left      61    10
  884.   icon right    71    10
  885.   .TE
  886. ! .PP
  887.   Any of these fields may be left blank. There are also four special usernames,
  888.   which will display the appropriate standard icons. These are
  889.   .B "NOMAIL, NOPAPER, NOPRINT "
  890.  
  891. ------- Makefile -------
  892. *** /tmp/da18491    Thu Jul  5 16:57:51 1990
  893. --- Makefile    Thu Jul  5 16:50:21 1990
  894. ***************
  895. *** 72,77 ****
  896. --- 72,83 ----
  897.   #NEWSINCDIR    = -I$(OPENWINHOME)/include
  898.   #NEWSLIBDIR    = -L$(OPENWINHOME)/lib
  899.   #------------------------------------------------------------------------
  900. + #  Uncomment the following two lines to use the Sun Network Information
  901. + #  Services (NIS, formerly YP) to look for hosts which do not explicitly
  902. + #  appear in the machines.tab file.
  903. + #
  904. + #NISLOOKUP    = -DNISLOOKUP
  905. + #------------------------------------------------------------------------
  906.   #  If you don't want faces to use full domain names for extracting face
  907.   #  icons, then you should uncomment the NODOMAINS definition below.
  908.   #
  909. ***************
  910. *** 109,115 ****
  911.   #  appropriately.
  912.   #
  913.   #SPOOLFILE       = -DSPOOLFILE=\"/usr/richb/Mail/pending\"
  914. ! #------------------------------------------------------------------------
  915.   #  If you are running SunOS v3.x, then pr_ttext doesn't exist, and
  916.   #  you must uncomment this definition.
  917.   #
  918. --- 115,126 ----
  919.   #  appropriately.
  920.   #
  921.   #SPOOLFILE       = -DSPOOLFILE=\"/usr/richb/Mail/pending\"
  922. ! #--------------------------------------------------------------------------
  923. ! #  If you are running on a Unix System V machine, then you should uncomment
  924. ! #  the next definition.
  925. ! #
  926. ! #SYSV        = -DSYSV
  927. ! #--------------------------------------------------------------------------
  928.   #  If you are running SunOS v3.x, then pr_ttext doesn't exist, and
  929.   #  you must uncomment this definition.
  930.   #
  931. ***************
  932. *** 150,165 ****
  933.   #
  934.   #  Options for submakes
  935.   #
  936. ! MAKEOPTS    = $(MFLAGS) BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) MANDIR=$(MANDIR)
  937.   
  938.   #
  939.   #  Compilation flags and standard macro definitions.
  940.   #
  941.   CDEFS        = $(BACKGROUND) $(DONTSHOWNO) $(DONTSHOWTIME) \
  942.             $(DONTSHOWUSER) $(CFACEDIR) $(FMONTYPE) $(INVERT) \
  943. !           $(NEWSINCDIR) $(NODOMAINS) $(NOINDEX) $(PERIOD) \
  944. !           $(REVORDER) $(SELTYPE) $(SPOOLFILE) $(TTEXT) $(UPDATE) \
  945. !           $(X11INCDIR) $(XVIEWINCDIR)
  946.   CCOMP        = -g
  947.   CFLAGS        = $(CCOMP) $(CDEFS)
  948.   #
  949. --- 161,183 ----
  950.   #
  951.   #  Options for submakes
  952.   #
  953. ! MAKEOPTS    = $(MFLAGS) BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) \
  954. !                 MANDIR=$(MANDIR) NOINDEX=$(NOINDEX)
  955.   
  956.   #
  957. + # Override DEBUG on the command line as `DEBUG=-DDEBUG' to enable various
  958. + # additional checking diagnostic output options.
  959. + #
  960. + DEBUG        =
  961. + #
  962.   #  Compilation flags and standard macro definitions.
  963.   #
  964.   CDEFS        = $(BACKGROUND) $(DONTSHOWNO) $(DONTSHOWTIME) \
  965.             $(DONTSHOWUSER) $(CFACEDIR) $(FMONTYPE) $(INVERT) \
  966. !           $(NEWSINCDIR) $(NISLOOKUP) $(NODOMAINS) $(NOINDEX) \
  967. !           $(PERIOD) $(REVORDER) $(SELTYPE) $(SPOOLFILE) $(SYSV) \
  968. !           $(TTEXT) $(UPDATE) $(X11INCDIR) $(XVIEWINCDIR) $(DEBUG)
  969.   CCOMP        = -g
  970.   CFLAGS        = $(CCOMP) $(CDEFS)
  971.   #
  972.  
  973. ------- x11.c -------
  974. *** /tmp/da18494    Thu Jul  5 16:57:52 1990
  975. --- x11.c    Thu Jul  5 15:24:04 1990
  976. ***************
  977. *** 164,169 ****
  978. --- 164,170 ----
  979.   int argc ;
  980.   char *argv[] ;
  981.   {
  982. +   char *def_geom ;
  983.     int i, j ;
  984.     unsigned short buf[256] ;
  985.   
  986. ***************
  987. *** 184,191 ****
  988.   
  989.     screen = DefaultScreen(dpy) ;
  990.     root = RootWindow(dpy, screen) ;
  991. !   if (geometry[0] != '\0')
  992. !     STRCPY(geometry, XGetDefault(dpy, progname, "Geometry")) ;
  993.   
  994.     foregnd = BlackPixel(dpy, screen) ;
  995.     backgnd = WhitePixel(dpy, screen) ;
  996. --- 185,193 ----
  997.   
  998.     screen = DefaultScreen(dpy) ;
  999.     root = RootWindow(dpy, screen) ;
  1000. !   if (geometry[0] == '\0' &&
  1001. !       (def_geom = XGetDefault(dpy, progname, "Geometry")) != NULL)
  1002. !     STRCPY(geometry, def_geom) ;
  1003.   
  1004.     foregnd = BlackPixel(dpy, screen) ;
  1005.     backgnd = WhitePixel(dpy, screen) ;
  1006.  
  1007. ------- TODO -------
  1008. *** /tmp/da18497    Thu Jul  5 16:57:53 1990
  1009. --- TODO    Thu Jul  5 15:32:25 1990
  1010. ***************
  1011. *** 57,62 ****
  1012. --- 57,67 ----
  1013.       to update the wrong face in the faces database. The only clean solution
  1014.       to this, is if faces only recognises X-Face lines in the mail header.
  1015.   
  1016. +     From Pat Lashley <patl@Sun.COM>
  1017. +     The problem with finding an X-Face: entry in an included message can be
  1018. +     resolved by a flag which would restrict X-Face: recognition to the header
  1019. +     or the first non-blank line of the body.
  1020.   12/ From Pat Lashley <patl@Sun.COM>
  1021.       An entry of the form `+domainname=community' in the machines.tab file to
  1022.       indicate that if a hostname is found without domain specifier, and it
  1023. ***************
  1024. *** 94,97 ****
  1025.   
  1026.   19/ Add an option to disable flashing and beeping when new mail arrives.
  1027.   
  1028. ! 20/ Optimise.
  1029. --- 99,127 ----
  1030.   
  1031.   19/ Add an option to disable flashing and beeping when new mail arrives.
  1032.   
  1033. ! 20/ From Pat Lashley <patl@Sun.COM>
  1034. !     Change window header to show what is being monitored (mail, lp1, users,
  1035. !     etc.)
  1036. ! 21/ From Pat Lashley <patl@Sun.COM>
  1037. !     A mixed-mode version which would use xview for the basic windowing and
  1038. !     property sheets; but use NeWS for the rendering. It is, of course,
  1039. !     dependant upon having the X/NeWS server, but there may be some way to
  1040. !     determine at run-time whether the NeWS operations are available, or
  1041. !     whether to stick to XView/X11 mechanisms.
  1042. ! 22/ From Steven M. Miller <miller@SCTC.COM>
  1043. !     I would like to use -iconic to specify iconic mode for X. This would
  1044. !     require change -i to -I for inverse in get.c and having -i to set iconic=1.
  1045. ! 23/ From Steven M. Miller <miller@SCTC.COM>
  1046. !     Under X, when faces is started up in iconic mode nothing is displayed in
  1047. !     the icon until the icon is clicked on and opened and then closed again.
  1048. ! 24/ From Kee Hinckley <nazgul@alphalpha.com>
  1049. !     Any possibility of changing that header to an RFC1154 (I think that's
  1050. !     the number) conformant form?  Namely an encoding field in the
  1051. !     header (presumbably with a new name for the faces format, or using
  1052. !     one of the existing ones (G3Fax uuencode would probably be good)).
  1053. ! 25/ Optimise.
  1054.  
  1055. ------- CHANGES -------
  1056. *** /tmp/da18500    Thu Jul  5 16:57:53 1990
  1057. --- CHANGES    Thu Jul  5 16:46:04 1990
  1058. ***************
  1059. *** 140,142 ****
  1060. --- 140,183 ----
  1061.            The definition for MANDIR in the main Makefile is incorrect.
  1062.   
  1063.          [Posted to comp.sources.misc]
  1064. + v1.4 - patchlevel 6 - 5th July 1990.
  1065. +        * From Tony Landells <ahl@technix.oz.au>
  1066. +          Change all the .LP macros in the manual pages to .PP, since .PP is
  1067. +          an alternative to .LP is newer versions of the manual pages, while
  1068. +          it is the alternative to .P in older versions; but older versions
  1069. +          don't have .LP and newer ones don't have .P.  Thus .PP seems to be
  1070. +          the only universally accepted one.
  1071. +        * From Pat Lashley <patl@Sun.COM>
  1072. +          make_iconname() is broken with respect to multi-level domains. One
  1073. +          symptom is that `unknown' will always come from misc.. The problem
  1074. +          is that the for loops are nested backwards.
  1075. +        * From Pat Lashley <patl@Sun.COM>
  1076. +          Code to impliment simple NIS lookup for hosts not explicitly
  1077. +          mentioned in the machines table. Note there is another definition
  1078. +          at the front of the Makefile (NISLOOKUP), then should be uncommented
  1079. +          to use this feature. The README file has been updated.
  1080. +        * From Dave Glowacki <dglo@ads.com>
  1081. +          From Steven M. Miller <miller@SCTC.COM>
  1082. +          If the geometry has been set with -geometry you don't want to try
  1083. +          and get the default. Additionally if no default is set XGetDefault
  1084. +          returns NULL which crashes the faces program.
  1085. +        * From Chris Steinbroner <hesh@lll-crg.llnl.gov>
  1086. +          For system V and varients, there is no <strings.h>; it is <string.h>.
  1087. +          I've added yet another definition (SYSV) to the Makefile, that
  1088. +          should be uncommented, if this is the case for your machine. The
  1089. +          README file has been updated.
  1090. +        * From Chris Steinbroner <hesh@lll-crg.llnl.gov>
  1091. +          Making rs2icon fails because my machine has no rasterfile.h
  1092. +          include file. The #include <rasterfile.h> has been removed from
  1093. +          this file, and the structure definition added to the source file.
  1094. +        * From Chris Steinbroner <hesh@lll-crg.llnl.gov>
  1095. +          ikon2icon in the filters directory uses index(), so you have to do
  1096. +          the NOINDEX define stuff there too.
  1097.  
  1098. ------- parsefrom.c -------
  1099. *** /tmp/da18503    Thu Jul  5 16:57:54 1990
  1100. --- parsefrom.c    Thu Jul  5 16:52:06 1990
  1101. ***************
  1102. *** 15,21 ****
  1103. --- 15,25 ----
  1104.    */
  1105.   
  1106.   #include <stdio.h>
  1107. + #ifdef SYSV
  1108. + #include <string.h>
  1109. + #else
  1110.   #include <strings.h>
  1111. + #endif /*SYSV*/
  1112.   #include "faces.h"
  1113.   
  1114.   
  1115.  
  1116. ------- filters/ikon2icon.c -------
  1117. *** /tmp/da18598    Thu Jul  5 17:00:10 1990
  1118. --- filters/ikon2icon.c    Thu Jul  5 16:48:44 1990
  1119. ***************
  1120. *** 16,27 ****
  1121.   
  1122.   #include <stdio.h>
  1123.   
  1124. ! #define  PATCHLEVEL  0
  1125.   
  1126.   #define  GETS        (void) gets     /* To make lint happy. */
  1127.   #define  PRINTF      (void) printf
  1128.   #define  SPRINTF     (void) sprintf
  1129.   #define  SSCANF      (void) sscanf
  1130.   
  1131.   #define  BLITHEIGHT  48       /* Maximum number of lines in a blit icon. */
  1132.   #define  MAXLINE     80       /* Maximum length for character strings. */
  1133. --- 16,31 ----
  1134.   
  1135.   #include <stdio.h>
  1136.   
  1137. ! #define  PATCHLEVEL  1
  1138.   
  1139.   #define  GETS        (void) gets     /* To make lint happy. */
  1140.   #define  PRINTF      (void) printf
  1141.   #define  SPRINTF     (void) sprintf
  1142.   #define  SSCANF      (void) sscanf
  1143. + #ifdef  NOINDEX
  1144. + #define  index        strchr
  1145. + #endif /*NOINDEX*/
  1146.   
  1147.   #define  BLITHEIGHT  48       /* Maximum number of lines in a blit icon. */
  1148.   #define  MAXLINE     80       /* Maximum length for character strings. */
  1149.  
  1150. ------- filters/rs2icon.c -------
  1151. *** /tmp/da18601    Thu Jul  5 17:00:11 1990
  1152. --- filters/rs2icon.c    Thu Jul  5 16:27:04 1990
  1153. ***************
  1154. *** 21,30 ****
  1155.    */
  1156.   
  1157.   #include <stdio.h>
  1158. ! #include <rasterfile.h>
  1159.   #include <strings.h>
  1160.   
  1161. ! #define  PATCHLEVEL  0
  1162.   
  1163.   #define  FPRINTF     (void) fprintf  /* To make lint happy. */
  1164.   #define  FREAD       (void) fread
  1165. --- 21,47 ----
  1166.    */
  1167.   
  1168.   #include <stdio.h>
  1169. ! #ifdef SYSV
  1170. ! #include <string.h>
  1171. ! #else
  1172.   #include <strings.h>
  1173. + #endif /*SYSV*/
  1174.   
  1175. ! #define  PATCHLEVEL  1
  1176. ! /* Taken from: @(#)rasterfile.h 1.11 89/08/21 SMI. */
  1177. ! struct rasterfile {
  1178. !         int     ras_magic;              /* magic number */
  1179. !         int     ras_width;              /* width (pixels) of image */
  1180. !         int     ras_height;             /* height (pixels) of image */
  1181. !         int     ras_depth;              /* depth (1, 8, or 24 bits) of pixel */
  1182. !         int     ras_length;             /* length (bytes) of image */
  1183. !         int     ras_type;               /* type of file; see RT_* below */
  1184. !         int     ras_maptype;            /* type of colormap; see RMT_* below */
  1185. !         int     ras_maplength;          /* length (bytes) of following map */
  1186. !         /* color map follows for ras_maplength bytes, followed by image */
  1187. ! };
  1188.   
  1189.   #define  FPRINTF     (void) fprintf  /* To make lint happy. */
  1190.   #define  FREAD       (void) fread
  1191.  
  1192. ------- filters/Makefile -------
  1193. *** /tmp/da18604    Thu Jul  5 17:00:11 1990
  1194. --- filters/Makefile    Thu Jul  5 16:45:35 1990
  1195. ***************
  1196. *** 12,25 ****
  1197.   #  to the comments or the code of this program, but if reported
  1198.   #  to me then an attempt will be made to fix them.
  1199.   
  1200. ! # BINDIR is expected to be overridden by the calling Makefile
  1201.   
  1202.   BINDIR        = /usr/local/bin
  1203.   
  1204. ! BINARIES    = icon2ikon ikon2icon rs2icon 
  1205.   
  1206.   CC        = cc
  1207. ! CFLAGS        = -g
  1208.   
  1209.   all:        $(BINARIES)
  1210.   
  1211. --- 12,35 ----
  1212.   #  to the comments or the code of this program, but if reported
  1213.   #  to me then an attempt will be made to fix them.
  1214.   
  1215. ! # BINDIR and NOINDEX are expected to be overridden by the calling Makefile
  1216.   
  1217. + #--------------------------------------------------------------------------
  1218.   BINDIR        = /usr/local/bin
  1219. + #--------------------------------------------------------------------------
  1220. + #  Not all machines have the index() string library function. If you
  1221. + #  don't have this function then you should uncomment the NOINDEX
  1222. + #  definition below.
  1223. + #
  1224. + #NOINDEX    = -DNOINDEX
  1225. + #--------------------------------------------------------------------------
  1226.   
  1227. ! BINARIES    = icon2ikon ikon2icon rs2icon
  1228.   
  1229.   CC        = cc
  1230. ! CDEFS        = $(NOINDEX)
  1231. ! CCOMP        = -g
  1232. ! CFLAGS        = $(CCOMP) $(CDEFS)
  1233.   
  1234.   all:        $(BINARIES)
  1235.   
  1236.  
  1237. ------- filters/icon2ikon.c -------
  1238. *** /tmp/da18607    Thu Jul  5 17:00:12 1990
  1239. --- filters/icon2ikon.c    Thu Jul  5 16:27:20 1990
  1240. ***************
  1241. *** 17,25 ****
  1242.    */
  1243.   
  1244.   #include <stdio.h>
  1245.   #include <string.h>
  1246.   
  1247. ! #define  PATCHLEVEL  0
  1248.   
  1249.   #define  FPRINTF     (void) fprintf     /* To make lint happy. */
  1250.   #define  PRINTF      (void) printf
  1251. --- 17,29 ----
  1252.    */
  1253.   
  1254.   #include <stdio.h>
  1255. + #ifdef SYSV
  1256.   #include <string.h>
  1257. + #else
  1258. + #include <strings.h>
  1259. + #endif /*SYSV*/
  1260.   
  1261. ! #define  PATCHLEVEL  1
  1262.   
  1263.   #define  FPRINTF     (void) fprintf     /* To make lint happy. */
  1264.   #define  PRINTF      (void) printf
  1265.  
  1266.