00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include <ctype.h>
00014
00015
00026 char *G_chop (char *line)
00027 {
00028 register char *f = line, *t = line;
00029
00030 while (isspace (*f))
00031 f++;
00032
00033 if (! *f)
00034 {
00035 *t = '\0';
00036 return (line);
00037 }
00038
00039 for (t = line; *t; t++)
00040 ;
00041 while ( isspace (*--t) )
00042 ;
00043 *++t = '\0';
00044
00045 t = line;
00046 while (*f)
00047 *t++ = *f++;
00048 *t = '\0';
00049
00050 return (line);
00051 }