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

Diff for /src/usr.bin/banner/banner.c between version 1.2 and 1.3

version 1.2, 1996/06/26 05:31:33 version 1.3, 1998/12/07 20:09:40
Line 67 
Line 67 
 #endif /* not lint */  #endif /* not lint */
   
 #include <stdio.h>  #include <stdio.h>
   #include <unistd.h>
   #include <stdlib.h>
   #include <string.h>
   
 #include "banner.h"  #include "banner.h"
   
Line 80 
Line 83 
         register char *p;          register char *p;
         int c;          int c;
 {  {
         register scnwidth;          int scnwidth;
   
         /*          /*
          * <sjg> lpd makes chars out of the letter in question.           * <sjg> lpd makes chars out of the letter in question.
Line 127 
Line 130 
         int scfd, dlm;          int scfd, dlm;
         char *scsp;          char *scsp;
 {  {
         register char *strp;          char *strp;
         register nchrs, j;          int nchrs, j;
         char outbuf[LINELEN+1], *sp, c, cc;          char outbuf[LINELEN+1], *sp, c, cc;
         int d, scnhgt;          int d, scnhgt;
         extern char scnkey[][HEIGHT];   /* in lpdchar.c */          extern char scnkey[][HEIGHT];   /* in lpdchar.c */
Line 137 
Line 140 
                 strp = &outbuf[0];                  strp = &outbuf[0];
                 sp = scsp;                  sp = scsp;
                 for (nchrs = 0; ; ) {                  for (nchrs = 0; ; ) {
                         d = dropit(c = TRC(cc = *sp++));                          c = TRC(cc = *sp++);
                           d = dropit(c);
                         if ((!d && scnhgt > HEIGHT) || (scnhgt <= DROP && d))                          if ((!d && scnhgt > HEIGHT) || (scnhgt <= DROP && d))
                                 for (j = WIDTH; --j;)                                  for (j = WIDTH; --j;)
                                         *strp++ = BACKGND;                                          *strp++ = BACKGND;
                         else                          else
                                 strp = scnline(scnkey[c][scnhgt-1-d], strp, cc);                                  strp = scnline(scnkey[(int)c][scnhgt-1-d], strp, cc);
                         if (*sp == dlm || *sp == '\0' || nchrs++ >= PW/(WIDTH+1)-1)                          if (*sp == dlm || *sp == '\0' || nchrs++ >= PW/(WIDTH+1)-1)
                                 break;                                  break;
                         *strp++ = BACKGND;                          *strp++ = BACKGND;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3