about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-01-02 16:50:15 -0800
committerKartik K. Agaram <vc@akkartik.com>2022-01-02 16:52:36 -0800
commitf6aaf2fd1dcdbd6da9343bb1be1909832a82ca90 (patch)
tree6e5d254e47ca03dd5123afbef1581569feefe675 /src
parent30a1fb202e6a34b7acc82b1397cebf755b1c4e6d (diff)
downloadteliva-f6aaf2fd1dcdbd6da9343bb1be1909832a82ca90.tar.gz
better follow kilo's naming conventions
Diffstat (limited to 'src')
-rw-r--r--src/kilo.c6
-rw-r--r--src/teliva.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/kilo.c b/src/kilo.c
index 087adf6..1036385 100644
--- a/src/kilo.c
+++ b/src/kilo.c
@@ -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();
diff --git a/src/teliva.c b/src/teliva.c
index c8a773e..99c0da1 100644
--- a/src/teliva.c
+++ b/src/teliva.c
@@ -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;