apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: apr/build aplibtool.c
Date Sat, 07 Sep 2002 03:18:43 GMT
bjh         2002/09/06 20:18:43

  Modified:    build    aplibtool.c
  Log:
  Handle (well, ignore for now) -version switch.
  
  Revision  Changes    Path
  1.12      +19 -10    apr/build/aplibtool.c
  
  Index: aplibtool.c
  ===================================================================
  RCS file: /home/cvs/apr/build/aplibtool.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- aplibtool.c	30 Jun 2002 08:14:49 -0000	1.11
  +++ aplibtool.c	7 Sep 2002 03:18:43 -0000	1.12
  @@ -109,7 +109,7 @@
   
   void parse_args(int argc, char *argv[], cmd_data_t *cmd_data);
   bool parse_long_opt(char *arg, cmd_data_t *cmd_data);
  -bool parse_short_opt(char *arg, cmd_data_t *cmd_data);
  +int parse_short_opt(char *arg, cmd_data_t *cmd_data);
   bool parse_input_file_name(char *arg, cmd_data_t *cmd_data);
   bool parse_output_file_name(char *arg, cmd_data_t *cmd_data);
   void post_parse_fixup(cmd_data_t *cmd_data);
  @@ -162,7 +162,12 @@
                   arg = argv[++a];
                   argused = parse_output_file_name(arg, cmd_data);
               } else {
  -                argused = parse_short_opt(arg + 1, cmd_data);
  +                int num_used = parse_short_opt(arg + 1, cmd_data);
  +                argused = num_used > 0;
  +
  +                if (num_used > 1) {
  +                    a += num_used - 1;
  +                }
               }
           } else {
               argused = parse_input_file_name(arg, cmd_data);
  @@ -220,33 +225,37 @@
   
   
   
  -bool parse_short_opt(char *arg, cmd_data_t *cmd_data)
  +int parse_short_opt(char *arg, cmd_data_t *cmd_data)
   {
       if (strcmp(arg, "export-dynamic") == 0) {
  -        return true;
  +        return 1;
       }
   
       if (strcmp(arg, "module") == 0) {
  -        return true;
  +        return 1;
       }
   
       if (strcmp(arg, "Zexe") == 0) {
  -        return true;
  +        return 1;
       }
   
       if (strcmp(arg, "avoid-version") == 0) {
  -        return true;
  +        return 1;
       }
   
       if (strcmp(arg, "prefer-pic") == 0) {
  -        return true;
  +        return 1;
       }
   
       if (strcmp(arg, "prefer-non-pic") == 0) {
  -        return true;
  +        return 1;
  +    }
  +
  +    if (strcmp(arg, "version-info") == 0 ) {
  +        return 2;
       }
   
  -    return false;
  +    return 0;
   }
   
   
  
  
  

Mime
View raw message