@@ -333,7 +333,7 @@ public static int invokeFun(
333333 byte [] tmpfnstatus = String .format ("%02d" , 0 ).getBytes ();
334334 byte [] pTmpfnstatus = tmpfnstatus ;
335335 String p_excpcode = "" ;
336- String s = System . getenv (TIS_DEFINE_USERFH );
336+ String s = CobolUtil . getEnv (TIS_DEFINE_USERFH );
337337 int iRet = 0 ;
338338 char ret = '0' ;
339339 int status1 = 0 ;
@@ -645,7 +645,7 @@ public void open(int mode, int sharing, AbstractCobolField fnstatus) {
645645 file_open_env [j ] = src [src_i + 1 + j ];
646646 }
647647 file_open_env [i - 1 ] = 0 ;
648- String p = System . getenv (new String (Arrays .copyOfRange (file_open_env , 0 , i - 1 )));
648+ String p = CobolUtil . getEnv (new String (Arrays .copyOfRange (file_open_env , 0 , i - 1 )));
649649 if (p != null ) {
650650 byte [] pbytes = p .getBytes ();
651651 for (int j = 0 ; j < pbytes .length ; ++j ) {
@@ -669,7 +669,7 @@ public void open(int mode, int sharing, AbstractCobolField fnstatus) {
669669 for (i = 0 ; i < NUM_PREFIX ; i ++) {
670670 byte [] file_open_buff = String .format ("%s%s" , prefix [i ], file_open_name ).getBytes ();
671671 String p ;
672- if ((p = System . getenv (new String (file_open_buff ))) != null ) {
672+ if ((p = CobolUtil . getEnv (new String (file_open_buff ))) != null ) {
673673 file_open_name_bytes = p .getBytes ();
674674 break ;
675675 }
@@ -690,8 +690,8 @@ public void open(int mode, int sharing, AbstractCobolField fnstatus) {
690690 was_not_exist = true ;
691691 if (mode != COB_OPEN_OUTPUT
692692 && !this .flag_optional
693- && (mode != COB_OPEN_I_O || !System . getenv (COB_IO_CREATES ).equals ("yes" ))
694- && (mode != COB_OPEN_EXTEND || !System . getenv (COB_EXTEND_CREATES ).equals ("yes" ))) {
693+ && (mode != COB_OPEN_I_O || !CobolUtil . getEnv (COB_IO_CREATES ).equals ("yes" ))
694+ && (mode != COB_OPEN_EXTEND || !CobolUtil . getEnv (COB_EXTEND_CREATES ).equals ("yes" ))) {
695695 saveStatus (COB_STATUS_35_NOT_EXISTS , fnstatus );
696696 return ;
697697 }
@@ -1319,7 +1319,7 @@ protected void cob_sync(CobolFile f, int mode) {
13191319
13201320 /** libcob/fileio.cのcob_init_fileioの実装 */
13211321 public static void cob_init_fileio () {
1322- String s = System . getenv ("COB_SYNC" );
1322+ String s = CobolUtil . getEnv ("COB_SYNC" );
13231323 if (s != null ) {
13241324 if (s .charAt (0 ) == 'Y' || s .charAt (0 ) == 'y' ) {
13251325 cob_do_sync = 1 ;
@@ -1329,15 +1329,15 @@ public static void cob_init_fileio() {
13291329 }
13301330 }
13311331
1332- cob_file_path = System . getenv ("COB_FILE_PATH" );
1332+ cob_file_path = CobolUtil . getEnv ("COB_FILE_PATH" );
13331333 if (cob_file_path != null ) {
13341334 if (cob_file_path .charAt (0 ) == '\0' || cob_file_path .charAt (0 ) == ' ' ) {
13351335 cob_file_path = null ;
13361336 }
13371337 }
13381338
1339- cob_ls_nulls = System . getenv ("COB_LS_NULLS" );
1340- cob_ls_fixed = System . getenv ("COB_LS_FIXED" );
1339+ cob_ls_nulls = CobolUtil . getEnv ("COB_LS_NULLS" );
1340+ cob_ls_fixed = CobolUtil . getEnv ("COB_LS_FIXED" );
13411341
13421342 file_open_env = new byte [COB_SMALL_BUFF ];
13431343 // file_open_name = new byte[COB_SMALL_BUFF];
@@ -1474,7 +1474,7 @@ public void cob_delete_file(AbstractCobolField fnstatus) {
14741474 file_open_env [j ] = src [src_i + 1 + j ];
14751475 }
14761476 file_open_env [i - 1 ] = 0 ;
1477- String p = System . getenv (new String (Arrays .copyOfRange (file_open_env , 0 , i - 1 )));
1477+ String p = CobolUtil . getEnv (new String (Arrays .copyOfRange (file_open_env , 0 , i - 1 )));
14781478 if (p != null ) {
14791479 byte [] pbytes = p .getBytes ();
14801480 for (int j = 0 ; j < pbytes .length ; ++j ) {
@@ -1498,7 +1498,7 @@ public void cob_delete_file(AbstractCobolField fnstatus) {
14981498 for (i = 0 ; i < NUM_PREFIX ; i ++) {
14991499 byte [] file_open_buff = String .format ("%s%s" , prefix [i ], file_open_name ).getBytes ();
15001500 String p ;
1501- if ((p = System . getenv (new String (file_open_buff ))) != null ) {
1501+ if ((p = CobolUtil . getEnv (new String (file_open_buff ))) != null ) {
15021502 file_open_name_bytes = p .getBytes ();
15031503 break ;
15041504 }
0 commit comments