|
@@ -78,7 +78,7 @@ static int runCode_(FilePath name, af_Parser *parser, int mode, FilePath save_pa
|
|
|
int res = writeByteCode(bt_code, save_path);
|
|
|
if (res != 1) {
|
|
|
writeErrorLog(aFunCoreLogger, "Save %s bytecode error: %s", save_path, writeByteCodeError[res]);
|
|
|
- printf_stderr(0, "%s: %s\n", HT_getText(run_save_e, "Save aFun Bytecode file error"), save_path);
|
|
|
+ printf_stderr(0, "%s: %s\n", HT_aFunGetText(run_save_e, "Save aFun Bytecode file error"), save_path);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -116,7 +116,7 @@ int runCodeFromFileSource(FilePath file, bool save_afb, FilePath save_path, int
|
|
|
char *sufix = getFileSurfix(file);
|
|
|
if (sufix == NULL || !EQ_STR(".aun", sufix)) {
|
|
|
writeErrorLog(aFunCoreLogger, "Source is not .aun file: %s", (sufix == NULL ? "" : sufix));
|
|
|
- printf_stderr(0, "%s: %s\n", HT_getText(run_source_not_aub_e, "Source is not .aun file"), (sufix == NULL ? "" : sufix));
|
|
|
+ printf_stderr(0, "%s: %s\n", HT_aFunGetText(run_source_not_aub_e, "Source is not .aun file"), (sufix == NULL ? "" : sufix));
|
|
|
return -2;
|
|
|
}
|
|
|
|
|
@@ -176,7 +176,7 @@ int runCodeFromFileByte(FilePath file, int mode, af_Environment *env){
|
|
|
char *sufix = getFileSurfix(file);
|
|
|
if (sufix == NULL || !EQ_STR(".aub", sufix)) {
|
|
|
writeErrorLog(aFunCoreLogger, "Bytecode not .aub file: %s", (sufix == NULL ? "" : sufix));
|
|
|
- printf_stderr(0, "%s: %s\n", HT_getText(run_bt_not_aub_e, "Bytecode not .aub file"), (sufix == NULL ? "" : sufix));
|
|
|
+ printf_stderr(0, "%s: %s\n", HT_aFunGetText(run_bt_not_aub_e, "Bytecode not .aub file"), (sufix == NULL ? "" : sufix));
|
|
|
return -2;
|
|
|
}
|
|
|
|
|
@@ -184,7 +184,7 @@ int runCodeFromFileByte(FilePath file, int mode, af_Environment *env){
|
|
|
int res = readByteCode(&code, file);
|
|
|
if(res != 1) {
|
|
|
writeErrorLog(aFunCoreLogger, "Load %s bytecode file error: %s", file, readByteCodeError[res]);
|
|
|
- printf_stderr(0, "%s: %s\n", HT_getText(run_load_bt_e, "Load bytecode file error"), file);
|
|
|
+ printf_stderr(0, "%s: %s\n", HT_aFunGetText(run_load_bt_e, "Load bytecode file error"), file);
|
|
|
return -2;
|
|
|
}
|
|
|
|
|
@@ -204,7 +204,7 @@ int runCodeFromFile(FilePath file, bool save_afb, int mode, af_Environment *env)
|
|
|
char *sufix = getFileSurfix(file);
|
|
|
if (sufix != NULL && !EQ_STR(".aun", sufix) && !EQ_STR(".aub", sufix)) { // 不是源文件, 字节码文件或无后缀文件
|
|
|
writeErrorLog(aFunCoreLogger, "Run file not .aun/.aub file: %s", sufix);
|
|
|
- printf_stderr(0, "%s: %s\n", HT_getText(run_file_aun_aub_e, "Run file not .aun/.aub file"), file);
|
|
|
+ printf_stderr(0, "%s: %s\n", HT_aFunGetText(run_file_aun_aub_e, "Run file not .aun/.aub file"), file);
|
|
|
return -2;
|
|
|
}
|
|
|
|
|
@@ -217,7 +217,7 @@ int runCodeFromFile(FilePath file, bool save_afb, int mode, af_Environment *env)
|
|
|
|
|
|
if (time_1 == 0 && time_2 == 0) {
|
|
|
writeErrorLog(aFunCoreLogger, "Run file not exists: %s", file);
|
|
|
- printf_stderr(0, "%s: %s\n", HT_getText(run_file_not_exists_e, "Run file not exists"), file);
|
|
|
+ printf_stderr(0, "%s: %s\n", HT_aFunGetText(run_file_not_exists_e, "Run file not exists"), file);
|
|
|
free(path_1);
|
|
|
free(path_2);
|
|
|
return -3;
|
|
@@ -250,13 +250,13 @@ int buildFile(FilePath out, FilePath in){
|
|
|
char *suffix_out = getFileSurfix(out);
|
|
|
if (suffix_in == NULL || !EQ_STR(".aun", suffix_in)) { // 不是源文件
|
|
|
writeErrorLog(aFunCoreLogger, "Input not .aun %s", (suffix_in == NULL ? "" : suffix_in));
|
|
|
- printf_stderr("%s: %s\n", HT_getText(build_in_aun_e, "Input file is not .aun file"), (suffix_in == NULL ? "" : suffix_in));
|
|
|
+ printf_stderr("%s: %s\n", HT_aFunGetText(build_in_aun_e, "Input file is not .aun file"), (suffix_in == NULL ? "" : suffix_in));
|
|
|
return -2;
|
|
|
}
|
|
|
|
|
|
if (suffix_out == NULL || !EQ_STR(".aub", suffix_out)) { // 不是字节码文件
|
|
|
writeErrorLog(aFunCoreLogger, "Output not .aub %s", (suffix_out == NULL ? "" : suffix_out));
|
|
|
- printf_stderr("%s: %s\n", HT_getText(build_out_aub_e, "Output file is not .aub file"), (suffix_out == NULL ? "" : suffix_out));
|
|
|
+ printf_stderr("%s: %s\n", HT_aFunGetText(build_out_aub_e, "Output file is not .aub file"), (suffix_out == NULL ? "" : suffix_out));
|
|
|
return -2;
|
|
|
}
|
|
|
|
|
@@ -271,7 +271,7 @@ int buildFile(FilePath out, FilePath in){
|
|
|
|
|
|
if (res != 1) {
|
|
|
writeErrorLog(aFunCoreLogger, "Build %s error: %s", in, writeByteCodeError[res]);
|
|
|
- printf_stderr(0, "%s: %s\n", HT_getText(build_error_e, "Build error"), in);
|
|
|
+ printf_stderr(0, "%s: %s\n", HT_aFunGetText(build_error_e, "Build error"), in);
|
|
|
return -3;
|
|
|
}
|
|
|
|