Index: ossp-pkg/tabea/test/1.gif RCS File: /v/ossp/cvs/ossp-pkg/tabea/test/1.gif,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/tabea/test/1.gif,v' | diff -u /dev/null - -L'ossp-pkg/tabea/test/1.gif' 2>/dev/null Binary files ossp-pkg/tabea/test/1.gif and - differ Index: ossp-pkg/tabea/test/1.jpg RCS File: /v/ossp/cvs/ossp-pkg/tabea/test/1.jpg,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/tabea/test/1.jpg,v' | diff -u /dev/null - -L'ossp-pkg/tabea/test/1.jpg' 2>/dev/null Binary files ossp-pkg/tabea/test/1.jpg and - differ Index: ossp-pkg/tabea/test/cfg1.txt RCS File: /v/ossp/cvs/ossp-pkg/tabea/test/cfg1.txt,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/tabea/test/cfg1.txt,v' | diff -u /dev/null - -L'ossp-pkg/tabea/test/cfg1.txt' 2>/dev/null --- ossp-pkg/tabea/test/cfg1.txt +++ - 2025-11-04 18:02:25.612747073 +0100 @@ -0,0 +1 @@ +Config 1 for testing Index: ossp-pkg/tabea/test/cfg2.txt RCS File: /v/ossp/cvs/ossp-pkg/tabea/test/cfg2.txt,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/tabea/test/cfg2.txt,v' | diff -u /dev/null - -L'ossp-pkg/tabea/test/cfg2.txt' 2>/dev/null --- ossp-pkg/tabea/test/cfg2.txt +++ - 2025-11-04 18:02:25.615612312 +0100 @@ -0,0 +1 @@ +Config2 for testing Index: ossp-pkg/tabea/test/hash.txt RCS File: /v/ossp/cvs/ossp-pkg/tabea/test/hash.txt,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/tabea/test/hash.txt,v' | diff -u /dev/null - -L'ossp-pkg/tabea/test/hash.txt' 2>/dev/null --- ossp-pkg/tabea/test/hash.txt +++ - 2025-11-04 18:02:25.618579067 +0100 @@ -0,0 +1,210 @@ +item { + name street + visible "Street Address:" + type text +} +{'street' => { 'name' => 'street', + 'visible' => 'Street Address', + 'type' => 'text'} + +item { + name city + visible "Postal City code:" + type text[16][16] +} +{'city' => { 'name' => 'city', + 'visible' => 'Postal City Code:', + 'type' => 'text[16][16]'} + + +item { + name zip + visible "Zip Code:" + type text[10][10] + value { + name "99999-9999" + } +} +{'zip' => { 'name' => 'zip', + 'visible' => 'Zip Code:', + 'type' => 'text[16][16], + 'value' => '99999-9999'} + + +item { + name login + visible "Name:" + type text +} +{'login' => { 'name' => 'login', + 'visible' => 'Name:', + 'type' => 'text'} + +item { + name passwd + visible "Password:" + type password +} +{'passwd' => { 'name' => 'passwd', + 'visible' => 'Password:', + 'type' => 'password'} + + + +item { + name flavor + visible "What flavors do you like?" + type checkbox + value { + name vanilla + visible "Vanilla" + checked + } + value { + name strawberry + visible "Strawberry" + } + value { + name chocolate + visible "Chocolate" + checked + } +} +{ 'flavor' => { 'name' => 'flavor', + 'visible' => 'What flavor do you like?', + 'type' => 'checkbox', + 'value' => 'vanilla', + 'value' => 'strawberry', + 'value' => 'chocolate'} +{ 'vanilla' => { 'name' => 'vanilla', + 'visible' => 'Vanilla', + 'checked' => } +{ 'strawberry' => { 'name' => 'strawberry', + 'visible' => 'Strawberry' } +{ 'chocolate' => { 'name' => 'choclate', + 'visible' => 'Chocolate' } + + + +item { + name flavor + visible "Which is your favorite?" + type radio + value { + name vanilla + visible "Vanilla" + checked + } + value { + name strawberry + visible "Strawberry" + } + value { + name chocolate + visible "Chocolate" + } +} +{ 'flavor' => { 'name' => 'flavor', + 'visible' => 'Which is your favorite?', + 'type' => 'radio', + 'value' => 'vanilla', + 'value' => 'strawberry', + 'value' => 'chocolate'} +{ 'vanilla' => { 'name' => 'vanilla', + 'visible' => 'Vanilla', + 'checked' => } +{ 'strawberry' => { 'name' => 'strawberry', + 'visible' => 'Strawberry' } +{ 'chocolate' => { 'name' => 'choclate', + 'visible' => 'Chocolate' } + + + +item { + name point + visible "Choose a point on the map:" + type image + value { + name "map.gif" + } +} + +{ 'point' => { 'name' => 'point', + 'visible' => 'Choose a point on the map:', + 'type' => 'image', + 'value' => 'map.gif'} +{ 'map.gif' => { 'name' => 'mag.gif' } + +item { + name recipient + type submit + value { + name internal + } + value { + name world + } +} +{ 'recipient' => { 'name' => 'recipient', + 'type' => 'submit, + 'value' => 'internal', + 'value' => 'world'} +{ 'internal' => { 'name' => 'internal' } +{ 'world' => { 'name' => 'world' } + + +item { + description "You may clear the form and start over at any time:" + type reset +} +{ ???? => { 'description' => 'You may clear the form and start over at any time:', + 'type' => 'reset'} + + +item { + name flavor + type select[2] //or type selectmultipe[2] + value { + name "Vanilla" + } + value { + name "Strawberry" + } + value { + name RumRasin + visible "Rum and Raisin" + } + value { + name "Peach and Orange" + selected + } +} + +{ 'flavor' => { 'name' => 'flavor', + 'type' => 'select[2]', + 'value' => 'Vanilla', + 'value' => 'Strawberry', + 'value' => 'RumRasin', + 'value' => 'Peach and Orange'} +{ 'value' => { 'name' => 'Vanilla'} +{ 'value' => { 'name' => 'Strawberry'} +{ 'value' => { 'name' => 'RumRasin', + 'visible' => 'Rum and Raisin'} +{ 'value' => { 'name' => 'Reach and Orange', + 'selected'=> } + +item { + name "address" + type textarea[64][6] + value { + name "HaL Computer Systems\n1315 Dell Avenue\nCampbell, California 95008" + } +} +{ 'address' => { 'name' => 'address', + 'type' => 'textarea[64][6]', + 'value' => 'HaL Computer Systems\n1315 Dell Avenue\nCampbell, California +95008'} +{ 'HaL Computer Systems\n1315 Dell Avenue\nCampbell, California 95008' => { 'name' => 'HaL Computer +Systems\n1315 Dell Avenue\nCampbell, California 95008} + + Index: ossp-pkg/tabea/test/output.cgi.1 RCS File: /v/ossp/cvs/ossp-pkg/tabea/test/output.cgi.1,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/tabea/test/output.cgi.1,v' | diff -u /dev/null - -L'ossp-pkg/tabea/test/output.cgi.1' 2>/dev/null --- ossp-pkg/tabea/test/output.cgi.1 +++ - 2025-11-04 18:02:25.621099780 +0100 @@ -0,0 +1,368 @@ +#!/usr/opkg/bin/perl -w +# +# This program is for testing the possibilities +# of creating an output in html +# Later test the possibiliies to read in the values +# from an cfg file and convert this to html +# + +require 5.000; +use strict; +use CGI; + +$|++; + + +# establish CGI query object +my $cgi = new CGI; + +# activate a general error handler +$SIG{__DIE__} = sub { +my ($err) = @_; + + #$err =~ s|at\s+\S+\s+line\s+(\d+)|(line $1)|s; + $err =~ s|\n|
\n|sg; + print STDOUT $cgi->header(-expires => '+1s') . + "TabeaTest :: ERROR", + "

TabeaTest :: ERROR

\n" . + "
$err
\n"; + exit(0); +}; + + + + +my $username; + + +my $form = ''; +my $page; + + +if ($form eq '') { + $page .= "

We are testing
" ; + $page .= "\n\nHere comes the text output:
\n" ; + $page .= &text(); + $page .= "

\n" ; + $page .= "\n\nHere comes the password output:
\n" ; + $page .= &password(); + $page .= "

\n" ; + $page .= "\n\nHere comes the checkbox output:
\n" ; + $page .= &checkbox(); + $page .= "

\n" ; + $page .= "\n\nHere comes the radio output:
\n" ; + $page .= &radio(); + $page .= "

\n" ; + $page .= "\n\nHere comes the image output:
\n" ; + $page .= &image(); +# $page .= &hidden(); + $page .= "

\n" ; + $page .= "\n\nHere comes the submit output:
\n" ; + $page .= &submit(); + $page .= "

\n" ; + $page .= "\n\nHere comes the reset output:
\n" ; + $page .= &reset(); + $page .= "

\n" ; + $page .= "\n\nHere comes the select output:
\n" ; + $page .= &select(); + $page .= "

\n" ; + $page .= "\n\nHere comes the textaraea output:
\n" ; + $page .= &textarea(); +} +else { + die "no correct dialog found"; +} + +$page .= $cgi->endform; + + +#print STDOUT $cgi->header(-cookie => $cookies, -expires => '+1s') . $page; +print STDOUT $cgi->header() . $page; + +sub text{ + my $text; + # Text Field: INPUT TYPE=TEXT + + #

Street Address:
+ # Postal City code:
+ # Zip Code:
+ + $text .= "

Street Address:
" . + "Postal City code:
" . + "Zip Code:
" ; + + + #item { + # name street + # visible "Street Address:" + # type text + #} + #item { + # name city + # visible "Postal City code:" + # type text[16][16] + #} + #item { + # name zip + # visible "Zip Code:" + # type text[10][10] + # value { + # name "99999-9999" + # } + #} + return $text; +} + +sub password { + my $text; +# # Password Field: INPUT TYPE=PASSWORD + + #

Name: Password: + + $text .= "

Name: Password: " ; + +# item { +# name login +# visible "Name:" +# type text +# } +# item { +# name passwd +# visible "Password:" +# type password +# } +# +# + return $text; +} + +sub checkbox { + my $text; +# # Check Box: INPUT TYPE=CHECKBOX +# +# #

What flavors do you like? +## # Vanilla
+ # Strawberry
+# # Chocolate
+ + $text .= "

What flavors do you like?\n" . + "Vanilla
\n" . + "Strawberry
\n" . + "Chocolate
\n" ; +# +# item { +# name flavor +# visible "What flavors do you like?" +# type checkbox +# value { +# name vanilla +# visible "Vanilla" +# checked +# } +# value { +# name strawberry +# visible "Strawberry" +# } +# value { +# name chocolate +# visible "Chocolate" +# checked +# } +# } +# + return $text; +} + +sub radio { + my $text; +# # Radio Button: INPUT TYPE=RADIO +# +# #

Which is your favorite? +# # Vanilla
+# # Strawberry
+# # Chocolate
+ + $text .= "

Which is your favorite?\n" . + "Vanilla
\n" . + "Strawberry
\n" . + "Chocolate
\n" ; +# +# item { +# name flavor +# visible "Which is your favorite?" +# type radio +# value { +# name vanilla +# visible "Vanilla" +# checked +# } +# value { +# name strawberry +# visible "Strawberry" +# } +# value { +# name chocolate +# visible "Chocolate" +# } +# } +# +# + return $text; +} + +sub image { + my $text; +# # Image Pixel: INPUT TYPE=IMAGE +# +# # + +# $text .= "\n" ; + $text .= "\"gif\n"; +# +# item { +# name point +# visible "Choose a point on the map:" +# type image +# value { +# name "map.gif" +# } +# } +# +# + return $text; +} + + +sub hidden { + my $text; +# # Hidden Field: INPUT TYPE=HIDDEN (FIXME do we really need this?) +# +# # + + $text .= "\n" ; +# +# item { +# name context +# type hidden +# value { +# name "l2k3j4l2k3j4l2k3j4lk23" +# } +# } +# +# + return $text; +} + +sub submit { + my $text; +# # Submit Button: INPUT TYPE=SUBMIT +# +# #
+# # + + $text .= "
\n" . + "\n" ; + + +# +# item { +# name recipient +# type submit +# value { +# name internal +# } +# value { +# name world +# } +# } +# + return $text; +} + +sub reset { + my $text; +# +# # Reset Button: INPUT TYPE=RESET +# +# # + + $text .= "\n" ; +# +# item { +# description "You may clear the form and start over at any time:" +# type reset +# } + return $text; +} + +sub select { + my $text; +# # Selection: SELECT +# # Option: OPTION +# +# # +# + + $text .= "\n" ; + + +# item { +# name flavor +# type select[2] //or type selectmultipe[2] +# value { +# name "Vanilla" +# } +# value { +# name "Strawberry" +# } +# value { +# name RumRasin +# visible "Rum and Raisin" +# } +# value { +# name "Peach and Orange" +# selected +# } +# +# } +# +# + return $text; +} + +sub textarea { + my $text; +# # Text Area: TEXTAREA +# +# # +# + $text .= "\n" ; + +# item { +# name "address" +# type textarea[64][6] +# value { +# name "HaL Computer Systems\n1315 Dell Avenue\nCampbell, California 95008" +# } +# } +# + return $text; +} Index: ossp-pkg/tabea/test/output.cgi.html.1 RCS File: /v/ossp/cvs/ossp-pkg/tabea/test/output.cgi.html.1,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/tabea/test/output.cgi.html.1,v' | diff -u /dev/null - -L'ossp-pkg/tabea/test/output.cgi.html.1' 2>/dev/null --- ossp-pkg/tabea/test/output.cgi.html.1 +++ - 2025-11-04 18:02:25.623710882 +0100 @@ -0,0 +1,60 @@ +

We are testing
+ +Here comes the text output:
+

Street Address:
Postal City code:
Zip Code:


+ + +Here comes the password output:
+

Name: Password:

+ + +Here comes the checkbox output:
+

What flavors do you like? +Vanilla
+Strawberry
+Chocolate
+

+ + +Here comes the radio output:
+

Which is your favorite? +Vanilla
+Strawberry
+Chocolate
+

+ + +Here comes the image output:
+gif not found +

+ + +Here comes the submit output:
+
+ +

+ + +Here comes the reset output:
+ +

+ + +Here comes the select output:
+ +

+ + +Here comes the textaraea output:
+ + + \ No newline at end of file Index: ossp-pkg/tabea/test/read-cfg.pl RCS File: /v/ossp/cvs/ossp-pkg/tabea/test/read-cfg.pl,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/tabea/test/read-cfg.pl,v' | diff -u /dev/null - -L'ossp-pkg/tabea/test/read-cfg.pl' 2>/dev/null --- ossp-pkg/tabea/test/read-cfg.pl +++ - 2025-11-04 18:02:25.626197034 +0100 @@ -0,0 +1,66 @@ +#!/usr/opkg/bin/perl -w +# +# This is for testing the read in of +# configurationg files +# + + +require 5.000; +use strict; +use IO; + + +my $cfgfilename; + + +if (0 > $#ARGV) { + usage(); +} + + + + +$cfgfilename=$ARGV[0]; + +print "\nWorking with: $cfgfilename\n"; + +my $filename = "/d1/ps/work/ossp-pkg/tabea/test/tabea-cfg.in"; +my $filein = new IO::File "<$cfgfilename" || die; +my $config = ''; + +if (defined $filein) { + LOOP: while(<$filein>) { + $_ =~ s|^\s+(.*?)|{$_=$1}|es; # Remove whitespaces at the beginning + next LOOP if $_ =~ /^\n/; # Remove the first empty require + next LOOP if $_ eq ""; # Remove empty line + next LOOP if $_ =~/^#/; # Remove comment lines + + $_ =~ s|^([^#]+)#(.*)$|{$_=$1}|es; # Remove comments on the end + $_ =~ s|(.*?)\s+$|{$_=$1}|es; # Remove whitespaces at the end + + #($key, $content) = /^(\w+)\s+(.*)$/; + + #$cfghash{$key} = $content; + $config .= $_; + + } +} else { + die "Can't open config file"; +} +#$config .= $_ while (<$filein>); + +$filein -> close ; + + +print "\nHere is the output:\n\n"; +print $config; + +################################################################################################# +sub usage { +################################################################################################# + + print "\nread-cfg.pl cfgfilename\n\n"; + + exit 1; +################################################################################################# +} Index: ossp-pkg/tabea/test/tabea-cfg.in RCS File: /v/ossp/cvs/ossp-pkg/tabea/test/tabea-cfg.in,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/tabea/test/tabea-cfg.in,v' | diff -u /dev/null - -L'ossp-pkg/tabea/test/tabea-cfg.in' 2>/dev/null --- ossp-pkg/tabea/test/tabea-cfg.in +++ - 2025-11-04 18:02:25.628676514 +0100 @@ -0,0 +1,200 @@ +# Test config + +# Text Field: INPUT TYPE=TEXT + +#

Street Address:
+# Postal City code:
+# Zip Code:
+ +item { + name street + visible "Street Address:" + type text +} +item { + name city + visible "Postal City code:" + type text[16][16] +} +item { + name zip + visible "Zip Code:" + type text[10][10] + value { + name "99999-9999" + } +} + + + +# Password Field: INPUT TYPE=PASSWORD + +#

Name: Password: + +item { + name login + visible "Name:" + type text +} +item { + name passwd + visible "Password:" + type password +} + + + +# Check Box: INPUT TYPE=CHECKBOX + +#

What flavors do you like? +# Vanilla
+# Strawberry
+# Chocolate
+ +item { + name flavor + visible "What flavors do you like?" + type checkbox + value { + name vanilla + visible "Vanilla" + checked + } + value { + name strawberry + visible "Strawberry" + } + value { + name chocolate + visible "Chocolate" + checked + } +} + +# Radio Button: INPUT TYPE=RADIO + +#

Which is your favorite? +# Vanilla
+# Strawberry
+# Chocolate
+ +item { + name flavor + visible "Which is your favorite?" + type radio + value { + name vanilla + visible "Vanilla" + checked + } + value { + name strawberry + visible "Strawberry" + } + value { + name chocolate + visible "Chocolate" + } +} + + +# Image Pixel: INPUT TYPE=IMAGE + +# + +item { + name point + visible "Choose a point on the map:" + type image + value { + name "map.gif" + } +} + + +# Hidden Field: INPUT TYPE=HIDDEN (FIXME do we really need this?) + +# + +item { + name context + type hidden + value { + name "l2k3j4l2k3j4l2k3j4lk23" + } +} + + +# Submit Button: INPUT TYPE=SUBMIT + +#
+# + +item { + name recipient + type submit + value { + name internal + } + value { + name world + } +} + + +# Reset Button: INPUT TYPE=RESET + +# + +item { + description "You may clear the form and start over at any time:" + type reset +} + + +# Selection: SELECT +# Option: OPTION + +# + +item { + name flavor + type select[2] //or type selectmultipe[2] + value { + name "Vanilla" + } + value { + name "Strawberry" + } + value { + name RumRasin + visible "Rum and Raisin" + } + value { + name "Peach and Orange" + selected + } +} + + +# Text Area: TEXTAREA + +# + +item { + name "address" + type textarea[64][6] + value { + name "HaL Computer Systems\n1315 Dell Avenue\nCampbell, California 95008" + } +} + Index: ossp-pkg/tabea/test/tabea-cfg.in1 RCS File: /v/ossp/cvs/ossp-pkg/tabea/test/tabea-cfg.in1,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/tabea/test/tabea-cfg.in1,v' | diff -u /dev/null - -L'ossp-pkg/tabea/test/tabea-cfg.in1' 2>/dev/null --- ossp-pkg/tabea/test/tabea-cfg.in1 +++ - 2025-11-04 18:02:25.631212078 +0100 @@ -0,0 +1,27 @@ +# Test config + +# Text Field: INPUT TYPE=TEXT + +#

Street Address:
+# Postal City code:
+# Zip Code:
+ +item { + name street + visible "Street Address:" + type text +} +item { + name city + visible "Postal City code:" + type text[16][16] +} +item { + name zip + visible "Zip Code:" + type text[10][10] + value { + name "99999-9999" + } +} + Index: ossp-pkg/tabea/test/tabea-cfg.in2 RCS File: /v/ossp/cvs/ossp-pkg/tabea/test/tabea-cfg.in2,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/tabea/test/tabea-cfg.in2,v' | diff -u /dev/null - -L'ossp-pkg/tabea/test/tabea-cfg.in2' 2>/dev/null --- ossp-pkg/tabea/test/tabea-cfg.in2 +++ - 2025-11-04 18:02:25.633686244 +0100 @@ -0,0 +1,18 @@ +# Test config + + +# Password Field: INPUT TYPE=PASSWORD + +#

Name: Password: + +item { + name login + visible "Name:" + type text +} +item { + name passwd + visible "Password:" + type password +} +