Diff for /embedtools/src/cfger.c between versions 1.2 and 1.3

version 1.2, 2014/02/05 15:44:05 version 1.3, 2017/06/28 15:19:32
Line 12  terms: Line 12  terms:
 All of the documentation and software included in the ELWIX and AITNET  All of the documentation and software included in the ELWIX and AITNET
 Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>  Releases is copyrighted by ELWIX - Sofia/Bulgaria <info@elwix.org>
   
Copyright 2004 - 2014Copyright 2004 - 2017
         by Michael Pounov <misho@elwix.org>.  All rights reserved.          by Michael Pounov <misho@elwix.org>.  All rights reserved.
   
 Redistribution and use in source and binary forms, with or without  Redistribution and use in source and binary forms, with or without
Line 61  Usage() Line 61  Usage()
                 "  Syntax: cfger [options] <file_config> [data]\n\n"                  "  Syntax: cfger [options] <file_config> [data]\n\n"
                 "\t-v\t\tVerbose ...\n"                  "\t-v\t\tVerbose ...\n"
                 "\t-q\t\tQuiet mode\n"                  "\t-q\t\tQuiet mode\n"
                   "\t-S\t\tShell script mode\n"
                 "\t-o <output>\tOutput result to file\n"                  "\t-o <output>\tOutput result to file\n"
                 "\t-l\t\tList A/V pairs\n"                  "\t-l\t\tList A/V pairs\n"
                 "\t-s <attr>\tSet A/V pair\n"                  "\t-s <attr>\tSet A/V pair\n"
Line 72  Usage() Line 73  Usage()
 int  int
 main(int argc, char **argv)  main(int argc, char **argv)
 {  {
        char ch, *str, m = 0, q = 0, szAttr[STRSIZ], szName[PATH_MAX] = { 0 };        char ch, *str, m = 0, q = 0, sh = 42, szAttr[STRSIZ], szName[PATH_MAX] = { 0 };
         int ret = 0;          int ret = 0;
         ait_val_t data = AIT_VAL_INITIALIZER(data);          ait_val_t data = AIT_VAL_INITIALIZER(data);
         FILE *out = stdout;          FILE *out = stdout;
   
        while ((ch = getopt(argc, argv, "hvqls:g:o:")) != -1)        while ((ch = getopt(argc, argv, "hvqlSs:g:o:")) != -1)
                 switch (ch) {                  switch (ch) {
                         case 'v':                          case 'v':
                                 Verbose++;                                  Verbose++;
Line 85  main(int argc, char **argv) Line 86  main(int argc, char **argv)
                         case 'q':                          case 'q':
                                 q = 42;                                  q = 42;
                                 break;                                  break;
                           case 'S':
                                   sh ^= sh;
                                   break;
                         case 'o':                          case 'o':
                                 strlcpy(szName, optarg, sizeof szName);                                  strlcpy(szName, optarg, sizeof szName);
                                 break;                                  break;
Line 171  main(int argc, char **argv) Line 175  main(int argc, char **argv)
                         }                          }
                 case 'l':                  case 'l':
                 default:                  default:
                        cfgWriteConfig(out, &cfg, 42);                        cfgWriteConfig(out, &cfg, sh);
                         break;                          break;
         }          }
 end:  end:

Removed from v.1.2  
changed lines
  Added in v.1.3


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>