diff th_args.c @ 380:ac10155d2b4a

Rename th_optarg_t to t_optarg. API break.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 01 Mar 2016 17:21:22 +0200
parents f4e182720870
children 1b3472ba7b23
line wrap: on
line diff
--- a/th_args.c	Tue Mar 01 17:18:58 2016 +0200
+++ b/th_args.c	Tue Mar 01 17:21:22 2016 +0200
@@ -17,17 +17,17 @@
 static BOOL th_args_process_opt(
     char *currArg, int *argIndex,
     int argc, char *argv[],
-    const th_optarg_t opts[], int nopts,
+    const th_optarg opts[], int nopts,
     BOOL (*handle_option)(int id, char *, char *),
     BOOL doProcess, BOOL isLong)
 {
-    const th_optarg_t *opt = NULL;
+    const th_optarg *opt = NULL;
     char *optArg = NULL;
     int optIndex;
 
     for (optIndex = 0; optIndex < nopts; optIndex++)
     {
-        const th_optarg_t *node = &opts[optIndex];
+        const th_optarg *node = &opts[optIndex];
         if (isLong && node->o_long != NULL)
         {
             if (strcmp(currArg, node->o_long) == 0)
@@ -99,7 +99,7 @@
  * calling the given callback functions.
  */
 BOOL th_args_process(int argc, char *argv[],
-     const th_optarg_t *opts, const int nopts,
+     const th_optarg *opts, const int nopts,
      BOOL(*handle_option)(int id, char *, char *),
      BOOL(*handle_other)(char *), const int flags)
 {
@@ -160,7 +160,7 @@
 /* Print help for commandline arguments/options
  */
 void th_args_help(FILE *fh,
-    const th_optarg_t *opts, const int nopts,
+    const th_optarg *opts, const int nopts,
     const int flags)
 {
     int index;
@@ -169,7 +169,7 @@
     // Print out option list
     for (index = 0; index < nopts; index++)
     {
-        const th_optarg_t *opt = &opts[index];
+        const th_optarg *opt = &opts[index];
         char tmpStr[128];
 
         // Print short option