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

Diff for /src/usr.bin/finger/lprint.c between version 1.7 and 1.8

version 1.7, 2003/06/10 22:20:46 version 1.8, 2004/03/15 02:50:29
Line 34 
Line 34 
   
 #ifndef lint  #ifndef lint
 /*static char sccsid[] = "from: @(#)lprint.c    5.13 (Berkeley) 10/31/90";*/  /*static char sccsid[] = "from: @(#)lprint.c    5.13 (Berkeley) 10/31/90";*/
 static char rcsid[] = "$OpenBSD$";  static const char rcsid[] = "$OpenBSD$";
 #endif /* not lint */  #endif /* not lint */
   
 #include <sys/types.h>  #include <sys/types.h>
Line 258 
Line 258 
                 (void)printf("%s", str);                  (void)printf("%s", str);
         oddfield = !oddfield;                   /* toggle odd/even marker */          oddfield = !oddfield;                   /* toggle odd/even marker */
         lenlast = lenthis;          lenlast = lenthis;
         return(oddfield);          return (oddfield);
 }  }
   
 int  int
Line 270 
Line 270 
         lastc = 0;          lastc = 0;
         (void)snprintf(tbuf, sizeof(tbuf), "%s/%s", directory, file_name);          (void)snprintf(tbuf, sizeof(tbuf), "%s/%s", directory, file_name);
         if ((fp = fopen(tbuf, "r")) == NULL)          if ((fp = fopen(tbuf, "r")) == NULL)
                 return(0);                  return (0);
         (void)printf("%s\n", header);          (void)printf("%s\n", header);
         while ((ch = getc(fp)) != EOF)          while ((ch = getc(fp)) != EOF)
                 vputc(lastc = ch);                  vputc(lastc = ch);
         if (lastc != '\n')          if (lastc != '\n')
                 (void)putchar('\n');                  (void)putchar('\n');
         (void)fclose(fp);          (void)fclose(fp);
         return(1);          return (1);
 }  }
   
 void  void

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8