00001 /* ============================================================================ 00002 'outlog.cpp' defines functions used to write error logs. 00003 =============================================================================== 00004 Fetch header files. 00005 */ 00006 #include <stdio.h> 00007 /* ---------------------------------------------------------------------------- 00008 'writeOutLog' writes text to the end of a file. 00009 00010 Arguments: 00011 fname - The name of the file. 00012 text - The text to write. 00013 00014 Returned: 00015 Nothing. 00016 00017 Written by Michael R. Greason, ADNET, 08 November 2007. 00018 ---------------------------------------------------------------------------- */ 00019 void writeOutLog (const char *fname, const char *text) 00020 { 00021 FILE *fptr; 00022 if ((fptr = fopen(fname, "a")) == NULL) return; 00023 fprintf(fptr, "%s\n", text); 00024 fclose(fptr); 00025 }