@@ -47,7 +47,7 @@ function main($request, $compiler_config)
47
47
{
48
48
error_reporting (E_ALL & ~E_STRICT );
49
49
50
- $ this ->set_values ($ compiler_config ,
50
+ $ this ->setValues ($ compiler_config ,
51
51
$ BINUTILS , $ CLANG , $ CFLAGS , $ CPPFLAGS , $ ASFLAGS , $ ARFLAGS , $ LDFLAGS , $ LDFLAGS_TAIL ,
52
52
$ CLANG_FLAGS , $ OBJCOPY_FLAGS , $ SIZE_FLAGS , $ OUTPUT , $ ARDUINO_CORES_DIR , $ EXTERNAL_CORES_DIR ,
53
53
$ TEMP_DIR , $ ARCHIVE_DIR , $ AUTOCC_DIR , $ PYTHON , $ AUTOCOMPLETER );
@@ -59,9 +59,9 @@ function main($request, $compiler_config)
59
59
if ($ tmpVar ["success " ] === false )
60
60
return $ tmpVar ;
61
61
62
- $ this ->set_variables ($ request , $ format , $ libraries , $ version , $ mcu , $ f_cpu , $ core , $ variant , $ vid , $ pid , $ compiler_config );
62
+ $ this ->setVariables ($ request , $ format , $ libraries , $ version , $ mcu , $ f_cpu , $ core , $ variant , $ vid , $ pid , $ compiler_config );
63
63
64
- $ this ->set_avr ($ version , $ ARDUINO_CORES_DIR , $ BINUTILS , $ CC , $ CPP , $ AS , $ AR , $ LD , $ OBJCOPY , $ SIZE );
64
+ $ this ->setAVR ($ version , $ ARDUINO_CORES_DIR , $ BINUTILS , $ CC , $ CPP , $ AS , $ AR , $ LD , $ OBJCOPY , $ SIZE );
65
65
66
66
$ target_arch = "-mmcu= $ mcu -DARDUINO= $ version -DF_CPU= $ f_cpu -DUSB_VID= $ vid -DUSB_PID= $ pid " ;
67
67
$ clang_target_arch = "-D " .MCUHandler::$ MCU [$ mcu ]." -DARDUINO= $ version -DF_CPU= $ f_cpu " ;
@@ -438,7 +438,7 @@ function main($request, $compiler_config)
438
438
439
439
private function requestValid (&$ request )
440
440
{
441
- $ request = $ this ->preproc ->validate_input ($ request );
441
+ $ request = $ this ->preproc ->validateInput ($ request );
442
442
if (!$ request )
443
443
return array (
444
444
"success " => false ,
@@ -499,7 +499,7 @@ private function extractFiles($request, $temp_dir, &$dir, &$files, $suffix, $lib
499
499
"step " => 1 ,
500
500
"message " => "Failed to create temporary directory. " );
501
501
502
- $ response = $ this ->utility ->extract_files ("$ dir/ $ suffix " , $ request , $ lib_extraction );
502
+ $ response = $ this ->utility ->extractFiles ("$ dir/ $ suffix " , $ request , $ lib_extraction );
503
503
504
504
if ($ response ["success " ] === false )
505
505
return $ response ;
@@ -513,7 +513,7 @@ private function preprocessIno(&$files)
513
513
foreach ($ files ["ino " ] as $ file )
514
514
{
515
515
$ code = file_get_contents ("$ file.ino " );
516
- $ new_code = $ this ->preproc ->ino_to_cpp ($ code , "$ file.ino " );
516
+ $ new_code = $ this ->preproc ->convertInoToCpp ($ code , "$ file.ino " );
517
517
$ ret = file_put_contents ("$ file.cpp " , $ new_code );
518
518
519
519
if ($ code === false || !$ new_code || !$ ret )
@@ -675,7 +675,7 @@ private function doCompile($compiler_config, &$files, $dir, $CC, $CFLAGS, $CPP,
675
675
$ file = escapeshellarg ($ file );
676
676
$ object_file = escapeshellarg ($ object_file );
677
677
678
- //replace exec() calls with $this->utility->debug_exec () for debugging
678
+ //replace exec() calls with $this->utility->execWithDebugging () for debugging
679
679
if ($ ext == "c " )
680
680
{
681
681
exec ("$ CC $ CFLAGS $ core_includes $ target_arch $ include_directories -c -o $ object_file.o $ file. $ ext 2>&1 " , $ output , $ ret_compile );
@@ -710,7 +710,7 @@ private function doCompile($compiler_config, &$files, $dir, $CC, $CFLAGS, $CPP,
710
710
file_put_contents ($ compiler_config ['logFileName ' ], "$ CLANG $ CLANG_FLAGS $ core_includes $ clang_target_arch $ include_directories -c -o $ object_file.o $ file. $ ext \n" , FILE_APPEND );
711
711
}
712
712
713
- $ output = $ this ->postproc ->ansi_to_html (implode ("\n" , $ output ));
713
+ $ output = $ this ->postproc ->convertANSItoHTML (implode ("\n" , $ output ));
714
714
715
715
$ resp = array (
716
716
"success " => false ,
@@ -868,7 +868,7 @@ private function convertOutput($dir, $format, $SIZE, $SIZE_FLAGS, $OBJCOPY, $OBJ
868
868
869
869
}
870
870
871
- private function set_avr ($ version , $ ARDUINO_CORES_DIR , $ BINUTILS , &$ CC , &$ CPP , &$ AS , &$ AR , &$ LD , &$ OBJCOPY , &$ SIZE )
871
+ private function setAVR ($ version , $ ARDUINO_CORES_DIR , $ BINUTILS , &$ CC , &$ CPP , &$ AS , &$ AR , &$ LD , &$ OBJCOPY , &$ SIZE )
872
872
{
873
873
// External binaries.
874
874
$ binaries = array ("cc " => "-gcc " , "cpp " => "-g++ " , "as " => "-gcc " , "ar " => "-ar " , "ld " => "-gcc " , "objcopy " => "-objcopy " , "size " => "-size " );
@@ -892,7 +892,7 @@ private function set_avr($version, $ARDUINO_CORES_DIR, $BINUTILS, &$CC, &$CPP, &
892
892
893
893
}
894
894
895
- private function set_values ($ compiler_config ,
895
+ private function setValues ($ compiler_config ,
896
896
&$ BINUTILS , &$ CLANG , &$ CFLAGS , &$ CPPFLAGS ,
897
897
&$ ASFLAGS , &$ ARFLAGS , &$ LDFLAGS , &$ LDFLAGS_TAIL , &$ CLANG_FLAGS , &$ OBJCOPY_FLAGS , &$ SIZE_FLAGS ,
898
898
&$ OUTPUT , &$ ARDUINO_CORES_DIR , &$ EXTERNAL_CORES_DIR , &$ TEMP_DIR , &$ ARCHIVE_DIR , &$ AUTOCC_DIR , &$ PYTHON , &$ AUTOCOMPLETER )
@@ -902,7 +902,7 @@ private function set_values($compiler_config,
902
902
//ones included in the binutils parameter
903
903
$ BINUTILS = $ compiler_config ["binutils " ];
904
904
//Clang is used to return the output in case of an error, it's version independent, so its
905
- //value is set by set_values function.
905
+ //value is set by setValues function.
906
906
907
907
$ LDLIBRARYPATH = "LD_LIBRARY_PATH= " .$ compiler_config ["arduino_cores_dir " ]."/clang/v3_5/lib: \$LD_LIBRARY_PATH " ;
908
908
$ CLANG = $ LDLIBRARYPATH ." " .$ compiler_config ["clang " ];
@@ -936,7 +936,7 @@ private function set_values($compiler_config,
936
936
$ EXTERNAL_CORES_DIR = $ compiler_config ["external_core_files " ];
937
937
}
938
938
939
- private function set_variables ($ request , &$ format , &$ libraries , &$ version , &$ mcu , &$ f_cpu , &$ core , &$ variant , &$ vid , &$ pid , &$ compiler_config )
939
+ private function setVariables ($ request , &$ format , &$ libraries , &$ version , &$ mcu , &$ f_cpu , &$ core , &$ variant , &$ vid , &$ pid , &$ compiler_config )
940
940
{
941
941
// Extract the request options for easier access.
942
942
$ format = $ request ["format " ];
0 commit comments