]> pilppa.com Git - libplp.git/commitdiff
cleanups
authorMika Laitio <lamikr@pilppa.org>
Sun, 3 Oct 2010 21:20:21 +0000 (00:20 +0300)
committerMika Laitio <lamikr@pilppa.org>
Sun, 3 Oct 2010 21:20:21 +0000 (00:20 +0300)
.gitignore [new file with mode: 0644]
autobuild.sh
src/Makefile.am
src/log.h
src/retval.h [moved from src/plp_errcode.h with 67% similarity]
src_test/test_logs.c

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..54c1281
--- /dev/null
@@ -0,0 +1,2 @@
+m4
+autom4te.cache
index c3185915ac8428cf8424c807c6ca7e17772ba447..abb7d1c508e2e89b43e1fbdf38b1b7285ecc1cff 100755 (executable)
@@ -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
index bb4dbc0895c7ee17b3f7b63b3f3ba560930f61f9..e0ee76846bf22938933e5b3c397cd6537a3c47ec 100644 (file)
@@ -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
index c633ad935e32c684df2fea8f4ec028b2e3939229..17596df25c93a206fd27da21f8063804d1267219 100644 (file)
--- a/src/log.h
+++ b/src/log.h
@@ -8,6 +8,8 @@
 #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__)
similarity index 67%
rename from src/plp_errcode.h
rename to src/retval.h
index 47a4bb14ae03a7bb5756cf9d5d66dd82b79e46dd..1baf3c5eb576546554f023f50b17b38729d800dc 100644 (file)
@@ -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_ */
index 049fd4ecc7faed502c8c6dcb687e7baf29f3e6ff..3d01b2ff319fce37c0e0d5d97335f0bb9c678879 100644 (file)
 
 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;
 }