2017-09-13 14:32 UTC Viktor Szakats (vszakats users.noreply.github.com)

- extras/guestbk/cgi.ch
  - extras/guestbk/guestbk.hbp
  - extras/guestbk/guestbk.txt
  * .gitattributes
  * contrib/hbgd/tests/counter.prg
  * contrib/hbhttpd/core.prg
  * contrib/hbgd/tests/digits/57chevy.gif -> contrib/hbgd/tests/imgs_in/57chevy.gif
  * contrib/hbgd/tests/digits/7seg.gif -> contrib/hbgd/tests/imgs_in/7seg.gif
  * contrib/hbgd/tests/digits/brsd.gif -> contrib/hbgd/tests/imgs_in/brsd.gif
  * contrib/hbgd/tests/digits/digib.gif -> contrib/hbgd/tests/imgs_in/digib.gif
  * contrib/hbgd/tests/digits/fdb.gif -> contrib/hbgd/tests/imgs_in/fdb.gif
  * contrib/hbgd/tests/digits/jelly.gif -> contrib/hbgd/tests/imgs_in/jelly.gif
  * contrib/hbgd/tests/digits/odb.gif -> contrib/hbgd/tests/imgs_in/odb.gif
  * contrib/hbgd/tests/digits/odw.gif -> contrib/hbgd/tests/imgs_in/odw.gif
  * contrib/hbgd/tests/digits/pdg.gif -> contrib/hbgd/tests/imgs_in/pdg.gif
  * contrib/hbgd/tests/digits/pdw.gif -> contrib/hbgd/tests/imgs_in/pdw.gif
  * contrib/hbhttpd/tests/tpl/_main.tpl -> contrib/hbhttpd/tests/tpl/_main.html
  * contrib/hbhttpd/tests/tpl/app/account/edit.tpl -> contrib/hbhttpd/tests/tpl/app/account/edit.html
  * contrib/hbhttpd/tests/tpl/app/account.tpl -> contrib/hbhttpd/tests/tpl/app/account.html
  * contrib/hbhttpd/tests/tpl/app/cart.tpl -> contrib/hbhttpd/tests/tpl/app/cart.html
  * contrib/hbhttpd/tests/tpl/app/login.tpl -> contrib/hbhttpd/tests/tpl/app/login.html
  * contrib/hbhttpd/tests/tpl/app/logout.tpl -> contrib/hbhttpd/tests/tpl/app/logout.html
  * contrib/hbhttpd/tests/tpl/app/main.tpl -> contrib/hbhttpd/tests/tpl/app/main.html
  * contrib/hbhttpd/tests/tpl/app/register.tpl -> contrib/hbhttpd/tests/tpl/app/register.html
  * contrib/hbhttpd/tests/tpl/app/shopping.tpl -> contrib/hbhttpd/tests/tpl/app/shopping.html
  * extras/gtwvw/docs/funclist.txt -> contrib/gtwvw/doc/funclist.txt
  * extras/gtwvw/docs/gtwvw.txt -> contrib/gtwvw/doc/gtwvw.txt
  * extras/gtwvw/docs/whatsnew.txt -> contrib/gtwvw/doc/ChangeLog.txt
  * extras/gtwvw/gtwvw.hbc -> contrib/gtwvw/gtwvw.hbc
  * extras/gtwvw/gtwvw.hbx -> contrib/gtwvw/gtwvw.hbx
  * extras/gtwvw/gtwvwd.c -> contrib/gtwvw/gtwvwd.c
  * extras/gtwvw/hbgtwvw.h -> contrib/gtwvw/hbgtwvw.h
  * extras/gtwvw/hbole.h -> contrib/gtwvw/hbole.h
  * extras/gtwvw/tests/_wvwmous.prg -> contrib/gtwvw/tests/_wvwmous.prg
  * extras/gtwvw/tests/def2.bmp -> contrib/gtwvw/tests/def2.bmp
  * extras/gtwvw/tests/dia_excl.ico -> contrib/gtwvw/tests/dia_excl.ico
  * extras/gtwvw/tests/drawimg.prg -> contrib/gtwvw/tests/drawimg.prg
  * extras/gtwvw/tests/ebtest7.prg -> contrib/gtwvw/tests/eb7.prg
  * extras/gtwvw/tests/hbmk.hbm -> contrib/gtwvw/tests/hbmk.hbm
  * extras/gtwvw/tests/vouch1.bmp -> contrib/gtwvw/tests/vouch1.bmp
  * extras/gtwvw/tests/vouch1.gif -> contrib/gtwvw/tests/vouch1.gif
  * extras/gtwvw/wvt2wvw.ch -> contrib/gtwvw/wvt2wvw.ch
  * extras/gtwvw/wvwcheck.c -> contrib/gtwvw/checkbox.c
  * extras/gtwvw/wvwdraw.c -> contrib/gtwvw/wvwdraw.c
  * extras/gtwvw/wvwedit.c -> contrib/gtwvw/editbox.c
  * extras/gtwvw/wvwfuncs.c -> contrib/gtwvw/wvwutils.c
  * extras/gtwvw/wvwmenu.c -> contrib/gtwvw/menubar.c
  * extras/gtwvw/wvwpush.c -> contrib/gtwvw/pushbut.c
  * extras/gtwvw/wvwstbar.c -> contrib/gtwvw/statbar.c
  * extras/gtwvw/wvwtbar.c -> contrib/gtwvw/toolbar.c
  * extras/guestbk/guestbk.html -> tests/guestbk.html
  * extras/hbdoc/hbdoc.css -> contrib/hbdoc/hbdoc.css
  * extras/gtwvw/gtwvw.hbp -> contrib/gtwvw/gtwvw.hbp
  * extras/gtwvw/tests/cbtest1.prg -> contrib/gtwvw/tests/cb1.prg
  * extras/gtwvw/tests/cbtest6.prg -> contrib/gtwvw/tests/cb6.prg
  * extras/gtwvw/tests/inpfocus.prg -> contrib/gtwvw/tests/inpfocus.prg
  * extras/gtwvw/tests/maincoor.prg -> contrib/gtwvw/tests/maincoor.prg
  * extras/gtwvw/tests/maximize.prg -> contrib/gtwvw/tests/maximize.prg
  * extras/gtwvw/tests/prog0.prg -> contrib/gtwvw/tests/prog0.prg
  * extras/gtwvw/tests/prog1.prg -> contrib/gtwvw/tests/prog1.prg
  * extras/gtwvw/tests/prog2.prg -> contrib/gtwvw/tests/prog2.prg
  * extras/gtwvw/tests/readme.txt -> contrib/gtwvw/tests/readme.txt
  * extras/gtwvw/tests/wvwtest9.prg -> contrib/gtwvw/tests/demo.prg
  * extras/guestbk/_cgi.prg -> tests/cgi.prg
  * extras/guestbk/_inifile.prg -> tests/inifile.prg
  * extras/guestbk/guestbk.ini -> tests/guestbk.ini
  * extras/guestbk/guestbk.prg -> tests/guestbk.prg
  * extras/hbdoc/_genbase.prg -> contrib/hbdoc/_base.prg
  * extras/hbdoc/_genhtml.prg -> contrib/hbdoc/_html.prg
  * extras/hbdoc/_gentxt.prg -> contrib/hbdoc/_txt.prg
  * extras/hbdoc/_genxml.prg -> contrib/hbdoc/_xml.prg
  * extras/hbdoc/hbdoc.hbp -> contrib/hbdoc/hbdoc.hbp
  * extras/hbdoc/hbdoc.prg -> contrib/hbdoc/hbdoc.prg
    * more file/dir rename sync with 3.4 fork, plus some related file content
