From: Mika Laitio Date: Sun, 3 Oct 2010 21:20:21 +0000 (+0300) Subject: cleanups X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2f0002fa1271a3a6f8f52bccdb256c9764c8e563;p=libplp.git cleanups --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..54c1281 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +m4 +autom4te.cache diff --git a/autobuild.sh b/autobuild.sh index c318591..abb7d1c 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -1,11 +1,12 @@ #!/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 diff --git a/src/Makefile.am b/src/Makefile.am index bb4dbc0..e0ee768 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ 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 @@ -8,5 +8,5 @@ AM_CPPFLAGS = $(SRC_CFLAGS) DISTCLEANFILES = Makefile.in libplpincludedir=$(includedir)/plp libplpinclude_HEADERS = \ - plp_errcode.h \ + retval.h \ log.h diff --git a/src/log.h b/src/log.h index c633ad9..17596df 100644 --- a/src/log.h +++ b/src/log.h @@ -8,6 +8,8 @@ #ifndef LOG_H_ #define LOG_H_ +#include + #define log_debug(...) fprintf(stdout, __VA_ARGS__) #define log_info(...) fprintf(stdout, __VA_ARGS__) #define log_warning(...) fprintf(stderr, __VA_ARGS__) diff --git a/src/plp_errcode.h b/src/retval.h similarity index 67% rename from src/plp_errcode.h rename to src/retval.h index 47a4bb1..1baf3c5 100644 --- a/src/plp_errcode.h +++ b/src/retval.h @@ -5,8 +5,8 @@ * Author: lamikr */ -#ifndef PLP_COMMON_H_ -#define PLP_COMMON_H_ +#ifndef PLP_RETVAL_H_ +#define PLP_RETVAL_H_ enum { @@ -16,4 +16,4 @@ enum PLP_ERR_IO }; -#endif /* PLP_COMMON_H_ */ +#endif /* PLP_RETVAL_H_ */ diff --git a/src_test/test_logs.c b/src_test/test_logs.c index 049fd4e..3d01b2f 100644 --- a/src_test/test_logs.c +++ b/src_test/test_logs.c @@ -15,9 +15,13 @@ 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; }