This commit is contained in:
brad 1999-03-19 02:01:37 +00:00
parent 6a5228bb5b
commit 34a5b38627
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,13 @@
--- pbm/pbmmerge.c.orig Wed Nov 3 10:28:55 1993
+++ pbm/pbmmerge.c Sun Jan 10 23:48:40 1999
@@ -29,6 +29,10 @@
{
++argv;
--argc;
+ if(!*argv) {
+ fprintf(stderr, "Usage: pbmmerge pbm_program_name [args ...]\n");
+ exit(1);
+ }
goto again;
}

View File

@ -0,0 +1,16 @@
--- pbm/pbmtext.c.orig Wed Oct 27 08:27:04 1993
+++ pbm/pbmtext.c Sun Jan 10 23:48:40 1999
@@ -105,10 +105,12 @@
else
{ /* Read text from stdin. */
lines = 0;
- while ( gets( buf ) != NULL )
+ while ( fgets( buf, sizeof(buf), stdin ) != NULL )
{
int l;
+ char *nl = strchr(buf, '\n');
+ if (nl) *nl = 0;
fix_control_chars( buf );
l = strlen( buf );
if ( lines >= maxlines )