diff --git a/.gitattributes b/.gitattributes index 4d84913368..b72fc24161 100644 --- a/.gitattributes +++ b/.gitattributes @@ -39,7 +39,6 @@ ChangeLog.txt ident *.sfc text *.spec text *.sx text -*.tpl text *.txt text *.ucf text *.vbs text diff --git a/ChangeLog.txt b/ChangeLog.txt index 8f9eb05a29..74f3f548e9 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -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 diff --git a/extras/gtwvw/wvwcheck.c b/contrib/gtwvw/checkbox.c similarity index 100% rename from extras/gtwvw/wvwcheck.c rename to contrib/gtwvw/checkbox.c diff --git a/extras/gtwvw/docs/whatsnew.txt b/contrib/gtwvw/doc/ChangeLog.txt similarity index 100% rename from extras/gtwvw/docs/whatsnew.txt rename to contrib/gtwvw/doc/ChangeLog.txt diff --git a/extras/gtwvw/docs/funclist.txt b/contrib/gtwvw/doc/funclist.txt similarity index 100% rename from extras/gtwvw/docs/funclist.txt rename to contrib/gtwvw/doc/funclist.txt diff --git a/extras/gtwvw/docs/gtwvw.txt b/contrib/gtwvw/doc/gtwvw.txt similarity index 100% rename from extras/gtwvw/docs/gtwvw.txt rename to contrib/gtwvw/doc/gtwvw.txt diff --git a/extras/gtwvw/wvwedit.c b/contrib/gtwvw/editbox.c similarity index 100% rename from extras/gtwvw/wvwedit.c rename to contrib/gtwvw/editbox.c diff --git a/extras/gtwvw/gtwvw.hbc b/contrib/gtwvw/gtwvw.hbc similarity index 100% rename from extras/gtwvw/gtwvw.hbc rename to contrib/gtwvw/gtwvw.hbc diff --git a/extras/gtwvw/gtwvw.hbp b/contrib/gtwvw/gtwvw.hbp similarity index 84% rename from extras/gtwvw/gtwvw.hbp rename to contrib/gtwvw/gtwvw.hbp index db18c8ff78..045eb3c147 100644 --- a/extras/gtwvw/gtwvw.hbp +++ b/contrib/gtwvw/gtwvw.hbp @@ -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 diff --git a/extras/gtwvw/gtwvw.hbx b/contrib/gtwvw/gtwvw.hbx similarity index 100% rename from extras/gtwvw/gtwvw.hbx rename to contrib/gtwvw/gtwvw.hbx diff --git a/extras/gtwvw/gtwvwd.c b/contrib/gtwvw/gtwvwd.c similarity index 100% rename from extras/gtwvw/gtwvwd.c rename to contrib/gtwvw/gtwvwd.c diff --git a/extras/gtwvw/hbgtwvw.h b/contrib/gtwvw/hbgtwvw.h similarity index 100% rename from extras/gtwvw/hbgtwvw.h rename to contrib/gtwvw/hbgtwvw.h diff --git a/extras/gtwvw/hbole.h b/contrib/gtwvw/hbole.h similarity index 100% rename from extras/gtwvw/hbole.h rename to contrib/gtwvw/hbole.h diff --git a/extras/gtwvw/wvwmenu.c b/contrib/gtwvw/menubar.c similarity index 100% rename from extras/gtwvw/wvwmenu.c rename to contrib/gtwvw/menubar.c diff --git a/extras/gtwvw/wvwpush.c b/contrib/gtwvw/pushbut.c similarity index 100% rename from extras/gtwvw/wvwpush.c rename to contrib/gtwvw/pushbut.c diff --git a/extras/gtwvw/wvwstbar.c b/contrib/gtwvw/statbar.c similarity index 100% rename from extras/gtwvw/wvwstbar.c rename to contrib/gtwvw/statbar.c diff --git a/extras/gtwvw/tests/_wvwmous.prg b/contrib/gtwvw/tests/_wvwmous.prg similarity index 100% rename from extras/gtwvw/tests/_wvwmous.prg rename to contrib/gtwvw/tests/_wvwmous.prg diff --git a/extras/gtwvw/tests/cbtest1.prg b/contrib/gtwvw/tests/cb1.prg similarity index 93% rename from extras/gtwvw/tests/cbtest1.prg rename to contrib/gtwvw/tests/cb1.prg index 8bbddba1cf..d33262ef56 100644 --- a/extras/gtwvw/tests/cbtest1.prg +++ b/contrib/gtwvw/tests/cb1.prg @@ -1,12 +1,5 @@ -/* - Copyright 2005 Budyanto Dj. - - A simple example on how to make use of GTWVW's combobox. - - This program requires GTWVW.LIB. - - Compile: bldwvw cbtest1 -*/ +/* Copyright 2005 Budyanto Dj. + A simple example on how to make use of GTWVW's combobox. */ #require "gtwvw" @@ -23,7 +16,7 @@ STATIC s_aAnswers := { "1-GTWVW is a great library!", ; STATIC s_cYourAnswer := "Your response is:" STATIC s_cThankYou := "Thanks for participating in our survey :-)" -#define _SECRET_KEY 101010 +#define _SECRET_KEY 101010 ANNOUNCE HB_NOSTARTUPWINDOW diff --git a/extras/gtwvw/tests/cbtest6.prg b/contrib/gtwvw/tests/cb6.prg similarity index 96% rename from extras/gtwvw/tests/cbtest6.prg rename to contrib/gtwvw/tests/cb6.prg index 254490698e..f882c0f8a3 100644 --- a/extras/gtwvw/tests/cbtest6.prg +++ b/contrib/gtwvw/tests/cb6.prg @@ -1,14 +1,8 @@ -/* - Copyright 2005 Budyanto Dj. +/* Copyright 2005 Budyanto Dj. 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 diff --git a/extras/gtwvw/tests/def2.bmp b/contrib/gtwvw/tests/def2.bmp similarity index 100% rename from extras/gtwvw/tests/def2.bmp rename to contrib/gtwvw/tests/def2.bmp diff --git a/extras/gtwvw/tests/wvwtest9.prg b/contrib/gtwvw/tests/demo.prg similarity index 98% rename from extras/gtwvw/tests/wvwtest9.prg rename to contrib/gtwvw/tests/demo.prg index 44d60248ee..6c5747479d 100644 --- a/extras/gtwvw/tests/wvwtest9.prg +++ b/contrib/gtwvw/tests/demo.prg @@ -1,27 +1,15 @@ +// Test/Demo Program for +// GTWVW GUI Interface +// with multiple window support +// a work in progress by +// Budyanto Dj. +// based on: // +// wvtgui.prg, +// GTWVT Console GUI Interface +// by Pritpal Bedi // -// Test/Demo Program for -// GTWVW GUI Interface -// with multiple window support -// a work in progress by -// Budyanto Dj. -// based on: -// -// wvtgui.prg, -// GTWVT Console GUI Interface -// by Pritpal Bedi -// -// GTWVT -// by Peter Rees -// -// parts of this program are copyrights of their respective owners -// -// - -/* - Compile/Link info: - You may use 'hbmk2 wvwtest9.hbp' to build this program. - */ +// parts of this program are copyrights of their respective owners #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 diff --git a/extras/gtwvw/tests/dia_excl.ico b/contrib/gtwvw/tests/dia_excl.ico similarity index 100% rename from extras/gtwvw/tests/dia_excl.ico rename to contrib/gtwvw/tests/dia_excl.ico diff --git a/extras/gtwvw/tests/drawimg.prg b/contrib/gtwvw/tests/drawimg.prg similarity index 100% rename from extras/gtwvw/tests/drawimg.prg rename to contrib/gtwvw/tests/drawimg.prg diff --git a/extras/gtwvw/tests/ebtest7.prg b/contrib/gtwvw/tests/eb7.prg similarity index 100% rename from extras/gtwvw/tests/ebtest7.prg rename to contrib/gtwvw/tests/eb7.prg diff --git a/extras/gtwvw/tests/hbmk.hbm b/contrib/gtwvw/tests/hbmk.hbm similarity index 100% rename from extras/gtwvw/tests/hbmk.hbm rename to contrib/gtwvw/tests/hbmk.hbm diff --git a/extras/gtwvw/tests/inpfocus.prg b/contrib/gtwvw/tests/inpfocus.prg similarity index 98% rename from extras/gtwvw/tests/inpfocus.prg rename to contrib/gtwvw/tests/inpfocus.prg index f0e0b5b891..65f4872d4a 100644 --- a/extras/gtwvw/tests/inpfocus.prg +++ b/contrib/gtwvw/tests/inpfocus.prg @@ -1,10 +1,5 @@ -/* - * Demo program to show how to make use of WVW_INPUTFOCUS feature - * of GTWVW - * - * Copyright 2004 Budyanto Dj. - * - */ +/* Copyright 2004 Budyanto Dj. + Demo program to show how to make use of WVW_INPUTFOCUS() feature of GTWVW */ #require "gtwvw" diff --git a/extras/gtwvw/tests/maincoor.prg b/contrib/gtwvw/tests/maincoor.prg similarity index 80% rename from extras/gtwvw/tests/maincoor.prg rename to contrib/gtwvw/tests/maincoor.prg index 4ac26bf3f5..93a0716c17 100644 --- a/extras/gtwvw/tests/maincoor.prg +++ b/contrib/gtwvw/tests/maincoor.prg @@ -1,9 +1,6 @@ -/* - Copyright 2004 Budyanto Dj. - +/* Copyright 2004 Budyanto Dj. 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() diff --git a/extras/gtwvw/tests/maximize.prg b/contrib/gtwvw/tests/maximize.prg similarity index 96% rename from extras/gtwvw/tests/maximize.prg rename to contrib/gtwvw/tests/maximize.prg index ac440a065b..eea6c65927 100644 --- a/extras/gtwvw/tests/maximize.prg +++ b/contrib/gtwvw/tests/maximize.prg @@ -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 diff --git a/extras/gtwvw/tests/prog0.prg b/contrib/gtwvw/tests/prog0.prg similarity index 97% rename from extras/gtwvw/tests/prog0.prg rename to contrib/gtwvw/tests/prog0.prg index ac9319cdac..ceb1cc7c73 100644 --- a/extras/gtwvw/tests/prog0.prg +++ b/contrib/gtwvw/tests/prog0.prg @@ -1,13 +1,11 @@ -/* - Copyright 2004 Budyanto Dj. +/* Copyright 2004 Budyanto Dj. - 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" diff --git a/extras/gtwvw/tests/prog1.prg b/contrib/gtwvw/tests/prog1.prg similarity index 96% rename from extras/gtwvw/tests/prog1.prg rename to contrib/gtwvw/tests/prog1.prg index 4fedec5336..533ff86cad 100644 --- a/extras/gtwvw/tests/prog1.prg +++ b/contrib/gtwvw/tests/prog1.prg @@ -1,26 +1,21 @@ -/* - Copyright 2004 Budyanto Dj. +/* Copyright 2004 Budyanto Dj. 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" diff --git a/extras/gtwvw/tests/prog2.prg b/contrib/gtwvw/tests/prog2.prg similarity index 99% rename from extras/gtwvw/tests/prog2.prg rename to contrib/gtwvw/tests/prog2.prg index c333def070..b29eeeba34 100644 --- a/extras/gtwvw/tests/prog2.prg +++ b/contrib/gtwvw/tests/prog2.prg @@ -1,13 +1,11 @@ -/* - Copyright 2004 Budyanto Dj. +/* Copyright 2004 Budyanto Dj. 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" diff --git a/contrib/gtwvw/tests/readme.txt b/contrib/gtwvw/tests/readme.txt new file mode 100644 index 0000000000..cacde37a53 --- /dev/null +++ b/contrib/gtwvw/tests/readme.txt @@ -0,0 +1,21 @@ +To run samples: + +(1) Make sure you have GTWVW library +(2) Compile/link the .prg/.hbp using hbmk2 + +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. diff --git a/extras/gtwvw/tests/vouch1.bmp b/contrib/gtwvw/tests/vouch1.bmp similarity index 100% rename from extras/gtwvw/tests/vouch1.bmp rename to contrib/gtwvw/tests/vouch1.bmp diff --git a/extras/gtwvw/tests/vouch1.gif b/contrib/gtwvw/tests/vouch1.gif similarity index 100% rename from extras/gtwvw/tests/vouch1.gif rename to contrib/gtwvw/tests/vouch1.gif diff --git a/extras/gtwvw/wvwtbar.c b/contrib/gtwvw/toolbar.c similarity index 100% rename from extras/gtwvw/wvwtbar.c rename to contrib/gtwvw/toolbar.c diff --git a/extras/gtwvw/wvt2wvw.ch b/contrib/gtwvw/wvt2wvw.ch similarity index 100% rename from extras/gtwvw/wvt2wvw.ch rename to contrib/gtwvw/wvt2wvw.ch diff --git a/extras/gtwvw/wvwdraw.c b/contrib/gtwvw/wvwdraw.c similarity index 100% rename from extras/gtwvw/wvwdraw.c rename to contrib/gtwvw/wvwdraw.c diff --git a/extras/gtwvw/wvwfuncs.c b/contrib/gtwvw/wvwutils.c similarity index 100% rename from extras/gtwvw/wvwfuncs.c rename to contrib/gtwvw/wvwutils.c diff --git a/extras/hbdoc/_genbase.prg b/contrib/hbdoc/_base.prg similarity index 98% rename from extras/hbdoc/_genbase.prg rename to contrib/hbdoc/_base.prg index 08e15c625f..5f88bd6820 100644 --- a/extras/hbdoc/_genbase.prg +++ b/contrib/hbdoc/_base.prg @@ -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 diff --git a/extras/hbdoc/_genhtml.prg b/contrib/hbdoc/_html.prg similarity index 97% rename from extras/hbdoc/_genhtml.prg rename to contrib/hbdoc/_html.prg index be57a526db..46a34d60d7 100644 --- a/extras/hbdoc/_genhtml.prg +++ b/contrib/hbdoc/_html.prg @@ -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 += "
" + hb_eol(), self + METHOD Space() INLINE ::cFile += ", ", Self + METHOD Spacer() INLINE ::cFile += hb_eol(), Self + METHOD Newline() INLINE ::cFile += "
" + 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 + "" + hb_eol() - RETURN self + RETURN Self METHOD CloseTagInline( cText ) CLASS GenerateHTML ::cFile += "" - RETURN self + RETURN Self METHOD CloseTag( cText ) CLASS GenerateHTML ::cFile += "" + 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, { ; diff --git a/extras/hbdoc/_gentxt.prg b/contrib/hbdoc/_txt.prg similarity index 97% rename from extras/hbdoc/_gentxt.prg rename to contrib/hbdoc/_txt.prg index 5effa7a17f..f8c2326ca2 100644 --- a/extras/hbdoc/_gentxt.prg +++ b/contrib/hbdoc/_txt.prg @@ -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 diff --git a/extras/hbdoc/_genxml.prg b/contrib/hbdoc/_xml.prg similarity index 97% rename from extras/hbdoc/_genxml.prg rename to contrib/hbdoc/_xml.prg index d4f6dbfc92..431d35e783 100644 --- a/extras/hbdoc/_genxml.prg +++ b/contrib/hbdoc/_xml.prg @@ -72,7 +72,7 @@ METHOD NewDocument( cDir, cFilename, cTitle, cLang ) CLASS GenerateXML '' + hb_eol() + ; '' + 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 '' + hb_eol() + ; '' + 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 ) + '' + 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 += '' + 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 diff --git a/extras/hbdoc/hbdoc.css b/contrib/hbdoc/hbdoc.css similarity index 100% rename from extras/hbdoc/hbdoc.css rename to contrib/hbdoc/hbdoc.css diff --git a/extras/hbdoc/hbdoc.hbp b/contrib/hbdoc/hbdoc.hbp similarity index 86% rename from extras/hbdoc/hbdoc.hbp rename to contrib/hbdoc/hbdoc.hbp index 01d8411334..d9c786f831 100644 --- a/extras/hbdoc/hbdoc.hbp +++ b/contrib/hbdoc/hbdoc.hbp @@ -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. diff --git a/extras/hbdoc/hbdoc.prg b/contrib/hbdoc/hbdoc.prg similarity index 99% rename from extras/hbdoc/hbdoc.prg rename to contrib/hbdoc/hbdoc.prg index 2efe770a05..492144bff4 100644 --- a/extras/hbdoc/hbdoc.prg +++ b/contrib/hbdoc/hbdoc.prg @@ -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 diff --git a/contrib/hbgd/tests/counter.prg b/contrib/hbgd/tests/counter.prg index d7c27eeb31..9b2da3b7e3 100644 --- a/contrib/hbgd/tests/counter.prg +++ b/contrib/hbgd/tests/counter.prg @@ -1,5 +1,4 @@ -/* - * Copyright 2004-2005 Francesco Saverio Giudice +/* Copyright 2004-2005 Francesco Saverio Giudice * * Counter sample * usage: @@ -9,11 +8,11 @@ #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_OUT "imgs_out" + hb_ps() +#define IMAGES_IN "imgs_in" + hb_ps() +#define IMAGES_OUT "imgs_out" + hb_ps() #define DISPLAY_NUM 10 diff --git a/contrib/hbgd/tests/digits/57chevy.gif b/contrib/hbgd/tests/imgs_in/57chevy.gif similarity index 100% rename from contrib/hbgd/tests/digits/57chevy.gif rename to contrib/hbgd/tests/imgs_in/57chevy.gif diff --git a/contrib/hbgd/tests/digits/7seg.gif b/contrib/hbgd/tests/imgs_in/7seg.gif similarity index 100% rename from contrib/hbgd/tests/digits/7seg.gif rename to contrib/hbgd/tests/imgs_in/7seg.gif diff --git a/contrib/hbgd/tests/digits/brsd.gif b/contrib/hbgd/tests/imgs_in/brsd.gif similarity index 100% rename from contrib/hbgd/tests/digits/brsd.gif rename to contrib/hbgd/tests/imgs_in/brsd.gif diff --git a/contrib/hbgd/tests/digits/digib.gif b/contrib/hbgd/tests/imgs_in/digib.gif similarity index 100% rename from contrib/hbgd/tests/digits/digib.gif rename to contrib/hbgd/tests/imgs_in/digib.gif diff --git a/contrib/hbgd/tests/digits/fdb.gif b/contrib/hbgd/tests/imgs_in/fdb.gif similarity index 100% rename from contrib/hbgd/tests/digits/fdb.gif rename to contrib/hbgd/tests/imgs_in/fdb.gif diff --git a/contrib/hbgd/tests/digits/jelly.gif b/contrib/hbgd/tests/imgs_in/jelly.gif similarity index 100% rename from contrib/hbgd/tests/digits/jelly.gif rename to contrib/hbgd/tests/imgs_in/jelly.gif diff --git a/contrib/hbgd/tests/digits/odb.gif b/contrib/hbgd/tests/imgs_in/odb.gif similarity index 100% rename from contrib/hbgd/tests/digits/odb.gif rename to contrib/hbgd/tests/imgs_in/odb.gif diff --git a/contrib/hbgd/tests/digits/odw.gif b/contrib/hbgd/tests/imgs_in/odw.gif similarity index 100% rename from contrib/hbgd/tests/digits/odw.gif rename to contrib/hbgd/tests/imgs_in/odw.gif diff --git a/contrib/hbgd/tests/digits/pdg.gif b/contrib/hbgd/tests/imgs_in/pdg.gif similarity index 100% rename from contrib/hbgd/tests/digits/pdg.gif rename to contrib/hbgd/tests/imgs_in/pdg.gif diff --git a/contrib/hbgd/tests/digits/pdw.gif b/contrib/hbgd/tests/imgs_in/pdw.gif similarity index 100% rename from contrib/hbgd/tests/digits/pdw.gif rename to contrib/hbgd/tests/imgs_in/pdw.gif diff --git a/contrib/hbhttpd/core.prg b/contrib/hbhttpd/core.prg index a7503a2dc1..dce2456c60 100644 --- a/contrib/hbhttpd/core.prg +++ b/contrib/hbhttpd/core.prg @@ -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 diff --git a/contrib/hbhttpd/tests/tpl/_main.tpl b/contrib/hbhttpd/tests/tpl/_main.html similarity index 100% rename from contrib/hbhttpd/tests/tpl/_main.tpl rename to contrib/hbhttpd/tests/tpl/_main.html diff --git a/contrib/hbhttpd/tests/tpl/app/account.tpl b/contrib/hbhttpd/tests/tpl/app/account.html similarity index 100% rename from contrib/hbhttpd/tests/tpl/app/account.tpl rename to contrib/hbhttpd/tests/tpl/app/account.html diff --git a/contrib/hbhttpd/tests/tpl/app/account/edit.tpl b/contrib/hbhttpd/tests/tpl/app/account/edit.html similarity index 100% rename from contrib/hbhttpd/tests/tpl/app/account/edit.tpl rename to contrib/hbhttpd/tests/tpl/app/account/edit.html diff --git a/contrib/hbhttpd/tests/tpl/app/cart.tpl b/contrib/hbhttpd/tests/tpl/app/cart.html similarity index 100% rename from contrib/hbhttpd/tests/tpl/app/cart.tpl rename to contrib/hbhttpd/tests/tpl/app/cart.html diff --git a/contrib/hbhttpd/tests/tpl/app/login.tpl b/contrib/hbhttpd/tests/tpl/app/login.html similarity index 100% rename from contrib/hbhttpd/tests/tpl/app/login.tpl rename to contrib/hbhttpd/tests/tpl/app/login.html diff --git a/contrib/hbhttpd/tests/tpl/app/logout.tpl b/contrib/hbhttpd/tests/tpl/app/logout.html similarity index 100% rename from contrib/hbhttpd/tests/tpl/app/logout.tpl rename to contrib/hbhttpd/tests/tpl/app/logout.html diff --git a/contrib/hbhttpd/tests/tpl/app/main.tpl b/contrib/hbhttpd/tests/tpl/app/main.html similarity index 100% rename from contrib/hbhttpd/tests/tpl/app/main.tpl rename to contrib/hbhttpd/tests/tpl/app/main.html diff --git a/contrib/hbhttpd/tests/tpl/app/register.tpl b/contrib/hbhttpd/tests/tpl/app/register.html similarity index 100% rename from contrib/hbhttpd/tests/tpl/app/register.tpl rename to contrib/hbhttpd/tests/tpl/app/register.html diff --git a/contrib/hbhttpd/tests/tpl/app/shopping.tpl b/contrib/hbhttpd/tests/tpl/app/shopping.html similarity index 100% rename from contrib/hbhttpd/tests/tpl/app/shopping.tpl rename to contrib/hbhttpd/tests/tpl/app/shopping.html diff --git a/extras/gtwvw/tests/readme.txt b/extras/gtwvw/tests/readme.txt deleted file mode 100644 index 137fbbc0d8..0000000000 --- a/extras/gtwvw/tests/readme.txt +++ /dev/null @@ -1,26 +0,0 @@ -To run samples: - -(1) Make sure you have GTWVW library -(2) Compile/link the .prg/.hbp using hbmk2 - - -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. diff --git a/extras/guestbk/cgi.ch b/extras/guestbk/cgi.ch deleted file mode 100644 index 2cb1231039..0000000000 --- a/extras/guestbk/cgi.ch +++ /dev/null @@ -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 diff --git a/extras/guestbk/guestbk.hbp b/extras/guestbk/guestbk.hbp deleted file mode 100644 index 2729efd880..0000000000 --- a/extras/guestbk/guestbk.hbp +++ /dev/null @@ -1,9 +0,0 @@ --w3 -es2 - --nulrdd - --gtcgi - -guestbk.prg -_cgi.prg -_inifile.prg diff --git a/extras/guestbk/guestbk.ini b/extras/guestbk/guestbk.ini deleted file mode 100644 index 447bd90cd8..0000000000 --- a/extras/guestbk/guestbk.ini +++ /dev/null @@ -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 is the number of fields on guestbook -; DataFieldn= defines the name of the nth field of guestbook -; EvenLine= color of even lines on guestbook -; OddLine= 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= number of lines per entry -; FormatLinen= format of the nth line of the entry. You can -; use metatags for replacing its content with the -; correspondent field value. Ex.: -; Format1=Name: <#Name> -; Format2=<#URL> -; 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=<#Comments> -Format2=<#Name> <<#EMail>> -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!!!<g> -DateTime1=July 25, 1999 12:00:00 diff --git a/extras/guestbk/guestbk.txt b/extras/guestbk/guestbk.txt deleted file mode 100644 index 50303f86bc..0000000000 --- a/extras/guestbk/guestbk.txt +++ /dev/null @@ -1,24 +0,0 @@ -Harbour Guestbook -Felipe Coury - - -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! diff --git a/extras/guestbk/_cgi.prg b/tests/cgi.prg similarity index 93% rename from extras/guestbk/_cgi.prg rename to tests/cgi.prg index bcb457655a..ac4ca03156 100644 --- a/extras/guestbk/_cgi.prg +++ b/tests/cgi.prg @@ -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 diff --git a/extras/guestbk/guestbk.html b/tests/guestbk.html similarity index 100% rename from extras/guestbk/guestbk.html rename to tests/guestbk.html diff --git a/tests/guestbk.ini b/tests/guestbk.ini new file mode 100644 index 0000000000..dd407d7583 --- /dev/null +++ b/tests/guestbk.ini @@ -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 is the number of fields on guestbook +; DataFieldn= defines the name of the nth field of guestbook +; EvenLine= color of even lines on guestbook +; OddLine= 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= number of lines per entry +; FormatLinen= format of the nth line of the entry. You can +; use metatags for replacing its content with the +; correspondent field value. Ex.: +; Format1=Name: <#Name> +; Format2=<#URL> +; 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=<#Comments> +Format2=<#Name> <<#EMail>> +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!!!<g> +DateTime1=1999-07-25 12:00:00 diff --git a/extras/guestbk/guestbk.prg b/tests/guestbk.prg similarity index 84% rename from extras/guestbk/guestbk.prg rename to tests/guestbk.prg index ba641d6ea0..6a2c2fabc9 100644 --- a/extras/guestbk/guestbk.prg +++ b/tests/guestbk.prg @@ -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 ), "
" ) ) - NEXT // Write fields to .ini file @@ -80,11 +97,9 @@ PROCEDURE Main() '' 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 + "" + hb_eol() - NEXT cCode += "" + 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 diff --git a/extras/guestbk/_inifile.prg b/tests/inifile.prg similarity index 98% rename from extras/guestbk/_inifile.prg rename to tests/inifile.prg index fedb4b30e6..bcfc9f7a58 100644 --- a/extras/guestbk/_inifile.prg +++ b/tests/inifile.prg @@ -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