Changeset c13d72
- Timestamp:
- Apr 21, 2008, 2:19:26 PM (17 years ago)
- Children:
- 41521a
- Parents:
- 4bbde5
- git-author:
- Frederik Heber <heber@…> (04/21/08 12:51:45)
- git-committer:
- Frederik Heber <heber@…> (04/21/08 14:19:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pcp/src/opt.c
r4bbde5 rc13d72 52 52 /* defaults setzen */ 53 53 Call->MainParameterFile = NULL; 54 Call->ForcesFile = NULL; 54 55 Call->debug = 0; 55 56 Call->nicelevel = 0; … … 62 63 Call->AddNFactor = 1; 63 64 64 while ((c = getopt(argc, argv, "a:d:D:hn:o:p:m:rvwx ")) != -1) {65 while ((c = getopt(argc, argv, "a:d:D:hn:o:p:m:rvwxF:")) != -1) { 65 66 switch (c) { 66 67 case 'a': … … 101 102 printf(" -w Write src files.\n"); 102 103 printf(" -m f Additional NFactor - to fix read srcpsi\n"); 104 printf(" -F file Do not calculate Hellmann-Feyman forces but read from file\n"); 103 105 printf("For parallel codes it is necessary to specify the main parameter file\n"); 104 106 printf("with an absolute path.\n"); … … 129 131 case 'm': 130 132 if (sscanf(optarg, "%d", &Call->AddNFactor) < 1) 131 errflg++;133 errflg++; 132 134 if (Call->AddNFactor <= 1) { 133 fprintf(stderr, "AddNFactor must be > 0\n");134 errflg++;135 fprintf(stderr, "AddNFactor must be > 0\n"); 136 errflg++; 135 137 } 136 138 break; … … 138 140 errflg++; 139 141 break; 142 case 'F': 143 fprintf(stderr, "Recognized forces file '%s' with length %ld.\n", optarg, strlen(optarg)); 144 Call->ForcesFile = (char *) Malloc((strlen(optarg)+2)*sizeof(char), "GetOptions: CallOptions::*ForcesFile"); 145 strcpy(Call->ForcesFile, optarg); 146 fprintf(stderr, "Stored CallOptions->ForcesFile: %s\n", Call->ForcesFile); 147 break; 140 148 default: 141 149 fprintf(stderr, "GetOptions: getopt() returned character code O%o !?\n", c);
Note:
See TracChangeset
for help on using the changeset viewer.