4444#define  INITIALIZE_ONE  1
4545#define  INITIALIZE_DEFAULT  2
4646#define  INITIALIZE_COMPOUND  3
47+ #define  EXECUTION_NORMAL  0
48+ #define  EXECUTION_LAST  1
49+ #define  EXECUTION_ERROR_HANDLER  2
50+ #define  BUF_SIZE  1024
51+ #define  MAX_LITERAL_SIZE  64
4752
4853#ifndef  __GNUC__ 
4954static  int  inside_check  =  0 ;
@@ -189,10 +194,6 @@ static void joutput_label_variable_name(char *s, int key,
189194                                        struct  cb_label  * section );
190195static  void  joutput_label_variable_by_value (int  value );
191196
192- const  int  EXECUTION_NORMAL  =  0 ;
193- const  int  EXECUTION_LAST  =  1 ;
194- const  int  EXECUTION_ERROR_HANDLER  =  2 ;
195- 
196197static  char  * get_java_identifier_field (struct  cb_field  * f ) {
197198  char  * buf  =  malloc (COB_SMALL_BUFF );
198199  if  (cb_flag_serial_variable ) {
@@ -627,13 +628,15 @@ static void joutput_edit_code_command(const char *target) {
627628    return ;
628629  }
629630
630-   const  int  BUF_SIZE  =  1024 ;
631- 
632631  char  command [BUF_SIZE ];
633632  char  buf [BUF_SIZE ];
634633  sprintf (command , "%s --target=%s" , edit_code_command , target );
635634
635+ #ifdef  _WIN32 
636+   FILE  * fp  =  _popen (command , "r" );
637+ #else 
636638  FILE  * fp  =  popen (command , "r" );
639+ #endif 
637640  if  (fp  ==  NULL ) {
638641    return ;
639642  }
@@ -642,8 +645,11 @@ static void joutput_edit_code_command(const char *target) {
642645  while  (fgets (buf , BUF_SIZE , fp ) !=  NULL ) {
643646    joutput ("%s" , buf );
644647  }
645- 
648+ #ifdef  _WIN32 
649+   _pclose (fp );
650+ #else 
646651  pclose (fp );
652+ #endif 
647653}
648654
649655/* 
@@ -1188,7 +1194,6 @@ static struct literal_list *lookup_literal(cb_tree x) {
11881194}
11891195
11901196static  void  joutput_const_identifier (struct  literal_list  * l ) {
1191-   const  int  MAX_LITERAL_SIZE  =  64 ;
11921197  char  s [MAX_LITERAL_SIZE  +  1 ];
11931198  memset (s , 0 , MAX_LITERAL_SIZE  +  1 );
11941199  int  i  =  0 ;
0 commit comments