2012-10-04 17:44 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib/gtwvg/tests/demowvg1.prg
  * contrib/gtwvg/tests/demoxbp.prg
  * contrib/hbmisc/doc/en/ht_dbf.txt
  * doc/codebloc.txt
  * doc/pcode.txt
  * extras/gtwvw/tests/cbtest1.prg
  * extras/gtwvw/tests/cbtest6.prg
  * extras/gtwvw/tests/drawimg.prg
  * extras/gtwvw/tests/ebtest7.prg
  * extras/gtwvw/tests/inpfocus.prg
  * extras/gtwvw/tests/maximize.prg
  * extras/gtwvw/tests/prog0.prg
  * extras/gtwvw/tests/prog1.prg
  * extras/gtwvw/tests/prog2.prg
  * extras/guestbk/guestbk.prg
  * extras/httpsrv/uhttpd.prg
  * extras/rddado/tests/mysql1.prg
  * extras/rddado/tests/mysql3.prg
  * tests/clsscope.prg
  * tests/keywords.prg
  * tests/rddtest/rddtst.prg
  * tests/testwarn.prg
    * startup functions converted to PROCEDUREs

  * extras/httpsrv/uhttpd.prg
    ! fixed to return errorlevels using ERRORLEVEL() 
      function instead of Main() return value.
This commit is contained in:
Viktor Szakats
2012-10-04 15:46:03 +00:00
parent 6dde6b10fe
commit 75f8c5bf01
23 changed files with 86 additions and 49 deletions

View File

@@ -16,6 +16,35 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-04 17:44 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/gtwvg/tests/demowvg1.prg
* contrib/gtwvg/tests/demoxbp.prg
* contrib/hbmisc/doc/en/ht_dbf.txt
* doc/codebloc.txt
* doc/pcode.txt
* extras/gtwvw/tests/cbtest1.prg
* extras/gtwvw/tests/cbtest6.prg
* extras/gtwvw/tests/drawimg.prg
* extras/gtwvw/tests/ebtest7.prg
* extras/gtwvw/tests/inpfocus.prg
* extras/gtwvw/tests/maximize.prg
* extras/gtwvw/tests/prog0.prg
* extras/gtwvw/tests/prog1.prg
* extras/gtwvw/tests/prog2.prg
* extras/guestbk/guestbk.prg
* extras/httpsrv/uhttpd.prg
* extras/rddado/tests/mysql1.prg
* extras/rddado/tests/mysql3.prg
* tests/clsscope.prg
* tests/keywords.prg
* tests/rddtest/rddtst.prg
* tests/testwarn.prg
* startup functions converted to PROCEDUREs
* extras/httpsrv/uhttpd.prg
! fixed to return errorlevels using ERRORLEVEL()
function instead of Main() return value.
2012-10-04 17:11 UTC+0200 Viktor Szakats (harbour syenar.net)
* tests/aliaslck.prg
* tests/files.prg

View File

@@ -32,7 +32,7 @@ MEMVAR GetList
//
FUNCTION Main()
PROCEDURE Main()
LOCAL aPaint
SET DATE ANSI
@@ -64,7 +64,7 @@ FUNCTION Main()
ExecForm( aPaint )
RETURN NIL
RETURN
//
/* This function must be linked with the application */

View File

@@ -27,7 +27,7 @@
//
FUNCTION Main()
PROCEDURE Main()
Local oCrt, oTBar, oSBar, oStatic, oCom, oXbp, oTree, oItem1, oItem2
LOCAL oListBox, oCheck, oRadio, oStatic2, oMLE, oAddr
LOCAL oPanel, oPanel1, oPanel2, cText, cNavigate, oDA
@@ -264,7 +264,8 @@ FUNCTION Main()
ENDDO
oCrt:Destroy()
Return nil
RETURN
//

View File

@@ -76,7 +76,7 @@
* $DESCRIPTION$
* This function determines the size of a field, designated by its number.
* $EXAMPLES$
* FUNCTION Main()
* PROCEDURE Main()
* LOCAL i
* USE tests NEW
* FOR i := 1 TO FCount()
@@ -114,7 +114,7 @@
* $DESCRIPTION$
* This function determines the number of decimal places of a given numeric field.
* $EXAMPLES$
* FUNCTION Main()
* PROCEDURE Main()
* LOCAL i
* USE tests NEW
* FOR i := 1 TO FCount()

View File

@@ -84,7 +84,7 @@ Incompatbility with the Clipper.
the reference in a codeblock.
The following code explains it (thanks to David G. Holm)
FUNCTION Main()
PROCEDURE Main()
LOCAL nTest
LOCAL bBlock1 := MakeBlock()
LOCAL bBlock2 := {|| DoThing( @nTest ), QOut( "From Main: ", nTest ) }
@@ -92,7 +92,7 @@ FUNCTION Main()
Eval( bBlock1 )
Eval( bBlock2 )
RETURN NIL
RETURN
FUNCTION MakeBlock()
LOCAL nTest

