summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4966421)
raw | patch | inline | side by side (parent: 4966421)
author | Max Kellermann <max@duempel.org> | |
Mon, 6 Oct 2008 12:36:29 +0000 (14:36 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 6 Oct 2008 12:36:29 +0000 (14:36 +0200) |
Convert wrln_max_line_size and wrln_max_history_length to local
constants. They have no real use outside of wreadln.c.
constants. They have no real use outside of wreadln.c.
src/screen.c | patch | blob | history | |
src/wreadln.c | patch | blob | history | |
src/wreadln.h | patch | blob | history |
diff --git a/src/screen.c b/src/screen.c
index aed9d9af9ab2890b68d80a9a8ed38759a7eda11a..648d07a86b4a733bd84763f0b4dcd3ff8f0602ad 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
#include "options.h"
#include "colors.h"
#include "strfsong.h"
-#include "wreadln.h"
#include <stdlib.h>
#include <unistd.h>
if (mode_fn->open != NULL)
mode_fn->open(c);
-
- /* initialize wreadln */
- wrln_max_history_length = 16;
}
void
diff --git a/src/wreadln.c b/src/wreadln.c
index edf4f702f8d3a624bdad37a10c6c7da98514130c..f6773a7f9a9374d568f5eb2b610e122deee33817 100644 (file)
--- a/src/wreadln.c
+++ b/src/wreadln.c
#define KEY_BCKSPC 8
#define TAB 9
-#define WRLN_MAX_LINE_SIZE 1024
-#define WRLN_MAX_HISTORY_LENGTH 32
-
-guint wrln_max_line_size = WRLN_MAX_LINE_SIZE;
-guint wrln_max_history_length = WRLN_MAX_HISTORY_LENGTH;
+/** max size allocated for a line */
+static const size_t wrln_max_line_size = 1024;
+
+/** max items stored in the history list */
+static const guint wrln_max_history_length = 32;
+
void *wrln_completion_callback_data = NULL;
wrln_gcmp_pre_cb_t wrln_pre_completion_callback = NULL;
wrln_gcmp_post_cb_t wrln_post_completion_callback = NULL;
diff --git a/src/wreadln.h b/src/wreadln.h
index fa52d4986dbd61ff29d9b00dc3691625e0c6722b..692f4fd69fffc60c2054b7bc0b0783e61ac81c8b 100644 (file)
--- a/src/wreadln.h
+++ b/src/wreadln.h
#include <glib.h>
#include <ncurses.h>
-/* max size allocated for a line */
-extern guint wrln_max_line_size;
-
-/* max items stored in the history list */
-extern guint wrln_max_history_length;
-
/* completion callback data */
extern void *wrln_completion_callback_data;