This commit is contained in:
Viktor Szakats
2017-09-13 14:33:46 +00:00
parent 7ba5a41867
commit e4751cd9e9
76 changed files with 300 additions and 360 deletions

1
.gitattributes vendored
View File

@@ -39,7 +39,6 @@ ChangeLog.txt ident
*.sfc text
*.spec text
*.sx text
*.tpl text
*.txt text
*.ucf text
*.vbs text

View File

@@ -7,6 +7,82 @@
Entries may not always be in chronological/commit order.
See license at the end of file. */
2017-09-13 14:32 UTC Viktor Szakats (vszakats users.noreply.github.com)
- extras/guestbk/cgi.ch
- extras/guestbk/guestbk.hbp
- extras/guestbk/guestbk.txt
* .gitattributes
* contrib/hbgd/tests/counter.prg
* contrib/hbhttpd/core.prg
* contrib/hbgd/tests/digits/57chevy.gif -> contrib/hbgd/tests/imgs_in/57chevy.gif
* contrib/hbgd/tests/digits/7seg.gif -> contrib/hbgd/tests/imgs_in/7seg.gif
* contrib/hbgd/tests/digits/brsd.gif -> contrib/hbgd/tests/imgs_in/brsd.gif
* contrib/hbgd/tests/digits/digib.gif -> contrib/hbgd/tests/imgs_in/digib.gif
* contrib/hbgd/tests/digits/fdb.gif -> contrib/hbgd/tests/imgs_in/fdb.gif
* contrib/hbgd/tests/digits/jelly.gif -> contrib/hbgd/tests/imgs_in/jelly.gif
* contrib/hbgd/tests/digits/odb.gif -> contrib/hbgd/tests/imgs_in/odb.gif
* contrib/hbgd/tests/digits/odw.gif -> contrib/hbgd/tests/imgs_in/odw.gif
* contrib/hbgd/tests/digits/pdg.gif -> contrib/hbgd/tests/imgs_in/pdg.gif
* contrib/hbgd/tests/digits/pdw.gif -> contrib/hbgd/tests/imgs_in/pdw.gif
* contrib/hbhttpd/tests/tpl/_main.tpl -> contrib/hbhttpd/tests/tpl/_main.html
* contrib/hbhttpd/tests/tpl/app/account/edit.tpl -> contrib/hbhttpd/tests/tpl/app/account/edit.html
* contrib/hbhttpd/tests/tpl/app/account.tpl -> contrib/hbhttpd/tests/tpl/app/account.html
* contrib/hbhttpd/tests/tpl/app/cart.tpl -> contrib/hbhttpd/tests/tpl/app/cart.html
* contrib/hbhttpd/tests/tpl/app/login.tpl -> contrib/hbhttpd/tests/tpl/app/login.html
* contrib/hbhttpd/tests/tpl/app/logout.tpl -> contrib/hbhttpd/tests/tpl/app/logout.html
* contrib/hbhttpd/tests/tpl/app/main.tpl -> contrib/hbhttpd/tests/tpl/app/main.html
* contrib/hbhttpd/tests/tpl/app/register.tpl -> contrib/hbhttpd/tests/tpl/app/register.html
* contrib/hbhttpd/tests/tpl/app/shopping.tpl -> contrib/hbhttpd/tests/tpl/app/shopping.html
* extras/gtwvw/docs/funclist.txt -> contrib/gtwvw/doc/funclist.txt
* extras/gtwvw/docs/gtwvw.txt -> contrib/gtwvw/doc/gtwvw.txt
* extras/gtwvw/docs/whatsnew.txt -> contrib/gtwvw/doc/ChangeLog.txt
* extras/gtwvw/gtwvw.hbc -> contrib/gtwvw/gtwvw.hbc
* extras/gtwvw/gtwvw.hbx -> contrib/gtwvw/gtwvw.hbx
* extras/gtwvw/gtwvwd.c -> contrib/gtwvw/gtwvwd.c
* extras/gtwvw/hbgtwvw.h -> contrib/gtwvw/hbgtwvw.h
* extras/gtwvw/hbole.h -> contrib/gtwvw/hbole.h
* extras/gtwvw/tests/_wvwmous.prg -> contrib/gtwvw/tests/_wvwmous.prg
* extras/gtwvw/tests/def2.bmp -> contrib/gtwvw/tests/def2.bmp
* extras/gtwvw/tests/dia_excl.ico -> contrib/gtwvw/tests/dia_excl.ico
* extras/gtwvw/tests/drawimg.prg -> contrib/gtwvw/tests/drawimg.prg
* extras/gtwvw/tests/ebtest7.prg -> contrib/gtwvw/tests/eb7.prg
* extras/gtwvw/tests/hbmk.hbm -> contrib/gtwvw/tests/hbmk.hbm
* extras/gtwvw/tests/vouch1.bmp -> contrib/gtwvw/tests/vouch1.bmp
* extras/gtwvw/tests/vouch1.gif -> contrib/gtwvw/tests/vouch1.gif
* extras/gtwvw/wvt2wvw.ch -> contrib/gtwvw/wvt2wvw.ch
* extras/gtwvw/wvwcheck.c -> contrib/gtwvw/checkbox.c
* extras/gtwvw/wvwdraw.c -> contrib/gtwvw/wvwdraw.c
* extras/gtwvw/wvwedit.c -> contrib/gtwvw/editbox.c
* extras/gtwvw/wvwfuncs.c -> contrib/gtwvw/wvwutils.c
* extras/gtwvw/wvwmenu.c -> contrib/gtwvw/menubar.c
* extras/gtwvw/wvwpush.c -> contrib/gtwvw/pushbut.c
* extras/gtwvw/wvwstbar.c -> contrib/gtwvw/statbar.c
* extras/gtwvw/wvwtbar.c -> contrib/gtwvw/toolbar.c
* extras/guestbk/guestbk.html -> tests/guestbk.html
* extras/hbdoc/hbdoc.css -> contrib/hbdoc/hbdoc.css
* extras/gtwvw/gtwvw.hbp -> contrib/gtwvw/gtwvw.hbp
* extras/gtwvw/tests/cbtest1.prg -> contrib/gtwvw/tests/cb1.prg
* extras/gtwvw/tests/cbtest6.prg -> contrib/gtwvw/tests/cb6.prg
* extras/gtwvw/tests/inpfocus.prg -> contrib/gtwvw/tests/inpfocus.prg
* extras/gtwvw/tests/maincoor.prg -> contrib/gtwvw/tests/maincoor.prg
* extras/gtwvw/tests/maximize.prg -> contrib/gtwvw/tests/maximize.prg
* extras/gtwvw/tests/prog0.prg -> contrib/gtwvw/tests/prog0.prg
* extras/gtwvw/tests/prog1.prg -> contrib/gtwvw/tests/prog1.prg
* extras/gtwvw/tests/prog2.prg -> contrib/gtwvw/tests/prog2.prg
* extras/gtwvw/tests/readme.txt -> contrib/gtwvw/tests/readme.txt
* extras/gtwvw/tests/wvwtest9.prg -> contrib/gtwvw/tests/demo.prg
* extras/guestbk/_cgi.prg -> tests/cgi.prg
* extras/guestbk/_inifile.prg -> tests/inifile.prg
* extras/guestbk/guestbk.ini -> tests/guestbk.ini
* extras/guestbk/guestbk.prg -> tests/guestbk.prg
* extras/hbdoc/_genbase.prg -> contrib/hbdoc/_base.prg
* extras/hbdoc/_genhtml.prg -> contrib/hbdoc/_html.prg
* extras/hbdoc/_gentxt.prg -> contrib/hbdoc/_txt.prg
* extras/hbdoc/_genxml.prg -> contrib/hbdoc/_xml.prg
* extras/hbdoc/hbdoc.hbp -> contrib/hbdoc/hbdoc.hbp
* extras/hbdoc/hbdoc.prg -> contrib/hbdoc/hbdoc.prg
* more file/dir rename sync with 3.4 fork, plus some related file content
2017-09-13 12:49 UTC Viktor Szakats (vszakats users.noreply.github.com)
* contrib/gtqtc/gtqtc.hbp
* contrib/hbssl/ssl_hbcon.prg

