-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
21 lines (16 loc) · 1.01 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
My first README file!
This program parses your C code and adds in an fprintf statement everywhere you have a
printf statement (with proper indentation). Intended for OSU FEH students in ENG 192 that are getting
annoyed at always having to copy and paste their printf statements so that the
program will print to the screen and an output file.
Still needs work:
--printf statements on the same line as a for loop; need to add squigly brackets so that the
fprintf statement will be executed as many times as the printf
EXAMPLE: for(i=0;i<10;i++) printf("Hey!");
YIELDS: for(i=0;i<10;i++) printf("Hey!");
fprintf(outfile, "Hey!);
--if the printf statement contains the an escaped double quotes part and there's a squigly
bracket inside it, the bracket might not get counted correctly
EXAMPLE: printf("She said, \"I sent him an unhappy emoticon :{\"");
YIELDS: printf("She said, \"I sent him an unhappy emoticon :{\"");
But the squigly counter gets incremented by one so future indentation will be off.