@@ -142,6 +142,7 @@ unsigned char cb_default_byte = 0;
142142#define OPTION_ID_DEFAULT_BYTE (1024)
143143#define OPTION_ID_SINGLE_JAR (1025)
144144#define OPTION_ID_JAR (1026)
145+ #define OPTION_ID_INFO_JSON (1027)
145146
146147int external_flg = 0 ;
147148int errorcount = 0 ;
@@ -184,6 +185,9 @@ char *cb_java_package_name = NULL;
184185int cb_flag_jar = 0 ;
185186char * cb_single_jar_name = NULL ;
186187
188+ int cb_flag_info_json = 0 ;
189+ char * cb_info_json_dir = NULL ;
190+
187191char edit_code_command [512 ];
188192char edit_code_command_is_set = 0 ;
189193
@@ -285,6 +289,7 @@ static const struct option long_options[] = {
285289 {"conf" , required_argument , NULL , '&' },
286290 {"debug" , no_argument , NULL , 'd' },
287291 {"class-file-dir" , optional_argument , NULL , 'o' },
292+ {"info-json-dir" , required_argument , NULL , OPTION_ID_INFO_JSON },
288293 {"java-source-dir" , optional_argument , NULL , 'j' },
289294 {"jar" , no_argument , NULL , OPTION_ID_JAR },
290295 {"single-jar" , required_argument , NULL , OPTION_ID_SINGLE_JAR },
@@ -824,6 +829,8 @@ static void cobc_print_usage(void) {
824829 "representing a character" ));
825830 puts (_ (" * octodecimal 00..0377 "
826831 "representing a character" ));
832+ puts (_ (" -info-json-dir=<dir> Specify the directory path of "
833+ "JSON files that hold information of COBOL programs" ));
827834 puts (_ (" -java-package(=<package name>) Specify the package name of the "
828835 "generated source code" ));
829836 puts (_ (" -jar Create <PROGRAM-ID>.jar and "
@@ -1042,6 +1049,21 @@ static int process_command_line(const int argc, char *argv[]) {
10421049 cb_flag_jar = 1 ;
10431050 break ;
10441051
1052+ case OPTION_ID_INFO_JSON :
1053+ cb_flag_info_json = 1 ;
1054+ if (optarg ) {
1055+ int len = strlen (optarg );
1056+ if (len != 0 ) {
1057+ cb_info_json_dir = malloc (len + 1 );
1058+ strcpy (cb_info_json_dir , optarg );
1059+ break ;
1060+ }
1061+ }
1062+ fprintf (stderr ,
1063+ "Warning - An invalid name of a directory for json files\n" );
1064+ fflush (stderr );
1065+ break ;
1066+
10451067 case OPTION_ID_SINGLE_JAR :
10461068 cb_flag_jar = 1 ;
10471069 if (optarg ) {
0 commit comments