Changeset 3734
- Timestamp:
- Oct 27, 2009, 11:44:09 PM (11 years ago)
- Location:
- zzuf/trunk/test
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/test/check-utils
r2573 r3734 21 21 check "$ZZOPTS" "< $file" "zzuf" 22 22 fi 23 for n in 0 20 21 22 30 31 40 41 42; do23 for n in 0 20 21 22 23 30 31 40 41 42; do 24 24 check "$ZZOPTS" "$ZZCAT $n $file" "zzcat $n" 25 25 done -
zzuf/trunk/test/zzcat.c
r2563 r3734 55 55 FILE *stream; 56 56 int i, j, fd; 57 char c; 57 58 58 59 if(argc != 3) … … 112 113 fclose(stream); 113 114 break; 115 #if defined HAVE_GETLINE 116 case 23: /* getline() calls */ 117 stream = fopen(name, "r"); 118 if(!stream) 119 return EXIT_FAILURE; 120 i = 0; 121 while ((c = getc(stream)) != EOF) 122 { 123 char *line; 124 ssize_t ret; 125 size_t n; 126 127 ungetc(c, stream); 128 line = NULL; 129 ret = getline(&line, &n, stream); 130 for (j = 0; j < ret; i++, j++) 131 data[i] = line[j]; 132 } 133 fclose(stream); 134 break; 135 #endif 114 136 case 30: /* one fread(), then only getc() calls */ 115 137 stream = fopen(name, "r");
Note: See TracChangeset
for help on using the changeset viewer.