- Timestamp:
- 05/07/08 14:11:21 (17 years ago)
- Branches:
- master, help
- Children:
- f5d3b20
- Parents:
- 13a8a67
- git-author:
- obrebski <obrebski@…> (05/07/08 14:11:21)
- git-committer:
- obrebski <obrebski@…> (05/07/08 14:11:21)
- Location:
- app/src/dgp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
app/src/dgp/cmdline_dgp.ggo
r28e9ae0 rdf77b87 2 2 version "0.1" 3 3 4 #option "process" p "Process segments with this tag."5 # string no multiple6 7 #option "select" s "Select only segments with this field. [Not implemented.]"8 # string no multiple9 10 #option "ignore" S "Select only segments without this field. [Not implemented]"11 # string no multiple12 13 #option "input" f "Input file"14 # string typestr="filename" no15 16 #option "output" o "Output file"17 # string typestr="filename" no18 19 #option "failed" e "Fail file"20 # string typestr="filename" no21 22 #option "copy" c "Copy unprocessed"23 # flag off24 25 4 option "grammar" g "Grammar file" 26 string typestr="filename" default="dgp.dg "5 string typestr="filename" default="dgp.dgp" 27 6 28 7 option "long" l "Long output" 29 8 flag off 30 31 #option "interactive" - "Interactive use."32 # flag off33 9 34 10 option "debug" d "Debug mode." … … 40 16 c - constraints n - node/arc counts t - parse time 41 17 " 42 string default="gh"18 string no default="h" -
app/src/dgp/main.cc
r13a8a67 rdf77b87 35 35 gengetopt_args_info args; 36 36 37 if(cmdline_parser(argc,argv,&args) != 0) exit(1); 37 if(cmdline_parser(argc,argv,&args) != 0) 38 exit(1); 38 39 39 if(args.help_given) cmdline_parser_print_help (); 40 process_config_files(&args,argv[0]); 41 process_common_options(&args,argv[0]); 40 42 41 if(args.input_given) 42 if(!(inputf=fopen(args.input_arg,"r"))) 43 fprintf(stderr,"dgp: input file not found: %s.\n", args.input_arg), exit(1); 43 // if(args.help_given) cmdline_parser_print_help (); 44 44 45 if(args.output_given) 46 if(!(outputf=fopen(args.output_arg,"w"))) 47 fprintf(stderr,"dgp: cannot open output file: %s.\n", args.output_arg), exit(1); 45 // if(args.input_given) 46 // if(!(inputf=fopen(args.input_arg,"r"))) 47 // fprintf(stderr,"dgp: input file not found: %s.\n", args.input_arg), exit(1); 48 49 // if(args.output_given) 50 // if(!(outputf=fopen(args.output_arg,"w"))) 51 // fprintf(stderr,"dgp: cannot open output file: %s.\n", args.output_arg), exit(1); 48 52 49 53 if(!(grammarf=fopen(args.grammar_arg,"r")))
Note: See TracChangeset
for help on using the changeset viewer.