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

Comparing trunk/src/applications/dynamicProps/DynamicPropsCmd.c (file contents):
Revision 1603 by gezelter, Mon Jul 25 17:30:53 2011 UTC vs.
Revision 1604 by jmichalk, Mon Aug 8 18:53:40 2011 UTC

# Line 1 | Line 1
1   /*
2    File autogenerated by gengetopt version 2.22.4
3    generated with the following command:
4 <  gengetopt -F DynamicPropsCmd -u
4 >  /usr/local/bin/gengetopt -F DynamicPropsCmd -i DynamicProps.ggo
5  
6    The developers of gengetopt consider the fixed text that goes in all
7    gengetopt output files to be in the public domain:
# Line 27 | Line 27 | const char *gengetopt_args_info_purpose = "";
27  
28   const char *gengetopt_args_info_purpose = "";
29  
30 < const char *gengetopt_args_info_usage = "Usage: DynamicProps [OPTIONS]... [FILES]...";
30 > const char *gengetopt_args_info_usage = "Usage: DynamicProps [OPTIONS]...";
31  
32   const char *gengetopt_args_info_description = "";
33  
# Line 45 | Line 45 | const char *gengetopt_args_info_help[] = {
45    "  -v, --vcorr                   velocity correlation function",
46    "  -d, --dcorr                   dipole correlation function",
47    "  -l, --lcorr                   Lengendre correlation function",
48 +  "  -s, --sdcorr                  System dipole correlation function",
49    "      --r_rcorr                 Radial rmsd",
50    "      --thetacorr               Angular rmsd",
51    "      --drcorr                  Directional rmsd for particles with unit \n                                  vectors",
# Line 88 | Line 89 | void clear_given (struct gengetopt_args_info *args_inf
89    args_info->vcorr_given = 0 ;
90    args_info->dcorr_given = 0 ;
91    args_info->lcorr_given = 0 ;
92 +  args_info->sdcorr_given = 0 ;
93    args_info->r_rcorr_given = 0 ;
94    args_info->thetacorr_given = 0 ;
95    args_info->drcorr_given = 0 ;
# Line 131 | Line 133 | void init_args_info(struct gengetopt_args_info *args_i
133    args_info->vcorr_help = gengetopt_args_info_help[10] ;
134    args_info->dcorr_help = gengetopt_args_info_help[11] ;
135    args_info->lcorr_help = gengetopt_args_info_help[12] ;
136 <  args_info->r_rcorr_help = gengetopt_args_info_help[13] ;
137 <  args_info->thetacorr_help = gengetopt_args_info_help[14] ;
138 <  args_info->drcorr_help = gengetopt_args_info_help[15] ;
139 <  args_info->helfandEcorr_help = gengetopt_args_info_help[16] ;
140 <  args_info->stresscorr_help = gengetopt_args_info_help[17] ;
136 >  args_info->sdcorr_help = gengetopt_args_info_help[13] ;
137 >  args_info->r_rcorr_help = gengetopt_args_info_help[14] ;
138 >  args_info->thetacorr_help = gengetopt_args_info_help[15] ;
139 >  args_info->drcorr_help = gengetopt_args_info_help[16] ;
140 >  args_info->helfandEcorr_help = gengetopt_args_info_help[17] ;
141 >  args_info->stresscorr_help = gengetopt_args_info_help[18] ;
142    
143   }
144  
# Line 177 | Line 180 | cmdline_parser_init (struct gengetopt_args_info *args_
180    clear_given (args_info);
181    clear_args (args_info);
182    init_args_info (args_info);
180
181  args_info->inputs = 0;
182  args_info->inputs_num = 0;
183   }
184  
185   void
# Line 218 | Line 218 | cmdline_parser_release (struct gengetopt_args_info *ar
218   static void
219   cmdline_parser_release (struct gengetopt_args_info *args_info)
220   {
221 <  unsigned int i;
221 >
222    free_string_field (&(args_info->input_arg));
223    free_string_field (&(args_info->input_orig));
224    free_string_field (&(args_info->output_arg));
# Line 232 | Line 232 | cmdline_parser_release (struct gengetopt_args_info *ar
232    free_string_field (&(args_info->memory_orig));
233    
234    
235  for (i = 0; i < args_info->inputs_num; ++i)
236    free (args_info->inputs [i]);
235  
238  if (args_info->inputs_num)
239    free (args_info->inputs);
240
236    clear_given (args_info);
237   }
238  
# Line 289 | Line 284 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
284      write_into_file(outfile, "dcorr", 0, 0 );
285    if (args_info->lcorr_given)
286      write_into_file(outfile, "lcorr", 0, 0 );
287 +  if (args_info->sdcorr_given)
288 +    write_into_file(outfile, "sdcorr", 0, 0 );
289    if (args_info->r_rcorr_given)
290      write_into_file(outfile, "r_rcorr", 0, 0 );
291    if (args_info->thetacorr_given)
# Line 356 | Line 353 | reset_group_dynamicProps(struct gengetopt_args_info *a
353    args_info->vcorr_given = 0 ;
354    args_info->dcorr_given = 0 ;
355    args_info->lcorr_given = 0 ;
356 +  args_info->sdcorr_given = 0 ;
357    args_info->r_rcorr_given = 0 ;
358    args_info->thetacorr_given = 0 ;
359    args_info->drcorr_given = 0 ;
# Line 614 | Line 612 | cmdline_parser_internal (
612          { "vcorr",      0, NULL, 'v' },
613          { "dcorr",      0, NULL, 'd' },
614          { "lcorr",      0, NULL, 'l' },
615 +        { "sdcorr",     0, NULL, 's' },
616          { "r_rcorr",    0, NULL, 0 },
617          { "thetacorr",  0, NULL, 0 },
618          { "drcorr",     0, NULL, 0 },
# Line 622 | Line 621 | cmdline_parser_internal (
621          { 0,  0, 0, 0 }
622        };
623  
624 <      c = getopt_long (argc, argv, "hVi:o:m:rvdl", long_options, &option_index);
624 >      c = getopt_long (argc, argv, "hVi:o:m:rvdls", long_options, &option_index);
625  
626        if (c == -1) break;       /* Exit from `while (1)' loop.  */
627  
# Line 730 | Line 729 | cmdline_parser_internal (
729                &(local_args_info.lcorr_given), optarg, 0, 0, ARG_NO,
730                check_ambiguity, override, 0, 0,
731                "lcorr", 'l',
732 +              additional_error))
733 +            goto failure;
734 +        
735 +          break;
736 +        case 's':       /* System dipole correlation function.  */
737 +        
738 +          if (args_info->dynamicProps_group_counter && override)
739 +            reset_group_dynamicProps (args_info);
740 +          args_info->dynamicProps_group_counter += 1;
741 +        
742 +          if (update_arg( 0 ,
743 +               0 , &(args_info->sdcorr_given),
744 +              &(local_args_info.sdcorr_given), optarg, 0, 0, ARG_NO,
745 +              check_ambiguity, override, 0, 0,
746 +              "sdcorr", 's',
747                additional_error))
748              goto failure;
749          
# Line 893 | Line 907 | cmdline_parser_internal (
907    if ( error )
908      return (EXIT_FAILURE);
909  
896  if (optind < argc)
897    {
898      int i = 0 ;
899      int found_prog_name = 0;
900      /* whether program name, i.e., argv[0], is in the remaining args
901         (this may happen with some implementations of getopt,
902          but surely not with the one included by gengetopt) */
903
904      i = optind;
905      while (i < argc)
906        if (argv[i++] == argv[0]) {
907          found_prog_name = 1;
908          break;
909        }
910      i = 0;
911
912      args_info->inputs_num = argc - optind - found_prog_name;
913      args_info->inputs =
914        (char **)(malloc ((args_info->inputs_num)*sizeof(char *))) ;
915      while (optind < argc)
916        if (argv[optind++] != argv[0])
917          args_info->inputs[ i++ ] = gengetopt_strdup (argv[optind-1]) ;
918    }
919
910    return 0;
911  
912   failure:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines