diff options
Diffstat (limited to 'sed.c')
-rw-r--r-- | sed.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -126,7 +126,6 @@ extern int sed_main (int argc, char **argv) | |||
126 | } | 126 | } |
127 | } | 127 | } |
128 | 128 | ||
129 | fprintf(stderr, "argc=%d\n", argc); | ||
130 | while (argc-- > 0) { | 129 | while (argc-- > 0) { |
131 | name = *argv++; | 130 | name = *argv++; |
132 | 131 | ||
@@ -135,10 +134,9 @@ extern int sed_main (int argc, char **argv) | |||
135 | perror (name); | 134 | perror (name); |
136 | continue; | 135 | continue; |
137 | } | 136 | } |
138 | fprintf(stderr, "filename is '%s'\n", name); | ||
139 | 137 | ||
140 | haystack = (char*)malloc( 80); | 138 | haystack = (char*)malloc( BUF_SIZE); |
141 | while (fgets (haystack, sizeof (haystack), fp)) { | 139 | while (fgets (haystack, BUF_SIZE-1, fp)) { |
142 | 140 | ||
143 | foundOne = replace_match(haystack, needle, newNeedle, ignoreCase); | 141 | foundOne = replace_match(haystack, needle, newNeedle, ignoreCase); |
144 | if (noprintFlag==TRUE && foundOne==TRUE) | 142 | if (noprintFlag==TRUE && foundOne==TRUE) |