View File

@@ -8,11 +8,11 @@ The Clipper OBJ and pcode model (GNU|Open|Clipper project)
Let's consider the following Clipper sample Test.prg:
function Main()
FUNCTION Main()
? "Hello world!"
return nil
RETURN NIL
Once it gets compiled into a OBJ, what is there inside it?
@@ -127,4 +127,3 @@ to be continued...
Antonio Linares
www.fivetech.com

View File

@@ -30,7 +30,7 @@ static s_cThankYou := "Thanks for participating in our survey :-)"
ANNOUNCE HB_NOSTARTUPWINDOW
proc main
PROCEDURE Main()
local nMaxWidth, nCBid, nPBid, nPos
local ch,ncursor
setcolor("N/W")

View File

@@ -52,7 +52,7 @@ MEMVAR __nCBid__,__temp__
ATAIL(GetList):cargo := __nCBid__; ;
ATAIL(GetList):reader := {| get | CBreader(get)}
proc main
PROCEDURE Main()
local getlist := {}
local mname := padr("Budyanto Dj.",30), msex := "MALE", mage := 17, mstat := "married"
local __nCBid__,__temp__ //these two are temporary var required by CB get creation

View File

@@ -72,7 +72,7 @@
STATIC s_aPObjList := {}
proc main
PROCEDURE Main()
local ntop := 7,;
nleft:= 3,;
nbot := maxrow()-2,;

View File

@@ -53,7 +53,7 @@
//REQUEST HB_NOSTARTUPWINDOW
proc main
PROCEDURE Main()
local nOpen, nClose
local lClosepermitted := .F.
local bSetKey := SETKEY(K_F8, {|| MyHelp()})

View File

@@ -45,7 +45,7 @@
//array of codeblock
static s_akeyhandlers[_MAX_WINNUM]
proc main
PROCEDURE Main()
local ch
if !setmode(25,80)
wvw_messagebox(0, "Cannot set to (25,80) screen", "Warning", MB_OK+MB_ICONEXCLAMATION)

View File

@@ -15,7 +15,7 @@ static s_nNormalMaxcol := 79
STATIC s_lSizeReady := .F.
procedure main
PROCEDURE Main()
local ch
* activate WVW_SIZE()
s_lSizeReady := .T.

View File

@@ -25,7 +25,7 @@
static s_zwin := {}
static s_cStdColor := "N/W,N/GR*,,,N/W*"
proc main
PROCEDURE Main()
local i,j
SET SCOREBOARD OFF
SetColor( s_cStdColor )

View File

@@ -45,7 +45,7 @@
static s_zwin := {}
static s_cStdColor := "N/W,N/GR*,,,N/W*"
proc main
PROCEDURE Main()
local i,j
#ifdef __GTWVW__
local lMainCoord := WVW_SetMainCoord( .T. )

View File

@@ -37,7 +37,7 @@ static s_cStdColor := "N/W,N/GR*,,,N/W*"
static s_amiscobjlist := {} //x misc object list (actually: list of codeblocks)
#endif
proc main
PROCEDURE Main()
local i,j
#ifdef __GTWVW__
local lMainCoord := WVW_SetMainCoord( .T. )

View File

@@ -51,7 +51,7 @@
*
*/
FUNCTION Main()
PROCEDURE Main()
LOCAL oIni := TIniFile():New( "C:\inetpub\wwwroot\guestbk.ini" )
LOCAL oHTML := THTML():New()
@@ -159,4 +159,4 @@ FUNCTION Main()
ENDIF
RETURN NIL
RETURN

View File

