projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
note other reasons for pclose to return -1; wait(2) -> wait4(2)
[unix-history]
/
usr
/
src
/
libexec
/
comsat
/
comsat.c
diff --git
a/usr/src/libexec/comsat/comsat.c
b/usr/src/libexec/comsat/comsat.c
index
904911f
..
c71fc77
100644
(file)
--- a/
usr/src/libexec/comsat/comsat.c
+++ b/
usr/src/libexec/comsat/comsat.c
@@
-22,7
+22,7
@@
char copyright[] =
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)comsat.c 5.1
2
(Berkeley) %G%";
+static char sccsid[] = "@(#)comsat.c 5.1
3
(Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
@@
-227,14
+227,15
@@
jkfprintf(tp, name, offset)
strncmp(line, "Subject:", 8))
continue;
}
strncmp(line, "Subject:", 8))
continue;
}
+ if (linecnt <= 0 || charcnt <= 0) {
+ fprintf(tp, "...more...%s\n", cr);
+ return;
+ }
if (cp = index(line, '\n'))
*cp = '\0';
fprintf(tp, "%s%s\n", line, cr);
charcnt -= strlen(line);
if (cp = index(line, '\n'))
*cp = '\0';
fprintf(tp, "%s%s\n", line, cr);
charcnt -= strlen(line);
- if (--linecnt <= 0 || charcnt <= 0) {
- fprintf(tp, "...more...%s\n", cr);
- return;
- }
+ linecnt--;
}
fprintf(tp, "----%s\n", cr);
}
}
fprintf(tp, "----%s\n", cr);
}