pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/tclreadline const fixes. Avoid CPPFunction.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d6465e89917c
branches:  trunk
changeset: 652804:d6465e89917c
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Jun 08 13:39:35 2015 +0000

description:
const fixes. Avoid CPPFunction.

diffstat:

 devel/tclreadline/distinfo                    |   3 +-
 devel/tclreadline/patches/patch-tclreadline.c |  79 +++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 1 deletions(-)

diffs (94 lines):

diff -r 6bb84d9c0fb1 -r d6465e89917c devel/tclreadline/distinfo
--- a/devel/tclreadline/distinfo        Mon Jun 08 13:38:50 2015 +0000
+++ b/devel/tclreadline/distinfo        Mon Jun 08 13:39:35 2015 +0000
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.1.1.1 2010/03/12 23:18:13 pettai Exp $
+$NetBSD: distinfo,v 1.2 2015/06/08 13:39:35 joerg Exp $
 
 SHA1 (tclreadline-2.1.0.tar.gz) = 3b44f92ce1921ebccebab9b44d7cda6992cf8923
 RMD160 (tclreadline-2.1.0.tar.gz) = 9967f7d7aa18fcd822f5701306f3a75a6001fdc5
 Size (tclreadline-2.1.0.tar.gz) = 160541 bytes
+SHA1 (patch-tclreadline.c) = d7f6990b99e62a048048afe3fba6e8bb790eff93
diff -r 6bb84d9c0fb1 -r d6465e89917c devel/tclreadline/patches/patch-tclreadline.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/tclreadline/patches/patch-tclreadline.c     Mon Jun 08 13:39:35 2015 +0000
@@ -0,0 +1,79 @@
+$NetBSD: patch-tclreadline.c,v 1.1 2015/06/08 13:39:35 joerg Exp $
+
+--- tclreadline.c.orig 2015-06-08 12:42:30.000000000 +0000
++++ tclreadline.c
+@@ -73,16 +73,16 @@ static char* stripright(char* in);
+ static char* stripwhite(char* in);
+ static int TclReadlineLineComplete(void);
+ static void TclReadlineTerminate(int state);
+-static char* TclReadlineQuote(char* text, char* quotechars);
++static char* TclReadlineQuote(const char* text, char* quotechars);
+ static int TclReadlineCmd(ClientData clientData, Tcl_Interp *interp, int objc,
+                    Tcl_Obj *CONST objv[]);
+ static void TclReadlineReadHandler(ClientData clientData, int mask);
+ static void TclReadlineLineCompleteHandler(char* ptr);
+ static int TclReadlineInitialize(Tcl_Interp* interp, char* historyfile);
+ static int blank_line(char* str);
+-static char** TclReadlineCompletion(char* text, int start, int end);
+-static char* TclReadline0generator(char* text, int state);
+-static char* TclReadlineKnownCommands(char* text, int state, int mode);
++static char** TclReadlineCompletion(const char* text, int start, int end);
++static char* TclReadline0generator(const char* text, int state);
++static char* TclReadlineKnownCommands(const char* text, int state, int mode);
+ static int TclReadlineParse(char** args, int maxargs, char* buf);
+ 
+ 
+@@ -176,9 +176,9 @@ TclReadlineTerminate(int state)
+ }
+ 
+ static char*
+-TclReadlineQuote(char* text, char* quotechars)
++TclReadlineQuote(const char* text, char* quotechars)
+ {
+-    char* ptr;
++    const char* ptr;
+     char* result_c;
+     int i, len = strlen(quotechars);
+     Tcl_DString result;
+@@ -635,7 +635,7 @@ TclReadlineInitialize(Tcl_Interp* interp
+      * directory. If this failes, this
+      * is *not* an error.
+      */
+-    rl_attempted_completion_function = (CPPFunction *) TclReadlineCompletion;
++    rl_attempted_completion_function = TclReadlineCompletion;
+     if (read_history(historyfile)) {
+       if (write_history(historyfile)) {
+           Tcl_AppendResult (interp, "warning: `",
+@@ -657,7 +657,7 @@ blank_line(char* str)
+ }
+ 
+ static char**
+-TclReadlineCompletion(char* text, int start, int end)
++TclReadlineCompletion(const char* text, int start, int end)
+ {
+     char** matches = (char**) NULL;
+     int status;
+@@ -752,13 +752,13 @@ TclReadlineCompletion(char* text, int st
+ }
+ 
+ static char*
+-TclReadline0generator(char* text, int state)
++TclReadline0generator(const char* text, int state)
+ {
+     return TclReadlineKnownCommands(text, state, _CMD_GET);
+ }
+ 
+ static char*
+-TclReadlineKnownCommands(char* text, int state, int mode)
++TclReadlineKnownCommands(const char* text, int state, int mode)
+ {
+     static int len;
+     static cmds_t *cmds = (cmds_t *) NULL, *new;
+@@ -881,6 +881,6 @@ TclReadlineParse(char** args, int maxarg
+           buf++;
+     }
+ 
+-    *args = '\0';
++    *args = NULL;
+     return nr;
+ }



Home | Main Index | Thread Index | Old Index