2010-07-25 10:41 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/xhb/hbcompat.ch
+ Added xhb translations for hb_eol() and hb_ps().
* contrib/make.hbs
- Deleted SetCancel().
* src/debug/tbrwtext.prg
* src/debug/debugger.prg
* src/rtl/errsys.prg
* src/rtl/profiler.prg
* src/rtl/hbini.prg
* src/rtl/treport.prg
* src/rtl/tpersist.prg
* src/rtl/hbi18n2.prg
* src/rtl/ttextlin.prg
* src/rtl/teditor.prg
* src/rdd/usrrdd/rdds/logrdd.prg
* tests/hbpptest/hbpptest.prg
* tests/longstr2.prg
* tests/cdow.prg
* tests/output.prg
* tests/dirtest.prg
* tests/tstdbi.prg
* tests/speedold.prg
* tests/dates3.prg
* tests/set_test.prg
* tests/rto_get.prg
* tests/cpinfo.prg
* tests/speedtst.prg
* tests/dates.prg
* tests/set_num.prg
* tests/rto_tb.prg
* tests/testhtml.prg
* tests/round.prg
* tests/dates2.prg
* tests/dates4.prg
* tests/version.prg
* tests/seconds.prg
* tests/gtkeys.prg
* tests/adirtest.prg
* include/simpleio.ch
* include/assert.ch
* contrib/hbct/tests/tab.prg
* contrib/hbct/tests/expomant.prg
* contrib/xhb/traceprg.prg
* contrib/xhb/hblog.prg
* contrib/xhb/dumpvar.prg
* contrib/xhb/dbgfx.prg
* contrib/xhb/xhberr.prg
* contrib/xhb/cstruct.prg
* contrib/hbqt/generator/hbqtgen.prg
* contrib/hbqt/hbqt_errorsys.prg
* contrib/hbqt/generator2/hbqtgen2.prg
* contrib/hbxpp/hbxpp.ch
* contrib/hbnetio/utils/netiosrv.prg
* contrib/hbnetio/utils/rpcdemo.hbs
* contrib/hbnetio/utils/netiocmd.prg
* contrib/hbpgsql/tests/dbf2pg.prg
* contrib/hbmisc/tests/readfile.prg
* contrib/hbmisc/tests/testhbf.prg
* contrib/hbtip/thtml.prg
* contrib/hbtip/client.prg
* contrib/hbwin/tests/testsim.prg
* contrib/hbwin/tests/testole.prg
* contrib/hbwin/tests/testsvc.prg
* contrib/hbssl/tests/bio.prg
* contrib/hbssl/tests/pem.prg
* contrib/hbide/ideedit.prg
* contrib/hbide/idemisc.prg
* contrib/hbide/idethemes.prg
* contrib/hbide/idesaveload.prg
* contrib/hbide/idedocwriter.prg
* contrib/hbide/hbide.ch
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idehome.prg
* contrib/hbide/ideshortcuts.prg
* utils/hbformat/hbformat.prg
* utils/hbmk2/hbmk2.prg
* utils/hbi18n/hbi18n.prg
* utils/hbtest/hbtest.prg
* examples/hbextern/hbextern.prg
* examples/uhttpd2/umain.prg
* examples/guestbk/inifiles.prg
* examples/guestbk/testcgi.prg
* examples/httpsrv/uhttpd.prg
* examples/hscript/hscript.prg
* hb_osnewline() -> hb_eol()
(deleting temp variables and temp pp macros used in the past
to workaround the long typing of the old function name)
* Some formatting along the way in tests dir.
* src/rtl/errsys.prg
- Deleted usage of ISNIL(). It's a quite pointless macro.
* src/rtl/errsys.prg
* src/rtl/listbox.prg
* src/rtl/profiler.prg
* src/rtl/treport.prg
* src/rtl/tpersist.prg
* src/rtl/tgetlist.prg
* src/rtl/teditor.prg
% DO CASE -> SWITCH
* src/rtl/alert.prg
* Replaced DEFAULT TO with simple NIL check.
* src/compiler/gencc.c
* Formatting of generated code.
* contrib/hbide/ideedit.prg
* contrib/hbide/idemisc.prg
* contrib/hbide/idethemes.prg
* contrib/hbide/idesaveload.prg
* contrib/hbide/idedocwriter.prg
* contrib/hbide/hbide.ch
* contrib/hbide/ideprojmanager.prg
* contrib/hbide/idehome.prg
* contrib/hbide/ideshortcuts.prg
* hb_osPathSeparator() (and static variable) -> hb_ps()
This commit is contained in:
@@ -16,6 +16,127 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-07-25 10:41 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/xhb/hbcompat.ch
|
||||
+ Added xhb translations for hb_eol() and hb_ps().
|
||||
|
||||
* contrib/make.hbs
|
||||
- Deleted SetCancel().
|
||||
|
||||
* src/debug/tbrwtext.prg
|
||||
* src/debug/debugger.prg
|
||||
* src/rtl/errsys.prg
|
||||
* src/rtl/profiler.prg
|
||||
* src/rtl/hbini.prg
|
||||
* src/rtl/treport.prg
|
||||
* src/rtl/tpersist.prg
|
||||
* src/rtl/hbi18n2.prg
|
||||
* src/rtl/ttextlin.prg
|
||||
* src/rtl/teditor.prg
|
||||
* src/rdd/usrrdd/rdds/logrdd.prg
|
||||
* tests/hbpptest/hbpptest.prg
|
||||
* tests/longstr2.prg
|
||||
* tests/cdow.prg
|
||||
* tests/output.prg
|
||||
* tests/dirtest.prg
|
||||
* tests/tstdbi.prg
|
||||
* tests/speedold.prg
|
||||
* tests/dates3.prg
|
||||
* tests/set_test.prg
|
||||
* tests/rto_get.prg
|
||||
* tests/cpinfo.prg
|
||||
* tests/speedtst.prg
|
||||
* tests/dates.prg
|
||||
* tests/set_num.prg
|
||||
* tests/rto_tb.prg
|
||||
* tests/testhtml.prg
|
||||
* tests/round.prg
|
||||
* tests/dates2.prg
|
||||
* tests/dates4.prg
|
||||
* tests/version.prg
|
||||
* tests/seconds.prg
|
||||
* tests/gtkeys.prg
|
||||
* tests/adirtest.prg
|
||||
* include/simpleio.ch
|
||||
* include/assert.ch
|
||||
* contrib/hbct/tests/tab.prg
|
||||
* contrib/hbct/tests/expomant.prg
|
||||
* contrib/xhb/traceprg.prg
|
||||
* contrib/xhb/hblog.prg
|
||||
* contrib/xhb/dumpvar.prg
|
||||
* contrib/xhb/dbgfx.prg
|
||||
* contrib/xhb/xhberr.prg
|
||||
* contrib/xhb/cstruct.prg
|
||||
* contrib/hbqt/generator/hbqtgen.prg
|
||||
* contrib/hbqt/hbqt_errorsys.prg
|
||||
* contrib/hbqt/generator2/hbqtgen2.prg
|
||||
* contrib/hbxpp/hbxpp.ch
|
||||
* contrib/hbnetio/utils/netiosrv.prg
|
||||
* contrib/hbnetio/utils/rpcdemo.hbs
|
||||
* contrib/hbnetio/utils/netiocmd.prg
|
||||
* contrib/hbpgsql/tests/dbf2pg.prg
|
||||
* contrib/hbmisc/tests/readfile.prg
|
||||
* contrib/hbmisc/tests/testhbf.prg
|
||||
* contrib/hbtip/thtml.prg
|
||||
* contrib/hbtip/client.prg
|
||||
* contrib/hbwin/tests/testsim.prg
|
||||
* contrib/hbwin/tests/testole.prg
|
||||
* contrib/hbwin/tests/testsvc.prg
|
||||
* contrib/hbssl/tests/bio.prg
|
||||
* contrib/hbssl/tests/pem.prg
|
||||
* contrib/hbide/ideedit.prg
|
||||
* contrib/hbide/idemisc.prg
|
||||
* contrib/hbide/idethemes.prg
|
||||
* contrib/hbide/idesaveload.prg
|
||||
* contrib/hbide/idedocwriter.prg
|
||||
* contrib/hbide/hbide.ch
|
||||
* contrib/hbide/ideprojmanager.prg
|
||||
* contrib/hbide/idehome.prg
|
||||
* contrib/hbide/ideshortcuts.prg
|
||||
* utils/hbformat/hbformat.prg
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
* utils/hbi18n/hbi18n.prg
|
||||
* utils/hbtest/hbtest.prg
|
||||
* examples/hbextern/hbextern.prg
|
||||
* examples/uhttpd2/umain.prg
|
||||
* examples/guestbk/inifiles.prg
|
||||
* examples/guestbk/testcgi.prg
|
||||
* examples/httpsrv/uhttpd.prg
|
||||
* examples/hscript/hscript.prg
|
||||
* hb_osnewline() -> hb_eol()
|
||||
(deleting temp variables and temp pp macros used in the past
|
||||
to workaround the long typing of the old function name)
|
||||
* Some formatting along the way in tests dir.
|
||||
|
||||
* src/rtl/errsys.prg
|
||||
- Deleted usage of ISNIL(). It's a quite pointless macro.
|
||||
|
||||
* src/rtl/errsys.prg
|
||||
* src/rtl/listbox.prg
|
||||
* src/rtl/profiler.prg
|
||||
* src/rtl/treport.prg
|
||||
* src/rtl/tpersist.prg
|
||||
* src/rtl/tgetlist.prg
|
||||
* src/rtl/teditor.prg
|
||||
% DO CASE -> SWITCH
|
||||
|
||||
* src/rtl/alert.prg
|
||||
* Replaced DEFAULT TO with simple NIL check.
|
||||
|
||||
* src/compiler/gencc.c
|
||||
* Formatting of generated code.
|
||||
|
||||
* contrib/hbide/ideedit.prg
|
||||
* contrib/hbide/idemisc.prg
|
||||
* contrib/hbide/idethemes.prg
|
||||
* contrib/hbide/idesaveload.prg
|
||||
* contrib/hbide/idedocwriter.prg
|
||||
* contrib/hbide/hbide.ch
|
||||
* contrib/hbide/ideprojmanager.prg
|
||||
* contrib/hbide/idehome.prg
|
||||
* contrib/hbide/ideshortcuts.prg
|
||||
* hb_osPathSeparator() (and static variable) -> hb_ps()
|
||||
|
||||
2010-07-24 18:27 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/qth/HBQPlainTextEdit.qth
|
||||
* contrib/hbqt/qtgui/THBQPlainTextEdit.prg
|
||||
@@ -24,19 +145,19 @@
|
||||
* contrib/hbqt/hbqt_hbqplaintextedit.cpp
|
||||
* contrib/hbqt/hbqt_hbqplaintextedit.h
|
||||
+ Added: one more method call.
|
||||
|
||||
|
||||
* contrib/hbide/idebrowse.prg
|
||||
* contrib/hbide/ideedit.prg
|
||||
* contrib/hbide/ideeditor.prg
|
||||
+ Implemented: <intellisense><code completion> for
|
||||
+ Implemented: <intellisense><code completion> for
|
||||
FIELD-> and someAlias-> table fields for tables opened in ideDBU.
|
||||
|
||||
How it Works:
|
||||
1. Open few tables in ideDBU.
|
||||
2. In some editor instance type "FIELD->"
|
||||
2. In some editor instance type "FIELD->"
|
||||
It will set the field completion mode ON.
|
||||
3. type some letter starting a field, say, "a"
|
||||
Code completion dialog will open with all fields
|
||||
Code completion dialog will open with all fields
|
||||
starting with "a" contained in all the tables opened.
|
||||
4. To get list of all fields in all tables,
|
||||
after typing FIELD-> type "x" and then press back space.
|
||||
@@ -65,7 +186,7 @@
|
||||
* contrib/hbqt/qtgui/HBQPlainTextEdit.cpp
|
||||
* contrib/hbqt/qtgui/THBQPlainTextEdit.prg
|
||||
* contrib/hbqt/qth/HBQPlainTextEdit.qth
|
||||
+ Prepared: to handle another field completion protocol -
|
||||
+ Prepared: to handle another field completion protocol -
|
||||
a work-in-progress.
|
||||
|
||||
* contrib/hbxbp/xbpbrowse.prg
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* CT3 function test for
|
||||
* CT3 function test for
|
||||
* - EXPONENT
|
||||
* - MANTISSA
|
||||
*
|
||||
@@ -55,24 +55,24 @@
|
||||
|
||||
PROCEDURE MAIN
|
||||
|
||||
local n
|
||||
local n
|
||||
|
||||
CTINIT()
|
||||
CTINIT()
|
||||
|
||||
SET DECIMALS TO 15
|
||||
SET DECIMALS TO 15
|
||||
|
||||
for n := 1 to 1000
|
||||
outstd (str(n,20,15)+": "+str(mantissa(n),20,15)+" "+str(exponent(n),4) + hb_osnewline())
|
||||
outstd (str(sqrt(n),20,15)+": "+str(mantissa(sqrt(n)),20,15)+" "+str(exponent(sqrt(n)),4) + hb_osnewline())
|
||||
next n
|
||||
for n := 1 to 1000
|
||||
outstd (str(n,20,15)+": "+str(mantissa(n),20,15)+" "+str(exponent(n),4) + hb_eol())
|
||||
outstd (str(sqrt(n),20,15)+": "+str(mantissa(sqrt(n)),20,15)+" "+str(exponent(sqrt(n)),4) + hb_eol())
|
||||
next n
|
||||
|
||||
// The call to str( infinity(.t.) ), generate a GPF.
|
||||
// outstd (str(infinity(.t.))+str(mantissa( infinity(.t.) ))+str(exponent( infinity(.t.) )))
|
||||
// outstd (str(infinity(.t.)) )
|
||||
|
||||
outstd (" infinity(.t.): "+str(mantissa(infinity(.t.)),20,15)+" ")
|
||||
outstd (str(exponent(infinity(.t.)),4)+hb_osnewline())
|
||||
outstd (" infinity(.t.): "+str(mantissa(infinity(.t.)),20,15)+" ")
|
||||
outstd (str(exponent(infinity(.t.)),4)+hb_eol())
|
||||
|
||||
CTEXIT()
|
||||
CTEXIT()
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Test CT3 functions TABEXPAND() and TABPACK()
|
||||
* Test CT3 functions TABEXPAND() and TABPACK()
|
||||
*
|
||||
* Copyright 2002 IntTec GmbH, Neunlindenstr 32, 79106 Freiburg, Germany
|
||||
* Author: Martin Vogel <vogel@inttec.de>
|
||||
@@ -76,21 +76,21 @@ local cStr, nLen
|
||||
qout ("")
|
||||
|
||||
qout ("Tests with newline characters: ^J == LF, ^M == CR")
|
||||
cStr := hb_osnewline()
|
||||
cStr := hb_eol()
|
||||
cStr := strtran (cStr, chr(10),"^J")
|
||||
cStr := strtran (cStr, chr(13),"^M")
|
||||
qout ([ hb_osnewline() = "] + cStr +["])
|
||||
cStr := tabexpand("-"+chr(9)+"!"+hb_osnewline()+"----"+chr(9)+ "!",, "+")
|
||||
qout ([ hb_eol() = "] + cStr +["])
|
||||
cStr := tabexpand("-"+chr(9)+"!"+hb_eol()+"----"+chr(9)+ "!",, "+")
|
||||
cStr := strtran (cStr, chr(10),"^J")
|
||||
cStr := strtran (cStr, chr(13),"^M")
|
||||
qout ([ tabexpand("-"+chr(9)+"!"+hb_osnewline()+"----"+chr(9)+ "!",, "+")])
|
||||
qout ([ == "-+++++++!"+hb_osnewline()+"----++++!" ? -> "] + cStr +["])
|
||||
cStr := tabexpand("-"+chr(9)+"!$$--"+hb_osnewline()+"--"+chr(9)+ "!",, "+", "$")
|
||||
qout ([ tabexpand("-"+chr(9)+"!"+hb_eol()+"----"+chr(9)+ "!",, "+")])
|
||||
qout ([ == "-+++++++!"+hb_eol()+"----++++!" ? -> "] + cStr +["])
|
||||
cStr := tabexpand("-"+chr(9)+"!$$--"+hb_eol()+"--"+chr(9)+ "!",, "+", "$")
|
||||
cStr := strtran (cStr, chr(10),"^J")
|
||||
cStr := strtran (cStr, chr(13),"^M")
|
||||
qout ([ tabexpand("-"+chr(9)+"!$$--"+hb_osnewline()+--"+chr(9)+ "!",, "+", "$")])
|
||||
nLen := len (hb_osnewline())
|
||||
qout ([ == "-+++++++!$$--"+hb_osnewline()+"]+replicate("-",4-nLen)+[++!" ? -> "] + cStr +["])
|
||||
qout ([ tabexpand("-"+chr(9)+"!$$--"+hb_eol()+--"+chr(9)+ "!",, "+", "$")])
|
||||
nLen := len (hb_eol())
|
||||
qout ([ == "-+++++++!$$--"+hb_eol()+"]+replicate("-",4-nLen)+[++!" ? -> "] + cStr +["])
|
||||
qout ("")
|
||||
|
||||
qout ("Tests with tab characters:")
|
||||
@@ -116,18 +116,18 @@ local cStr, nLen
|
||||
qout ("")
|
||||
|
||||
qout ("Tests with newline characters:")
|
||||
cStr := hb_osnewline()
|
||||
cStr := hb_eol()
|
||||
cStr := strtran (cStr, chr(10),"^J")
|
||||
cStr := strtran (cStr, chr(13),"^M")
|
||||
qout ([ hb_osnewline() = "] + cStr +["])
|
||||
qout ([ hb_eol() = "] + cStr +["])
|
||||
|
||||
cStr := "ABCD+" + hb_osnewline() + "++---+++++"
|
||||
cStr := "ABCD+" + hb_eol() + "++---+++++"
|
||||
cStr := tabpack (cStr, 4, "+")
|
||||
cStr := strtran (cStr, chr(10),"^J")
|
||||
cStr := strtran (cStr, chr(13),"^M")
|
||||
cStr := strtran (cStr, chr(9),"^I")
|
||||
qout ([ tabpack("ABCD+" + hb_osnewline() + "++---+++++", 4, "+")])
|
||||
qout ([ == "ABCD+"+hb_osnewline()+"++---"+chr(9)+"++" ? -> "] + cStr +["])
|
||||
qout ([ tabpack("ABCD+" + hb_eol() + "++---+++++", 4, "+")])
|
||||
qout ([ == "ABCD+"+hb_eol()+"++---"+chr(9)+"++" ? -> "] + cStr +["])
|
||||
|
||||
qout ("End test of TABPACK()")
|
||||
qout ("")
|
||||
@@ -138,21 +138,21 @@ local cStr, nLen
|
||||
// qout (" ...press any key to start the memoedit now...")
|
||||
// qout ("")
|
||||
// inkey (0)
|
||||
// cls
|
||||
// cls
|
||||
// dispbox (0,0,20,60)
|
||||
// cStr := memoedit (, 1, 1, 9, 59,,,59)
|
||||
// cls
|
||||
// qout (" Now printing the expanded text using a tab length of 4 and soft CRs")
|
||||
// cStr1 := tabexpand (cStr,4,"+",,,.F.)
|
||||
// cStr1 := strtran (cStr, chr(141), hb_osnewline())
|
||||
//
|
||||
// cStr1 := strtran (cStr, chr(141), hb_eol())
|
||||
//
|
||||
// for ni := 1 to mlcount (cStr1, 59, 4, .T.)
|
||||
// qout (" "+str(ni)+": "+memoline (cStr1, 59,ni,4,.T.))
|
||||
// next ni
|
||||
//
|
||||
//
|
||||
// qout (" Now printing the expanded text using a tab length of 4 but without soft CRs")
|
||||
// cStr1 := tabexpand (cStr,4,"+",,,.T.)
|
||||
//
|
||||
//
|
||||
// for ni := 1 to mlcount (cStr1, 59, 4, .T.)
|
||||
// qout (" "+str(ni)+": "+memoline (cStr1, 59,ni,4,.T.))
|
||||
// next ni
|
||||
@@ -161,7 +161,3 @@ local cStr, nLen
|
||||
ctexit()
|
||||
|
||||
return
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@
|
||||
#define UI_MODE_FUNC 1
|
||||
#define UI_MODE_UI 2
|
||||
|
||||
#define CRLF hb_osNewLine()
|
||||
#define _EOL Chr( 10 )
|
||||
|
||||
#define HBIDE_USE_UIC
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
FUNCTION hbide_getSVNHeader()
|
||||
|
||||
RETURN "/* " + CRLF + " * $Id:" + CRLF + " */" + CRLF + CRLF
|
||||
RETURN "/* " + hb_eol() + " * $Id:" + hb_eol() + " */" + hb_eol() + hb_eol()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -141,7 +141,7 @@ FUNCTION hbide_arg2memo( aArg )
|
||||
LOCAL s, cMemo := ""
|
||||
|
||||
FOR EACH s IN aArg
|
||||
cMemo += "<" + s + ">" + iif( s:__enumIndex() < len( aArg ), CRLF, "" )
|
||||
cMemo += "<" + s + ">" + iif( s:__enumIndex() < len( aArg ), hb_eol(), "" )
|
||||
NEXT
|
||||
|
||||
RETURN cMemo
|
||||
@@ -622,7 +622,7 @@ METHOD IdeDocWriter:saveInFile()
|
||||
IF !empty( cFile )
|
||||
cBuffer := hb_memoread( cFile )
|
||||
cBuffer := iif( "$Id:" $ cBuffer, cBuffer, hbide_getSVNHeader() + cBuffer )
|
||||
cBuffer += CRLF
|
||||
cBuffer += hb_eol()
|
||||
cBuffer += hbide_arrayToMemo( txt_ )
|
||||
|
||||
hb_memowrit( cFile, cBuffer )
|
||||
@@ -749,5 +749,3 @@ METHOD IdeDocWriter:buildDocument()
|
||||
RETURN txt_
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
|
||||
@@ -849,7 +849,7 @@ METHOD IdeEdit:copyBlockContents( aCord )
|
||||
ENDIF
|
||||
|
||||
aadd( ::aBlockCopyContents, cLine )
|
||||
cClip += cLine + iif( i < nB, hb_osNewLine(), iif( cLine == oLine, hb_osNewLine(), "" ) )
|
||||
cClip += cLine + iif( i < nB, hb_eol(), iif( cLine == oLine, hb_eol(), "" ) )
|
||||
NEXT
|
||||
|
||||
* HB_TRACE( HB_TR_ALWAYS, "copyBlockContents", cClip )
|
||||
@@ -918,7 +918,7 @@ METHOD IdeEdit:pasteBlockContents( nMode )
|
||||
FOR i := 1 TO len( aCopy )
|
||||
qCursor:insertText( aCopy[ i ] )
|
||||
IF i < len( aCopy )
|
||||
qCursor:insertText( hb_osNewLine() )
|
||||
qCursor:insertText( hb_eol() )
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
@@ -1271,7 +1271,7 @@ METHOD IdeEdit:getSelectedText()
|
||||
|
||||
ENDIF
|
||||
|
||||
cClip += cLine + iif( i < nB, hb_osNewLine(), "" )
|
||||
cClip += cLine + iif( i < nB, hb_eol(), "" )
|
||||
NEXT
|
||||
|
||||
RETURN cClip
|
||||
@@ -2542,4 +2542,3 @@ STATIC FUNCTION hbide_normalizeRect( aCord, nT, nL, nB, nR )
|
||||
RETURN NIL
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -553,9 +553,9 @@ STATIC FUNCTION hbide_getFaqs()
|
||||
|
||||
aadd( a_, 'Does hbIDE provides "intellisense" ? If yes, in what aspects ?' )
|
||||
aadd( b_, 'Yes. Not so powerful yet, but "yes". hbIDE embeds two components as the basis of this intellisense, ' + ;
|
||||
CRLF + ;
|
||||
' 1. Harbour Documentation, and ' + CRLF + ;
|
||||
' 2. Project(s) Prototype Tagging. ' + CRLF + ;
|
||||
hb_eol() + ;
|
||||
' 1. Harbour Documentation, and ' + hb_eol() + ;
|
||||
' 2. Project(s) Prototype Tagging. ' + hb_eol() + ;
|
||||
'Both these components can be pressed in servive simultaneously and as per need. Both are loaded ' + ;
|
||||
'only when requested. Prototype Tagging extends one step forward as to offer to load only those ' + ;
|
||||
'projects which a developer will be working on during that session. Both components can be aligned ' + ;
|
||||
@@ -563,8 +563,8 @@ STATIC FUNCTION hbide_getFaqs()
|
||||
'hbIDE examines the contents of these components, if the function is available in Harbour Docs, ' + ;
|
||||
'its details are dumped into the viewer, otherwise if the function is contained in the tagged ' + ;
|
||||
'prototypes, it is made current in the list, and a html formatted prototype is displayed as tooltip ' + ;
|
||||
'beneth the current caret position. ' + CRLF + ;
|
||||
CRLF + ;
|
||||
'beneth the current caret position. ' + hb_eol() + ;
|
||||
hb_eol() + ;
|
||||
'Code completion tool is almost done with, and probably will make up its presence in the hbIDE soon. ' )
|
||||
|
||||
RETURN { a_, b_ }
|
||||
|
||||
@@ -184,7 +184,7 @@ FUNCTION hbide_menuAddSep( oMenu )
|
||||
|
||||
FUNCTION hbide_createTarget( cFile, txt_ )
|
||||
LOCAL hHandle := fcreate( cFile )
|
||||
LOCAL cNewLine := hb_OsNewLine()
|
||||
LOCAL cNewLine := hb_eol()
|
||||
|
||||
IF hHandle != F_ERROR
|
||||
aeval( txt_, { |e| fWrite( hHandle, e + cNewLine ) } )
|
||||
@@ -443,9 +443,9 @@ FUNCTION hbide_ar2delString( a_, cDlm )
|
||||
FUNCTION hbide_arrayToMemo( a_ )
|
||||
LOCAL s := ""
|
||||
|
||||
aeval( a_, {|e| s += e + CRLF } )
|
||||
aeval( a_, {|e| s += e + hb_eol() } )
|
||||
|
||||
s += CRLF
|
||||
s += hb_eol()
|
||||
|
||||
RETURN s
|
||||
|
||||
@@ -454,7 +454,7 @@ FUNCTION hbide_arrayToMemo( a_ )
|
||||
FUNCTION hbide_arrayToMemoEx( a_ )
|
||||
LOCAL s := ""
|
||||
|
||||
aeval( a_, {|e| s += e + CRLF } )
|
||||
aeval( a_, {|e| s += e + hb_eol() } )
|
||||
|
||||
s := substr( s, 1, len( s ) - 2 )
|
||||
|
||||
@@ -471,7 +471,7 @@ FUNCTION hbide_arrayToMemoEx2( a_ )
|
||||
|
||||
FOR EACH k IN a_
|
||||
IF empty( k )
|
||||
s += CRLF + CRLF
|
||||
s += hb_eol() + hb_eol()
|
||||
lNewPara := .t.
|
||||
ELSE
|
||||
s += iif( lNewPara, "", " " ) + k
|
||||
@@ -480,7 +480,7 @@ FUNCTION hbide_arrayToMemoEx2( a_ )
|
||||
NEXT
|
||||
|
||||
DO WHILE .t.
|
||||
IF right( s, 2 ) == CRLF
|
||||
IF right( s, 2 ) == hb_eol()
|
||||
s := substr( s, 1, len( s ) - 2 )
|
||||
ELSE
|
||||
EXIT
|
||||
@@ -979,7 +979,7 @@ function hbide_toString( x, lLineFeed, lInherited, lType, cFile, lForceLineFeed
|
||||
IF len( x ) = 0
|
||||
s += " "
|
||||
ELSE
|
||||
s += iif( valtype( x[1] ) = "A" .or. lForceLineFeed, CRLF, "" )
|
||||
s += iif( valtype( x[1] ) = "A" .or. lForceLineFeed, hb_eol(), "" )
|
||||
j := len( x )
|
||||
|
||||
FOR i := 1 TO j
|
||||
@@ -987,7 +987,7 @@ function hbide_toString( x, lLineFeed, lInherited, lType, cFile, lForceLineFeed
|
||||
s += iif( i <> j, ",", "" )
|
||||
IF lLineFeed
|
||||
IF !lInherited .and. ( valtype( x[i] ) == "A" .or. lForceLineFeed )
|
||||
s += CRLF
|
||||
s += hb_eol()
|
||||
ENDIF
|
||||
ENDIF
|
||||
NEXT
|
||||
@@ -997,10 +997,10 @@ function hbide_toString( x, lLineFeed, lInherited, lType, cFile, lForceLineFeed
|
||||
CASE ( t == "O" )
|
||||
IF lInherited
|
||||
// É necessário linkar \harbour\lib\xhb.lib
|
||||
// s := iif( lType, "[O]=", "" ) + hb_dumpvar( x ) + iif( lLineFeed, CRLF, "" )
|
||||
s := '' + iif( lLineFeed, CRLF, "" )
|
||||
// s := iif( lType, "[O]=", "" ) + hb_dumpvar( x ) + iif( lLineFeed, hb_eol(), "" )
|
||||
s := '' + iif( lLineFeed, hb_eol(), "" )
|
||||
ELSE
|
||||
s := iif( lType, "[O]=", "" ) + x:ClassName()+'():New()' + iif( lLineFeed, CRLF, "" )
|
||||
s := iif( lType, "[O]=", "" ) + x:ClassName()+'():New()' + iif( lLineFeed, hb_eol(), "" )
|
||||
ENDIF
|
||||
ENDCASE
|
||||
|
||||
@@ -1156,7 +1156,7 @@ FUNCTION hbide_buildLinesLabel( nFrom, nTo, nW, nMax )
|
||||
IF ( ( nFrom + i ) % 10 ) == 0
|
||||
s += "<font color = red>" + padl( hb_ntos( nFrom + i ), nW ) + "</font><br />"
|
||||
ELSE
|
||||
//s += padl( hb_ntos( nFrom + i ), nW ) + CRLF
|
||||
//s += padl( hb_ntos( nFrom + i ), nW ) + hb_eol()
|
||||
s += padl( hb_ntos( nFrom + i ), nW ) + "<br />"
|
||||
ENDIF
|
||||
NEXT
|
||||
@@ -1184,7 +1184,7 @@ FUNCTION hbide_getShellCommandsTempFile( aCmd )
|
||||
|
||||
cCmdFile := ""
|
||||
FOR EACH tmp IN aCmd
|
||||
cCmdFile += tmp + hb_osNewLine()
|
||||
cCmdFile += tmp + hb_eol()
|
||||
NEXT
|
||||
|
||||
IF ( fhnd := hb_FTempCreateEx( @cCmdFileName, NIL, NIL, cExt ) ) != F_ERROR
|
||||
@@ -1364,10 +1364,10 @@ STATIC PROCEDURE hbide_HBPLoad( aParams, cFileName )
|
||||
|
||||
cFile := MemoRead( cFileName ) /* NOTE: Intentionally using MemoRead() which handles EOF char. */
|
||||
|
||||
IF ! hb_osNewLine() == HBIDE_HBP_EOL
|
||||
cFile := StrTran( cFile, hb_osNewLine(), HBIDE_HBP_EOL )
|
||||
IF ! hb_eol() == HBIDE_HBP_EOL
|
||||
cFile := StrTran( cFile, hb_eol(), HBIDE_HBP_EOL )
|
||||
ENDIF
|
||||
IF ! hb_osNewLine() == Chr( 13 ) + Chr( 10 )
|
||||
IF ! hb_eol() == Chr( 13 ) + Chr( 10 )
|
||||
cFile := StrTran( cFile, Chr( 13 ) + Chr( 10 ), HBIDE_HBP_EOL )
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -1314,7 +1314,7 @@ METHOD IdeProjManager:buildSource( lExecutable )
|
||||
|
||||
IF hb_fileExists( ::cBatch )
|
||||
cBuf := memoread( ::cBatch )
|
||||
cBuf += hb_osNewLine() + cExeHbMk2 + " " + cCmdParams + hb_osNewLine()
|
||||
cBuf += hb_eol() + cExeHbMk2 + " " + cCmdParams + hb_eol()
|
||||
hb_memowrit( ::cBatch, cBuf )
|
||||
ENDIF
|
||||
//
|
||||
@@ -1449,7 +1449,7 @@ METHOD IdeProjManager:buildProject( cProject, lLaunch, lRebuild, lPPO, lViaQt )
|
||||
|
||||
IF hb_fileExists( ::cBatch )
|
||||
cBuf := memoread( ::cBatch )
|
||||
cBuf += hb_osNewLine() + cExeHbMk2 + " " + cHbpPath + cCmdParams + hb_osNewLine()
|
||||
cBuf += hb_eol() + cExeHbMk2 + " " + cHbpPath + cCmdParams + hb_eol()
|
||||
hb_memowrit( ::cBatch, cBuf )
|
||||
ENDIF
|
||||
//
|
||||
@@ -1624,4 +1624,3 @@ METHOD IdeProjManager:outputText( cText )
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -967,8 +967,8 @@ METHOD IdeSetup:destroy()
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeSetup:eol()
|
||||
RETURN iif( ::oINI:cLineEndingMode == "CRLF", CRLF, iif( ::oINI:cLineEndingMode == "CR", chr( 13 ), ;
|
||||
iif( ::oINI:cLineEndingMode == "LF", chr( 10 ), CRLF ) ) )
|
||||
RETURN iif( ::oINI:cLineEndingMode == "CRLF", hb_eol(), iif( ::oINI:cLineEndingMode == "CR", chr( 13 ), ;
|
||||
iif( ::oINI:cLineEndingMode == "LF", chr( 10 ), hb_eol() ) ) )
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeSetup:setIcons()
|
||||
|
||||
@@ -1260,7 +1260,7 @@ METHOD IdeShortcuts:loadMethods()
|
||||
'Executes a Tool defined and visible under tools menu.' } )
|
||||
aadd( ::aMethods, { 'execTool( cCmd, cParams, cStartIn, lCapture, lShowOutput )' , ;
|
||||
'execTool( "", "", "", .f., .f. )', ;
|
||||
'Executes a program or file with parameters and other attributes.' + CRLF + ;
|
||||
'Executes a program or file with parameters and other attributes.' + hb_eol() + ;
|
||||
'http://hbide.vouch.info/ ( Topic: Tools and Utilities )' } )
|
||||
aadd( ::aMethods, { 'execPlugin( cPlugin )', ;
|
||||
'execPlugin( "" )', ;
|
||||
@@ -1673,4 +1673,3 @@ METHOD IdeShortcuts:mergeMacros( a_ )
|
||||
ENDSWITCH
|
||||
#endif
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -806,7 +806,7 @@ METHOD IdeThemes:buildINI()
|
||||
NEXT
|
||||
aadd( txt_, " " )
|
||||
|
||||
aeval( txt_, {|e| cINI += e + CRLF } )
|
||||
aeval( txt_, {|e| cINI += e + hb_eol() } )
|
||||
|
||||
RETURN cINI
|
||||
|
||||
@@ -978,7 +978,7 @@ STATIC FUNCTION GetSource()
|
||||
aadd( txt_, ' RETURN xVal ' )
|
||||
aadd( txt_, '/*----------------------------------------------------------------------*/ ' )
|
||||
|
||||
aeval( txt_, {|e| s += trim( e ) + CRLF } )
|
||||
aeval( txt_, {|e| s += trim( e ) + hb_eol() } )
|
||||
|
||||
RETURN s
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* Test program for new class that reads a file one line at a time */
|
||||
|
||||
// Test program for new class that reads a file one line at a time
|
||||
/* Harbour Project source code
|
||||
http://harbour-project.org/
|
||||
Donated to the public domain on 2001-03-08 by David G. Holm <dholm@jsd-llc.com>
|
||||
@@ -11,17 +12,18 @@
|
||||
#include "fileio.ch"
|
||||
|
||||
PROCEDURE Main( cFile )
|
||||
LOCAL oFile := TFileRead():New( cFile )
|
||||
LOCAL cNewLine := HB_OSNewLine()
|
||||
LOCAL oFile := TFileRead():New( cFile )
|
||||
LOCAL cNewLine := hb_eol()
|
||||
|
||||
oFile:Open()
|
||||
IF oFile:Error()
|
||||
QOUT( oFile:ErrorMsg( "FileRead: " ) )
|
||||
ELSE
|
||||
WHILE oFile:MoreToRead()
|
||||
DO WHILE oFile:MoreToRead()
|
||||
OUTSTD( oFile:ReadLine() )
|
||||
OUTSTD( cNewLine )
|
||||
END WHILE
|
||||
ENDDO
|
||||
oFile:Close()
|
||||
END IF
|
||||
QUIT
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
test program for hb_f*()
|
||||
@@ -17,39 +17,41 @@ inplementation of :
|
||||
* hb_fgobottom()
|
||||
*/
|
||||
|
||||
function main()
|
||||
// open a text file here
|
||||
if hb_fuse( "testhbf.prg", 0 ) > 1
|
||||
while !hb_feof()
|
||||
qout( "line " + str(hb_frecno(),2) + " " + hb_freadln() )
|
||||
hb_fskip(1)
|
||||
end
|
||||
qout("")
|
||||
my_goto(18)
|
||||
my_goto(2)
|
||||
PROCEDURE Main()
|
||||
|
||||
hb_fgobottom()
|
||||
qout("")
|
||||
qout( "after hb_fgobottom() now in line # " + ltrim(str(hb_frecno())) )
|
||||
// open a text file here
|
||||
IF hb_fuse( "testhbf.prg", 0 ) > 1
|
||||
|
||||
hb_fgotop()
|
||||
qout("")
|
||||
qout( "after hb_fgotop() now in line # " + ltrim(str(hb_frecno())) )
|
||||
DO WHILE ! hb_feof()
|
||||
qout( "line " + str( hb_frecno(), 2 ) + " " + hb_freadln() )
|
||||
hb_fskip( 1 )
|
||||
ENDDO
|
||||
qout( "" )
|
||||
my_goto( 18 )
|
||||
my_goto( 2 )
|
||||
|
||||
qout("")
|
||||
qout( "hb_flastrec() = " + ltrim(str(hb_flastrec())) )
|
||||
hb_fgobottom()
|
||||
qout( "" )
|
||||
qout( "after hb_fgobottom() now in line # " + hb_ntos( hb_frecno() ) )
|
||||
|
||||
// close the file
|
||||
hb_fuse()
|
||||
hb_fgotop()
|
||||
qout( "" )
|
||||
qout( "after hb_fgotop() now in line # " + hb_ntos( hb_frecno() ) )
|
||||
|
||||
end
|
||||
return nil
|
||||
qout( "" )
|
||||
qout( "hb_flastrec() = " + hb_ntos( hb_flastrec() ) )
|
||||
|
||||
static function my_goto( n_go )
|
||||
// close the file
|
||||
hb_fuse()
|
||||
ENDIF
|
||||
|
||||
hb_fgoto( n_go )
|
||||
qout("")
|
||||
qout( "after hb_fgoto("+ltrim(str(n_go))+")" )
|
||||
qout( "line "+ ltrim(str(hb_frecno())) + " is " + ltrim( hb_freadln() ) )
|
||||
RETURN
|
||||
|
||||
return nil
|
||||
STATIC PROCEDURE my_goto( n_go )
|
||||
|
||||
hb_fgoto( n_go )
|
||||
qout( "" )
|
||||
qout( "after hb_fgoto("+ hb_ntos( n_go ) + ")" )
|
||||
qout( "line "+ hb_ntos( hb_frecno() ) + " is " + ltrim( hb_freadln() ) )
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -37,10 +37,10 @@ FUNCTION hbnetiosrv_LoadCmds( bQuit, bShowInfo )
|
||||
- pausing server */
|
||||
|
||||
STATIC PROCEDURE cmdSysInfo()
|
||||
QQOut( "OS: " + OS(), hb_osNewLine() )
|
||||
QQOut( "Harbour: " + Version(), hb_osNewLine() )
|
||||
QQOut( "C Compiler: " + hb_Compiler(), hb_osNewLine() )
|
||||
QQOut( "Memory: " + hb_ntos( Memory( 0 ) ) + "KB", hb_osNewLine() )
|
||||
QQOut( "OS: " + OS(), hb_eol() )
|
||||
QQOut( "Harbour: " + Version(), hb_eol() )
|
||||
QQOut( "C Compiler: " + hb_Compiler(), hb_eol() )
|
||||
QQOut( "Memory: " + hb_ntos( Memory( 0 ) ) + "KB", hb_eol() )
|
||||
RETURN
|
||||
|
||||
STATIC PROCEDURE cmdHelp( hCommands )
|
||||
@@ -70,7 +70,7 @@ STATIC PROCEDURE cmdHelp( hCommands )
|
||||
m := MaxRow()
|
||||
|
||||
FOR EACH n IN aTexts
|
||||
QQOut( n, hb_osNewLine() )
|
||||
QQOut( n, hb_eol() )
|
||||
|
||||
IF ++c == m
|
||||
c := 0
|
||||
|
||||
@@ -134,7 +134,7 @@ PROCEDURE Main( ... )
|
||||
HB_Usage()
|
||||
RETURN
|
||||
OTHERWISE
|
||||
OutStd( "Warning: Unkown parameter ignored: " + cParam + hb_osNewLine() )
|
||||
OutStd( "Warning: Unkown parameter ignored: " + cParam + hb_eol() )
|
||||
ENDCASE
|
||||
NEXT
|
||||
|
||||
@@ -151,12 +151,12 @@ PROCEDURE Main( ... )
|
||||
cPassword := NIL
|
||||
|
||||
IF Empty( netiosrv[ _NETIOSRV_pListenSocket ] )
|
||||
OutStd( "Cannot start server." + hb_osNewLine() )
|
||||
OutStd( "Cannot start server." + hb_eol() )
|
||||
ELSE
|
||||
ShowConfig( netiosrv )
|
||||
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( "Type a command or '?' for help.", hb_osNewLine() )
|
||||
OutStd( hb_eol() )
|
||||
OutStd( "Type a command or '?' for help.", hb_eol() )
|
||||
|
||||
lQuit := .F.
|
||||
aHistory := { "quit" }
|
||||
@@ -203,7 +203,7 @@ PROCEDURE Main( ... )
|
||||
SetKey( K_INS, bKeyIns )
|
||||
SetKey( K_TAB, bKeyTab )
|
||||
|
||||
QQOut( hb_osNewLine() )
|
||||
QQOut( hb_eol() )
|
||||
|
||||
cCommand := AllTrim( cCommand )
|
||||
|
||||
@@ -226,15 +226,15 @@ PROCEDURE Main( ... )
|
||||
aCmd := hb_HValueAt( hCommands, nPos )
|
||||
Eval( aCmd[ 2 ], cCommand, netiosrv )
|
||||
ELSE
|
||||
QQOut( "Error: Unknown command '" + cCommand + "'.", hb_osNewLine() )
|
||||
QQOut( "Error: Unknown command '" + cCommand + "'.", hb_eol() )
|
||||
ENDIF
|
||||
ENDDO
|
||||
|
||||
netio_serverstop( netiosrv[ _NETIOSRV_pListenSocket ] )
|
||||
netiosrv[ _NETIOSRV_pListenSocket ] := NIL
|
||||
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( "Server stopped.", hb_osNewLine() )
|
||||
OutStd( hb_eol() )
|
||||
OutStd( "Server stopped.", hb_eol() )
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
@@ -281,41 +281,41 @@ STATIC PROCEDURE ManageCursor( cCommand )
|
||||
|
||||
STATIC PROCEDURE ShowConfig( netiosrv )
|
||||
|
||||
QQOut( "Listening on: " + netiosrv[ _NETIOSRV_cIFAddr ] + ":" + hb_ntos( netiosrv[ _NETIOSRV_nPort ] ), hb_osNewLine() )
|
||||
QQOut( "Root filesystem: " + netiosrv[ _NETIOSRV_cRootDir ], hb_osNewLine() )
|
||||
QQOut( "RPC support: " + iif( netiosrv[ _NETIOSRV_lRPC ], "enabled", "disabled" ), hb_osNewLine() )
|
||||
QQOut( "Encryption: " + iif( netiosrv[ _NETIOSRV_lEncryption ], "enabled", "disabled" ), hb_osNewLine() )
|
||||
QQOut( "RPC filter module: " + iif( Empty( netiosrv[ _NETIOSRV_cRPCFHRB ] ), iif( netiosrv[ _NETIOSRV_lRPC ], "not set (WARNING: unsafe open server)", "not set" ), netiosrv[ _NETIOSRV_cRPCFFileName ] ), hb_osNewLine() )
|
||||
QQOut( "Listening on: " + netiosrv[ _NETIOSRV_cIFAddr ] + ":" + hb_ntos( netiosrv[ _NETIOSRV_nPort ] ), hb_eol() )
|
||||
QQOut( "Root filesystem: " + netiosrv[ _NETIOSRV_cRootDir ], hb_eol() )
|
||||
QQOut( "RPC support: " + iif( netiosrv[ _NETIOSRV_lRPC ], "enabled", "disabled" ), hb_eol() )
|
||||
QQOut( "Encryption: " + iif( netiosrv[ _NETIOSRV_lEncryption ], "enabled", "disabled" ), hb_eol() )
|
||||
QQOut( "RPC filter module: " + iif( Empty( netiosrv[ _NETIOSRV_cRPCFHRB ] ), iif( netiosrv[ _NETIOSRV_lRPC ], "not set (WARNING: unsafe open server)", "not set" ), netiosrv[ _NETIOSRV_cRPCFFileName ] ), hb_eol() )
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC PROCEDURE HB_Logo()
|
||||
|
||||
OutStd( "Harbour NETIO Server " + HBRawVersion() + hb_osNewLine() +;
|
||||
"Copyright (c) 2009, Przemyslaw Czerpak" + hb_osNewLine() + ;
|
||||
"http://harbour-project.org/" + hb_osNewLine() +;
|
||||
hb_osNewLine() )
|
||||
OutStd( "Harbour NETIO Server " + HBRawVersion() + hb_eol() +;
|
||||
"Copyright (c) 2009, Przemyslaw Czerpak" + hb_eol() + ;
|
||||
"http://harbour-project.org/" + hb_eol() +;
|
||||
hb_eol() )
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC PROCEDURE HB_Usage()
|
||||
|
||||
OutStd( "Syntax:" , hb_osNewLine() )
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( " netiosrv [options]" , hb_osNewLine() )
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( "Options:" , hb_osNewLine() )
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( " -port=<port> accept incoming connections on IP port <port>" , hb_osNewLine() )
|
||||
OutStd( " -iface=<ipaddr> accept incoming connections on IPv4 interface <ipaddress>" , hb_osNewLine() )
|
||||
OutStd( " -rootdir=<rootdir> use <rootdir> as root directory for served file system" , hb_osNewLine() )
|
||||
OutStd( " -rpc accept RPC requests" , hb_osNewLine() )
|
||||
OutStd( " -rpc=<file.hrb> set RPC processor .hrb module to <file.hrb>" , hb_osNewLine() )
|
||||
OutStd( hb_StrFormat( " file.hrb needs to have an entry function named %1$s()", _RPC_FILTER ), hb_osNewLine() )
|
||||
OutStd( " -pass=<passwd> set server password" , hb_osNewLine() )
|
||||
OutStd( hb_osNewLine() )
|
||||
OutStd( " --version display version header only" , hb_osNewLine() )
|
||||
OutStd( " -help|--help this help" , hb_osNewLine() )
|
||||
OutStd( "Syntax:" , hb_eol() )
|
||||
OutStd( hb_eol() )
|
||||
OutStd( " netiosrv [options]" , hb_eol() )
|
||||
OutStd( hb_eol() )
|
||||
OutStd( "Options:" , hb_eol() )
|
||||
OutStd( hb_eol() )
|
||||
OutStd( " -port=<port> accept incoming connections on IP port <port>" , hb_eol() )
|
||||
OutStd( " -iface=<ipaddr> accept incoming connections on IPv4 interface <ipaddress>" , hb_eol() )
|
||||
OutStd( " -rootdir=<rootdir> use <rootdir> as root directory for served file system" , hb_eol() )
|
||||
OutStd( " -rpc accept RPC requests" , hb_eol() )
|
||||
OutStd( " -rpc=<file.hrb> set RPC processor .hrb module to <file.hrb>" , hb_eol() )
|
||||
OutStd( hb_StrFormat( " file.hrb needs to have an entry function named %1$s()", _RPC_FILTER ), hb_eol() )
|
||||
OutStd( " -pass=<passwd> set server password" , hb_eol() )
|
||||
OutStd( hb_eol() )
|
||||
OutStd( " --version display version header only" , hb_eol() )
|
||||
OutStd( " -help|--help this help" , hb_eol() )
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
|
||||
STATIC FUNCTION HBNETIOSRV_RPCMAIN( sFunc, ... )
|
||||
|
||||
OutStd( "DO", sFunc:name, "WITH", ..., hb_osNewLine() )
|
||||
OutStd( "DO", sFunc:name, "WITH", ..., hb_eol() )
|
||||
|
||||
RETURN sFunc:exec( ... )
|
||||
|
||||
@@ -159,7 +159,7 @@ PROCEDURE Main( ... )
|
||||
oServer:DeleteTable( cTable )
|
||||
IF oServer:NetErr()
|
||||
? oServer:ErrorMsg()
|
||||
FWrite( nHandle, "Error: " + oServer:ErrorMsg() + hb_osNewLine() )
|
||||
FWrite( nHandle, "Error: " + oServer:ErrorMsg() + hb_eol() )
|
||||
FClose( nHandle )
|
||||
QUIT
|
||||
ENDIF
|
||||
@@ -168,7 +168,7 @@ PROCEDURE Main( ... )
|
||||
|
||||
IF oServer:NetErr()
|
||||
? oServer:ErrorMsg()
|
||||
FWrite( nHandle, "Error: " + oServer:ErrorMsg() + hb_osNewLine() )
|
||||
FWrite( nHandle, "Error: " + oServer:ErrorMsg() + hb_eol() )
|
||||
FClose( nHandle )
|
||||
QUIT
|
||||
ENDIF
|
||||
@@ -178,7 +178,7 @@ PROCEDURE Main( ... )
|
||||
oServer:Execute( "truncate table " + cTable )
|
||||
IF oServer:NetErr()
|
||||
? oServer:ErrorMsg()
|
||||
FWrite( nHandle, "Error: " + oServer:ErrorMsg() + hb_osNewLine() )
|
||||
FWrite( nHandle, "Error: " + oServer:ErrorMsg() + hb_eol() )
|
||||
FClose( nHandle )
|
||||
QUIT
|
||||
ENDIF
|
||||
@@ -187,7 +187,7 @@ PROCEDURE Main( ... )
|
||||
oTable := oServer:Query( "SELECT * FROM " + cTable + " LIMIT 1" )
|
||||
IF oTable:NetErr()
|
||||
Alert( oTable:ErrorMsg() )
|
||||
FWrite( nHandle, "Error: " + oTable:ErrorMsg() + hb_osNewLine() )
|
||||
FWrite( nHandle, "Error: " + oTable:ErrorMsg() + hb_eol() )
|
||||
FClose( nHandle )
|
||||
QUIT
|
||||
ENDIF
|
||||
@@ -196,7 +196,7 @@ PROCEDURE Main( ... )
|
||||
oServer:StartTransaction()
|
||||
ENDIF
|
||||
|
||||
FWrite( nHandle, "Start: " + Time() + hb_osNewLine() )
|
||||
FWrite( nHandle, "Start: " + Time() + hb_eol() )
|
||||
|
||||
? "Start: ", Time()
|
||||
?
|
||||
@@ -265,7 +265,7 @@ PROCEDURE Main( ... )
|
||||
?
|
||||
? "Error Record: ", RecNo(), Left( oTable:ErrorMsg(), 70 )
|
||||
?
|
||||
FWrite( nHandle, "Error at record: " + Str( RecNo() ) + " Description: " + oTable:ErrorMsg() + hb_osNewLine() )
|
||||
FWrite( nHandle, "Error at record: " + Str( RecNo() ) + " Description: " + oTable:ErrorMsg() + hb_eol() )
|
||||
ELSE
|
||||
nCount++
|
||||
ENDIF
|
||||
@@ -289,7 +289,7 @@ PROCEDURE Main( ... )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
FWrite( nHandle, "End: " + Time() + ", records in dbf: " + hb_ntos( RecNo() ) + ", imported recs: " + hb_ntos( nCount ) + hb_osNewLine() )
|
||||
FWrite( nHandle, "End: " + Time() + ", records in dbf: " + hb_ntos( RecNo() ) + ", imported recs: " + hb_ntos( nCount ) + hb_eol() )
|
||||
|
||||
? "End: ", Time()
|
||||
?
|
||||
|
||||
@@ -56,8 +56,6 @@
|
||||
|
||||
#define _EOL chr( 10 )
|
||||
|
||||
STATIC s_NewLine
|
||||
STATIC s_PathSep
|
||||
STATIC isClassObject
|
||||
STATIC zWidget
|
||||
STATIC aCore := {}
|
||||
@@ -89,9 +87,6 @@ FUNCTION Main( ... )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
s_NewLine := hb_OsNewLine()
|
||||
s_PathSep := hb_OsPathSeparator()
|
||||
|
||||
DispLogo()
|
||||
|
||||
aParam := hb_AParams()
|
||||
@@ -106,7 +101,7 @@ FUNCTION Main( ... )
|
||||
IF empty( cExt ) .or. !( lower( cExt ) == ".qtp" )
|
||||
cExt := ".qtp"
|
||||
ENDIF
|
||||
x := iif( empty( cPath ), "", cPath + s_PathSep )+ cFile + cExt
|
||||
x := iif( empty( cPath ), "", cPath + hb_ps() )+ cFile + cExt
|
||||
aadd( aPrjFiles, x )
|
||||
|
||||
CASE right( cLParam,4 ) == ".qtp"
|
||||
@@ -157,13 +152,13 @@ FUNCTION Main( ... )
|
||||
IF empty( cPathDoc )
|
||||
cPathDoc := hb_dirBase()
|
||||
ENDIF
|
||||
IF Right( cPathOut, 1 ) == s_PathSep
|
||||
IF Right( cPathOut, 1 ) == hb_ps()
|
||||
cPathOut := hb_StrShrink( cPathOut, 1 )
|
||||
ENDIF
|
||||
IF Right( cPathIn, 1 ) == s_PathSep
|
||||
IF Right( cPathIn, 1 ) == hb_ps()
|
||||
cPathIn := hb_StrShrink( cPathIn, 1 )
|
||||
ENDIF
|
||||
IF Right( cPathDoc, 1 ) == s_PathSep
|
||||
IF Right( cPathDoc, 1 ) == hb_ps()
|
||||
cPathDoc := hb_StrShrink( cPathDoc, 1 )
|
||||
ENDIF
|
||||
|
||||
@@ -191,7 +186,7 @@ STATIC FUNCTION ManageProject( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
hb_fNameSplit( cProFile, @cPath, @cFile, @cExt )
|
||||
|
||||
IF empty( cPath )
|
||||
cFile := cPathIn + s_PathSep + cProFile
|
||||
cFile := cPathIn + hb_ps() + cProFile
|
||||
ELSE
|
||||
cFile := cProFile
|
||||
ENDIF
|
||||
@@ -208,7 +203,7 @@ STATIC FUNCTION ManageProject( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
cpp_:={}
|
||||
prg_:={}
|
||||
|
||||
OutStd( "Processing: " + cFile + s_NewLine )
|
||||
OutStd( "Processing: " + cFile + hb_eol() )
|
||||
|
||||
cPrj := memoread( cFile )
|
||||
|
||||
@@ -220,14 +215,14 @@ STATIC FUNCTION ManageProject( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
/* We must have a matching pair */
|
||||
nn := at( "*/", cPrj )
|
||||
IF nn == 0
|
||||
OutStd( "Project file has unbalanced comment section..." + s_NewLine )
|
||||
OutStd( "Project file has unbalanced comment section..." + hb_eol() )
|
||||
RETURN nil
|
||||
ENDIF
|
||||
cPrj := substr( cPrj, 1, n-1 ) + substr( cPrj, nn+2 )
|
||||
ENDDO
|
||||
|
||||
/* Prepare to be parsed properly */
|
||||
cPrj := strtran( cPrj, s_NewLine, _EOL )
|
||||
cPrj := strtran( cPrj, hb_eol(), _EOL )
|
||||
cPrj := strtran( cPrj, chr( 13 )+chr( 10 ), _EOL )
|
||||
cPrj := strtran( cPrj, chr( 13 ), _EOL )
|
||||
|
||||
@@ -335,28 +330,28 @@ STATIC FUNCTION GenSource( cProFile, cPathIn, cPathOut, cPathDoc )
|
||||
zWidget := cWidget
|
||||
|
||||
IF empty( cPath )
|
||||
cFile := cPathIn + s_PathSep + cProFile
|
||||
cFile := cPathIn + hb_ps() + cProFile
|
||||
ELSE
|
||||
cFile := cProFile
|
||||
ENDIF
|
||||
IF ! hb_fileExists( cFile )
|
||||
OutStd( "Cannot find: " + cFile + s_NewLine )
|
||||
OutStd( "Cannot find: " + cFile + hb_eol() )
|
||||
RETURN { nil }
|
||||
ENDIF
|
||||
|
||||
cQth := memoread( cFile )
|
||||
IF empty( cQth )
|
||||
OutStd( "Cannot read: " + cFile + s_NewLine )
|
||||
OutStd( "Cannot read: " + cFile + hb_eol() )
|
||||
RETURN { nil }
|
||||
ENDIF
|
||||
|
||||
OutStd( "Processing: " + cFile + s_NewLine )
|
||||
OutStd( "Processing: " + cFile + hb_eol() )
|
||||
|
||||
/* Prepare to be parsed properly */
|
||||
IF ! hb_osNewLine() == _EOL
|
||||
cQth := StrTran( cQth, hb_osNewLine(), _EOL )
|
||||
IF ! hb_eol() == _EOL
|
||||
cQth := StrTran( cQth, hb_eol(), _EOL )
|
||||
ENDIF
|
||||
IF ! hb_osNewLine() == Chr( 13 ) + Chr( 10 )
|
||||
IF ! hb_eol() == Chr( 13 ) + Chr( 10 )
|
||||
cQth := StrTran( cQth, Chr( 13 ) + Chr( 10 ), _EOL )
|
||||
ENDIF
|
||||
|
||||
@@ -774,18 +769,18 @@ FUNCTION GetSourcePathByLib( cWidget, cPathOut, cExt, cPre, cls_ )
|
||||
DEFAULT cPre TO ""
|
||||
|
||||
IF ( n := ascan( cls_, {|e_| lower( e_[ 1 ] ) == "folder" .AND. !empty( e_[ 2 ] ) } ) ) > 0
|
||||
cFileOut := iif( empty( cPathOut ), "", cPathOut + s_PathSep + cls_[ n,2 ] + s_pathSep ) + cPre + cWidget + cExt
|
||||
cFileOut := iif( empty( cPathOut ), "", cPathOut + hb_ps() + cls_[ n,2 ] + hb_ps() ) + cPre + cWidget + cExt
|
||||
ELSE
|
||||
IF ascan( aGui, cWidget ) > 0
|
||||
cFileOut := cPathOut + s_PathSep + "qtgui" + s_pathSep + cPre + cWidget + cExt
|
||||
cFileOut := cPathOut + hb_ps() + "qtgui" + hb_ps() + cPre + cWidget + cExt
|
||||
ELSEIF ascan( aCore, cWidget ) > 0
|
||||
cFileOut := cPathOut + s_PathSep + "qtcore" + s_pathSep + cPre + cWidget + cExt
|
||||
cFileOut := cPathOut + hb_ps() + "qtcore" + hb_ps() + cPre + cWidget + cExt
|
||||
ELSEIF ascan( aWebkit, cWidget ) > 0
|
||||
cFileOut := cPathOut + s_PathSep + "qtwebkit" + s_pathSep + cPre + cWidget + cExt
|
||||
cFileOut := cPathOut + hb_ps() + "qtwebkit" + hb_ps() + cPre + cWidget + cExt
|
||||
ELSEIF ascan( aNetwork, cWidget ) > 0
|
||||
cFileOut := cPathOut + s_PathSep + "qtnetwork" + s_pathSep + cPre + cWidget + cExt
|
||||
cFileOut := cPathOut + hb_ps() + "qtnetwork" + hb_ps() + cPre + cWidget + cExt
|
||||
ELSE
|
||||
cFileOut := cPathOut + s_PathSep + cPre + cWidget + cExt
|
||||
cFileOut := cPathOut + hb_ps() + cPre + cWidget + cExt
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -1253,7 +1248,7 @@ STATIC FUNCTION ParseProto( cProto, cWidget, txt_, doc_, aEnum, func_, lList, fB
|
||||
cPrgRet := "p" + cDocNM
|
||||
|
||||
ELSE
|
||||
OutStd( "<<< " + cProto + " | " + aA[ PRT_CAST ] + " >>>" + s_NewLine )
|
||||
OutStd( "<<< " + cProto + " | " + aA[ PRT_CAST ] + " >>>" + hb_eol() )
|
||||
cCmd := ""
|
||||
cPrgRet := ""
|
||||
|
||||
@@ -1437,7 +1432,7 @@ STATIC FUNCTION ParseVariables( cProto, cWidget, txt_, doc_, aEnum, func_ )
|
||||
cPrgRet := "p" + cDocNM
|
||||
|
||||
ELSE
|
||||
OutStd( "<<< " + cProto + " | " + aA[ PRT_CAST ] + " >>>" + s_NewLine )
|
||||
OutStd( "<<< " + cProto + " | " + aA[ PRT_CAST ] + " >>>" + hb_eol() )
|
||||
cCmd := ""
|
||||
cPrgRet := ""
|
||||
|
||||
@@ -1595,19 +1590,19 @@ STATIC FUNCTION BuildFooter( txt_ )
|
||||
STATIC FUNCTION DispHelp()
|
||||
LOCAL cHlp := ""
|
||||
|
||||
cHlp += "" + s_NewLine
|
||||
cHlp += "Syntax:" + s_NewLine
|
||||
cHlp += " hbqtgen.exe [Options] [[@]<QtProjectFile.qtp>] [<QtHeaderFile.qth, ...>]" + s_NewLine
|
||||
cHlp += "" + s_NewLine
|
||||
cHlp += "Options:" + s_NewLine
|
||||
cHlp += " -O<OutputPath> [ e.g. c:\harbour\contrib\hbqt ] [D] Current folder" + s_NewLine
|
||||
cHlp += " -I<InputPath> [ e.g. c:\harbour\contrib\hbqt\protos ] [D] Current folder" + s_NewLine
|
||||
cHlp += " -D<DocFilesPath> [ e.g. c:\harbour\contrib\hbqt\doc ] [D] Current folder" + s_NewLine
|
||||
cHlp += " " + s_NewLine
|
||||
cHlp += " -c<compile> If QT env is set, attempts to compile resulting .cpp" + s_NewLine
|
||||
cHlp += "" + s_NewLine
|
||||
cHlp += " -noretobject Skip object returning methods" + s_NewLine
|
||||
cHlp += "" + s_NewLine
|
||||
cHlp += "" + hb_eol()
|
||||
cHlp += "Syntax:" + hb_eol()
|
||||
cHlp += " hbqtgen.exe [Options] [[@]<QtProjectFile.qtp>] [<QtHeaderFile.qth, ...>]" + hb_eol()
|
||||
cHlp += "" + hb_eol()
|
||||
cHlp += "Options:" + hb_eol()
|
||||
cHlp += " -O<OutputPath> [ e.g. c:\harbour\contrib\hbqt ] [D] Current folder" + hb_eol()
|
||||
cHlp += " -I<InputPath> [ e.g. c:\harbour\contrib\hbqt\protos ] [D] Current folder" + hb_eol()
|
||||
cHlp += " -D<DocFilesPath> [ e.g. c:\harbour\contrib\hbqt\doc ] [D] Current folder" + hb_eol()
|
||||
cHlp += " " + hb_eol()
|
||||
cHlp += " -c<compile> If QT env is set, attempts to compile resulting .cpp" + hb_eol()
|
||||
cHlp += "" + hb_eol()
|
||||
cHlp += " -noretobject Skip object returning methods" + hb_eol()
|
||||
cHlp += "" + hb_eol()
|
||||
|
||||
OutStd( cHlp )
|
||||
|
||||
@@ -1618,11 +1613,11 @@ STATIC FUNCTION DispHelp()
|
||||
STATIC FUNCTION DispLogo()
|
||||
LOCAL cHlp := ""
|
||||
|
||||
cHlp += "" + s_NewLine
|
||||
cHlp += "Harbour Source Generator for QT " + HBRawVersion() + s_NewLine
|
||||
cHlp += "Copyright (c) 2009, Pritpal Bedi <pritpal@vouchcac.com>" + s_NewLine
|
||||
cHlp += "http://harbour-project.org/" + s_NewLine
|
||||
cHlp += "" + s_NewLine
|
||||
cHlp += "" + hb_eol()
|
||||
cHlp += "Harbour Source Generator for QT " + HBRawVersion() + hb_eol()
|
||||
cHlp += "Copyright (c) 2009, Pritpal Bedi <pritpal@vouchcac.com>" + hb_eol()
|
||||
cHlp += "http://harbour-project.org/" + hb_eol()
|
||||
cHlp += "" + hb_eol()
|
||||
|
||||
OutStd( cHlp )
|
||||
|
||||
@@ -1638,12 +1633,12 @@ STATIC FUNCTION HBRawVersion()
|
||||
STATIC FUNCTION CreateTarget( cFile, txt_ )
|
||||
LOCAL cContent := ""
|
||||
|
||||
AEval( txt_, { |e| cContent += RTrim( e ) + hb_osNewLine() } )
|
||||
AEval( txt_, { |e| cContent += RTrim( e ) + hb_eol() } )
|
||||
|
||||
/* Save it only if it has changed. */
|
||||
IF !( hb_MemoRead( cFile ) == cContent )
|
||||
|
||||
OutStd( "Creating: " + cFile + hb_osNewLine() )
|
||||
OutStd( "Creating: " + cFile + hb_eol() )
|
||||
|
||||
hb_MemoWrit( cFile, cContent )
|
||||
ENDIF
|
||||
@@ -1857,14 +1852,14 @@ STATIC FUNCTION Build_Document( cWidget, cls_, doc_, cPathDoc, subCls_, docum_ )
|
||||
aadd( txt_, " $END$ " )
|
||||
aadd( txt_, " */ " )
|
||||
|
||||
cFile := cPathDoc + s_PathSep + "en" + s_PathSep + "class_" + lower( cWidget ) + ".txt"
|
||||
cFile := cPathDoc + hb_ps() + "en" + hb_ps() + "class_" + lower( cWidget ) + ".txt"
|
||||
|
||||
RETURN CreateTarget( cFile, txt_ )
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
STATIC FUNCTION Build_GarbageFile( cpp_, cPathOut )
|
||||
LOCAL cFile := iif( empty( cPathOut ), "", cPathOut + s_PathSep ) + "hbqt_garbage.h"
|
||||
LOCAL cFile := iif( empty( cPathOut ), "", cPathOut + hb_ps() ) + "hbqt_garbage.h"
|
||||
LOCAL txt_ := {}
|
||||
LOCAL s
|
||||
|
||||
@@ -1940,7 +1935,7 @@ STATIC FUNCTION Build_MakeFile( cpp_, prg_, cPathOut )
|
||||
aadd( hbm_, + "T" + s + ".prg" )
|
||||
NEXT
|
||||
//
|
||||
cFile := iif( empty( cPathOut ), "", cPathOut + s_PathSep + aSubs[ i, 1 ] + s_PathSep )
|
||||
cFile := iif( empty( cPathOut ), "", cPathOut + hb_ps() + aSubs[ i, 1 ] + hb_ps() )
|
||||
CreateTarget( cFile + "filelist.hbm", hbm_ )
|
||||
NEXT
|
||||
|
||||
@@ -1951,7 +1946,7 @@ STATIC FUNCTION Build_MakeFile( cpp_, prg_, cPathOut )
|
||||
#define CRLF chr( 13 )+chr( 10 )
|
||||
|
||||
FUNCTION Build_HTML( cWidget, aHM_, aHF_, cPathOut, docum_ )
|
||||
LOCAL cFile := cPathOut + s_PathSep + "html" + s_PathSep + cWidget + ".htm"
|
||||
LOCAL cFile := cPathOut + hb_ps() + "html" + hb_ps() + cWidget + ".htm"
|
||||
LOCAL i, j, s, nCounter := 0, cPara
|
||||
LOCAL nCols, aHTML
|
||||
LOCAL setColorBG, setColorText, setColorTable
|
||||
|
||||
@@ -36,17 +36,17 @@ PROCEDURE Main()
|
||||
ProcessHeader( aStuff, cHeaderDir + hb_osPathSeparator() + tmp1, cName, tmp1 )
|
||||
// ASort( aStuff[ 2 ],,, {| x, y | x[ 1 ] < y[ 1 ] } )
|
||||
// FOR EACH tmp2 IN aStuff[ 2 ]
|
||||
// OutStd( aType[ tmp2[ 1 ] ], tmp2[ 2 ], hb_osNewLine() )
|
||||
// OutStd( aType[ tmp2[ 1 ] ], tmp2[ 2 ], hb_eol() )
|
||||
// NEXT
|
||||
IF Len( aStuff[ 1 ] ) >= 2
|
||||
cFile := ""
|
||||
cFile += hb_osNewLine()
|
||||
cFile += "<CLASS>" + hb_osNewLine()
|
||||
cFile += "QObject = " + iif( aStuff[ 1 ][ 1 ], "yes", "no" ) + hb_osNewLine()
|
||||
cFile += "Inherit = " + aStuff[ 1 ][ 2 ] + hb_osNewLine()
|
||||
cFile += "Type = " + cName + hb_osNewLine()
|
||||
cFile += "New = " + "" + hb_osNewLine()
|
||||
cFile += "</CLASS>" + hb_osNewLine()
|
||||
cFile += hb_eol()
|
||||
cFile += "<CLASS>" + hb_eol()
|
||||
cFile += "QObject = " + iif( aStuff[ 1 ][ 1 ], "yes", "no" ) + hb_eol()
|
||||
cFile += "Inherit = " + aStuff[ 1 ][ 2 ] + hb_eol()
|
||||
cFile += "Type = " + cName + hb_eol()
|
||||
cFile += "New = " + "" + hb_eol()
|
||||
cFile += "</CLASS>" + hb_eol()
|
||||
DumpToQTH( @cFile, aStuff, QM_ENUM )
|
||||
DumpToQTH( @cFile, aStuff, QM_METHOD )
|
||||
DumpToQTH( @cFile, aStuff, QM_SLOT )
|
||||
@@ -68,14 +68,14 @@ STATIC PROCEDURE DumpToQTH( cFile, aStuff, nType )
|
||||
"SLOT" ,;
|
||||
"SIGNAL" }
|
||||
|
||||
cFile += hb_osNewLine()
|
||||
cFile += "<" + aType[ nType ] + ">" + hb_osNewLine()
|
||||
cFile += hb_eol()
|
||||
cFile += "<" + aType[ nType ] + ">" + hb_eol()
|
||||
FOR EACH tmp IN aStuff[ 2 ]
|
||||
IF tmp[ 1 ] == nType
|
||||
cFile += tmp[ 2 ] + hb_osNewLine()
|
||||
cFile += tmp[ 2 ] + hb_eol()
|
||||
ENDIF
|
||||
NEXT
|
||||
cFile += "</" + aType[ nType ] + ">" + hb_osNewLine()
|
||||
cFile += "</" + aType[ nType ] + ">" + hb_eol()
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -87,7 +87,7 @@ STATIC PROCEDURE ProcessHeader( aStuff, cFileName, cLib, cOriFileName )
|
||||
LOCAL cHeader
|
||||
LOCAL cDir
|
||||
|
||||
OutStd( "Loading:", cFileName, hb_osNewLine() )
|
||||
OutStd( "Loading:", cFileName, hb_eol() )
|
||||
|
||||
nPos := 1
|
||||
IF ( tmp := hb_At( '#include "', cFile, nPos ) ) > 0
|
||||
|
||||
@@ -120,7 +120,7 @@ STATIC FUNCTION DefError( oError )
|
||||
#if 0
|
||||
DO WHILE nChoice == 0
|
||||
|
||||
IF ISNIL( cDOSError )
|
||||
IF cDOSError == NIL
|
||||
nChoice := Alert( cMessage, aOptions )
|
||||
ELSE
|
||||
nChoice := Alert( cMessage + ";" + cDOSError, aOptions )
|
||||
@@ -130,29 +130,29 @@ STATIC FUNCTION DefError( oError )
|
||||
#endif
|
||||
|
||||
IF ! Empty( nChoice )
|
||||
DO CASE
|
||||
CASE aOptions[ nChoice ] == "Break"
|
||||
SWITCH aOptions[ nChoice ]
|
||||
CASE "Break"
|
||||
Break( oError )
|
||||
CASE aOptions[ nChoice ] == "Retry"
|
||||
CASE "Retry"
|
||||
RETURN .T.
|
||||
CASE aOptions[ nChoice ] == "Default"
|
||||
CASE "Default"
|
||||
RETURN .F.
|
||||
ENDCASE
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
|
||||
// "Quit" selected
|
||||
|
||||
IF ! ISNIL( cDOSError )
|
||||
IF cDOSError != NIL
|
||||
cMessage += " " + cDOSError
|
||||
ENDIF
|
||||
|
||||
aadd( aMsg, hb_OSNewLine() )
|
||||
aadd( aMsg, hb_eol() )
|
||||
aadd( aMsg, cMessage )
|
||||
|
||||
n := 1
|
||||
DO WHILE ! Empty( ProcName( ++n ) )
|
||||
|
||||
aadd( aMsg, hb_OSNewLine() )
|
||||
aadd( aMsg, hb_eol() )
|
||||
aadd( aMsg, "Called from " + ProcName( n ) + ;
|
||||
"(" + hb_NToS( ProcLine( n ) ) + ") " )
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@ PROCEDURE Main()
|
||||
LOCAL bio
|
||||
|
||||
? bio := BIO_new_fd( 1, HB_BIO_NOCLOSE )
|
||||
? "BIO_WRITE", BIO_write( bio, "Hello world!" + hb_osNewLine() )
|
||||
? "BIO_WRITE", BIO_write( bio, "Hello world!" + hb_eol() )
|
||||
? "BIO_FLUSH", BIO_flush( bio )
|
||||
? "BIO_FREE", BIO_free( bio )
|
||||
|
||||
? bio := BIO_new_file( "bio_test.txt", "a+" )
|
||||
? "BIO_WRITE", BIO_write( bio, "Hello world!" + hb_osNewLine() )
|
||||
? "BIO_WRITE", BIO_write( bio, "Hello world!" + hb_eol() )
|
||||
? "BIO_FLUSH", BIO_flush( bio )
|
||||
? "BIO_FREE", BIO_free( bio )
|
||||
|
||||
|
||||
@@ -21,11 +21,11 @@ PROCEDURE Main()
|
||||
|
||||
bioe := BIO_new_fd( 1, HB_BIO_NOCLOSE )
|
||||
|
||||
? PEM_READ_BIO_RSAPRIVATEKEY( "privkey.pem", {| lWrite | QOut( "Callback", lWrite, hb_osNewLine() ), "test" } )
|
||||
? PEM_READ_BIO_RSAPRIVATEKEY( "privkey.pem", {| lWrite | QOut( "Callback", lWrite, hb_eol() ), "test" } )
|
||||
? ; ERR_print_errors( bioe )
|
||||
? PEM_READ_BIO_RSAPRIVATEKEY( "privkey.pem", "test" )
|
||||
? ; ERR_print_errors( bioe )
|
||||
? PEM_READ_BIO_RSAPUBLICKEY( "privkey.pem", {| lWrite | QOut( "Callback", lWrite, hb_osNewLine() ), "test" } )
|
||||
? PEM_READ_BIO_RSAPUBLICKEY( "privkey.pem", {| lWrite | QOut( "Callback", lWrite, hb_eol() ), "test" } )
|
||||
? ; ERR_print_errors( bioe )
|
||||
? PEM_READ_BIO_RSAPUBLICKEY( "privkey.pem", "test" )
|
||||
? ; ERR_print_errors( bioe )
|
||||
@@ -51,7 +51,7 @@ B0NDIZKbaPJHHPb9Ne7nQECzv0/kzmAley9UMTZ1M7fq6KYemR0LsA==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
ENDTEXT
|
||||
|
||||
? PEM_READ_BIO_RSAPRIVATEKEY( bio := BIO_new_mem_buf( cString ), {| lWrite | QOut( "Callback", lWrite, hb_osNewLine() ), "test" } )
|
||||
? PEM_READ_BIO_RSAPRIVATEKEY( bio := BIO_new_mem_buf( cString ), {| lWrite | QOut( "Callback", lWrite, hb_eol() ), "test" } )
|
||||
? ; ERR_print_errors( bioe )
|
||||
BIO_free( bio )
|
||||
? PEM_READ_BIO_RSAPRIVATEKEY( bio := BIO_new_mem_buf( cString ), "test" )
|
||||
|
||||
@@ -802,9 +802,9 @@ METHOD Log( ... ) CLASS tIPClient
|
||||
cMsg += iif( xVar:__enumIndex() < PCount() - 1, ", ", "" )
|
||||
|
||||
IF xVar:__enumIndex() == PCount() - 1
|
||||
cMsg += " )" + hb_osNewLine() + ">> "
|
||||
cMsg += " )" + hb_eol() + ">> "
|
||||
ELSEIF xVar:__enumIndex() == PCount()
|
||||
cMsg += " <<" + hb_osNewLine() + hb_osNewLine()
|
||||
cMsg += " <<" + hb_eol() + hb_eol()
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
|
||||
@@ -134,12 +134,12 @@ ENDCLASS
|
||||
METHOD new( cHtmlString ) CLASS THtmlDocument
|
||||
LOCAL cEmptyHtmlDoc, oNode, oSubNode, oErrNode, aHead, aBody, nMode := 0
|
||||
|
||||
cEmptyHtmlDoc := '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' + hb_osNewLine() +;
|
||||
'<html>' + hb_osNewLine() +;
|
||||
' <head>' + hb_osNewLine() +;
|
||||
' </head>' + hb_osNewLine() +;
|
||||
' <body>' + hb_osNewLine() +;
|
||||
' </body>' + hb_osNewLine() +;
|
||||
cEmptyHtmlDoc := '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">' + hb_eol() +;
|
||||
'<html>' + hb_eol() +;
|
||||
' <head>' + hb_eol() +;
|
||||
' </head>' + hb_eol() +;
|
||||
' <body>' + hb_eol() +;
|
||||
' </body>' + hb_eol() +;
|
||||
'</html>'
|
||||
|
||||
IF ! ISCHARACTER( cHtmlString )
|
||||
@@ -1034,7 +1034,7 @@ METHOD toString( nIndent ) CLASS THtmlNode
|
||||
IF ! ::isInline() .OR. ::htmlTagName == "!--"
|
||||
cHtml += cIndent
|
||||
ELSEIF ::keepFormatting()
|
||||
cHtml += hb_osNewLine()
|
||||
cHtml += hb_eol()
|
||||
ENDIF
|
||||
cHtml += "<" + ::htmlTagName + ::attrToString()
|
||||
|
||||
@@ -1047,7 +1047,7 @@ METHOD toString( nIndent ) CLASS THtmlNode
|
||||
|
||||
FOR EACH oNode IN ::htmlContent
|
||||
IF ! oNode:isInline() .OR. oNode:htmlTagName == "!--"
|
||||
cHtml += hb_osNewLine()
|
||||
cHtml += hb_eol()
|
||||
ENDIF
|
||||
cHtml += oNode:toString( nIndent + 1 )
|
||||
NEXT
|
||||
@@ -1060,12 +1060,12 @@ METHOD toString( nIndent ) CLASS THtmlNode
|
||||
IF ::isInline() .OR. ::keepFormatting() .OR. ::isType( CM_HEADING ) .OR. ::isType( CM_HEAD )
|
||||
RETURN cHtml += iif( ::htmlEndTagName == "/", " />", "<" + ::htmlEndTagName + ">" )
|
||||
ENDIF
|
||||
IF !( Right( cHtml, Len( hb_osNewLine() ) ) == hb_osNewLine() )
|
||||
cHtml += hb_osNewLine()
|
||||
IF !( Right( cHtml, Len( hb_eol() ) ) == hb_eol() )
|
||||
cHtml += hb_eol()
|
||||
ENDIF
|
||||
RETURN cHtml += cIndent + iif( ::htmlEndTagName == "/", " />", "<" + ::htmlEndTagName + ">" )
|
||||
ELSEIF ::htmlTagName $ "!--,br"
|
||||
RETURN cHtml += hb_osNewLine() + cIndent
|
||||
RETURN cHtml += hb_eol() + cIndent
|
||||
ENDIF
|
||||
|
||||
RETURN cHtml
|
||||
@@ -1144,8 +1144,8 @@ METHOD getText( cEOL ) CLASS THtmlNode
|
||||
LOCAL cText := ""
|
||||
LOCAL oNode
|
||||
|
||||
IF cEOL == NIL
|
||||
cEOL := hb_osNewLine()
|
||||
IF ! ISCHARACTER( cEOL )
|
||||
cEOL := hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ::htmlTagName == "_text_"
|
||||
|
||||
@@ -163,7 +163,7 @@ STATIC PROCEDURE Exm_MSWord()
|
||||
|
||||
oText := oWord:Selection()
|
||||
|
||||
oText:Text := "OLE from Harbour" + hb_OSNewLine()
|
||||
oText:Text := "OLE from Harbour" + hb_eol()
|
||||
oText:Font:Name := "Arial"
|
||||
oText:Font:Size := 48
|
||||
oText:Font:Bold := .T.
|
||||
@@ -437,7 +437,7 @@ STATIC PROCEDURE Exm_ADODB()
|
||||
|
||||
STATIC PROCEDURE Exm_SOAP()
|
||||
LOCAL oSoapClient
|
||||
|
||||
|
||||
IF ! Empty( oSoapClient := win_oleCreateObject( "MSSOAP.SoapClient30" ) )
|
||||
|
||||
oSoapClient:msSoapInit( "http://www.dataaccess.com/webservicesserver/textcasing.wso?WSDL" )
|
||||
@@ -461,7 +461,7 @@ STATIC PROCEDURE Exm_PocketSOAP()
|
||||
oEnvelope:Parameters:Create( "sAString", "lower UPPER" )
|
||||
oHttp:Send( "http://www.dataaccess.com/webservicesserver/textcasing.wso?WSDL", oEnvelope:Serialize() )
|
||||
oEnvelope:Parse( oHttp )
|
||||
|
||||
|
||||
? oEnvelope:Parameters:Item( 0 ):Value
|
||||
ELSE
|
||||
? "Error: PocketSOAP not available.", win_oleErrorText()
|
||||
|
||||
@@ -39,20 +39,20 @@ PROCEDURE Main()
|
||||
ENDIF
|
||||
|
||||
a := o:aGetAllPhoneBookEntries()
|
||||
Aeval(a, {| n, m | Alert("Phone: "+n[1]+hb_osNewLine()+"Name: "+n[2]+hb_osNewLine()+"Adr. Type: "+STR( n[3])+hb_osNewLine()+"Plan Type: "+STR( n[4])) })
|
||||
Aeval(a, {| n, m | Alert("Phone: "+n[1]+hb_eol()+"Name: "+n[2]+hb_eol()+"Adr. Type: "+STR( n[3])+hb_eol()+"Plan Type: "+STR( n[4])) })
|
||||
*/
|
||||
|
||||
IF !o:lGetSimPhoneEntry( 1, SIM_PBSTORAGE_SIM, @a )
|
||||
Alert("Pos 1 error")
|
||||
ELSE
|
||||
Alert("VALTYPE-> "+VALTYPE(a)+" LEN -> "+STR(LEN(a)),a[1][1])
|
||||
Aeval(a, {| n, m | Alert("Phone: "+n[1]+hb_osNewLine()+"Name: "+n[2]+hb_osNewLine()+"Adr. Type: "+STR( n[3])+hb_osNewLine()+"Plan Type: "+STR( n[4]),"pos 1") })
|
||||
Aeval(a, {| n, m | Alert("Phone: "+n[1]+hb_eol()+"Name: "+n[2]+hb_eol()+"Adr. Type: "+STR( n[3])+hb_eol()+"Plan Type: "+STR( n[4]),"pos 1") })
|
||||
ENDIF
|
||||
|
||||
IF !o:lGetSimPhoneEntry( 110, SIM_PBSTORAGE_SIM, @a )
|
||||
Alert("Pos 123 error")
|
||||
ELSE
|
||||
Aeval(a, {| n, m | Alert("Phone: "+n[1]+hb_osNewLine()+"Name: "+n[2]+hb_osNewLine()+"Adr. Type: "+STR( n[3])+hb_osNewLine()+"Plan Type: "+STR( n[4]),"pos 110") })
|
||||
Aeval(a, {| n, m | Alert("Phone: "+n[1]+hb_eol()+"Name: "+n[2]+hb_eol()+"Adr. Type: "+STR( n[3])+hb_eol()+"Plan Type: "+STR( n[4]),"pos 110") })
|
||||
ENDIF
|
||||
|
||||
IF !o:lSetSimPhoneEntry( 80, SIM_PBSTORAGE_SIM, "660099696", "pepeluis", SIM_NUMPLAN_UNKNOWN, SIM_ADDRTYPE_NATIONAL )
|
||||
|
||||
@@ -99,18 +99,18 @@ PROCEDURE SrvMain()
|
||||
LOCAL fhnd := hb_FCreate( hb_dirBase() + "testsvc.out", FC_NORMAL, FO_DENYNONE + FO_WRITE )
|
||||
LOCAL cParam
|
||||
|
||||
FWrite( fhnd, "Startup" + hb_osNewLine() )
|
||||
FWrite( fhnd, "Startup" + hb_eol() )
|
||||
|
||||
FOR EACH cParam IN hb_AParams()
|
||||
FWrite( fhnd, "Parameter " + hb_ntos( cParam:__enumIndex() ) + " >" + cParam + "<" + hb_osNewLine() )
|
||||
FWrite( fhnd, "Parameter " + hb_ntos( cParam:__enumIndex() ) + " >" + cParam + "<" + hb_eol() )
|
||||
NEXT
|
||||
|
||||
DO WHILE win_serviceGetStatus() == WIN_SERVICE_RUNNING
|
||||
FWrite( fhnd, "Work in progress " + hb_ntos( ++n ) + hb_osNewLine() )
|
||||
FWrite( fhnd, "Work in progress " + hb_ntos( ++n ) + hb_eol() )
|
||||
hb_idleSleep( 0.5 )
|
||||
ENDDO
|
||||
|
||||
FWrite( fhnd, "Exiting..." + hb_osNewLine() )
|
||||
FWrite( fhnd, "Exiting..." + hb_eol() )
|
||||
FClose( fhnd )
|
||||
|
||||
win_serviceSetExitCode( 0 )
|
||||
|
||||
@@ -91,10 +91,10 @@
|
||||
/* TEXT INTO <varname> [WRAP [<cEOL>]] [TRIMMED] */
|
||||
#xcommand TEXT INTO <v> [<wrp:WRAP>] [<trm:TRIMMED>] => ;
|
||||
#pragma __text|<v>+=iif(<.trm.>,ltrim(%s),%s)+;
|
||||
iif(<.wrp.>,HB_OSNEWLINE(),"");<v>:=""
|
||||
iif(<.wrp.>,hb_eol(),"");<v>:=""
|
||||
#xcommand TEXT INTO <v> WRAP [<EOL>] [<trm:TRIMMED>] => ;
|
||||
#pragma __text|<v>+=iif(<.trm.>,ltrim(%s),%s)+;
|
||||
iif(<.EOL.>,<EOL>,HB_OSNEWLINE());<v>:=""
|
||||
iif(<.EOL.>,<EOL>,hb_eol());<v>:=""
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -70,8 +70,6 @@ STATIC s_hPackageList
|
||||
|
||||
PROCEDURE Main( ... )
|
||||
|
||||
SetCancel( .F. )
|
||||
|
||||
s_cBase := ""
|
||||
s_cHome := StrTran( hb_DirBase(), hb_ps(), "/" )
|
||||
s_cRoot := s_cHome + "../"
|
||||
|
||||
@@ -482,18 +482,18 @@ STATIC FUNCTION SayMembers( cPad, lShowMembers, lReturnString )
|
||||
//QOut( cPad + Replicate( "-", Len( SubStr( QSelf():ClassName, 13 ) ) ) )
|
||||
|
||||
cOut += cPad + SubStr( QSelf():ClassName, 13 )
|
||||
cOut += hb_OSNewLine() + cPad + Replicate( "-", Len( SubStr( QSelf():ClassName, 13 ) ) )
|
||||
cOut += hb_eol() + cPad + Replicate( "-", Len( SubStr( QSelf():ClassName, 13 ) ) )
|
||||
|
||||
FOR EACH xProperty IN QSelf():Array
|
||||
IF HB_IS_CStructure( xProperty )
|
||||
IF lReturnString
|
||||
cOut += hb_OSNewLine() + hb_OSNewLine() + xProperty:SayMembers( cPad + cPad, lShowMembers, lReturnString )
|
||||
cOut += hb_eol() + hb_eol() + xProperty:SayMembers( cPad + cPad, lShowMembers, lReturnString )
|
||||
ELSE
|
||||
xProperty:SayMembers( cPad + cPad, lShowMembers )
|
||||
ENDIF
|
||||
ELSE
|
||||
//QOut( cPad + IIF( lShowMembers, acMembers[ xProperty:__enumIndex() ], "" ) + ":", xProperty )
|
||||
cOut += hb_OSNewLine() + cPad + IIF( lShowMembers, QSelf():acMembers[ xProperty:__enumIndex() ], "" ) + ":" + hb_cStr( xProperty )
|
||||
cOut += hb_eol() + cPad + IIF( lShowMembers, QSelf():acMembers[ xProperty:__enumIndex() ], "" ) + ":" + hb_cStr( xProperty )
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ PROCEDURE HB_ToLogFile( cLogFile, ... )
|
||||
IF nHandle != F_ERROR
|
||||
FSeek( nHandle, 0, FS_END )
|
||||
FWrite( nHandle, sprintf( ... ) )
|
||||
FWrite( nHandle, HB_OSNewLine() )
|
||||
FWrite( nHandle, hb_eol() )
|
||||
FClose( nHandle )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -54,8 +54,6 @@
|
||||
|
||||
#include "common.ch"
|
||||
|
||||
#define CRLF HB_OsNewLine()
|
||||
|
||||
/*
|
||||
* (C) 2003 - Francesco Saverio Giudice
|
||||
*
|
||||
@@ -111,41 +109,41 @@ STATIC FUNCTION __HB_DumpVar( xVar, lAssocAsObj, lRecursive, nIndent, nRecursion
|
||||
CASE cType == "O"
|
||||
|
||||
IF !lAssocAsObj .AND. xVar:ClassName == "TASSOCIATIVEARRAY"
|
||||
cString += Space( nIndent ) + "Type='Associative' -> " + CRLF
|
||||
cString += Space( nIndent ) + "Type='Associative' -> " + hb_eol()
|
||||
// Keys extraction.
|
||||
IF Len( xVar:Keys ) > 0
|
||||
nEolLen := Len( CRLF )
|
||||
cString += Space( nIndent ) + "{" + CRLF
|
||||
nEolLen := Len( hb_eol() )
|
||||
cString += Space( nIndent ) + "{" + hb_eol()
|
||||
FOR EACH cKey IN xVar:Keys
|
||||
cString += Space( nIndent ) + " '" + cKey + "' => " + asString( xVar:SendKey( cKey ) ) + ", " + CRLF
|
||||
cString += Space( nIndent ) + " '" + cKey + "' => " + asString( xVar:SendKey( cKey ) ) + ", " + hb_eol()
|
||||
IF lRecursive .AND. ValType( xVar:SendKey( cKey ) ) $ "AOH"
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + CRLF
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + hb_eol()
|
||||
cString += __HB_DumpVar( xVar:SendKey( cKey ),, lRecursive, nIndent+3, nRecursionLevel + 1, nMaxRecursionLevel )
|
||||
cString := SubStr( cString, 1, Len( cString )-nEolLen ) + ", " + CRLF
|
||||
cString := SubStr( cString, 1, Len( cString )-nEolLen ) + ", " + hb_eol()
|
||||
ENDIF
|
||||
NEXT
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + CRLF
|
||||
cString += Space( nIndent ) + "}" + CRLF
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + hb_eol()
|
||||
cString += Space( nIndent ) + "}" + hb_eol()
|
||||
ENDIF
|
||||
ELSE
|
||||
cString += Space( nIndent ) + "<" + xVar:ClassName + " Object>" + CRLF
|
||||
cString += Space( nIndent ) + " | " + CRLF
|
||||
cString += Space( nIndent ) + " +- PRIVATE/HIDDEN:" + CRLF
|
||||
cString += Space( nIndent ) + "<" + xVar:ClassName + " Object>" + hb_eol()
|
||||
cString += Space( nIndent ) + " | " + hb_eol()
|
||||
cString += Space( nIndent ) + " +- PRIVATE/HIDDEN:" + hb_eol()
|
||||
cString += DShowProperties( xVar, HB_OO_CLSTP_HIDDEN, lRecursive, nIndent, nRecursionLevel, nMaxRecursionLevel )
|
||||
cString += Space( nIndent ) + " +- PROTECTED:" + CRLF
|
||||
cString += Space( nIndent ) + " +- PROTECTED:" + hb_eol()
|
||||
cString += DShowProperties( xVar, HB_OO_CLSTP_PROTECTED, lRecursive, nIndent, nRecursionLevel, nMaxRecursionLevel )
|
||||
cString += Space( nIndent ) + " +- EXPORTED/VISIBLE/PUBLIC:" + CRLF
|
||||
cString += Space( nIndent ) + " +- EXPORTED/VISIBLE/PUBLIC:" + hb_eol()
|
||||
cString += DShowProperties( xVar, HB_OO_CLSTP_EXPORTED, lRecursive, nIndent, nRecursionLevel, nMaxRecursionLevel )
|
||||
#ifdef __XHARBOUR__
|
||||
cString += Space( nIndent ) + " +- PUBLISHED:" + CRLF
|
||||
cString += Space( nIndent ) + " +- PUBLISHED:" + hb_eol()
|
||||
cString += DShowProperties( xVar, HB_OO_CLSTP_PUBLISHED, lRecursive, nIndent, nRecursionLevel, nMaxRecursionLevel )
|
||||
#endif
|
||||
cString += Space( nIndent ) + " +----------->" + CRLF
|
||||
cString += Space( nIndent ) + " +----------->" + hb_eol()
|
||||
ENDIF
|
||||
|
||||
CASE cType == "A"
|
||||
IF nRecursionLevel == 1
|
||||
cString += Space( nIndent ) + "Type='A' -> { Array of " + LTrim( Str( Len( xVar ) ) ) + " Items }" + CRLF
|
||||
cString += Space( nIndent ) + "Type='A' -> { Array of " + LTrim( Str( Len( xVar ) ) ) + " Items }" + hb_eol()
|
||||
ENDIF
|
||||
IF nMaxRecursionLevel > 0 .AND. nRecursionLevel > nMaxRecursionLevel
|
||||
cString += AsString( xVar )
|
||||
@@ -155,7 +153,7 @@ STATIC FUNCTION __HB_DumpVar( xVar, lAssocAsObj, lRecursive, nIndent, nRecursion
|
||||
|
||||
CASE cType == "H"
|
||||
IF nRecursionLevel == 1
|
||||
cString += Space( nIndent ) + "Type='H' -> { Hash of " + LTrim( Str( Len( xVar ) ) ) + " Items }" + CRLF
|
||||
cString += Space( nIndent ) + "Type='H' -> { Hash of " + LTrim( Str( Len( xVar ) ) ) + " Items }" + hb_eol()
|
||||
ENDIF
|
||||
IF nMaxRecursionLevel > 0 .AND. nRecursionLevel > nMaxRecursionLevel
|
||||
cString += AsString( xVar )
|
||||
@@ -164,7 +162,7 @@ STATIC FUNCTION __HB_DumpVar( xVar, lAssocAsObj, lRecursive, nIndent, nRecursion
|
||||
ENDIF
|
||||
|
||||
OTHERWISE
|
||||
cString += Space( nIndent ) + AsString( xVar ) + CRLF
|
||||
cString += Space( nIndent ) + AsString( xVar ) + hb_eol()
|
||||
ENDCASE
|
||||
|
||||
RETURN cString
|
||||
@@ -183,27 +181,27 @@ STATIC FUNCTION DShowProperties( oVar, nScope, lRecursive, nIndent, nRecursionLe
|
||||
// __SetClassScope( lOldScope )
|
||||
|
||||
IF Len( aProps ) > 0
|
||||
cString += Space( nIndent ) + " | +- >> Begin Data ------" + CRLF
|
||||
cString += Space( nIndent ) + " | +- >> Begin Data ------" + hb_eol()
|
||||
FOR EACH xProp IN aProps
|
||||
cString += Space( nIndent ) + " | +- " + PadR( xProp[ HB_OO_DATA_SYMBOL ], 20 ) + " [" + DecodeType( xProp[ HB_OO_DATA_TYPE ] ) + "] [" + DecodeScope( xProp[ HB_OO_DATA_SCOPE ] ) + "] " + ValType( xProp[ HB_OO_DATA_VALUE ] ) + " => " + AsString( xProp[ HB_OO_DATA_VALUE ] ) + CRLF
|
||||
cString += Space( nIndent ) + " | +- " + PadR( xProp[ HB_OO_DATA_SYMBOL ], 20 ) + " [" + DecodeType( xProp[ HB_OO_DATA_TYPE ] ) + "] [" + DecodeScope( xProp[ HB_OO_DATA_SCOPE ] ) + "] " + ValType( xProp[ HB_OO_DATA_VALUE ] ) + " => " + AsString( xProp[ HB_OO_DATA_VALUE ] ) + hb_eol()
|
||||
IF lRecursive .AND. ValType( xProp[ HB_OO_DATA_VALUE ] ) $ "AO"
|
||||
cString += __HB_DumpVar( xProp[ HB_OO_DATA_VALUE ],, lRecursive, nIndent + 3, nRecursionLevel + 1, nMaxRecursionLevel ) + CRLF
|
||||
cString += __HB_DumpVar( xProp[ HB_OO_DATA_VALUE ],, lRecursive, nIndent + 3, nRecursionLevel + 1, nMaxRecursionLevel ) + hb_eol()
|
||||
ENDIF
|
||||
NEXT
|
||||
cString += Space( nIndent ) + " | +- >> End Data ------" + CRLF
|
||||
cString += Space( nIndent ) + " | " + CRLF
|
||||
cString += Space( nIndent ) + " | +- >> End Data ------" + hb_eol()
|
||||
cString += Space( nIndent ) + " | " + hb_eol()
|
||||
ENDIF
|
||||
IF Len( aMethods ) > 0
|
||||
cString += Space( nIndent ) + " | +- >> Begin Methods ------" + CRLF
|
||||
cString += Space( nIndent ) + " | +- >> Begin Methods ------" + hb_eol()
|
||||
FOR EACH aMth IN aMethods
|
||||
cString += Space( nIndent ) + " | +- " + PadR( aMth[HB_OO_DATA_SYMBOL], 20 ) + " [" + DecodeType( aMth[HB_OO_DATA_TYPE] ) + "]" + " [" + DecodeScope( aMth[HB_OO_DATA_SCOPE] ) + "] " + CRLF
|
||||
cString += Space( nIndent ) + " | +- " + PadR( aMth[HB_OO_DATA_SYMBOL], 20 ) + " [" + DecodeType( aMth[HB_OO_DATA_TYPE] ) + "]" + " [" + DecodeScope( aMth[HB_OO_DATA_SCOPE] ) + "] " + hb_eol()
|
||||
NEXT
|
||||
cString += Space( nIndent ) + " | +- >> End Methods ------" + CRLF
|
||||
cString += Space( nIndent ) + " | " + CRLF
|
||||
cString += Space( nIndent ) + " | +- >> End Methods ------" + hb_eol()
|
||||
cString += Space( nIndent ) + " | " + hb_eol()
|
||||
ENDIF
|
||||
ENDIF
|
||||
IF Empty( cString )
|
||||
cString := Space( nIndent ) + " | " + CRLF
|
||||
cString := Space( nIndent ) + " | " + hb_eol()
|
||||
ENDIF
|
||||
RETURN cString
|
||||
|
||||
@@ -216,22 +214,22 @@ STATIC FUNCTION DShowArray( aVar, lRecursive, nIndent, nRecursionLevel, nMaxRecu
|
||||
//TraceLog( "DShowArray: aVar, lRecursive", aVar, lRecursive )
|
||||
|
||||
IF ISARRAY( aVar )
|
||||
nEolLen := Len( CRLF )
|
||||
nEolLen := Len( hb_eol() )
|
||||
nChar := Len( LTrim( Str( Len( aVar ) ) ) ) // return number of chars to display that value
|
||||
// i.e. if Len( aVar ) == 99, then nChar := 2
|
||||
cString += Space( nIndent ) + "{" + CRLF
|
||||
cString += Space( nIndent ) + "{" + hb_eol()
|
||||
FOR EACH xVal IN aVar
|
||||
cString += Space( nIndent ) + " ["+ LTrim( StrZero( xVal:__EnumIndex(), nChar ) ) + "] => " + AsString( xVal ) + ", " + CRLF
|
||||
cString += Space( nIndent ) + " ["+ LTrim( StrZero( xVal:__EnumIndex(), nChar ) ) + "] => " + AsString( xVal ) + ", " + hb_eol()
|
||||
IF lRecursive .AND. ValType( xVal ) $ "AOH"
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + CRLF
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + hb_eol()
|
||||
cString += __HB_DumpVar( xVal,, lRecursive, nIndent+3, nRecursionLevel + 1, nMaxRecursionLevel )
|
||||
cString := SubStr( cString, 1, Len( cString )-nEolLen ) + ", " + CRLF
|
||||
cString := SubStr( cString, 1, Len( cString )-nEolLen ) + ", " + hb_eol()
|
||||
ENDIF
|
||||
NEXT
|
||||
IF Len( aVar ) > 0
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + CRLF
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + hb_eol()
|
||||
ENDIF
|
||||
cString += Space( nIndent ) + "}" + CRLF
|
||||
cString += Space( nIndent ) + "}" + hb_eol()
|
||||
ENDIF
|
||||
|
||||
RETURN cString
|
||||
@@ -246,20 +244,20 @@ STATIC FUNCTION DShowHash( hVar, lRecursive, nIndent, nRecursionLevel, nMaxRecur
|
||||
//TraceLog( "DShowHash: hVar, ValType( hVar ), lRecursive", hVar, ValType( hVar ), ValToPrg( hVar ), lRecursive )
|
||||
|
||||
IF ValType( hVar ) == "H"
|
||||
nEolLen := Len( CRLF )
|
||||
cString += Space( nIndent ) + "{" + CRLF
|
||||
nEolLen := Len( hb_eol() )
|
||||
cString += Space( nIndent ) + "{" + hb_eol()
|
||||
FOR EACH xVal IN hVar
|
||||
cString += Space( nIndent ) + " ["+ LTrim( AsString( xVal:__enumKey() ) ) + "] => " + AsString( xVal ) + ", " + CRLF
|
||||
cString += Space( nIndent ) + " ["+ LTrim( AsString( xVal:__enumKey() ) ) + "] => " + AsString( xVal ) + ", " + hb_eol()
|
||||
IF lRecursive .AND. ValType( xVal ) $ "AOH"
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + CRLF
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + hb_eol()
|
||||
cString += __HB_DumpVar( xVal,, lRecursive, nIndent+3, nRecursionLevel + 1, nMaxRecursionLevel )
|
||||
cString := SubStr( cString, 1, Len( cString )-nEolLen ) + ", " + CRLF
|
||||
cString := SubStr( cString, 1, Len( cString )-nEolLen ) + ", " + hb_eol()
|
||||
ENDIF
|
||||
NEXT
|
||||
IF Len( hVar ) > 0
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + CRLF
|
||||
cString := SubStr( cString, 1, Len( cString )-2-nEolLen ) + hb_eol()
|
||||
ENDIF
|
||||
cString += Space( nIndent ) + "}" + CRLF
|
||||
cString += Space( nIndent ) + "}" + hb_eol()
|
||||
ENDIF
|
||||
|
||||
RETURN cString
|
||||
|
||||
@@ -69,6 +69,9 @@
|
||||
#xtranslate MaxRow(.T.) => gtInfo( HB_GTI_SCREENHEIGHT )
|
||||
#xtranslate MaxCol(.T.) => gtInfo( HB_GTI_SCREENWIDTH )
|
||||
|
||||
#xtranslate hb_osNewLine() => hb_eol()
|
||||
#xtranslate hb_osPathSeparator() => hb_ps()
|
||||
|
||||
#xtranslate hb_dbPack() => __dbPack()
|
||||
#xtranslate hb_dbZap() => __dbZap()
|
||||
#xtranslate hb_dbDrop([<x,...>]) => dbDrop(<x>)
|
||||
@@ -265,6 +268,9 @@
|
||||
#define GTI_CLIENT 2 /* Maximum possible client size of a window */
|
||||
#define GTI_MAX 3 /* Maximum possible window size (in Windows) */
|
||||
|
||||
#xtranslate hb_eol() => hb_osNewLine()
|
||||
#xtranslate hb_ps() => hb_osPathSeparator()
|
||||
|
||||
#xtranslate MaxRow(.T.) => hb_gtInfo( HB_GTI_VIEWPORTHEIGHT )
|
||||
#xtranslate MaxCol(.T.) => hb_gtInfo( HB_GTI_VIEWPORTWIDTH )
|
||||
|
||||
|
||||
@@ -467,7 +467,7 @@ METHOD PROCEDURE Out( ... ) CLASS HB_LogConsole
|
||||
ENDIF
|
||||
NEXT
|
||||
IF ::lRealConsole
|
||||
OutStd( cMsg, HB_OSnewLine() )
|
||||
OutStd( cMsg, hb_eol() )
|
||||
ELSE
|
||||
QOut( cMsg )
|
||||
ENDIF
|
||||
@@ -528,7 +528,7 @@ METHOD Open( cProgName ) CLASS HB_LogFile
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
Fwrite( ::nFileHandle, HB_BldLogMsg( HB_LogDateStamp(), Time(), "--", cProgName, "start --", HB_OsNewLine() ) )
|
||||
Fwrite( ::nFileHandle, HB_BldLogMsg( HB_LogDateStamp(), Time(), "--", cProgName, "start --", hb_eol() ) )
|
||||
|
||||
HB_Fcommit( ::nFileHandle )
|
||||
::lOpened := .T.
|
||||
@@ -541,7 +541,7 @@ METHOD Close( cProgName ) CLASS HB_LogFile
|
||||
RETURN .F.
|
||||
ENDIF
|
||||
|
||||
Fwrite( ::nFileHandle, HB_BldLogMsg( HB_LogDateStamp(), Time(), "--", cProgName, "end --", HB_OsNewLine() ) )
|
||||
Fwrite( ::nFileHandle, HB_BldLogMsg( HB_LogDateStamp(), Time(), "--", cProgName, "end --", hb_eol() ) )
|
||||
|
||||
FClose( ::nFileHandle )
|
||||
::nFileHandle := -1
|
||||
@@ -554,13 +554,13 @@ METHOD Send( nStyle, cMessage, cProgName, nPriority ) CLASS HB_LogFile
|
||||
|
||||
LOCAL nCount
|
||||
|
||||
FWrite( ::nFileHandle, ::Format( nStyle, cMessage, cProgName, nPriority ) + HB_OsNewLine() )
|
||||
FWrite( ::nFileHandle, ::Format( nStyle, cMessage, cProgName, nPriority ) + hb_eol() )
|
||||
HB_FCommit( ::nFileHandle );
|
||||
|
||||
// see file limit and eventually swap file.
|
||||
IF ::nFileLimit > 0
|
||||
IF FSeek( ::nFileHandle, 0, FS_RELATIVE ) > ::nFileLimit * 1024
|
||||
Fwrite( ::nFileHandle, HB_BldLogMsg( HB_LogDateStamp(), Time(), "LogFile: Closing file due to size limit breaking", HB_OsNewLine() ) )
|
||||
Fwrite( ::nFileHandle, HB_BldLogMsg( HB_LogDateStamp(), Time(), "LogFile: Closing file due to size limit breaking", hb_eol() ) )
|
||||
FClose( ::nFileHandle )
|
||||
|
||||
IF ::nBackup > 1
|
||||
@@ -574,7 +574,7 @@ METHOD Send( nStyle, cMessage, cProgName, nPriority ) CLASS HB_LogFile
|
||||
|
||||
IF FRename( ::cFileName, ::cFileName + ".000" ) == 0
|
||||
::nFileHandle := hb_FCreate( ::cFileName, FC_NORMAL, FO_READWRITE )
|
||||
Fwrite( ::nFileHandle, HB_BldLogMsg( HB_LogDateStamp(), Time(), "LogFile: Reopening file due to size limit breaking", HB_OsNewLine() ) )
|
||||
Fwrite( ::nFileHandle, HB_BldLogMsg( HB_LogDateStamp(), Time(), "LogFile: Reopening file due to size limit breaking", hb_eol() ) )
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -56,8 +56,6 @@
|
||||
#define HB_SET_TRACESTACK_CURRENT 1
|
||||
#define HB_SET_TRACESTACK_ALL 2
|
||||
|
||||
#define CRLF HB_OsNewLine()
|
||||
|
||||
#xtranslate Write( <cString> ) => FWrite( FileHandle, <cString> ) //;HB_OutDebug( <cString> )
|
||||
|
||||
STATIC s_lSET_TRACE := .T.
|
||||
@@ -150,20 +148,20 @@ FUNCTION TraceLog( ... )
|
||||
ENDIF
|
||||
|
||||
IF nLevel > 1 .AND. ! ( ProcName( 2 ) == '' )
|
||||
Write( ' Called from: ' + CRLF )
|
||||
Write( ' Called from: ' + hb_eol() )
|
||||
nLevel := 1
|
||||
DO WHILE ! ( ( ProcName := ProcName( ++nLevel ) ) == '' )
|
||||
Write( space(30) + ProcFile( nLevel ) + "->" + ProcName + '(' + LTrim( Str( Procline( nLevel ) ) ) + ')' + CRLF )
|
||||
Write( space(30) + ProcFile( nLevel ) + "->" + ProcName + '(' + LTrim( Str( Procline( nLevel ) ) ) + ')' + hb_eol() )
|
||||
ENDDO
|
||||
ELSE
|
||||
Write( CRLF )
|
||||
Write( hb_eol() )
|
||||
ENDIF
|
||||
|
||||
FOR EACH xParam IN HB_aParams()
|
||||
Write( 'Type: ' + ValType( xParam ) + ' >>>' + hb_CStr( xParam ) + '<<<' + CRLF )
|
||||
Write( 'Type: ' + ValType( xParam ) + ' >>>' + hb_CStr( xParam ) + '<<<' + hb_eol() )
|
||||
NEXT
|
||||
|
||||
Write( CRLF )
|
||||
Write( hb_eol() )
|
||||
|
||||
FClose( FileHandle )
|
||||
|
||||
|
||||
@@ -626,8 +626,8 @@ STATIC FUNCTION strvalue( c, l )
|
||||
|
||||
STATIC PROCEDURE FWriteLine( nh, c )
|
||||
|
||||
Fwrite( nh, c + HB_OsNewLine() )
|
||||
//HB_OutDebug( c + HB_OsNewLine() )
|
||||
Fwrite( nh, c + hb_eol() )
|
||||
//HB_OutDebug( c + hb_eol() )
|
||||
RETURN
|
||||
|
||||
STATIC FUNCTION Arguments( oErr )
|
||||
@@ -654,22 +654,22 @@ FUNCTION __ErrorBlock( )
|
||||
|
||||
PROCEDURE __MinimalErrorHandler( oError )
|
||||
|
||||
LOCAL cError := "Error!" + hb_osNewLine()
|
||||
LOCAL cError := "Error!" + hb_eol()
|
||||
|
||||
IF ISCHARACTER( oError:Operation )
|
||||
cError += "Operation: " + oError:Operation + hb_osNewLine()
|
||||
cError += "Operation: " + oError:Operation + hb_eol()
|
||||
ENDIF
|
||||
IF ISCHARACTER( oError:Description )
|
||||
cError += "Description: " + oError:Description + hb_osNewLine()
|
||||
cError += "Description: " + oError:Description + hb_eol()
|
||||
ENDIF
|
||||
IF ISCHARACTER( oError:ModuleName )
|
||||
cError += "Source: " + oError:ModuleName + hb_osNewLine()
|
||||
cError += "Source: " + oError:ModuleName + hb_eol()
|
||||
ENDIF
|
||||
IF ISCHARACTER( oError:ProcName )
|
||||
cError += "Procedure: " + oError:ProcName + hb_osNewLine()
|
||||
cError += "Procedure: " + oError:ProcName + hb_eol()
|
||||
ENDIF
|
||||
IF ISNUMBER( oError:ProcLine )
|
||||
cError += "Line: " + hb_ntos( oError:ProcLine ) + hb_osNewLine()
|
||||
cError += "Line: " + hb_ntos( oError:ProcLine ) + hb_eol()
|
||||
ENDIF
|
||||
|
||||
OutStd( cError )
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
#include "common.ch"
|
||||
|
||||
#define CRLF hb_osNewLine()
|
||||
|
||||
function TIniFile()
|
||||
static oClass
|
||||
|
||||
@@ -176,7 +174,7 @@ static procedure WriteString(cSection, cIdent, cString)
|
||||
AAdd( ::Contents, {cSection, {{cIdent, cString}}} )
|
||||
endif
|
||||
endif
|
||||
return
|
||||
return
|
||||
|
||||
static function ReadNumber(cSection, cIdent, nDefault)
|
||||
local Self := QSelf()
|
||||
@@ -216,7 +214,7 @@ static procedure DeleteKey(cSection, cIdent)
|
||||
|
||||
cSection := lower(cSection)
|
||||
i := AScan( ::Contents, {|x| ISCHARACTER(x[1]) .and. lower(x[1]) == cSection} )
|
||||
|
||||
|
||||
if i > 0
|
||||
cIdent := lower(cIdent)
|
||||
j := AScan( ::Contents[i][2], {|x| ISCHARACTER(x[1]) .and. lower(x[1]) == cIdent} )
|
||||
|
||||
@@ -179,8 +179,8 @@ STATIC FUNCTION AddPara( cPara, cAlign )
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
::cBody := ::cBody + ;
|
||||
"<P ALIGN='" + cAlign + "'>" + hb_OSNewLine() + ;
|
||||
cPara + hb_OSNewLine() + ;
|
||||
"<P ALIGN='" + cAlign + "'>" + hb_eol() + ;
|
||||
cPara + hb_eol() + ;
|
||||
"</P>"
|
||||
|
||||
RETURN Self
|
||||
@@ -194,11 +194,11 @@ STATIC FUNCTION Generate()
|
||||
// Is this a meta file or hand generated script?
|
||||
IF empty( ::cHTMLFile )
|
||||
::cContent := ;
|
||||
"<HTML><HEAD>" + hb_OSNewLine() + ;
|
||||
"<TITLE>" + ::cTitle + "</TITLE>" + hb_OSNewLine() + ;
|
||||
"<HTML><HEAD>" + hb_eol() + ;
|
||||
"<TITLE>" + ::cTitle + "</TITLE>" + hb_eol() + ;
|
||||
"<BODY link='" + ::cLinkColor + "' " + ;
|
||||
"vlink='" + ::cvLinkColor + "'>" + + hb_OSNewLine() + ;
|
||||
::cBody + hb_OSNewLine() + ;
|
||||
"vlink='" + ::cvLinkColor + "'>" + + hb_eol() + ;
|
||||
::cBody + hb_eol() + ;
|
||||
"</BODY></HTML>"
|
||||
ELSE
|
||||
::cContent := ""
|
||||
@@ -257,9 +257,9 @@ STATIC FUNCTION ShowResult()
|
||||
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
OutStd( ;
|
||||
"HTTP/1.0 200 OK" + hb_OSNewLine() + ;
|
||||
"CONTENT-TYPE: TEXT/HTML" + hb_OSNewLine() + hb_OSNewLine() + ;
|
||||
OutStd( ;
|
||||
"HTTP/1.0 200 OK" + hb_eol() + ;
|
||||
"CONTENT-TYPE: TEXT/HTML" + hb_eol() + hb_eol() + ;
|
||||
::cContent )
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -63,19 +63,7 @@ REQUEST HB_GT_CGI_DEFAULT
|
||||
// are not used anymore in Harbour core and RTL .prg files:
|
||||
// #define PRG_CAN_HAVE_HB_FUNC
|
||||
|
||||
#ifdef __HARBOUR__
|
||||
#define EOL hb_OSNewLine()
|
||||
#else
|
||||
#define EOL ( Chr( 13 ) + Chr( 10 ) )
|
||||
#endif
|
||||
|
||||
#ifdef __PLATFORM__UNIX
|
||||
#define PATH_SEPARATOR "/"
|
||||
#define BASE_DIR "../../"
|
||||
#else
|
||||
#define PATH_SEPARATOR "\"
|
||||
#define BASE_DIR "..\..\"
|
||||
#endif
|
||||
#define BASE_DIR ".." + hb_ps() + ".." + hb_ps()
|
||||
|
||||
// List of known files which does not contain any real public function.
|
||||
STATIC s_aSkipFiles := { "profiler.prg", "msg_tpl.c" }
|
||||
@@ -139,7 +127,7 @@ PROCEDURE MAIN( ... )
|
||||
CASE cArgName == "-?" .OR. cArgName == "--help"
|
||||
ShowHelp()
|
||||
RETURN
|
||||
CASE cArgName == "-source" ; s_aSwitches[ sw_BaseDir ] := arg + IIf(SubStr(arg, -1, 1) == PATH_SEPARATOR, "", PATH_SEPARATOR)
|
||||
CASE cArgName == "-source" ; s_aSwitches[ sw_BaseDir ] := arg + IIf(SubStr(arg, -1, 1) == hb_ps(), "", hb_ps())
|
||||
CASE cArgName == "-skipdirs"
|
||||
s_aSkipDirs := FileToArray( arg )
|
||||
CASE cArgName == "-skipfiles"; s_aSkipFiles := FileToArray( arg )
|
||||
@@ -206,7 +194,7 @@ PROCEDURE MAIN( ... )
|
||||
#define ca53X52 "/* CA-Cl*pper 5.3 compatible, CA-Cl*pper 5.2 undocumented, functions */"
|
||||
#define harb "/* Harbour extensions */"
|
||||
#define harbXcp "/* Harbour extensions, codepage support */"
|
||||
#define harbXns "/* Harbour extensions violating extension namespace rules." + EOL + " See reasons in source. */"
|
||||
#define harbXns "/* Harbour extensions violating extension namespace rules." + hb_eol() + " See reasons in source. */"
|
||||
#define dbgr "/* The debugger interface */"
|
||||
#define rdd "/* RDD related symbols */"
|
||||
#define rddSx "/* RDD SX related symbols */"
|
||||
@@ -232,8 +220,8 @@ PROCEDURE MAIN( ... )
|
||||
Capture( ca51int, {|a,b,c,f| a,b,f, SubStr(c, 1, Len( "__") ) == "__" } ), ;
|
||||
Capture( harb , {|a,b,c,f| a,b,f, SubStr(c, 1, Len( "HB_") ) == "HB_" } ), ;
|
||||
Capture( dbgr , {|a,b,c,f| a,b,f, SubStr(c, 1, Len( "__DBG") ) == "__DBG" } ), ;
|
||||
Capture( rdd , {|a,b,c,f| a,b,c, AT( PATH_SEPARATOR + "rdd" + PATH_SEPARATOR, f) > 0 } ), ;
|
||||
Capture( rddSx , {|a,b,c,f| a,b, (SubStr(c, 1, 2) == "SX" .OR. SubStr(c, 1, 3) == "_SX" .OR. .F.) .AND. AT( PATH_SEPARATOR + "rdd" + PATH_SEPARATOR, f) > 0 } ), ;
|
||||
Capture( rdd , {|a,b,c,f| a,b,c, AT( hb_ps() + "rdd" + hb_ps(), f) > 0 } ), ;
|
||||
Capture( rddSx , {|a,b,c,f| a,b, (SubStr(c, 1, 2) == "SX" .OR. SubStr(c, 1, 3) == "_SX" .OR. .F.) .AND. AT( hb_ps() + "rdd" + hb_ps(), f) > 0 } ), ;
|
||||
Capture( hiper , {|a,b,c,f| a,b,f, SubStr(c, 1, Len( "HS_") ) == "HS_" } ), ;
|
||||
Capture( cfts , {|a,b,c,f| a,b,f, SubStr(c, 1, Len( "CFTS") ) == "CFTS" } ), ;
|
||||
Capture( i18n , {|a,b,c,f| a,b,f, SubStr(c, 1, Len( "HB_I18N") ) == "HB_I18N" } ), ;
|
||||
@@ -256,18 +244,18 @@ PROCEDURE MAIN( ... )
|
||||
|
||||
// action codepage first so the folder will be ignored when actioning source
|
||||
aActions := {;
|
||||
{ "hbextcdp.ch_", "HB_EXTCDP_CH_", "source" + PATH_SEPARATOR + "codepage", CDPACTIONS }, ;
|
||||
{ "hbextlng.ch_", "HB_EXTLNG_CH_", "source" + PATH_SEPARATOR + "lang", LNGACTIONS }, ;
|
||||
{ "hbextcdp.ch_", "HB_EXTCDP_CH_", "source" + hb_ps() + "codepage", CDPACTIONS }, ;
|
||||
{ "hbextlng.ch_", "HB_EXTLNG_CH_", "source" + hb_ps() + "lang", LNGACTIONS }, ;
|
||||
{ "hbextern.ch_", "HB_EXTERN_CH_", "source", STDACTIONS }, ;
|
||||
}
|
||||
|
||||
AEval( ;
|
||||
Directory( s_aSwitches[ sw_BaseDir ] + "contrib" + PATH_SEPARATOR + "*", "D" ), ;
|
||||
Directory( s_aSwitches[ sw_BaseDir ] + "contrib" + hb_ps() + "*", "D" ), ;
|
||||
{|ad| IIf( HB_AScan( s_aSkipDirs, ad[ F_NAME ] ) == 0 .AND. ad[ F_ATTR ] == "D", ;
|
||||
AAdd( aActions, ;
|
||||
{ ad[ F_NAME ] + ".ch_", ;
|
||||
"HB_CONTRIB_EXTERN_" + Upper( ad[ F_NAME ] ) + "_CH_", ;
|
||||
"contrib" + PATH_SEPARATOR + ad[ F_NAME ], ;
|
||||
"contrib" + hb_ps() + ad[ F_NAME ], ;
|
||||
{ Capture( "", {|a_,b_,c_,f_| a_,b_,c_,f_, .T. } ) } } ), ;
|
||||
) ;
|
||||
} ;
|
||||
@@ -294,12 +282,12 @@ PROCEDURE MAIN( ... )
|
||||
ENDIF
|
||||
|
||||
FWrite( nOutput, ;
|
||||
"// NOTE: Machine generated on: " + DTOC( DATE() ) + EOL + ;
|
||||
"// This output should be edited by hand after extraction." + EOL + ;
|
||||
EOL + ;
|
||||
"#ifndef " + aa[ ACN_HEADER ] + EOL + ;
|
||||
"#define " + aa [ ACN_HEADER ] + EOL + ;
|
||||
EOL ;
|
||||
"// NOTE: Machine generated on: " + DTOC( DATE() ) + hb_eol() + ;
|
||||
"// This output should be edited by hand after extraction." + hb_eol() + ;
|
||||
hb_eol() + ;
|
||||
"#ifndef " + aa[ ACN_HEADER ] + hb_eol() + ;
|
||||
"#define " + aa [ ACN_HEADER ] + hb_eol() + ;
|
||||
hb_eol() ;
|
||||
)
|
||||
|
||||
s_aMethodAsProcedure := {}
|
||||
@@ -307,47 +295,47 @@ PROCEDURE MAIN( ... )
|
||||
ProcessDir( s_aSwitches[ sw_BaseDir ] + aa[ ACN_FOLDER ], aa[ ACN_ACTIONS ] )
|
||||
|
||||
IF Len(s_aMethodAsProcedure) > 0
|
||||
FWrite( nOutput, "/*" + EOL + "Class methods defined as 'procedure':" + EOL )
|
||||
AEval(s_aMethodAsProcedure, {|ac| FWrite( nOutput, " " + ac[1] + " " + ac[2] + EOL ) } )
|
||||
FWrite( nOutput, "*/" + EOL + EOL )
|
||||
FWrite( nOutput, "/*" + hb_eol() + "Class methods defined as 'procedure':" + hb_eol() )
|
||||
AEval(s_aMethodAsProcedure, {|ac| FWrite( nOutput, " " + ac[1] + " " + ac[2] + hb_eol() ) } )
|
||||
FWrite( nOutput, "*/" + hb_eol() + hb_eol() )
|
||||
ENDIF
|
||||
|
||||
FOR EACH ao IN aa[ 4 ]
|
||||
IF ao != NIL
|
||||
IF Len( ao[ capt_Desc ] ) > 0
|
||||
FWrite( nOutput, ao[ capt_Desc ] + EOL )
|
||||
FWrite( nOutput, ao[ capt_Desc ] + hb_eol() )
|
||||
ENDIF
|
||||
IF LEn( ao[ capt_Repository ] ) == 0
|
||||
FWrite( nOutput, "/* empty */" + EOL )
|
||||
FWrite( nOutput, "/* empty */" + hb_eol() )
|
||||
ELSE
|
||||
FWrite( nOutput, EOL )
|
||||
FWrite( nOutput, hb_eol() )
|
||||
FOR EACH ar in ao[ capt_Repository ]
|
||||
IF ar[ capt_Cond ] != NIL .AND. Len( ar[ capt_Cond ] ) > 0 ; FWrite( nOutput, ar[ capt_Cond ] + EOL ); ENDIF
|
||||
IF ar[ capt_Cond ] != NIL .AND. Len( ar[ capt_Cond ] ) > 0 ; FWrite( nOutput, ar[ capt_Cond ] + hb_eol() ); ENDIF
|
||||
|
||||
ASort( ar[ capt_Repository ] )
|
||||
AEval( ar[ capt_Repository ], {|a| FWrite( nOutput, "EXTERNAL " + a + EOL ) } )
|
||||
AEval( ar[ capt_Repository ], {|a| FWrite( nOutput, "EXTERNAL " + a + hb_eol() ) } )
|
||||
|
||||
IF ar[ capt_Cond ] != NIL .AND. Len( ar[ capt_Cond ] ) > 0
|
||||
cDescription := ""
|
||||
DO WHILE Len( ar[ capt_Cond ] ) > 0
|
||||
cDescription := "#endif /* " + Parse( @ar[ capt_Cond ], EOL ) + " */" + EOL + cDescription
|
||||
cDescription := "#endif /* " + Parse( @ar[ capt_Cond ], hb_eol() ) + " */" + hb_eol() + cDescription
|
||||
ENDDO
|
||||
FWrite( nOutput, cDescription )
|
||||
ENDIF
|
||||
|
||||
FWrite( nOutput, EOL )
|
||||
FWrite( nOutput, hb_eol() )
|
||||
NEXT
|
||||
ENDIF
|
||||
IF Len( ao[ capt_Desc ] ) > 0
|
||||
FWrite( nOutput, Stuff( ao[ capt_Desc ], 4, 0, "End of ") + EOL + EOL )
|
||||
FWrite( nOutput, Stuff( ao[ capt_Desc ], 4, 0, "End of ") + hb_eol() + hb_eol() )
|
||||
ELSE
|
||||
FWrite( nOutput, EOL )
|
||||
FWrite( nOutput, hb_eol() )
|
||||
ENDIF
|
||||
ENDIF
|
||||
NEXT
|
||||
|
||||
FWrite( nOutput, ;
|
||||
"#endif /* " + aa [ ACN_HEADER ] + " */" + EOL ;
|
||||
"#endif /* " + aa [ ACN_HEADER ] + " */" + hb_eol() ;
|
||||
)
|
||||
|
||||
FClose( nOutput )
|
||||
@@ -369,11 +357,11 @@ STATIC PROCEDURE ShowHelp()
|
||||
"Syntax: ", ;
|
||||
" hbextern [options]", ;
|
||||
"options:", ;
|
||||
" -source=<folder> // source folder, default is .." + PATH_SEPARATOR + "..", ;
|
||||
" -source=<folder> // source folder, default is .." + hb_ps() + "..", ;
|
||||
" -skipdirs=<filename> // configuration file of folders to bypass, default:", ;
|
||||
{|| AEval( s_aSkipDirs, {|c| OutStd( IIf( Empty(c), "", " " + c ) + EOL ) } ) }, ;
|
||||
{|| AEval( s_aSkipDirs, {|c| OutStd( IIf( Empty(c), "", " " + c ) + hb_eol() ) } ) }, ;
|
||||
" -skipfiles=<filename> // configuration file of files to bypass, default:", ;
|
||||
{|| AEval( s_aSkipFiles, {|c| OutStd( IIf( Empty(c), "", " " + c ) + EOL ) } ) }, ;
|
||||
{|| AEval( s_aSkipFiles, {|c| OutStd( IIf( Empty(c), "", " " + c ) + hb_eol() ) } ) }, ;
|
||||
" -verbose=[silent|minimum|maximum] // verbose operation, default is maximum", ;
|
||||
" -silent // synonym for verbose=silent", ;
|
||||
" -case=[upper|lower|unchanged] // output case, default is upper", ;
|
||||
@@ -392,7 +380,7 @@ STATIC PROCEDURE ShowHelp()
|
||||
#undef OnOrOff
|
||||
|
||||
// using hbmk2 style
|
||||
AEval( aHelp, {|x| IIf( ValType( x ) == "B", Eval( x ), OutStd( IIf( Empty(x), "", x ) + EOL ) ) } )
|
||||
AEval( aHelp, {|x| IIf( ValType( x ) == "B", Eval( x ), OutStd( IIf( Empty(x), "", x ) + hb_eol() ) ) } )
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -407,7 +395,7 @@ STATIC PROCEDURE ProcessDir( cDir, aOutput )
|
||||
|
||||
IF s_aSwitches[ sw_Verbose ] > 0 ; ? cDir ; ENDIF
|
||||
|
||||
cDir += PATH_SEPARATOR
|
||||
cDir += hb_ps()
|
||||
|
||||
aFiles := Directory( cDir + "*.*", "D" )
|
||||
IF ( nLen := LEN( aFiles ) ) > 0
|
||||
@@ -455,7 +443,7 @@ STATIC PROCEDURE ProcessFile( cFile, lPRG, aOutput )
|
||||
|
||||
IF s_aSwitches[ sw_Verbose ] > 1 ; ? cFile ; ENDIF
|
||||
|
||||
cHeader := "//" + EOL + "// symbols from file: " + cFile + EOL + "//" + EOL
|
||||
cHeader := "//" + hb_eol() + "// symbols from file: " + cFile + hb_eol() + "//" + hb_eol()
|
||||
|
||||
IF .NOT. s_aSwitches[ sw_ExcludeEmptyFiles ]
|
||||
bOutputHeader := .F.
|
||||
@@ -801,7 +789,7 @@ STATIC PROCEDURE WriteSymbol( cFile, cLine, cMethodType, bOutputHeader, cHeader,
|
||||
ENDIF
|
||||
|
||||
IF s_aSwitches[ sw_ConditionalDepth ] == 0
|
||||
AEval( s_aConditions, {|/* c */| s_aSwitches[ sw_ConditionalDepth ]++/* , FWrite( nOutput, c + EOL ) */ } )
|
||||
AEval( s_aConditions, {|/* c */| s_aSwitches[ sw_ConditionalDepth ]++/* , FWrite( nOutput, c + hb_eol() ) */ } )
|
||||
ENDIF
|
||||
|
||||
IF s_aSwitches[ sw_MimicHBExtern ].OR. Empty(cMethodType) .OR. s_aSwitches[ sw_ExcludeClassMethods ]
|
||||
@@ -811,8 +799,8 @@ STATIC PROCEDURE WriteSymbol( cFile, cLine, cMethodType, bOutputHeader, cHeader,
|
||||
ENDIF
|
||||
|
||||
cConditions := ""
|
||||
AEval( s_aConditions, {|c| cConditions += c + EOL } )
|
||||
IF Len( cConditions ) > Len( EOL ) ; cConditions := SubStr( cConditions, 1, Len( cConditions ) - Len( EOL ) ) ; ENDIF
|
||||
AEval( s_aConditions, {|c| cConditions += c + hb_eol() } )
|
||||
IF Len( cConditions ) > Len( hb_eol() ) ; cConditions := SubStr( cConditions, 1, Len( cConditions ) - Len( hb_eol() ) ) ; ENDIF
|
||||
|
||||
// the first entry has a hard-coded TRUE value so one will always be found
|
||||
idxOutput := HB_RAScan( aOutput, {|ao| ;
|
||||
@@ -828,22 +816,22 @@ STATIC PROCEDURE WriteSymbol( cFile, cLine, cMethodType, bOutputHeader, cHeader,
|
||||
ENDIF
|
||||
AAdd( aOutput[ idxOutput ][ capt_Repository ][ idxRepository ][ capt_Repository ], cLine /* + cHeader */ )
|
||||
|
||||
//~ FWrite( nOutput, "EXTERNAL " + cLine + cMethodType + EOL )
|
||||
//~ FWrite( nOutput, "EXTERNAL " + cLine + cMethodType + hb_eol() )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
STATIC PROCEDURE CopyGenericCopyrightToTarget( cSource, nOutput )
|
||||
LOCAL cFile := s_aSwitches[ sw_BaseDir ] + "doc" + PATH_SEPARATOR + "hdr_tpl.txt"
|
||||
LOCAL cFile := s_aSwitches[ sw_BaseDir ] + "doc" + hb_ps() + "hdr_tpl.txt"
|
||||
LOCAL nInput
|
||||
LOCAL cBuffer2
|
||||
|
||||
FWrite( nOutput, ;
|
||||
"/*" + EOL + ;
|
||||
" * $" + "Id" + "$" + EOL + ;
|
||||
"*/" + EOL + ;
|
||||
EOL )
|
||||
"/*" + hb_eol() + ;
|
||||
" * $" + "Id" + "$" + hb_eol() + ;
|
||||
"*/" + hb_eol() + ;
|
||||
hb_eol() )
|
||||
|
||||
IF ( nInput := FOpen( cFile ) ) > 0
|
||||
// assume there are two comment blocks seperated by a blank line (svn header and copyright)
|
||||
@@ -854,7 +842,7 @@ STATIC PROCEDURE CopyGenericCopyrightToTarget( cSource, nOutput )
|
||||
cBuffer2 := StrTran( cBuffer2, " 2001", "" )
|
||||
cBuffer2 := StrTran( cBuffer2, "{list of individual authors and e-mail addresses}", "- automaticallyt generated by hbextern; do not edit" )
|
||||
cBuffer2 := StrTran( cBuffer2, "{one-liner description about the purpose of this source file}", "Harbour " + cSource + " contrib external header" )
|
||||
FWrite( nOutput, "/*" + cBuffer2 + EOL + EOL )
|
||||
FWrite( nOutput, "/*" + cBuffer2 + hb_eol() + hb_eol() )
|
||||
ENDIF
|
||||
FClose( nInput )
|
||||
ELSE
|
||||
@@ -863,18 +851,18 @@ STATIC PROCEDURE CopyGenericCopyrightToTarget( cSource, nOutput )
|
||||
ENDIF
|
||||
|
||||
STATIC PROCEDURE CopyExistingSourceToTarget( cSource, nOutput )
|
||||
LOCAL cFile := s_aSwitches[ sw_BaseDir ] + "include" + PATH_SEPARATOR + cSource
|
||||
LOCAL cFile := s_aSwitches[ sw_BaseDir ] + "include" + hb_ps() + cSource
|
||||
LOCAL nInput
|
||||
LOCAL cBuffer1, cBuffer2
|
||||
|
||||
IF Empty( Directory( cFile ) )
|
||||
#if 0
|
||||
FWrite( nOutput, ;
|
||||
"/*" + EOL + ;
|
||||
" * $" + "Id" + "$" + EOL + ;
|
||||
"*/" + EOL + ;
|
||||
EOL )
|
||||
cFile := s_aSwitches[ sw_BaseDir ] + "doc" + PATH_SEPARATOR + "hdr_tpl.txt"
|
||||
"/*" + hb_eol() + ;
|
||||
" * $" + "Id" + "$" + hb_eol() + ;
|
||||
"*/" + hb_eol() + ;
|
||||
hb_eol() )
|
||||
cFile := s_aSwitches[ sw_BaseDir ] + "doc" + hb_ps() + "hdr_tpl.txt"
|
||||
IF ( nInput := FOpen( cFile ) ) > 0
|
||||
// assume there are two comment blocks seperated by a blank line (svn header and copyright)
|
||||
IF FReadUntil( nInput, "*/", "" /* discard ID comment */ ) .AND. ;
|
||||
@@ -884,7 +872,7 @@ STATIC PROCEDURE CopyExistingSourceToTarget( cSource, nOutput )
|
||||
cBuffer2 := StrTran( cBuffer2, " 2001", "" )
|
||||
cBuffer2 := StrTran( cBuffer2, "{list of individual authors and e-mail addresses}", "- automaticallyt generated by hbextern; do not edit" )
|
||||
cBuffer2 := StrTran( cBuffer2, "{one-liner description about the purpose of this source file}", "Harbour " + cSource + " contrib external header" )
|
||||
FWrite( nOutput, "/*" + cBuffer2 + EOL + EOL )
|
||||
FWrite( nOutput, "/*" + cBuffer2 + hb_eol() + hb_eol() )
|
||||
ENDIF
|
||||
FClose( nInput )
|
||||
ENDIF
|
||||
@@ -892,7 +880,7 @@ STATIC PROCEDURE CopyExistingSourceToTarget( cSource, nOutput )
|
||||
ELSEIF ( nInput := FOpen( cFile ) ) > 0
|
||||
// assume there are two comment blocks seperated by a blank line (svn header and copyright)
|
||||
IF FReadUntil( nInput, "*/", @cBuffer1 ) .AND. FReadUntil( nInput, "*/", @cBuffer2 )
|
||||
FWrite( nOutput, cBuffer1 + cBuffer2 + EOL + EOL )
|
||||
FWrite( nOutput, cBuffer1 + cBuffer2 + hb_eol() + hb_eol() )
|
||||
ENDIF
|
||||
FClose( nInput )
|
||||
ELSE
|
||||
|
||||
@@ -86,13 +86,13 @@ PROCEDURE Main( cScript )
|
||||
|
||||
IF Empty( cScriptName )
|
||||
IF !Empty( GetEnv( "SERVER_NAME" ) )
|
||||
OutStd( "content-type: text/html" + hb_OSNewLine() )
|
||||
OutStd( hb_OSNewLine() )
|
||||
OutStd( "<HTML><BODY><H1>Server Error</H1><P>" + hb_OSNewLine() )
|
||||
OutStd( "Must specify scriptname using hscript.exe?script=<scriptname>" + hb_OSNewLine() )
|
||||
OutStd( "</BODY></HTML>" + hb_OSNewLine() )
|
||||
OutStd( "content-type: text/html" + hb_eol() )
|
||||
OutStd( hb_eol() )
|
||||
OutStd( "<HTML><BODY><H1>Server Error</H1><P>" + hb_eol() )
|
||||
OutStd( "Must specify scriptname using hscript.exe?script=<scriptname>" + hb_eol() )
|
||||
OutStd( "</BODY></HTML>" + hb_eol() )
|
||||
ELSE
|
||||
OutStd( "Please give .hs name" + hb_OSNewLine() )
|
||||
OutStd( "Please give .hs name" + hb_eol() )
|
||||
ENDIF
|
||||
EXIT
|
||||
ENDIF
|
||||
@@ -100,9 +100,9 @@ PROCEDURE Main( cScript )
|
||||
// Script not found
|
||||
IF !File( cScriptName )
|
||||
IF !Empty( GetEnv( "SERVER_NAME" ) )
|
||||
OutStd( "CONTENT-TYPE: text/html" + hb_OSNewLine() )
|
||||
OutStd( "CONTENT-TYPE: text/html" + hb_eol() )
|
||||
ENDIF
|
||||
OutStd( "<H1>Server Error</H1><P>Script not found: " + cScriptName + hb_OSNewLine() )
|
||||
OutStd( "<H1>Server Error</H1><P>Script not found: " + cScriptName + hb_eol() )
|
||||
EXIT
|
||||
ENDIF
|
||||
|
||||
@@ -129,7 +129,7 @@ PROCEDURE Main( cScript )
|
||||
// Abre script
|
||||
IF i > 1
|
||||
//cTrans += " ; "
|
||||
cTrans += hb_OSNewLine()
|
||||
cTrans += hb_eol()
|
||||
ENDIF
|
||||
IF i + 1 < nLen
|
||||
cTrans += "OutStd( '"
|
||||
@@ -148,7 +148,7 @@ PROCEDURE Main( cScript )
|
||||
lOpen := .f.
|
||||
IF i < nLen
|
||||
// cTrans += " ; "
|
||||
cTrans += hb_OSNewLine()
|
||||
cTrans += hb_eol()
|
||||
ENDIF
|
||||
|
||||
ENDIF
|
||||
@@ -173,7 +173,7 @@ PROCEDURE Main( cScript )
|
||||
cFile := cLocation + cHost + ".prg" // Output file name
|
||||
hFile := FCreate( cFile )
|
||||
FOR i := 1 TO Len( aResult )
|
||||
FWrite( hFile, aResult[i] + hb_OSNewLine() )
|
||||
FWrite( hFile, aResult[i] + hb_eol() )
|
||||
NEXT
|
||||
FClose( hFile )
|
||||
|
||||
|
||||
@@ -1429,7 +1429,7 @@ STATIC PROCEDURE WriteToLog( cRequest )
|
||||
LEFT( cRequest, AT( CR_LF, cRequest ) - 1 ) + '" ' + ;
|
||||
LTRIM( STR( t_nStatusCode ) ) + " " + IIF( nSize == 0, "-", LTRIM( STR( nSize ) ) ) + ;
|
||||
' "' + IIF( Empty( cReferer ), "-", cReferer ) + '" "' + _SERVER[ "HTTP_USER_AGENT" ] + ;
|
||||
'"' + HB_OSNewLine()
|
||||
'"' + hb_eol()
|
||||
|
||||
//hb_ToOutDebug( "AccessLog = %s \n\r", cAccess )
|
||||
|
||||
@@ -1445,7 +1445,7 @@ STATIC PROCEDURE WriteToLog( cRequest )
|
||||
|
||||
cError := "[" + Left( aDays[ nDoW ], 3 ) + " " + aMonths[ nMonth ] + " " + StrZero( nDay, 2 ) + " " + ;
|
||||
PadL( LTrim( cTime ), 8, "0" ) + " " + StrZero( nYear, 4 ) + "] [error] [client " + _SERVER[ "REMOTE_ADDR" ] + "] " + ;
|
||||
cErrorMsg + HB_OSNewLine()
|
||||
cErrorMsg + hb_eol()
|
||||
|
||||
//hb_ToOutDebug( "ErrorLog = %s \n\r", cError )
|
||||
|
||||
@@ -2416,7 +2416,7 @@ STATIC FUNCTION uhttpd_DefError( oError )
|
||||
|
||||
LOCAL n
|
||||
LOCAL cDateTime, cString
|
||||
LOCAL cNewLine := hb_OSNewLine()
|
||||
LOCAL cNewLine := hb_eol()
|
||||
|
||||
// By default, division by zero results in zero
|
||||
IF oError:genCode == EG_ZERODIV .AND. ;
|
||||
|
||||
@@ -178,7 +178,7 @@ RETURN NIL
|
||||
|
||||
METHOD LogError(cError) CLASS UHttpd
|
||||
hb_mutexLock(Self:hmtxLog)
|
||||
FWRITE(Self:hErrorLog, DTOS(DATE()) + " " + TIME() + " " + cError + " " + HB_OSNewLine())
|
||||
FWRITE(Self:hErrorLog, DTOS(DATE()) + " " + TIME() + " " + cError + " " + hb_eol())
|
||||
hb_mutexUnlock(Self:hmtxLog)
|
||||
RETURN NIL
|
||||
|
||||
@@ -192,7 +192,7 @@ LOCAL cDate := DTOS(DATE()), cTime := TIME()
|
||||
"/" + LEFT(cDate, 4) + ":" + cTime + ' +0000] "' + server["REQUEST_ALL"] + '" ' + ;
|
||||
LTRIM(STR(s_nStatusCode)) + " " + LTRIM(STR(LEN(s_cResult))) + ;
|
||||
' "' + server["HTTP_REFERER"] + '" "' + server["HTTP_USER_AGENT"] + ;
|
||||
'"' + HB_OSNewLine())
|
||||
'"' + hb_eol())
|
||||
hb_mutexUnlock(Self:hmtxLog)
|
||||
RETURN NIL
|
||||
|
||||
@@ -679,57 +679,57 @@ RETURN NIL
|
||||
|
||||
STATIC FUNC GetErrorDesc(oErr)
|
||||
LOCAL cRet, nI
|
||||
cRet := "ERRORLOG ============================================================" + HB_OSNewLine() + ;
|
||||
cRet := "ERRORLOG ============================================================" + hb_eol() + ;
|
||||
"Error: " + oErr:subsystem + "/" + ErrDescCode(oErr:genCode) + "(" + LTRIM(STR(oErr:genCode)) + ") " + ;
|
||||
LTRIM(STR(oErr:subcode)) + HB_OSNewLine()
|
||||
IF !EMPTY(oErr:filename); cRet += "File: " + oErr:filename + HB_OSNewLine()
|
||||
LTRIM(STR(oErr:subcode)) + hb_eol()
|
||||
IF !EMPTY(oErr:filename); cRet += "File: " + oErr:filename + hb_eol()
|
||||
ENDIF
|
||||
IF !EMPTY(oErr:description); cRet += "Description: " + oErr:description + HB_OSNewLine()
|
||||
IF !EMPTY(oErr:description); cRet += "Description: " + oErr:description + hb_eol()
|
||||
ENDIF
|
||||
IF !EMPTY(oErr:operation); cRet += "Operacija: " + oErr:operation + HB_OSNewLine()
|
||||
IF !EMPTY(oErr:operation); cRet += "Operacija: " + oErr:operation + hb_eol()
|
||||
ENDIF
|
||||
IF !EMPTY(oErr:osCode); cRet += "OS error: " + LTRIM(STR(oErr:osCode)) + HB_OSNewLine()
|
||||
IF !EMPTY(oErr:osCode); cRet += "OS error: " + LTRIM(STR(oErr:osCode)) + hb_eol()
|
||||
ENDIF
|
||||
IF VALTYPE(oErr:args) == "A"
|
||||
cRet += "Arguments:" + HB_OSNewLine()
|
||||
AEVAL(oErr:args, {|X, Y| cRet += STR(Y, 5) + ": " + HB_CStr(X) + HB_OSNewLine()})
|
||||
cRet += "Arguments:" + hb_eol()
|
||||
AEVAL(oErr:args, {|X, Y| cRet += STR(Y, 5) + ": " + HB_CStr(X) + hb_eol()})
|
||||
ENDIF
|
||||
cRet += HB_OSNewLine()
|
||||
cRet += hb_eol()
|
||||
|
||||
cRet += "Stack:" + HB_OSNewLine()
|
||||
cRet += "Stack:" + hb_eol()
|
||||
nI := 2
|
||||
DO WHILE ! EMPTY(PROCNAME(++nI))
|
||||
cRet += " " + PROCNAME(nI) + "(" + LTRIM(STR(PROCLINE(nI))) + ")" + HB_OSNewLine()
|
||||
cRet += " " + PROCNAME(nI) + "(" + LTRIM(STR(PROCLINE(nI))) + ")" + hb_eol()
|
||||
ENDDO
|
||||
cRet += HB_OSNewLine()
|
||||
cRet += hb_eol()
|
||||
|
||||
cRet += "Executable: " + HB_PROGNAME() + HB_OSNewLine()
|
||||
cRet += "Versions:" + HB_OSNewLine()
|
||||
cRet += " OS: " + OS() + HB_OSNewLine()
|
||||
cRet += " Harbour: " + VERSION() + ", " + HB_BUILDDATE() + HB_OSNewLine()
|
||||
cRet += HB_OSNewLine()
|
||||
cRet += "Executable: " + HB_PROGNAME() + hb_eol()
|
||||
cRet += "Versions:" + hb_eol()
|
||||
cRet += " OS: " + OS() + hb_eol()
|
||||
cRet += " Harbour: " + VERSION() + ", " + HB_BUILDDATE() + hb_eol()
|
||||
cRet += hb_eol()
|
||||
|
||||
IF oErr:genCode != EG_MEM
|
||||
cRet += "Database areas:" + HB_OSNewLine()
|
||||
cRet += " Current: " + LTRIM(STR(SELECT())) + " " + ALIAS() + HB_OSNewLine()
|
||||
cRet += "Database areas:" + hb_eol()
|
||||
cRet += " Current: " + LTRIM(STR(SELECT())) + " " + ALIAS() + hb_eol()
|
||||
|
||||
BEGIN SEQUENCE WITH {|o| BREAK(o)}
|
||||
IF !EMPTY(ALIAS())
|
||||
cRet += " Filter: " + DBFILTER() + HB_OSNewLine()
|
||||
cRet += " Relation: " + DBRELATION() + HB_OSNewLine()
|
||||
cRet += " Index expression: " + ORDKEY(ORDSETFOCUS()) + HB_OSNewLine()
|
||||
cRet += HB_OSNewLine()
|
||||
cRet += " Filter: " + DBFILTER() + hb_eol()
|
||||
cRet += " Relation: " + DBRELATION() + hb_eol()
|
||||
cRet += " Index expression: " + ORDKEY(ORDSETFOCUS()) + hb_eol()
|
||||
cRet += hb_eol()
|
||||
BEGIN SEQUENCE WITH {|o| BREAK(o)}
|
||||
FOR nI := 1 to FCOUNT()
|
||||
cRet += STR(nI, 6) + " " + PADR(FIELDNAME(nI), 14) + ": " + HB_VALTOEXP(FIELDGET(nI)) + HB_OSNewLine()
|
||||
cRet += STR(nI, 6) + " " + PADR(FIELDNAME(nI), 14) + ": " + HB_VALTOEXP(FIELDGET(nI)) + hb_eol()
|
||||
NEXT
|
||||
RECOVER
|
||||
cRet += "!!! Error reading database fields !!!" + HB_OSNewLine()
|
||||
cRet += "!!! Error reading database fields !!!" + hb_eol()
|
||||
END SEQUENCE
|
||||
cRet += HB_OSNewLine()
|
||||
cRet += hb_eol()
|
||||
ENDIF
|
||||
RECOVER
|
||||
cRet += "!!! Error accessing current workarea !!!" + HB_OSNewLine()
|
||||
cRet += "!!! Error accessing current workarea !!!" + hb_eol()
|
||||
END SEQUENCE
|
||||
|
||||
FOR nI := 1 to 250
|
||||
@@ -738,14 +738,14 @@ LOCAL cRet, nI
|
||||
DBSELECTAREA(nI)
|
||||
cRet += STR(nI, 6) + " " + RDDNAME() + " " + PADR(ALIAS(), 15) + ;
|
||||
STR(RECNO()) + "/" + STR(LASTREC()) + ;
|
||||
IIF(EMPTY(ORDSETFOCUS()), "", " Index " + ORDSETFOCUS() + "(" + LTRIM(STR(ORDNUMBER())) + ")") + HB_OSNewLine()
|
||||
IIF(EMPTY(ORDSETFOCUS()), "", " Index " + ORDSETFOCUS() + "(" + LTRIM(STR(ORDNUMBER())) + ")") + hb_eol()
|
||||
DBCLOSEAREA()
|
||||
ENDIF
|
||||
RECOVER
|
||||
cRet += "!!! Error accessing workarea number: " + STR(nI, 4) + "!!!" + HB_OSNewLine()
|
||||
cRet += "!!! Error accessing workarea number: " + STR(nI, 4) + "!!!" + hb_eol()
|
||||
END SEQUENCE
|
||||
NEXT
|
||||
cRet += HB_OSNewLine()
|
||||
cRet += hb_eol()
|
||||
ENDIF
|
||||
RETURN cRet
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
#command ASSERT( <exp> [, <msg>] ) => ;
|
||||
IF !( <exp> ) ;
|
||||
; OutStd( ;
|
||||
hb_OSNewLine() + ProcName( 0 ) + ;
|
||||
hb_eol() + ProcName( 0 ) + ;
|
||||
"(" + hb_NToS( ProcLine() ) + ")" + ;
|
||||
" Assertion failed: " + ;
|
||||
iif( <.msg.>, <msg>, <"exp"> ) ;
|
||||
|
||||
@@ -53,10 +53,10 @@
|
||||
#ifndef _SIMPLEIO_CH
|
||||
#define _SIMPLEIO_CH
|
||||
|
||||
#command ? [ <xList,...> ] => ( OutStd( hb_OSNewLine() ) [, OutStd( <xList> ) ] )
|
||||
#command ? [ <xList,...> ] => ( OutStd( hb_eol() ) [, OutStd( <xList> ) ] )
|
||||
#command ?? [ <xList,...> ] => OutStd( <xList> )
|
||||
|
||||
#command ACCEPT TO <idVar> => <idVar> := StrTran( FReadStr( 0, 256 ), hb_OSNewLine() )
|
||||
#command ACCEPT TO <idVar> => <idVar> := StrTran( FReadStr( 0, 256 ), hb_eol() )
|
||||
#command ACCEPT <cPrompt> TO <idVar> => ? <cPrompt> ; ACCEPT TO <idVar>
|
||||
|
||||
#endif /* _SIMPLEIO_CH */
|
||||
|
||||
@@ -1807,11 +1807,11 @@ static HB_GENC_FUNC( hb_p_switch )
|
||||
"\t\ttype = hb_itemType( pSwitch );\n" );
|
||||
if( fStr )
|
||||
{
|
||||
fprintf( cargo->yyc, "\t\tpszText = (type & HB_IT_STRING) ? hb_itemGetCPtr( pSwitch ) : NULL;\n" );
|
||||
fprintf( cargo->yyc, "\t\tpszText = ( type & HB_IT_STRING ) ? hb_itemGetCPtr( pSwitch ) : NULL;\n" );
|
||||
fprintf( cargo->yyc, "\t\tnLen = pszText ? hb_itemGetCLen( pSwitch ) : 0;\n" );
|
||||
}
|
||||
if( fNum )
|
||||
fprintf( cargo->yyc, "\t\tlVal = (type & HB_IT_NUMINT) ? hb_itemGetNL( pSwitch ) : 0;\n\n" );
|
||||
fprintf( cargo->yyc, "\t\tlVal = ( type & HB_IT_NUMINT ) ? hb_itemGetNL( pSwitch ) : 0;\n\n" );
|
||||
}
|
||||
|
||||
nPCodePos = nStart + 3;
|
||||
@@ -1820,7 +1820,7 @@ static HB_GENC_FUNC( hb_p_switch )
|
||||
switch( pFunc->pCode[ nPCodePos ] )
|
||||
{
|
||||
case HB_P_PUSHLONG:
|
||||
fprintf( cargo->yyc, "\t\tif( (type & HB_IT_NUMINT) != 0 && lVal == %ldL )\n",
|
||||
fprintf( cargo->yyc, "\t\tif( ( type & HB_IT_NUMINT ) != 0 && lVal == %ldL )\n",
|
||||
HB_PCODE_MKLONG( &pFunc->pCode[ nPCodePos + 1 ] ) );
|
||||
nPCodePos += 5;
|
||||
break;
|
||||
|
||||
@@ -2269,7 +2269,7 @@ METHOD SaveSettings() CLASS HBDebugger
|
||||
IF LastKey() != K_ESC
|
||||
|
||||
IF ! Empty( ::cPathForFiles )
|
||||
cInfo += "Options Path " + ::cPathForFiles + hb_OSNewLine()
|
||||
cInfo += "Options Path " + ::cPathForFiles + hb_eol()
|
||||
ENDIF
|
||||
|
||||
cInfo += "Options Colors {"
|
||||
@@ -2279,60 +2279,60 @@ METHOD SaveSettings() CLASS HBDebugger
|
||||
cInfo += ","
|
||||
ENDIF
|
||||
NEXT
|
||||
cInfo += "}" + hb_OSNewLine()
|
||||
cInfo += "}" + hb_eol()
|
||||
|
||||
IF ::lMonoDisplay
|
||||
cInfo += "Options mono " + hb_OSNewLine()
|
||||
cInfo += "Options mono " + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF !::lRunAtStartup
|
||||
cInfo += "Options NoRunAtStartup " + hb_OSNewLine()
|
||||
cInfo += "Options NoRunAtStartup " + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ::nSpeed != 0
|
||||
cInfo += "Run Speed " + hb_NToS( ::nSpeed ) + hb_OSNewLine()
|
||||
cInfo += "Run Speed " + hb_NToS( ::nSpeed ) + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ::nTabWidth != 4
|
||||
cInfo += "Options Tab " + hb_NToS( ::nTabWidth ) + hb_OSNewLine()
|
||||
cInfo += "Options Tab " + hb_NToS( ::nTabWidth ) + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ::lShowStatics
|
||||
cInfo += "Monitor Static" + hb_OSNewLine()
|
||||
cInfo += "Monitor Static" + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ::lShowPublics
|
||||
cInfo += "Monitor Public" + hb_OSNewLine()
|
||||
cInfo += "Monitor Public" + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ::lShowLocals
|
||||
cInfo += "Monitor Local" + hb_OSNewLine()
|
||||
cInfo += "Monitor Local" + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ::lShowPrivates
|
||||
cInfo += "Monitor Private" + hb_OSNewLine()
|
||||
cInfo += "Monitor Private" + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ::lShowGlobals
|
||||
cInfo += "Monitor Global" + hb_OSNewLine()
|
||||
cInfo += "Monitor Global" + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ::lSortVars
|
||||
cInfo += "Monitor Sort" + hb_OSNewLine()
|
||||
cInfo += "Monitor Sort" + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ::lShowCallStack
|
||||
cInfo += "View CallStack" + hb_OSNewLine()
|
||||
cInfo += "View CallStack" + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ! ::lLineNumbers
|
||||
cInfo += "Num Off" + hb_OSNewLine()
|
||||
cInfo += "Num Off" + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF ! Empty( ::aBreakPoints )
|
||||
FOR n := 1 TO Len( ::aBreakPoints )
|
||||
cInfo += "BP " + hb_NToS( ::aBreakPoints[ n ][ 1 ] ) + " " + ;
|
||||
AllTrim( ::aBreakPoints[ n ][ 2 ] ) + hb_OSNewLine()
|
||||
AllTrim( ::aBreakPoints[ n ][ 2 ] ) + hb_eol()
|
||||
NEXT
|
||||
ENDIF
|
||||
|
||||
@@ -2340,10 +2340,10 @@ METHOD SaveSettings() CLASS HBDebugger
|
||||
FOR n := 1 TO Len( ::aWindows )
|
||||
oWnd := ::aWindows[ n ]
|
||||
cInfo += "Window Size " + hb_NToS( oWnd:nBottom - oWnd:nTop + 1 ) + " "
|
||||
cInfo += hb_NToS( oWnd:nRight - oWnd:nLeft + 1 ) + hb_OSNewLine()
|
||||
cInfo += hb_NToS( oWnd:nRight - oWnd:nLeft + 1 ) + hb_eol()
|
||||
cInfo += "Window Move " + hb_NToS( oWnd:nTop ) + " "
|
||||
cInfo += hb_NToS( oWnd:nLeft ) + hb_OSNewLine()
|
||||
cInfo += "Window Next" + hb_OSNewLine()
|
||||
cInfo += hb_NToS( oWnd:nLeft ) + hb_eol()
|
||||
cInfo += "Window Next" + hb_eol()
|
||||
NEXT
|
||||
|
||||
hb_MemoWrit( ::cSettingsFileName, cInfo )
|
||||
|
||||
@@ -353,7 +353,7 @@ STATIC FUNCTION WhichEOL( cString )
|
||||
RETURN Chr( 13 ) + Chr( 10 )
|
||||
ENDIF
|
||||
|
||||
RETURN HB_OSNewLine()
|
||||
RETURN hb_eol()
|
||||
|
||||
STATIC FUNCTION Text2Array( cString )
|
||||
|
||||
|
||||
@@ -453,7 +453,7 @@ STATIC PROCEDURE ToLog( cCmd, nWA, xPar1, xPar2, xPar3 )
|
||||
ENDIF
|
||||
// Log to file only if cLog is a valid string
|
||||
IF HB_ISSTRING( cLog )
|
||||
FWrite( nHandle, cLog + hb_OSNewLine() )
|
||||
FWrite( nHandle, cLog + hb_eol() )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
@@ -48,7 +48,9 @@ FUNCTION Alert( cMessage, aOptions, cColorNorm )
|
||||
|
||||
#ifdef HB_CLP_UNDOC
|
||||
|
||||
DEFAULT s_lNoAlert TO hb_argCheck( "NOALERT" )
|
||||
IF s_lNoAlert == NIL
|
||||
s_lNoAlert := hb_argCheck( "NOALERT" )
|
||||
ENDIF
|
||||
|
||||
IF s_lNoAlert
|
||||
RETURN NIL
|
||||
@@ -103,7 +105,9 @@ FUNCTION hb_Alert( xMessage, aOptions, cColorNorm, nDelay )
|
||||
|
||||
#ifdef HB_CLP_UNDOC
|
||||
|
||||
DEFAULT s_lNoAlert TO hb_argCheck( "NOALERT" )
|
||||
IF s_lNoAlert == NIL
|
||||
s_lNoAlert := hb_argCheck( "NOALERT" )
|
||||
ENDIF
|
||||
|
||||
IF s_lNoAlert
|
||||
RETURN NIL
|
||||
|
||||
@@ -120,7 +120,7 @@ STATIC FUNCTION DefError( oError )
|
||||
nChoice := 0
|
||||
DO WHILE nChoice == 0
|
||||
|
||||
IF ISNIL( cDOSError )
|
||||
IF cDOSError == NIL
|
||||
nChoice := Alert( cMessage, aOptions )
|
||||
ELSE
|
||||
nChoice := Alert( cMessage + ";" + cDOSError, aOptions )
|
||||
@@ -129,29 +129,29 @@ STATIC FUNCTION DefError( oError )
|
||||
ENDDO
|
||||
|
||||
IF ! Empty( nChoice )
|
||||
DO CASE
|
||||
CASE aOptions[ nChoice ] == "Break"
|
||||
SWITCH aOptions[ nChoice ]
|
||||
CASE "Break"
|
||||
Break( oError )
|
||||
CASE aOptions[ nChoice ] == "Retry"
|
||||
CASE "Retry"
|
||||
RETURN .T.
|
||||
CASE aOptions[ nChoice ] == "Default"
|
||||
CASE "Default"
|
||||
RETURN .F.
|
||||
ENDCASE
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
|
||||
// "Quit" selected
|
||||
|
||||
IF ! ISNIL( cDOSError )
|
||||
IF cDOSError != NIL
|
||||
cMessage += " " + cDOSError
|
||||
ENDIF
|
||||
|
||||
OutErr( hb_OSNewLine() )
|
||||
OutErr( hb_eol() )
|
||||
OutErr( cMessage )
|
||||
|
||||
n := 1
|
||||
DO WHILE ! Empty( ProcName( ++n ) )
|
||||
|
||||
OutErr( hb_OSNewLine() )
|
||||
OutErr( hb_eol() )
|
||||
OutErr( "Called from " + ProcName( n ) + ;
|
||||
"(" + hb_NToS( ProcLine( n ) ) + ") " )
|
||||
|
||||
|
||||
@@ -120,10 +120,10 @@ FUNCTION __I18N_POTARRAYLOAD( cFile, cErrorMsg )
|
||||
cErrorMsg := "cannot read from file: " + cFile
|
||||
RETURN NIL
|
||||
ENDIF
|
||||
IF !hb_osNewLine() == _I18N_EOL
|
||||
cValue := strtran( cValue, hb_osNewLine(), _I18N_EOL )
|
||||
IF !hb_eol() == _I18N_EOL
|
||||
cValue := strtran( cValue, hb_eol(), _I18N_EOL )
|
||||
ENDIF
|
||||
IF !hb_osNewLine() == chr( 13 ) + chr( 10 )
|
||||
IF !hb_eol() == chr( 13 ) + chr( 10 )
|
||||
cValue := strtran( cValue, chr( 13 ) + chr( 10 ), _I18N_EOL )
|
||||
ENDIF
|
||||
aLines := hb_aTokens( cValue, _I18N_EOL )
|
||||
@@ -139,7 +139,7 @@ FUNCTION __I18N_POTARRAYLOAD( cFile, cErrorMsg )
|
||||
cLine := alltrim( cLine )
|
||||
++nLine
|
||||
IF lCont
|
||||
cValue += hb_osNewLine()
|
||||
cValue += hb_eol()
|
||||
ELSE
|
||||
IF cLine = "#" .AND. nMode == _I18N_NONE
|
||||
IF cLine = "#:" // source code references
|
||||
@@ -309,7 +309,7 @@ FUNCTION __I18N_POTARRAYSAVE( cFile, aTrans, cErrorMsg, lVersionNo, lSourceRef )
|
||||
ENDIF
|
||||
|
||||
lRet := .F.
|
||||
cEol := hb_osNewLine()
|
||||
cEol := hb_eol()
|
||||
cFlg := "#, c-format" + cEol
|
||||
cPOT := "#" + cEol + ;
|
||||
"# This file is generated by " + iif( lVersionNo, hb_version(), "Harbour" ) + cEol + ;
|
||||
@@ -535,7 +535,7 @@ FUNCTION HB_I18N_SAVEPOT( cFile, pI18N, cErrorMsg )
|
||||
cErrorMsg := "wrong translation set item"
|
||||
lRet := .F.
|
||||
ELSE
|
||||
cEol := hb_osNewLine()
|
||||
cEol := hb_eol()
|
||||
cFlg := "#, c-format" + cEol
|
||||
cPOT := "#" + cEol + ;
|
||||
"# This file is generated by " + hb_version() + cEol + ;
|
||||
|
||||
@@ -324,7 +324,7 @@ FUNCTION hb_IniWrite( xFileName, hIni, cCommentBegin, cCommentEnd, lAutoMain )
|
||||
RETURN .T.
|
||||
|
||||
FUNCTION hb_IniWriteStr( hIni, cCommentBegin, cCommentEnd, lAutoMain )
|
||||
LOCAL cNewLine := hb_OSNewLine()
|
||||
LOCAL cNewLine := hb_eol()
|
||||
LOCAL cSection
|
||||
LOCAL cBuffer := ""
|
||||
|
||||
|
||||
@@ -599,8 +599,8 @@ METHOD scroll( nMethod ) CLASS LISTBOX
|
||||
LOCAL nKey
|
||||
LOCAL nCount
|
||||
|
||||
DO CASE
|
||||
CASE nMethod == HTSCROLLTHUMBDRAG
|
||||
SWITCH nMethod
|
||||
CASE HTSCROLLTHUMBDRAG
|
||||
|
||||
nPrevMRow := MRow()
|
||||
|
||||
@@ -637,24 +637,27 @@ METHOD scroll( nMethod ) CLASS LISTBOX
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDDO
|
||||
EXIT
|
||||
|
||||
CASE nMethod == HTSCROLLUNITDEC
|
||||
CASE HTSCROLLUNITDEC
|
||||
|
||||
IF ::nTopItem > 1
|
||||
::nTopItem--
|
||||
::oVScroll:current := ::scrollbarPos()
|
||||
::display()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE nMethod == HTSCROLLUNITINC
|
||||
CASE HTSCROLLUNITINC
|
||||
|
||||
IF ( ::nTopItem + ::nBottom - ::nTop ) <= ::nItemCount + 1
|
||||
::nTopItem++
|
||||
::oVScroll:current := ::scrollbarPos()
|
||||
::display()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE nMethod == HTSCROLLBLOCKDEC
|
||||
CASE HTSCROLLBLOCKDEC
|
||||
|
||||
nPos := ::nBottom - ::nTop - iif( ::lDropDown, 2, 1 )
|
||||
nTopItem := ::nTopItem - nPos
|
||||
@@ -663,8 +666,9 @@ METHOD scroll( nMethod ) CLASS LISTBOX
|
||||
::oVScroll:current := ::scrollbarPos()
|
||||
::display()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE nMethod == HTSCROLLBLOCKINC
|
||||
CASE HTSCROLLBLOCKINC
|
||||
|
||||
nPos := ::nBottom - ::nTop - 1
|
||||
nItemCount := ::nItemCount
|
||||
@@ -677,8 +681,9 @@ METHOD scroll( nMethod ) CLASS LISTBOX
|
||||
::oVScroll:current := ::scrollbarPos()
|
||||
::display()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
ENDCASE
|
||||
ENDSWITCH
|
||||
|
||||
RETURN Self
|
||||
|
||||
|
||||
@@ -166,33 +166,37 @@ PROCEDURE CallMe500Times()
|
||||
|
||||
STATIC PROCEDURE Browser( oBrowse )
|
||||
LOCAL lBrowsing := .T.
|
||||
LOCAL nKey
|
||||
|
||||
DO WHILE lBrowsing
|
||||
|
||||
oBrowse:forceStable()
|
||||
|
||||
nKey := Inkey( 0 )
|
||||
|
||||
DO CASE
|
||||
CASE nKey == K_ESC
|
||||
SWITCH Inkey( 0 )
|
||||
CASE K_ESC
|
||||
lBrowsing := .F.
|
||||
CASE nKey == K_DOWN
|
||||
EXIT
|
||||
CASE K_DOWN
|
||||
oBrowse:down()
|
||||
CASE nKey == K_UP
|
||||
EXIT
|
||||
CASE K_UP
|
||||
oBrowse:up()
|
||||
CASE nKey == K_LEFT
|
||||
EXIT
|
||||
CASE K_LEFT
|
||||
oBrowse:left()
|
||||
CASE nKey == K_RIGHT
|
||||
EXIT
|
||||
CASE K_RIGHT
|
||||
oBrowse:right()
|
||||
CASE nKey == K_PGDN
|
||||
EXIT
|
||||
CASE K_PGDN
|
||||
oBrowse:pageDown()
|
||||
CASE nKey == K_PGUP
|
||||
EXIT
|
||||
CASE K_PGUP
|
||||
oBrowse:pageUp()
|
||||
EXIT
|
||||
|
||||
// And so on.... (not really necessary for this test)
|
||||
|
||||
ENDCASE
|
||||
ENDSWITCH
|
||||
|
||||
ENDDO
|
||||
|
||||
@@ -639,7 +643,7 @@ ENDCLASS
|
||||
METHOD writeLines( aLines ) CLASS HBProfileReportToFile
|
||||
|
||||
IF ::hFile != F_ERROR
|
||||
AEval( aLines, {| c | FWrite( ::hFile, c + HB_OSNewLine() ) } )
|
||||
AEval( aLines, {| c | FWrite( ::hFile, c + hb_eol() ) } )
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
@@ -710,7 +714,7 @@ ENDCLASS
|
||||
METHOD generate( bFilter ) CLASS HBProfileReportToString
|
||||
LOCAL cReport := ""
|
||||
|
||||
AEval( ::super:generate( bFilter ), {| c | cReport += c + HB_OSNewLine() } )
|
||||
AEval( ::super:generate( bFilter ), {| c | cReport += c + hb_eol() } )
|
||||
|
||||
RETURN cReport
|
||||
|
||||
|
||||
@@ -286,7 +286,7 @@ METHOD LineLen( nRow ) CLASS HBEditor
|
||||
METHOD GetText() CLASS HBEditor
|
||||
|
||||
LOCAL cString := ""
|
||||
LOCAL cEOL := HB_OSNewLine()
|
||||
LOCAL cEOL := hb_eol()
|
||||
|
||||
IF ::lWordWrap
|
||||
AEval( ::aText, {| cItem | cString += cItem:cText + iif( cItem:lSoftCR, "", cEOL ) },, ::naTextLen - 1 )
|
||||
@@ -470,8 +470,8 @@ METHOD MoveCursor( nKey ) CLASS HBEditor
|
||||
|
||||
LOCAL lMoveKey := .T.
|
||||
|
||||
DO CASE
|
||||
CASE nKey == K_DOWN
|
||||
SWITCH nKey
|
||||
CASE K_DOWN
|
||||
IF !::lEditAllow
|
||||
DO WHILE ::Row() < ::nBottom .AND. ::nRow < ::naTextLen
|
||||
::nRow++
|
||||
@@ -491,8 +491,9 @@ METHOD MoveCursor( nKey ) CLASS HBEditor
|
||||
::SetPos( ::Row() + 1, ::Col() )
|
||||
ENDIF
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_PGDN
|
||||
CASE K_PGDN
|
||||
IF ::nRow + ::nNumRows < ::naTextLen
|
||||
::nRow += ::nNumRows
|
||||
IF ::nFirstRow + ::nNumRows > ::naTextLen
|
||||
@@ -506,16 +507,18 @@ METHOD MoveCursor( nKey ) CLASS HBEditor
|
||||
::SetPos( Min( ::nTop + ::naTextLen - 1, ::nBottom ), ::Col() )
|
||||
ENDIF
|
||||
::display()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_PGDN
|
||||
CASE K_CTRL_PGDN
|
||||
::nRow := ::naTextLen
|
||||
::nCol := Max( ::LineLen( ::nRow ) + 1, 1 )
|
||||
::nFirstRow := Max( ::naTextLen - ::nNumRows + 1, 1 )
|
||||
::nFirstCol := Max( ::nCol - ::nNumCols + 1, 1 )
|
||||
::SetPos( Min( ::nTop + ::naTextLen - 1, ::nBottom ), Min( ::nLeft + ::nCol - 1, ::nRight ) )
|
||||
::display()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_UP
|
||||
CASE K_UP
|
||||
IF ! ::lEditAllow
|
||||
DO WHILE ::Row() > ::nTop .AND. ::nRow > 1
|
||||
::nRow--
|
||||
@@ -533,8 +536,9 @@ METHOD MoveCursor( nKey ) CLASS HBEditor
|
||||
::nRow--
|
||||
::SetPos( ::Row() - 1, ::Col() )
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_PGUP
|
||||
CASE K_PGUP
|
||||
IF ( ::nRow - ::nNumRows ) > 1
|
||||
::nRow -= ::nNumRows
|
||||
::nFirstRow -= ::nNumRows
|
||||
@@ -549,16 +553,18 @@ METHOD MoveCursor( nKey ) CLASS HBEditor
|
||||
::SetPos( ::nTop, ::Col() )
|
||||
ENDIF
|
||||
::display()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_PGUP
|
||||
CASE K_CTRL_PGUP
|
||||
::nRow := 1
|
||||
::nCol := 1
|
||||
::nFirstCol := 1
|
||||
::nFirstRow := 1
|
||||
::SetPos( ::nTop, ::nLeft )
|
||||
::display()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_RIGHT
|
||||
CASE K_RIGHT
|
||||
IF ::Col() == ::nRight
|
||||
IF ::nCol <= iif( ::lWordWrap, ::nWordWrapCol, ::LineLen( ::nRow ) )
|
||||
hb_scroll( ::nTop, ::nLeft, ::nBottom, ::nRight,, 1 )
|
||||
@@ -570,8 +576,9 @@ METHOD MoveCursor( nKey ) CLASS HBEditor
|
||||
::nCol++
|
||||
::SetPos( ::Row(), ::Col() + 1 )
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_RIGHT
|
||||
CASE K_CTRL_RIGHT
|
||||
// NOTE: should be faster without call to ::GetLine()
|
||||
DO WHILE ::nCol <= iif( ::lWordWrap, Min( ::nWordWrapCol, ::LineLen( ::nRow ) ), ::LineLen( ::nRow ) ) .AND. !( SubStr( ::aText[ ::nRow ]:cText, ::nCol, 1 ) == " " )
|
||||
::MoveCursor( K_RIGHT )
|
||||
@@ -579,8 +586,9 @@ METHOD MoveCursor( nKey ) CLASS HBEditor
|
||||
DO WHILE ::nCol <= iif( ::lWordWrap, Min( ::nWordWrapCol, ::LineLen( ::nRow ) ), ::LineLen( ::nRow ) ) .AND. SubStr( ::aText[ ::nRow ]:cText, ::nCol, 1 ) == " "
|
||||
::MoveCursor( K_RIGHT )
|
||||
ENDDO
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_LEFT
|
||||
CASE K_LEFT
|
||||
IF ::Col() == ::nLeft
|
||||
IF ::nCol > 1
|
||||
hb_scroll( ::nTop, ::nLeft, ::nBottom, ::nRight,, -1 )
|
||||
@@ -592,36 +600,41 @@ METHOD MoveCursor( nKey ) CLASS HBEditor
|
||||
::nCol--
|
||||
::SetPos( ::Row(), ::Col() - 1 )
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_LEFT
|
||||
CASE K_CTRL_LEFT
|
||||
DO WHILE ::nCol > 1 .AND. !( SubStr( ::aText[ ::nRow ]:cText, ::nCol, 1 ) == " " )
|
||||
::MoveCursor( K_LEFT )
|
||||
ENDDO
|
||||
DO WHILE ::nCol > 1 .AND. SubStr( ::aText[ ::nRow ]:cText, ::nCol, 1 ) == " "
|
||||
::MoveCursor( K_LEFT )
|
||||
ENDDO
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_HOME
|
||||
CASE K_HOME
|
||||
::nCol := 1
|
||||
::nFirstCol := 1
|
||||
::SetPos( ::Row(), ::nLeft )
|
||||
::display()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_HOME
|
||||
CASE K_CTRL_HOME
|
||||
::nCol := 1
|
||||
::nFirstCol := 1
|
||||
::nRow -= ( ::Row() - ::nTop )
|
||||
::SetPos( ::nTop, ::nLeft )
|
||||
::display()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_END
|
||||
CASE K_END
|
||||
// Empty lines have 0 len
|
||||
::nCol := Max( ::LineLen( ::nRow ) + 1, 1 )
|
||||
::nFirstCol := Max( ::nCol - ::nNumCols + 1, 1 )
|
||||
::SetPos( ::Row(), Min( ::nLeft + ::nCol - 1, ::nRight ) )
|
||||
::display()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_END
|
||||
CASE K_CTRL_END
|
||||
::nRow += ::nBottom - ::Row()
|
||||
IF ::nRow > ::naTextLen
|
||||
::nRow := ::naTextLen
|
||||
@@ -630,11 +643,12 @@ METHOD MoveCursor( nKey ) CLASS HBEditor
|
||||
::nFirstCol := Max( ::nCol - ::nNumCols + 1, 1 )
|
||||
::SetPos( Min( ::nTop + ::naTextLen - 1, ::nBottom ), Min( ::nLeft + ::nCol - 1, ::nRight ) )
|
||||
::display()
|
||||
EXIT
|
||||
|
||||
OTHERWISE
|
||||
lMoveKey := .F.
|
||||
|
||||
ENDCASE
|
||||
ENDSWITCH
|
||||
|
||||
RETURN lMoveKey
|
||||
|
||||
@@ -1081,7 +1095,7 @@ STATIC FUNCTION WhichEOL( cString )
|
||||
RETURN Chr( 13 ) + Chr( 10 )
|
||||
ENDIF
|
||||
|
||||
RETURN HB_OSNewLine()
|
||||
RETURN hb_eol()
|
||||
|
||||
// Converts a string to an array of strings splitting input string at EOL boundaries
|
||||
STATIC FUNCTION Text2Array( cString, nWordWrapCol )
|
||||
|
||||
@@ -361,47 +361,59 @@ METHOD GetApplyKey( nKey, oGet, oMenu, aMsg ) CLASS HBGetList
|
||||
HB_SYMBOL_UNUSED( aMsg )
|
||||
#endif
|
||||
|
||||
DO CASE
|
||||
CASE nKey == K_UP
|
||||
SWITCH nKey
|
||||
CASE K_UP
|
||||
oGet:exitState := GE_UP
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_SH_TAB
|
||||
CASE K_SH_TAB
|
||||
oGet:exitState := GE_UP
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_DOWN
|
||||
CASE K_DOWN
|
||||
oGet:exitState := GE_DOWN
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_TAB
|
||||
CASE K_TAB
|
||||
oGet:exitState := GE_DOWN
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_ENTER
|
||||
CASE K_ENTER
|
||||
oGet:exitState := GE_ENTER
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_ESC
|
||||
CASE K_ESC
|
||||
IF Set( _SET_ESCAPE )
|
||||
oGet:undo()
|
||||
oGet:exitState := GE_ESCAPE
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_PGUP
|
||||
CASE K_PGUP
|
||||
oGet:exitState := GE_WRITE
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_PGDN
|
||||
CASE K_PGDN
|
||||
oGet:exitState := GE_WRITE
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_HOME
|
||||
CASE K_CTRL_HOME
|
||||
oGet:exitState := GE_TOP
|
||||
EXIT
|
||||
|
||||
#ifdef CTRL_END_SPECIAL
|
||||
CASE nKey == K_CTRL_END
|
||||
CASE K_CTRL_END
|
||||
oGet:exitState := GE_BOTTOM
|
||||
EXIT
|
||||
#else
|
||||
CASE nKey == K_CTRL_W
|
||||
CASE K_CTRL_W
|
||||
oGet:exitState := GE_WRITE
|
||||
EXIT
|
||||
#endif
|
||||
|
||||
#ifdef HB_COMPAT_C53
|
||||
CASE nKey == K_LBUTTONDOWN .OR. nKey == K_LDBLCLK
|
||||
CASE K_LBUTTONDOWN
|
||||
CASE K_LDBLCLK
|
||||
|
||||
nMRow := MRow()
|
||||
nMCol := MCol()
|
||||
@@ -449,47 +461,61 @@ METHOD GetApplyKey( nKey, oGet, oMenu, aMsg ) CLASS HBGetList
|
||||
ELSE
|
||||
oGet:exitState := GE_NOEXIT
|
||||
ENDIF
|
||||
EXIT
|
||||
#endif
|
||||
|
||||
CASE nKey == K_UNDO
|
||||
CASE K_UNDO
|
||||
oGet:undo()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_HOME
|
||||
CASE K_HOME
|
||||
oGet:home()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_END
|
||||
CASE K_END
|
||||
oGet:end()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_RIGHT
|
||||
CASE K_RIGHT
|
||||
oGet:right()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_LEFT
|
||||
CASE K_LEFT
|
||||
oGet:left()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_RIGHT
|
||||
CASE K_CTRL_RIGHT
|
||||
oGet:wordRight()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_LEFT
|
||||
CASE K_CTRL_LEFT
|
||||
oGet:wordLeft()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_BS
|
||||
CASE K_BS
|
||||
oGet:backSpace()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_DEL
|
||||
CASE K_DEL
|
||||
oGet:delete()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_T
|
||||
CASE K_CTRL_T
|
||||
oGet:delWordRight()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_Y
|
||||
CASE K_CTRL_Y
|
||||
oGet:delEnd()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_BS
|
||||
CASE K_CTRL_BS
|
||||
oGet:delWordLeft()
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_INS
|
||||
CASE K_INS
|
||||
Set( _SET_INSERT, ! Set( _SET_INSERT ) )
|
||||
::ShowScoreboard()
|
||||
EXIT
|
||||
|
||||
OTHERWISE
|
||||
|
||||
@@ -515,7 +541,7 @@ METHOD GetApplyKey( nKey, oGet, oMenu, aMsg ) CLASS HBGetList
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDCASE
|
||||
ENDSWITCH
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -684,33 +710,38 @@ METHOD Settle( nPos, lInit ) CLASS HBGetList
|
||||
|
||||
ENDIF
|
||||
|
||||
DO CASE
|
||||
CASE nExitState == GE_UP
|
||||
SWITCH nExitState
|
||||
CASE GE_UP
|
||||
nPos--
|
||||
EXIT
|
||||
|
||||
CASE nExitState == GE_DOWN
|
||||
CASE GE_DOWN
|
||||
nPos++
|
||||
EXIT
|
||||
|
||||
CASE nExitState == GE_TOP
|
||||
CASE GE_TOP
|
||||
nPos := 1
|
||||
::lBumpTop := .T.
|
||||
nExitState := GE_DOWN
|
||||
EXIT
|
||||
|
||||
CASE nExitState == GE_BOTTOM
|
||||
CASE GE_BOTTOM
|
||||
nPos := Len( ::aGetList )
|
||||
::lBumpBot := .T.
|
||||
nExitState := GE_UP
|
||||
EXIT
|
||||
|
||||
CASE nExitState == GE_ENTER
|
||||
CASE GE_ENTER
|
||||
nPos++
|
||||
EXIT
|
||||
|
||||
CASE nExitState == GE_SHORTCUT
|
||||
CASE GE_SHORTCUT
|
||||
RETURN ::nNextGet
|
||||
|
||||
CASE nExitState == GE_MOUSEHIT
|
||||
CASE GE_MOUSEHIT
|
||||
RETURN ::nNextGet
|
||||
|
||||
ENDCASE
|
||||
ENDSWITCH
|
||||
|
||||
IF nPos == 0
|
||||
IF ! Set( _SET_EXIT ) .AND. ! ::lBumpBot
|
||||
@@ -991,52 +1022,64 @@ METHOD GUIApplyKey( oGet, oGUI, nKey, oMenu, aMsg ) CLASS HBGetList
|
||||
|
||||
ENDIF
|
||||
|
||||
DO CASE
|
||||
CASE nKey == K_UP
|
||||
SWITCH nKey
|
||||
CASE K_UP
|
||||
oGet:exitState := GE_UP
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_SH_TAB
|
||||
CASE K_SH_TAB
|
||||
oGet:exitState := GE_UP
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_DOWN
|
||||
CASE K_DOWN
|
||||
oGet:exitState := GE_DOWN
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_TAB
|
||||
CASE K_TAB
|
||||
oGet:exitState := GE_DOWN
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_ENTER
|
||||
CASE K_ENTER
|
||||
oGet:exitState := GE_ENTER
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_ESC
|
||||
CASE K_ESC
|
||||
IF Set( _SET_ESCAPE )
|
||||
oGet:exitState := GE_ESCAPE
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_PGUP
|
||||
CASE K_PGUP
|
||||
oGet:exitState := GE_WRITE
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_PGDN
|
||||
CASE K_PGDN
|
||||
oGet:exitState := GE_WRITE
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_CTRL_HOME
|
||||
CASE K_CTRL_HOME
|
||||
oGet:exitState := GE_TOP
|
||||
EXIT
|
||||
|
||||
|
||||
#ifdef CTRL_END_SPECIAL
|
||||
|
||||
// Both ^W and ^End go to the last GET
|
||||
CASE nKey == K_CTRL_END
|
||||
CASE K_CTRL_END
|
||||
oGet:exitState := GE_BOTTOM
|
||||
EXIT
|
||||
|
||||
#else
|
||||
|
||||
// Both ^W and ^End terminate the READ (the default)
|
||||
CASE nKey == K_CTRL_W
|
||||
CASE K_CTRL_W
|
||||
oGet:exitState := GE_WRITE
|
||||
EXIT
|
||||
|
||||
#endif
|
||||
|
||||
CASE nKey == K_LBUTTONDOWN .OR. nKey == K_LDBLCLK
|
||||
CASE K_LBUTTONDOWN
|
||||
CASE K_LDBLCLK
|
||||
|
||||
nMRow := MRow()
|
||||
nMCol := MCol()
|
||||
@@ -1084,7 +1127,9 @@ METHOD GUIApplyKey( oGet, oGUI, nKey, oMenu, aMsg ) CLASS HBGetList
|
||||
oGUI:Display()
|
||||
ENDIF
|
||||
|
||||
ENDCASE
|
||||
EXIT
|
||||
|
||||
ENDSWITCH
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -1203,41 +1248,48 @@ METHOD TBApplyKey( oGet, oTB, nKey, oMenu, aMsg ) CLASS HBGetList
|
||||
nKey := 0
|
||||
ENDIF
|
||||
|
||||
DO CASE
|
||||
CASE nKey == K_TAB
|
||||
SWITCH nKey
|
||||
CASE K_TAB
|
||||
oGet:exitState := GE_DOWN
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_SH_TAB
|
||||
CASE K_SH_TAB
|
||||
oGet:exitState := GE_UP
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_ENTER
|
||||
CASE K_ENTER
|
||||
#ifndef HB_CLP_STRICT
|
||||
IF !oTb:Stable()
|
||||
oTb:ForceStable()
|
||||
ENDIF
|
||||
#endif
|
||||
oGet:exitState := GE_ENTER
|
||||
EXIT
|
||||
|
||||
CASE nKey == K_ESC
|
||||
CASE K_ESC
|
||||
IF Set( _SET_ESCAPE )
|
||||
oGet:exitState := GE_ESCAPE
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
#ifdef CTRL_END_SPECIAL
|
||||
|
||||
// Both ^W and ^End go to the last GET
|
||||
CASE nKey == K_CTRL_END
|
||||
CASE K_CTRL_END
|
||||
oGet:exitState := GE_BOTTOM
|
||||
EXIT
|
||||
|
||||
#else
|
||||
|
||||
// Both ^W and ^End terminate the READ (the default)
|
||||
CASE nKey == K_CTRL_W
|
||||
CASE K_CTRL_W
|
||||
oGet:exitState := GE_WRITE
|
||||
EXIT
|
||||
|
||||
#endif
|
||||
|
||||
CASE nKey == K_LBUTTONDOWN .OR. nKey == K_LDBLCLK
|
||||
CASE K_LBUTTONDOWN
|
||||
CASE K_LDBLCLK
|
||||
|
||||
nMRow := MRow()
|
||||
nMCol := MCol()
|
||||
@@ -1261,7 +1313,9 @@ METHOD TBApplyKey( oGet, oTB, nKey, oMenu, aMsg ) CLASS HBGetList
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
ENDCASE
|
||||
EXIT
|
||||
|
||||
ENDSWITCH
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -1519,48 +1573,48 @@ METHOD HitTest( nMRow, nMCol, aMsg ) CLASS HBGetList
|
||||
METHOD ReadStats( nElement, xNewValue ) CLASS HBGetList
|
||||
LOCAL xRetVal
|
||||
|
||||
DO CASE
|
||||
CASE nElement == SLUPDATED ; xRetVal := ::lUpdated
|
||||
CASE nElement == SBFORMAT ; xRetVal := ::bFormat
|
||||
CASE nElement == SLKILLREAD ; xRetVal := ::lKillRead
|
||||
CASE nElement == SLBUMPTOP ; xRetVal := ::lBumpTop
|
||||
CASE nElement == SLBUMPBOT ; xRetVal := ::lBumpBot
|
||||
CASE nElement == SNLASTEXIT ; xRetVal := ::nLastExitState
|
||||
CASE nElement == SNLASTPOS ; xRetVal := ::nLastPos
|
||||
CASE nElement == SOACTIVEGET ; xRetVal := ::oActiveGet
|
||||
CASE nElement == SXREADVAR ; xRetVal := ::cVarName
|
||||
CASE nElement == SCREADPROCNAME ; xRetVal := ::cReadProcName
|
||||
CASE nElement == SNREADPROCLINE ; xRetVal := ::nReadProcLine
|
||||
CASE nElement == SNNEXTGET ; xRetVal := ::nNextGet
|
||||
CASE nElement == SNHITCODE ; xRetVal := ::nHitCode
|
||||
CASE nElement == SNPOS ; xRetVal := ::nPos
|
||||
CASE nElement == SCSCRSVMSG ; xRetVal := ::cMsgSaveS
|
||||
CASE nElement == SNMENUID ; xRetVal := ::nMenuID
|
||||
CASE nElement == SNSVCURSOR ; xRetVal := ::nSaveCursor
|
||||
OTHERWISE ; xRetVal := NIL
|
||||
ENDCASE
|
||||
SWITCH nElement
|
||||
CASE SLUPDATED ; xRetVal := ::lUpdated ; EXIT
|
||||
CASE SBFORMAT ; xRetVal := ::bFormat ; EXIT
|
||||
CASE SLKILLREAD ; xRetVal := ::lKillRead ; EXIT
|
||||
CASE SLBUMPTOP ; xRetVal := ::lBumpTop ; EXIT
|
||||
CASE SLBUMPBOT ; xRetVal := ::lBumpBot ; EXIT
|
||||
CASE SNLASTEXIT ; xRetVal := ::nLastExitState ; EXIT
|
||||
CASE SNLASTPOS ; xRetVal := ::nLastPos ; EXIT
|
||||
CASE SOACTIVEGET ; xRetVal := ::oActiveGet ; EXIT
|
||||
CASE SXREADVAR ; xRetVal := ::cVarName ; EXIT
|
||||
CASE SCREADPROCNAME ; xRetVal := ::cReadProcName ; EXIT
|
||||
CASE SNREADPROCLINE ; xRetVal := ::nReadProcLine ; EXIT
|
||||
CASE SNNEXTGET ; xRetVal := ::nNextGet ; EXIT
|
||||
CASE SNHITCODE ; xRetVal := ::nHitCode ; EXIT
|
||||
CASE SNPOS ; xRetVal := ::nPos ; EXIT
|
||||
CASE SCSCRSVMSG ; xRetVal := ::cMsgSaveS ; EXIT
|
||||
CASE SNMENUID ; xRetVal := ::nMenuID ; EXIT
|
||||
CASE SNSVCURSOR ; xRetVal := ::nSaveCursor ; EXIT
|
||||
OTHERWISE ; xRetVal := NIL
|
||||
ENDSWITCH
|
||||
|
||||
IF PCount() > 1
|
||||
|
||||
DO CASE
|
||||
CASE nElement == SLUPDATED ; ::lUpdated := xNewValue
|
||||
CASE nElement == SBFORMAT ; ::bFormat := xNewValue
|
||||
CASE nElement == SLKILLREAD ; ::lKillRead := xNewValue
|
||||
CASE nElement == SLBUMPTOP ; ::lBumpTop := xNewValue
|
||||
CASE nElement == SLBUMPBOT ; ::lBumpBot := xNewValue
|
||||
CASE nElement == SNLASTEXIT ; ::nLastExitState := xNewValue
|
||||
CASE nElement == SNLASTPOS ; ::nLastPos := xNewValue
|
||||
CASE nElement == SOACTIVEGET ; ::oActiveGet := xNewValue
|
||||
CASE nElement == SXREADVAR ; ::xReadVar := xNewValue
|
||||
CASE nElement == SCREADPROCNAME ; ::cReadProcName := xNewValue
|
||||
CASE nElement == SNREADPROCLINE ; ::nReadProcLine := xNewValue
|
||||
CASE nElement == SNNEXTGET ; ::nNextGet := xNewValue
|
||||
CASE nElement == SNHITCODE ; ::nHitCode := xNewValue
|
||||
CASE nElement == SNPOS ; ::nPos := xNewValue
|
||||
CASE nElement == SCSCRSVMSG ; ::cMsgSaveS := xNewValue
|
||||
CASE nElement == SNMENUID ; ::nMenuID := xNewValue
|
||||
CASE nElement == SNSVCURSOR ; ::nSaveCursor := xNewValue
|
||||
ENDCASE
|
||||
SWITCH nElement
|
||||
CASE SLUPDATED ; ::lUpdated := xNewValue ; EXIT
|
||||
CASE SBFORMAT ; ::bFormat := xNewValue ; EXIT
|
||||
CASE SLKILLREAD ; ::lKillRead := xNewValue ; EXIT
|
||||
CASE SLBUMPTOP ; ::lBumpTop := xNewValue ; EXIT
|
||||
CASE SLBUMPBOT ; ::lBumpBot := xNewValue ; EXIT
|
||||
CASE SNLASTEXIT ; ::nLastExitState := xNewValue ; EXIT
|
||||
CASE SNLASTPOS ; ::nLastPos := xNewValue ; EXIT
|
||||
CASE SOACTIVEGET ; ::oActiveGet := xNewValue ; EXIT
|
||||
CASE SXREADVAR ; ::xReadVar := xNewValue ; EXIT
|
||||
CASE SCREADPROCNAME ; ::cReadProcName := xNewValue ; EXIT
|
||||
CASE SNREADPROCLINE ; ::nReadProcLine := xNewValue ; EXIT
|
||||
CASE SNNEXTGET ; ::nNextGet := xNewValue ; EXIT
|
||||
CASE SNHITCODE ; ::nHitCode := xNewValue ; EXIT
|
||||
CASE SNPOS ; ::nPos := xNewValue ; EXIT
|
||||
CASE SCSCRSVMSG ; ::cMsgSaveS := xNewValue ; EXIT
|
||||
CASE SNMENUID ; ::nMenuID := xNewValue ; EXIT
|
||||
CASE SNSVCURSOR ; ::nSaveCursor := xNewValue ; EXIT
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
|
||||
RETURN xRetVal
|
||||
|
||||
@@ -128,9 +128,9 @@ METHOD SaveToText( cObjectName, nIndent ) CLASS HBPersistent
|
||||
nIndent := 0
|
||||
ENDIF
|
||||
|
||||
cObject := iif( nIndent > 0, hb_OSNewLine(), "" ) + Space( nIndent ) + ;
|
||||
cObject := iif( nIndent > 0, hb_eol(), "" ) + Space( nIndent ) + ;
|
||||
"OBJECT " + iif( nIndent != 0, "::", "" ) + cObjectName + " AS " + ;
|
||||
::ClassName() + hb_OSNewLine()
|
||||
::ClassName() + hb_eol()
|
||||
|
||||
aProperties := __ClsGetProperties( ::ClassH )
|
||||
|
||||
@@ -147,7 +147,7 @@ METHOD SaveToText( cObjectName, nIndent ) CLASS HBPersistent
|
||||
cObject += ArrayToText( uValue, aProperties[ n ], nIndent )
|
||||
nIndent -= 3
|
||||
IF n < Len( aProperties )
|
||||
cObject += hb_OSNewLine()
|
||||
cObject += hb_eol()
|
||||
ENDIF
|
||||
|
||||
CASE cType == "O"
|
||||
@@ -155,89 +155,79 @@ METHOD SaveToText( cObjectName, nIndent ) CLASS HBPersistent
|
||||
cObject += uValue:SaveToText( aProperties[ n ], nIndent )
|
||||
ENDIF
|
||||
IF n < Len( aProperties )
|
||||
cObject += hb_OSNewLine()
|
||||
cObject += hb_eol()
|
||||
ENDIF
|
||||
|
||||
OTHERWISE
|
||||
IF n == 1
|
||||
cObject += hb_OSNewLine()
|
||||
cObject += hb_eol()
|
||||
ENDIF
|
||||
cObject += Space( nIndent ) + " ::" + ;
|
||||
aProperties[ n ] + " = " + ValToText( uValue ) + ;
|
||||
hb_OSNewLine()
|
||||
hb_eol()
|
||||
ENDCASE
|
||||
|
||||
ENDIF
|
||||
|
||||
NEXT
|
||||
|
||||
cObject += hb_OSNewLine() + Space( nIndent ) + "ENDOBJECT" + hb_OSNewLine()
|
||||
cObject += hb_eol() + Space( nIndent ) + "ENDOBJECT" + hb_eol()
|
||||
|
||||
RETURN cObject
|
||||
|
||||
STATIC FUNCTION ArrayToText( aArray, cName, nIndent )
|
||||
|
||||
LOCAL cArray := hb_OSNewLine() + Space( nIndent ) + "ARRAY ::" + cName + ;
|
||||
" LEN " + hb_NToS( Len( aArray ) ) + hb_OSNewLine()
|
||||
LOCAL cArray := hb_eol() + Space( nIndent ) + "ARRAY ::" + cName + ;
|
||||
" LEN " + hb_NToS( Len( aArray ) ) + hb_eol()
|
||||
LOCAL n
|
||||
LOCAL uValue
|
||||
LOCAL cType
|
||||
|
||||
FOR n := 1 TO Len( aArray )
|
||||
uValue := aArray[ n ]
|
||||
cType := ValType( uValue )
|
||||
|
||||
DO CASE
|
||||
CASE cType == "A"
|
||||
SWITCH ValType( uValue )
|
||||
CASE "A"
|
||||
nIndent += 3
|
||||
cArray += ArrayToText( uValue, cName + "[ " + ;
|
||||
hb_NToS( n ) + " ]", nIndent ) + hb_OSNewLine()
|
||||
hb_NToS( n ) + " ]", nIndent ) + hb_eol()
|
||||
nIndent -= 3
|
||||
EXIT
|
||||
|
||||
CASE cType == "O"
|
||||
CASE "O"
|
||||
IF __objDerivedFrom( uValue, "HBPERSISTENT" )
|
||||
cArray += uValue:SaveToText( cName + "[ " + hb_NToS( n ) + ;
|
||||
" ]", nIndent )
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
OTHERWISE
|
||||
IF n == 1
|
||||
cArray += hb_OSNewLine()
|
||||
cArray += hb_eol()
|
||||
ENDIF
|
||||
cArray += Space( nIndent ) + " ::" + cName + ;
|
||||
+ "[ " + hb_NToS( n ) + " ]" + " = " + ;
|
||||
ValToText( uValue ) + hb_OSNewLine()
|
||||
ENDCASE
|
||||
ValToText( uValue ) + hb_eol()
|
||||
ENDSWITCH
|
||||
NEXT
|
||||
|
||||
cArray += hb_OSNewLine() + Space( nIndent ) + "ENDARRAY" + hb_OSNewLine()
|
||||
cArray += hb_eol() + Space( nIndent ) + "ENDARRAY" + hb_eol()
|
||||
|
||||
RETURN cArray
|
||||
|
||||
STATIC FUNCTION ValToText( uValue )
|
||||
|
||||
LOCAL cType := ValType( uValue )
|
||||
LOCAL cText
|
||||
SWITCH ValType( uValue )
|
||||
CASE "C"
|
||||
RETURN hb_StrToExp( uValue )
|
||||
CASE "N"
|
||||
RETURN hb_NToS( uValue )
|
||||
CASE "D"
|
||||
RETURN "0d" + iif( Empty( DToS( uValue ) ), "00000000", DToS( uValue ) )
|
||||
CASE "T"
|
||||
RETURN 't"' + hb_TSToStr( uValue, .T. ) + '"'
|
||||
ENDSWITCH
|
||||
|
||||
DO CASE
|
||||
CASE cType == "C"
|
||||
cText := hb_StrToExp( uValue )
|
||||
|
||||
CASE cType == "N"
|
||||
cText := hb_NToS( uValue )
|
||||
|
||||
CASE cType == "D"
|
||||
cText := DToS( uValue )
|
||||
cText := "0d" + iif( Empty( cText ), "00000000", cText )
|
||||
|
||||
CASE cType == "T"
|
||||
cText := 't"' + hb_TSToStr( uValue, .T. ) + '"'
|
||||
|
||||
OTHERWISE
|
||||
cText := hb_ValToStr( uValue )
|
||||
ENDCASE
|
||||
|
||||
RETURN cText
|
||||
RETURN hb_ValToStr( uValue )
|
||||
|
||||
/* Notice: nFrom must be supplied by reference */
|
||||
|
||||
|
||||
@@ -777,7 +777,7 @@ METHOD ExecuteReport() CLASS HBReportForm
|
||||
::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH]), nMaxLines)
|
||||
ELSEIF ::aReportData[RPT_COLUMNS,nCol,RCT_TYPE] $ "C"
|
||||
nMaxLines := Max( XMLCOUNT( StrTran( Eval( ::aReportData[RPT_COLUMNS,nCol,RCT_EXP]),;
|
||||
";", hb_osNewLine() ),;
|
||||
";", hb_eol() ),;
|
||||
::aReportData[RPT_COLUMNS,nCol,RCT_WIDTH]), nMaxLines)
|
||||
ENDIF
|
||||
NEXT
|
||||
@@ -796,7 +796,7 @@ METHOD ExecuteReport() CLASS HBReportForm
|
||||
// with multi-lines per record ";"- method
|
||||
IF ::aReportData[RPT_COLUMNS,nCol,RCT_TYPE] $ "C"
|
||||
cLine := XMEMOLINE( RTrim( StrTran( Eval(::aReportData[RPT_COLUMNS,nCol,RCT_EXP]),;
|
||||
";", hb_osNewLine() ) ),;
|
||||
";", hb_eol() ) ),;
|
||||
::aReportData[ RPT_COLUMNS, nCol, RCT_WIDTH ], nLine )
|
||||
ELSE
|
||||
cLine := XMEMOLINE( RTrim( Eval( ::aReportData[ RPT_COLUMNS, nCol, RCT_EXP ] ) ),;
|
||||
@@ -1320,23 +1320,29 @@ METHOD GetColumn( cFieldsBuffer AS STRING, nOffset AS NUMERIC ) CLASS HBReportFo
|
||||
IF Used()
|
||||
cType := ValType( Eval( aColumn[ RCT_EXP ] ) )
|
||||
aColumn[ RCT_TYPE ] := cType
|
||||
DO CASE
|
||||
CASE cType == "C" .OR. cType == "M"
|
||||
SWITCH cType
|
||||
CASE "C"
|
||||
CASE "M"
|
||||
aColumn[ RCT_PICT ] := Replicate("X", aColumn[ RCT_WIDTH ])
|
||||
CASE cType == "D"
|
||||
EXIT
|
||||
CASE "D"
|
||||
aColumn[ RCT_PICT ] := "@D"
|
||||
CASE cType == "T"
|
||||
EXIT
|
||||
CASE "T"
|
||||
aColumn[ RCT_PICT ] := "@T"
|
||||
CASE cType == "N"
|
||||
EXIT
|
||||
CASE "N"
|
||||
IF aColumn[ RCT_DECIMALS ] != 0
|
||||
aColumn[ RCT_PICT ] := Replicate("9", aColumn[ RCT_WIDTH ] - aColumn[ RCT_DECIMALS ] -1) + "." + ;
|
||||
Replicate("9", aColumn[ RCT_DECIMALS ])
|
||||
ELSE
|
||||
aColumn[ RCT_PICT ] := Replicate("9", aColumn[ RCT_WIDTH ])
|
||||
ENDIF
|
||||
CASE cType == "L"
|
||||
EXIT
|
||||
CASE "L"
|
||||
aColumn[ RCT_PICT ] := "@L" + Replicate("X",aColumn[ RCT_WIDTH ]-1)
|
||||
ENDCASE
|
||||
EXIT
|
||||
ENDSWITCH
|
||||
ENDIF
|
||||
|
||||
// Update offset into ?_buffer
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
CREATE CLASS HBTextLine
|
||||
|
||||
VAR cText /* A line of text */
|
||||
VAR lSoftCR /* true if line doesn't end with a hb_OSNewLine() char (word wrapping) */
|
||||
VAR lSoftCR /* true if line doesn't end with a hb_eol() char (word wrapping) */
|
||||
|
||||
METHOD New( cLine, lSoftCR )
|
||||
|
||||
|
||||
@@ -20,8 +20,6 @@ STATIC FUNCTION TestIt( cSpec )
|
||||
LOCAL a4
|
||||
LOCAL a5
|
||||
|
||||
LOCAL cNewLine := HB_OSNewLine()
|
||||
|
||||
// In order to account for documented behavour, this call will ensure
|
||||
// that Adir() returns the same length array in both cases.
|
||||
// ie: adir( cSpec ) could return a different length array than
|
||||
@@ -39,17 +37,16 @@ STATIC FUNCTION TestIt( cSpec )
|
||||
a5 := Array( a + 1 )
|
||||
|
||||
OutStd( "--------------------------------------------------------" )
|
||||
OutStd( cNewLine )
|
||||
OutStd( hb_eol() )
|
||||
|
||||
ADIR( cSpec , a1, a2, a3, a4, a5 )
|
||||
|
||||
aEval(a1, {|tmp| OutStd( tmp ), OutStd( cNewLine ) } )
|
||||
aEval(a2, {|tmp| OutStd( tmp ), OutStd( cNewLine ) } )
|
||||
aEval(a3, {|tmp| OutStd( tmp ), OutStd( cNewLine ) } )
|
||||
aEval(a4, {|tmp| OutStd( tmp ), OutStd( cNewLine ) } )
|
||||
aEval(a5, {|tmp| OutStd( tmp ), OutStd( cNewLine ) } )
|
||||
aEval(a1, {|tmp| OutStd( tmp ), OutStd( hb_eol() ) } )
|
||||
aEval(a2, {|tmp| OutStd( tmp ), OutStd( hb_eol() ) } )
|
||||
aEval(a3, {|tmp| OutStd( tmp ), OutStd( hb_eol() ) } )
|
||||
aEval(a4, {|tmp| OutStd( tmp ), OutStd( hb_eol() ) } )
|
||||
aEval(a5, {|tmp| OutStd( tmp ), OutStd( hb_eol() ) } )
|
||||
|
||||
ADIR( cSpec, 10, "A", NIL, NIL, NIL )
|
||||
|
||||
RETURN NIL
|
||||
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
function main()
|
||||
local cNewLine := HB_OSNewLine()
|
||||
PROCEDURE main()
|
||||
|
||||
OutStd( cMonth( date() ) + cNewLine )
|
||||
OutStd( cMonth( date() + 31 ) + cNewLine )
|
||||
OutStd( cMonth( date() + 60 ) + cNewLine )
|
||||
OutStd( cMonth( date() ) + hb_eol() )
|
||||
OutStd( cMonth( date() + 31 ) + hb_eol() )
|
||||
OutStd( cMonth( date() + 60 ) + hb_eol() )
|
||||
|
||||
OutStd( cDow( date() ) + cNewLine )
|
||||
OutStd( cDow( date() + 6 ) + cNewLine )
|
||||
OutStd( cDow( date() + 7 ) + cNewLine )
|
||||
OutStd( cDow( date() ) + hb_eol() )
|
||||
OutStd( cDow( date() + 6 ) + hb_eol() )
|
||||
OutStd( cDow( date() + 7 ) + hb_eol() )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -312,7 +312,7 @@ return cInfo
|
||||
|
||||
#ifdef __HARBOUR__
|
||||
#include "hbextcdp.ch"
|
||||
#define EOL hb_osNewLine()
|
||||
#define EOL hb_eol()
|
||||
#else
|
||||
#define EOL chr( 13 ) + chr( 10 )
|
||||
#endif
|
||||
|
||||
@@ -1,82 +1,81 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour dates management.
|
||||
|
||||
#include "set.ch"
|
||||
|
||||
function Main()
|
||||
local cNewLine := HB_OSNewLine()
|
||||
|
||||
local dDate, dDate2, cMask, cDate
|
||||
|
||||
OUTSTD (cNewLine, "Testing Harbour dates management on", DATE())
|
||||
OUTSTD (hb_eol(), "Testing Harbour dates management on", DATE())
|
||||
|
||||
TestCentury(cNewLine)
|
||||
TestCentury()
|
||||
|
||||
OUTSTD (cNewLine, "")
|
||||
OUTSTD (cNewLine, "dDate := CToD( '02/04/1999' ) =>", dDate := CToD( "02/04/1999" ))
|
||||
OUTSTD (hb_eol(), "")
|
||||
OUTSTD (hb_eol(), "dDate := CToD( '02/04/1999' ) =>", dDate := CToD( "02/04/1999" ))
|
||||
|
||||
OUTSTD (cNewLine, "ValType( dDate ) =", ValType( dDate ))
|
||||
OUTSTD (hb_eol(), "ValType( dDate ) =", ValType( dDate ))
|
||||
|
||||
OUTSTD (cNewLine, "Day( dDate ) =", Day( dDate ))
|
||||
OUTSTD (cNewLine, "Month( dDate ) =", Month( dDate ))
|
||||
OUTSTD (cNewLine, "Year( dDate ) =", Year( dDate ), cNewLine)
|
||||
OUTSTD (hb_eol(), "Day( dDate ) =", Day( dDate ))
|
||||
OUTSTD (hb_eol(), "Month( dDate ) =", Month( dDate ))
|
||||
OUTSTD (hb_eol(), "Year( dDate ) =", Year( dDate ), hb_eol())
|
||||
|
||||
OUTSTD (cNewLine, "dDate + 5 =", dDate2 := dDate + 5)
|
||||
OUTSTD (cNewLine, "dDate - 5 =", dDate - 5, cNewLine )
|
||||
OUTSTD (hb_eol(), "dDate + 5 =", dDate2 := dDate + 5)
|
||||
OUTSTD (hb_eol(), "dDate - 5 =", dDate - 5, hb_eol() )
|
||||
|
||||
OUTSTD (cNewLine, "dDate2 - dDate =", dDate2 - dDate)
|
||||
OUTSTD (hb_eol(), "dDate2 - dDate =", dDate2 - dDate)
|
||||
|
||||
OUTSTD (cNewLine, "")
|
||||
OUTSTD (cNewLine, dDate, DTOS (dDate))
|
||||
OUTSTD (hb_eol(), "")
|
||||
OUTSTD (hb_eol(), dDate, DTOS (dDate))
|
||||
|
||||
OUTSTD (cNewLine, "19990429", STOD ("19990429"))
|
||||
OUTSTD (hb_eol(), "19990429", STOD ("19990429"))
|
||||
|
||||
OUTSTD (cNewLine, "")
|
||||
OUTSTD (hb_eol(), "")
|
||||
SET (_SET_EPOCH, 1950)
|
||||
cMask := "dd/mm/yyyy"
|
||||
cDate := "02/04/49"
|
||||
SET (_SET_DATEFORMAT, cMask)
|
||||
dDate := CTOD (cDate)
|
||||
OUTSTD (cNewLine, cDate, cMask, dDate, DTOS (dDate), DTOC (dDate))
|
||||
OUTSTD (hb_eol(), cDate, cMask, dDate, DTOS (dDate), DTOC (dDate))
|
||||
|
||||
OUTSTD (cNewLine, "")
|
||||
OUTSTD (hb_eol(), "")
|
||||
cMask := "mm/dd/yyyy"
|
||||
SET (_SET_DATEFORMAT, cMask)
|
||||
dDate := CTOD (cDate)
|
||||
OUTSTD (cNewLine, cDate, cMask, dDate, DTOS (dDate), DTOC (dDate))
|
||||
OUTSTD (hb_eol(), cDate, cMask, dDate, DTOS (dDate), DTOC (dDate))
|
||||
|
||||
OUTSTD (cNewLine, "")
|
||||
OUTSTD (hb_eol(), "")
|
||||
cMask := "yyyy/mm/dd"
|
||||
SET (_SET_DATEFORMAT, cMask)
|
||||
dDate := CTOD (cDate)
|
||||
OUTSTD (cNewLine, cDate, cMask, dDate, DTOS (dDate), DTOC (dDate))
|
||||
OUTSTD (cNewLine, "")
|
||||
OUTSTD (cNewLine, "49/02/04", cMask, CTOD ("49/02/04"))
|
||||
OUTSTD (hb_eol(), cDate, cMask, dDate, DTOS (dDate), DTOC (dDate))
|
||||
OUTSTD (hb_eol(), "")
|
||||
OUTSTD (hb_eol(), "49/02/04", cMask, CTOD ("49/02/04"))
|
||||
|
||||
TestCentury(cNewLine)
|
||||
TestCentury(hb_eol())
|
||||
|
||||
OUTSTD (cNewLine, "")
|
||||
OUTSTD (hb_eol(), "")
|
||||
cMask := "yyyy/dd/mm"
|
||||
SET (_SET_DATEFORMAT, cMask)
|
||||
dDate := CTOD (cDate)
|
||||
OUTSTD (cNewLine, cDate, cMask, dDate, DTOS (dDate), DTOC (dDate))
|
||||
OUTSTD (cNewLine, "")
|
||||
OUTSTD (cNewLine, "49/02/04", cMask, CTOD ("49/02/04"))
|
||||
OUTSTD (hb_eol(), cDate, cMask, dDate, DTOS (dDate), DTOC (dDate))
|
||||
OUTSTD (hb_eol(), "")
|
||||
OUTSTD (hb_eol(), "49/02/04", cMask, CTOD ("49/02/04"))
|
||||
|
||||
OUTSTD (cNewLine, "")
|
||||
OUTSTD (hb_eol(), "")
|
||||
cMask := "ddd/mmm/yy"
|
||||
SET (_SET_DATEFORMAT, cMask)
|
||||
dDate := CTOD (cDate)
|
||||
OUTSTD (cNewLine, cDate, cMask, dDate, DTOS (dDate), DTOC (dDate))
|
||||
OUTSTD (hb_eol(), cDate, cMask, dDate, DTOS (dDate), DTOC (dDate))
|
||||
|
||||
return nil
|
||||
return nil
|
||||
|
||||
procedure TestCentury(cNewLine)
|
||||
OUTSTD (cNewLine, "")
|
||||
OUTSTD (cNewLine, __SETCENTURY ())
|
||||
procedure TestCentury()
|
||||
OUTSTD (hb_eol(), "")
|
||||
OUTSTD (hb_eol(), __SETCENTURY ())
|
||||
__SETCENTURY ("ON")
|
||||
OUTSTD (__SETCENTURY ())
|
||||
__SETCENTURY ("OFF")
|
||||
@@ -87,4 +86,4 @@ procedure TestCentury(cNewLine)
|
||||
OUTSTD (__SETCENTURY ())
|
||||
__SETCENTURY (5)
|
||||
OUTSTD (__SETCENTURY ())
|
||||
return
|
||||
return
|
||||
|
||||
@@ -1,41 +1,42 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "set.ch"
|
||||
|
||||
function main()
|
||||
local newline := HB_OSNewLine()
|
||||
local dDate := CTOD ("04/30/99")
|
||||
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
set (_SET_DATEFORMAT, "yyy/mm/ddd")
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
__SETCENTURY ( "on" )
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
__SETCENTURY ( "off" )
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
set (_SET_DATEFORMAT, "yyy/m/d/yyy")
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
__SETCENTURY ( "on" )
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
__SETCENTURY ( "off" )
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
set (_SET_DATEFORMAT, "m/d/y/m/d")
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
__SETCENTURY ( "on" )
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
__SETCENTURY ( "off" )
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
set (_SET_DATEFORMAT, "mmmm/ddddd")
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
__SETCENTURY ( "on" )
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
__SETCENTURY ( "off" )
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
set (_SET_DATEFORMAT, "mmmmm/dd")
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
__SETCENTURY ( "on" )
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
__SETCENTURY ( "off" )
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, newline)
|
||||
return nil
|
||||
outstd (SET (_SET_DATEFORMAT), dDate, hb_eol())
|
||||
|
||||
return nil
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing Harbour dates management.
|
||||
|
||||
@@ -8,44 +8,44 @@
|
||||
|
||||
function main()
|
||||
|
||||
LOCAL dDate, i, cNewLine := HB_OSNewLine()
|
||||
LOCAL dDate, i
|
||||
|
||||
set( _SET_DATEFORMAT, "dd/mm/yyyy" )
|
||||
dDate := cToD( "25/05/1999" )
|
||||
|
||||
OutStd( dDate, dow( dDate ), cNewLine )
|
||||
OutStd( dDate, dow( dDate ), hb_eol() )
|
||||
|
||||
OutStd( LastMonday( dDate ), cNewLine )
|
||||
OutStd( LastMonday( dDate ), hb_eol() )
|
||||
|
||||
dDate += 3
|
||||
OutStd( dDate, dow( dDate ), cNewLine )
|
||||
OutStd( dDate, dow( dDate ), hb_eol() )
|
||||
|
||||
dDate += 4
|
||||
OutStd( dDate, dow( dDate ), cNewLine )
|
||||
OutStd( dDate, dow( dDate ), hb_eol() )
|
||||
|
||||
set( _SET_DATEFORMAT, "mm/dd/yyyy" )
|
||||
dDate := cToD( "05/25/1999" )
|
||||
|
||||
OutStd( dDate, dow( dDate ), cNewLine )
|
||||
OutStd( dDate, dow( dDate ), hb_eol() )
|
||||
|
||||
OutStd( LastMonday( dDate ), cNewLine )
|
||||
OutStd( LastMonday( dDate ), hb_eol() )
|
||||
|
||||
dDate += 3
|
||||
OutStd( dDate, dow( dDate ), cNewLine )
|
||||
OutStd( dDate, dow( dDate ), hb_eol() )
|
||||
|
||||
dDate += 4
|
||||
OutStd( dDate, dow( dDate ), cNewLine )
|
||||
OutStd( dDate, dow( dDate ), hb_eol() )
|
||||
|
||||
OutStd( cNewLine )
|
||||
OutStd( hb_eol() )
|
||||
dDate := DATE ()
|
||||
FOR i := 1 TO 7
|
||||
OutStd( dDate, dow( dDate ), cNewLine )
|
||||
OutStd( dDate, dow( dDate ), hb_eol() )
|
||||
dDate++
|
||||
NEXT
|
||||
OutStd( ctod( "" ), dow( ctod( "" ) ), cNewLine )
|
||||
OutStd( ctod( "" ), dow( ctod( "" ) ), hb_eol() )
|
||||
|
||||
return nil
|
||||
return nil
|
||||
|
||||
// Like NG's sample
|
||||
function LastMonday( dDate )
|
||||
return dDate - dow( dDate ) + 2
|
||||
return dDate - dow( dDate ) + 2
|
||||
|
||||
@@ -5,14 +5,10 @@
|
||||
// Testing Harbour dates management.
|
||||
#include "set.ch"
|
||||
|
||||
STATIC s_cNewLine
|
||||
|
||||
function main()
|
||||
LOCAL i
|
||||
LOCAL dDate := date()
|
||||
|
||||
s_cNewLine := HB_OSNewLine()
|
||||
|
||||
set( _SET_DATEFORMAT, "dd/mm/yyyy" )
|
||||
|
||||
for i := 7 to 49 step 7
|
||||
@@ -20,19 +16,19 @@ function main()
|
||||
dDate += i
|
||||
next
|
||||
|
||||
return nil
|
||||
return nil
|
||||
|
||||
function CheckDate( dDate )
|
||||
OutStd( "Testing date:", dDate , s_cNewLine )
|
||||
OutStd( "Days in month..:", daysinmonth( dDate ), s_cNewLine )
|
||||
OutStd( "Day of year....:", doy( dDate ), s_cNewLine )
|
||||
OutStd( "Begin of month.:", bom( dDate ), s_cNewLine )
|
||||
OutStd( "End of month...:", eom( dDate ), s_cNewLine )
|
||||
OutStd( "Week of month..:", wom( dDate ), s_cNewLine )
|
||||
OutStd( "Week of year...:", woy( dDate ), s_cNewLine )
|
||||
OutStd( "Begin of year..:", boy( dDate ), s_cNewLine )
|
||||
OutStd( "End of year....:", eoy( dDate ), s_cNewLine )
|
||||
OutStd( "Testing date:", dDate , hb_eol() )
|
||||
OutStd( "Days in month..:", daysinmonth( dDate ), hb_eol() )
|
||||
OutStd( "Day of year....:", doy( dDate ), hb_eol() )
|
||||
OutStd( "Begin of month.:", bom( dDate ), hb_eol() )
|
||||
OutStd( "End of month...:", eom( dDate ), hb_eol() )
|
||||
OutStd( "Week of month..:", wom( dDate ), hb_eol() )
|
||||
OutStd( "Week of year...:", woy( dDate ), hb_eol() )
|
||||
OutStd( "Begin of year..:", boy( dDate ), hb_eol() )
|
||||
OutStd( "End of year....:", eoy( dDate ), hb_eol() )
|
||||
__Accept( "Press ENTER to continue..." )
|
||||
OutStd( chr( 10 ), chr( 10 ) )
|
||||
|
||||
return nil
|
||||
return nil
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// directory test
|
||||
function main(filespec,attribs,cshort)
|
||||
PROCEDURE Main( filespec, attribs, cshort )
|
||||
|
||||
local adir := {}
|
||||
local x := 0, lShort := .f., cNewLine := HB_OSNewLine()
|
||||
LOCAL adir := {}
|
||||
LOCAL x := 0, lShort := .f.
|
||||
|
||||
IF !cshort == NIL .and. (Upper( cShort ) == "TRUE" .or. Upper( cShort ) == ".T.")
|
||||
lShort := .t.
|
||||
ENDIF
|
||||
|
||||
//adir := asort( directory(filespec,attribs,lShort),,, {|x,y|upper(x[1]) < upper(y[1])} )
|
||||
adir := directory(filespec,attribs,lShort)
|
||||
// adir := asort( directory(filespec,attribs,lShort),,, {|x,y|upper(x[1]) < upper(y[1])} )
|
||||
adir := directory(filespec,attribs,lShort)
|
||||
|
||||
SET CENTURY ON
|
||||
SET CENTURY ON
|
||||
|
||||
for x := 1 to len(adir)
|
||||
outstd(cNewLine)
|
||||
outstd(padr(adir[x,1], 20), "|", ;
|
||||
transform(adir[x,2], "9,999,999,999"), "|", ;
|
||||
adir[x,3], "|", ;
|
||||
adir[x,4], "|", ;
|
||||
adir[x,5])
|
||||
next x
|
||||
FOR x := 1 TO len( adir )
|
||||
outstd(hb_eol())
|
||||
outstd(padr(adir[x,1], 20), "|", ;
|
||||
transform(adir[x,2], "9,999,999,999"), "|", ;
|
||||
adir[x,3], "|", ;
|
||||
adir[x,4], "|", ;
|
||||
adir[x,5])
|
||||
NEXT
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "inkey.ch"
|
||||
#ifdef __HARBOUR__
|
||||
#include "hbgtinfo.ch"
|
||||
@@ -216,43 +215,43 @@ setcancel(.f.)
|
||||
//altd(0)
|
||||
|
||||
#ifdef __HARBOUR__
|
||||
set(_SET_EVENTMASK,INKEY_ALL)
|
||||
hb_gtInfo(HB_GTI_ESCDELAY,50)
|
||||
hb_cdpSelect( "PLMAZ" )
|
||||
hb_setTermCP( "PLISO" )
|
||||
? hb_gtVersion(1), hb_gtVersion()
|
||||
set(_SET_EVENTMASK,INKEY_ALL)
|
||||
hb_gtInfo(HB_GTI_ESCDELAY,50)
|
||||
hb_cdpSelect( "PLMAZ" )
|
||||
hb_setTermCP( "PLISO" )
|
||||
? hb_gtVersion(1), hb_gtVersion()
|
||||
#endif
|
||||
|
||||
? "@ - interrupt, keycodes checking: "
|
||||
?
|
||||
while (.t.)
|
||||
k:=inkey(0,INKEY_ALL)
|
||||
if (i:=ascan(aKeys, { |x| x[2]==k }))!=0
|
||||
? " key:"+str(aKeys[i,2],7)+" "+padr(aKeys[i,1],18)+aKeys[i,3]
|
||||
elseif k>=32 .and. k<=126 .or. (k>=160 .and. k<=255) .or. IsAlpha(chr(k))
|
||||
? "char:"+str(k,7)+" "+chr(k)
|
||||
else
|
||||
? " key:"+str(k,7)
|
||||
endif
|
||||
// ?? " ("+ltrim(str(maxrow()))+":"+ltrim(str(maxcol()))+")"
|
||||
k:=inkey(0,INKEY_ALL)
|
||||
if (i:=ascan(aKeys, { |x| x[2]==k }))!=0
|
||||
? " key:"+str(aKeys[i,2],7)+" "+padr(aKeys[i,1],18)+aKeys[i,3]
|
||||
elseif k>=32 .and. k<=126 .or. (k>=160 .and. k<=255) .or. IsAlpha(chr(k))
|
||||
? "char:"+str(k,7)+" "+chr(k)
|
||||
else
|
||||
? " key:"+str(k,7)
|
||||
endif
|
||||
// ?? " ("+ltrim(str(maxrow()))+":"+ltrim(str(maxcol()))+")"
|
||||
|
||||
if k==asc("@") .and. nextkey()==0
|
||||
exit
|
||||
if k==asc("@") .and. nextkey()==0
|
||||
exit
|
||||
#ifdef __HARBOUR__
|
||||
elseif k==K_CTRL_INS
|
||||
if alert( "Would you like to show clipboard text?", { "YES", "NO" } ) == 1
|
||||
s := hb_gtInfo( HB_GTI_CLIPBOARDDATA )
|
||||
? "Clipboard text: [" + s + "]"
|
||||
endif
|
||||
elseif k==K_CTRL_END
|
||||
if alert( "Would you like to set clipboard text?", { "YES", "NO" } ) == 1
|
||||
s := hb_tstostr( hb_datetime() ) + hb_osNewLine() + ;
|
||||
"Harbour " + hb_gtVersion() + " clipboard test" + hb_osNewLine()
|
||||
? "New clipboard text: [" + s + "]"
|
||||
hb_gtInfo( HB_GTI_CLIPBOARDDATA, s )
|
||||
endif
|
||||
elseif k==K_CTRL_INS
|
||||
if alert( "Would you like to show clipboard text?", { "YES", "NO" } ) == 1
|
||||
s := hb_gtInfo( HB_GTI_CLIPBOARDDATA )
|
||||
? "Clipboard text: [" + s + "]"
|
||||
endif
|
||||
elseif k==K_CTRL_END
|
||||
if alert( "Would you like to set clipboard text?", { "YES", "NO" } ) == 1
|
||||
s := hb_tstostr( hb_datetime() ) + hb_eol() + ;
|
||||
"Harbour " + hb_gtVersion() + " clipboard test" + hb_eol()
|
||||
? "New clipboard text: [" + s + "]"
|
||||
hb_gtInfo( HB_GTI_CLIPBOARDDATA, s )
|
||||
endif
|
||||
#endif
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
?
|
||||
return nil
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
#include "common.ch"
|
||||
|
||||
#ifndef __HARBOUR__
|
||||
#xtranslate HB_OSNewLine() => ( Chr( 13 ) + Chr( 10 ) )
|
||||
#xtranslate hb_eol() => ( Chr( 13 ) + Chr( 10 ) )
|
||||
#endif
|
||||
|
||||
/* #command TEXT TO VAR <v> => #pragma __stream|<v>:=%s */
|
||||
#command TEXT TO VAR <v> => #pragma __text|<v>+=%s;<v>:=""
|
||||
#command CTEXT TO VAR <v> => #pragma __cstream|<v>:=%s
|
||||
#command XTEXT TO VAR <v> => #pragma __text|<v>+=%s+HB_OSNEWLINE();<v>:=""
|
||||
#command XTEXT TO VAR <v> => #pragma __text|<v>+=%s+hb_eol();<v>:=""
|
||||
|
||||
/* Testing preprocessor */
|
||||
|
||||
@@ -21,7 +21,7 @@ LOCAL nCnt:=0
|
||||
LOCAL nRes:=0
|
||||
|
||||
/* ---------------------------------------------------------------------*/
|
||||
in := "#xtranslate CCC <v> => QOUT( <v>[2] [, <v>\[<v>\]\[3\]] )"+HB_OSNewLine()+;
|
||||
in := "#xtranslate CCC <v> => QOUT( <v>[2] [, <v>\[<v>\]\[3\]] )"+hb_eol()+;
|
||||
"CCC b"
|
||||
pre := "QOUT(b[2] ,bb[3] )"
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
@@ -49,7 +49,7 @@ XTEXT TO VAR in
|
||||
#xcommand SET TOOLTIP TO <color> OF <form> => SM( TTH (<"form">), 1, RGB(<color>\[1], <color>\[2\], <color>[, <color>\[ 3 \] ]), 0)
|
||||
SET TOOLTIP TO RED OF form1
|
||||
ENDTEXT
|
||||
TEXT TO VAR pre
|
||||
TEXT TO VAR pre
|
||||
SM(TTH ("form1"),1,RGB({255,0,0}[1],{255,0,0}[2],{255,0,0},{255,0,0}[ 3 ] ),0)
|
||||
ENDTEXT
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
@@ -108,7 +108,7 @@ ENDTEXT
|
||||
in := "_REGULAR_(a)"
|
||||
pre :="rm(a )"
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
|
||||
in := '_REGULAR_("a")'
|
||||
pre :='rm("a" )'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
@@ -161,7 +161,7 @@ ENDTEXT
|
||||
//NORMAL
|
||||
in := '#command _NORMAL_M(<z>) => nm( <"z"> )'
|
||||
__PreProcess( in )
|
||||
|
||||
|
||||
in := "_NORMAL_M(a)"
|
||||
pre :='nm("a" )'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
@@ -218,7 +218,7 @@ ENDTEXT
|
||||
//SMART
|
||||
in := '#command _SMART_M(<z>) => sm( <(z)> )'
|
||||
__PreProcess( in )
|
||||
|
||||
|
||||
in := "_SMART_M(a)"
|
||||
pre :='sm("a" )'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
@@ -377,7 +377,7 @@ ENDTEXT
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
TEXT TO VAR in
|
||||
#xcommand SET <var1> [, <varN>] WITH <val> =>
|
||||
#xcommand SET <var1> [, <varN>] WITH <val> =>
|
||||
<var1>:=<val>[; <varN>:=<val>]
|
||||
ENDTEXT
|
||||
__PreProcess( in )
|
||||
@@ -387,7 +387,7 @@ ENDTEXT
|
||||
|
||||
TEXT TO VAR in
|
||||
#xcommand INSERT INTO <table> ( <uField1> [, <uFieldN> ] ) VALUES ( <uVal1> [, <uValN> ] ) => if <table>->( dbappend() ) <table>-><uField1> := <uVal1> [ <table>-><uFieldN> := <uValN> ] <table>->( dbunlock() ) endif
|
||||
ENDTEXT
|
||||
ENDTEXT
|
||||
__PreProcess( in )
|
||||
TEXT TO VAR in
|
||||
insert into test ( FIRST, LAST, STREET ) values ( "first", "last", "street" )
|
||||
@@ -398,13 +398,13 @@ ENDTEXT
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
TEXT TO VAR in
|
||||
#xcommand INSERT2 INTO <table> ( <uField1> [, <uFieldN> ] ) VALUES ( <uVal1> [, <uValN> ] ) =>
|
||||
#xcommand INSERT2 INTO <table> ( <uField1> [, <uFieldN> ] ) VALUES ( <uVal1> [, <uValN> ] ) =>
|
||||
if <table>->( dbappend() ) ;
|
||||
<table>-><uField1> := <uVal1> ;
|
||||
[ <table>-><uFieldN> := <uValN> ; ]
|
||||
[ <table>-><uFieldN> := <uValN> ; ]
|
||||
<table>->( dbunlock() ) ;
|
||||
endif
|
||||
ENDTEXT
|
||||
ENDTEXT
|
||||
__PreProcess( in )
|
||||
TEXT TO VAR in
|
||||
insert2 into test ( FIRST, LAST, STREET )
|
||||
@@ -428,14 +428,14 @@ ENDTEXT
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
TEXT TO VAR in
|
||||
#command MYCOMMAND [<mylist,...>] [MYCLAUSE <myval>] =>
|
||||
#command MYCOMMAND [<mylist,...>] [MYCLAUSE <myval>] =>
|
||||
MyFunction( {<mylist>} [, <myval>] )
|
||||
ENDTEXT
|
||||
__PreProcess( in )
|
||||
in := 'MYCOMMAND MYCLAUSE 321 "HELLO"'
|
||||
pre := 'MyFunction({"HELLO"} ,321 )'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
|
||||
in := 'MYCOMMAND MYCLAUSE 321 "HELLO","all"'
|
||||
pre := 'MyFunction({"HELLO","all"} ,321 )'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
@@ -445,7 +445,7 @@ ENDTEXT
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
TEXT TO VAR in
|
||||
#command MYCOMMAND2 [<mylist,...>] [MYCLAUSE <myval>] [ALL] =>
|
||||
#command MYCOMMAND2 [<mylist,...>] [MYCLAUSE <myval>] [ALL] =>
|
||||
MyFunction( {<mylist>} [, <myval>] )
|
||||
ENDTEXT
|
||||
__PreProcess( in )
|
||||
@@ -458,7 +458,7 @@ ENDTEXT
|
||||
in := 'MYCOMMAND2 ALL MYCLAUSE 321 "HELLO"'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := 'MYCOMMAND2 MYCLAUSE 321 "HELLO" ALL'
|
||||
in := 'MYCOMMAND2 MYCLAUSE 321 "HELLO" ALL'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := 'MYCOMMAND2 MYCLAUSE 321 ALL "HELLO"'
|
||||
@@ -466,7 +466,7 @@ ENDTEXT
|
||||
|
||||
|
||||
TEXT TO VAR in
|
||||
#command MYCOMMAND3 [<mylist,...>] [MYCLAUSE <myval>] [<all:ALL>] =>
|
||||
#command MYCOMMAND3 [<mylist,...>] [MYCLAUSE <myval>] [<all:ALL>] =>
|
||||
MyFunction( {<mylist>} [, <myval>] [,<.all.>] )
|
||||
ENDTEXT
|
||||
__PreProcess( in )
|
||||
@@ -487,7 +487,7 @@ ENDTEXT
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
TEXT TO VAR in
|
||||
#command MYCOMMAND2 [<myList,...>]
|
||||
#command MYCOMMAND2 [<myList,...>]
|
||||
[MYCLAUSE <myVal>] [MYOTHER <myOther>] => MyFunction( {<myList>}, <myVal>, <myOther> )
|
||||
ENDTEXT
|
||||
__PreProcess( in )
|
||||
@@ -588,19 +588,19 @@ ENDTEXT
|
||||
pre := '&cVar+1(&cVar,"mzcall" )'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MXCALL &cVar"
|
||||
in := "MXCALL &cVar"
|
||||
pre := '(&cVar)'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MXCALL &cVar."
|
||||
in := "MXCALL &cVar."
|
||||
pre := '(&cVar.)'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MXCALL &cVar.1"
|
||||
in := "MXCALL &cVar.1"
|
||||
pre := '(&cVar.1)'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MXCALL &cVar + 1"
|
||||
in := "MXCALL &cVar + 1"
|
||||
pre := '(&cVar) + 1'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -660,7 +660,7 @@ ENDTEXT
|
||||
pre := '&cVar.(+1,"mycall" )'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MYCALL &cVar.1 +1"
|
||||
in := "MYCALL &cVar.1 +1"
|
||||
pre := '&cVar.1(+1,"mycall" )'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -680,39 +680,39 @@ ENDTEXT
|
||||
pre := 'cVar+var+1'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MXCALL &cVar()"
|
||||
in := "MXCALL &cVar()"
|
||||
pre := '(&cVar)()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MXCALL &cVar++"
|
||||
in := "MXCALL &cVar++"
|
||||
pre := '(&cVar)++'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "(MXCALL &cVar)++"
|
||||
in := "(MXCALL &cVar)++"
|
||||
pre := '((&cVar))++'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MXCALL &cVar.()"
|
||||
in := "MXCALL &cVar.()"
|
||||
pre := '(&cVar.)()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MXCALL &cVar.++"
|
||||
in := "MXCALL &cVar.++"
|
||||
pre := '(&cVar.)++'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "(MXCALL &cVar.)++"
|
||||
in := "(MXCALL &cVar.)++"
|
||||
pre := '((&cVar.))++'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MXCALL &cVar.1 ()"
|
||||
in := "MXCALL &cVar.1 ()"
|
||||
pre := '(&cVar.1) ()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MXCALL &cVar.1 ++"
|
||||
in := "MXCALL &cVar.1 ++"
|
||||
pre := '(&cVar.1) ++'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "(MXCALL &cVar.1) ++"
|
||||
in := "(MXCALL &cVar.1) ++"
|
||||
pre := '((&cVar.1)) ++'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -760,7 +760,7 @@ ENDTEXT
|
||||
pre :='macro_t(cVar)++'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MTRANSLATE &cVar.++"
|
||||
in := "MTRANSLATE &cVar.++"
|
||||
pre :='macro_t(cVar)++'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -768,7 +768,7 @@ ENDTEXT
|
||||
pre :='macro_t(cVar)+=1'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MTRANSLATE &cVar.-=2"
|
||||
in := "MTRANSLATE &cVar.-=2"
|
||||
pre :='macro_t(cVar)-=2'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -788,7 +788,7 @@ ENDTEXT
|
||||
pre :='macro_t(cVar)^=2'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MTRANSLATE &cVar:=1"
|
||||
in := "MTRANSLATE &cVar:=1"
|
||||
pre :='macro_t(cVar):=1'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -858,7 +858,7 @@ ENDTEXT
|
||||
pre :='normal_c("&cVar++")'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MCOMMAND &cVar.++"
|
||||
in := "MCOMMAND &cVar.++"
|
||||
pre :='normal_c("&cVar.++")'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -866,7 +866,7 @@ ENDTEXT
|
||||
pre :='normal_c("&cVar+=1")'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MCOMMAND &cVar.-=2"
|
||||
in := "MCOMMAND &cVar.-=2"
|
||||
pre :='normal_c("&cVar.-=2")'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -874,7 +874,7 @@ ENDTEXT
|
||||
pre :='normal_c("&cVar*=1")'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in := "MCOMMAND &cVar/=2"
|
||||
in := "MCOMMAND &cVar/=2"
|
||||
pre :='normal_c("&cVar/=2")'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -885,7 +885,7 @@ ENDTEXT
|
||||
in := "MCOMMAND &cVar^=2"
|
||||
pre :='normal_c("&cVar^=2")'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
|
||||
in := "MCOMMAND &cVar:=1"
|
||||
pre :='normal_c("&cVar:=1")'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
@@ -920,7 +920,7 @@ ENDTEXT
|
||||
|
||||
/* repeated optional clauses */
|
||||
TEXT TO VAR in
|
||||
#xcommand SET <var1> [, <varN>] WITH <val> =>
|
||||
#xcommand SET <var1> [, <varN>] WITH <val> =>
|
||||
<var1>:=<val> [; <varN>:=<val>]
|
||||
ENDTEXT
|
||||
__PreProcess( in )
|
||||
@@ -948,7 +948,7 @@ ENDTEXT
|
||||
in := "AVG f1 TO s1"
|
||||
pre := "AVERAGE({||s1:=s1+f1} )"
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
|
||||
in := "AVG f1, f2 TO s1, s2"
|
||||
pre := "AVERAGE({||s1:=s1+f1} ,{||s2:=s2+f2} )"
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
@@ -964,23 +964,23 @@ ENDTEXT
|
||||
|
||||
/* ---------------------------------------------------------------------*/
|
||||
TEXT TO VAR in
|
||||
#command @ <row>, <col> GET <var>
|
||||
[PICTURE <pic>]
|
||||
[VALID <valid>]
|
||||
[WHEN <when>]
|
||||
[CAPTION <caption>]
|
||||
[MESSAGE <message>]
|
||||
[SEND <msg>]
|
||||
|
||||
=> SetPos( <row>, <col> )
|
||||
; AAdd( GetList,
|
||||
_GET_( <var>, <"var">, <pic>, <{valid}>, <{when}> ) )
|
||||
[; ATail(GetList):Caption := <caption>]
|
||||
[; ATail(GetList):CapRow := ATail(Getlist):row
|
||||
; ATail(GetList):CapCol := ATail(Getlist):col -
|
||||
__CapLength(<caption>) - 1]
|
||||
[; ATail(GetList):message := <message>]
|
||||
[; ATail(GetList):<msg>]
|
||||
#command @ <row>, <col> GET <var>
|
||||
[PICTURE <pic>]
|
||||
[VALID <valid>]
|
||||
[WHEN <when>]
|
||||
[CAPTION <caption>]
|
||||
[MESSAGE <message>]
|
||||
[SEND <msg>]
|
||||
|
||||
=> SetPos( <row>, <col> )
|
||||
; AAdd( GetList,
|
||||
_GET_( <var>, <"var">, <pic>, <{valid}>, <{when}> ) )
|
||||
[; ATail(GetList):Caption := <caption>]
|
||||
[; ATail(GetList):CapRow := ATail(Getlist):row
|
||||
; ATail(GetList):CapCol := ATail(Getlist):col -
|
||||
__CapLength(<caption>) - 1]
|
||||
[; ATail(GetList):message := <message>]
|
||||
[; ATail(GetList):<msg>]
|
||||
; ATail(GetList):Display()
|
||||
ENDTEXT
|
||||
__PreProcess( in )
|
||||
@@ -1014,32 +1014,32 @@ ENDTEXT
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
/* ---------------------------------------------------------------------*/
|
||||
in :='@ 1,1 GET a RANGE 0,100'
|
||||
in :='@ 1,1 GET a RANGE 0,100'
|
||||
pre := 'SetPos(1,1 ) ; AAdd(GetList,_GET_(a,"a",,{|_1| RangeCheck(_1,, 0, 100)}, ) ) ; ATail(GetList):Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in :='@ 1,2 GET a PICTURE "X" RANGE 0,100'
|
||||
in :='@ 1,2 GET a PICTURE "X" RANGE 0,100'
|
||||
pre := 'SetPos(1,2 ) ; AAdd(GetList,_GET_(a,"a","X",{|_1| RangeCheck(_1,, 0, 100)}, ) ) ; ATail(GetList):Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
/* NOTE: Clipper fails here */
|
||||
in :='@ 1,3 GET a PICTURE "X" VALID .T. RANGE 0,100'
|
||||
in :='@ 1,3 GET a PICTURE "X" VALID .T. RANGE 0,100'
|
||||
pre := 'SetPos(1,3 ) ; AAdd(GetList,_GET_(a,"a","X",{|| .T.}, ) ) ; ATail(GetList):Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in :='@ 1,4 GET a PICTURE "X" WHEN .T. RANGE 0,100'
|
||||
in :='@ 1,4 GET a PICTURE "X" WHEN .T. RANGE 0,100'
|
||||
pre := 'SetPos(1,4 ) ; AAdd(GetList,_GET_(a,"a","X",{|_1| RangeCheck(_1,, 0, 100)},{|| .T.} ) ) ; ATail(GetList):Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in :='@ 1,5 GET a PICTURE "X" WHEN .T. CAPTION "myget" RANGE 0,100'
|
||||
in :='@ 1,5 GET a PICTURE "X" WHEN .T. CAPTION "myget" RANGE 0,100'
|
||||
pre := 'SetPos(1,5 ) ; AAdd(GetList,_GET_(a,"a","X",{|_1| RangeCheck(_1,, 0, 100)},{|| .T.} ) ) ; ATail(GetList):Caption := "myget" ; ATail(GetList):CapRow := ATail(Getlist):row ; ATail(GetList):CapCol := ATail(Getlist):col - __CapLength("myget") - 1 ; ATail(GetList):Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in :='@ 1,6 GET a PICTURE "X" WHEN .T. CAPTION "myget" MESSAGE "mymess" RANGE 0,100'
|
||||
in :='@ 1,6 GET a PICTURE "X" WHEN .T. CAPTION "myget" MESSAGE "mymess" RANGE 0,100'
|
||||
pre := 'SetPos(1,6 ) ; AAdd(GetList,_GET_(a,"a","X",{|_1| RangeCheck(_1,, 0, 100)},{|| .T.} ) ) ; ATail(GetList):Caption := "myget" ; ATail(GetList):CapRow := ATail(Getlist):row ; ATail(GetList):CapCol := ATail(Getlist):col - __CapLength("myget") - 1 ; ATail(GetList):message := "mymess" ; ATail(GetList):Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in :='@ 1,7 GET a PICTURE "X" WHEN .T. CAPTION "myget" MESSAGE "mymess" SEND send() RANGE 0,100'
|
||||
in :='@ 1,7 GET a PICTURE "X" WHEN .T. CAPTION "myget" MESSAGE "mymess" SEND send() RANGE 0,100'
|
||||
pre := 'SetPos(1,7 ) ; AAdd(GetList,_GET_(a,"a","X",{|_1| RangeCheck(_1,, 0, 100)},{|| .T.} ) ) ; ATail(GetList):Caption := "myget" ; ATail(GetList):CapRow := ATail(Getlist):row ; ATail(GetList):CapCol := ATail(Getlist):col - __CapLength("myget") - 1 ; ATail(GetList):message := "mymess" ; ATail(GetList):send() ; ATail(GetList):Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -1051,7 +1051,7 @@ ENDTEXT
|
||||
pre := 'SetPos(2,2 ) ; AAdd(GetList,_GET_(a,"a","X",{|_1| RangeCheck(_1,, 0, 100)}, ) ) ; ATail(GetList):Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in :='@ 2,3 GET a PICTURE "X" RANGE 0,100'
|
||||
in :='@ 2,3 GET a PICTURE "X" RANGE 0,100'
|
||||
pre := 'SetPos(2,3 ) ; AAdd(GetList,_GET_(a,"a","X",{|_1| RangeCheck(_1,, 0, 100)}, ) ) ; ATail(GetList):Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -1074,43 +1074,43 @@ ENDTEXT
|
||||
|
||||
/* ---------------------------------------------------------------------*/
|
||||
TEXT TO VAR in
|
||||
#command @ <row>, <col> GET <var>
|
||||
PUSHBUTTON
|
||||
[VALID <valid>]
|
||||
[WHEN <when>]
|
||||
[CAPTION <caption>]
|
||||
[MESSAGE <message>]
|
||||
[COLOR <color>]
|
||||
[FOCUS <fblock>]
|
||||
[STATE <sblock>]
|
||||
[STYLE <style>]
|
||||
[SEND <msg>]
|
||||
[GUISEND <guimsg>]
|
||||
[SIZE X <sizex> Y <sizey>]
|
||||
[CAPOFF X <capxoff> Y <capyoff>]
|
||||
[BITMAP <bitmap>]
|
||||
[BMPOFF X <bmpxoff> Y <bmpyoff>]
|
||||
|
||||
=> SetPos( <row>, <col> )
|
||||
; AAdd( GetList,
|
||||
_GET_( <var>, <(var)>, NIL, <{valid}>, <{when}> ) )
|
||||
; ATail(GetList):Control := _PushButt_( <caption>, <message>,
|
||||
<color>, <{fblock}>, <{sblock}>, <style>,
|
||||
<sizex>, <sizey>, <capxoff>, <capyoff>,
|
||||
<bitmap>, <bmpxoff>, <bmpyoff> )
|
||||
; ATail(GetList):reader := { | a, b, c, d |
|
||||
GuiReader( a, b, c, d ) }
|
||||
[; ATail(GetList):<msg>]
|
||||
[; ATail(GetList):Control:<guimsg>]
|
||||
#command @ <row>, <col> GET <var>
|
||||
PUSHBUTTON
|
||||
[VALID <valid>]
|
||||
[WHEN <when>]
|
||||
[CAPTION <caption>]
|
||||
[MESSAGE <message>]
|
||||
[COLOR <color>]
|
||||
[FOCUS <fblock>]
|
||||
[STATE <sblock>]
|
||||
[STYLE <style>]
|
||||
[SEND <msg>]
|
||||
[GUISEND <guimsg>]
|
||||
[SIZE X <sizex> Y <sizey>]
|
||||
[CAPOFF X <capxoff> Y <capyoff>]
|
||||
[BITMAP <bitmap>]
|
||||
[BMPOFF X <bmpxoff> Y <bmpyoff>]
|
||||
|
||||
=> SetPos( <row>, <col> )
|
||||
; AAdd( GetList,
|
||||
_GET_( <var>, <(var)>, NIL, <{valid}>, <{when}> ) )
|
||||
; ATail(GetList):Control := _PushButt_( <caption>, <message>,
|
||||
<color>, <{fblock}>, <{sblock}>, <style>,
|
||||
<sizex>, <sizey>, <capxoff>, <capyoff>,
|
||||
<bitmap>, <bmpxoff>, <bmpyoff> )
|
||||
; ATail(GetList):reader := { | a, b, c, d |
|
||||
GuiReader( a, b, c, d ) }
|
||||
[; ATail(GetList):<msg>]
|
||||
[; ATail(GetList):Control:<guimsg>]
|
||||
; ATail(GetList):Control:Display()
|
||||
ENDTEXT
|
||||
__PreProcess( in )
|
||||
|
||||
in :='@ 4,1 GET a PUSHBUTTON'
|
||||
in :='@ 4,1 GET a PUSHBUTTON'
|
||||
pre := 'SetPos(4,1 ) ; AAdd(GetList,_GET_(a,"a",NIL,, ) ) ; ATail(GetList):Control := _PushButt_(,,,,,,,,,,,, ) ; ATail(GetList):reader := { | a,b,c,d | GuiReader(a,b,c,d ) } ; ATail(GetList):Control:Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in :='@ 4,1 GET a PUSHBUTTON VALID valid()'
|
||||
in :='@ 4,1 GET a PUSHBUTTON VALID valid()'
|
||||
pre := 'SetPos(4,1 ) ; AAdd(GetList,_GET_(a,"a",NIL,{|| valid()}, ) ) ; ATail(GetList):Control := _PushButt_(,,,,,,,,,,,, ) ; ATail(GetList):reader := { | a,b,c,d | GuiReader(a,b,c,d ) } ; ATail(GetList):Control:Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -1142,7 +1142,7 @@ ENDTEXT
|
||||
pre := 'SetPos(4,1 ) ; AAdd(GetList,_GET_(a,"a",NIL,{|| valid()},{|| when()} ) ) ; ATail(GetList):Control := _PushButt_("cap","mes",color(),{|| focus()},{|| state()},style(),,,,,,, ) ; ATail(GetList):reader := { | a,b,c,d | GuiReader(a,b,c,d ) } ; ATail(GetList):Control:Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
in :='@ 4,1 GET a PUSHBUTTON VALID valid() WHEN when() CAPTION "cap" MESSAGE "mes" COLOR color() FOCUS focus() STATE state() STYLE style() SEND send()'
|
||||
in :='@ 4,1 GET a PUSHBUTTON VALID valid() WHEN when() CAPTION "cap" MESSAGE "mes" COLOR color() FOCUS focus() STATE state() STYLE style() SEND send()'
|
||||
pre := 'SetPos(4,1 ) ; AAdd(GetList,_GET_(a,"a",NIL,{|| valid()},{|| when()} ) ) ; ATail(GetList):Control := _PushButt_("cap","mes",color(),{|| focus()},{|| state()},style(),,,,,,, ) ; ATail(GetList):reader := { | a,b,c,d | GuiReader(a,b,c,d ) } ; ATail(GetList):send() ; ATail(GetList):Control:Display()'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
@@ -1186,23 +1186,23 @@ TEXT TO VAR in
|
||||
#command DEFINE CLIPBOARD <oClp>
|
||||
[ FORMAT <format:TEXT,OEMTEXT,BITMAP,DIF> ]
|
||||
[ OF <oWnd> ]
|
||||
=>
|
||||
=>
|
||||
<oClp> := TClipboard():New( [UPPER(<(format)>)], <oWnd> )
|
||||
ENDTEXT
|
||||
__PreProcess( in )
|
||||
in:= "DEFINE CLIPBOARD oC OF oD FORMAT TEXT"
|
||||
pre :='oC := TClipboard():New(UPPER("TEXT") ,oD )'
|
||||
pre :='oC := TClipboard():New(UPPER("TEXT") ,oD )'
|
||||
nRes += PreResult( pre, PreRun( in, pre ), @nCnt )
|
||||
|
||||
|
||||
|
||||
|
||||
/* ---------------------------------------------------------------------*/
|
||||
__PP_FREE()
|
||||
|
||||
OutStd( "Total count =", nCnt, hb_OSNewLine() )
|
||||
OutStd( "Valid results =", nRes, hb_OSNewLine() )
|
||||
OutStd( "Failed results=", nCnt - nRes, hb_OSNewLine() )
|
||||
|
||||
|
||||
OutStd( "Total count =", nCnt, hb_eol() )
|
||||
OutStd( "Valid results =", nRes, hb_eol() )
|
||||
OutStd( "Failed results=", nCnt - nRes, hb_eol() )
|
||||
|
||||
RETURN
|
||||
|
||||
PROCEDURE PrePrepare( in )
|
||||
@@ -1231,7 +1231,7 @@ LOCAL out:=''
|
||||
NEXT
|
||||
|
||||
RETURN out
|
||||
|
||||
|
||||
FUNCTION PreResult( pre, out, pCnt )
|
||||
LOCAL i
|
||||
|
||||
@@ -1240,15 +1240,15 @@ LOCAL i
|
||||
IF pre == out
|
||||
RETURN 1
|
||||
ELSE
|
||||
OutStd( pre, hb_OSNewLine() )
|
||||
OutStd( out, hb_OSNewLine() )
|
||||
OutStd( " => FAILED in LINE: ", PROCLINE(1), hb_OSNewLine() )
|
||||
OutStd( pre, hb_eol() )
|
||||
OutStd( out, hb_eol() )
|
||||
OutStd( " => FAILED in LINE: ", PROCLINE(1), hb_eol() )
|
||||
i := 1
|
||||
WHILE SUBSTR(pre,i,1) == SUBSTR(out,i,1)
|
||||
i++
|
||||
ENDDO
|
||||
OutStd( SUBSTR( pre, i ), hb_OSNewLine() )
|
||||
OutStd( SUBSTR( out, i ), hb_OSNewLine() )
|
||||
OutStd( SUBSTR( pre, i ), hb_eol() )
|
||||
OutStd( SUBSTR( out, i ), hb_eol() )
|
||||
ENDIF
|
||||
|
||||
|
||||
RETURN 0
|
||||
|
||||
@@ -9,8 +9,6 @@ function Main()
|
||||
local short := "1234567890"
|
||||
local i, long, very_long, cNewLine
|
||||
|
||||
cNewLine := HB_OSNewLine()
|
||||
|
||||
long := short
|
||||
for i := 1 TO 12
|
||||
long += long
|
||||
@@ -24,19 +22,19 @@ function Main()
|
||||
OutErr (len(short), len(long), len(very_long))
|
||||
Qout (len(short), len(long), len(very_long))
|
||||
|
||||
OutStd (cNewLine)
|
||||
OutStd (hb_eol())
|
||||
OutStd (len(short), len(long), len(very_long))
|
||||
|
||||
OutStd (cNewLine)
|
||||
OutStd (cNewLine)
|
||||
OutStd (hb_eol())
|
||||
OutStd (hb_eol())
|
||||
OutStd (short)
|
||||
|
||||
OutStd (cNewLine)
|
||||
OutStd (cNewLine)
|
||||
OutStd (hb_eol())
|
||||
OutStd (hb_eol())
|
||||
OutStd (long)
|
||||
|
||||
OutStd (cNewLine)
|
||||
OutStd (cNewLine)
|
||||
OutStd (hb_eol())
|
||||
OutStd (hb_eol())
|
||||
OutStd (very_long)
|
||||
|
||||
return nil
|
||||
|
||||
@@ -11,9 +11,8 @@
|
||||
#include "set.ch"
|
||||
|
||||
function Main()
|
||||
local cNewLine := HB_OSNewLine()
|
||||
|
||||
OUTSTD (cNewLine, "Testing Harbour device management on", DATE())
|
||||
OUTSTD (hb_eol(), "Testing Harbour device management on", DATE())
|
||||
SET ALTERNATE TO OUTPUT_A ADDITIVE
|
||||
SET (_SET_EXTRAFILE, "output_e.ext", .F.)
|
||||
SET PRINTER TO OUTPUT_P
|
||||
|
||||
@@ -10,10 +10,9 @@
|
||||
|
||||
function main()
|
||||
local n, value := -5
|
||||
local cNewLine := HB_OSNewLine()
|
||||
|
||||
for n := 1 to 100
|
||||
OUTSTD(cNewLine)
|
||||
OUTSTD(hb_eol())
|
||||
OUTSTD(value)
|
||||
OUTSTD(round(value, 3))
|
||||
OUTSTD(round(value, 2))
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#include "inkey.ch"
|
||||
|
||||
#ifndef __HARBOUR__
|
||||
#define hb_OSNewLine() ( Chr( 13 ) + Chr( 10 ) )
|
||||
#xtranslate hb_eol() => ( Chr( 13 ) + Chr( 10 ) )
|
||||
#endif
|
||||
|
||||
#translate TEST_LINE( <x> ) => TEST_CALL( o, #<x>, {|| <x> } )
|
||||
@@ -120,7 +120,7 @@ FUNCTION Main( cArg01, cArg02, cArg03, cArg04 )
|
||||
RETURN 1
|
||||
ENDIF
|
||||
|
||||
FWrite( s_fhnd, Set( _SET_DATEFORMAT ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, Set( _SET_DATEFORMAT ) + hb_eol() )
|
||||
|
||||
// ; Delimiter handling.
|
||||
|
||||
@@ -1485,9 +1485,9 @@ PROCEDURE LogMe( nPCount, data, desc )
|
||||
ENDIF
|
||||
|
||||
IF nPCount == 0
|
||||
FWrite( s_fhnd, cStack + "BLOCK_GET " + desc + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, cStack + "BLOCK_GET " + desc + hb_eol() )
|
||||
ELSE
|
||||
FWrite( s_fhnd, cStack + "BLOCK_SET " + XToStr( data ) + " " + desc + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, cStack + "BLOCK_SET " + XToStr( data ) + " " + desc + hb_eol() )
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
@@ -1511,37 +1511,37 @@ PROCEDURE LogGETVars( o, desc, xResult )
|
||||
ENDIF
|
||||
desc := s_cTest + " " + XToStr( desc )
|
||||
|
||||
FWrite( s_fhnd, cStack + " " + desc + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, "---------------------" + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " s_xVar " + XToStr( s_xVar ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " xResult " + XToStr( xResult ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Row() " + XToStr( Row() ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Col() " + XToStr( Col() ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " UnTransform() " + XToStr( o:UnTransform() ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " BadDate " + XToStr( o:BadDate ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Block " + XToStr( o:Block ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Buffer " + XToStr( o:Buffer ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Cargo " + XToStr( o:Cargo ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Changed " + XToStr( o:Changed ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Clear " + XToStr( o:Clear ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Col " + XToStr( o:Col ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " ColorSpec " + XToStr( o:ColorSpec ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " DecPos " + XToStr( o:DecPos ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " ExitState " + XToStr( o:ExitState ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " HasFocus " + XToStr( o:HasFocus ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Minus " + XToStr( o:Minus ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Name " + XToStr( o:Name ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Original " + XToStr( o:Original ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Picture " + XToStr( o:Picture ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Pos " + XToStr( o:Pos ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " PostBlock " + XToStr( o:PostBlock ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " PreBlock " + XToStr( o:PreBlock ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Reader " + XToStr( o:Reader ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Rejected " + XToStr( o:Rejected ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Row " + XToStr( o:Row ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " SubScript " + XToStr( o:SubScript ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Type " + XToStr( o:Type ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " TypeOut " + XToStr( o:TypeOut ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, cStack + " " + desc + hb_eol() )
|
||||
FWrite( s_fhnd, "---------------------" + hb_eol() )
|
||||
FWrite( s_fhnd, " s_xVar " + XToStr( s_xVar ) + hb_eol() )
|
||||
FWrite( s_fhnd, " xResult " + XToStr( xResult ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Row() " + XToStr( Row() ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Col() " + XToStr( Col() ) + hb_eol() )
|
||||
FWrite( s_fhnd, " UnTransform() " + XToStr( o:UnTransform() ) + hb_eol() )
|
||||
FWrite( s_fhnd, " BadDate " + XToStr( o:BadDate ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Block " + XToStr( o:Block ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Buffer " + XToStr( o:Buffer ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Cargo " + XToStr( o:Cargo ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Changed " + XToStr( o:Changed ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Clear " + XToStr( o:Clear ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Col " + XToStr( o:Col ) + hb_eol() )
|
||||
FWrite( s_fhnd, " ColorSpec " + XToStr( o:ColorSpec ) + hb_eol() )
|
||||
FWrite( s_fhnd, " DecPos " + XToStr( o:DecPos ) + hb_eol() )
|
||||
FWrite( s_fhnd, " ExitState " + XToStr( o:ExitState ) + hb_eol() )
|
||||
FWrite( s_fhnd, " HasFocus " + XToStr( o:HasFocus ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Minus " + XToStr( o:Minus ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Name " + XToStr( o:Name ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Original " + XToStr( o:Original ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Picture " + XToStr( o:Picture ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Pos " + XToStr( o:Pos ) + hb_eol() )
|
||||
FWrite( s_fhnd, " PostBlock " + XToStr( o:PostBlock ) + hb_eol() )
|
||||
FWrite( s_fhnd, " PreBlock " + XToStr( o:PreBlock ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Reader " + XToStr( o:Reader ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Rejected " + XToStr( o:Rejected ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Row " + XToStr( o:Row ) + hb_eol() )
|
||||
FWrite( s_fhnd, " SubScript " + XToStr( o:SubScript ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Type " + XToStr( o:Type ) + hb_eol() )
|
||||
FWrite( s_fhnd, " TypeOut " + XToStr( o:TypeOut ) + hb_eol() )
|
||||
IF s_lObjectDump
|
||||
#ifdef __HARBOUR__
|
||||
#ifdef HB_COMPAT_C53
|
||||
@@ -1559,11 +1559,11 @@ PROCEDURE LogGETVars( o, desc, xResult )
|
||||
#else
|
||||
IF tmp != 8 .AND. tmp != 11
|
||||
#endif
|
||||
FWrite( s_fhnd, " [ " + Str( tmp, 3 ) + " ] " + XToStrX( o[ tmp ] ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " [ " + Str( tmp, 3 ) + " ] " + XToStrX( o[ tmp ] ) + hb_eol() )
|
||||
ENDIF
|
||||
NEXT
|
||||
ENDIF
|
||||
FWrite( s_fhnd, "---------------------" + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, "---------------------" + hb_eol() )
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
#include "fileio.ch"
|
||||
|
||||
#ifndef __HARBOUR__
|
||||
#define hb_OSNewLine() ( Chr( 13 ) + Chr( 10 ) )
|
||||
#xtranslate hb_eol() => ( Chr( 13 ) + Chr( 10 ) )
|
||||
#endif
|
||||
|
||||
#ifdef __XHARBOUR__
|
||||
@@ -422,9 +422,9 @@ PROCEDURE LogMe( data, desc )
|
||||
ENDIF
|
||||
|
||||
IF PCount() > 2
|
||||
FWrite( s_fhnd, cStack + "BLOCK_SET " + iif( data == NIL, "NIL", data ) + " " + desc + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, cStack + "BLOCK_SET " + iif( data == NIL, "NIL", data ) + " " + desc + hb_eol() )
|
||||
ELSE
|
||||
FWrite( s_fhnd, cStack + "BLOCK_GET " + desc + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, cStack + "BLOCK_GET " + desc + hb_eol() )
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
@@ -449,38 +449,38 @@ PROCEDURE LogTBRVars( o, desc, xResult )
|
||||
ENDIF
|
||||
desc := s_cTest + " " + XToStr( desc )
|
||||
|
||||
FWrite( s_fhnd, cStack + " " + desc + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, "---------------------" + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " s_xVar " + XToStr( s_xVar ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " xResult " + XToStr( xResult ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Row() " + XToStr( Row() ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Col() " + XToStr( Col() ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " AutoLite " + XToStr( o:AutoLite ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Cargo " + XToStr( o:Cargo ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " ColCount " + XToStr( o:ColCount ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " ColorSpec " + XToStr( o:ColorSpec ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " ColPos " + XToStr( o:ColPos ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " ColSep " + XToStr( o:ColSep ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " FootSep " + XToStr( o:FootSep ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Freeze " + XToStr( o:Freeze ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " GoBottomBlock " + XToStr( o:GoBottomBlock ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " GoTopBlock " + XToStr( o:GoTopBlock ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " HeadSep " + XToStr( o:HeadSep ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " HitBottom " + XToStr( o:HitBottom ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " HitTop " + XToStr( o:HitTop ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " LeftVisible " + XToStr( o:LeftVisible ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " nBottom " + XToStr( o:nBottom ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " nLeft " + XToStr( o:nLeft ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " nRight " + XToStr( o:nRight ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " nTop " + XToStr( o:nTop ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " RightVisible " + XToStr( o:RightVisible ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " RowCount " + XToStr( o:RowCount ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " RowPos " + XToStr( o:RowPos ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " SkipBlock " + XToStr( o:SkipBlock ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Stable " + XToStr( o:Stable ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, cStack + " " + desc + hb_eol() )
|
||||
FWrite( s_fhnd, "---------------------" + hb_eol() )
|
||||
FWrite( s_fhnd, " s_xVar " + XToStr( s_xVar ) + hb_eol() )
|
||||
FWrite( s_fhnd, " xResult " + XToStr( xResult ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Row() " + XToStr( Row() ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Col() " + XToStr( Col() ) + hb_eol() )
|
||||
FWrite( s_fhnd, " AutoLite " + XToStr( o:AutoLite ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Cargo " + XToStr( o:Cargo ) + hb_eol() )
|
||||
FWrite( s_fhnd, " ColCount " + XToStr( o:ColCount ) + hb_eol() )
|
||||
FWrite( s_fhnd, " ColorSpec " + XToStr( o:ColorSpec ) + hb_eol() )
|
||||
FWrite( s_fhnd, " ColPos " + XToStr( o:ColPos ) + hb_eol() )
|
||||
FWrite( s_fhnd, " ColSep " + XToStr( o:ColSep ) + hb_eol() )
|
||||
FWrite( s_fhnd, " FootSep " + XToStr( o:FootSep ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Freeze " + XToStr( o:Freeze ) + hb_eol() )
|
||||
FWrite( s_fhnd, " GoBottomBlock " + XToStr( o:GoBottomBlock ) + hb_eol() )
|
||||
FWrite( s_fhnd, " GoTopBlock " + XToStr( o:GoTopBlock ) + hb_eol() )
|
||||
FWrite( s_fhnd, " HeadSep " + XToStr( o:HeadSep ) + hb_eol() )
|
||||
FWrite( s_fhnd, " HitBottom " + XToStr( o:HitBottom ) + hb_eol() )
|
||||
FWrite( s_fhnd, " HitTop " + XToStr( o:HitTop ) + hb_eol() )
|
||||
FWrite( s_fhnd, " LeftVisible " + XToStr( o:LeftVisible ) + hb_eol() )
|
||||
FWrite( s_fhnd, " nBottom " + XToStr( o:nBottom ) + hb_eol() )
|
||||
FWrite( s_fhnd, " nLeft " + XToStr( o:nLeft ) + hb_eol() )
|
||||
FWrite( s_fhnd, " nRight " + XToStr( o:nRight ) + hb_eol() )
|
||||
FWrite( s_fhnd, " nTop " + XToStr( o:nTop ) + hb_eol() )
|
||||
FWrite( s_fhnd, " RightVisible " + XToStr( o:RightVisible ) + hb_eol() )
|
||||
FWrite( s_fhnd, " RowCount " + XToStr( o:RowCount ) + hb_eol() )
|
||||
FWrite( s_fhnd, " RowPos " + XToStr( o:RowPos ) + hb_eol() )
|
||||
FWrite( s_fhnd, " SkipBlock " + XToStr( o:SkipBlock ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Stable " + XToStr( o:Stable ) + hb_eol() )
|
||||
#ifdef HB_COMPAT_C53
|
||||
FWrite( s_fhnd, " border " + XToStr( o:border ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " message " + XToStr( o:message ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " border " + XToStr( o:border ) + hb_eol() )
|
||||
FWrite( s_fhnd, " message " + XToStr( o:message ) + hb_eol() )
|
||||
#endif
|
||||
IF s_lObjectDump
|
||||
#ifdef __HARBOUR__
|
||||
@@ -494,34 +494,34 @@ PROCEDURE LogTBRVars( o, desc, xResult )
|
||||
#endif
|
||||
/* [14] is binary data, not replicated in Harbour. */
|
||||
IF tmp != 14
|
||||
FWrite( s_fhnd, " [ " + Str( tmp, 3 ) + " ] " + XToStrX( o[ tmp ] ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " [ " + Str( tmp, 3 ) + " ] " + XToStrX( o[ tmp ] ) + hb_eol() )
|
||||
ENDIF
|
||||
NEXT
|
||||
ENDIF
|
||||
FOR tmp := 1 TO o:colCount
|
||||
FWrite( s_fhnd, " Column: " + StrZero( tmp, 3 ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Column: " + StrZero( tmp, 3 ) + hb_eol() )
|
||||
col := o:GetColumn( tmp )
|
||||
IF ISOBJECT( col )
|
||||
FWrite( s_fhnd, " Block " + XToStr( col:Block ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Cargo " + XToStr( col:Cargo ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " ColorBlock " + XToStr( col:ColorBlock ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " ColSep " + XToStr( col:ColSep ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " DefColor " + XToStr( col:DefColor ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Footing " + XToStr( col:Footing ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " FootSep " + XToStr( col:FootSep ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Heading " + XToStr( col:Heading ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " HeadSep " + XToStr( col:HeadSep ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Picture " + XToStr( col:Picture ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Width " + XToStr( col:Width ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Block " + XToStr( col:Block ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Cargo " + XToStr( col:Cargo ) + hb_eol() )
|
||||
FWrite( s_fhnd, " ColorBlock " + XToStr( col:ColorBlock ) + hb_eol() )
|
||||
FWrite( s_fhnd, " ColSep " + XToStr( col:ColSep ) + hb_eol() )
|
||||
FWrite( s_fhnd, " DefColor " + XToStr( col:DefColor ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Footing " + XToStr( col:Footing ) + hb_eol() )
|
||||
FWrite( s_fhnd, " FootSep " + XToStr( col:FootSep ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Heading " + XToStr( col:Heading ) + hb_eol() )
|
||||
FWrite( s_fhnd, " HeadSep " + XToStr( col:HeadSep ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Picture " + XToStr( col:Picture ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Width " + XToStr( col:Width ) + hb_eol() )
|
||||
#ifdef HB_COMPAT_C53
|
||||
FWrite( s_fhnd, " preBlock " + XToStr( col:preBlock ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " postBlock " + XToStr( col:postBlock ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " preBlock " + XToStr( col:preBlock ) + hb_eol() )
|
||||
FWrite( s_fhnd, " postBlock " + XToStr( col:postBlock ) + hb_eol() )
|
||||
#endif
|
||||
ELSE
|
||||
FWrite( s_fhnd, " Col: " + XToStr( col ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Col: " + XToStr( col ) + hb_eol() )
|
||||
ENDIF
|
||||
NEXT
|
||||
FWrite( s_fhnd, "---------------------" + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, "---------------------" + hb_eol() )
|
||||
|
||||
RETURN
|
||||
|
||||
@@ -544,25 +544,25 @@ PROCEDURE LogTBCVars( o, desc, xResult )
|
||||
ENDIF
|
||||
desc := s_cTest + " " + XToStr( desc )
|
||||
|
||||
FWrite( s_fhnd, cStack + " " + desc + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, "---------------------" + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " s_xVar " + XToStr( s_xVar ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " xResult " + XToStr( xResult ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, cStack + " " + desc + hb_eol() )
|
||||
FWrite( s_fhnd, "---------------------" + hb_eol() )
|
||||
FWrite( s_fhnd, " s_xVar " + XToStr( s_xVar ) + hb_eol() )
|
||||
FWrite( s_fhnd, " xResult " + XToStr( xResult ) + hb_eol() )
|
||||
IF ISOBJECT( o )
|
||||
FWrite( s_fhnd, " Block " + XToStr( o:Block ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Cargo " + XToStr( o:Cargo ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " ColorBlock " + XToStr( o:ColorBlock ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " ColSep " + XToStr( o:ColSep ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " DefColor " + XToStr( o:DefColor ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Footing " + XToStr( o:Footing ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " FootSep " + XToStr( o:FootSep ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Heading " + XToStr( o:Heading ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " HeadSep " + XToStr( o:HeadSep ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Picture " + XToStr( o:Picture ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Width " + XToStr( o:Width ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " Block " + XToStr( o:Block ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Cargo " + XToStr( o:Cargo ) + hb_eol() )
|
||||
FWrite( s_fhnd, " ColorBlock " + XToStr( o:ColorBlock ) + hb_eol() )
|
||||
FWrite( s_fhnd, " ColSep " + XToStr( o:ColSep ) + hb_eol() )
|
||||
FWrite( s_fhnd, " DefColor " + XToStr( o:DefColor ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Footing " + XToStr( o:Footing ) + hb_eol() )
|
||||
FWrite( s_fhnd, " FootSep " + XToStr( o:FootSep ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Heading " + XToStr( o:Heading ) + hb_eol() )
|
||||
FWrite( s_fhnd, " HeadSep " + XToStr( o:HeadSep ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Picture " + XToStr( o:Picture ) + hb_eol() )
|
||||
FWrite( s_fhnd, " Width " + XToStr( o:Width ) + hb_eol() )
|
||||
#ifdef HB_COMPAT_C53
|
||||
FWrite( s_fhnd, " preBlock " + XToStr( o:preBlock ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " postBlock " + XToStr( o:postBlock ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " preBlock " + XToStr( o:preBlock ) + hb_eol() )
|
||||
FWrite( s_fhnd, " postBlock " + XToStr( o:postBlock ) + hb_eol() )
|
||||
#endif
|
||||
IF s_lObjectDump
|
||||
#ifdef __HARBOUR__
|
||||
@@ -574,13 +574,13 @@ PROCEDURE LogTBCVars( o, desc, xResult )
|
||||
#else
|
||||
FOR tmp := 1 TO Len( o )
|
||||
#endif
|
||||
FWrite( s_fhnd, " [ " + Str( tmp, 3 ) + " ] " + XToStrX( o[ tmp ] ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " [ " + Str( tmp, 3 ) + " ] " + XToStrX( o[ tmp ] ) + hb_eol() )
|
||||
NEXT
|
||||
ENDIF
|
||||
ELSE
|
||||
FWrite( s_fhnd, " o " + XToStr( o ) + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, " o " + XToStr( o ) + hb_eol() )
|
||||
ENDIF
|
||||
FWrite( s_fhnd, "---------------------" + hb_OSNewLine() )
|
||||
FWrite( s_fhnd, "---------------------" + hb_eol() )
|
||||
|
||||
RETURN
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* Test SECONDS() */
|
||||
/* Harbour Project source code
|
||||
@@ -10,20 +10,19 @@
|
||||
|
||||
function Main( cParam )
|
||||
local n, limit := 10
|
||||
local cNewLine := HB_OSNewLine()
|
||||
|
||||
IF ! EMPTY( cParam )
|
||||
limit := VAL( cParam )
|
||||
ENDIF
|
||||
OUTSTD( cNewLine )
|
||||
OUTSTD( hb_eol() )
|
||||
OUTSTD( SECONDS() )
|
||||
FOR n := 1 TO limit
|
||||
IF EMPTY( cParam )
|
||||
OUTSTD( cNewLine )
|
||||
OUTSTD( hb_eol() )
|
||||
OUTSTD( "Pause: " )
|
||||
INKEY(0)
|
||||
ENDIF
|
||||
OUTSTD( cNewLine )
|
||||
OUTSTD( hb_eol() )
|
||||
OUTSTD( SECONDS() )
|
||||
NEXT
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing SET
|
||||
|
||||
#include "set.ch"
|
||||
|
||||
function Main()
|
||||
local n, cNewLine := HB_OSNewLine()
|
||||
local n
|
||||
|
||||
for n := 1 to _SET_COUNT
|
||||
outstd (cNewLine)
|
||||
outstd (hb_eol())
|
||||
outstd (set (n))
|
||||
next
|
||||
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing SET
|
||||
|
||||
STATIC s_cNewLine
|
||||
|
||||
#include "set.ch"
|
||||
request dbfntx
|
||||
function Main()
|
||||
// for Clipper, this drags in the terminal driver
|
||||
@ Row(), col() say ""
|
||||
|
||||
s_cNewLine := HB_OSNewLine()
|
||||
|
||||
TestLine( "_SET_EXACT", 1)
|
||||
TestLine( "_SET_FIXED", 2)
|
||||
TestLine( "_SET_DECIMALS", 3)
|
||||
@@ -86,7 +82,7 @@ function Main()
|
||||
return nil
|
||||
|
||||
proc testline( c, n )
|
||||
outstd( s_cNewLine )
|
||||
outstd( hb_eol() )
|
||||
outstd( str( n, 3 ) )
|
||||
outstd( " " )
|
||||
outstd( Padr( c, 20 ) )
|
||||
|
||||
@@ -21,30 +21,30 @@
|
||||
#define REAL_TIME
|
||||
|
||||
#ifdef __CLIP__
|
||||
#define ASSOC_ARRAY map()
|
||||
#undef REAL_TIME
|
||||
#define ASSOC_ARRAY map()
|
||||
#undef REAL_TIME
|
||||
#endif
|
||||
#ifdef FlagShip
|
||||
#undef REAL_TIME
|
||||
#xtranslate seconds() => fs_seconds()
|
||||
#undef REAL_TIME
|
||||
#xtranslate seconds() => fs_seconds()
|
||||
#endif
|
||||
#ifdef __HARBOUR__
|
||||
#include "hbmemory.ch"
|
||||
#define ASSOC_ARRAY { => }
|
||||
#undef REAL_TIME
|
||||
#include "hbmemory.ch"
|
||||
#define ASSOC_ARRAY { => }
|
||||
#undef REAL_TIME
|
||||
#endif
|
||||
|
||||
#ifdef REAL_TIME
|
||||
#xtranslate hb_secondsCPU([<x>]) => seconds()
|
||||
#xtranslate hb_secondsCPU([<x>]) => seconds()
|
||||
#endif
|
||||
#ifndef EOL
|
||||
#define EOL hb_OSNewLine()
|
||||
#define EOL hb_eol()
|
||||
#endif
|
||||
#command ? => outstd(EOL)
|
||||
#command ? <xx,...> => outstd(<xx>, EOL)
|
||||
|
||||
#ifdef NO_ASSOC_TEST
|
||||
#undef ASSOC_ARRAY
|
||||
#undef ASSOC_ARRAY
|
||||
#endif
|
||||
|
||||
function main()
|
||||
@@ -56,7 +56,7 @@ local L_C, L_N, L_D
|
||||
local i, j, t, c, c2, n, d, o, bc, tn, total, totalr, aa,;
|
||||
a[ARR_LEN], a2[ARR_LEN], a3[ARR_LEN], aDb, cFi1, cFi2
|
||||
#ifdef ASSOC_ARRAY
|
||||
local aAssoc := ASSOC_ARRAY
|
||||
local aAssoc := ASSOC_ARRAY
|
||||
#endif
|
||||
private M_C := dtos(date()),;
|
||||
M_N := 112345.67,;
|
||||
@@ -64,25 +64,25 @@ private M_C := dtos(date()),;
|
||||
|
||||
#ifndef __CLIP__
|
||||
//#ifdef __HARBOUR__
|
||||
// setcancel(.f.)
|
||||
// altd(0)
|
||||
// setcancel(.f.)
|
||||
// altd(0)
|
||||
//#endif
|
||||
#endif
|
||||
#ifdef __CLIP__
|
||||
SET MACRO_IN_STRING OFF
|
||||
//CLEAR SCREEN
|
||||
SET MACRO_IN_STRING OFF
|
||||
//CLEAR SCREEN
|
||||
#endif
|
||||
#ifdef FlagShip
|
||||
FS_SET( "zerobyte", .t. )
|
||||
FS_SET( "devel", .f. )
|
||||
// FS_SET( "break", 0 )
|
||||
// FS_SET( "debug", 0 )
|
||||
FS_SET( "zerobyte", .t. )
|
||||
FS_SET( "devel", .f. )
|
||||
// FS_SET( "break", 0 )
|
||||
// FS_SET( "debug", 0 )
|
||||
#endif
|
||||
|
||||
for i:=1 to len(a)
|
||||
a[i]:=i
|
||||
a2[i]:=dtos(date())+chr(i%64+32)+chr(i%64+64)+str(i,10)
|
||||
a3[i]:=stuff(dtos(date()),7,0,".")
|
||||
a[i]:=i
|
||||
a2[i]:=dtos(date())+chr(i%64+32)+chr(i%64+64)+str(i,10)
|
||||
a3[i]:=stuff(dtos(date()),7,0,".")
|
||||
next
|
||||
|
||||
#ifdef __HARBOUR__
|
||||
@@ -106,9 +106,9 @@ next
|
||||
tn:=hb_secondsCPU()-t
|
||||
? "empty loops overhead =", tn
|
||||
#ifdef REAL_TIME
|
||||
? "real time -> seconds()"
|
||||
? "real time -> seconds()"
|
||||
#else
|
||||
? "CPU usage -> hb_secondsCPU()"
|
||||
? "CPU usage -> hb_secondsCPU()"
|
||||
#endif
|
||||
? ""
|
||||
|
||||
@@ -120,7 +120,7 @@ aDb:={ {"F_C", "C", 10, 0},;
|
||||
|
||||
cFi1:="tst_tmp.dbf"
|
||||
if file(cFi1)
|
||||
ferase(cFi1)
|
||||
ferase(cFi1)
|
||||
endif
|
||||
dbcreate(cFi1, aDb)
|
||||
select(1)
|
||||
@@ -134,7 +134,7 @@ dbunlock()
|
||||
|
||||
cFi2:="tst_tmp2.dbf"
|
||||
if file(cFi2)
|
||||
ferase(cFi2)
|
||||
ferase(cFi2)
|
||||
endif
|
||||
dbcreate(cFi2, aDb)
|
||||
select(2)
|
||||
@@ -157,37 +157,37 @@ total:=hb_secondsCPU()
|
||||
totalr:=seconds()
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
c:=L_C
|
||||
c:=L_C
|
||||
next
|
||||
dsp_time( "c:=L_C -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
n:=L_N
|
||||
n:=L_N
|
||||
next
|
||||
dsp_time( "n:=L_N -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
d:=L_D
|
||||
d:=L_D
|
||||
next
|
||||
dsp_time( "d:=L_D -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
c:=M_C
|
||||
c:=M_C
|
||||
next
|
||||
dsp_time( "c:=M_C -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
n:=M_N
|
||||
n:=M_N
|
||||
next
|
||||
dsp_time( "n:=M_N -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
d:=M_D
|
||||
d:=M_D
|
||||
next
|
||||
dsp_time( "d:=M_D -> ", t, tn)
|
||||
|
||||
@@ -195,38 +195,38 @@ dsp_time( "d:=M_D -> ", t, tn)
|
||||
select(1)
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
c:=F_C
|
||||
c:=F_C
|
||||
next
|
||||
dsp_time( "(sh) c:=F_C -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
n:=F_N
|
||||
n:=F_N
|
||||
next
|
||||
dsp_time( "(sh) n:=F_N -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
d:=F_D
|
||||
d:=F_D
|
||||
next
|
||||
dsp_time( "(sh) d:=F_D -> ", t, tn)
|
||||
|
||||
select(2)
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
c:=F_C
|
||||
c:=F_C
|
||||
next
|
||||
dsp_time( "(ex) c:=F_C -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
n:=F_N
|
||||
n:=F_N
|
||||
next
|
||||
dsp_time( "(ex) n:=F_N -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
d:=F_D
|
||||
d:=F_D
|
||||
next
|
||||
dsp_time( "(ex) d:=F_D -> ", t, tn)
|
||||
#endif
|
||||
@@ -234,14 +234,14 @@ dsp_time( "(ex) d:=F_D -> ", t, tn)
|
||||
o:=errorNew()
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
n:=o:GenCode
|
||||
n:=o:GenCode
|
||||
next
|
||||
dsp_time( "n:=o:GenCode -> ", t, tn)
|
||||
|
||||
#ifdef __HARBOUR__
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
n:=o[8]
|
||||
n:=o[8]
|
||||
next
|
||||
dsp_time( "n:=o[8] -> ", t, tn)
|
||||
#endif
|
||||
@@ -249,13 +249,13 @@ dsp_time( "n:=o[8] -> ", t, tn)
|
||||
#ifdef ASSOC_ARRAY
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
aAssoc[a2[i%ARR_LEN+1]+ltrim(str(i%100))]:=i
|
||||
aAssoc[a2[i%ARR_LEN+1]+ltrim(str(i%100))]:=i
|
||||
next
|
||||
dsp_time( "aAssoc[a2[i%ARR_LEN+1]+ltrim(str(i%100)]:=i -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
c:=aAssoc[a2[i%ARR_LEN+1]+ltrim(str(i%100))]
|
||||
c:=aAssoc[a2[i%ARR_LEN+1]+ltrim(str(i%100))]
|
||||
next
|
||||
dsp_time( "c:=aAssoc[a2[i%ARR_LEN+1]+ltrim(str(i%100)] -> ", t, tn)
|
||||
#endif
|
||||
@@ -263,219 +263,219 @@ dsp_time( "c:=aAssoc[a2[i%ARR_LEN+1]+ltrim(str(i%100)] -> ", t, tn)
|
||||
#ifndef NO_KEYBOARD_TEST
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
inkey()
|
||||
inkey()
|
||||
next
|
||||
dsp_time( "inkey() -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
nextkey()
|
||||
nextkey()
|
||||
next
|
||||
dsp_time( "nextkey() -> ", t, tn)
|
||||
#endif
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
round(i/1000,2)
|
||||
round(i/1000,2)
|
||||
next
|
||||
dsp_time( "round(i/1000,2) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
str(i/1000)
|
||||
str(i/1000)
|
||||
next
|
||||
dsp_time( "str(i/1000) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
val(a3[i%ARR_LEN+1])
|
||||
val(a3[i%ARR_LEN+1])
|
||||
next
|
||||
dsp_time( "val(a3[i%ARR_LEN+1]) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
j:=date()
|
||||
for i:=1 to N_LOOPS
|
||||
dtos(j+i%10000-5000)
|
||||
dtos(j+i%10000-5000)
|
||||
next
|
||||
dsp_time( "dtos(j+i%10000-5000) -> ", t, tn)
|
||||
|
||||
bc:={||i%ARR_LEN}
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
eval(bc)
|
||||
eval(bc)
|
||||
next
|
||||
dsp_time( "eval({||i%ARR_LEN}) -> ", t, tn)
|
||||
|
||||
bc:={|x|x%ARR_LEN}
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
eval(bc,i)
|
||||
eval(bc,i)
|
||||
next
|
||||
dsp_time( "eval({|x|x%ARR_LEN},i) -> ", t, tn)
|
||||
|
||||
bc:={|x|f1(x)}
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
eval(bc,i)
|
||||
eval(bc,i)
|
||||
next
|
||||
dsp_time( "eval({|x|f1(x)},i) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
n:=&("f1("+str(i)+")")
|
||||
n:=&("f1("+str(i)+")")
|
||||
next
|
||||
dsp_time( "&('f1('+str(i)+')') -> ", t, tn)
|
||||
|
||||
bc:=&("{|x|f1(x)}")
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
eval(bc,i)
|
||||
eval(bc,i)
|
||||
next
|
||||
dsp_time( "eval([&('{|x|f1(x)}')]) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
j:=valtype(a)+valtype(i)
|
||||
j:=valtype(a)+valtype(i)
|
||||
next
|
||||
dsp_time( "j := valtype(a)+valtype(i) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
j := str(i%100,2) $ a2[i%ARR_LEN+1]
|
||||
j := str(i%100,2) $ a2[i%ARR_LEN+1]
|
||||
next
|
||||
dsp_time( "j := str(i%100,2) $ a2[i%ARR_LEN+1] -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
j := val(a2[i%ARR_LEN+1])
|
||||
j := val(a2[i%ARR_LEN+1])
|
||||
next
|
||||
dsp_time( "j := val(a2[i%ARR_LEN+1]) -> ", t, tn)
|
||||
|
||||
c:=dtos(date())
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
j := a2[i%ARR_LEN+1] == c
|
||||
j := a2[i%ARR_LEN+1] == c
|
||||
next
|
||||
dsp_time( "j := a2[i%ARR_LEN+1] == s -> ", t, tn)
|
||||
|
||||
c:=dtos(date())
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
j := a2[i%ARR_LEN+1] = c
|
||||
j := a2[i%ARR_LEN+1] = c
|
||||
next
|
||||
dsp_time( "j := a2[i%ARR_LEN+1] = s -> ", t, tn)
|
||||
|
||||
c:=dtos(date())
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
j := a2[i%ARR_LEN+1] >= c
|
||||
j := a2[i%ARR_LEN+1] >= c
|
||||
next
|
||||
dsp_time( "j := a2[i%ARR_LEN+1] >= s -> ", t, tn)
|
||||
|
||||
c:=dtos(date())
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
j := a2[i%ARR_LEN+1] < c
|
||||
j := a2[i%ARR_LEN+1] < c
|
||||
next
|
||||
dsp_time( "j := a2[i%ARR_LEN+1] < s -> ", t, tn)
|
||||
|
||||
aa:={}
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
if i%1000 == 0
|
||||
aa:={}
|
||||
endif
|
||||
aadd(aa,{i,j,c,a,a2,t,bc})
|
||||
if i%1000 == 0
|
||||
aa:={}
|
||||
endif
|
||||
aadd(aa,{i,j,c,a,a2,t,bc})
|
||||
next
|
||||
dsp_time( "aadd(aa,{i,j,s,a,a2,t,bc}) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
f0()
|
||||
f0()
|
||||
next
|
||||
dsp_time( "f0() -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
f1(i)
|
||||
f1(i)
|
||||
next
|
||||
dsp_time( "f1(i) -> ", t, tn)
|
||||
|
||||
c:=dtos(date())
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
f2(c)
|
||||
f2(c)
|
||||
next
|
||||
dsp_time( "f2(c["+ltrim(str(len(c)))+"]) -> ", t, tn)
|
||||
|
||||
c:=replicate(c,5000)
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
f2(c)
|
||||
f2(c)
|
||||
next
|
||||
dsp_time( "f2(c["+ltrim(str(len(c)))+"]) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
f2(@c)
|
||||
f2(@c)
|
||||
next
|
||||
dsp_time( "f2(@c["+ltrim(str(len(c)))+"]) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
f2(c)
|
||||
c2:=c
|
||||
f2(c)
|
||||
c2:=c
|
||||
next
|
||||
dsp_time( "f2(c["+ltrim(str(len(c)))+"]); c2:=c -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
f2(@c)
|
||||
c2:=c
|
||||
f2(@c)
|
||||
c2:=c
|
||||
next
|
||||
dsp_time( "f2(@c["+ltrim(str(len(c)))+"]); c2:=c -> ", t, tn)
|
||||
|
||||
c:=dtos(date())
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
f3(a,a2,c,i,j,t,bc)
|
||||
f3(a,a2,c,i,j,t,bc)
|
||||
next
|
||||
dsp_time( "f3(a,a2,c,i,j,t,bc) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
f2(a2)
|
||||
f2(a2)
|
||||
next
|
||||
dsp_time( "f2(a2) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
c:=f4()
|
||||
c:=f4()
|
||||
next
|
||||
dsp_time( "s:=f4() -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
c:=f5()
|
||||
c:=f5()
|
||||
next
|
||||
dsp_time( "s:=f5() -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
ascan(a,i%ARR_LEN)
|
||||
ascan(a,i%ARR_LEN)
|
||||
next
|
||||
dsp_time( "ascan(a,i%ARR_LEN) -> ", t, tn)
|
||||
|
||||
c:=dtos(date())
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
ascan(a2,c+chr(i%64+64))
|
||||
ascan(a2,c+chr(i%64+64))
|
||||
next
|
||||
dsp_time( "ascan(a2,c+chr(i%64+64)) -> ", t, tn)
|
||||
|
||||
t:=hb_secondsCPU()
|
||||
for i:=1 to N_LOOPS
|
||||
ascan(a,{|x|x==i%ARR_LEN})
|
||||
ascan(a,{|x|x==i%ARR_LEN})
|
||||
next
|
||||
dsp_time( "ascan(a,{|x|x==i%ARR_LEN}) -> ", t, tn)
|
||||
|
||||
@@ -487,10 +487,10 @@ dsp_time( "total application time:", total, 0)
|
||||
#ifndef NO_DBF_TEST
|
||||
|
||||
if file(cFi1)
|
||||
ferase(cFi1)
|
||||
ferase(cFi1)
|
||||
endif
|
||||
if file(cFi2)
|
||||
ferase(cFi2)
|
||||
ferase(cFi2)
|
||||
endif
|
||||
|
||||
#endif
|
||||
@@ -521,55 +521,55 @@ return space(5)
|
||||
|
||||
function build_mode()
|
||||
#ifdef __CLIP__
|
||||
return " (MT)"
|
||||
return " (MT)"
|
||||
#else
|
||||
#ifdef __XHARBOUR__
|
||||
return iif( HB_MULTITHREAD(), " (MT)", "" ) + ;
|
||||
iif( MEMORY( HB_MEM_USEDMAX ) != 0, " (FMSTAT)", "" )
|
||||
#else
|
||||
#ifdef __HARBOUR__
|
||||
return iif( HB_MTVM(), " (MT)", "" ) + ;
|
||||
iif( MEMORY( HB_MEM_USEDMAX ) != 0, " (FMSTAT)", "" )
|
||||
#else
|
||||
#ifdef __XPP__
|
||||
return " (MT)"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#ifdef __XHARBOUR__
|
||||
return iif( HB_MULTITHREAD(), " (MT)", "" ) + ;
|
||||
iif( MEMORY( HB_MEM_USEDMAX ) != 0, " (FMSTAT)", "" )
|
||||
#else
|
||||
#ifdef __HARBOUR__
|
||||
return iif( HB_MTVM(), " (MT)", "" ) + ;
|
||||
iif( MEMORY( HB_MEM_USEDMAX ) != 0, " (FMSTAT)", "" )
|
||||
#else
|
||||
#ifdef __XPP__
|
||||
return " (MT)"
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
return ""
|
||||
|
||||
#ifdef FlagShip
|
||||
function fs_seconds()
|
||||
LOCAL_DOUBLE nret := 0
|
||||
#Cinline
|
||||
{
|
||||
#include <sys/time.h>
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
if( !gettimeofday(&tv, NULL) )
|
||||
nret = (double) tv.tv_sec + (double) (tv.tv_usec) / 1000000;
|
||||
function fs_seconds()
|
||||
LOCAL_DOUBLE nret := 0
|
||||
#Cinline
|
||||
{
|
||||
#include <sys/time.h>
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
if( !gettimeofday(&tv, NULL) )
|
||||
nret = (double) tv.tv_sec + (double) (tv.tv_usec) / 1000000;
|
||||
/*
|
||||
nret = (double) (tv.tv_sec - tz.tz_minuteswest * 60 ) % 86400 +
|
||||
(double) tv.tv_usec / 1000000;
|
||||
nret = (double) (tv.tv_sec - tz.tz_minuteswest * 60 ) % 86400 +
|
||||
(double) tv.tv_usec / 1000000;
|
||||
*/
|
||||
}
|
||||
#endCinline
|
||||
return nret
|
||||
}
|
||||
#endCinline
|
||||
return nret
|
||||
|
||||
#ifndef FlagShip5
|
||||
FUNCTION cursesinit()
|
||||
CALL fgsIoctl2
|
||||
#Cinline
|
||||
{
|
||||
#include <fcntl.h>
|
||||
int arg;
|
||||
if ((arg = fcntl(0, F_GETFL, 0)) != -1)
|
||||
fcntl(0, F_SETFL, arg | O_NONBLOCK);
|
||||
}
|
||||
#endCinline
|
||||
return nil
|
||||
#endif
|
||||
#ifndef FlagShip5
|
||||
FUNCTION cursesinit()
|
||||
CALL fgsIoctl2
|
||||
#Cinline
|
||||
{
|
||||
#include <fcntl.h>
|
||||
int arg;
|
||||
if ((arg = fcntl(0, F_GETFL, 0)) != -1)
|
||||
fcntl(0, F_SETFL, arg | O_NONBLOCK);
|
||||
}
|
||||
#endCinline
|
||||
return nil
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if __HARBOUR__ < 0x010100
|
||||
@@ -578,7 +578,7 @@ STATIC FUNCTION HB_MTVM()
|
||||
#endif
|
||||
|
||||
#ifndef __HARBOUR__
|
||||
STATIC FUNCTION hb_OSNewLine()
|
||||
STATIC FUNCTION hb_eol()
|
||||
#ifdef FlagShip
|
||||
RETURN Chr( 10 )
|
||||
#elif __CLIP__
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
#command ?? <xx,...> => spd_out(<xx>)
|
||||
|
||||
#ifdef __HARBOUR__
|
||||
#define EOL hb_OSNewLine()
|
||||
#define EOL hb_eol()
|
||||
#else
|
||||
#ifndef EOL
|
||||
#define EOL chr(10)
|
||||
|
||||
@@ -15,14 +15,10 @@
|
||||
*
|
||||
**/
|
||||
|
||||
STATIC s_cNewLine
|
||||
|
||||
FUNCTION Main()
|
||||
|
||||
LOCAL oHTML := THTML():New()
|
||||
|
||||
s_cNewLine := HB_OSNewLine()
|
||||
|
||||
oHTML:SetTitle( "Harbour Power Demonstration" )
|
||||
oHTML:AddHead( "Harbour Project" )
|
||||
oHTML:AddPara( "<B>Harbour</B> is xBase at its best. Have a taste today!", "LEFT" )
|
||||
@@ -122,8 +118,8 @@ STATIC FUNCTION AddPara( cPara, cAlign )
|
||||
cAlign:=iif(cAlign==NIL,"Left",cAlign) //Added Patrick Mast 2000-06-17
|
||||
|
||||
::cBody := ::cBody + ;
|
||||
"<P ALIGN='" + cAlign + "'>" + s_cNewLine + ;
|
||||
cPara + s_cNewLine + ;
|
||||
"<P ALIGN='" + cAlign + "'>" + hb_eol() + ;
|
||||
cPara + hb_eol() + ;
|
||||
"</P>"
|
||||
|
||||
RETURN Self
|
||||
@@ -133,11 +129,11 @@ STATIC FUNCTION Generate()
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
::cContent := ;
|
||||
"<HTML><HEAD>" + s_cNewLine + ;
|
||||
"<TITLE>" + ::cTitle + "</TITLE>" + s_cNewLine + ;
|
||||
"<HTML><HEAD>" + hb_eol() + ;
|
||||
"<TITLE>" + ::cTitle + "</TITLE>" + hb_eol() + ;
|
||||
"<BODY link='" + ::cLinkColor + "' " + ;
|
||||
"vlink='" + ::cvLinkColor + "'>" + + s_cNewLine + ;
|
||||
::cBody + s_cNewLine + ;
|
||||
"vlink='" + ::cvLinkColor + "'>" + + hb_eol() + ;
|
||||
::cBody + hb_eol() + ;
|
||||
"</BODY></HTML>"
|
||||
|
||||
RETURN Self
|
||||
@@ -147,8 +143,8 @@ STATIC FUNCTION ShowResult()
|
||||
LOCAL Self := QSelf()
|
||||
|
||||
OutStd( ;
|
||||
;// "HTTP/1.0 200 OK" + s_cNewLine + ;
|
||||
"CONTENT-TYPE: TEXT/HTML" + s_cNewLine + s_cNewLine + ;
|
||||
;// "HTTP/1.0 200 OK" + hb_eol() + ;
|
||||
"CONTENT-TYPE: TEXT/HTML" + hb_eol() + hb_eol() + ;
|
||||
::cContent )
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -2,68 +2,64 @@
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#ifdef __HARBOUR__
|
||||
#define CRLF hb_osnewline()
|
||||
#else
|
||||
#define CRLF chr(13)+chr(10)
|
||||
#ifndef __HARBOUR__
|
||||
#xtranslate hb_eol() => ( Chr( 13 ) + Chr( 10 ) )
|
||||
#endif
|
||||
|
||||
funct main()
|
||||
PROCEDURE main()
|
||||
|
||||
local i
|
||||
local cStr := ""
|
||||
LOCAL i
|
||||
LOCAL cStr := ""
|
||||
|
||||
USE "test" NEW
|
||||
USE "test" NEW
|
||||
|
||||
for i := 1 to 100
|
||||
cStr += Str( i ) + " " + xToStr( DbInfo( i ) ) + CRLF
|
||||
next
|
||||
cStr += Str( 101 ) + " " + xToStr( DbInfo( 101 ) ) + CRLF
|
||||
cStr += Str( 101 ) + " " + xToStr( DbInfo( 101, 1 ) ) + CRLF
|
||||
cStr += Str( 101 ) + " " + xToStr( DbInfo( 101, 2 ) ) + CRLF
|
||||
cStr += Str( 102 ) + " " + xToStr( DbInfo( 102 ) ) + CRLF
|
||||
cStr += Str( 101 ) + " " + xToStr( DbInfo( 102, 1 ) ) + CRLF
|
||||
cStr += Str( 101 ) + " " + xToStr( DbInfo( 102, 2 ) ) + CRLF
|
||||
cStr += Str( 999 ) + " " + xToStr( DbInfo( 999 ) ) + CRLF
|
||||
cStr += Str( 1000 ) + " " + xToStr( DbInfo( 1000 ) ) + CRLF
|
||||
FOR i := 1 TO 100
|
||||
cStr += Str( i ) + " " + xToStr( DbInfo( i ) ) + hb_eol()
|
||||
NEXT
|
||||
cStr += Str( 101 ) + " " + xToStr( DbInfo( 101 ) ) + hb_eol()
|
||||
cStr += Str( 101 ) + " " + xToStr( DbInfo( 101, 1 ) ) + hb_eol()
|
||||
cStr += Str( 101 ) + " " + xToStr( DbInfo( 101, 2 ) ) + hb_eol()
|
||||
cStr += Str( 102 ) + " " + xToStr( DbInfo( 102 ) ) + hb_eol()
|
||||
cStr += Str( 101 ) + " " + xToStr( DbInfo( 102, 1 ) ) + hb_eol()
|
||||
cStr += Str( 101 ) + " " + xToStr( DbInfo( 102, 2 ) ) + hb_eol()
|
||||
cStr += Str( 999 ) + " " + xToStr( DbInfo( 999 ) ) + hb_eol()
|
||||
cStr += Str( 1000 ) + " " + xToStr( DbInfo( 1000 ) ) + hb_eol()
|
||||
|
||||
#ifdef __HARBOUR__
|
||||
MemoWrit( "dbihb.txt", cStr )
|
||||
MemoWrit( "dbihb.txt", cStr )
|
||||
#else
|
||||
MemoWrit( "dbicl.txt", cStr )
|
||||
MemoWrit( "dbicl.txt", cStr )
|
||||
#endif
|
||||
|
||||
? DbRecordInfo( 1 )
|
||||
? DbRecordInfo( 2 )
|
||||
? DbRecordInfo( 3 )
|
||||
? DbRecordInfo( 4 )
|
||||
? DbRecordInfo( 5 )
|
||||
? DbRecordInfo( 1 )
|
||||
? DbRecordInfo( 2 )
|
||||
? DbRecordInfo( 3 )
|
||||
? DbRecordInfo( 4 )
|
||||
? DbRecordInfo( 5 )
|
||||
|
||||
? DbFieldInfo( 1, 1 )
|
||||
? DbFieldInfo( 2, 1 )
|
||||
? DbFieldInfo( 3, 1 )
|
||||
? DbFieldInfo( 4, 1 )
|
||||
? DbFieldInfo( 1, 1 )
|
||||
? DbFieldInfo( 2, 1 )
|
||||
? DbFieldInfo( 3, 1 )
|
||||
? DbFieldInfo( 4, 1 )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
static function xToStr( xValue )
|
||||
STATIC FUNCTION xToStr( xValue )
|
||||
|
||||
LOCAL cType := ValType( xValue )
|
||||
LOCAL cRet := ""
|
||||
SWITCH ValType( xValue )
|
||||
CASE "N"
|
||||
RETURN Str( xValue )
|
||||
CASE "D"
|
||||
RETURN DToC( xValue )
|
||||
CASE "C"
|
||||
CASE "M"
|
||||
RETURN xValue
|
||||
CASE "L"
|
||||
RETURN iif( xValue, ".T.", ".F." )
|
||||
CASE "A"
|
||||
RETURN "A" + hb_ntos( Len( xValue ) )
|
||||
CASE "U"
|
||||
RETURN "NIL"
|
||||
ENDCASE
|
||||
|
||||
do case
|
||||
case cType == "N"
|
||||
cRet := Str( xValue )
|
||||
case cType == "D"
|
||||
cRet := DToC( xValue )
|
||||
case cType == "C" .or. cType == "M"
|
||||
cRet := xValue
|
||||
case cType == "L"
|
||||
cRet := iif( xValue, ".T.", ".F." )
|
||||
case cType == "A"
|
||||
cRet := "A" + AllTrim( Str( Len( xValue ) ) )
|
||||
case cType == "U"
|
||||
cRet := "NIL"
|
||||
endcase
|
||||
|
||||
return cRet
|
||||
RETURN ""
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
// Testing the VERSION function
|
||||
/* Testing the VERSION function */
|
||||
/* Harbour Project source code
|
||||
http://harbour-project.org/
|
||||
Donated to the public domain by David G. Holm <dholm@jsd-llc.com>.
|
||||
*/
|
||||
|
||||
function Main()
|
||||
PROCEDURE Main()
|
||||
|
||||
outstd( chr( 34 ) + version() + chr( 34 ) + hb_osnewline() )
|
||||
outstd( chr( 34 ) + hb_compiler() + chr( 34 ) + hb_osnewline() )
|
||||
outstd( chr( 34 ) + os() + chr( 34 ) + hb_osnewline() )
|
||||
outstd( chr( 34 ) + version() + chr( 34 ) + hb_eol() )
|
||||
outstd( chr( 34 ) + hb_compiler() + chr( 34 ) + hb_eol() )
|
||||
outstd( chr( 34 ) + os() + chr( 34 ) + hb_eol() )
|
||||
|
||||
return nil
|
||||
RETURN
|
||||
|
||||
@@ -336,7 +336,7 @@ METHOD New( aParams ) CLASS CODEFORMAT
|
||||
ELSEIF ::nEol == 1
|
||||
::cEol := Chr( 13 ) + Chr( 10 )
|
||||
ELSEIF ::nEol == 0
|
||||
::cEol := hb_osNewLine()
|
||||
::cEol := hb_eol()
|
||||
ENDIF
|
||||
IF ::lIndent
|
||||
::lNoTabs := .T.
|
||||
|
||||
@@ -157,28 +157,28 @@ STATIC FUNCTION HBRawVersion()
|
||||
|
||||
STATIC PROCEDURE Logo()
|
||||
|
||||
OutStd( "Harbour i18n .pot/.hbl file manager " + HBRawVersion() + HB_OSNewLine() +;
|
||||
"Copyright (c) 2009-2010, Przemyslaw Czerpak" + HB_OSNewLine() + ;
|
||||
"http://harbour-project.org/" + HB_OSNewLine() +;
|
||||
HB_OSNewLine() )
|
||||
OutStd( "Harbour i18n .pot/.hbl file manager " + HBRawVersion() + hb_eol() +;
|
||||
"Copyright (c) 2009-2010, Przemyslaw Czerpak" + hb_eol() + ;
|
||||
"http://harbour-project.org/" + hb_eol() +;
|
||||
hb_eol() )
|
||||
RETURN
|
||||
|
||||
|
||||
STATIC PROCEDURE Syntax()
|
||||
|
||||
Logo()
|
||||
OutStd( "Syntax: hbi18n -m | -g | -a [-o<outfile>] [-e] [-q] <files1[.pot] ...>" + HB_OSNewLine() + ;
|
||||
HB_OSNewLine() + ;
|
||||
" -m merge given .pot files" + HB_OSNewLine() + ;
|
||||
" -g generate .hbl file from given .pot files" + HB_OSNewLine() + ;
|
||||
" -a add automatic translations to 1-st .pot file using" + HB_OSNewLine() + ;
|
||||
" translations from other .pot or .hbl files" + HB_OSNewLine() + ;
|
||||
" -o<outfile> output file name" + HB_OSNewLine() + ;
|
||||
" default is first .pot file name with" + HB_OSNewLine() + ;
|
||||
" .po (merge) or .hbl extension" + HB_OSNewLine() + ;
|
||||
" -e do not strip empty translation rules from .hbl files" + HB_OSNewLine() + ;
|
||||
" -q quiet mode" + HB_OSNewLine() + ;
|
||||
HB_OSNewLine() )
|
||||
OutStd( "Syntax: hbi18n -m | -g | -a [-o<outfile>] [-e] [-q] <files1[.pot] ...>" + hb_eol() + ;
|
||||
hb_eol() + ;
|
||||
" -m merge given .pot files" + hb_eol() + ;
|
||||
" -g generate .hbl file from given .pot files" + hb_eol() + ;
|
||||
" -a add automatic translations to 1-st .pot file using" + hb_eol() + ;
|
||||
" translations from other .pot or .hbl files" + hb_eol() + ;
|
||||
" -o<outfile> output file name" + hb_eol() + ;
|
||||
" default is first .pot file name with" + hb_eol() + ;
|
||||
" .po (merge) or .hbl extension" + hb_eol() + ;
|
||||
" -e do not strip empty translation rules from .hbl files" + hb_eol() + ;
|
||||
" -q quiet mode" + hb_eol() + ;
|
||||
hb_eol() )
|
||||
|
||||
IF hb_gtInfo( HB_GTI_ISGRAPHIC )
|
||||
OutStd( "Press any key to continue..." )
|
||||
@@ -190,7 +190,7 @@ STATIC PROCEDURE Syntax()
|
||||
|
||||
STATIC PROCEDURE ErrorMsg( cErrorMsg )
|
||||
|
||||
OutStd( "error: " + StrTran( cErrorMsg, ";", hb_osNewLine() ) + HB_OSNewLine() )
|
||||
OutStd( "error: " + StrTran( cErrorMsg, ";", hb_eol() ) + hb_eol() )
|
||||
|
||||
IF hb_gtInfo( HB_GTI_ISGRAPHIC )
|
||||
OutStd( "Press any key to continue..." )
|
||||
|
||||
@@ -1566,8 +1566,11 @@ FUNCTION hbmk2( aArgs, nArgTarget, /* @ */ lPause, nLevel )
|
||||
cPath_CompC := _BCC_BIN_DETECT()
|
||||
ENDIF
|
||||
IF ! Empty( cPath_CompC )
|
||||
/* NOTE: Automatically configure bcc installation with missing configuration. [vszakats] */
|
||||
IF ! hb_FileExists( FNameDirGet( cPath_CompC ) + ".." + hb_ps() + "Bin" + hb_ps() + "bcc32.cfg" ) .OR. ;
|
||||
/* NOTE: Automatically configure bcc installation with missing configuration. [vszakats]
|
||||
Permanently enabled. Apparently this is still top problem for bcc users. It's
|
||||
also in sync this way with Harbour core build system. */
|
||||
IF .T. .OR. ;
|
||||
! hb_FileExists( FNameDirGet( cPath_CompC ) + ".." + hb_ps() + "Bin" + hb_ps() + "bcc32.cfg" ) .OR. ;
|
||||
! hb_FileExists( FNameDirGet( cPath_CompC ) + ".." + hb_ps() + "Bin" + hb_ps() + "ilink32.cfg" )
|
||||
/* NOTE: BCC 5.8 has different casing: 'include', 'lib', 'psdk' respectively. */
|
||||
AAdd( hbmk[ _HBMK_aINCPATH ], PathNormalize( FNameDirGet( cPath_CompC ) + ".." + hb_ps() + "Include" ) )
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
#include "rt_vars.ch"
|
||||
|
||||
#ifndef __HARBOUR__
|
||||
#xtranslate HB_OSNewLine() => ( Chr( 13 ) + Chr( 10 ) )
|
||||
#xtranslate hb_eol() => ( Chr( 13 ) + Chr( 10 ) )
|
||||
#endif
|
||||
|
||||
STATIC s_nPass
|
||||
@@ -101,9 +101,9 @@ STATIC s_lDBFAvail := .F.
|
||||
|
||||
PROCEDURE Main( cPar1, cPar2 )
|
||||
|
||||
OutStd( "Harbour Regression Test Suite" + HB_OSNewLine() +;
|
||||
"Copyright (c) 1999-2010, Viktor Szakats" + HB_OSNewLine() +;
|
||||
"http://harbour-project.org/" + HB_OSNewLine() )
|
||||
OutStd( "Harbour Regression Test Suite" + hb_eol() +;
|
||||
"Copyright (c) 1999-2010, Viktor Szakats" + hb_eol() +;
|
||||
"http://harbour-project.org/" + hb_eol() )
|
||||
|
||||
IF cPar1 == NIL
|
||||
cPar1 := ""
|
||||
@@ -117,12 +117,12 @@ PROCEDURE Main( cPar1, cPar2 )
|
||||
"-?" $ Upper( cPar1 ) .OR. ;
|
||||
"-H" $ Upper( cPar1 )
|
||||
|
||||
OutStd( HB_OSNewLine() +;
|
||||
"Syntax: hbtest [options]" + HB_OSNewLine() +;
|
||||
HB_OSNewLine() +;
|
||||
"Options: -h, -? Display this help." + HB_OSNewLine() +;
|
||||
" -all Display all tests, not only the failures." + HB_OSNewLine() +;
|
||||
" -skip:<list> Skip the listed test numbers." + HB_OSNewLine() )
|
||||
OutStd( hb_eol() +;
|
||||
"Syntax: hbtest [options]" + hb_eol() +;
|
||||
hb_eol() +;
|
||||
"Options: -h, -? Display this help." + hb_eol() +;
|
||||
" -all Display all tests, not only the failures." + hb_eol() +;
|
||||
" -skip:<list> Skip the listed test numbers." + hb_eol() )
|
||||
|
||||
RETURN
|
||||
ENDIF
|
||||
@@ -228,23 +228,23 @@ STATIC PROCEDURE TEST_BEGIN( cParam )
|
||||
|
||||
/* Feedback */
|
||||
|
||||
OutMsg( s_nFhnd, "---------------------------------------------------------------------------" + HB_OSNewLine() +;
|
||||
" Version: " + Version() + HB_OSNewLine() )
|
||||
OutMsg( s_nFhnd, "---------------------------------------------------------------------------" + hb_eol() +;
|
||||
" Version: " + Version() + hb_eol() )
|
||||
#ifdef __HARBOUR__
|
||||
OutMsg( s_nFhnd, " Compiler: " + HB_Compiler() + HB_OSNewLine() )
|
||||
OutMsg( s_nFhnd, " Compiler: " + HB_Compiler() + hb_eol() )
|
||||
#endif
|
||||
OutMsg( s_nFhnd, " OS: " + OS() + HB_OSNewLine() +;
|
||||
" Date, Time: " + DToC( Date() ) + " " + Time() + HB_OSNewLine() +;
|
||||
"Shortcut opt.: " + iif( s_lShortcut, "ON", "OFF" ) + HB_OSNewLine() +;
|
||||
" Switches: " + cParam + HB_OSNewLine() +;
|
||||
"===========================================================================" + HB_OSNewLine() )
|
||||
OutMsg( s_nFhnd, " OS: " + OS() + hb_eol() +;
|
||||
" Date, Time: " + DToC( Date() ) + " " + Time() + hb_eol() +;
|
||||
"Shortcut opt.: " + iif( s_lShortcut, "ON", "OFF" ) + hb_eol() +;
|
||||
" Switches: " + cParam + hb_eol() +;
|
||||
"===========================================================================" + hb_eol() )
|
||||
|
||||
OutMsg( s_nFhnd, PadR( "R", TEST_RESULT_COL1_WIDTH ) + " " +;
|
||||
PadR( "No. Line", TEST_RESULT_COL2_WIDTH ) + " " +;
|
||||
PadR( "TestCall()", TEST_RESULT_COL3_WIDTH ) + " -> " +;
|
||||
PadR( "Result", TEST_RESULT_COL4_WIDTH ) + " | " +;
|
||||
PadR( "Expected", TEST_RESULT_COL5_WIDTH ) + HB_OSNewLine() +;
|
||||
"---------------------------------------------------------------------------" + HB_OSNewLine() )
|
||||
PadR( "Expected", TEST_RESULT_COL5_WIDTH ) + hb_eol() +;
|
||||
"---------------------------------------------------------------------------" + hb_eol() )
|
||||
|
||||
/* NOTE: mxNotHere intentionally not declared */
|
||||
PUBLIC mcLongerNameThen10Chars := "Long String Name!"
|
||||
@@ -313,7 +313,7 @@ STATIC PROCEDURE TEST_BEGIN( cParam )
|
||||
ErrorBlock( bErrorOld )
|
||||
|
||||
IF ! s_lDBFAvail
|
||||
OutMsg( s_nFhnd, "WARNING ! Test .dbf could not be created. Related tests will be skipped." + HB_OSNewLine() )
|
||||
OutMsg( s_nFhnd, "WARNING ! Test .dbf could not be created. Related tests will be skipped." + hb_eol() )
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
@@ -376,11 +376,11 @@ PROCEDURE TEST_CALL( cBlock, bBlock, xResultExpected )
|
||||
OutMsg( s_nFhnd, PadR( iif( lFailed, "!", iif( lSkipped, "S", " " ) ), TEST_RESULT_COL1_WIDTH ) + " " +;
|
||||
PadR( Str( s_nCount, 4 ) + " " + ProcName( 1 ) + "(" + LTrim( Str( ProcLine( 1 ), 5 ) ) + ")", TEST_RESULT_COL2_WIDTH ) + " " +;
|
||||
PadR( cBlock, TEST_RESULT_COL3_WIDTH ) +;
|
||||
HB_OSNewLine() +;
|
||||
hb_eol() +;
|
||||
Space( 5 ) + " Result: " + XToStr( xResult ) +;
|
||||
HB_OSNewLine() +;
|
||||
hb_eol() +;
|
||||
Space( 5 ) + "Expected: " + XToStr( xResultExpected ) +;
|
||||
HB_OSNewLine() )
|
||||
hb_eol() )
|
||||
|
||||
ELSE
|
||||
|
||||
@@ -389,7 +389,7 @@ PROCEDURE TEST_CALL( cBlock, bBlock, xResultExpected )
|
||||
PadR( cBlock, TEST_RESULT_COL3_WIDTH ) + " -> " +;
|
||||
PadR( XToStr( xResult ), TEST_RESULT_COL4_WIDTH ) + " | " +;
|
||||
PadR( XToStr( xResultExpected ), TEST_RESULT_COL5_WIDTH ) +;
|
||||
HB_OSNewLine() )
|
||||
hb_eol() )
|
||||
|
||||
ENDIF
|
||||
ENDIF
|
||||
@@ -416,20 +416,20 @@ STATIC PROCEDURE TEST_END()
|
||||
|
||||
s_nEndTime := Seconds()
|
||||
|
||||
OutMsg( s_nFhnd, "===========================================================================" + HB_OSNewLine() +;
|
||||
"Test calls passed: " + Str( s_nPass ) + " ( " + LTrim( Str( ( 1 - ( s_nFail / s_nPass ) ) * 100, 6, 2 ) ) + " % )" + HB_OSNewLine() +;
|
||||
"Test calls failed: " + Str( s_nFail ) + " ( " + LTrim( Str( ( s_nFail / s_nPass ) * 100, 6, 2 ) ) + " % )" + HB_OSNewLine() +;
|
||||
" ----------" + HB_OSNewLine() +;
|
||||
OutMsg( s_nFhnd, "===========================================================================" + hb_eol() +;
|
||||
"Test calls passed: " + Str( s_nPass ) + " ( " + LTrim( Str( ( 1 - ( s_nFail / s_nPass ) ) * 100, 6, 2 ) ) + " % )" + hb_eol() +;
|
||||
"Test calls failed: " + Str( s_nFail ) + " ( " + LTrim( Str( ( s_nFail / s_nPass ) * 100, 6, 2 ) ) + " % )" + hb_eol() +;
|
||||
" ----------" + hb_eol() +;
|
||||
" Total: " + Str( s_nPass + s_nFail ) +;
|
||||
" ( Time elapsed: " + LTrim( Str( s_nEndTime - s_nStartTime ) ) + " seconds )" + HB_OSNewLine() +;
|
||||
HB_OSNewLine() )
|
||||
" ( Time elapsed: " + LTrim( Str( s_nEndTime - s_nStartTime ) ) + " seconds )" + hb_eol() +;
|
||||
hb_eol() )
|
||||
|
||||
IF s_nFail != 0
|
||||
IF "CLIPPER (R)" $ Upper( Version() )
|
||||
OutMsg( s_nFhnd, "WARNING ! Failures detected using CA-Cl*pper." + HB_OSNewLine() +;
|
||||
"Please fix those expected results which are not bugs in CA-Cl*pper itself." + HB_OSNewLine() )
|
||||
OutMsg( s_nFhnd, "WARNING ! Failures detected using CA-Cl*pper." + hb_eol() +;
|
||||
"Please fix those expected results which are not bugs in CA-Cl*pper itself." + hb_eol() )
|
||||
ELSE
|
||||
OutMsg( s_nFhnd, "WARNING ! Failures detected" + HB_OSNewLine() )
|
||||
OutMsg( s_nFhnd, "WARNING ! Failures detected" + hb_eol() )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
|
||||
Reference in New Issue
Block a user