Added documentation for statgen

This commit is contained in:
arcan1s
2013-07-27 23:38:42 +04:00
parent f2ec8c6580
commit 1af86034e7
54 changed files with 3953 additions and 308 deletions

View File

@ -1,16 +1,27 @@
/* Library for printing messages at output
*
* Usage:
* message (log, mode, text, output)
/**
* @file
*/
#include <stdio.h>
#include <time.h>
/**
* @fn message
*/
int message (const int log, const int mode, const char *text, FILE *output)
/* mode - number of message
* text - additional text
/**
* @brief function that prints messages to output
* @code
* message (log, mode, text, output);
* @endcode
*
* @param log equal to 1 if print to logfile
* @param mode number of message
* @param text additional text
* @param output output file (may be stdout)
*
* @return 0 - exit without errors
*/
{
char out[4096];
@ -18,6 +29,7 @@ int message (const int log, const int mode, const char *text, FILE *output)
if (log == 1)
{
char time_str[256];
time_t t = time (NULL);
struct tm* aTm = localtime (&t);
sprintf (time_str, "[%04d-%02d-%02d %02d:%02d:%02d] [%2i]: ", aTm->tm_year+1900,