/[gcl]/gcl/o/grab_defs.c
ViewVC logotype

Diff of /gcl/o/grab_defs.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by wfs, Mon Dec 6 22:44:11 1999 UTC revision 1.2 by camm, Sat Jul 20 07:10:55 2002 UTC
# Line 26  License for more details. Line 26  License for more details.
26  */  */
27  int pos = 0;  int pos = 0;
28  #define GETC(x) (pos++,getc(x))  #define GETC(x) (pos++,getc(x))
29  read_some(buf,n,start_ch,copy)  int
30    read_some(char *buf, int n, int start_ch, int copy)
31       /* if copy is not 0 then copy characters to stdout while scanning       /* if copy is not 0 then copy characters to stdout while scanning
32          to find start_ch.   When you find it, read n characters into buf,          to find start_ch.   When you find it, read n characters into buf,
33          return the number of characters read into buf, but these characters          return the number of characters read into buf, but these characters
34          MUST be free of start_ch.          MUST be free of start_ch.
35          */          */
36       char *buf;                
37       int n,start_ch,copy;                          
38  { int ch;  { int ch;
39    int prev = 0;    int prev = 0;
40    while (1)    while (1)
# Line 66  read_some(buf,n,start_ch,copy) Line 67  read_some(buf,n,start_ch,copy)
67                        
68                    
69    
70    int
71  main()  main(void)
72  { int ch,ch1;  {
73    char buf[20];    char buf[20];
74    while (3==read_some(buf,3,'\n',0))    while (3==read_some(buf,3,'\n',0))
75     { buf[3] = 0;     { buf[3] = 0;

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26