-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathoutlog.cpp
More file actions
25 lines (22 loc) · 785 Bytes
/
outlog.cpp
File metadata and controls
25 lines (22 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ============================================================================
'outlog.cpp' defines functions used to write error logs.
===============================================================================
Fetch header files.
*/
#include <stdio.h>
/* ----------------------------------------------------------------------------
'writeOutLog' writes text to the end of a file.
Arguments:
fname - The name of the file.
text - The text to write.
Returned:
Nothing.
Written by Michael R. Greason, ADNET, 08 November 2007.
---------------------------------------------------------------------------- */
void writeOutLog (const char *fname, const char *text)
{
FILE *fptr;
if ((fptr = fopen(fname, "a")) == NULL) return;
fprintf(fptr, "%s\n", text);
fclose(fptr);
}