version 1.7, 2003/06/10 22:20:46 |
version 1.8, 2004/03/15 02:50:29 |
|
|
|
|
#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> |
|
|
(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 |
|
|
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 |