comparison th_util.c @ 17:19b2cbc91c2a

Updated th-libs.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 24 Mar 2008 20:04:00 +0000
parents ecfa4e3597e3
children 323c98360d8b
comparison
equal deleted inserted replaced
16:57ed9746ede7 17:19b2cbc91c2a
13 13
14 /* 14 /*
15 * Default settings 15 * Default settings
16 */ 16 */
17 #ifdef TH_NO_DEFAULTS 17 #ifdef TH_NO_DEFAULTS
18 #define TH_PROG_NAME ""
19 #define TH_PROG_FULLNAME ""
20 #define TH_PROG_VERSION ""
21 #define TH_PROG_AUTHOR "" 18 #define TH_PROG_AUTHOR ""
22 #define TH_PROG_LICENSE "" 19 #define TH_PROG_LICENSE ""
23 #else 20 #else
24 #define TH_PROG_NAME "program"
25 #define TH_PROG_FULLNAME "A Program"
26 #define TH_PROG_VERSION "0.0.0"
27 #define TH_PROG_AUTHOR "By Matti 'ccr' Hämäläinen (C) Copyright 2008 TNSP" 21 #define TH_PROG_AUTHOR "By Matti 'ccr' Hämäläinen (C) Copyright 2008 TNSP"
28 #define TH_PROG_LICENSE "This software is licensed under GNU GPL version 2" 22 #define TH_PROG_LICENSE "This software is licensed under GNU GPL version 2"
29 #endif 23 #endif
30 24
31 BOOL th_isInitialized = FALSE; 25 BOOL th_isInitialized = FALSE;
40 /* Initialize th_util-library and global variables 34 /* Initialize th_util-library and global variables
41 */ 35 */
42 void th_init(char *progName, char *progFullName, char *progVersion, 36 void th_init(char *progName, char *progFullName, char *progVersion,
43 char *progAuthor, char *progLicense) 37 char *progAuthor, char *progLicense)
44 { 38 {
45 if (progName) 39 th_prog_name = progName;
46 th_prog_name = progName; 40 th_prog_fullname = progFullName;
47 else 41 th_prog_version = progVersion;
48 th_prog_name = TH_PROG_NAME;
49
50 if (progFullName)
51 th_prog_fullname = progFullName;
52 else
53 th_prog_fullname = TH_PROG_FULLNAME;
54
55 if (progVersion)
56 th_prog_version = progVersion;
57 else
58 th_prog_version = TH_PROG_VERSION;
59 42
60 if (progAuthor) 43 if (progAuthor)
61 th_prog_author = progAuthor; 44 th_prog_author = progAuthor;
62 else 45 else
63 th_prog_author = TH_PROG_AUTHOR; 46 th_prog_author = TH_PROG_AUTHOR;