chiark / gitweb /
@@@ more mess
[mLib] / test / tvec-main.c
index 25698a864c4657d28bd1800ea42312d72286e9a1..a9cff8f19ea6ee3cb6066acb46e9799249b02c7f 100644 (file)
@@ -56,7 +56,7 @@ static const struct outform {
   { 0,                 0 }
 };
 
-const struct tvec_info tvec_adhocinfo =
+const struct tvec_config tvec_adhocconfig =
   { 0, 1, 1, sizeof(struct tvec_reg) };
 
 static const struct outform *find_outform(const char *p)
@@ -103,7 +103,7 @@ Options:\n\
 }
 
 void tvec_parseargs(int argc, char *argv[], struct tvec_state *tv_out,
-                   int *argpos_out, const struct tvec_info *info)
+                   int *argpos_out, const struct tvec_config *config)
 {
   FILE *ofp = 0;
   const struct outform *of = 0;
@@ -155,7 +155,7 @@ void tvec_parseargs(int argc, char *argv[], struct tvec_state *tv_out,
   if (of) o = of->makefn(ofp);
   else o = tvec_dfltout(ofp);
 
-  tvec_begin(tv_out, info, o); *argpos_out = optind;
+  tvec_begin(tv_out, config, o); *argpos_out = optind;
 }
 
 int tvec_readstdin(struct tvec_state *tv)
@@ -223,12 +223,12 @@ int tvec_readargs(int argc, char *argv[], struct tvec_state *tv,
 }
 
 int tvec_main(int argc, char *argv[],
-             const struct tvec_info *info, const char *dflt)
+             const struct tvec_config *config, const char *dflt)
 {
   struct tvec_state tv;
   int argpos;
 
-  tvec_parseargs(argc, argv, &tv, &argpos, info);
+  tvec_parseargs(argc, argv, &tv, &argpos, config);
   tvec_readargs(argc, argv, &tv, &argpos, dflt);
   return (tvec_end(&tv));
 }