ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/applications/dynamicProps/DynamicPropsCmd.c
(Generate patch)

Comparing trunk/OOPSE-3.0/src/applications/dynamicProps/DynamicPropsCmd.c (file contents):
Revision 2004 by tim, Sun Feb 13 07:14:59 2005 UTC vs.
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC

# Line 33 | Line 33 | cmdline_parser_print_help (void)
33   {
34    cmdline_parser_print_version ();
35    printf("\n"
36 <  "Usage: %s [OPTIONS]...\n", CMDLINE_PARSER_PACKAGE);
36 >         "Usage: %s [OPTIONS]...\n", CMDLINE_PARSER_PACKAGE);
37    printf("\n");
38    printf("  -h, --help                    Print help and exit\n");
39    printf("  -V, --version                 Print version and exit\n");
# Line 80 | Line 80 | cmdline_parser (int argc, char * const *argv, struct g
80    args_info->rcorr_given = 0 ;
81    args_info->vcorr_given = 0 ;
82    args_info->dcorr_given = 0 ;
83 < #define clear_args() { \
84 <  args_info->input_arg = NULL; \
85 <  args_info->output_arg = NULL; \
86 <  args_info->sele1_arg = NULL; \
87 <  args_info->sele2_arg = NULL; \
88 < }
83 > #define clear_args() {                          \
84 >    args_info->input_arg = NULL;                \
85 >    args_info->output_arg = NULL;               \
86 >    args_info->sele1_arg = NULL;                \
87 >    args_info->sele2_arg = NULL;                \
88 >  }
89  
90    clear_args();
91  
# Line 160 | Line 160 | cmdline_parser (int argc, char * const *argv, struct g
160              }
161            args_info->rcorr_given = 1;
162            dynamicProps_group_counter += 1;
163 <        break;
163 >          break;
164  
165          case 'v':       /* velocity correlation function.  */
166            if (args_info->vcorr_given)
# Line 171 | Line 171 | cmdline_parser (int argc, char * const *argv, struct g
171              }
172            args_info->vcorr_given = 1;
173            dynamicProps_group_counter += 1;
174 <        break;
174 >          break;
175  
176          case 'd':       /* dipole correlation function.  */
177            if (args_info->dcorr_given)
# Line 182 | Line 182 | cmdline_parser (int argc, char * const *argv, struct g
182              }
183            args_info->dcorr_given = 1;
184            dynamicProps_group_counter += 1;
185 <        break;
185 >          break;
186  
187  
188          case 0: /* Long option with no short option */
189            /* select first stuntdouble set.  */
190            if (strcmp (long_options[option_index].name, "sele1") == 0)
191 <          {
192 <            if (args_info->sele1_given)
193 <              {
194 <                fprintf (stderr, "%s: `--sele1' option given more than once\n", CMDLINE_PARSER_PACKAGE);
195 <                clear_args ();
196 <                exit (EXIT_FAILURE);
197 <              }
198 <            args_info->sele1_given = 1;
199 <            args_info->sele1_arg = gengetopt_strdup (optarg);
200 <            break;
201 <          }
191 >            {
192 >              if (args_info->sele1_given)
193 >                {
194 >                  fprintf (stderr, "%s: `--sele1' option given more than once\n", CMDLINE_PARSER_PACKAGE);
195 >                  clear_args ();
196 >                  exit (EXIT_FAILURE);
197 >                }
198 >              args_info->sele1_given = 1;
199 >              args_info->sele1_arg = gengetopt_strdup (optarg);
200 >              break;
201 >            }
202            
203            /* select second stuntdouble set (if sele2 is not set, use script from sele1).  */
204            else if (strcmp (long_options[option_index].name, "sele2") == 0)
205 <          {
206 <            if (args_info->sele2_given)
207 <              {
208 <                fprintf (stderr, "%s: `--sele2' option given more than once\n", CMDLINE_PARSER_PACKAGE);
209 <                clear_args ();
210 <                exit (EXIT_FAILURE);
211 <              }
212 <            args_info->sele2_given = 1;
213 <            args_info->sele2_arg = gengetopt_strdup (optarg);
214 <            break;
215 <          }
205 >            {
206 >              if (args_info->sele2_given)
207 >                {
208 >                  fprintf (stderr, "%s: `--sele2' option given more than once\n", CMDLINE_PARSER_PACKAGE);
209 >                  clear_args ();
210 >                  exit (EXIT_FAILURE);
211 >                }
212 >              args_info->sele2_given = 1;
213 >              args_info->sele2_arg = gengetopt_strdup (optarg);
214 >              break;
215 >            }
216            
217  
218          case '?':       /* Invalid option.  */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines