[BACK]Return to apropos.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / apropos

Diff for /src/usr.bin/apropos/Attic/apropos.c between version 1.5 and 1.9

version 1.5, 1997/09/11 11:24:53 version 1.9, 2003/06/03 02:56:05
Line 13 
Line 13 
  * 2. Redistributions in binary form must reproduce the above copyright   * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the   *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.   *    documentation and/or other materials provided with the distribution.
  * 3. All advertising materials mentioning features or use of this software   * 3. Neither the name of the University nor the names of its contributors
  *    must display the following acknowledgement:  
  *      This product includes software developed by the University of  
  *      California, Berkeley and its contributors.  
  * 4. Neither the name of the University nor the names of its contributors  
  *    may be used to endorse or promote products derived from this software   *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.   *    without specific prior written permission.
  *   *
Line 64 
Line 60 
   
 static int *found, foundman;  static int *found, foundman;
   
 void apropos __P((char **, char *, int));  #define MAXLINELEN      8192            /* max line handled */
 void lowstr __P((char *, char *));  
 int match __P((char *, char *));  
 void usage __P((void));  
   
   void apropos(char **, char *, int);
   void lowstr(char *, char *);
   int match(char *, char *);
   void usage(void);
   
 int  int
 main(argc, argv)  main(argc, argv)
         int argc;          int argc;
Line 140 
Line 138 
         int buildpath;          int buildpath;
 {  {
         char *end, *name, **p;          char *end, *name, **p;
         char buf[LINE_MAX + 1], wbuf[LINE_MAX + 1];          char buf[MAXLINELEN + 1], wbuf[MAXLINELEN + 1];
           char hold[MAXPATHLEN];
   
         for (name = path; name; name = end) {   /* through name list */          for (name = path; name; name = end) {   /* through name list */
                 if ((end = strchr(name, ':')))                  if ((end = strchr(name, ':')))
                         *end++ = '\0';                          *end++ = '\0';
   
                 if (buildpath) {                  if (buildpath) {
                         char hold[MAXPATHLEN + 1];  
   
                         (void)snprintf(hold, sizeof(hold), "%s/%s", name,                          (void)snprintf(hold, sizeof(hold), "%s/%s", name,
                             _PATH_WHATIS);                              _PATH_WHATIS);
                         name = hold;                          name = hold;
Line 227 
Line 224 
 {  {
   
         (void)fprintf(stderr,          (void)fprintf(stderr,
             "usage: apropos [-C file] [-M path] [-m path] keyword ...\n");              "usage: apropos [-C file] [-M path] [-m path] keyword [...]\n");
         exit(1);          exit(1);
 }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.9