Mercurial > hg > nnchat
changeset 2:ecfa4e3597e3
Cleanups in th-libs.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 20 Mar 2008 01:06:03 +0000 |
parents | 351e96e01f4c |
children | 07095e801713 |
files | th_args.c th_string.c th_util.c |
diffstat | 3 files changed, 14 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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 <config.h> +#include "config.h" #endif #include "th_util.h" #include "th_args.h"
--- 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 <config.h> +#include "config.h" #endif #include "th_string.h"
--- 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 <config.h> +#include "config.h" #endif #include "th_util.h" #include <stdio.h> @@ -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) {