View File

@@ -11,14 +11,15 @@
gtwvwd.c
wvwcheck.c
wvwdraw.c
wvwedit.c
wvwfuncs.c
wvwmenu.c
wvwpush.c
wvwstbar.c
wvwtbar.c
wvwutils.c
checkbox.c
editbox.c
menubar.c
pushbut.c
statbar.c
toolbar.c
# NOTE: Due to large quantity of unprecise code, it doesn't build in C++ mode.
-cpp=no

View File

@@ -1,12 +1,5 @@
/*
Copyright 2005 Budyanto Dj. <budyanto@centrin.net.id>
A simple example on how to make use of GTWVW's combobox.
This program requires GTWVW.LIB.
Compile: bldwvw cbtest1
*/
/* Copyright 2005 Budyanto Dj. <budyanto@centrin.net.id>
A simple example on how to make use of GTWVW's combobox. */
#require "gtwvw"

View File

@@ -1,14 +1,8 @@
/*
Copyright 2005 Budyanto Dj. <budyanto@centrin.net.id>
/* Copyright 2005 Budyanto Dj. <budyanto@centrin.net.id>
This is an example on how to integrate GTWVW's combobox into
regular GET/GETLIST system. Be creative, do not be bound by
the ideas presented herein. There may be better ways to do it.
This program requires GTWVW.LIB.
Compile: bldwvw cbtest6
*/
regular GET/GetList system. Be creative, do not be bound by
the ideas presented herein. There may be better ways to do it. */
#require "gtwvw"
@@ -16,9 +10,8 @@
#include "inkey.ch"
/* Two different keyboard handling method
* (notes: WVW_CB_KBD_CLIPPER doesn't mimic anything from Clipper
* it just 'feels like Clipper' to me)
*/
(notes: WVW_CB_KBD_CLIPPER doesn't mimic anything from Cl*pper
it just 'feels like Cl*pper' to me) */
#define WVW_CB_KBD_STANDARD 0
#define WVW_CB_KBD_CLIPPER 1

View File

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 822 B

View File

@@ -1,5 +1,3 @@
//
//
// Test/Demo Program for
// GTWVW GUI Interface
// with multiple window support
@@ -11,17 +9,7 @@
// GTWVT Console GUI Interface
// by Pritpal Bedi <pritpal@vouchcac.com>
//
// GTWVT
// by Peter Rees <peter@rees.co.nz>
//
// parts of this program are copyrights of their respective owners
//
//
/*
Compile/Link info:
You may use 'hbmk2 wvwtest9.hbp' to build this program.
*/
#require "gtwvw"
@@ -113,7 +101,7 @@
#define WVW_MAXWINDOWS 20 // ! must match with hbgtwvw.h
#define WVW_DEFAULT_MENUKEYEVENT 1024 // ! must match with hbgtwvw.h
// for Button Types: //20040303
// for Button Types: // 2004-03-03
#define _BUTTON_NORMAL 0 // normal button
#define _BUTTON_FLAT 1 // 'transparent', raised when mouseover
#define _BUTTON_NONE 2 // no sign even when mouseover or clicked

View File

Before

Width:  |  Height:  |  Size: 318 B

After

Width:  |  Height:  |  Size: 318 B

View File

@@ -1,10 +1,5 @@
/*
* Demo program to show how to make use of WVW_INPUTFOCUS feature
* of GTWVW
*
* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
*
*/
/* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
Demo program to show how to make use of WVW_INPUTFOCUS() feature of GTWVW */
#require "gtwvw"

View File

@@ -1,9 +1,6 @@
/*
Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
/* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
Simplest demo program to show the difference of MainCoord Mode and
Standard Mode of GTWVW.
*/
Standard Mode of GTWVW. */
#require "gtwvw"
@@ -33,7 +30,7 @@ PROCEDURE fillscreen()
wvw_nOpenWindow( "Win2", 10, 10, 19, 69 )
wvw_nOpenWindow( "Win3", 15, 15, 22, 75 )
DevPos( 0, 0 )
?? "I'm gonna fill this (" + hb_ntos( MaxRow() + 1 ) + "x" + hb_ntos( MaxCol() + 1 ) + ") screen"
?? "I'm going to fill this (" + hb_ntos( MaxRow() + 1 ) + "x" + hb_ntos( MaxCol() + 1 ) + ") screen"
DevPos( 1, 0 )
FOR i := 1 TO MaxRow() - 1
FOR j := 0 TO MaxCol()

