summaryrefslogtreecommitdiff
path: root/graphics/netpbm/patches/patch-ac
blob: 513dcda80eb139537eba49748e4c3d34dcc4bd7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
*** pbm/pbmtext.c~	Wed Oct 27 08:27:04 1993
--- pbm/pbmtext.c	Thu Nov 24 23:59:38 1994
***************
*** 105,114 ****
      else
  	{ /* Read text from stdin. */
  	lines = 0;
! 	while ( gets( buf ) != NULL )
  	    {
  	    int l;
  
  	    fix_control_chars( buf );
  	    l = strlen( buf );
  	    if ( lines >= maxlines )
--- 105,117 ----
      else
  	{ /* Read text from stdin. */
  	lines = 0;
! 	while ( fgets( buf , 5000, stdin) != NULL )
  	    {
  	    int l;
+ 	    char *nl = strchr (buf, '\n');
  
+ 	    if (nl)
+ 		*nl = 0;
  	    fix_control_chars( buf );
  	    l = strlen( buf );
  	    if ( lines >= maxlines )