aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2014-09-12 13:48:28 +0200
committerMarc André Tanner <mat@brain-dump.org>2014-09-12 13:48:28 +0200
commit50813b0e99321ba5c60ea4bc8c16d19519801446 (patch)
tree3bbcdfaedca6a9d529f02e90bebbda5bc893bdc6
parent6df6386c3af1420d9b0d676d5b9da660ab6f99d4 (diff)
downloadvis-50813b0e99321ba5c60ea4bc8c16d19519801446.tar.gz
vis-50813b0e99321ba5c60ea4bc8c16d19519801446.tar.xz
Rename text_filename to text_filename_get
-rw-r--r--config.def.h2
-rw-r--r--editor.c4
-rw-r--r--text.c2
-rw-r--r--text.h2
-rw-r--r--vis.c2
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);
diff --git a/editor.c b/editor.c
index ad3da53..b3fd1de 100644
--- a/editor.c
+++ b/editor.c
@@ -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;
diff --git a/text.c b/text.c
index b68d707..ea02cd4 100644
--- a/text.c
+++ b/text.c
@@ -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;
}
diff --git a/text.h b/text.h
index 2cec7b1..b3fd997 100644
--- a/text.h
+++ b/text.h
@@ -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);
diff --git a/vis.c b/vis.c
index b2559d7..70b6049 100644
--- a/vis.c
+++ b/vis.c
@@ -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;