This commit is contained in:
Kartik K. Agaram 2022-01-25 21:23:20 -08:00
parent 283d4dba59
commit 84d76b11fa
2 changed files with 6 additions and 6 deletions

View File

@ -1278,7 +1278,7 @@ void editNonCode(char* filename) {
#define MIN(x, y) ((x) < (y) ? (x) : (y)) #define MIN(x, y) ((x) < (y) ? (x) : (y))
void editNonCode2(char* filename) { void editFilePermissions(char* filename) {
Quit = 0; Quit = 0;
Back_to_big_picture = 0; Back_to_big_picture = 0;
initEditor(); initEditor();
@ -1358,7 +1358,7 @@ void resumeNonCodeEdit() {
} }
} }
void resumeNonCodeEdit2() { void resumeFilePermissionsEdit() {
Quit = 0; Quit = 0;
Back_to_big_picture = 0; Back_to_big_picture = 0;
E.startcol = LINE_NUMBER_SPACE; E.startcol = LINE_NUMBER_SPACE;

View File

@ -1450,8 +1450,8 @@ static int load_file_operations_predicate(const char* body) {
|| validate_file_operations_predicate(); || validate_file_operations_predicate();
} }
extern void editNonCode2(char* filename); extern void editFilePermissions(char* filename);
extern void resumeNonCodeEdit2(); extern void resumeFilePermissionsEdit();
static void edit_file_operations_predicate_body() { static void edit_file_operations_predicate_body() {
static char file_operations_predicate_body_buffer[512]; static char file_operations_predicate_body_buffer[512];
/* save to disk */ /* save to disk */
@ -1468,7 +1468,7 @@ static void edit_file_operations_predicate_body() {
fclose(out); fclose(out);
rename(outfilename, "teliva_file_operations_predicate_body"); rename(outfilename, "teliva_file_operations_predicate_body");
Previous_error = ""; Previous_error = "";
editNonCode2("teliva_file_operations_predicate_body"); editFilePermissions("teliva_file_operations_predicate_body");
// error handling // error handling
assert(trustedL); assert(trustedL);
int oldtop = lua_gettop(trustedL); int oldtop = lua_gettop(trustedL);
@ -1483,7 +1483,7 @@ static void edit_file_operations_predicate_body() {
break; break;
Previous_error = lua_tostring(trustedL, -1); Previous_error = lua_tostring(trustedL, -1);
if (Previous_error == NULL) Previous_error = "(error object is not a string)"; if (Previous_error == NULL) Previous_error = "(error object is not a string)";
resumeNonCodeEdit2(); resumeFilePermissionsEdit();
lua_pop(trustedL, 1); lua_pop(trustedL, 1);
} }
file_operations_predicate_body = file_operations_predicate_body_buffer; file_operations_predicate_body = file_operations_predicate_body_buffer;