# HG changeset patch # User Matti Hamalainen # Date 1205975163 0 # Node ID ecfa4e3597e3d37ec5cd7dee706b80651a583308 # Parent 351e96e01f4cdb3335dd3d1c5eb0400a7997397b Cleanups in th-libs. diff -r 351e96e01f4c -r ecfa4e3597e3 th_args.c --- a/th_args.c Thu Mar 20 00:25:03 2008 +0000 +++ b/th_args.c Thu Mar 20 01:06:03 2008 +0000 @@ -117,7 +117,7 @@ */ #ifdef HAVE_CONFIG_H -#include +#include "config.h" #endif #include "th_util.h" #include "th_args.h" diff -r 351e96e01f4c -r ecfa4e3597e3 th_string.c --- a/th_string.c Thu Mar 20 00:25:03 2008 +0000 +++ b/th_string.c Thu Mar 20 01:06:03 2008 +0000 @@ -6,7 +6,7 @@ * Please read file 'COPYING' for information on license and distribution. */ #ifdef HAVE_CONFIG_H -#include +#include "config.h" #endif #include "th_string.h" diff -r 351e96e01f4c -r ecfa4e3597e3 th_util.c --- a/th_util.c Thu Mar 20 00:25:03 2008 +0000 +++ b/th_util.c Thu Mar 20 01:06:03 2008 +0000 @@ -6,7 +6,7 @@ * Please read file 'COPYING' for information on license and distribution. */ #ifdef HAVE_CONFIG_H -#include +#include "config.h" #endif #include "th_util.h" #include @@ -14,11 +14,19 @@ /* * Default settings */ -#define TH_PROG_NAME "program" -#define TH_PROG_FULLNAME "A Program" +#ifdef TH_NO_DEFAULTS +#define TH_PROG_NAME "" +#define TH_PROG_FULLNAME "" +#define TH_PROG_VERSION "" +#define TH_PROG_AUTHOR "" +#define TH_PROG_LICENSE "" +#else +#define TH_PROG_NAME "program" +#define TH_PROG_FULLNAME "A Program" #define TH_PROG_VERSION "0.0.0" #define TH_PROG_AUTHOR "By Matti 'ccr' Hämäläinen (C) Copyright 2008 TNSP" #define TH_PROG_LICENSE "This software is licensed under GNU GPL version 2" +#endif BOOL th_isInitialized = FALSE; int th_verbosityLevel = 2; @@ -34,7 +42,6 @@ void th_init(char *progName, char *progFullName, char *progVersion, char *progAuthor, char *progLicense) { - /* Free previous values */ if (progName) th_prog_name = progName; else @@ -108,10 +115,7 @@ } -/* - * Memory handling routines - * TODO: Write alternate implementations for calloc and realloc, - * to improve portability to platforms which don't implement them. +/* Memory handling routines */ void *th_malloc(size_t l) {