diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-12 13:48:28 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-12 13:48:28 +0200 |
| commit | 50813b0e99321ba5c60ea4bc8c16d19519801446 (patch) | |
| tree | 3bbcdfaedca6a9d529f02e90bebbda5bc893bdc6 | |
| parent | 6df6386c3af1420d9b0d676d5b9da660ab6f99d4 (diff) | |
| download | vis-50813b0e99321ba5c60ea4bc8c16d19519801446.tar.gz vis-50813b0e99321ba5c60ea4bc8c16d19519801446.tar.xz | |
Rename text_filename to text_filename_get
| -rw-r--r-- | config.def.h | 2 | ||||
| -rw-r--r-- | editor.c | 4 | ||||
| -rw-r--r-- | text.c | 2 | ||||
| -rw-r--r-- | text.h | 2 | ||||
| -rw-r--r-- | vis.c | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/config.def.h b/config.def.h index d38351c..80eaf13 100644 --- a/config.def.h +++ b/config.def.h @@ -67,7 +67,7 @@ static void statusbar(EditorWin *win) { window_cursor_getxy(win->win, &line, &col); wattrset(win->statuswin, focused ? A_REVERSE|A_BOLD : A_REVERSE); mvwhline(win->statuswin, 0, 0, ' ', win->width); - mvwprintw(win->statuswin, 0, 0, "%s %s", text_filename(win->text), + mvwprintw(win->statuswin, 0, 0, "%s %s", text_filename_get(win->text), text_modified(win->text) ? "[+]" : ""); char buf[win->width + 1]; int len = snprintf(buf, win->width, "%d, %d", line, col); @@ -86,7 +86,7 @@ static void editor_windows_arrange_vertical(Editor *ed) { } bool editor_window_reload(EditorWin *win) { - const char *filename = text_filename(win->text); + const char *filename = text_filename_get(win->text); /* can't reload unsaved file */ if (!filename) return false; @@ -114,7 +114,7 @@ static void editor_window_split_internal(Editor *ed, const char *filename) { // TODO? move this to editor_window_new sel = NULL; for (EditorWin *w = ed->windows; w; w = w->next) { - const char *f = text_filename(w->text); + const char *f = text_filename_get(w->text); if (f && strcmp(f, filename) == 0) { sel = w; break; @@ -1049,7 +1049,7 @@ void text_mark_clear_all(Text *txt) { text_mark_clear(txt, mark); } -const char *text_filename(Text *txt) { +const char *text_filename_get(Text *txt) { return txt->filename; } @@ -28,7 +28,7 @@ typedef struct { Text *text_load(const char *file); /* the filename from which this text was loaded or first saved to */ -const char *text_filename(Text*); +const char *text_filename_get(Text*); bool text_insert(Text*, size_t pos, const char *data); bool text_insert_raw(Text*, size_t pos, const char *data, size_t len); bool text_delete(Text*, size_t pos, size_t len); @@ -984,7 +984,7 @@ static bool cmd_wq(const char *argv[]) { static bool cmd_write(const char *argv[]) { Text *text = vis->win->text; if (!argv[1]) - argv[1] = text_filename(text); + argv[1] = text_filename_get(text); for (const char **file = &argv[1]; *file; file++) { if (text_save(text, *file)) return false; |