View File

@@ -1,7 +1,4 @@
/*
sample on using Maximize Mode in gtwvw.
budyanto@centrin.net.id
*/
/* sample on using Maximize Mode in GTWVW. budyanto@centrin.net.id */
#require "gtwvw"
@@ -35,7 +32,7 @@ PROCEDURE Main()
updatescr()
DO WHILE Inkey( 0 ) != K_ESC
// refresh screen, probably in a new dimension
// (You may alternatively call updatescr() from WVW_SIZE instead)
// (You may alternatively call updatescr() from WVW_SIZE() instead)
updatescr()
ENDDO

View File

@@ -1,13 +1,11 @@
/*
Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
/* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
This is a simple Clipper program runs simple GET and BROWSE dialogs
This is a simple program runs simple GET and BROWSE dialogs
each on a pseudo-window with brief help message on the bottom of
the screen.
Note that this Clipper program uses ZNEWWINDOW() and ZREVWINDOW() to
open and close every pseudo-windows respectively.
*/
Note that this program uses ZNEWWINDOW() and ZREVWINDOW() to
open and close every pseudo-windows respectively. */
#require "gtwvw"

View File

@@ -1,26 +1,21 @@
/*
Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
/* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
This is prog0.prg modified in a quick and dirty fashion to convert
pseudo-windows in prog0.prg into real windows of GTWVW.
This quick and dirty approach is making use of GTWVW's MainCoord Mode.
Instead of specifying to which window we are writing output, we simply
specify "screen-wide" coordinates like we do in Clipper. In GTWVW's
specify "screen-wide" coordinates like we do in Cl*pper. In GTWVW's
MainCoord Mode, a coordinate (row,col) are processed to find which window
does it belong to and the output commands then is directed to operate on
that window.
This way we don't have to change a single coordinate from the original
Clipper code.
Cl*pper code.
Since the original Clipper code uses ZNEWWINDOW() and ZREVWINDOW() to
Since the original Cl*pper code uses ZNEWWINDOW() and ZREVWINDOW() to
open and close any window, we only have to change these two functions
and let all other functions unchanged (xGet1(), xBrowse1(), ...).
All changes are guarded by #ifdef, so this program is still compilable
in Clipper resulting its original behaviour.
*/
and let all other functions unchanged (xGet1(), xBrowse1(), ...). */
#require "gtwvw"

View File

@@ -1,13 +1,11 @@
/*
Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
/* Copyright 2004 Budyanto Dj. <budyanto@centrin.net.id>
To present prettier displays we may want to use pseudo-GUI objects.
This, however, is not as easy as the previous example.
Once you understand how GTWVW draws these objects, you can put
pseudo-GUI objects onto each window, one by one.
Notes: GTWVW now also has native Windows Controls. See other samples.
*/
Notes: GTWVW now also has native Windows Controls. See other samples. */
#require "gtwvw"

View File

@@ -0,0 +1,21 @@
To run samples:
(1) Make sure you have GTWVW library
(2) Compile/link the .prg/.hbp using hbmk2 <name>
BRIEF DESCRIPTIONS:
As described in https://www.csacomputer.com/gtwvw/
prog0.prg : to be compiled with Cl*pper
prog1.prg : 1st evolution with GTWVW
prog2.prg : 2nd evolution with GTWVW
Supporting files:
some .gif
some .bmp
some .ico
Main programs:
wvwtest9.prg : demo of several GTWVW features.
maincoor.prg : to show differences of MainCoord and Standard Mode.
inpfocus.prg : demo of how to handle input on non topmost window.

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 779 B

After

Width:  |  Height:  |  Size: 779 B

View File

@@ -85,13 +85,13 @@ METHOD NewIndex( cDir, cFilename, cTitle, cExtension, cLang ) CLASS TPLGenerate
::New( cDir, cFilename, cTitle, cExtension, cLang, INDEX_ )
RETURN self
RETURN Self
METHOD NewDocument( cDir, cFilename, cTitle, cExtension, cLang ) CLASS TPLGenerate
::New( cDir, cFilename, cTitle, cExtension, cLang, DOCUMENT_ )
RETURN self
RETURN Self
METHOD New( cDir, cFilename, cTitle, cExtension, cLang, nType ) CLASS TPLGenerate
@@ -108,7 +108,7 @@ METHOD New( cDir, cFilename, cTitle, cExtension, cLang, nType ) CLASS TPLGenerat
iif( Lower( ::cLang ) == "en", "", "." + ::cLang ) + ;
::cExtension
RETURN self
RETURN Self
METHOD Generate() CLASS TPLGenerate
@@ -121,4 +121,4 @@ METHOD Generate() CLASS TPLGenerate
hb_MemoWrit( ::cOutFileName, ::cFile )
RETURN self
RETURN Self

View File

