changeset 60:eef9c6312b88

Change some internals.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 19 Sep 2012 23:55:44 +0300
parents 82cfbebaa8b9
children c0eefd6b2d11
files th_util.c th_util.h
diffstat 2 files changed, 22 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/th_util.c	Wed Aug 15 14:15:51 2012 +0300
+++ b/th_util.c	Wed Sep 19 23:55:44 2012 +0300
@@ -11,30 +11,30 @@
 /* Default settings
  */
 static BOOL    th_initialized = FALSE;
-int    th_verbosityLevel = 2;
-char    *th_prog_name = NULL,
-    *th_prog_fullname = NULL,
-    *th_prog_version = NULL,
-    *th_prog_author = NULL,
-    *th_prog_license = NULL;
+int            th_verbosityLevel = 2;
+char           *th_prog_name = NULL,
+               *th_prog_desc = NULL,
+               *th_prog_version = NULL,
+               *th_prog_author = NULL,
+               *th_prog_license = NULL;
 
 
 /* Initialize th_util-library and global variables
  */
-void th_init(char *progName, char *progFullName, char *progVersion,
-    char *progAuthor, char *progLicense)
+void th_init(char *name, char *desc, char *version,
+    char *author, char *license)
 {
-    th_prog_name = progName;
-    th_prog_fullname = progFullName;
-    th_prog_version = progVersion;
+    th_prog_name     = name;
+    th_prog_desc     = desc;
+    th_prog_version  = version;
 
-    if (progAuthor)
-        th_prog_author = progAuthor;
+    if (author)
+        th_prog_author = author;
     else
         th_prog_author = TH_PROG_AUTHOR;
 
-    if (progLicense)
-        th_prog_license = progLicense;
+    if (license)
+        th_prog_license = license;
     else
         th_prog_license = TH_PROG_LICENSE;
 
@@ -42,15 +42,15 @@
 }
 
 
-void th_print_banner(FILE *outFile, const char *binName, const char *progUsage)
+void th_print_banner(FILE *outFile, const char *binName, const char *usage)
 {
     fprintf(outFile,
             "\n%s v%s (%s)\n"
             "%s\n"
             "%s\n"
             "Usage: %s %s\n",
-            th_prog_name, th_prog_version, th_prog_fullname,
-            th_prog_author, th_prog_license, binName, progUsage);
+            th_prog_name, th_prog_version, th_prog_desc,
+            th_prog_author, th_prog_license, binName, usage);
 }
 
 
--- a/th_util.h	Wed Aug 15 14:15:51 2012 +0300
+++ b/th_util.h	Wed Sep 19 23:55:44 2012 +0300
@@ -60,16 +60,16 @@
  */
 extern int  th_verbosityLevel;
 extern char *th_prog_name,
-            *th_prog_fullname,
+            *th_prog_desc,
             *th_prog_version,
             *th_prog_author,
             *th_prog_license;
 
 /* Functions
  */
-void    th_init(char *progName, char *progFullName, char *progVersion,
-               char *progAuthor, char *progLicense);
-void    th_print_banner(FILE *outFile, const char *binName, const char *progUsage);
+void    th_init(char *name, char *desc, char *version,
+               char *author, char *license);
+void    th_print_banner(FILE *outFile, const char *binName, const char *usage);
 
 void    THERR(const char *, ...);
 void    THMSG(int, const char *, ...);