join.c (28423) | join.c (48566) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Steve Hayman of the Computer Science Department, Indiana University, 7 * Michiro Hikida and David Goodenough. 8 * --- 32 unchanged lines hidden (view full) --- 41 The Regents of the University of California. All rights reserved.\n"; 42#endif /* not lint */ 43 44#ifndef lint 45#if 0 46static char sccsid[] = "@(#)join.c 8.6 (Berkeley) 5/4/95"; 47#endif 48static const char rcsid[] = | 1/*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Steve Hayman of the Computer Science Department, Indiana University, 7 * Michiro Hikida and David Goodenough. 8 * --- 32 unchanged lines hidden (view full) --- 41 The Regents of the University of California. All rights reserved.\n"; 42#endif /* not lint */ 43 44#ifndef lint 45#if 0 46static char sccsid[] = "@(#)join.c 8.6 (Berkeley) 5/4/95"; 47#endif 48static const char rcsid[] = |
49 "$Id: join.c,v 1.7 1997/07/15 09:57:28 charnier Exp $"; | 49 "$Id: join.c,v 1.8 1997/08/19 15:58:15 jlemon Exp $"; |
50#endif /* not lint */ 51 52#include <sys/param.h> 53 54#include <ctype.h> 55#include <err.h> 56#include <errno.h> 57#include <stdio.h> --- 395 unchanged lines hidden (view full) --- 453void 454outfield(lp, fieldno, out_empty) 455 LINE *lp; 456 u_long fieldno; 457 int out_empty; 458{ 459 if (needsep++) 460 (void)printf("%c", *tabchar); | 50#endif /* not lint */ 51 52#include <sys/param.h> 53 54#include <ctype.h> 55#include <err.h> 56#include <errno.h> 57#include <stdio.h> --- 395 unchanged lines hidden (view full) --- 453void 454outfield(lp, fieldno, out_empty) 455 LINE *lp; 456 u_long fieldno; 457 int out_empty; 458{ 459 if (needsep++) 460 (void)printf("%c", *tabchar); |
461 if (!ferror(stdout)) | 461 if (!ferror(stdout)) { |
462 if (lp->fieldcnt <= fieldno || out_empty) { 463 if (empty != NULL) 464 (void)printf("%s", empty); 465 } else { 466 if (*lp->fields[fieldno] == '\0') 467 return; 468 (void)printf("%s", lp->fields[fieldno]); 469 } | 462 if (lp->fieldcnt <= fieldno || out_empty) { 463 if (empty != NULL) 464 (void)printf("%s", empty); 465 } else { 466 if (*lp->fields[fieldno] == '\0') 467 return; 468 (void)printf("%s", lp->fields[fieldno]); 469 } |
470 } |
|
470 if (ferror(stdout)) 471 err(1, "stdout"); 472} 473 474/* 475 * Convert an output list argument "2.1, 1.3, 2.4" into an array of output 476 * fields. 477 */ --- 119 unchanged lines hidden --- | 471 if (ferror(stdout)) 472 err(1, "stdout"); 473} 474 475/* 476 * Convert an output list argument "2.1, 1.3, 2.4" into an array of output 477 * fields. 478 */ --- 119 unchanged lines hidden --- |