added makefile and basics
This commit is contained in:
1 parent
93f9c0f252
commit
ef7b09cbeb
4 files changed
+159
No files matched your search
@@ -0,0 +1,30 @@
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int log_info( const char* format, ... )
|
||||
{
|
||||
int result;
|
||||
va_list args;
|
||||
|
||||
va_start( args, format );
|
||||
result = fprintf( stdout, format, args );
|
||||
va_end( args );
|
||||
|
||||
( void )fputc('\n', stdout);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int log_error( const char* format, ... )
|
||||
{
|
||||
int result;
|
||||
va_list args;
|
||||
|
||||
va_start( args, format );
|
||||
result = fprintf( stderr, format, args );
|
||||
va_end( args );
|
||||
|
||||
( void )fputc('\n', stderr);
|
||||
|
||||
return result;
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
#include "log.h"
|
||||
|
||||
int main( int argc, char** argv )
|
||||
{
|
||||
( void )argc;
|
||||
( void )argv;
|
||||
|
||||
log_info( "kuckuck!" );
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user