Expand|Select|Wrap|Line Numbers
- time_t rightnow;
- (void) time(&rightnow);
- fprintf(fp, "[%s] waited for pass %d to finish", asctime(localtime(&rightnow)), i)
[Sun Sep 17 20:15:55 2006
] waited for pass 0 to finish
instead of the originally intended/desired output being a single line...
[Sun Sep 17 20:15:55 2006] waited for pass 0 to finish
I've read somewhere that the function I'm looking for isn't part of regular C programming in that you'd have to pretty much build your own C version of the chomp() function handy in Perl (simply for trimming the last newline character).
Keeping in mind that this is writing to a log file and not the console, is there a way I can trim this newline character off the end of my or am I missing something here?