Mercurial > repo
comparison fueue.c @ 1992:8fae55e99268
<oerjan> sed -i s/1000/10000/ fueue.c #Whistles innocently
author | HackBot |
---|---|
date | Sat, 02 Feb 2013 22:56:03 +0000 |
parents | 511c13628966 |
children |
comparison
equal
deleted
inserted
replaced
1991:511c13628966 | 1992:8fae55e99268 |
---|---|
276 | 276 |
277 int main(int argc, char *argv[]) | 277 int main(int argc, char *argv[]) |
278 { | 278 { |
279 Queue q; | 279 Queue q; |
280 initQueue(&q); // q is empty now | 280 initQueue(&q); // q is empty now |
281 char s[1000] = "72 101 108 108 111 44 32 119 111 114 108 100 33 10 H"; | 281 char s[10000] = "72 101 108 108 111 44 32 119 111 114 108 100 33 10 H"; |
282 int printmode = FALSE; // a debug mode that will print the fueue program at each step | 282 int printmode = FALSE; // a debug mode that will print the fueue program at each step |
283 int k = 0; | 283 int k = 0; |
284 | 284 |
285 switch (argc) | 285 switch (argc) |
286 { | 286 { |
291 { | 291 { |
292 printmode = TRUE; | 292 printmode = TRUE; |
293 } | 293 } |
294 else | 294 else |
295 { | 295 { |
296 strncpy(s, argv[1], 1000); | 296 strncpy(s, argv[1], 10000); |
297 } | 297 } |
298 break; | 298 break; |
299 case 3: | 299 case 3: |
300 strncpy(s, argv[2], 1000); | 300 strncpy(s, argv[2], 10000); |
301 printmode = (strcmp(argv[1], "--print") == 0); | 301 printmode = (strcmp(argv[1], "--print") == 0); |
302 break; | 302 break; |
303 default: | 303 default: |
304 fprintf(stderr, "Error: %s received too many arguments. The Hello world program\n", argv[0]); | 304 fprintf(stderr, "Error: %s received too many arguments. The Hello world program\n", argv[0]); |
305 break; | 305 break; |