summaryrefslogtreecommitdiff
path: root/time
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2014-05-18 21:24:56 +0000
committerjoerg <joerg@pkgsrc.org>2014-05-18 21:24:56 +0000
commitd7e03fa4a30d230b86b2c3952186778a386f5d5f (patch)
treecec0d058db3ba7682d751febd1ac4ed33c15a1ee /time
parentb4185b2a352e8df6edc98534330c3a525c14bd2a (diff)
downloadpkgsrc-d7e03fa4a30d230b86b2c3952186778a386f5d5f.tar.gz
Fix build against newer readline.
Diffstat (limited to 'time')
-rw-r--r--time/tdl/distinfo4
-rw-r--r--time/tdl/patches/patch-inter.c145
-rw-r--r--time/tdl/patches/patch-tdl.h32
3 files changed, 180 insertions, 1 deletions
diff --git a/time/tdl/distinfo b/time/tdl/distinfo
index 6900c864896..0665d7ca87e 100644
--- a/time/tdl/distinfo
+++ b/time/tdl/distinfo
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.1.1.1 2008/09/04 11:13:29 tonnerre Exp $
+$NetBSD: distinfo,v 1.2 2014/05/18 21:24:56 joerg Exp $
SHA1 (tdl-1.5.2.tar.gz) = 273c15eafa0a856532865ac4ccfee6685f88e1ad
RMD160 (tdl-1.5.2.tar.gz) = 5bf21e214faa208c85e72b67b2f0d21bd279a4fe
Size (tdl-1.5.2.tar.gz) = 66057 bytes
SHA1 (patch-aa) = 1b0243f02526905ad74643d817aca6b117bfd03c
+SHA1 (patch-inter.c) = fc355f7e6abc85dbe66ffe4058862579158ac4b8
+SHA1 (patch-tdl.h) = 4ac480ce89ae79e4c7fa9fe27e96f709eba3d0c6
diff --git a/time/tdl/patches/patch-inter.c b/time/tdl/patches/patch-inter.c
new file mode 100644
index 00000000000..1c85c8e1b64
--- /dev/null
+++ b/time/tdl/patches/patch-inter.c
@@ -0,0 +1,145 @@
+$NetBSD: patch-inter.c,v 1.1 2014/05/18 21:24:56 joerg Exp $
+
+--- inter.c.orig 2004-01-07 00:09:05.000000000 +0000
++++ inter.c
+@@ -260,14 +260,14 @@ static char *generate_a_postpone_complet
+ }
+ /*}}}*/
+
+-char **complete_help(char *text, int index)/*{{{*/
++char **complete_help(const char *text, int index)/*{{{*/
+ {
+ char **matches;
+ matches = COMPLETION_MATCHES(text, generate_a_command_completion);
+ return matches;
+ }
+ /*}}}*/
+-char **default_completer(char *text, int index)/*{{{*/
++char **default_completer(const char *text, int index)/*{{{*/
+ {
+ if (cmds[index].synopsis) {
+ fprintf(stderr, "\n%s %s\n", cmds[index].name, cmds[index].synopsis);
+@@ -276,7 +276,7 @@ char **default_completer(char *text, int
+ return NULL;
+ }
+ /*}}}*/
+-char **complete_list(char *text, int index)/*{{{*/
++char **complete_list(const char *text, int index)/*{{{*/
+ {
+ char **matches;
+ if (text[0] && isalpha(text[0])) {
+@@ -288,12 +288,12 @@ char **complete_list(char *text, int ind
+ }
+ }
+ /*}}}*/
+-char **complete_priority(char *text, int index)/*{{{*/
++char **complete_priority(const char *text, int index)/*{{{*/
+ {
+ return complete_list(text, index);
+ }
+ /*}}}*/
+-char **complete_postpone(char *text, int index)/*{{{*/
++char **complete_postpone(const char *text, int index)/*{{{*/
+ {
+ char **matches;
+ want_postponed_entries = 0;
+@@ -301,7 +301,7 @@ char **complete_postpone(char *text, int
+ return matches;
+ }
+ /*}}}*/
+-char **complete_open(char *text, int index)/*{{{*/
++char **complete_open(const char *text, int index)/*{{{*/
+ {
+ char **matches;
+ want_postponed_entries = 1;
+@@ -309,7 +309,7 @@ char **complete_open(char *text, int ind
+ return matches;
+ }
+ /*}}}*/
+-char **complete_done(char *text, int index)/*{{{*/
++char **complete_done(const char *text, int index)/*{{{*/
+ {
+ char **matches;
+ matches = COMPLETION_MATCHES(text, generate_a_done_completion);
+@@ -317,7 +317,7 @@ char **complete_done(char *text, int ind
+ }
+ /*}}}*/
+
+-static char **tdl_completion(char *text, int start, int end)/*{{{*/
++static char **tdl_completion(const char *text, int start, int end)/*{{{*/
+ {
+ char **matches = NULL;
+ if (start == 0) {
+@@ -340,35 +340,35 @@ static char **tdl_completion(char *text,
+ return matches;
+ }
+ /*}}}*/
+-static char **null_tdl_completion(char *text, int start, int end)/*{{{*/
++static char **null_tdl_completion(const char *text, int start, int end)/*{{{*/
+ {
+ return NULL;
+ }
+ /*}}}*/
+ #else
+-char **complete_help(char *text, int index)/*{{{*/
++char **complete_help(const char *text, int index)/*{{{*/
+ {
+ return NULL;
+ }/*}}}*/
+-char **complete_list(char *text, int index)/*{{{*/
++char **complete_list(const char *text, int index)/*{{{*/
+ {
+ return NULL;
+ }/*}}}*/
+-char **complete_priority(char *text, int index)/*{{{*/
++char **complete_priority(const char *text, int index)/*{{{*/
+ {
+ return NULL;
+ }/*}}}*/
+-char **complete_postponed(char *text, int index)/*{{{*/
++char **complete_postponed(const char *text, int index)/*{{{*/
+ {
+ return NULL;
+ }
+ /*}}}*/
+-char **complete_open(char *text, int index)/*{{{*/
++char **complete_open(const char *text, int index)/*{{{*/
+ {
+ return NULL;
+ }
+ /*}}}*/
+-char **complete_done(char *text, int index)/*{{{*/
++char **complete_done(const char *text, int index)/*{{{*/
+ {
+ return NULL;
+ }
+@@ -556,7 +556,7 @@ static int setup_initval_hook(void)/*{{{
+ static char *interactive_text_readline(char *prompt, char *initval, int *is_blank, int *error)/*{{{*/
+ {
+ char *line;
+- Function *old_rl_pre_input_hook = NULL;
++ rl_hook_func_t *old_rl_pre_input_hook = NULL;
+
+ *error = 0;
+ old_rl_pre_input_hook = rl_pre_input_hook;
+@@ -633,9 +633,9 @@ char *interactive_text (char *prompt, ch
+ #ifdef USE_READLINE
+ if (isatty(0)) {
+ char *result;
+- rl_attempted_completion_function = (CPPFunction *) null_tdl_completion;
++ rl_attempted_completion_function = null_tdl_completion;
+ result = interactive_text_readline(prompt, initval, is_blank, error);
+- rl_attempted_completion_function = (CPPFunction *) tdl_completion;
++ rl_attempted_completion_function = tdl_completion;
+ return result;
+ } else {
+ /* In case someone wants to drive tdl from a script, by redirecting stdin to it. */
+@@ -653,7 +653,7 @@ void interactive(void)/*{{{*/
+ #ifdef USE_READLINE
+ if (isatty(0)) {
+ rl_completion_entry_function = NULL;
+- rl_attempted_completion_function = (CPPFunction *) tdl_completion;
++ rl_attempted_completion_function = tdl_completion;
+ interactive_readline();
+ } else {
+ /* In case someone wants to drive tdl from a script, by redirecting stdin to it. */
diff --git a/time/tdl/patches/patch-tdl.h b/time/tdl/patches/patch-tdl.h
new file mode 100644
index 00000000000..94847ce7a89
--- /dev/null
+++ b/time/tdl/patches/patch-tdl.h
@@ -0,0 +1,32 @@
+$NetBSD: patch-tdl.h,v 1.1 2014/05/18 21:24:56 joerg Exp $
+
+--- tdl.h.orig 2004-01-07 00:09:05.000000000 +0000
++++ tdl.h
+@@ -82,7 +82,7 @@ struct command {/*{{{*/
+ int (*func)(char **); /* ptr to function that actually does the work for this cmd */
+ char *descrip; /* One line description */
+ char *synopsis; /* Description of parameters */
+- char ** (*completer)(char *, int); /* Function to generate completions */
++ char ** (*completer)(const char *, int); /* Function to generate completions */
+ unsigned char dirty; /* 1 if operation can dirty the database, 0 if it leaves it clean */
+ unsigned char load_db; /* 1 if cmd requires current database to be loaded first */
+ unsigned char matchlen; /* number of characters to make command unambiguous */
+@@ -170,12 +170,12 @@ void load_database_if_not_loaded(void);
+ /* In inter.c */
+ void interactive(void);
+ char *interactive_text(char *prompt, char *initval, int *is_blank, int *error);
+-char **complete_help(char *, int);
+-char **complete_list(char *, int);
+-char **complete_priority(char *, int);
+-char **complete_postpone(char *, int);
+-char **complete_open(char *, int);
+-char **complete_done(char *, int);
++char **complete_help(const char *, int);
++char **complete_list(const char *, int);
++char **complete_priority(const char *, int);
++char **complete_postpone(const char *, int);
++char **complete_open(const char *, int);
++char **complete_done(const char *, int);
+
+ /* In narrow.c */
+ struct node *get_narrow_top(void);