Need to add more comments in the less used portions of the code. ZCT could become the most well commented program really... Also, remove all the // comments, as they all are just hacky tweaks being tested out, not actual comments.
Hehe, thanks for the code Dann. I actually want to keep them as // comments (just to keep track of them), and delete what they are commenting out. Whenever a // comment is used, its not for a comment, but just commenting out some code. The idea is that wherever I've done that I need to clean up the code there. There are some verify()s I have //ed out too, maybe I should make a ZCT_VERIFY macro...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Logged In: YES
user_id=263380
Originator: NO
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
char string[65535];
void change_comments(char *string)
{
char *where = strstr(string, "//");
if (where) {
where[1] = '*';
where = strchr(string, '\n');
if (where)
*where = 0;
strcat(string, " */\n");
}
}
int main(void)
{
while (fgets(string, sizeof string, stdin)) {
change_comments(string);
fputs(string, stdout);
}
}
Logged In: YES
user_id=2072047
Originator: YES
Hehe, thanks for the code Dann. I actually want to keep them as // comments (just to keep track of them), and delete what they are commenting out. Whenever a // comment is used, its not for a comment, but just commenting out some code. The idea is that wherever I've done that I need to clean up the code there. There are some verify()s I have //ed out too, maybe I should make a ZCT_VERIFY macro...