You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tcl.apache.org by mx...@apache.org on 2020/03/04 10:53:32 UTC

[tcl-rivet] branch tcl-novem created (now 857f977)

This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a change to branch tcl-novem
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git.


      at 857f977  complying with Tcl9.0 requirements

This branch includes the following new commits:

     new 857f977  complying with Tcl9.0 requirements

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org


[tcl-rivet] 01/01: complying with Tcl9.0 requirements

Posted by mx...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mxmanghi pushed a commit to branch tcl-novem
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git

commit 857f977a9a9e27440f40f5ca2a56973ef20e691b
Author: Massimo Manghi <mx...@apache.org>
AuthorDate: Wed Mar 4 11:53:11 2020 +0100

    complying with Tcl9.0 requirements
---
 ChangeLog                           |  8 ++++++++
 src/librivet/rivetList.c            | 21 +++------------------
 src/mod_rivet_ng/TclWebapache.c     |  2 --
 src/mod_rivet_ng/mod_rivet_common.c |  5 +++--
 src/mod_rivet_ng/mod_rivet_common.h |  2 +-
 src/mod_rivet_ng/rivetChannel.c     |  4 ++--
 src/parser/parserPkgInit.c          | 13 +++----------
 src/rivet.h                         | 12 +++++++-----
 8 files changed, 27 insertions(+), 40 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a33381b..661e24e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-03-04 Massimo Manghi <mx...@apache.org>
+    * src/librivet/rivetList.c: declaring function with macro TCL_CMD_HEADER
+    * src/mod_rivet_ng/TclWebapache.c: removed svn related keyword
+    * src/mod_rivet_ng/mod_rivet_common.[c|h]: adopting standard C syntax for variable
+    * src/mod_rivet_ng/rivetChannel.c: obsolete CONST84 macro turned into standard 'const'
+    * src/parser/parserPkgInit.c: declaring function with macro TCL_CMD_HEADER
+    * src/rivet.h: Changed obsoleted CONST macro, remove svn related keyword
+
 2020-01-19 Massimo Manghi <mx...@apache.org>
     * doc/xml/commands.xml: remove entry for command incr0 (dropped in 3.0)
 
diff --git a/src/librivet/rivetList.c b/src/librivet/rivetList.c
index 5884756..2bb068e 100644
--- a/src/librivet/rivetList.c
+++ b/src/librivet/rivetList.c
@@ -45,12 +45,7 @@ static Tcl_ObjCmdProc Rivet_LassignArrayObjCmd;
  *       lremove ?-exact|-glob|-regexp? -all list pattern ..?pattern?..?pattern?
  *-----------------------------------------------------------------------------
  */
