Wapp

Diff
Login

Differences From Artifact [53168977aa]:

To Artifact [3197757451]:


1

2
3

4
5
6
7
8
9
10
11
12
13

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30


1
2

3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

30
-
+

-
+









-
+
















-
+
# This script runs to initialize wapptclsh.
# This script runs to initialize w3tclsh.
#
proc initialize_wapptclsh {} {
proc initialize_w3tclsh {} {
  global argv argv0 main_script
  if {[llength $argv]==0} {
    set script --help
  } else {
    set script [lindex $argv 0]
  }
  if {[string index $script 0]=="-"} {
    set opt [string trim $script -]
    if {$opt=="v"} {
      puts stderr "Wapp using SQLite version [sqlite3 -version]"
      puts stderr "W3 using SQLite version [sqlite3 -version]"
    } else {
      puts stderr "Usage: $argv0 FILENAME"
      puts stderr "Options:"
      puts stderr "   -v      Show version information"
    }
    exit 1
  } elseif {[file readable $script]} {
    set fd [open $script r]
    set main_script [read $fd]
    close $fd
    set argv [lrange $argv 1 end]
    set argv0 $script
  } else {
    puts stderr "unknown option: \"$script\"\nthe --help option is available"
  }
}
initialize_wapptclsh
initialize_w3tclsh