utils/slog.c
char* ret_slog(const char *msg, ...) 
{
    /* Used variables */
    static char output[MAXMSG];
    char string[MAXMSG];
    SystemDate mdate;

    /* initialise system date */
    get_system_date(&mdate);

    /* Read args */
    va_list args;
    va_start(args, msg);
    vsprintf(string, msg, args);
    va_end(args);

    /* Generate output string with date */
    sprintf(output, "%02d.%02d.%02d-%02d:%02d:%02d - %s", 
        mdate.year, mdate.mon, mdate.day, mdate.hour, 
        mdate.min, mdate.sec, string);

    /* Return output */
    return output;
}
/*
 * Retunr string in slog format. Function takes arguments 
 * and returns string in slog format without printing and 
 * saveing in file. Return value is char pointer.
 */
Retunr string in slog format. Function takes arguments
and returns string in slog format without printing and
saveing in file. Return value is char pointer.
Retunr string in slog format . Function takes arguments and returns string in slog format without printing and saveing in file . Return value is char pointer .
char* ret_slog(const char *msg, ...) 
{
    static char output[MAXMSG];
    char string[MAXMSG];
    SystemDate mdate;
    get_system_date(&mdate);
    va_list args;
    va_start(args, msg);
    vsprintf(string, msg, args);
    va_end(args);
    sprintf(output, "%02d.%02d.%02d-%02d:%02d:%02d - %s", 
        mdate.year, mdate.mon, mdate.day, mdate.hour, 
        mdate.min, mdate.sec, string);
    return output;
}
char * ret_slog ( const char * msg , ... ) { static char output [ MAXMSG ] ; char string [ MAXMSG ] ; SystemDate mdate ; get_system_date ( & mdate ) ; va_list args ; va_start ( args , msg ) ; vsprintf ( string , msg , args ) ; va_end ( args ) ; sprintf ( output , " " , mdate . year , mdate . mon , mdate . day , mdate . hour , mdate . min , mdate . sec , string ) ; return output ; }
Retunr string in slog format.
Retunr string in slog format .
/* Used variables */ /* initialise system date */ /* Read args */ /* Generate output string with date */ /* Return output */