1: #include <stdio.h>
   2: #include <strings.h>
   3: #include "Extern.h"
   4: PrintLine(OffSet,LineStart,LineEnd)
   5: long OffSet; /* offset of LineStart from beginning of file */
   6: char *LineStart,
   7:     *LineEnd;
   8: {
   9:     char OffStr[80];
  10:     if (lFlag) {
  11:         if (strlen(FileName) > 76) {
  12:             fprintf(stderr,"bm: filename too long\n");
  13:             exit(2);
  14:         } /* if */
  15:         sprintf(OffStr,"%s\n",FileName);
  16:         write(1,OffStr,strlen(OffStr));
  17:         return;
  18:     } /* if */
  19:     if (FileName && !hFlag) {
  20:         if (strlen(FileName) > 76) {
  21:             fprintf(stderr,"bm: filename too long\n");
  22:             exit(2);
  23:         } /* if */
  24:         sprintf(OffStr,"%s:",FileName);
  25:         write(1,OffStr,strlen(OffStr));
  26:     } /* if */
  27:     if (nFlag) {
  28:         sprintf(OffStr,"%ld: ",OffSet);
  29:         write(1,OffStr,strlen(OffStr));
  30:     } /* if */
  31:     write(1,LineStart,LineEnd-LineStart+1);
  32:     if (*LineEnd != '\n') write (1,"\n",1);
  33: } /* PrintLine */

Defined functions

PrintLine defined in line 4; used 1 times
Last modified: 1986-05-23
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2580
Valid CSS Valid XHTML 1.0 Strict