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

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


The following commit(s) were added to refs/heads/master by this push:
     new 01c8427  moving experimental files and fully qualify Rivet commands in 
rivet_ncgi.tcl
01c8427 is described below

commit 01c84278d12c8080de006293ab66188d84bc547a
Author: Massimo Manghi <mxman...@apache.org>
AuthorDate: Sun May 12 00:51:37 2024 +0200

    moving experimental files and fully qualify Rivet commands in rivet_ncgi.tcl
---
 ChangeLog                                |  5 +++
 Makefile.am                              |  2 --
 rivet/packages/{dio => aida}/aida.tcl    |  0
 rivet/packages/{dio => aida}/sql.tcl     | 23 ++++++++------
 rivet/packages/rivet_ncgi/rivet_ncgi.tcl | 52 ++++++++++++++++----------------
 5 files changed, 44 insertions(+), 38 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b227ba7..64cb4d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2024-05-11 Massimo Manghi <mxman...@apache.org>
+    * rivet/packages/aida/aida.tcl,sql.tcl: experimental files moved from 
packages/dio
+    * rivet/packages/rivet_ncgi/rivet_ncgi.tcl: fully qualifying rivet commands
+    * Makefile.am: Remove svn Id: 
+
 2024-04-12 Massimo Manghi <mxman...@apache.org>
        * src/mod_rivet_ng/mod_rivet_common.c: Determining the server_rec also
        for ServerInitScripts.
diff --git a/Makefile.am b/Makefile.am
index d4c083d..90b5491 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,8 +1,6 @@
 #
 # top-level Makefile.am for Apache Rivet: gets turned into a Makefile.in by 
automake
 #
-# $Id$
-#
 # 2007/12/25: Added target uninistall-local that removes the tcl stuff 
(mxmanghi)
 # 2010/06/22: target instal-data-local searches for pkgIndex.tcl files and 
deletes them
 #             before invoking pkg_mkIndex.
diff --git a/rivet/packages/dio/aida.tcl b/rivet/packages/aida/aida.tcl
similarity index 100%
rename from rivet/packages/dio/aida.tcl
rename to rivet/packages/aida/aida.tcl
diff --git a/rivet/packages/dio/sql.tcl b/rivet/packages/aida/sql.tcl
similarity index 94%
rename from rivet/packages/dio/sql.tcl
rename to rivet/packages/aida/sql.tcl
index f09d000..385a416 100644
--- a/rivet/packages/dio/sql.tcl
+++ b/rivet/packages/aida/sql.tcl
@@ -1,13 +1,13 @@
 # sql.tcl -- SQL code generator
 
-# Copyright 2002-2004 The Apache Software Foundation
-
+# Copyright 2024 The Apache Tcl Team
+#
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
-
-#       http://www.apache.org/licenses/LICENSE-2.0
-
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
 # Unless required by applicable law or agreed to in writing, software
 # distributed under the License is distributed on an "AS IS" BASIS,
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -37,14 +37,17 @@ namespace eval ::Aida {
         public variable what
         public variable table
 
-        constructor { backend } {
+        constructor {backend} {
 
         }
 
         private method where_clause {where_arguments}
 
         public method build_select_query {table row_d}
-        public method quote {field_value}
+        public method escape_quotes {field_value}
+
+        # DEPRECATED. Kept for compatibility, but it might go away
+        public method quote {field_value} { return [$this escape_quotes 
$field_value] }
 
         protected method field_value {table_name field_name val} {
             return "'[quote $val]'"
@@ -149,10 +152,10 @@ namespace eval ::Aida {
 
 
     #
-    # quote - given a string, return the same string with any single
-    #  quote characters preceded by a backslash
+    # escape_quotes - given a string, return the same string with any single
+    #                 quote characters preceded by a backslash
     #
-    ::itcl::body Sql::quote {field_value} {
+    ::itcl::body Sql::escape_quotes {field_value} {
         regsub -all {'} $field_value {\'} field_value
         return $field_value
     }
diff --git a/rivet/packages/rivet_ncgi/rivet_ncgi.tcl 
b/rivet/packages/rivet_ncgi/rivet_ncgi.tcl
index 52053a6..c1099fd 100644
--- a/rivet/packages/rivet_ncgi/rivet_ncgi.tcl
+++ b/rivet/packages/rivet_ncgi/rivet_ncgi.tcl
@@ -25,7 +25,7 @@ namespace eval ncgi {
 #      None.
 
 proc ::ncgi::parse {} {
-    load_env ::env
+    ::rivet::load_env ::env
 }
 
 # ::ncgi::value --
@@ -43,10 +43,10 @@ proc ::ncgi::parse {} {
 #      The value of the specified variable, or {} if it is empty.
 
 proc ::ncgi::value {key {default {}}} {
-    if { [var exists $key] } {
-       return [var get $key]
+    if { [::rivet::var exists $key] } {
+        return [::rivet::var get $key]
     } else {
-       return $default
+        return $default
     }
 }
 
@@ -73,25 +73,25 @@ proc ::ncgi::encode {string} {
 
 proc ::ncgi::importFile {cmd var {filename {}}} {
     switch -exact -- $cmd {
-       -server {
-           if { $filename == {} } {
-               set filename [::fileutil::tempfile ncgi]
-           }
-           upload save $var $filename
-           return $filename
-       }
-       -client {
-           return [upload filename $var]
-       }
-       -type {
-           return [upload type]
-       }
-       -data {
-           return [upload data $var]
-       }
-       default {
-           error "Unknown subcommand to ncgi::import_file: $cmd"
-       }
+        -server {
+            if { $filename == {} } {
+                set filename [::fileutil::tempfile ncgi]
+            }
+            ::rivet::upload save $var $filename
+            return $filename
+        }
+        -client {
+            return [::rivet::upload filename $var]
+        }
+        -type {
+            return [::rivet::upload type]
+        }
+        -data {
+            return [::rivet::upload data $var]
+        }
+        default {
+            error "Unknown subcommand to ncgi::import_file: $cmd"
+        }
     }
 }
 
@@ -110,7 +110,7 @@ proc ::ncgi::importFile {cmd var {filename {}}} {
 #      1 or 0.
 
 proc ::ncgi::empty {name} {
-    expr {! [var exists $name]}
+    expr {![::rivet::var exists $name]}
 }
 
 # ::ncgi::::redirect --
@@ -127,5 +127,5 @@ proc ::ncgi::empty {name} {
 #      None.
 
 proc ::ncgi::::redirect {uri} {
-    headers redirect $uri
-}
\ No newline at end of file
+    ::rivet::headers redirect $uri
+}


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

Reply via email to