2009-05-29 12:18 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* utils/hbmk2/hbmk2.prg
+ Added -echo= command line parameter. Similar to echo= in .hbc files.
! Fixed filename expansion behaviour on empty strings.
* Tweaked a little the filter parser to recognize keywords using
similar rules to Harbour compiler.
! Fixed filter parser not to RTE on malformed filters.
- examples/hbapollo/Makefile
+ examples/hbapollo/hbapollo.hbm
- examples/hboleold/Makefile
+ examples/hboleold/hboleold.hbm
- examples/hbsqlit2/Makefile
+ examples/hbsqlit2/hbsqlit2.hbm
- examples/hbgf/hbgfwin/Makefile
+ examples/hbgf/hbgfwin/hbgfwin.hbm
- examples/hbgf/hbgfos2/Makefile
+ examples/hbgf/hbgfos2/hbgfos2.hbm
- examples/hbgf/hbgfgtk/Makefile
+ examples/hbgf/hbgfgtk/hbgfgtk.hbm
- examples/hbwhat/Makefile
+ examples/hbwhat/hbwhat.hbm
* Replaced GNU Make files with hbmk2 make files. These should
now work outside the source tree. Please test them, they are
also good examples for .hbm files.
- examples/pe/Makefile
- examples/pp/Makefile
- examples/hbdoc/Makefile
- examples/guestbk/Makefile
- examples/misc/Makefile
- examples/dbu/Makefile
- examples/hscript/Makefile
- examples/rl/Makefile
- examples/Makefile
- examples/hbgf/Makefile
- Deleted unnecessary make files belonging to GNU Make system.
(these wouldn't work outside the source tree, f.e in a binary
distro which includes these examples in source form)
- examples/rdddbt
- Deleted this example as it doesn't build anymore.
* examples/hbsuper/hbsuper.hbm
! Added SVN header.
* source/rtl/Makefile
* source/rtl/errint.c
+ source/rtl/errintlo.c
* Split hb_errInternal() and hb_errInternalRaw() for
easier user override.
This commit is contained in:
@@ -17,6 +17,58 @@
|
||||
past entries belonging to these authors: Viktor Szakats.
|
||||
*/
|
||||
|
||||
2009-05-29 12:18 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* utils/hbmk2/hbmk2.prg
|
||||
+ Added -echo= command line parameter. Similar to echo= in .hbc files.
|
||||
! Fixed filename expansion behaviour on empty strings.
|
||||
* Tweaked a little the filter parser to recognize keywords using
|
||||
similar rules to Harbour compiler.
|
||||
! Fixed filter parser not to RTE on malformed filters.
|
||||
|
||||
- examples/hbapollo/Makefile
|
||||
+ examples/hbapollo/hbapollo.hbm
|
||||
- examples/hboleold/Makefile
|
||||
+ examples/hboleold/hboleold.hbm
|
||||
- examples/hbsqlit2/Makefile
|
||||
+ examples/hbsqlit2/hbsqlit2.hbm
|
||||
- examples/hbgf/hbgfwin/Makefile
|
||||
+ examples/hbgf/hbgfwin/hbgfwin.hbm
|
||||
- examples/hbgf/hbgfos2/Makefile
|
||||
+ examples/hbgf/hbgfos2/hbgfos2.hbm
|
||||
- examples/hbgf/hbgfgtk/Makefile
|
||||
+ examples/hbgf/hbgfgtk/hbgfgtk.hbm
|
||||
- examples/hbwhat/Makefile
|
||||
+ examples/hbwhat/hbwhat.hbm
|
||||
* Replaced GNU Make files with hbmk2 make files. These should
|
||||
now work outside the source tree. Please test them, they are
|
||||
also good examples for .hbm files.
|
||||
|
||||
- examples/pe/Makefile
|
||||
- examples/pp/Makefile
|
||||
- examples/hbdoc/Makefile
|
||||
- examples/guestbk/Makefile
|
||||
- examples/misc/Makefile
|
||||
- examples/dbu/Makefile
|
||||
- examples/hscript/Makefile
|
||||
- examples/rl/Makefile
|
||||
- examples/Makefile
|
||||
- examples/hbgf/Makefile
|
||||
- Deleted unnecessary make files belonging to GNU Make system.
|
||||
(these wouldn't work outside the source tree, f.e in a binary
|
||||
distro which includes these examples in source form)
|
||||
|
||||
- examples/rdddbt
|
||||
- Deleted this example as it doesn't build anymore.
|
||||
|
||||
* examples/hbsuper/hbsuper.hbm
|
||||
! Added SVN header.
|
||||
|
||||
* source/rtl/Makefile
|
||||
* source/rtl/errint.c
|
||||
+ source/rtl/errintlo.c
|
||||
* Split hb_errInternal() and hb_errInternalRaw() for
|
||||
easier user override.
|
||||
|
||||
2009-05-29 11:04 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
- contrib/examples
|
||||
+ examples
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../
|
||||
|
||||
DIRS=\
|
||||
guestbk \
|
||||
hbgf \
|
||||
hbsqlit2 \
|
||||
hscript \
|
||||
misc \
|
||||
pe \
|
||||
pp \
|
||||
rdddbt \
|
||||
|
||||
include $(ROOT)config/dir.cf
|
||||
@@ -1,36 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
PRG_SOURCES=\
|
||||
DBU.PRG \
|
||||
DBUCOPY.PRG \
|
||||
DBUEDIT.PRG \
|
||||
DBUHELP.PRG \
|
||||
DBUINDX.PRG \
|
||||
DBUNET.PRG \
|
||||
DBUSTRU.PRG \
|
||||
DBUUTIL.PRG \
|
||||
DBUVIEW.PRG \
|
||||
|
||||
PRG_MAIN=DBU.PRG
|
||||
|
||||
LIBS=\
|
||||
hbdebug \
|
||||
hbvm \
|
||||
hbrtl \
|
||||
hblang \
|
||||
hbrdd \
|
||||
hbrtl \
|
||||
hbvm \
|
||||
hbmacro \
|
||||
hbpp \
|
||||
rddntx \
|
||||
rddcdx \
|
||||
rddfpt \
|
||||
hbsix \
|
||||
hbcommon \
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
@@ -1,30 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
PRG_SOURCES=\
|
||||
guestbk.prg \
|
||||
inifiles.prg \
|
||||
testcgi.prg \
|
||||
|
||||
PRG_MAIN=guestbk.prg
|
||||
|
||||
LIBS=\
|
||||
hbdebug \
|
||||
hbvm \
|
||||
hbrtl \
|
||||
hblang \
|
||||
hbrdd \
|
||||
hbrtl \
|
||||
hbvm \
|
||||
hbmacro \
|
||||
hbpp \
|
||||
rddntx \
|
||||
rddcdx \
|
||||
rddfpt \
|
||||
hbsix \
|
||||
hbcommon \
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
@@ -1,42 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
LIBNAME=hbapollo
|
||||
|
||||
ifneq ($(HB_ARCHITECTURE),dos)
|
||||
ifneq ($(HB_COMPILER),mingw64)
|
||||
|
||||
HB_INC_APOLLO_OK += $(foreach d, $(HB_INC_APOLLO), $(if $(wildcard $(d)/Sde61.h),$(d),))
|
||||
|
||||
ifneq ($(strip $(HB_INC_APOLLO_OK)),)
|
||||
|
||||
HB_USER_CFLAGS += $(foreach d, $(HB_INC_APOLLO_OK), -I$(d))
|
||||
|
||||
C_SOURCES=\
|
||||
apollo.c \
|
||||
|
||||
PRG_SOURCES=\
|
||||
apollo1.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
apollo.ch \
|
||||
|
||||
include $(TOP)$(ROOT)config/header.cf
|
||||
INSTALL_RULE_HEADERS := $(INSTALL_RULE)
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
install::
|
||||
$(INSTALL_RULE_HEADERS)
|
||||
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
12
harbour/examples/hbapollo/hbapollo.hbm
Normal file
12
harbour/examples/hbapollo/hbapollo.hbm
Normal file
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-hblib
|
||||
-ohbapollo
|
||||
-inc
|
||||
-q0 -w3 -es2 -l
|
||||
-i${HB_INC_APOLLO}
|
||||
|
||||
apollo.c
|
||||
apollo1.prg
|
||||
@@ -1,39 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ifeq ($(HB_MAIN),)
|
||||
HB_MAIN = std
|
||||
endif
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
PRG_SOURCES=\
|
||||
hbdoc.prg \
|
||||
genos2.prg \
|
||||
gentrf.prg \
|
||||
genng.prg \
|
||||
genhtm.prg \
|
||||
genchm.prg \
|
||||
genrtf.prg \
|
||||
genhpc.prg \
|
||||
genasc.prg \
|
||||
genpdf1.prg \
|
||||
ft_funcs.prg \
|
||||
|
||||
C_SOURCES=\
|
||||
hbdfrdln.c \
|
||||
|
||||
PRG_MAIN=hbdoc.prg
|
||||
|
||||
LIBS=\
|
||||
hbdebug \
|
||||
hbvm \
|
||||
hbrtl \
|
||||
hbnulrdd \
|
||||
hbrtl \
|
||||
hbvm \
|
||||
hbmacro \
|
||||
hbcommon \
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
@@ -1,23 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
ifeq ($(HB_ARCHITECTURE),win)
|
||||
DIRS = hbgfwin
|
||||
endif
|
||||
|
||||
ifeq ($(HB_ARCHITECTURE),linux)
|
||||
DIRS = hbgfgtk
|
||||
endif
|
||||
|
||||
ifeq ($(HB_ARCHITECTURE),os2)
|
||||
DIRS = hbgfos2
|
||||
endif
|
||||
|
||||
ifneq ($(DIRS),)
|
||||
include $(ROOT)config/dir.cf
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
@@ -1,45 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../../
|
||||
|
||||
LIBNAME=hbgfgtk
|
||||
|
||||
ifeq ($(HB_ARCHITECTURE),linux)
|
||||
|
||||
ifeq ($(HB_INC_GTK),)
|
||||
ifeq ($(HB_XBUILD),)
|
||||
HB_INC_GTK = /usr/include /usr/include/glib-2.0/
|
||||
endif
|
||||
endif
|
||||
HB_INC_GTK_OK += $(foreach d, $(HB_INC_GTK), $(if $(wildcard $(d)/glib.h),$(d),))
|
||||
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(HB_INC_GTK_OK)),)
|
||||
|
||||
HB_USER_CFLAGS += $(foreach d, $(HB_INC_GTK_OK), -I$(d))
|
||||
HB_USER_CFLAGS += `pkg-config --cflags gtk+-2.0`
|
||||
|
||||
C_SOURCES=\
|
||||
creawin.c \
|
||||
general.c \
|
||||
creamenu.c \
|
||||
creabutt.c \
|
||||
dispatch.c \
|
||||
msginfo.c \
|
||||
mainlgtk.c \
|
||||
|
||||
PRG_SOURCES=\
|
||||
form.prg \
|
||||
menu.prg \
|
||||
button.prg \
|
||||
menuitem.prg \
|
||||
winctrl.prg \
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
28
harbour/examples/hbgf/hbgfgtk/hbgfgtk.hbm
Normal file
28
harbour/examples/hbgf/hbgfgtk/hbgfgtk.hbm
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-hblib
|
||||
-ohbgfgtk
|
||||
-inc
|
||||
-q0 -w3 -es2 -l
|
||||
-i${HB_INC_GTK}
|
||||
|
||||
-inctrypath={linux}/usr/include
|
||||
-inctrypath={linux}/usr/include/glib-2.0
|
||||
|
||||
-cflag=`pkg-config --cflags gtk+-2.0`
|
||||
|
||||
creawin.c
|
||||
general.c
|
||||
creamenu.c
|
||||
creabutt.c
|
||||
dispatch.c
|
||||
msginfo.c
|
||||
mainlgtk.c
|
||||
|
||||
form.prg
|
||||
menu.prg
|
||||
button.prg
|
||||
menuitem.prg
|
||||
winctrl.prg
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../../
|
||||
|
||||
LIBNAME=hbgfos2
|
||||
|
||||
ifeq ($(HB_ARCHITECTURE),os2)
|
||||
|
||||
C_SOURCES=\
|
||||
os2pm.c \
|
||||
|
||||
PRG_SOURCES=\
|
||||
tform.prg \
|
||||
tmenu.prg \
|
||||
tmenuit.prg \
|
||||
winctrl.prg \
|
||||
button.prg \
|
||||
edit.prg \
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
20
harbour/examples/hbgf/hbgfos2/hbgfos2.hbm
Normal file
20
harbour/examples/hbgf/hbgfos2/hbgfos2.hbm
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-hblib
|
||||
-ohbgfos2
|
||||
-inc
|
||||
-q0 -w3 -es2 -l
|
||||
|
||||
"-echo={!os2}This library builds on os2 only."
|
||||
-stop{!os2}
|
||||
|
||||
os2pm.c
|
||||
|
||||
tform.prg
|
||||
tmenu.prg
|
||||
tmenuit.prg
|
||||
winctrl.prg
|
||||
button.prg
|
||||
edit.prg
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../../
|
||||
|
||||
LIBNAME=hbgfwin
|
||||
|
||||
ifeq ($(HB_ARCHITECTURE),win)
|
||||
|
||||
C_SOURCES=\
|
||||
winapi.c \
|
||||
|
||||
PRG_SOURCES=\
|
||||
button.prg \
|
||||
edit.prg \
|
||||
form.prg \
|
||||
menu.prg \
|
||||
menuitem.prg \
|
||||
winctrl.prg \
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
20
harbour/examples/hbgf/hbgfwin/hbgfwin.hbm
Normal file
20
harbour/examples/hbgf/hbgfwin/hbgfwin.hbm
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-hblib
|
||||
-ohbgfwin
|
||||
-inc
|
||||
-q0 -w3 -es2 -l
|
||||
|
||||
"-echo={!winall}This library builds on win/wce only."
|
||||
-stop{!winall}
|
||||
|
||||
winapi.c
|
||||
|
||||
button.prg
|
||||
edit.prg
|
||||
form.prg
|
||||
menu.prg
|
||||
menuitem.prg
|
||||
winctrl.prg
|
||||
@@ -1,28 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
LIBNAME=hboleold
|
||||
|
||||
ifeq ($(HB_WITH_HBWIN),)
|
||||
ifeq ($(HB_ARCHITECTURE),win)
|
||||
HB_WITH_HBWIN=yes
|
||||
endif
|
||||
ifeq ($(HB_ARCHITECTURE),wce)
|
||||
HB_WITH_HBWIN=yes
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HB_WITH_HBWIN),yes)
|
||||
|
||||
C_SOURCES = \
|
||||
win_ole.c \
|
||||
|
||||
PRG_SOURCES = \
|
||||
win_tole.prg \
|
||||
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
14
harbour/examples/hboleold/hboleold.hbm
Normal file
14
harbour/examples/hboleold/hboleold.hbm
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-hblib
|
||||
-ohboleold
|
||||
-inc
|
||||
-q0 -w3 -es2 -l
|
||||
|
||||
"-echo={!winall}This library builds on win/wce only."
|
||||
-stop{!winall}
|
||||
|
||||
win_ole.c
|
||||
win_tole.prg
|
||||
@@ -1,26 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
LIBNAME=hbsqlit2
|
||||
|
||||
ifneq ($(HB_ARCHITECTURE),dos)
|
||||
|
||||
C_SOURCES =\
|
||||
hbsqlit2.c \
|
||||
|
||||
PRG_HEADERS=\
|
||||
hbsqlit2.ch
|
||||
|
||||
include $(TOP)$(ROOT)config/header.cf
|
||||
INSTALL_RULE_HEADERS := $(INSTALL_RULE)
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
install::
|
||||
$(INSTALL_RULE_HEADERS)
|
||||
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
14
harbour/examples/hbsqlit2/hbsqlit2.hbm
Normal file
14
harbour/examples/hbsqlit2/hbsqlit2.hbm
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-hblib
|
||||
-ohbsqlit2
|
||||
-inc
|
||||
-q0 -w3 -es2 -l
|
||||
-i${HB_INC_SQLITE2}
|
||||
|
||||
"-echo={dos}This library doesn't build on DOS."
|
||||
-stop{dos}
|
||||
|
||||
hbsqlit2.c
|
||||
@@ -1,7 +1,11 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-hblib
|
||||
-ohbsuper
|
||||
-inc
|
||||
-q0 -w1 -es2 -gc0 -l
|
||||
-q0 -w1 -es2 -l
|
||||
|
||||
hbsuper.prg
|
||||
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
LIBNAME=hbwhat
|
||||
|
||||
ifeq ($(HB_ARCHITECTURE),win)
|
||||
ifneq ($(HB_COMPILER),dmc)
|
||||
|
||||
C_SOURCES = \
|
||||
wincorec.c \
|
||||
whtbmp.c \
|
||||
whtbrsh.c \
|
||||
whtcdlg.c \
|
||||
whtclpb.c \
|
||||
whtcomm.c \
|
||||
whtcret.c \
|
||||
whtdate.c \
|
||||
whtdc.c \
|
||||
whtdir.c \
|
||||
whtdlg.c \
|
||||
whtdraw.c \
|
||||
whtfont.c \
|
||||
whtgdi.c \
|
||||
whthead.c \
|
||||
whticon.c \
|
||||
whtilst.c \
|
||||
whtinet.c \
|
||||
whtini.c \
|
||||
whtkbrd.c \
|
||||
whtlv.c \
|
||||
whtmain.c \
|
||||
whtmapi.c \
|
||||
whtmem.c \
|
||||
whtmenu.c \
|
||||
whtmeta.c \
|
||||
whtmisc.c \
|
||||
whtmmcap.c \
|
||||
whtmous.c \
|
||||
whtmsg.c \
|
||||
whtpen.c \
|
||||
whtprn.c \
|
||||
whtrect.c \
|
||||
whtreg.c \
|
||||
whtrgn.c \
|
||||
whtscrlb.c \
|
||||
whtseria.c \
|
||||
whtshell.c \
|
||||
whtsock.c \
|
||||
whtsys.c \
|
||||
whttab.c \
|
||||
whttbar.c \
|
||||
whttext.c \
|
||||
whttree.c \
|
||||
whtview.c \
|
||||
whtwnd.c \
|
||||
|
||||
PRG_SOURCES= \
|
||||
whatutil.prg \
|
||||
wincdlg.prg \
|
||||
wincomm.prg \
|
||||
wincore.prg \
|
||||
windebug.prg \
|
||||
winerror.prg \
|
||||
winini.prg \
|
||||
winrbar.prg \
|
||||
wintabs.prg \
|
||||
wintbar.prg \
|
||||
|
||||
PRG_HEADERS= \
|
||||
commctrl.ch \
|
||||
commdlg.ch \
|
||||
debug.ch \
|
||||
hbwhat.ch \
|
||||
import.ch \
|
||||
sqltypes.ch \
|
||||
wingdi.ch \
|
||||
wininet.ch \
|
||||
winstruc.ch \
|
||||
winuser.ch \
|
||||
|
||||
# This lib needs xhb headers to compile, and this is
|
||||
# the hack to help Harbour find them.
|
||||
HB_USER_PRGFLAGS += -I../../../../xhb
|
||||
|
||||
include $(TOP)$(ROOT)config/header.cf
|
||||
INSTALL_RULE_HEADERS := $(INSTALL_RULE)
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
install::
|
||||
$(INSTALL_RULE_HEADERS)
|
||||
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
else
|
||||
include $(TOP)$(ROOT)config/none.cf
|
||||
endif
|
||||
70
harbour/examples/hbwhat/hbwhat.hbm
Normal file
70
harbour/examples/hbwhat/hbwhat.hbm
Normal file
@@ -0,0 +1,70 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
-hblib
|
||||
-ohbwhat
|
||||
-inc
|
||||
-q0 -w3 -es2 -l
|
||||
-i../../contrib/xhb
|
||||
|
||||
"-echo={!win}This library builds on win only."
|
||||
-stop{!win}
|
||||
|
||||
wincorec.c
|
||||
whtbmp.c
|
||||
whtbrsh.c
|
||||
whtcdlg.c
|
||||
whtclpb.c
|
||||
whtcomm.c
|
||||
whtcret.c
|
||||
whtdate.c
|
||||
whtdc.c
|
||||
whtdir.c
|
||||
whtdlg.c
|
||||
whtdraw.c
|
||||
whtfont.c
|
||||
whtgdi.c
|
||||
whthead.c
|
||||
whticon.c
|
||||
whtilst.c
|
||||
whtinet.c
|
||||
whtini.c
|
||||
whtkbrd.c
|
||||
whtlv.c
|
||||
whtmain.c
|
||||
whtmapi.c
|
||||
whtmem.c
|
||||
whtmenu.c
|
||||
whtmeta.c
|
||||
whtmisc.c
|
||||
whtmmcap.c
|
||||
whtmous.c
|
||||
whtmsg.c
|
||||
whtpen.c
|
||||
whtprn.c
|
||||
whtrect.c
|
||||
whtreg.c
|
||||
whtrgn.c
|
||||
whtscrlb.c
|
||||
whtseria.c
|
||||
whtshell.c
|
||||
whtsock.c
|
||||
whtsys.c
|
||||
whttab.c
|
||||
whttbar.c
|
||||
whttext.c
|
||||
whttree.c
|
||||
whtview.c
|
||||
whtwnd.c
|
||||
|
||||
whatutil.prg
|
||||
wincdlg.prg
|
||||
wincomm.prg
|
||||
wincore.prg
|
||||
windebug.prg
|
||||
winerror.prg
|
||||
winini.prg
|
||||
winrbar.prg
|
||||
wintabs.prg
|
||||
wintbar.prg
|
||||
@@ -1,28 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
PRG_SOURCES=\
|
||||
hscript.prg \
|
||||
|
||||
PRG_MAIN=hscript.prg
|
||||
|
||||
LIBS=\
|
||||
hbdebug \
|
||||
hbvm \
|
||||
hbrtl \
|
||||
hblang \
|
||||
hbrdd \
|
||||
hbrtl \
|
||||
hbvm \
|
||||
hbmacro \
|
||||
hbpp \
|
||||
rddntx \
|
||||
rddcdx \
|
||||
rddfpt \
|
||||
hbsix \
|
||||
hbcommon \
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
@@ -1,52 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
LIBS=\
|
||||
hbdebug \
|
||||
hbvm \
|
||||
hbrtl \
|
||||
hblang \
|
||||
hbrdd \
|
||||
hbrtl \
|
||||
hbvm \
|
||||
hbmacro \
|
||||
hbpp \
|
||||
rddntx \
|
||||
rddcdx \
|
||||
rddfpt \
|
||||
hbsix \
|
||||
hbcommon \
|
||||
|
||||
ifeq ($(PM),)
|
||||
PM := $(pm)
|
||||
endif
|
||||
ifeq ($(PM),) # PM not defined = build all files
|
||||
PRG_SOURCES=\
|
||||
guess.prg \
|
||||
mankala.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
|
||||
C_SOURCES=\
|
||||
|
||||
C_HEADERS=\
|
||||
|
||||
include $(TOP)$(ROOT)config/test.cf
|
||||
|
||||
else #PM defined = build specified file
|
||||
|
||||
ifneq ($(findstring .prg,$(PM)),)
|
||||
PRG_MAIN := $(PM)
|
||||
else
|
||||
ifneq ($(findstring .PRG,$(PM)),)
|
||||
PRG_MAIN := $(PM)
|
||||
else
|
||||
PRG_MAIN := $(PM).prg
|
||||
endif
|
||||
endif
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
|
||||
endif
|
||||
@@ -1,31 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
PRG_SOURCES=\
|
||||
editorhi.prg \
|
||||
|
||||
C_SOURCES=\
|
||||
editorlo.c \
|
||||
|
||||
PRG_MAIN=pe.prg
|
||||
|
||||
LIBS=\
|
||||
hbdebug \
|
||||
hbvm \
|
||||
hbrtl \
|
||||
hblang \
|
||||
hbrdd \
|
||||
hbrtl \
|
||||
hbvm \
|
||||
hbmacro \
|
||||
hbpp \
|
||||
rddntx \
|
||||
rddcdx \
|
||||
rddfpt \
|
||||
hbsix \
|
||||
hbcommon \
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
@@ -1,18 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
C_SOURCES=\
|
||||
hbppcore.c \
|
||||
hbppcomp.c \
|
||||
hbpptbl.c \
|
||||
hbpragma.c \
|
||||
|
||||
C_MAIN=pp.c
|
||||
|
||||
LIBS=\
|
||||
hbcommon \
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
@@ -1,12 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
C_SOURCES=\
|
||||
dbfdbt1.c \
|
||||
|
||||
LIBNAME=rdddbt
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
@@ -1,858 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
* DBFDBT RDD
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* www - http://www.xharbour.org
|
||||
* Most of code taken from dbf1.c
|
||||
* Copyright 1999 Bruno Cantero <bruno@issnet.net>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbinit.h"
|
||||
#include "hbapierr.h"
|
||||
#include "hbapilng.h"
|
||||
#include "hbset.h"
|
||||
#include "hbvm.h"
|
||||
#include "hbdate.h"
|
||||
#include "hbrdddbt.h"
|
||||
#include "rddsys.ch"
|
||||
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
# include "hbapicdp.h"
|
||||
#endif
|
||||
|
||||
static RDDFUNCS dbtSuper;
|
||||
static const RDDFUNCS dbtTable =
|
||||
{
|
||||
|
||||
/* Movement and positioning methods */
|
||||
|
||||
( DBENTRYP_BP ) hb_dbtBof,
|
||||
( DBENTRYP_BP ) hb_dbtEof,
|
||||
( DBENTRYP_BP ) hb_dbtFound,
|
||||
( DBENTRYP_V ) hb_dbtGoBottom,
|
||||
( DBENTRYP_UL ) hb_dbtGoTo,
|
||||
( DBENTRYP_I ) hb_dbtGoToId,
|
||||
( DBENTRYP_V ) hb_dbtGoTop,
|
||||
( DBENTRYP_BIB ) hb_dbtSeek,
|
||||
( DBENTRYP_L ) hb_dbtSkip,
|
||||
( DBENTRYP_L ) hb_dbtSkipFilter,
|
||||
( DBENTRYP_L ) hb_dbtSkipRaw,
|
||||
|
||||
|
||||
/* Data management */
|
||||
|
||||
( DBENTRYP_VF ) hb_dbtAddField,
|
||||
( DBENTRYP_B ) hb_dbtAppend,
|
||||
( DBENTRYP_I ) hb_dbtCreateFields,
|
||||
( DBENTRYP_V ) hb_dbtDeleteRec,
|
||||
( DBENTRYP_BP ) hb_dbtDeleted,
|
||||
( DBENTRYP_SP ) hb_dbtFieldCount,
|
||||
( DBENTRYP_VF ) hb_dbtFieldDisplay,
|
||||
( DBENTRYP_SSI ) hb_dbtFieldInfo,
|
||||
( DBENTRYP_SVP ) hb_dbtFieldName,
|
||||
( DBENTRYP_V ) hb_dbtFlush,
|
||||
( DBENTRYP_PP ) hb_dbtGetRec,
|
||||
( DBENTRYP_SI ) hb_dbtGetValue,
|
||||
( DBENTRYP_SVL ) hb_dbtGetVarLen,
|
||||
( DBENTRYP_V ) hb_dbtGoCold,
|
||||
( DBENTRYP_V ) hb_dbtGoHot,
|
||||
( DBENTRYP_P ) hb_dbtPutRec,
|
||||
( DBENTRYP_SI ) hb_dbtPutValue,
|
||||
( DBENTRYP_V ) hb_dbtRecall,
|
||||
( DBENTRYP_ULP ) hb_dbtRecCount,
|
||||
( DBENTRYP_ISI ) hb_dbtRecInfo,
|
||||
( DBENTRYP_ULP ) hb_dbtRecNo,
|
||||
( DBENTRYP_I ) hb_dbtRecId,
|
||||
( DBENTRYP_S ) hb_dbtSetFieldExtent,
|
||||
|
||||
|
||||
/* WorkArea/Database management */
|
||||
|
||||
( DBENTRYP_P ) hb_dbtAlias,
|
||||
( DBENTRYP_V ) hb_dbtClose,
|
||||
( DBENTRYP_VP ) hb_dbtCreate,
|
||||
( DBENTRYP_SI ) hb_dbtInfo,
|
||||
( DBENTRYP_V ) hb_dbtNewArea,
|
||||
( DBENTRYP_VP ) hb_dbtOpen,
|
||||
( DBENTRYP_V ) hb_dbtRelease,
|
||||
( DBENTRYP_SP ) hb_dbtStructSize,
|
||||
( DBENTRYP_P ) hb_dbtSysName,
|
||||
( DBENTRYP_VEI ) hb_dbtEval,
|
||||
( DBENTRYP_V ) hb_dbtPack,
|
||||
( DBENTRYP_LSP ) hb_dbtPackRec,
|
||||
( DBENTRYP_VS ) hb_dbtSort,
|
||||
( DBENTRYP_VT ) hb_dbtTrans,
|
||||
( DBENTRYP_VT ) hb_dbtTransRec,
|
||||
( DBENTRYP_V ) hb_dbtZap,
|
||||
|
||||
|
||||
/* Relational Methods */
|
||||
|
||||
( DBENTRYP_VR ) hb_dbtChildEnd,
|
||||
( DBENTRYP_VR ) hb_dbtChildStart,
|
||||
( DBENTRYP_VR ) hb_dbtChildSync,
|
||||
( DBENTRYP_V ) hb_dbtSyncChildren,
|
||||
( DBENTRYP_V ) hb_dbtClearRel,
|
||||
( DBENTRYP_V ) hb_dbtForceRel,
|
||||
( DBENTRYP_SVP ) hb_dbtRelArea,
|
||||
( DBENTRYP_VR ) hb_dbtRelEval,
|
||||
( DBENTRYP_SI ) hb_dbtRelText,
|
||||
( DBENTRYP_VR ) hb_dbtSetRel,
|
||||
|
||||
|
||||
/* Order Management */
|
||||
|
||||
( DBENTRYP_OI ) hb_dbtOrderListAdd,
|
||||
( DBENTRYP_V ) hb_dbtOrderListClear,
|
||||
( DBENTRYP_OI ) hb_dbtOrderListDelete,
|
||||
( DBENTRYP_OI ) hb_dbtOrderListFocus,
|
||||
( DBENTRYP_V ) hb_dbtOrderListRebuild,
|
||||
( DBENTRYP_VOI ) hb_dbtOrderCondition,
|
||||
( DBENTRYP_VOC ) hb_dbtOrderCreate,
|
||||
( DBENTRYP_OI ) hb_dbtOrderDestroy,
|
||||
( DBENTRYP_OII ) hb_dbtOrderInfo,
|
||||
|
||||
|
||||
/* Filters and Scope Settings */
|
||||
|
||||
( DBENTRYP_V ) hb_dbtClearFilter,
|
||||
( DBENTRYP_V ) hb_dbtClearLocate,
|
||||
( DBENTRYP_V ) hb_dbtClearScope,
|
||||
( DBENTRYP_VPLP ) hb_dbtCountScope,
|
||||
( DBENTRYP_I ) hb_dbtFilterText,
|
||||
( DBENTRYP_SI ) hb_dbtScopeInfo,
|
||||
( DBENTRYP_VFI ) hb_dbtSetFilter,
|
||||
( DBENTRYP_VLO ) hb_dbtSetLocate,
|
||||
( DBENTRYP_VOS ) hb_dbtSetScope,
|
||||
( DBENTRYP_VPL ) hb_dbtSkipScope,
|
||||
( DBENTRYP_B ) hb_dbtLocate,
|
||||
|
||||
|
||||
/* Miscellaneous */
|
||||
|
||||
( DBENTRYP_P ) hb_dbtCompile,
|
||||
( DBENTRYP_I ) hb_dbtError,
|
||||
( DBENTRYP_I ) hb_dbtEvalBlock,
|
||||
|
||||
|
||||
/* Network operations */
|
||||
|
||||
( DBENTRYP_VSP ) hb_dbtRawLock,
|
||||
( DBENTRYP_VL ) hb_dbtLock,
|
||||
( DBENTRYP_I ) hb_dbtUnLock,
|
||||
|
||||
|
||||
/* Memofile functions */
|
||||
|
||||
( DBENTRYP_V ) hb_dbtCloseMemFile,
|
||||
( DBENTRYP_VP ) hb_dbtCreateMemFile,
|
||||
( DBENTRYP_SVPB ) hb_dbtGetValueFile,
|
||||
( DBENTRYP_VP ) hb_dbtOpenMemFile,
|
||||
( DBENTRYP_SVPB ) hb_dbtPutValueFile,
|
||||
|
||||
|
||||
/* Database file header handling */
|
||||
|
||||
( DBENTRYP_V ) hb_dbtReadDBHeader,
|
||||
( DBENTRYP_V ) hb_dbtWriteDBHeader,
|
||||
|
||||
|
||||
/* non WorkArea functions */
|
||||
( DBENTRYP_R ) hb_dbtInit,
|
||||
( DBENTRYP_R ) hb_dbtExit,
|
||||
( DBENTRYP_RVV ) hb_dbtDrop,
|
||||
( DBENTRYP_RVV ) hb_dbtExists,
|
||||
( DBENTRYP_RSLV ) hb_dbtRddInfo,
|
||||
|
||||
/* Special and reserved methods */
|
||||
|
||||
( DBENTRYP_SVP ) hb_dbtWhoCares
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Exclusive lock memo file.
|
||||
*/
|
||||
static BOOL hb_dbtFileLockEx( DBTAREAP pArea )
|
||||
{
|
||||
BOOL fRet;
|
||||
|
||||
if ( !pArea->fShared )
|
||||
{
|
||||
fRet = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
fRet = hb_fsLock( pArea->hMemoFile, DBT_LOCKPOS, DBT_LOCKSIZE,
|
||||
FL_LOCK | FLX_EXCLUSIVE | FLX_WAIT );
|
||||
} while ( !fRet );
|
||||
}
|
||||
return fRet;
|
||||
}
|
||||
|
||||
/*
|
||||
* Shared lock memo file.
|
||||
*/
|
||||
static BOOL hb_dbtFileLockSh( DBTAREAP pArea )
|
||||
{
|
||||
BOOL fRet;
|
||||
|
||||
if ( !pArea->fShared )
|
||||
{
|
||||
fRet = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
do
|
||||
{
|
||||
fRet = hb_fsLock( pArea->hMemoFile, DBT_LOCKPOS, DBT_LOCKSIZE,
|
||||
FL_LOCK | FLX_SHARED | FLX_WAIT );
|
||||
} while ( !fRet );
|
||||
}
|
||||
return fRet;
|
||||
}
|
||||
|
||||
/*
|
||||
* Unlock memo file.
|
||||
*/
|
||||
static BOOL hb_dbtFileUnLock( DBTAREAP pArea )
|
||||
{
|
||||
return !pArea->fShared || hb_fsLock( pArea->hMemoFile, DBT_LOCKPOS, DBT_LOCKSIZE, FL_UNLOCK );
|
||||
}
|
||||
|
||||
/*
|
||||
* Return the size of memo.
|
||||
*/
|
||||
static ULONG hb_dbtGetMemoLen( DBTAREAP pArea, USHORT uiIndex )
|
||||
{
|
||||
ULONG ulBlock;
|
||||
BYTE pBlock[ DBT_BLOCKSIZE ];
|
||||
USHORT uiLen;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtGetMemoLen(%p, %hu)", pArea, uiIndex));
|
||||
|
||||
ulBlock = hb_dbfGetMemoBlock( ( DBFAREAP ) pArea, uiIndex );
|
||||
if( ulBlock == 0 )
|
||||
return 0;
|
||||
hb_fsSeekLarge( pArea->hMemoFile, ( HB_FOFFSET ) ulBlock * DBT_BLOCKSIZE, FS_SET );
|
||||
ulBlock = 0;
|
||||
do
|
||||
{
|
||||
uiIndex = 0;
|
||||
uiLen = hb_fsRead( pArea->hMemoFile, pBlock, DBT_BLOCKSIZE );
|
||||
if ( uiLen == ( USHORT ) FS_ERROR )
|
||||
break;
|
||||
while( uiIndex < uiLen && pBlock[ uiIndex ] != 0x1A )
|
||||
uiIndex++;
|
||||
ulBlock += uiIndex;
|
||||
} while( uiIndex == DBT_BLOCKSIZE );
|
||||
return ulBlock;
|
||||
}
|
||||
|
||||
/*
|
||||
* Read memo data.
|
||||
*/
|
||||
static void hb_dbtGetMemo( DBTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
{
|
||||
ULONG ulSize, ulBlock;
|
||||
BYTE * pBuffer;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtGetMemo(%p, %hu, %p)", pArea, uiIndex, pItem));
|
||||
|
||||
ulSize = hb_dbtGetMemoLen( pArea, uiIndex );
|
||||
|
||||
pBuffer = ( BYTE * ) hb_xgrab( ulSize + 1 );
|
||||
if( ulSize > 0 )
|
||||
{
|
||||
ulBlock = hb_dbfGetMemoBlock( ( DBFAREAP ) pArea, uiIndex );
|
||||
hb_fsSeekLarge( pArea->hMemoFile, ( HB_FOFFSET ) ulBlock * DBT_BLOCKSIZE, FS_SET );
|
||||
hb_fsReadLarge( pArea->hMemoFile, pBuffer, ulSize );
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
hb_cdpnTranslate( ( char * ) pBuffer, pArea->cdPage, hb_vmCDP(), ulSize );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
*pBuffer = '\0';
|
||||
|
||||
hb_itemPutCLPtr( pItem, ( char * ) pBuffer, ulSize );
|
||||
hb_itemSetCMemo( pItem );
|
||||
}
|
||||
|
||||
/*
|
||||
* Write memo data.
|
||||
*/
|
||||
static void hb_dbtWriteMemo( DBTAREAP pArea, ULONG ulBlock, PHB_ITEM pItem, ULONG ulLen,
|
||||
ULONG * ulStoredBlock )
|
||||
{
|
||||
BYTE pAddr[4];
|
||||
BOOL bNewBlock;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtWriteMemo(%p, %lu, %p, %lu, %p)", pArea, ulBlock, pItem,
|
||||
ulLen, ulStoredBlock));
|
||||
|
||||
bNewBlock = !( ulBlock && ulLen < DBT_BLOCKSIZE - 1 );
|
||||
if( bNewBlock )
|
||||
{
|
||||
/* Get next block from header */
|
||||
hb_fsSeek( pArea->hMemoFile, 0, FS_SET );
|
||||
hb_fsRead( pArea->hMemoFile, pAddr, 4 );
|
||||
ulBlock = HB_GET_LE_UINT32( pAddr );
|
||||
}
|
||||
* ulStoredBlock = ulBlock;
|
||||
|
||||
hb_fsSeekLarge( pArea->hMemoFile, ( HB_FOFFSET ) ulBlock * DBT_BLOCKSIZE, FS_SET );
|
||||
#ifndef HB_CDP_SUPPORT_OFF
|
||||
if( hb_vmCDP() != pArea->cdPage )
|
||||
{
|
||||
BYTE * pBuff = ( BYTE * ) hb_xalloc( ulLen + 1 );
|
||||
|
||||
if( pBuff )
|
||||
{
|
||||
memcpy( pBuff, hb_itemGetCPtr( pItem ), ulLen );
|
||||
pBuff[ ulLen ] = 0x1A;
|
||||
hb_cdpnTranslate( ( char * ) pBuff, hb_vmCDP(), pArea->cdPage, ulLen );
|
||||
hb_fsWriteLarge( pArea->hMemoFile, pBuff, ulLen + 1 );
|
||||
hb_xfree( pBuff );
|
||||
}
|
||||
else
|
||||
{
|
||||
BYTE pBlock[ DBT_BLOCKSIZE ], *pSrc = ( BYTE * ) hb_itemGetCPtr( pItem );
|
||||
ULONG ulWritten = 0, ulRest;
|
||||
|
||||
do
|
||||
{
|
||||
ulRest = HB_MIN( ulLen - ulWritten, DBT_BLOCKSIZE );
|
||||
memcpy( pBlock, pSrc + ulWritten, ulRest );
|
||||
memset( pBlock + ulRest, 0x1A, DBT_BLOCKSIZE - ulRest );
|
||||
hb_cdpnTranslate( ( char * ) pBlock, hb_vmCDP(), pArea->cdPage, ulRest );
|
||||
hb_fsWrite( pArea->hMemoFile, pBlock, DBT_BLOCKSIZE );
|
||||
ulWritten += DBT_BLOCKSIZE;
|
||||
}
|
||||
while ( ulWritten <= ulLen );
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
BYTE pBlock[ DBT_BLOCKSIZE ];
|
||||
memset( pBlock, 0x1A, DBT_BLOCKSIZE );
|
||||
hb_fsWriteLarge( pArea->hMemoFile, ( BYTE * ) hb_itemGetCPtr( pItem ), ulLen );
|
||||
hb_fsWrite( pArea->hMemoFile, pBlock, ( DBT_BLOCKSIZE - ( USHORT ) ( ulLen % DBT_BLOCKSIZE ) ) );
|
||||
}
|
||||
pArea->fMemoFlush = TRUE;
|
||||
|
||||
if( bNewBlock )
|
||||
{
|
||||
ulBlock += ( ulLen / DBT_BLOCKSIZE ) + 1;
|
||||
HB_PUT_LE_UINT32( pAddr, ulBlock );
|
||||
hb_fsSeek( pArea->hMemoFile, 0, FS_SET );
|
||||
hb_fsWrite( pArea->hMemoFile, pAddr, 4 );
|
||||
pArea->fMemoFlush = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Assign a value to the specified memo field.
|
||||
*/
|
||||
static BOOL hb_dbtPutMemo( DBTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
{
|
||||
ULONG ulLen, ulBlock;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtPutMemo(%p, %hu, %p)", pArea, uiIndex, pItem));
|
||||
|
||||
ulLen = hb_itemGetCLen( pItem );
|
||||
if( ulLen > 0 )
|
||||
{
|
||||
ulBlock = hb_dbfGetMemoBlock( ( DBFAREAP ) pArea, uiIndex );
|
||||
hb_dbtWriteMemo( pArea, ulBlock, pItem, ulLen, &ulBlock );
|
||||
}
|
||||
else
|
||||
ulBlock = 0;
|
||||
hb_dbfPutMemoBlock( ( DBFAREAP ) pArea, uiIndex, ulBlock );
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/* DBT METHODS */
|
||||
|
||||
/*
|
||||
* Obtain the length of a field value.
|
||||
* ( DBENTRYP_SVL ) hb_dbtGetVarLen
|
||||
*/
|
||||
static HB_ERRCODE hb_dbtGetVarLen( DBTAREAP pArea, USHORT uiIndex, ULONG * pLength )
|
||||
{
|
||||
BOOL bDeleted;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtGetVarLen(%p, %hu, %p)", pArea, uiIndex, pLength));
|
||||
|
||||
if( pArea->fHasMemo && pArea->hMemoFile != FS_ERROR )
|
||||
{
|
||||
/* Force read record */
|
||||
if( SELF_DELETED( ( AREAP ) pArea, &bDeleted ) == HB_FAILURE )
|
||||
return HB_FAILURE;
|
||||
|
||||
if( pArea->lpFields[ uiIndex - 1 ].uiType == HB_FT_MEMO )
|
||||
{
|
||||
if( hb_dbtFileLockSh( pArea ) )
|
||||
{
|
||||
* pLength = hb_dbtGetMemoLen( pArea, uiIndex - 1 );
|
||||
hb_dbtFileUnLock( pArea );
|
||||
}
|
||||
else
|
||||
{
|
||||
* pLength = 0;
|
||||
}
|
||||
return HB_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return SUPER_GETVARLEN( ( AREAP ) pArea, uiIndex, pLength );
|
||||
}
|
||||
|
||||
/*
|
||||
* Retrieve information about the current driver.
|
||||
* ( DBENTRYP_SI ) hb_dbtInfo
|
||||
*/
|
||||
static HB_ERRCODE hb_dbtInfo( DBTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtInfo(%p, %hu, %p)", pArea, uiIndex, pItem));
|
||||
|
||||
switch( uiIndex )
|
||||
{
|
||||
case DBI_MEMOEXT:
|
||||
if( pArea->fHasMemo && pArea->hMemoFile != FS_ERROR )
|
||||
{
|
||||
PHB_FNAME pFileName;
|
||||
|
||||
pFileName = hb_fsFNameSplit( ( char * ) pArea->szMemoFileName );
|
||||
hb_itemPutC( pItem, pFileName->szExtension );
|
||||
hb_xfree( pFileName );
|
||||
}
|
||||
else
|
||||
{
|
||||
hb_itemClear( pItem );
|
||||
return SELF_RDDINFO( SELF_RDDNODE( pArea ), RDDI_MEMOEXT, 0, pItem );
|
||||
}
|
||||
break;
|
||||
|
||||
case DBI_MEMOBLOCKSIZE:
|
||||
if( pArea->fHasMemo && pArea->hMemoFile != FS_ERROR )
|
||||
hb_itemPutNI( pItem, pArea->uiMemoBlockSize );
|
||||
else
|
||||
hb_itemPutNI( pItem, DBT_BLOCKSIZE );
|
||||
break;
|
||||
|
||||
case DBI_MEMOTYPE:
|
||||
if( pArea->fHasMemo && pArea->hMemoFile != FS_ERROR )
|
||||
hb_itemPutNI( pItem, pArea->bMemoType );
|
||||
else
|
||||
hb_itemPutNI( pItem, DB_MEMO_DBT );
|
||||
break;
|
||||
|
||||
/* case DBI_RDD_VERSION */
|
||||
|
||||
default:
|
||||
return SUPER_INFO( ( AREAP ) pArea, uiIndex, pItem );
|
||||
}
|
||||
|
||||
return HB_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Retrieve the size of the WorkArea structure.
|
||||
* ( DBENTRYP_SP ) hb_dbtStructSize
|
||||
*/
|
||||
static HB_ERRCODE hb_dbtStructSize( DBTAREAP pArea, USHORT * uiSize )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtStrucSize(%p, %p)", pArea, uiSize));
|
||||
HB_SYMBOL_UNUSED( pArea );
|
||||
|
||||
* uiSize = sizeof( DBTAREA );
|
||||
return HB_SUCCESS;
|
||||
}
|
||||
|
||||
/*
|
||||
* Obtain the current value of a field.
|
||||
* ( DBENTRYP_SI ) hb_dbtGetValue
|
||||
*/
|
||||
static HB_ERRCODE hb_dbtGetValue( DBTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
{
|
||||
BOOL bDeleted;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtGetValue(%p, %hu, %p)", pArea, uiIndex, pItem));
|
||||
|
||||
if( pArea->fHasMemo && pArea->hMemoFile != FS_ERROR &&
|
||||
pArea->lpFields[ uiIndex - 1 ].uiType == HB_FT_MEMO )
|
||||
{
|
||||
/* Force read record */
|
||||
if( SELF_DELETED( ( AREAP ) pArea, &bDeleted ) == HB_FAILURE )
|
||||
return HB_FAILURE;
|
||||
|
||||
if( hb_dbtFileLockSh( pArea ) )
|
||||
{
|
||||
hb_dbtGetMemo( pArea, uiIndex - 1, pItem );
|
||||
hb_dbtFileUnLock( pArea );
|
||||
}
|
||||
else
|
||||
{
|
||||
PHB_ITEM pError = hb_errNew();
|
||||
|
||||
hb_errPutGenCode( pError, EG_LOCK );
|
||||
hb_errPutDescription( pError, hb_langDGetErrorDesc( EG_LOCK ) );
|
||||
hb_errPutSubCode( pError, EDBF_LOCK );
|
||||
hb_errPutFlags( pError, EF_CANDEFAULT );
|
||||
SELF_ERROR( ( AREAP ) pArea, pError );
|
||||
hb_itemRelease( pError );
|
||||
return HB_FAILURE;
|
||||
}
|
||||
return HB_SUCCESS;
|
||||
}
|
||||
else
|
||||
return SUPER_GETVALUE( ( AREAP ) pArea, uiIndex, pItem );
|
||||
}
|
||||
|
||||
/*
|
||||
* Assign a value to a field.
|
||||
* ( DBENTRYP_SI ) hb_dbtPutValue
|
||||
*/
|
||||
static HB_ERRCODE hb_dbtPutValue( DBTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem )
|
||||
{
|
||||
BOOL bDeleted;
|
||||
PHB_ITEM pError;
|
||||
HB_ERRCODE uiError, uiErrorG;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtPutValue(%p, %hu, %p)", pArea, uiIndex, pItem));
|
||||
|
||||
if( pArea->fHasMemo && pArea->hMemoFile != FS_ERROR &&
|
||||
pArea->lpFields[ uiIndex - 1 ].uiType == HB_FT_MEMO )
|
||||
{
|
||||
if( HB_IS_MEMO( pItem ) || HB_IS_STRING( pItem ) )
|
||||
{
|
||||
/* Force read record */
|
||||
if( SELF_DELETED( ( AREAP ) pArea, &bDeleted ) == HB_FAILURE )
|
||||
return HB_FAILURE;
|
||||
|
||||
if( !pArea->fPositioned )
|
||||
return HB_SUCCESS;
|
||||
|
||||
/* Buffer is hot? */
|
||||
if( !pArea->fRecordChanged && SELF_GOHOT( ( AREAP ) pArea ) == HB_FAILURE )
|
||||
return HB_FAILURE;
|
||||
|
||||
if( hb_dbtFileLockEx( pArea ) )
|
||||
{
|
||||
uiError = hb_dbtPutMemo( pArea, uiIndex -1, pItem ) ? HB_SUCCESS : EDBF_DATAWIDTH;
|
||||
hb_dbtFileUnLock( pArea );
|
||||
}
|
||||
else
|
||||
{
|
||||
uiError = EDBF_LOCK;
|
||||
}
|
||||
/* Update deleted flag */
|
||||
pArea->pRecord[ 0 ] = (BYTE) (pArea->fDeleted ? '*' : ' ');
|
||||
}
|
||||
else
|
||||
uiError = EDBF_DATATYPE;
|
||||
|
||||
if( uiError != HB_SUCCESS )
|
||||
{
|
||||
uiErrorG = uiError == EDBF_DATAWIDTH ? EG_DATAWIDTH :
|
||||
( uiError == EDBF_LOCK ? EG_LOCK : EG_DATATYPE );
|
||||
pError = hb_errNew();
|
||||
hb_errPutGenCode( pError, uiErrorG );
|
||||
hb_errPutDescription( pError, hb_langDGetErrorDesc( uiErrorG ) );
|
||||
hb_errPutSubCode( pError, uiError );
|
||||
hb_errPutFlags( pError, EF_CANDEFAULT );
|
||||
SELF_ERROR( ( AREAP ) pArea, pError );
|
||||
hb_itemRelease( pError );
|
||||
return HB_FAILURE;
|
||||
}
|
||||
return HB_SUCCESS;
|
||||
}
|
||||
return SUPER_PUTVALUE( ( AREAP ) pArea, uiIndex, pItem);
|
||||
}
|
||||
|
||||
|
||||
/* ( DBENTRYP_V ) hb_dbtCloseMemFile : NULL */
|
||||
|
||||
/*
|
||||
* Create a memo file in the WorkArea.
|
||||
* ( DBENTRYP_VP ) hb_dbtCreateMemFile
|
||||
*/
|
||||
static HB_ERRCODE hb_dbtCreateMemFile( DBTAREAP pArea, LPDBOPENINFO pCreateInfo )
|
||||
{
|
||||
BYTE pBlock[ DBT_BLOCKSIZE ];
|
||||
BOOL bRetry;
|
||||
PHB_ITEM pError;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtCreateMemFile(%p, %p)", pArea, pCreateInfo));
|
||||
|
||||
pArea->uiMemoBlockSize = DBT_BLOCKSIZE;
|
||||
|
||||
if( pCreateInfo )
|
||||
{
|
||||
pError = NULL;
|
||||
/* Try create */
|
||||
do
|
||||
{
|
||||
pArea->hMemoFile = hb_fsExtOpen( pCreateInfo->abName, NULL,
|
||||
FO_READWRITE | FO_EXCLUSIVE | FXO_TRUNCATE |
|
||||
FXO_DEFAULTS | FXO_SHARELOCK,
|
||||
NULL, pError );
|
||||
if( pArea->hMemoFile == FS_ERROR )
|
||||
{
|
||||
if( !pError )
|
||||
{
|
||||
pError = hb_errNew();
|
||||
hb_errPutGenCode( pError, EG_CREATE );
|
||||
hb_errPutSubCode( pError, EDBF_CREATE_DBF );
|
||||
hb_errPutDescription( pError, hb_langDGetErrorDesc( EG_CREATE ) );
|
||||
hb_errPutFileName( pError, ( char * ) pCreateInfo->abName );
|
||||
hb_errPutFlags( pError, EF_CANRETRY );
|
||||
}
|
||||
bRetry = ( SELF_ERROR( ( AREAP ) pArea, pError ) == E_RETRY );
|
||||
}
|
||||
else
|
||||
bRetry = FALSE;
|
||||
} while( bRetry );
|
||||
if( pError )
|
||||
hb_itemRelease( pError );
|
||||
|
||||
if( pArea->hMemoFile == FS_ERROR )
|
||||
return HB_FAILURE;
|
||||
}
|
||||
else /* For zap file */
|
||||
hb_fsSeek( pArea->hMemoFile, 0, FS_SET );
|
||||
|
||||
memset( pBlock, 0, DBT_BLOCKSIZE );
|
||||
* ( ( LONG * ) pBlock ) = 1;
|
||||
if( hb_fsWrite( pArea->hMemoFile, pBlock, DBT_BLOCKSIZE ) != DBT_BLOCKSIZE )
|
||||
return HB_FAILURE;
|
||||
hb_fsWrite( pArea->hMemoFile, NULL, 0 );
|
||||
pArea->fMemoFlush = TRUE;
|
||||
|
||||
return HB_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/* ( DBENTRYP_SVPB ) hb_dbtGetValueFile : NULL */
|
||||
|
||||
/*
|
||||
* Open a memo file in the specified WorkArea.
|
||||
* ( DBENTRYP_VP ) hb_dbtOpenMemFile
|
||||
*/
|
||||
static HB_ERRCODE hb_dbtOpenMemFile( DBTAREAP pArea, LPDBOPENINFO pOpenInfo )
|
||||
{
|
||||
USHORT uiFlags;
|
||||
BOOL bRetry;
|
||||
PHB_ITEM pError = NULL;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtOpenMemFile(%p, %p)", pArea, pOpenInfo));
|
||||
|
||||
uiFlags = (pOpenInfo->fReadonly ? FO_READ : FO_READWRITE) |
|
||||
(pOpenInfo->fShared ? FO_DENYNONE : FO_EXCLUSIVE);
|
||||
|
||||
/* Try open */
|
||||
do
|
||||
{
|
||||
pArea->hMemoFile = hb_fsExtOpen( pOpenInfo->abName, NULL, uiFlags |
|
||||
FXO_DEFAULTS | FXO_SHARELOCK,
|
||||
NULL, pError );
|
||||
if( pArea->hMemoFile == FS_ERROR )
|
||||
{
|
||||
if( !pError )
|
||||
{
|
||||
pError = hb_errNew();
|
||||
hb_errPutGenCode( pError, EG_OPEN );
|
||||
hb_errPutSubCode( pError, EDBF_OPEN_DBF );
|
||||
hb_errPutDescription( pError, hb_langDGetErrorDesc( EG_OPEN ) );
|
||||
hb_errPutFileName( pError, ( char * ) pOpenInfo->abName );
|
||||
hb_errPutFlags( pError, EF_CANRETRY | EF_CANDEFAULT );
|
||||
}
|
||||
bRetry = ( SELF_ERROR( ( AREAP ) pArea, pError ) == E_RETRY );
|
||||
}
|
||||
else
|
||||
bRetry = FALSE;
|
||||
} while( bRetry );
|
||||
|
||||
if( pError )
|
||||
{
|
||||
hb_itemRelease( pError );
|
||||
}
|
||||
pArea->uiMemoBlockSize = DBT_BLOCKSIZE;
|
||||
|
||||
return ( pArea->hMemoFile == FS_ERROR ? HB_FAILURE : HB_SUCCESS );
|
||||
}
|
||||
|
||||
/* ( DBENTRYP_SVPB ) hb_dbtPutValueFile : NULL */
|
||||
|
||||
/*
|
||||
* Retrieve (set) information about RDD
|
||||
* ( DBENTRYP_RSLV ) hb_dbtFieldInfo
|
||||
*/
|
||||
static HB_ERRCODE hb_dbtRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_dbtRddInfo(%p, %hu, %lu, %p)", pRDD, uiIndex, ulConnect, pItem));
|
||||
|
||||
switch( uiIndex )
|
||||
{
|
||||
case RDDI_MEMOEXT:
|
||||
{
|
||||
LPDBFDATA pData = ( LPDBFDATA ) pRDD->lpvCargo;
|
||||
char *szNew = hb_itemGetCPtr( pItem );
|
||||
|
||||
if( szNew[0] == '.' && szNew[1] )
|
||||
szNew = hb_strdup( szNew );
|
||||
else
|
||||
szNew = NULL;
|
||||
|
||||
hb_itemPutC( pItem, pData->szMemoExt[ 0 ] ? pData->szMemoExt : DBT_MEMOEXT );
|
||||
if( szNew )
|
||||
{
|
||||
hb_strncpy( pData->szMemoExt, szNew, HB_MAX_FILE_EXT );
|
||||
hb_xfree( szNew );
|
||||
}
|
||||
break;
|
||||
}
|
||||
case RDDI_MEMOBLOCKSIZE:
|
||||
hb_itemPutNI( pItem, DBT_BLOCKSIZE );
|
||||
break;
|
||||
|
||||
case RDDI_MEMOTYPE:
|
||||
hb_itemPutNI( pItem, DB_MEMO_DBT );
|
||||
break;
|
||||
|
||||
case RDDI_MEMOGCTYPE:
|
||||
hb_itemPutNI( pItem, 0 );
|
||||
break;
|
||||
|
||||
case RDDI_MEMOREADLOCK:
|
||||
case RDDI_MEMOREUSE:
|
||||
hb_itemPutL( pItem, FALSE );
|
||||
break;
|
||||
|
||||
default:
|
||||
return SUPER_RDDINFO( pRDD, uiIndex, ulConnect, pItem );
|
||||
}
|
||||
|
||||
return HB_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
HB_FUNC( DBFDBT ) {;}
|
||||
|
||||
HB_FUNC( DBFDBT_GETFUNCTABLE )
|
||||
{
|
||||
RDDFUNCS * pTable;
|
||||
USHORT * uiCount;
|
||||
|
||||
uiCount = ( USHORT * ) hb_parptr( 1 );
|
||||
pTable = ( RDDFUNCS * ) hb_parptr( 2 );
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("DBFDBT_GETFUNCTABLE(%p, %p)", uiCount, pTable));
|
||||
|
||||
if( pTable )
|
||||
{
|
||||
if ( uiCount )
|
||||
* uiCount = RDDFUNCSCOUNT;
|
||||
hb_retni( hb_rddInherit( pTable, &dbtTable, &dbtSuper, "DBF" ) );
|
||||
}
|
||||
else
|
||||
hb_retni( HB_FAILURE );
|
||||
}
|
||||
|
||||
|
||||
#define __PRG_SOURCE__ __FILE__
|
||||
|
||||
#ifdef HB_PCODE_VER
|
||||
# undef HB_PRG_PCODE_VER
|
||||
# define HB_PRG_PCODE_VER HB_PCODE_VER
|
||||
#endif
|
||||
|
||||
HB_FUNC_EXTERN( _DBF );
|
||||
|
||||
static void hb_dbfdbtRddInit( void * cargo )
|
||||
{
|
||||
HB_SYMBOL_UNUSED( cargo );
|
||||
|
||||
if( hb_rddRegister( "DBF", RDT_FULL ) > 1 ||
|
||||
hb_rddRegister( "DBFDBT", RDT_FULL ) > 1 )
|
||||
{
|
||||
hb_errInternal( HB_EI_RDDINVALID, NULL, NULL, NULL );
|
||||
|
||||
/* not executed, only to force DBF RDD linking */
|
||||
HB_FUNC_EXEC( _DBF );
|
||||
}
|
||||
}
|
||||
|
||||
HB_INIT_SYMBOLS_BEGIN( dbfdbt1__InitSymbols )
|
||||
{ "DBFDBT", {HB_FS_PUBLIC|HB_FS_LOCAL}, {HB_FUNCNAME( DBFDBT )}, NULL },
|
||||
{ "DBFDBT_GETFUNCTABLE", {HB_FS_PUBLIC|HB_FS_LOCAL}, {HB_FUNCNAME( DBFDBT_GETFUNCTABLE )}, NULL }
|
||||
HB_INIT_SYMBOLS_END( dbfdbt1__InitSymbols )
|
||||
|
||||
HB_CALL_ON_STARTUP_BEGIN( _hb_dbfdbt_rdd_init_ )
|
||||
hb_vmAtInit( hb_dbfdbtRddInit, NULL );
|
||||
HB_CALL_ON_STARTUP_END( _hb_dbfdbt_rdd_init_ )
|
||||
|
||||
#if defined( HB_PRAGMA_STARTUP )
|
||||
#pragma startup dbfdbt1__InitSymbols
|
||||
#pragma startup _hb_dbfdbt_rdd_init_
|
||||
#elif defined( HB_MSC_STARTUP )
|
||||
#if defined( HB_OS_WIN_64 )
|
||||
#pragma section( HB_MSC_START_SEGMENT, long, read )
|
||||
#endif
|
||||
#pragma data_seg( HB_MSC_START_SEGMENT )
|
||||
static HB_$INITSYM hb_vm_auto_dbfdbt1__InitSymbols = dbfdbt1__InitSymbols;
|
||||
static HB_$INITSYM hb_vm_auto_dbfdbt_rdd_init = _hb_dbfdbt_rdd_init_;
|
||||
#pragma data_seg()
|
||||
#endif
|
||||
@@ -1,193 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
* DBFDBT RDD
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* www - http://www.xharbour.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef HB_RDDDBT_H_
|
||||
#define HB_RDDDBT_H_
|
||||
|
||||
#include "hbdbf.h"
|
||||
#include "hbdbferr.h"
|
||||
#include "hbapirdd.h"
|
||||
#define HB_EXTERNAL_RDDDBF_USE
|
||||
#include "hbrdddbf.h"
|
||||
|
||||
HB_EXTERN_BEGIN
|
||||
|
||||
/* MEMO constants and defaults */
|
||||
#define DBT_MEMOEXT ".dbt"
|
||||
#define DBT_BLOCKSIZE 512
|
||||
#define DBT_LOCKPOS 0x00000000L
|
||||
#define DBT_LOCKSIZE 0x00000001L
|
||||
|
||||
/*
|
||||
* DBFDBT WORKAREA
|
||||
* ------------
|
||||
* The Workarea Structure of DBFDBT RDD
|
||||
*
|
||||
*/
|
||||
|
||||
/* we don't have to change DBFAREA to create DBTAREA */
|
||||
typedef DBFAREA DBTAREA;
|
||||
typedef DBTAREA * LPDBTAREA;
|
||||
#ifndef DBTAREAP
|
||||
#define DBTAREAP LPDBTAREA
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* -- DBFDBT METHODS --
|
||||
*/
|
||||
|
||||
#define SUPERTABLE ( &dbtSuper )
|
||||
|
||||
#define hb_dbtBof NULL
|
||||
#define hb_dbtEof NULL
|
||||
#define hb_dbtFound NULL
|
||||
#define hb_dbtGoBottom NULL
|
||||
#define hb_dbtGoTo NULL
|
||||
#define hb_dbtGoToId NULL
|
||||
#define hb_dbtGoTop NULL
|
||||
#define hb_dbtSeek NULL
|
||||
#define hb_dbtSkip NULL
|
||||
#define hb_dbtSkipFilter NULL
|
||||
#define hb_dbtSkipRaw NULL
|
||||
#define hb_dbtAddField NULL
|
||||
#define hb_dbtAppend NULL
|
||||
#define hb_dbtCreateFields NULL
|
||||
#define hb_dbtDeleteRec NULL
|
||||
#define hb_dbtDeleted NULL
|
||||
#define hb_dbtFieldCount NULL
|
||||
#define hb_dbtFieldDisplay NULL
|
||||
#define hb_dbtFieldInfo NULL
|
||||
#define hb_dbtFieldName NULL
|
||||
#define hb_dbtFlush NULL
|
||||
#define hb_dbtGetRec NULL
|
||||
static HB_ERRCODE hb_dbtGetValue( DBTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem );
|
||||
static HB_ERRCODE hb_dbtGetVarLen( DBTAREAP pArea, USHORT uiIndex, ULONG * pLength );
|
||||
#define hb_dbtGoCold NULL
|
||||
#define hb_dbtGoHot NULL
|
||||
#define hb_dbtPutRec NULL
|
||||
static HB_ERRCODE hb_dbtPutValue( DBTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem );
|
||||
#define hb_dbtRecall NULL
|
||||
#define hb_dbtRecCount NULL
|
||||
#define hb_dbtRecInfo NULL
|
||||
#define hb_dbtRecNo NULL
|
||||
#define hb_dbtRecId NULL
|
||||
#define hb_dbtSetFieldExtent NULL
|
||||
#define hb_dbtAlias NULL
|
||||
#define hb_dbtClose NULL
|
||||
#define hb_dbtCreate NULL
|
||||
static HB_ERRCODE hb_dbtInfo( DBTAREAP pArea, USHORT uiIndex, PHB_ITEM pItem );
|
||||
#define hb_dbtNewArea NULL
|
||||
#define hb_dbtOpen NULL
|
||||
#define hb_dbtRelease NULL
|
||||
static HB_ERRCODE hb_dbtStructSize( DBTAREAP pArea, USHORT * uiSize );
|
||||
#define hb_dbtSysName NULL
|
||||
#define hb_dbtEval NULL
|
||||
#define hb_dbtPack NULL
|
||||
#define hb_dbtPackRec NULL
|
||||
#define hb_dbtSort NULL
|
||||
#define hb_dbtTrans NULL
|
||||
#define hb_dbtTransRec NULL
|
||||
#define hb_dbtZap NULL
|
||||
#define hb_dbtChildEnd NULL
|
||||
#define hb_dbtChildStart NULL
|
||||
#define hb_dbtChildSync NULL
|
||||
#define hb_dbtSyncChildren NULL
|
||||
#define hb_dbtClearRel NULL
|
||||
#define hb_dbtForceRel NULL
|
||||
#define hb_dbtRelArea NULL
|
||||
#define hb_dbtRelEval NULL
|
||||
#define hb_dbtRelText NULL
|
||||
#define hb_dbtSetRel NULL
|
||||
#define hb_dbtOrderListAdd NULL
|
||||
#define hb_dbtOrderListClear NULL
|
||||
#define hb_dbtOrderListDelete NULL
|
||||
#define hb_dbtOrderListFocus NULL
|
||||
#define hb_dbtOrderListRebuild NULL
|
||||
#define hb_dbtOrderCondition NULL
|
||||
#define hb_dbtOrderCreate NULL
|
||||
#define hb_dbtOrderDestroy NULL
|
||||
#define hb_dbtOrderInfo NULL
|
||||
#define hb_dbtClearFilter NULL
|
||||
#define hb_dbtClearLocate NULL
|
||||
#define hb_dbtClearScope NULL
|
||||
#define hb_dbtCountScope NULL
|
||||
#define hb_dbtFilterText NULL
|
||||
#define hb_dbtScopeInfo NULL
|
||||
#define hb_dbtSetFilter NULL
|
||||
#define hb_dbtSetLocate NULL
|
||||
#define hb_dbtSetScope NULL
|
||||
#define hb_dbtSkipScope NULL
|
||||
#define hb_dbtLocate NULL
|
||||
#define hb_dbtCompile NULL
|
||||
#define hb_dbtError NULL
|
||||
#define hb_dbtEvalBlock NULL
|
||||
#define hb_dbtRawLock NULL
|
||||
#define hb_dbtLock NULL
|
||||
#define hb_dbtUnLock NULL
|
||||
#define hb_dbtCloseMemFile NULL
|
||||
static HB_ERRCODE hb_dbtCreateMemFile( DBTAREAP pArea, LPDBOPENINFO pCreateInfo );
|
||||
#define hb_dbtGetValueFile NULL
|
||||
static HB_ERRCODE hb_dbtOpenMemFile( DBTAREAP pArea, LPDBOPENINFO pOpenInfo );
|
||||
#define hb_dbtPutValueFile NULL
|
||||
#define hb_dbtReadDBHeader NULL
|
||||
#define hb_dbtWriteDBHeader NULL
|
||||
#define hb_dbtInit NULL
|
||||
#define hb_dbtExit NULL
|
||||
#define hb_dbtDrop NULL
|
||||
#define hb_dbtExists NULL
|
||||
static HB_ERRCODE hb_dbtRddInfo( LPRDDNODE pRDD, USHORT uiIndex, ULONG ulConnect, PHB_ITEM pItem );
|
||||
#define hb_dbtWhoCares NULL
|
||||
|
||||
HB_EXTERN_END
|
||||
|
||||
#endif /* HB_RDDDBT */
|
||||
@@ -1,30 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
PRG_SOURCES=\
|
||||
RLBACK.PRG \
|
||||
RLDIALG.PRG \
|
||||
RLFRONT.PRG \
|
||||
|
||||
PRG_MAIN=RLFRONT.PRG
|
||||
|
||||
LIBS=\
|
||||
hbdebug \
|
||||
hbvm \
|
||||
hbrtl \
|
||||
hblang \
|
||||
hbrdd \
|
||||
hbrtl \
|
||||
hbvm \
|
||||
hbmacro \
|
||||
hbpp \
|
||||
rddntx \
|
||||
rddcdx \
|
||||
rddfpt \
|
||||
hbsix \
|
||||
hbcommon \
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
@@ -38,6 +38,7 @@ C_SOURCES=\
|
||||
errapi.c \
|
||||
errapiu.c \
|
||||
errint.c \
|
||||
errintlo.c \
|
||||
file.c \
|
||||
filebuf.c \
|
||||
filehb.c \
|
||||
|
||||
@@ -52,94 +52,10 @@
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapierr.h"
|
||||
#include "hbapilng.h"
|
||||
#include "hbdate.h"
|
||||
#include "hbset.h"
|
||||
|
||||
/* NOTE: Use as minimal calls from here, as possible.
|
||||
Don't allocate memory from this function. [vszakats] */
|
||||
|
||||
void hb_errInternalRaw( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 )
|
||||
{
|
||||
char buffer[ 8192 ];
|
||||
char file[ HB_PATH_MAX ];
|
||||
const char * szFile;
|
||||
USHORT uiLine;
|
||||
int iLevel;
|
||||
FILE * hLog;
|
||||
|
||||
BOOL fLang;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_errInternal(%lu, %s, %s, %s)", ulIntCode, szText, szPar1, szPar2));
|
||||
|
||||
if( szPar1 == NULL )
|
||||
szPar1 = "";
|
||||
|
||||
if( szPar2 == NULL )
|
||||
szPar2 = "";
|
||||
|
||||
fLang = ( hb_langID() != NULL );
|
||||
|
||||
szFile = hb_setGetCPtr( HB_SET_HBOUTLOG );
|
||||
if( !szFile )
|
||||
szFile = "hb_out.log";
|
||||
|
||||
hLog = hb_fopen( szFile, "a+" );
|
||||
if( hLog )
|
||||
{
|
||||
char szTime[ 9 ];
|
||||
int iYear, iMonth, iDay;
|
||||
|
||||
hb_dateToday( &iYear, &iMonth, &iDay );
|
||||
hb_dateTimeStr( szTime );
|
||||
|
||||
fprintf( hLog, HB_I_("Application Internal Error - %s\n"), hb_cmdargARGVN( 0 ) );
|
||||
fprintf( hLog, HB_I_("Terminated at: %04d.%02d.%02d %s\n"), iYear, iMonth, iDay, szTime );
|
||||
if( *hb_setGetCPtr( HB_SET_HBOUTLOGINFO ) )
|
||||
fprintf( hLog, HB_I_("Info: %s\n"), hb_setGetCPtr( HB_SET_HBOUTLOGINFO ) );
|
||||
}
|
||||
|
||||
hb_conOutErr( hb_conNewLine(), 0 );
|
||||
if( fLang )
|
||||
hb_snprintf( buffer, sizeof( buffer ), ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRINTR ), ulIntCode );
|
||||
else
|
||||
hb_snprintf( buffer, sizeof( buffer ), "Unrecoverable error %lu: ", ulIntCode );
|
||||
|
||||
hb_conOutErr( buffer, 0 );
|
||||
if( hLog )
|
||||
fprintf( hLog, "%s", buffer );
|
||||
|
||||
if( szText )
|
||||
hb_snprintf( buffer, sizeof( buffer ), szText, szPar1, szPar2 );
|
||||
else if( fLang )
|
||||
hb_snprintf( buffer, sizeof( buffer ), ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRINTR + ulIntCode - 9000 ), szPar1, szPar2 );
|
||||
else
|
||||
buffer[ 0 ] = '\0';
|
||||
|
||||
hb_conOutErr( buffer, 0 );
|
||||
hb_conOutErr( hb_conNewLine(), 0 );
|
||||
if( hLog )
|
||||
fprintf( hLog, "%s\n", buffer );
|
||||
|
||||
iLevel = 0;
|
||||
while( hb_procinfo( iLevel++, buffer, &uiLine, file ) )
|
||||
{
|
||||
char msg[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 32 ];
|
||||
|
||||
hb_snprintf( msg, sizeof( msg ), HB_I_("Called from %s(%hu)%s%s\n"), buffer, uiLine, *file ? HB_I_(" in ") : "", file );
|
||||
|
||||
hb_conOutErr( msg, 0 );
|
||||
if( hLog )
|
||||
fprintf( hLog, "%s", msg );
|
||||
}
|
||||
|
||||
if( hLog )
|
||||
{
|
||||
fprintf( hLog, "------------------------------------------------------------------------\n");
|
||||
fclose( hLog );
|
||||
}
|
||||
}
|
||||
|
||||
void hb_errInternal( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 )
|
||||
{
|
||||
hb_errInternalRaw( ulIntCode, szText, szPar1, szPar2 );
|
||||
|
||||
141
harbour/source/rtl/errintlo.c
Normal file
141
harbour/source/rtl/errintlo.c
Normal file
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* The Error API (internal error)
|
||||
*
|
||||
* Copyright 1999-2004 Viktor Szakats <viktor.szakats@syenar.hu>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapierr.h"
|
||||
#include "hbapilng.h"
|
||||
#include "hbdate.h"
|
||||
#include "hbset.h"
|
||||
|
||||
/* NOTE: Use as minimal calls from here, as possible.
|
||||
Don't allocate memory from this function. [vszakats] */
|
||||
|
||||
void hb_errInternalRaw( ULONG ulIntCode, const char * szText, const char * szPar1, const char * szPar2 )
|
||||
{
|
||||
char buffer[ 8192 ];
|
||||
char file[ HB_PATH_MAX ];
|
||||
const char * szFile;
|
||||
USHORT uiLine;
|
||||
int iLevel;
|
||||
FILE * hLog;
|
||||
|
||||
BOOL fLang;
|
||||
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_errInternal(%lu, %s, %s, %s)", ulIntCode, szText, szPar1, szPar2));
|
||||
|
||||
if( szPar1 == NULL )
|
||||
szPar1 = "";
|
||||
|
||||
if( szPar2 == NULL )
|
||||
szPar2 = "";
|
||||
|
||||
fLang = ( hb_langID() != NULL );
|
||||
|
||||
szFile = hb_setGetCPtr( HB_SET_HBOUTLOG );
|
||||
if( !szFile )
|
||||
szFile = "hb_out.log";
|
||||
|
||||
hLog = hb_fopen( szFile, "a+" );
|
||||
if( hLog )
|
||||
{
|
||||
char szTime[ 9 ];
|
||||
int iYear, iMonth, iDay;
|
||||
|
||||
hb_dateToday( &iYear, &iMonth, &iDay );
|
||||
hb_dateTimeStr( szTime );
|
||||
|
||||
fprintf( hLog, HB_I_("Application Internal Error - %s\n"), hb_cmdargARGVN( 0 ) );
|
||||
fprintf( hLog, HB_I_("Terminated at: %04d.%02d.%02d %s\n"), iYear, iMonth, iDay, szTime );
|
||||
if( *hb_setGetCPtr( HB_SET_HBOUTLOGINFO ) )
|
||||
fprintf( hLog, HB_I_("Info: %s\n"), hb_setGetCPtr( HB_SET_HBOUTLOGINFO ) );
|
||||
}
|
||||
|
||||
hb_conOutErr( hb_conNewLine(), 0 );
|
||||
if( fLang )
|
||||
hb_snprintf( buffer, sizeof( buffer ), ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRINTR ), ulIntCode );
|
||||
else
|
||||
hb_snprintf( buffer, sizeof( buffer ), "Unrecoverable error %lu: ", ulIntCode );
|
||||
|
||||
hb_conOutErr( buffer, 0 );
|
||||
if( hLog )
|
||||
fprintf( hLog, "%s", buffer );
|
||||
|
||||
if( szText )
|
||||
hb_snprintf( buffer, sizeof( buffer ), szText, szPar1, szPar2 );
|
||||
else if( fLang )
|
||||
hb_snprintf( buffer, sizeof( buffer ), ( char * ) hb_langDGetItem( HB_LANG_ITEM_BASE_ERRINTR + ulIntCode - 9000 ), szPar1, szPar2 );
|
||||
else
|
||||
buffer[ 0 ] = '\0';
|
||||
|
||||
hb_conOutErr( buffer, 0 );
|
||||
hb_conOutErr( hb_conNewLine(), 0 );
|
||||
if( hLog )
|
||||
fprintf( hLog, "%s\n", buffer );
|
||||
|
||||
iLevel = 0;
|
||||
while( hb_procinfo( iLevel++, buffer, &uiLine, file ) )
|
||||
{
|
||||
char msg[ HB_SYMBOL_NAME_LEN + HB_SYMBOL_NAME_LEN + 32 ];
|
||||
|
||||
hb_snprintf( msg, sizeof( msg ), HB_I_("Called from %s(%hu)%s%s\n"), buffer, uiLine, *file ? HB_I_(" in ") : "", file );
|
||||
|
||||
hb_conOutErr( msg, 0 );
|
||||
if( hLog )
|
||||
fprintf( hLog, "%s", msg );
|
||||
}
|
||||
|
||||
if( hLog )
|
||||
{
|
||||
fprintf( hLog, "------------------------------------------------------------------------\n");
|
||||
fclose( hLog );
|
||||
}
|
||||
}
|
||||
@@ -166,6 +166,10 @@ REQUEST hbmk_KEYW
|
||||
#define OutStd( x ) low_OutStd( hbmk[ _HBMK_lUTF8 ], x )
|
||||
#define OutErr( x ) low_OutErr( hbmk[ _HBMK_lUTF8 ], x )
|
||||
|
||||
#define HB_ISALPHA( c ) ( Upper( c ) >= "A" .AND. Upper( c ) <= "Z" )
|
||||
#define HB_ISFIRSTIDCHAR( c ) ( HB_ISALPHA( c ) .OR. ( c ) == '_' )
|
||||
#define HB_ISNEXTIDCHAR( c ) ( HB_ISFIRSTIDCHAR(c) .OR. IsDigit( c ) )
|
||||
|
||||
/* This requires Set( _SET_EXACT, .F. ) */
|
||||
#define LEFTEQUAL( l, r ) ( l = r )
|
||||
|
||||
@@ -1460,6 +1464,13 @@ FUNCTION hbmk( aArgs, /* @ */ lPause, /* @ */ lUTF8 )
|
||||
hbmk[ _HBMK_lRUN ] := .F.
|
||||
ENDIF
|
||||
|
||||
CASE Left( cParamL, Len( "-echo=" ) ) == "-echo="
|
||||
|
||||
cParam := MacroProc( hbmk, ArchCompFilter( hbmk, SubStr( cParam, Len( "-echo=" ) + 1 ) ), FN_DirGet( aParam[ _PAR_cFileName ] ) )
|
||||
IF ! Empty( cParam )
|
||||
OutStd( hb_StrFormat( I_( "%1$s" ), cParam ) + hb_osNewLine() )
|
||||
ENDIF
|
||||
|
||||
CASE Left( cParamL, Len( "-prgflag=" ) ) == "-prgflag="
|
||||
|
||||
cParam := MacroProc( hbmk, ArchCompFilter( hbmk, SubStr( cParam, Len( "-prgflag=" ) + 1 ) ), FN_DirGet( aParam[ _PAR_cFileName ] ) )
|
||||
@@ -4439,6 +4450,10 @@ STATIC FUNCTION FN_Expand( cFileName, lCommandLine )
|
||||
LOCAL aFile
|
||||
LOCAL aDir
|
||||
|
||||
IF Empty( cFileName )
|
||||
RETURN {}
|
||||
ENDIF
|
||||
|
||||
#if defined( __PLATFORM__UNIX )
|
||||
/* Disable expansion if this came from the command line */
|
||||
IF lCommandLine
|
||||
@@ -4863,8 +4878,9 @@ STATIC FUNCTION ArchCompFilter( hbmk, cItem )
|
||||
cFilterHarb := ""
|
||||
cValue := ""
|
||||
FOR nPos := 1 TO Len( cFilterSrc )
|
||||
IF IsDigit( SubStr( cFilterSrc, nPos, 1 ) ) .OR. ;
|
||||
IsAlpha( SubStr( cFilterSrc, nPos, 1 ) )
|
||||
IF iif( Empty( cValue ),;
|
||||
HB_ISFIRSTIDCHAR( SubStr( cFilterSrc, nPos, 1 ) ),;
|
||||
HB_ISNEXTIDCHAR( SubStr( cFilterSrc, nPos, 1 ) ) )
|
||||
cValue += SubStr( cFilterSrc, nPos, 1 )
|
||||
ELSE
|
||||
IF ! Empty( cValue )
|
||||
@@ -4883,13 +4899,17 @@ STATIC FUNCTION ArchCompFilter( hbmk, cItem )
|
||||
cFilterHarb := StrTran( cFilterHarb, "|", ".OR." )
|
||||
|
||||
/* Evaluate filter */
|
||||
bFilter := &( "{| hbmk |" + cFilterHarb + "}" )
|
||||
IF ISBLOCK( bFilter )
|
||||
IF ISLOGICAL( xResult := Eval( bFilter, hbmk ) ) .AND. xResult
|
||||
RETURN cItem
|
||||
|
||||
BEGIN SEQUENCE WITH {| oError | Break( oError ) }
|
||||
bFilter := &( "{| hbmk |" + cFilterHarb + "}" )
|
||||
IF ! ISBLOCK( bFilter ) .OR. ! ISLOGICAL( xResult := Eval( bFilter, hbmk ) ) .OR. ! xResult
|
||||
cItem := ""
|
||||
ENDIF
|
||||
ENDIF
|
||||
RETURN ""
|
||||
RECOVER
|
||||
cItem := ""
|
||||
END SEQUENCE
|
||||
|
||||
RETURN cItem
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
@@ -4944,10 +4964,6 @@ STATIC FUNCTION MacroProc( hbmk, cString, cDirParent )
|
||||
STATIC FUNCTION TimeElapsed( nStartSec, nEndSec )
|
||||
RETURN Round( ( nEndSec - iif( nEndSec < nStartSec, nStartSec - 86399, nStartSec ) ), 1 )
|
||||
|
||||
#define HB_ISALPHA( c ) ( Upper( c ) >= "A" .AND. Upper( c ) <= "Z" )
|
||||
#define HB_ISFIRSTIDCHAR( c ) ( HB_ISALPHA( c ) .OR. ( c ) == '_' )
|
||||
#define HB_ISNEXTIDCHAR( c ) ( HB_ISFIRSTIDCHAR(c) .OR. IsDigit( c ) )
|
||||
|
||||
STATIC FUNCTION IsValidHarbourID( cName )
|
||||
LOCAL tmp
|
||||
IF HB_ISFIRSTIDCHAR( Left( cName, 1 ) )
|
||||
@@ -5840,6 +5856,7 @@ STATIC PROCEDURE ShowHelp( hbmk, lLong )
|
||||
{ "-instpath=<path>" , I_( "copy target to <path>. if <path> is a directory, it should end with path separator. can be specified multiple times" ) },;
|
||||
{ "-nohbc" , I_( "do not process .hbc files in current directory" ) },;
|
||||
{ "-stop" , I_( "stop without doing anything" ) },;
|
||||
{ "-echo=<text>" , I_( "echo text on screen" ) },;
|
||||
NIL,;
|
||||
{ "-bldf[-]" , I_( "inherit all/no (default) flags from Harbour build" ) },;
|
||||
{ "-bldf=[p][c][l]" , I_( "inherit .prg/.c/linker flags (or none) from Harbour build" ) },;
|
||||
|
||||
Reference in New Issue
Block a user