@@ -207,7 +207,7 @@ ANNOUNCE ERRORSYS
//
// ----------------------------------------
FUNCTION Main( ... )
PROCEDURE Main( ... )
LOCAL nPort, hListen, hSocket, aRemote, cI, xVal
LOCAL aThreads, nStartThreads, nMaxThreads, nStartServiceThreads
LOCAL i, cPar, lStop
@@ -222,7 +222,8 @@ FUNCTION Main( ... )
IF !HB_MTVM()
? "I need multhread support. Please, recompile me!"
WAIT
RETURN 2
ErrorLevel( 2 )
RETURN
ENDIF
// ----------------------- Initializations ---------------------------------
@@ -291,11 +292,11 @@ FUNCTION Main( ... )
CASE cPar == "--help" .OR. Lower( cPar ) == "-h" .OR. cPar == "-?"
help()
RETURN 0
RETURN
OTHERWISE
help()
RETURN 0
RETURN
ENDCASE
ENDDO
@@ -303,7 +304,7 @@ FUNCTION Main( ... )
IF lStop
HB_MEMOWRIT( FILE_STOP, "" )
RETURN 0
RETURN
ELSE
FERASE( FILE_STOP )
ENDIF
@@ -401,7 +402,8 @@ FUNCTION Main( ... )
IF nPort <= 0 .OR. nPort > 65535
? "Invalid port number:", nPort
WAIT
RETURN 1
ErrorLevel( 1 )
RETURN
ENDIF
IF HB_ISSTRING( cApplicationRoot )
@@ -415,12 +417,14 @@ FUNCTION Main( ... )
ELSE
? "Invalid application root:", cI
WAIT
RETURN 3
ErrorLevel( 3 )
RETURN
ENDIF
ELSE
? "Invalid application root"
WAIT
RETURN 3
ErrorLevel( 3 )
RETURN
ENDIF
#ifdef DEBUG_ACTIVE
@@ -439,12 +443,14 @@ FUNCTION Main( ... )
ELSE
? "Invalid document root:", cI
WAIT
RETURN 3
ErrorLevel( 3 )
RETURN
ENDIF
ELSE
? "Invalid document root"
WAIT
RETURN 3
ErrorLevel( 3 )
RETURN
ENDIF
#ifdef DEBUG_ACTIVE
@@ -494,14 +500,16 @@ FUNCTION Main( ... )
IF ( s_hfileLogAccess := FOPEN( cLogAccess, FO_CREAT + FO_WRITE ) ) == -1
? "Can't open access log file"
WAIT
RETURN 1
ErrorLevel( 1 )
RETURN
ENDIF
FSEEK( s_hfileLogAccess, 0, FS_END )
IF ( s_hfileLogError := FOPEN( cLogError, FO_CREAT + FO_WRITE ) ) == -1
? "Can't open error log file"
WAIT
RETURN 1
ErrorLevel( 1 )
RETURN
ENDIF
FSEEK( s_hfileLogError, 0, FS_END )
@@ -638,7 +646,7 @@ FUNCTION Main( ... )
SET CURSOR ON
RETURN 0
RETURN
// --------------------------------------------------------------------------------- //
// THREAD FUNCTIONS

View File

@@ -6,7 +6,7 @@
REQUEST ADORDD
function Main()
PROCEDURE Main()
USE test00 VIA "ADORDD" TABLE "ACCOUNTS" MYSQL ;
FROM "www.freesql.org" USER "myuser" PASSWORD "mypass"
@@ -15,4 +15,4 @@ function Main()
USE
return nil
RETURN

View File

@@ -8,18 +8,18 @@
REQUEST ADORDD
function Main()
PROCEDURE Main()
USE test00 VIA "ADORDD" TABLE "ACCOUNTS" MYSQL ;
FROM "www.freesql.org" USER "myuser" PASSWORD "mypass"
LOCATE FOR "City LIKE 'Chi*'"
while ! Eof()
DO WHILE ! EOF()
? test00->First, test00->City
CONTINUE
end
ENDDO
USE
return nil
RETURN

View File

@@ -161,7 +161,7 @@
PROC MAIN()
proc main()
LOCAL cbErr, self, o
? DATE(), TIME(), VERSION(), OS()

View File

@@ -19,7 +19,7 @@ EXTERNAL __case, __begin
STATIC nExt, bEgin, bReak, cAse, do, wHile, wIth, eXit, eXternal, fIeld
STATIC for, in, include, init, loop, local, using, static, return, recover
FUNCTION Main()
FUNCTION NoTestMain()
//just to prevent any disaster if someone will want to run it
IF .T.

View File

@@ -77,17 +77,17 @@ return
//REQUEST DBSEEK, DBGOTO, DBGOTOP, DBGOBOTTOM, ORDSETFOCUS, ORDSCOPE
#ifdef _TEST_CREATE_
function main( cOutFile, rdd )
procedure main( cOutFile, rdd )
test_init( rdd, cOutFile )
test_main()
test_close()
return nil
return
#else
function main( rdd )
procedure main( rdd )
test_init( rdd )
test_main()
test_close()
return nil
return
#endif
static function test_init(rdd,cOutFile)

View File

@@ -148,7 +148,7 @@ PROCEDURE Main1()
FUNCTION Test()
RETURN .T.
FUNCTION Main2()
FUNCTION Test2()
Local n As Numeric, lVar AS LOGICAL
n := iif( lVar, "A", 3 ) // iif() needs to be completed.
@@ -159,7 +159,7 @@ FUNCTION Main2()
RETURN NIL
FUNCTION Main3()
FUNCTION Test3()
LOCAL n AS NUMERIC, cVar AS STRING, a[5,5,5] AS ARRAY OF STRING