@@ -64,9 +64,9 @@ CREATE CLASS GenerateHTML INHERIT TPLGenerate
METHOD CloseTag( cText )
METHOD AppendInline( cText, cFormat, lCode )
METHOD Append( cText, cFormat, lCode )
METHOD Space() INLINE ::cFile += ", ", self
METHOD Spacer() INLINE ::cFile += hb_eol(), self
METHOD Newline() INLINE ::cFile += "<br>" + hb_eol(), self
METHOD Space() INLINE ::cFile += ", ", Self
METHOD Spacer() INLINE ::cFile += hb_eol(), Self
METHOD Newline() INLINE ::cFile += "<br>" + hb_eol(), Self
METHOD NewFile()
CLASS VAR lCreateStyleDocument AS LOGICAL INIT .T.
@@ -127,7 +127,7 @@ METHOD NewFile() CLASS GenerateHTML
::OpenTag( "main" )
RETURN self
RETURN Self
STATIC FUNCTION GitRev()
@@ -167,21 +167,21 @@ METHOD Generate() CLASS GenerateHTML
? Round( ( hb_MilliSeconds() - ::nStart ) / 1000, 3 )
#endif
RETURN self
RETURN Self
METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateHTML
::super:NewDocument( cDir, cFilename, cTitle, EXTENSION, cLang )
::NewFile()
RETURN self
RETURN Self
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateHTML
::super:NewIndex( cDir, cFilename, cTitle, EXTENSION, cLang )
::NewFile()
RETURN self
RETURN Self
METHOD BeginSection( cSection, cFilename ) CLASS GenerateHTML
@@ -199,7 +199,7 @@ METHOD BeginSection( cSection, cFilename ) CLASS GenerateHTML
::TargetFilename := cFilename
::Depth++
RETURN self
RETURN Self
METHOD EndSection( cSection, cFilename ) CLASS GenerateHTML
@@ -207,7 +207,7 @@ METHOD EndSection( cSection, cFilename ) CLASS GenerateHTML
HB_SYMBOL_UNUSED( cFilename )
::Depth--
RETURN self
RETURN Self
METHOD AddReference( oEntry, cReference, cSubReference ) CLASS GenerateHTML
@@ -221,7 +221,7 @@ METHOD AddReference( oEntry, cReference, cSubReference ) CLASS GenerateHTML
ENDIF
ENDIF
RETURN self
RETURN Self
METHOD AddEntry( oEntry ) CLASS GenerateHTML
@@ -246,7 +246,7 @@ METHOD AddEntry( oEntry ) CLASS GenerateHTML
::CloseTag( "section" )
RETURN self
RETURN Self
METHOD PROCEDURE WriteEntry( cField, cContent, lPreformatted ) CLASS GenerateHTML
@@ -405,7 +405,7 @@ METHOD OpenTagInline( cText, ... ) CLASS GenerateHTML
ENDIF
::cFile += "<" + cText + ">"
RETURN self
RETURN Self
METHOD OpenTag( cText, ... ) CLASS GenerateHTML
@@ -413,7 +413,7 @@ METHOD OpenTag( cText, ... ) CLASS GenerateHTML
::cFile += hb_eol()
RETURN self
RETURN Self
METHOD Tagged( cText, cTag, ... ) CLASS GenerateHTML
@@ -427,19 +427,19 @@ METHOD Tagged( cText, cTag, ... ) CLASS GenerateHTML
::cFile += "<" + cTag + cResult + ">" + cText + "</" + cTag + ">" + hb_eol()
RETURN self
RETURN Self
METHOD CloseTagInline( cText ) CLASS GenerateHTML
::cFile += "</" + cText + ">"
RETURN self
RETURN Self
METHOD CloseTag( cText ) CLASS GenerateHTML
::cFile += "</" + cText + ">" + hb_eol()
RETURN self
RETURN Self
STATIC FUNCTION StrEsc( cString )
@@ -572,14 +572,14 @@ METHOD AppendInline( cText, cFormat, lCode ) CLASS GenerateHTML
::cFile += cText
ENDIF
RETURN self
RETURN Self
METHOD Append( cText, cFormat, lCode ) CLASS GenerateHTML
::AppendInline( cText, cFormat, lCode )
::cFile += hb_eol()
RETURN self
RETURN Self
METHOD RecreateStyleDocument( cStyleFile ) CLASS GenerateHTML
@@ -591,7 +591,7 @@ METHOD RecreateStyleDocument( cStyleFile ) CLASS GenerateHTML
/* TODO: raise an error, could not create style file */
ENDIF
RETURN self
RETURN Self
STATIC FUNCTION SymbolToHTMLID( cID )
RETURN Lower( hb_StrReplace( cID, { ;

View File

@@ -59,14 +59,14 @@ METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateAscii
::lContinuous := .T.
::super:NewDocument( cDir, cFilename, cTitle,, cLang )
RETURN self
RETURN Self
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateAscii
::lContinuous := .T.
::super:NewIndex( cDir, cFilename, cTitle,, cLang )
RETURN self
RETURN Self
CREATE CLASS GenerateText INHERIT TPLGenerate
@@ -97,14 +97,14 @@ METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateText
::super:NewDocument( cDir, cFilename, cTitle, ".txt", cLang )
::WriteEntry( "", cTitle + hb_eol(), .F. )
RETURN self
RETURN Self
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateText
::super:NewIndex( cDir, cFilename, cTitle, ".txt", cLang )
::WriteEntry( "", cTitle + hb_eol(), .F. )
RETURN self
RETURN Self
METHOD BeginSection( cSection, cFilename ) CLASS GenerateText
@@ -115,13 +115,13 @@ METHOD BeginSection( cSection, cFilename ) CLASS GenerateText
ENDIF
::Depth++
RETURN self
RETURN Self
METHOD AddIndex( oEntry ) CLASS GenerateText
::WriteEntry( FieldCaption( "NAME" ), oEntry:fld[ "NAME" ] + " - " + oEntry:fld[ "ONELINER" ], .F. )
RETURN self
RETURN Self
METHOD AddEntry( oEntry ) CLASS GenerateText
@@ -141,7 +141,7 @@ METHOD AddEntry( oEntry ) CLASS GenerateText
ENDIF
ENDIF
RETURN self
RETURN Self
METHOD PROCEDURE WriteEntry( cCaption, cContent, lPreformatted ) CLASS GenerateText
@@ -166,4 +166,4 @@ METHOD Generate() CLASS GenerateText
::super:Generate()
RETURN self
RETURN Self

View File

@@ -72,7 +72,7 @@ METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateXML
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + hb_eol() + ;
'<HarbourReference>' + hb_eol()
RETURN self
RETURN Self
METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateXML
@@ -81,7 +81,7 @@ METHOD NewIndex( cDir, cFilename, cTitle, cLang ) CLASS GenerateXML
'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' + hb_eol() + ;
'<HarbourReference>' + hb_eol()
RETURN self
RETURN Self
METHOD BeginSection( cSection, cFilename ) CLASS GenerateXML
@@ -92,7 +92,7 @@ METHOD BeginSection( cSection, cFilename ) CLASS GenerateXML
ENDIF
::Depth++
RETURN self
RETURN Self
METHOD EndSection( cSection, cFilename ) CLASS GenerateXML
@@ -101,13 +101,13 @@ METHOD EndSection( cSection, cFilename ) CLASS GenerateXML
::Depth--
::cFile += Replicate( Chr( 9 ), ::Depth ) + '</Section>' + hb_eol()
RETURN self
RETURN Self
METHOD AddIndex( oEntry ) CLASS GenerateXML
::WriteEntry( "ENTRY", oEntry:fld[ "NAME" ] + " - " + oEntry:fld[ "ONELINER" ], .F. )
RETURN self
RETURN Self
METHOD AddEntry( oEntry ) CLASS GenerateXML
@@ -125,7 +125,7 @@ METHOD AddEntry( oEntry ) CLASS GenerateXML
::cFile += '</Entry>' + hb_eol()
ENDIF
RETURN self
RETURN Self
METHOD Generate() CLASS GenerateXML
@@ -133,7 +133,7 @@ METHOD Generate() CLASS GenerateXML
::super:Generate()
RETURN self
RETURN Self
METHOD PROCEDURE WriteEntry( cCaption, cContent, lPreformatted ) CLASS GenerateXML

View File

@@ -7,10 +7,10 @@
-gtcgi
hbdoc.prg
_genbase.prg
_genhtml.prg
_gentxt.prg
_genxml.prg
_base.prg
_html.prg
_txt.prg
_xml.prg
# NOTE: hbdoc doesn't work from other locations than
# the current one, so we don't install it yet.

View File

@@ -1329,8 +1329,8 @@ STATIC FUNCTION LoadHBX( cFileName, hAll )
RETURN aDynamic
#if defined( __HBSCRIPT__HBSHELL )
SET PROCEDURE TO "_genbase.prg"
SET PROCEDURE TO "_gentxt.prg"
SET PROCEDURE TO "_genhtml.prg"
SET PROCEDURE TO "_genxml.prg"
SET PROCEDURE TO "_base.prg"
SET PROCEDURE TO "_txt.prg"
SET PROCEDURE TO "_html.prg"
SET PROCEDURE TO "_xml.prg"
#endif

View File

@@ -1,5 +1,4 @@
/*
* Copyright 2004-2005 Francesco Saverio Giudice <info@fsgiudice.com>
/* Copyright 2004-2005 Francesco Saverio Giudice <info@fsgiudice.com>
*
* Counter sample
* usage:
@@ -9,10 +8,10 @@
#require "hbgd"
/* Some digits images from:
http://www.digitmania.holowww.com/all.html */
/* Some digit images from:
https://web.archive.org/web/www.digitmania.holowww.com/all.html */
#define IMAGES_IN "digits" + hb_ps()
#define IMAGES_IN "imgs_in" + hb_ps()
#define IMAGES_OUT "imgs_out" + hb_ps()
#define DISPLAY_NUM 10

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 792 B

After

Width:  |  Height:  |  Size: 792 B

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

Before

Width:  |  Height:  |  Size: 687 B

After

Width:  |  Height:  |  Size: 687 B

View File

Before

Width:  |  Height:  |  Size: 661 B

After

Width:  |  Height:  |  Size: 661 B

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

Before

Width:  |  Height:  |  Size: 415 B

After

Width:  |  Height:  |  Size: 415 B

View File

Before

Width:  |  Height:  |  Size: 438 B

After

Width:  |  Height:  |  Size: 438 B

View File

@@ -1633,7 +1633,7 @@ STATIC FUNCTION compile_file( cFileName, hConfig )
IF cFileName == NIL
cFileName := MEMVAR->server[ "SCRIPT_NAME" ]
ENDIF
cFileName := UOsFileName( hb_DirBase() + "tpl/" + cFileName + ".tpl" )
cFileName := UOsFileName( hb_DirBase() + "tpl/" + cFileName + ".html" )
IF hb_FileExists( cFileName )
cTpl := hb_MemoRead( cFileName )
BEGIN SEQUENCE

View File

@@ -1,26 +0,0 @@
To run samples:
(1) Make sure you have GTWVW library
(2) Compile/link the .prg/.hbp using hbmk2 <name>
BRIEF DESCRIPTIONS:
AS described in http://www.csacomputer.com/gtwvw/ :
prog0.prg : to be compiled with clipper
prog1.prg : 1st evolution with gtwvw
prog2.prg : 2nd evolution with gtwvw
Supporting routines: (required by wvwtest9.prg only)
_wvwmous.prg : sample of how to handle graphic primitives
Supporting files:
test.dbf
some .gif
some .bmp
some .ico
Main programs:
wvwtest9.prg : demo of several gtwvw features.
maincoor.prg : to show differences of MainCoord and Standard Mode.
inpfocus.prg : demo of how to handle input on non topmost window.

View File

@@ -1,64 +0,0 @@
/*
* Copyright (C) 1999 Eddie Runia
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file LICENSE.txt. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA (or visit https://www.gnu.org/licenses/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
#define CGI_SERVER_SOFTWARE 1
#define CGI_SERVER_NAME 2
#define CGI_GATEWAY_INTERFACE 3
#define CGI_SERVER_PROTOCOL 4
#define CGI_SERVER_PORT 5
#define CGI_REQUEST_METHOD 6
#define CGI_HTTP_ACCEPT 7
#define CGI_HTTP_USER_AGENT 8
#define CGI_HTTP_REFERER 9
#define CGI_PATH_INFO 10
#define CGI_PATH_TRANSLATED 11
#define CGI_SCRIPT_NAME 12
#define CGI_QUERY_STRING 13
#define CGI_REMOTE_HOST 14
#define CGI_REMOTE_ADDR 15
#define CGI_REMOTE_USER 16
#define CGI_AUTH_TYPE 17
#define CGI_CONTENT_TYPE 18
#define CGI_CONTENT_LENGTH 19
#define CGI_ANNOTATION_SERVER 20

View File

@@ -1,9 +0,0 @@
-w3 -es2
-nulrdd
-gtcgi
guestbk.prg
_cgi.prg
_inifile.prg

View File

@@ -1,60 +0,0 @@
;
; The Harbour Guestbook Script
; Copyright (C) 1999 Felipe G. Coury
;
; guestbk.ini - Script configuration file
;
;
; 1. Section [Header]
;
; This section defines the Guestbook fields and color look.
; DataFields=<n> n is the number of fields on guestbook
; DataFieldn=<fieldname> defines the name of the nth field of guestbook
; EvenLine=<color> color of even lines on guestbook
; OddLine=<color> color of odd lines on guestbook
[Header]
DataFields=7
DataField1=Name
DataField2=City
DataField3=State
DataField4=Country
DataField5=EMail
DataField6=Homepage
DataField7=Comments
EvenLine=#F0F0F0
OddLine=#000000
; 2. Section [Format]
; Formats each guestbook entry.
; FormatLines=<n> number of lines per entry
; FormatLinen=<format> format of the nth line of the entry. You can
; use metatags for replacing its content with the
; correspondent field value. Ex.:
; Format1=Name: <b><#Name></b>
; Format2=<a href="<#URL>"><#URL></a>
; Formats one line with "Name:" and the content
; of the "Name" field in bold and the other
; with a link to the "URL" field. The fields
; within metatags must be defined in the [Header]
; section. In addition to those tags you can use
; <#DateTime> tag, which will be expanded to the
; entry date on the format "Month DD, YYYY".
[Format]
FormatLines=3
Format1=<b><#Comments></b>
Format2=<a href="<#Homepage>"><#Name></a> &lt;<a href="mailto:<#EMail>"><#EMail></a>>
Format3=<#City>, <#State> <#Country> - <#DateTime>
; 3. Section [Entries]
; This section is not a configuration section. The Guestbook itself controls
; it adding entries here. Should not be modified.
[Entries]
Entries=1
Name1=Felipe G. Coury
City1=Campinas
State1=SP
Country1=Brazil
EMail1=fcoury@flexsys-ci.com
Homepage1=http://www.flexsys-ci.com
Comments1=This is Harbour Guestbook. Powered by Harbour. Leave your message after the beep!!!&ltg>
DateTime1=July 25, 1999 12:00:00

View File

@@ -1,24 +0,0 @@
Harbour Guestbook
Felipe Coury <fcoury@flexsys-ci.com>
How to create and test the Harbour Guestbook
You'll find guestbk.prg and guestbk.html files.
To build the executable, review guestbk.prg and
check the directories for locating guestbk.ini
and guestbk.html correctly.
With that done, build it using hbmk2. Put the resulting
executable and .html files on a script-enabled directory
and call guestbk executable via WebBrowser.
The best thing about this guestbook is its highly
configurable architecture. Please review guestbk.ini
for configuration options and further explanation.
That's it!
PS: If you don't have a WebServer, I will be pleased to
demonstrate it to you. Just contact me via ICQ, my
UIN is #19504786. Thanks!

View File

@@ -42,11 +42,7 @@
*
*/
/*
*
* Harbour Test of a CGI/HTML-Generator class.
*
* 1999-05-30 First implementation.
/* 1999-05-30 First implementation.
*
* Tips: - Use ShowResults to make dynamic html (to test dynamic
* results, put the exe file on CGI-BIN dir or equivalent);
@@ -58,13 +54,31 @@
* First attempt to convert Delphi's ISAPI dll of WebSites'
* Function List
* 1999-07-29 Changed QOut() calls to OutStd() calls.
*
*/
#include "fileio.ch"
#include "hbclass.ch"
#include "cgi.ch"
#define CGI_SERVER_SOFTWARE 1
#define CGI_SERVER_NAME 2
#define CGI_GATEWAY_INTERFACE 3
#define CGI_SERVER_PROTOCOL 4
#define CGI_SERVER_PORT 5
#define CGI_REQUEST_METHOD 6
#define CGI_HTTP_ACCEPT 7
#define CGI_HTTP_USER_AGENT 8
#define CGI_HTTP_REFERER 9
#define CGI_PATH_INFO 10
#define CGI_PATH_TRANSLATED 11
#define CGI_SCRIPT_NAME 12
#define CGI_QUERY_STRING 13
#define CGI_REMOTE_HOST 14
#define CGI_REMOTE_ADDR 15
#define CGI_REMOTE_USER 16
#define CGI_AUTH_TYPE 17
#define CGI_CONTENT_TYPE 18
#define CGI_CONTENT_LENGTH 19
#define CGI_ANNOTATION_SERVER 20
#define IF_BUFFER 65535

56
tests/guestbk.ini Normal file
View File

@@ -0,0 +1,56 @@
; The Harbour Guestbook Script Configuration file
; Copyright (C) 1999 Felipe G. Coury
; 1. Section [Header]
;
; This section defines the Guestbook fields and color look.
; DataFields=<n> n is the number of fields on guestbook
; DataFieldn=<fieldname> defines the name of the nth field of guestbook
; EvenLine=<color> color of even lines on guestbook
; OddLine=<color> color of odd lines on guestbook
[Header]
DataFields=7
DataField1=Name
DataField2=City
DataField3=State
DataField4=Country
DataField5=EMail
DataField6=Homepage
DataField7=Comments
EvenLine=#f0f0f0
OddLine=#000000
; 2. Section [Format]
; Formats each guestbook entry.
; FormatLines=<n> number of lines per entry
; FormatLinen=<format> format of the nth line of the entry. You can
; use metatags for replacing its content with the
; correspondent field value. Ex.:
; Format1=Name: <b><#Name></b>
; Format2=<a href="<#URL>"><#URL></a>
; Formats one line with "Name:" and the content
; of the "Name" field in bold and the other
; with a link to the "URL" field. The fields
; within metatags must be defined in the [Header]
; section. In addition to those tags you can use
; <#DateTime> tag, which will be expanded to the
; entry date on the format "Month DD, YYYY".
[Format]
FormatLines=3
Format1=<b><#Comments></b>
Format2=<a href="<#Homepage>"><#Name></a> &lt;<a href="mailto:<#EMail>"><#EMail></a>>
Format3=<#City>, <#State> <#Country> - <#DateTime>
; 3. Section [Entries]
; This section is not a configuration section. The Guestbook itself controls
; it adding entries here. Should not be modified.
[Entries]
Entries=1
Name1=Felipe G. Coury
City1=Campinas
State1=SP
Country1=Brazil
EMail1=fcoury@flexsys-ci.com
Homepage1=https://example.org/
Comments1=This is Harbour Guestbook. Powered by Harbour. Leave your message after the beep!!!&ltg>
DateTime1=1999-07-25 12:00:00

View File

@@ -44,9 +44,27 @@
*
*/
/* How to create and test the Harbour Guestbook
Build this using hbmk2. Put the resulting executable
and .html files on a script-enabled directory
and call guestbk executable via WebBrowser.
The best thing about this guestbook is its highly
configurable architecture. Please review guestbk.ini
for configuration options and further explanation.
That's it!
PS: If you don't have a WebServer, I will be pleased to
demonstrate it to you. Just contact me via ICQ, my
UIN is #19504786. Thanks! */
#define _WWW_ROOT_DIR_ hb_DirSepAdd( hb_DirSepToOS( "/www/root/" ) )
PROCEDURE Main()
LOCAL oIni := TIniFile():New( "C:\inetpub\wwwroot\guestbk.ini" )
LOCAL oIni := TIniFile():New( _WWW_ROOT_DIR_ + "guestbk.ini" )
LOCAL oHTML := THtml():New()
LOCAL cOddColor, cEvenColor
LOCAL cCode, i, j, l, cField, nEntry, cColor
@@ -65,7 +83,6 @@ PROCEDURE Main()
cField := oIni:ReadString( "Header", "DataField" + hb_ntos( i ), "" )
oIni:WriteString( "Entries", cField + hb_ntos( nEntry ), ;
StrTran( StrTran( oHTML:QueryFields( cField ), Chr( 13 ) ), Chr( 10 ), "<br />" ) )
NEXT
// Write fields to .ini file
@@ -80,11 +97,9 @@ PROCEDURE Main()
'<body></body></html>'
oHTML:ShowResult()
ELSE
// Sets the metahtml file
oHTML:SetHTMLFile( "C:\inetpub\wwwroot\guestbk.html" )
oHTML:SetHTMLFile( _WWW_ROOT_DIR_ + "guestbk.html" )
// Retrieves odd and even entries color
cOddColor := oIni:ReadString( "Header", "OddColor", "#FFFFFF" )
@@ -105,13 +120,11 @@ PROCEDURE Main()
cField := oIni:ReadString( "Header", "DataField" + hb_ntos( j ), "" )
AAdd( aLine, { cField, ;
oIni:ReadString( "Entries", cField + hb_ntos( i ), "" ) } )
NEXT
AAdd( aEntries, aLine )
i--
ENDDO
cCode := ""
@@ -128,19 +141,17 @@ PROCEDURE Main()
cLine := oIni:ReadString( "Format", "Format" + hb_ntos( j ), "" )
FOR l := 1 TO Len( aEntries[ i ] )
cLine := StrTran( cLine, "<#" + aEntries[ i, l, 1 ] + ">", ;
aEntries[ i, l, 2 ] )
cLine := StrTran( cLine, "<#" + aEntries[ i ][ l ][ 1 ] + ">", ;
aEntries[ i ][ l ][ 2 ] )
NEXT
cLine := StrTran( cLine, "<#DateTime>", ;
oIni:ReadString( "Entries", "DateTime" + hb_ntos( Len( aEntries ) - i + 1 ), "" ) )
cCode += cLine + "</td></tr>" + hb_eol()
NEXT
cCode += "</table>" + hb_eol()
NEXT
// Generates the output
@@ -153,6 +164,6 @@ PROCEDURE Main()
RETURN
#if defined( __HBSCRIPT__HBSHELL )
SET PROCEDURE TO "_cgi.prg"
SET PROCEDURE TO "_inifile.prg"
SET PROCEDURE TO "cgi.prg"
SET PROCEDURE TO "inifile.prg"
#endif

View File

@@ -104,7 +104,8 @@ METHOD New( cFileName ) CLASS TIniFile
cFile := SubStr( cFile, nPos + 1 )
IF ! Empty( cLine )
IF Left( cLine, 1 ) == "[" // new section
DO CASE
CASE Left( cLine, 1 ) == "[" // new section
IF ( nPos := At( "]", cLine ) ) > 1
cLine := SubStr( cLine, 2, nPos - 2 )
ELSE
@@ -114,10 +115,10 @@ METHOD New( cFileName ) CLASS TIniFile
AAdd( ::Contents, { cLine, { /* this will be CurrArray */ } } )
CurrArray := ::Contents[ Len( ::Contents ) ][ 2 ]
ELSEIF Left( cLine, 1 ) == ";" // preserve comments
CASE Left( cLine, 1 ) == ";" // preserve comments
AAdd( CurrArray, { NIL, cLine } )
ELSE
OTHERWISE
IF ( nPos := At( "=", cLine ) ) > 0
cIdent := Left( cLine, nPos - 1 )
cLine := SubStr( cLine, nPos + 1 )
@@ -127,10 +128,9 @@ METHOD New( cFileName ) CLASS TIniFile
ELSE
AAdd( CurrArray, { cLine, "" } )
ENDIF
ENDIF
ENDCASE
cLine := "" // to stop prepend later on
ENDIF
ELSE
cLine := cFile
cFile := ""
@@ -202,7 +202,6 @@ METHOD PROCEDURE WriteString( cSection, cIdent, cString ) CLASS TIniFile
ELSE
AAdd( ::Contents[ i ][ 2 ], { cIdent, cString } )
ENDIF
ELSE
AAdd( ::Contents, { cSection, { { cIdent, cString } } } )
ENDIF
@@ -211,7 +210,6 @@ METHOD PROCEDURE WriteString( cSection, cIdent, cString ) CLASS TIniFile
RETURN
METHOD ReadNumber( cSection, cIdent, nDefault ) CLASS TIniFile
RETURN Val( ::ReadString( cSection, cIdent, Str( nDefault ) ) )
METHOD PROCEDURE WriteNumber( cSection, cIdent, nNumber ) CLASS TIniFile
@@ -221,7 +219,6 @@ METHOD PROCEDURE WriteNumber( cSection, cIdent, nNumber ) CLASS TIniFile
RETURN
METHOD ReadDate( cSection, cIdent, dDefault ) CLASS TIniFile
RETURN hb_SToD( ::ReadString( cSection, cIdent, DToS( dDefault ) ) )
METHOD PROCEDURE WriteDate( cSection, cIdent, dDate ) CLASS TIniFile
@@ -252,7 +249,6 @@ METHOD PROCEDURE DeleteKey( cSection, cIdent ) CLASS TIniFile
IF i > 0
cIdent := Lower( cIdent )
j := AScan( ::Contents[ i ][ 2 ], {| x | HB_ISSTRING( x[ 1 ] ) .AND. Lower( x[ 1 ] ) == cIdent } )
hb_ADel( ::Contents[ i ][ 2 ], j, .T. )
ENDIF
@@ -266,7 +262,6 @@ METHOD PROCEDURE EraseSection( cSection ) CLASS TIniFile
DO WHILE ( i := AScan( ::Contents, {| x | HB_ISSTRING( x[ 1 ] ) .AND. HB_ISSTRING( x[ 2 ] ) } ) ) > 0
hb_ADel( ::Contents, i, .T. )
ENDDO
ELSE
cSection := Lower( cSection )
IF ( i := AScan( ::Contents, {| x | HB_ISSTRING( x[ 1 ] ) .AND. Lower( x[ 1 ] ) == cSection .AND. HB_ISARRAY( x[ 2 ] ) } ) ) > 0
@@ -286,13 +281,11 @@ METHOD ReadSection( cSection ) CLASS TIniFile
AAdd( aSection, ::Contents[ i ][ 1 ] )
ENDIF
NEXT
ELSE
cSection := Lower( cSection )
IF ( i := AScan( ::Contents, {| x | HB_ISSTRING( x[ 1 ] ) .AND. x[ 1 ] == cSection .AND. HB_ISARRAY( x[ 2 ] ) } ) ) > 0
FOR j := 1 TO Len( ::Contents[ i ][ 2 ] )
IF ::Contents[ i ][ 2 ][ j ][ 1 ] != NIL
AAdd( aSection, ::Contents[ i ][ 2 ][ j ][ 1 ] )
ENDIF
@@ -307,7 +300,6 @@ METHOD ReadSections() CLASS TIniFile
LOCAL i, aSections := {}
FOR i := 1 TO Len( ::Contents )
IF HB_ISARRAY( ::Contents[ i ][ 2 ] )
AAdd( aSections, ::Contents[ i ][ 1 ] )
ENDIF