-static int
-Rivet_LremoveObjCmd( clientData, interp, objc, objv )
-    ClientData   clientData;
-    Tcl_Interp  *interp;
-    int          objc;
-    Tcl_Obj    *CONST objv[];
+TCL_CMD_HEADER(Rivet_LremoveObjCmd) 
 {
 #define EXACT   0
 #define GLOB    1
@@ -237,12 +232,7 @@ Rivet_ListObjAppendString (interp, targetList, string, length)
  *
  *-----------------------------------------------------------------------------
  */
-static int
-Rivet_CommaSplitObjCmd (notUsed, interp, objc, objv)
-    ClientData   notUsed;
-    Tcl_Interp  *interp;
-    int          objc;
-    Tcl_Obj   *CONST objv[];
+TCL_CMD_HEADER(Rivet_CommaSplitObjCmd) 
 {
     char        *first, *next;
     char         c;
@@ -404,12 +394,7 @@ Rivet_CommaSplitObjCmd (notUsed, interp, objc, objv)
  *
  *-----------------------------------------------------------------------------
  */
-static int
-Rivet_CommaJoinObjCmd (notUsed, interp, objc, objv)
-    ClientData   notUsed;
-    Tcl_Interp  *interp;
-    int          objc;
-    Tcl_Obj   *CONST objv[];
+TCL_CMD_HEADER(Rivet_CommaJoinObjCmd)
 {
     int         listObjc;
     Tcl_Obj   **listObjv;
diff --git a/src/mod_rivet_ng/TclWebapache.c b/src/mod_rivet_ng/TclWebapache.c
index 2446072..d755507 100644
--- a/src/mod_rivet_ng/TclWebapache.c
+++ b/src/mod_rivet_ng/TclWebapache.c
@@ -19,8 +19,6 @@
     under the License.
 */
 
-/* $Id$ */
-
 /* Rivet config */
 
 #ifdef HAVE_CONFIG_H
diff --git a/src/mod_rivet_ng/mod_rivet_common.c b/src/mod_rivet_ng/mod_rivet_common.c
index f7931d7..3814dfb 100644
--- a/src/mod_rivet_ng/mod_rivet_common.c
+++ b/src/mod_rivet_ng/mod_rivet_common.c
@@ -579,7 +579,7 @@ Rivet_SetupTclPanicProc (void)
  *
  *-----------------------------------------------------------------------------
  */
-void Rivet_Panic TCL_VARARGS_DEF(CONST char *, arg1)
+void Rivet_Panic(const char* arg1, ...)
 {
     va_list                 argList;
     char*                   buf;
@@ -588,7 +588,8 @@ void Rivet_Panic TCL_VARARGS_DEF(CONST char *, arg1)
 
     ap_assert (apr_threadkey_private_get ((void **)&private,rivet_thread_key) == APR_SUCCESS);
 
-    format = (char *) TCL_VARARGS_START(char *,arg1,argList);
+    // format = (char *) TCL_VARARGS_START(char *,arg1,argList);
+    format = (char *) (va_start(argList,arg1),arg1);
     buf    = (char *) apr_pvsprintf(private->rivet_panic_pool, format, argList);
 
     if (private->rivet_panic_request_rec != NULL) {
diff --git a/src/mod_rivet_ng/mod_rivet_common.h b/src/mod_rivet_ng/mod_rivet_common.h
index e1a1314..e802fca 100644
--- a/src/mod_rivet_ng/mod_rivet_common.h
+++ b/src/mod_rivet_ng/mod_rivet_common.h
@@ -31,7 +31,7 @@ EXTERN void Rivet_ProcessorCleanup (void *data);
 EXTERN int Rivet_chdir_file (const char *file);
 EXTERN void Rivet_CleanupRequest(request_rec *r);
 EXTERN void Rivet_InitServerVariables(Tcl_Interp *interp, apr_pool_t *pool);
-EXTERN void Rivet_Panic TCL_VARARGS_DEF(CONST char *, arg1);
+EXTERN void Rivet_Panic(const char* arg1, ...);
 EXTERN Tcl_Channel* Rivet_CreateRivetChannel(apr_pool_t* pPool, apr_threadkey_t* rivet_thread_key);
 EXTERN rivet_thread_private* Rivet_CreatePrivateData (void);
 EXTERN rivet_thread_private* Rivet_ExecutionThreadInit (void);
diff --git a/src/mod_rivet_ng/rivetChannel.c b/src/mod_rivet_ng/rivetChannel.c
index d6ec90f..8cd900a 100644
--- a/src/mod_rivet_ng/rivetChannel.c
+++ b/src/mod_rivet_ng/rivetChannel.c
@@ -49,7 +49,7 @@ inputproc(ClientData instancedata, char *buf, int toRead, int *errorCodePtr)
    Channel that we create to divert stdout to. */
 
 static int
-outputproc(ClientData instancedata, CONST84 char *buf, int toWrite, int *errorCodePtr)
+outputproc(ClientData instancedata, const char *buf, int toWrite, int *errorCodePtr)
 {
     apr_threadkey_t*        rivet_thread_key = (apr_threadkey_t*) instancedata;
     rivet_thread_private*   private;
@@ -74,7 +74,7 @@ closeproc(ClientData instancedata, Tcl_Interp *interp)
 
 static int
 setoptionproc(ClientData instancedata, Tcl_Interp *interp,
-	          CONST84 char *optionname, CONST84 char *value)
+	          const char *optionname, const char *value)
 {
     return TCL_OK;
 }
diff --git a/src/parser/parserPkgInit.c b/src/parser/parserPkgInit.c
index 205c617..f2ba8d8 100644
--- a/src/parser/parserPkgInit.c
+++ b/src/parser/parserPkgInit.c
@@ -22,8 +22,6 @@
     under the License.
  */
 
-/* $Id$ */
-
 /* Rivet config */
 #ifdef HAVE_CONFIG_H
 #include <rivet_config.h>
@@ -53,14 +51,9 @@
  *-----------------------------------------------------------------------------
  */
 
-static int
-Parse_Rivet(
-    ClientData clientData,
-    Tcl_Interp *interp,
-    int objc,
-    Tcl_Obj *CONST objv[])
+TCL_CMD_HEADER(Parse_Rivet)
 {
-    Tcl_Obj *outbuf;
+    Tcl_Obj* outbuf;
     int     tclcode;
 
     outbuf = Tcl_NewObj();
@@ -106,7 +99,7 @@ Parse_Rivet(
 
 static int
 Parse_RivetData(ClientData clientData, Tcl_Interp *interp,
-                int objc, Tcl_Obj *CONST objv[])
+                int objc, Tcl_Obj* const objv[])
 {
     Tcl_Obj *outbuf;
 
diff --git a/src/rivet.h b/src/rivet.h
index 6572647..274415e 100644
--- a/src/rivet.h
+++ b/src/rivet.h
@@ -19,10 +19,8 @@
     under the License.
  */
 
-/* $Id$ */
-
-#ifndef _RIVET_H_
-#define _RIVET_H_
+#ifndef __rivet_h__
+#define __rivet_h__
 
 #include <tcl.h>
 #include "rivet_types.h"
@@ -58,7 +56,7 @@ static int cmd(\
     ClientData clientData,\
     Tcl_Interp *interp,\
     int objc,\
-    Tcl_Obj *CONST objv[])
+    Tcl_Obj* const objv[])
 
 #define TCL_OBJ_CMD( name, func ) \
 Tcl_CreateObjCommand( interp,           /* Tcl interpreter */\
@@ -108,6 +106,10 @@ EXTERN int Rivet_InitList(Tcl_Interp *interp);
 EXTERN int Rivet_InitCrypt(Tcl_Interp *interp);
 EXTERN int Rivet_InitWWW(Tcl_Interp *interp);
 
+#ifndef INLINE
+#define INLINE
+#endif
+
 #endif
 
 /* _RIVET_H_ */


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org