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

Diff for /src/usr.bin/join/join.c between version 1.10 and 1.11

version 1.10, 1997/08/25 05:31:10 version 1.11, 1998/11/16 06:09:12
Line 1 
Line 1 
 /* $Id$  /* $Id$ */
   
 /*-  /*-
  * Copyright (c) 1991, 1993, 1994   * Copyright (c) 1991, 1993, 1994
Line 471 
Line 471 
         int cnt;          int cnt;
   
         /* Output a pair of lines according to the join list (if any). */          /* Output a pair of lines according to the join list (if any). */
         if (olist)          if (olist) {
                 for (cnt = 0; cnt < olistcnt; ++cnt)                  for (cnt = 0; cnt < olistcnt; ++cnt)
                         if (olist[cnt].filenum == 1)                          if (olist[cnt].filenum == 1)
                                 outfield(lp1, olist[cnt].fieldno, 0);                                  outfield(lp1, olist[cnt].fieldno, 0);
                         else /* if (olist[cnt].filenum == 2) */                          else /* if (olist[cnt].filenum == 2) */
                                 outfield(lp2, olist[cnt].fieldno, 0);                                  outfield(lp2, olist[cnt].fieldno, 0);
         else {          } else {
                 /*                  /*
                  * Output the join field, then the remaining fields from F1                   * Output the join field, then the remaining fields from F1
                  * and F2.                   * and F2.
Line 504 
Line 504 
 {  {
         if (needsep++)          if (needsep++)
                 putchar((int)*tabchar);                  putchar((int)*tabchar);
         if (!ferror(stdout))          if (!ferror(stdout)) {
                 if (lp->fieldcnt < fieldno || out_empty) {                  if (lp->fieldcnt < fieldno || out_empty) {
                         if (empty != NULL)                          if (empty != NULL)
                                 fputs(empty, stdout);                                  fputs(empty, stdout);
Line 513 
Line 513 
                                 return;                                  return;
                         fputs(lp->fields[fieldno], stdout);                          fputs(lp->fields[fieldno], stdout);
                 }                  }
           }
         if (ferror(stdout))          if (ferror(stdout))
                 err(1, "stdout");                  err(1, "stdout");
 }  }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11