better follow kilo's naming conventions

This commit is contained in:
Kartik K. Agaram 2022-01-02 16:50:15 -08:00
parent 30a1fb202e
commit f6aaf2fd1d
2 changed files with 6 additions and 6 deletions

View File

@ -994,12 +994,12 @@ static void editorMoveCursor(int key) {
}
}
int identifier_char(char c) {
static int identifier_char(char c) {
/* keep sync'd with llex */
return isalnum(c) || c == '_';
}
void word_at_cursor(char* out, int capacity) {
static void word_at_cursor(char* out, int capacity) {
erow* row = &E.row[E.rowoff + E.cy];
int cidx = E.coloff + E.cx;
int len = 0;
@ -1207,7 +1207,7 @@ int edit(lua_State* L, char* filename) {
}
/* return true if user chose to back into the big picture view */
int edit_from(lua_State* L, char* filename, int rowoff, int coloff, int cy, int cx) {
int editFrom(lua_State* L, char* filename, int rowoff, int coloff, int cy, int cx) {
Quit = 0;
Back_to_big_picture = 0;
initEditor();

View File

@ -477,7 +477,7 @@ int editor_view_in_progress(lua_State* L) {
extern int load_editor_buffer_to_current_definition_in_image(lua_State* L);
extern int resumeEdit(lua_State* L);
extern int edit_from(lua_State* L, char* filename, int rowoff, int coloff, int cy, int cx);
extern int editFrom(lua_State* L, char* filename, int rowoff, int coloff, int cy, int cx);
int restore_editor_view(lua_State* L) {
lua_getglobal(L, "__teliva_editor_state");
int editor_state_index = lua_gettop(L);
@ -493,7 +493,7 @@ int restore_editor_view(lua_State* L) {
lua_getfield(L, editor_state_index, "cx");
int cx = lua_tointeger(L, -1);
lua_settop(L, editor_state_index);
int back_to_big_picture = edit_from(L, "teliva_editor_buffer", rowoff, coloff, cy, cx);
int back_to_big_picture = editFrom(L, "teliva_editor_buffer", rowoff, coloff, cy, cx);
// error handling
int oldtop = lua_gettop(L);
while (1) {
@ -508,7 +508,7 @@ int restore_editor_view(lua_State* L) {
}
if (lua_gettop(L) != oldtop) {
endwin();
printf("edit_from: memory leak %d -> %d\n", oldtop, lua_gettop(L));
printf("editFrom: memory leak %d -> %d\n", oldtop, lua_gettop(L));
exit(1);
}
return back_to_big_picture;