--- /dev/null
+m4
+autom4te.cache
#!/bin/sh
+export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
if ! [ -e Makefile ] ;
then
echo "No Makefile available, generating it."
libtoolize --automake --force --copy
autoreconf --force --install
- PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --prefix=/usr/local
+ ./configure --prefix=/usr/local
else
echo "Makefile found, no need to generate it."
fi
lib_LTLIBRARIES = libplp.la
libplp_la_SOURCES = \
- plp_errcode.h \
+ retval.h \
log.h \
log_config.c
libplp_la_LDFLAGS = $(SRC_LIBS) $(all_libraries) -version-info 1:0:0 -no-undefined
DISTCLEANFILES = Makefile.in
libplpincludedir=$(includedir)/plp
libplpinclude_HEADERS = \
- plp_errcode.h \
+ retval.h \
log.h
#ifndef LOG_H_
#define LOG_H_
+#include <stdio.h>
+
#define log_debug(...) fprintf(stdout, __VA_ARGS__)
#define log_info(...) fprintf(stdout, __VA_ARGS__)
#define log_warning(...) fprintf(stderr, __VA_ARGS__)
* Author: lamikr
*/
-#ifndef PLP_COMMON_H_
-#define PLP_COMMON_H_
+#ifndef PLP_RETVAL_H_
+#define PLP_RETVAL_H_
enum
{
PLP_ERR_IO
};
-#endif /* PLP_COMMON_H_ */
+#endif /* PLP_RETVAL_H_ */
int main(int argc, char** argv)
{
- log_debug("debug\n");
+ log_debug("debug");
+ log_debug("debug v%d\n", 2);
log_info("info\n");
+ log_info("info v%d\n", 2);
log_warning("warning\n");
+ log_warning("warning v%d\n", 2);
log_error("error\n");
+ log_error("error v%d\n", 2);
return 0;
}