ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/applications/dump2Xyz/Dump2XYZCmd.cpp
(Generate patch)

Comparing:
branches/development/src/applications/dump2Xyz/Dump2XYZCmd.c (file contents), Revision 1630 by gezelter, Wed Sep 14 21:40:12 2011 UTC vs.
trunk/src/applications/dump2Xyz/Dump2XYZCmd.cpp (file contents), Revision 1879 by gezelter, Sun Jun 16 15:15:42 2013 UTC

# Line 1 | Line 1
1   /*
2    File autogenerated by gengetopt version 2.22.4
3    generated with the following command:
4 <  gengetopt -F Dump2XYZCmd -u
4 >  gengetopt --file-name=Dump2XYZCmd --unamed-opts
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 21 | Line 21
21   #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */
22   #endif
23  
24 + #ifdef WIN32
25 + #include "utils/wingetopt.h"
26 + #else
27   #include <getopt.h>
28 + #endif
29  
30 +
31   #include "Dump2XYZCmd.h"
32  
33   const char *gengetopt_args_info_purpose = "";
# Line 53 | Line 58 | const char *gengetopt_args_info_help[] = {
58    "  -f, --forces                  Print forces xyz file  (default=off)",
59    "  -u, --vectors                 Print vectors (dipoles, etc) in xyz file  \n                                  (default=off)",
60    "  -c, --charges                 Print charges in xyz file  (default=off)",
61 +  "  -e, --efield                  Print electric field vector in xyz file  \n                                  (default=off)",
62      0
63   };
64  
# Line 101 | Line 107 | void clear_given (struct gengetopt_args_info *args_inf
107    args_info->forces_given = 0 ;
108    args_info->vectors_given = 0 ;
109    args_info->charges_given = 0 ;
110 +  args_info->efield_given = 0 ;
111   }
112  
113   static
# Line 135 | Line 142 | void clear_args (struct gengetopt_args_info *args_info
142    args_info->forces_flag = 0;
143    args_info->vectors_flag = 0;
144    args_info->charges_flag = 0;
145 +  args_info->efield_flag = 0;
146    
147   }
148  
# Line 164 | Line 172 | void init_args_info(struct gengetopt_args_info *args_i
172    args_info->forces_help = gengetopt_args_info_help[18] ;
173    args_info->vectors_help = gengetopt_args_info_help[19] ;
174    args_info->charges_help = gengetopt_args_info_help[20] ;
175 +  args_info->efield_help = gengetopt_args_info_help[21] ;
176    
177   }
178  
# Line 338 | Line 347 | cmdline_parser_dump(FILE *outfile, struct gengetopt_ar
347      write_into_file(outfile, "vectors", 0, 0 );
348    if (args_info->charges_given)
349      write_into_file(outfile, "charges", 0, 0 );
350 +  if (args_info->efield_given)
351 +    write_into_file(outfile, "efield", 0, 0 );
352    
353  
354    i = EXIT_SUCCESS;
# Line 641 | Line 652 | cmdline_parser_internal (
652          { "forces",     0, NULL, 'f' },
653          { "vectors",    0, NULL, 'u' },
654          { "charges",    0, NULL, 'c' },
655 +        { "efield",     0, NULL, 'e' },
656          { 0,  0, 0, 0 }
657        };
658  
659 <      c = getopt_long (argc, argv, "hVi:o:n:wmzrts:bvfuc", long_options, &option_index);
659 >      c = getopt_long (argc, argv, "hVi:o:n:wmzrts:bvfuce", long_options, &option_index);
660  
661        if (c == -1) break;       /* Exit from `while (1)' loop.  */
662  
# Line 808 | Line 820 | cmdline_parser_internal (
820              goto failure;
821          
822            break;
823 +        case 'e':       /* Print electric field vector in xyz file.  */
824 +        
825 +        
826 +          if (update_arg((void *)&(args_info->efield_flag), 0, &(args_info->efield_given),
827 +              &(local_args_info.efield_given), optarg, 0, 0, ARG_FLAG,
828 +              check_ambiguity, override, 1, 0, "efield", 'e',
829 +              additional_error))
830 +            goto failure;
831 +        
832 +          break;
833  
834          case 0: /* Long option with no short option */
835            /* select origin.  */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines