2008-08-05 08:50 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
* harbour-ce-spec
* harbour-w32-spec
* harbour.spec
* common.mak
* make_b32.mak
* make_gcc.mak
* make_vc.mak
* make_vcce.mak
* make_tgz.sh
* debian/rules
- doc/man/hbdot.1
* doc/man/hbrun.1
- utils/hbdot
* utils/hbrun/Makefile
* utils/hbrun/hbrun.prg
- utils/hbrun/external.prg
* Replaced hbrun functionality with hbdot's.
- Removed separate hbdot tool.
* contrib/hbsqlit3/sqlite3/sqlite3.c
* contrib/hbsqlit3/make_vc.bat
! Fixed bug in foreign code (sqlite3.c) to compile in
MSVC C++ mode. (HANDLE -> HMODULE)
* C++ mode is no longer forced in non-GNU MSVC builds,
this way also avoiding a screen warning.
* contrib/examples/dbu/bld_b32.bat
* contrib/examples/dbu/bld_vc.bat
! Fixed to call 'patch' with '-N' so that it doesn't
ask to reverse patches when run multiple times.
+ utils/hbdoc/bld_b32.bat
+ utils/hbdoc/bld_vc.bat
+ Added non-GNU make batch files to build hbmake.
; This is a step towards detaching hbdoc from core.
* utils/hbdoc/hbdocdef.ch
! Fixed equality operators to be SET EXACT independent.
; Minor formatting.
This commit is contained in:
@@ -8,6 +8,47 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-08-05 08:50 UTC+0200 Viktor Szakats (harbour.01 syenar hu)
|
||||
* harbour-ce-spec
|
||||
* harbour-w32-spec
|
||||
* harbour.spec
|
||||
* common.mak
|
||||
* make_b32.mak
|
||||
* make_gcc.mak
|
||||
* make_vc.mak
|
||||
* make_vcce.mak
|
||||
* make_tgz.sh
|
||||
* debian/rules
|
||||
- doc/man/hbdot.1
|
||||
* doc/man/hbrun.1
|
||||
- utils/hbdot
|
||||
* utils/hbrun/Makefile
|
||||
* utils/hbrun/hbrun.prg
|
||||
- utils/hbrun/external.prg
|
||||
* Replaced hbrun functionality with hbdot's.
|
||||
- Removed separate hbdot tool.
|
||||
|
||||
* contrib/hbsqlit3/sqlite3/sqlite3.c
|
||||
* contrib/hbsqlit3/make_vc.bat
|
||||
! Fixed bug in foreign code (sqlite3.c) to compile in
|
||||
MSVC C++ mode. (HANDLE -> HMODULE)
|
||||
* C++ mode is no longer forced in non-GNU MSVC builds,
|
||||
this way also avoiding a screen warning.
|
||||
|
||||
* contrib/examples/dbu/bld_b32.bat
|
||||
* contrib/examples/dbu/bld_vc.bat
|
||||
! Fixed to call 'patch' with '-N' so that it doesn't
|
||||
ask to reverse patches when run multiple times.
|
||||
|
||||
+ utils/hbdoc/bld_b32.bat
|
||||
+ utils/hbdoc/bld_vc.bat
|
||||
+ Added non-GNU make batch files to build hbmake.
|
||||
; This is a step towards detaching hbdoc from core.
|
||||
|
||||
* utils/hbdoc/hbdocdef.ch
|
||||
! Fixed equality operators to be SET EXACT independent.
|
||||
; Minor formatting.
|
||||
|
||||
2008-08-05 02:43 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/utils/hbdot/hbdot.prg
|
||||
* removed holder class for HRB modules - it's not longer necessary
|
||||
|
||||
@@ -141,7 +141,6 @@ GTSLN_DIR = source\rtl\gtsln
|
||||
GTXWC_DIR = source\rtl\gtxwc
|
||||
|
||||
HBRUN_DIR = utils\hbrun
|
||||
HBDOT_DIR = utils\hbdot
|
||||
HBTEST_DIR = utils\hbtest
|
||||
HBDOC_DIR = utils\hbdoc
|
||||
HBMAKE_DIR = utils\hbmake
|
||||
@@ -186,7 +185,6 @@ $(GTXWC_DIR)\
|
||||
|
||||
ALL_EXE_SRC_DIRS_TMP=\
|
||||
$(HBRUN_DIR);\
|
||||
$(HBDOT_DIR);\
|
||||
$(HBTEST_DIR);\
|
||||
$(HBDOC_DIR);\
|
||||
$(HBMAKE_DIR)\
|
||||
@@ -246,7 +244,6 @@ HARBOUR_EXE = $(BIN_DIR)\harbour$(EXEEXT)
|
||||
# to generate pptable.c
|
||||
HBPP_EXE = $(BIN_DIR)\hbpp$(EXEEXT)
|
||||
HBRUN_EXE = $(BIN_DIR)\hbrun$(EXEEXT)
|
||||
HBDOT_EXE = $(BIN_DIR)\hbdot$(EXEEXT)
|
||||
HBTEST_EXE = $(BIN_DIR)\hbtest$(EXEEXT)
|
||||
HBDOC_EXE = $(BIN_DIR)\hbdoc$(EXEEXT)
|
||||
HBMAKE_EXE = $(BIN_DIR)\hbmake$(EXEEXT)
|
||||
@@ -1036,12 +1033,6 @@ HBPP_EXE_OBJS = \
|
||||
|
||||
HBRUN_EXE_OBJS = \
|
||||
$(OBJ_DIR)\hbrun$(OBJEXT) \
|
||||
$(OBJ_DIR)\external$(OBJEXT) \
|
||||
|
||||
#**********************************************************
|
||||
|
||||
HBDOT_EXE_OBJS = \
|
||||
$(OBJ_DIR)\hbdot$(OBJEXT) \
|
||||
|
||||
#**********************************************************
|
||||
|
||||
@@ -1190,7 +1181,6 @@ HB_BUILD_TARGETS = \
|
||||
$(HB_GT_LIBS) \
|
||||
\
|
||||
$(HBRUN_EXE) \
|
||||
$(HBDOT_EXE) \
|
||||
$(HBTEST_EXE) \
|
||||
$(HBDOC_EXE) \
|
||||
$(HBMAKE_EXE) \
|
||||
|
||||
@@ -19,7 +19,7 @@ goto EXIT
|
||||
|
||||
:DIR_OK_LOCAL
|
||||
|
||||
if exist hb_dbu.dif patch -i hb_dbu.dif
|
||||
if exist hb_dbu.dif patch -N -i hb_dbu.dif
|
||||
|
||||
:DIR_OK
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ goto EXIT
|
||||
|
||||
:DIR_OK_LOCAL
|
||||
|
||||
if exist hb_dbu.dif patch -i hb_dbu.dif
|
||||
if exist hb_dbu.dif patch -N -i hb_dbu.dif
|
||||
|
||||
:DIR_OK
|
||||
|
||||
|
||||
@@ -3,7 +3,4 @@ rem
|
||||
rem $Id$
|
||||
rem
|
||||
|
||||
rem ; sqlite won't compile in C++ mode.
|
||||
set CFLAGS=-TC
|
||||
|
||||
call ..\mtpl_vc.bat %1 %2 %3 %4 %5 %6 %7 %8 %9
|
||||
|
||||
@@ -23308,16 +23308,16 @@ void *winDlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol){
|
||||
(void) pVfs;
|
||||
#if OS_WINCE
|
||||
/* The GetProcAddressA() routine is only available on wince. */
|
||||
return GetProcAddressA((HANDLE)pHandle, zSymbol);
|
||||
return GetProcAddressA((HMODULE)pHandle, zSymbol);
|
||||
#else
|
||||
/* All other windows platforms expect GetProcAddress() to take
|
||||
** an Ansi string regardless of the _UNICODE setting */
|
||||
return GetProcAddress((HANDLE)pHandle, zSymbol);
|
||||
return GetProcAddress((HMODULE)pHandle, zSymbol);
|
||||
#endif
|
||||
}
|
||||
void winDlClose(sqlite3_vfs *pVfs, void *pHandle){
|
||||
(void) pVfs;
|
||||
FreeLibrary((HANDLE)pHandle);
|
||||
FreeLibrary((HMODULE)pHandle);
|
||||
}
|
||||
#else /* if SQLITE_OMIT_LOAD_EXTENSION is defined: */
|
||||
#define winDlOpen 0
|
||||
@@ -87153,3 +87153,4 @@ SQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(
|
||||
#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
|
||||
|
||||
/************** End of fts3_tokenizer1.c *************************************/
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ binary-arch: build install
|
||||
dh_installdocs
|
||||
dh_installexamples
|
||||
# dh_install
|
||||
dh_installman doc/man/harbour.1 doc/man/hbdoc.1 doc/man/hbmake.1 doc/man/hbpp.1 doc/man/hbrun.1 doc/man/hbdot.1 doc/man/hbtest.1
|
||||
dh_installman doc/man/harbour.1 doc/man/hbdoc.1 doc/man/hbmake.1 doc/man/hbpp.1 doc/man/hbrun.1 doc/man/hbtest.1
|
||||
dh_link
|
||||
dh_strip
|
||||
dh_compress
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
.TH HBDOT 1
|
||||
|
||||
.SH NAME
|
||||
hbdot \- "DOt Prompt" Console for the Harbour Language
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBhbdot\fP \fB[<file[.prg|.hrb]>\fP \fB[<parameters,...>]]\fP
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBhbdot\fP is "DOt Prompt" console for the Harbour Language.
|
||||
It can work as interpreter when run without parameters
|
||||
or can execute xBase/Clipper source code in .prg file or compiled
|
||||
Harbour Portable Objects (.hrb) given as first parameter.
|
||||
Type of file is recognized by extension used with \fB<file>\fP
|
||||
parameter. If not given then .hrb is used.
|
||||
|
||||
.PP
|
||||
\fBhbdot\fP can be also used to execute .prg files as scripts
|
||||
It's enough to add in the first line of .prg file:
|
||||
.PP
|
||||
\fB#!/usr/bin/hbdot\fP
|
||||
.PP
|
||||
and set executable attribute.
|
||||
|
||||
.SH OPTIONS
|
||||
.IP "\fB-h, -?, --help\fP" 10
|
||||
When given as first parameter display help
|
||||
.PP
|
||||
This program has no other options. \fB<parameters,...>\fP are passed to
|
||||
startup function in executed code coming from \fB<file[.prg|.hrb]>\fP.
|
||||
|
||||
.SH AUTHOR
|
||||
|
||||
Przemyslaw Czerpak, The Harbour Project (http://www.harbour-project.org)
|
||||
@@ -1,17 +1,19 @@
|
||||
.TH HBRUN 1
|
||||
|
||||
.SH NAME
|
||||
hbrun \- Harbour Project Runner
|
||||
hbrun \- "DOt Prompt" Console / runner for the Harbour Language
|
||||
|
||||
.SH SYNOPSIS
|
||||
\fBhbrun\fP \fB<file[.hrb|.prg]>\fP \fB[<parameters,...>]\fP
|
||||
\fBhbrun\fP \fB[<file[.prg|.hrb]>\fP \fB[<parameters,...>]]\fP
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBhbrun\fP is the Harbour Project runner which can execute
|
||||
xBase/Clipper source code in .prg files or compiled Harbour
|
||||
Portable Objects - .hrb files. Type of file is recognized by
|
||||
extension used with \fB<file>\fP parameter. If not given
|
||||
then .hrb is used.
|
||||
\fBhbrun\fP is "DOt Prompt" console for the Harbour Language.
|
||||
It can work as interpreter when run without parameters
|
||||
or can execute xBase/Clipper source code in .prg file or compiled
|
||||
Harbour Portable Objects (.hrb) given as first parameter.
|
||||
Type of file is recognized by extension used with \fB<file>\fP
|
||||
parameter. If not given then .hrb is used.
|
||||
|
||||
.PP
|
||||
\fBhbrun\fP can be also used to execute .prg files as scripts
|
||||
It's enough to add in the first line of .prg file:
|
||||
@@ -21,12 +23,12 @@ It's enough to add in the first line of .prg file:
|
||||
and set executable attribute.
|
||||
|
||||
.SH OPTIONS
|
||||
This program has no options. \fB<parameters,...>\fP are passed to
|
||||
startup function in executed code.
|
||||
.IP "\fB-h, -?, --help\fP" 10
|
||||
When given as first parameter display help
|
||||
.PP
|
||||
This program has no other options. \fB<parameters,...>\fP are passed to
|
||||
startup function in executed code coming from \fB<file[.prg|.hrb]>\fP.
|
||||
|
||||
.SH AUTHOR
|
||||
|
||||
Author of hbrun: The Harbour Project (http://www.harbour-project.org)
|
||||
|
||||
This manual page was written by Luis Mayoral <mayoral@linuxadicto.org>,
|
||||
for the Debian GNU/Linux system (but may be used by others).
|
||||
Przemyslaw Czerpak, The Harbour Project (http://www.harbour-project.org)
|
||||
|
||||
@@ -173,7 +173,7 @@ make -r -i install
|
||||
${CCPREFIX}strip --strip-debug $HB_LIB_INSTALL/*
|
||||
|
||||
# remove unused files
|
||||
rm -fR ${HB_BIN_INSTALL}/{harbour,hbpp,hbdoc,hbdot,hbmake,hbrun,hbtest}.exe
|
||||
rm -fR ${HB_BIN_INSTALL}/{harbour,hbpp,hbdoc,hbmake,hbrun,hbtest}.exe
|
||||
|
||||
# Create a README file for people using this RPM.
|
||||
cat > doc/%{readme} <<EOF
|
||||
|
||||
@@ -173,7 +173,7 @@ make -r -i install
|
||||
${CCPREFIX}strip --strip-debug $HB_LIB_INSTALL/*
|
||||
|
||||
# remove unused files
|
||||
rm -fR ${HB_BIN_INSTALL}/{harbour,hbpp,hbdoc,hbdot,hbmake,hbrun,hbtest}.exe
|
||||
rm -fR ${HB_BIN_INSTALL}/{harbour,hbpp,hbdoc,hbmake,hbrun,hbtest}.exe
|
||||
|
||||
# Create a README file for people using this RPM.
|
||||
cat > doc/%{readme} <<EOF
|
||||
|
||||
@@ -409,7 +409,7 @@ then
|
||||
export L_USR="${CC_L_USR} -L${HB_LIB_INSTALL} -l%{name} -lncurses %{!?_without_gtsln:-lslang} %{!?_without_gpm:-lgpm} %{!?_without_x11:-L/usr/X11R6/%{_lib} -lX11}"
|
||||
export PRG_USR="\"-D_DEFAULT_INC_DIR='${_DEFAULT_INC_DIR}'\" ${PRG_USR}"
|
||||
|
||||
for utl in hbmake hbrun hbdot hbdoc
|
||||
for utl in hbmake hbrun hbdoc
|
||||
do
|
||||
pushd utils/${utl}
|
||||
rm -fR "./${HB_ARCHITECTURE}/${HB_COMPILER}"
|
||||
@@ -582,7 +582,6 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_bindir}/%{hb_pref}mk
|
||||
#%{_bindir}/hbtest
|
||||
%{_bindir}/hbrun
|
||||
%{_bindir}/hbdot
|
||||
%{_bindir}/hbmake
|
||||
%{_mandir}/man1/*.1*
|
||||
%dir %{_includedir}/%{name}
|
||||
@@ -669,6 +668,10 @@ rm -rf $RPM_BUILD_ROOT
|
||||
######################################################################
|
||||
|
||||
%changelog
|
||||
* Thu Aug 05 2008 Viktor Szakats (harbour.01 syenar hu)
|
||||
- removed hbdot, hbverfix, hbpptest
|
||||
- hbrun now fully replaces hbdot.
|
||||
|
||||
* Thu Aug 23 2007 Przemyslaw Czerpak <druzus@priv.onet.pl>
|
||||
+ added hbdot
|
||||
- removed PP package
|
||||
|
||||
@@ -481,19 +481,6 @@ $(**: = ^
|
||||
$(STANDARD_STATIC_HBLIBS)
|
||||
!
|
||||
#**********************************************************
|
||||
# HBDOT build rule
|
||||
#**********************************************************
|
||||
$(HBDOT_EXE) :: BasicLibs BasicExes StdLibs
|
||||
$(HBDOT_EXE) :: $(HBDOT_EXE_OBJS)
|
||||
IF EXIST "$(HBDOT_EXE)" $(DEL) "$(HBDOT_EXE)" > NUL
|
||||
$(CC) @&&!
|
||||
$(CFLAGS)
|
||||
-e$(HBDOT_EXE)
|
||||
$(**: = ^
|
||||
)
|
||||
$(STANDARD_STATIC_HBLIBS)
|
||||
!
|
||||
#**********************************************************
|
||||
# HBTEST build rule
|
||||
#**********************************************************
|
||||
$(HBTEST_EXE) :: BasicLibs BasicExes StdLibs
|
||||
|
||||
@@ -417,10 +417,6 @@ $(HBRUN_EXE) :: $(StdLibs)
|
||||
$(HBRUN_EXE) :: $(HBRUN_EXE_OBJS)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
||||
#**********************************************************
|
||||
$(HBDOT_EXE) :: $(StdLibs)
|
||||
$(HBDOT_EXE) :: $(HBDOT_EXE_OBJS)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
||||
#**********************************************************
|
||||
$(HBTEST_EXE) :: $(StdLibs)
|
||||
$(HBTEST_EXE) :: $(HBTEST_EXE_OBJS)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
|
||||
|
||||
@@ -276,7 +276,7 @@ then
|
||||
export L_USR="-L${HB_LIB_INSTALL} -l${name} ${ADD_LIBS} ${L_USR}"
|
||||
export PRG_USR="\"-D_DEFAULT_INC_DIR='${_DEFAULT_INC_DIR}'\" ${PRG_USR}"
|
||||
|
||||
for utl in hbmake hbrun hbdot hbdoc hbtest
|
||||
for utl in hbmake hbrun hbdoc hbtest
|
||||
do
|
||||
(cd "utils/${utl}"
|
||||
rm -fR "./${HB_ARCHITECTURE}/${HB_COMPILER}"
|
||||
|
||||
@@ -263,9 +263,6 @@ LDFLAGSDLL = /DEBUG $(LDFLAGSDLL)
|
||||
{$(HBRUN_DIR)}.c{$(OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
{$(HBDOT_DIR)}.c{$(OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
{$(HBTEST_DIR)}.c{$(OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
@@ -387,10 +384,6 @@ LDFLAGSDLL = /DEBUG $(LDFLAGSDLL)
|
||||
$(HB) $(HARBOURFLAGS) -o$(OBJ_DIR)\ $<
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $(OBJ_DIR)\$(*B).c
|
||||
#*******************************************************
|
||||
{$(HBDOT_DIR)}.prg{$(OBJ_DIR)}$(OBJEXT):
|
||||
$(HB) $(HARBOURFLAGS) -o$(OBJ_DIR)\ $<
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $(OBJ_DIR)\$(*B).c
|
||||
#*******************************************************
|
||||
{$(HBTEST_DIR)}.prg{$(OBJ_DIR)}$(OBJEXT):
|
||||
$(HB) $(HARBOURFLAGS) -o$(OBJ_DIR)\ $<
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $(OBJ_DIR)\$(*B).c
|
||||
@@ -499,9 +492,6 @@ LDFLAGSDLL = /DEBUG $(LDFLAGSDLL)
|
||||
{$(HBRUN_DIR)}.c{$(DLL_OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
{$(HBDOT_DIR)}.c{$(DLL_OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
{$(HBTEST_DIR)}.c{$(DLL_OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
@@ -628,10 +618,6 @@ LDFLAGSDLL = /DEBUG $(LDFLAGSDLL)
|
||||
$(HB) $(HARBOURFLAGS) -o$(DLL_OBJ_DIR)\ $<
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $(DLL_OBJ_DIR)\$(*B).c
|
||||
#*******************************************************
|
||||
{$(HBDOT_DIR)}.prg{$(DLL_OBJ_DIR)}$(OBJEXT):
|
||||
$(HB) $(HARBOURFLAGS) -o$(DLL_OBJ_DIR)\ $<
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $(DLL_OBJ_DIR)\$(*B).c
|
||||
#*******************************************************
|
||||
{$(HBTEST_DIR)}.prg{$(DLL_OBJ_DIR)}$(OBJEXT):
|
||||
$(HB) $(HARBOURFLAGS) -o$(DLL_OBJ_DIR)\ $<
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $(DLL_OBJ_DIR)\$(*B).c
|
||||
@@ -790,19 +776,6 @@ $(STANDARD_STATIC_HBLIBS)
|
||||
user32.lib winspool.lib wsock32.lib advapi32.lib
|
||||
<<$(HB_KEEPSTATE)
|
||||
#**********************************************************
|
||||
# HBDOT build rule
|
||||
#**********************************************************
|
||||
$(HBDOT_EXE) : $(HBDOT_EXE_OBJS)
|
||||
IF EXIST "$(HBDOT_EXE)" $(DEL) "$(HBDOT_EXE)" > nul
|
||||
$(LINKER) @<<
|
||||
$(LDFLAGS)
|
||||
/OUT:$(HBDOT_EXE)
|
||||
$(**: = ^
|
||||
)
|
||||
$(STANDARD_STATIC_HBLIBS)
|
||||
user32.lib winspool.lib wsock32.lib advapi32.lib
|
||||
<<$(HB_KEEPSTATE)
|
||||
#**********************************************************
|
||||
# HBTEST build rule
|
||||
#**********************************************************
|
||||
$(HBTEST_EXE) : $(HBTEST_EXE_OBJS)
|
||||
|
||||
@@ -289,9 +289,6 @@ LDFLAGSDLL = /DEBUG $(LDFLAGSDLL)
|
||||
{$(HBRUN_DIR)}.c{$(OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
{$(HBDOT_DIR)}.c{$(OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
{$(HBTEST_DIR)}.c{$(OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
@@ -413,10 +410,6 @@ LDFLAGSDLL = /DEBUG $(LDFLAGSDLL)
|
||||
$(HB) $(HARBOURFLAGS) -o$(OBJ_DIR)\ $<
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $(OBJ_DIR)\$(*B).c
|
||||
#*******************************************************
|
||||
{$(HBDOT_DIR)}.prg{$(OBJ_DIR)}$(OBJEXT):
|
||||
$(HB) $(HARBOURFLAGS) -o$(OBJ_DIR)\ $<
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $(OBJ_DIR)\$(*B).c
|
||||
#*******************************************************
|
||||
{$(HBTEST_DIR)}.prg{$(OBJ_DIR)}$(OBJEXT):
|
||||
$(HB) $(HARBOURFLAGS) -o$(OBJ_DIR)\ $<
|
||||
$(CC) $(CLIBFLAGS) -Fo$(OBJ_DIR)\ $(OBJ_DIR)\$(*B).c
|
||||
@@ -525,9 +518,6 @@ LDFLAGSDLL = /DEBUG $(LDFLAGSDLL)
|
||||
{$(HBRUN_DIR)}.c{$(DLL_OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
{$(HBDOT_DIR)}.c{$(DLL_OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
{$(HBTEST_DIR)}.c{$(DLL_OBJ_DIR)}$(OBJEXT)::
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $<
|
||||
#*******************************************************
|
||||
@@ -654,10 +644,6 @@ LDFLAGSDLL = /DEBUG $(LDFLAGSDLL)
|
||||
$(HB) $(HARBOURFLAGS) -o$(DLL_OBJ_DIR)\ $<
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $(DLL_OBJ_DIR)\$(*B).c
|
||||
#*******************************************************
|
||||
{$(HBDOT_DIR)}.prg{$(DLL_OBJ_DIR)}$(OBJEXT):
|
||||
$(HB) $(HARBOURFLAGS) -o$(DLL_OBJ_DIR)\ $<
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $(DLL_OBJ_DIR)\$(*B).c
|
||||
#*******************************************************
|
||||
{$(HBTEST_DIR)}.prg{$(DLL_OBJ_DIR)}$(OBJEXT):
|
||||
$(HB) $(HARBOURFLAGS) -o$(DLL_OBJ_DIR)\ $<
|
||||
$(CC) $(CEXEFLAGSDLL) -Fo$(DLL_OBJ_DIR)\ $(DLL_OBJ_DIR)\$(*B).c
|
||||
@@ -818,19 +804,6 @@ $(STANDARD_STATIC_HBLIBS)
|
||||
coredll.lib corelibc.lib winsock.lib ws2.lib
|
||||
<<$(HB_KEEPSTATE)
|
||||
#**********************************************************
|
||||
# HBDOT build rule
|
||||
#**********************************************************
|
||||
$(HBDOT_EXE) : $(HBDOT_EXE_OBJS)
|
||||
IF EXIST "$(HBDOT_EXE)" $(DEL) "$(HBDOT_EXE)" > nul
|
||||
$(LINKER) @<<
|
||||
$(LDFLAGS)
|
||||
/OUT:$(HBDOT_EXE)
|
||||
$(**: = ^
|
||||
)
|
||||
$(STANDARD_STATIC_HBLIBS)
|
||||
coredll.lib corelibc.lib winsock.lib ws2.lib
|
||||
<<$(HB_KEEPSTATE)
|
||||
#**********************************************************
|
||||
# HBTEST build rule
|
||||
#**********************************************************
|
||||
$(HBTEST_EXE) : $(HBTEST_EXE_OBJS)
|
||||
|
||||
65
harbour/utils/hbdoc/bld_b32.bat
Normal file
65
harbour/utils/hbdoc/bld_b32.bat
Normal file
@@ -0,0 +1,65 @@
|
||||
@echo off
|
||||
rem
|
||||
rem $Id$
|
||||
rem
|
||||
|
||||
..\..\bin\harbour /n hbdoc /i..\..\include
|
||||
..\..\bin\harbour /n fclass1 /i..\..\include
|
||||
..\..\bin\harbour /n ffile1 /i..\..\include
|
||||
..\..\bin\harbour /n ft_funcs /i..\..\include
|
||||
..\..\bin\harbour /n genasc /i..\..\include
|
||||
..\..\bin\harbour /n genchm /i..\..\include
|
||||
..\..\bin\harbour /n genhpc /i..\..\include
|
||||
..\..\bin\harbour /n genhtm /i..\..\include
|
||||
..\..\bin\harbour /n genng /i..\..\include
|
||||
..\..\bin\harbour /n genos2 /i..\..\include
|
||||
..\..\bin\harbour /n genpdf1 /i..\..\include
|
||||
..\..\bin\harbour /n genrtf /i..\..\include
|
||||
..\..\bin\harbour /n gentrf /i..\..\include
|
||||
..\..\bin\harbour /n html /i..\..\include
|
||||
..\..\bin\harbour /n ng /i..\..\include
|
||||
..\..\bin\harbour /n os2 /i..\..\include
|
||||
..\..\bin\harbour /n rtf /i..\..\include
|
||||
..\..\bin\harbour /n teeasc /i..\..\include
|
||||
..\..\bin\harbour /n troff /i..\..\include
|
||||
|
||||
echo -O2 -I..\..\include -L..\..\lib > build.tmp
|
||||
|
||||
echo -ehbdoc.exe >> build.tmp
|
||||
|
||||
echo hbdoc.c >> build.tmp
|
||||
echo fclass1.c >> build.tmp
|
||||
echo ffile1.c >> build.tmp
|
||||
echo ft_funcs.c >> build.tmp
|
||||
echo genasc.c >> build.tmp
|
||||
echo genchm.c >> build.tmp
|
||||
echo genhpc.c >> build.tmp
|
||||
echo genhtm.c >> build.tmp
|
||||
echo genng.c >> build.tmp
|
||||
echo genos2.c >> build.tmp
|
||||
echo genpdf1.c >> build.tmp
|
||||
echo genrtf.c >> build.tmp
|
||||
echo gentrf.c >> build.tmp
|
||||
echo html.c >> build.tmp
|
||||
echo ng.c >> build.tmp
|
||||
echo os2.c >> build.tmp
|
||||
echo rtf.c >> build.tmp
|
||||
echo teeasc.c >> build.tmp
|
||||
echo troff.c >> build.tmp
|
||||
|
||||
echo hbdebug.lib >> build.tmp
|
||||
echo hbvm.lib >> build.tmp
|
||||
echo hbrtl.lib >> build.tmp
|
||||
echo gtwin.lib >> build.tmp
|
||||
echo hblang.lib >> build.tmp
|
||||
echo hbrdd.lib >> build.tmp
|
||||
echo hbmacro.lib >> build.tmp
|
||||
echo hbpp.lib >> build.tmp
|
||||
echo rddntx.lib >> build.tmp
|
||||
echo rddcdx.lib >> build.tmp
|
||||
echo rddfpt.lib >> build.tmp
|
||||
echo hbsix.lib >> build.tmp
|
||||
echo hbcommon.lib >> build.tmp
|
||||
|
||||
bcc32 @build.tmp
|
||||
del build.tmp
|
||||
26
harbour/utils/hbdoc/bld_vc.bat
Normal file
26
harbour/utils/hbdoc/bld_vc.bat
Normal file
@@ -0,0 +1,26 @@
|
||||
@echo off
|
||||
rem
|
||||
rem $Id$
|
||||
rem
|
||||
|
||||
..\..\bin\harbour /n hbdoc /i..\..\include
|
||||
..\..\bin\harbour /n fclass1 /i..\..\include
|
||||
..\..\bin\harbour /n ffile1 /i..\..\include
|
||||
..\..\bin\harbour /n ft_funcs /i..\..\include
|
||||
..\..\bin\harbour /n genasc /i..\..\include
|
||||
..\..\bin\harbour /n genchm /i..\..\include
|
||||
..\..\bin\harbour /n genhpc /i..\..\include
|
||||
..\..\bin\harbour /n genhtm /i..\..\include
|
||||
..\..\bin\harbour /n genng /i..\..\include
|
||||
..\..\bin\harbour /n genos2 /i..\..\include
|
||||
..\..\bin\harbour /n genpdf1 /i..\..\include
|
||||
..\..\bin\harbour /n genrtf /i..\..\include
|
||||
..\..\bin\harbour /n gentrf /i..\..\include
|
||||
..\..\bin\harbour /n html /i..\..\include
|
||||
..\..\bin\harbour /n ng /i..\..\include
|
||||
..\..\bin\harbour /n os2 /i..\..\include
|
||||
..\..\bin\harbour /n rtf /i..\..\include
|
||||
..\..\bin\harbour /n teeasc /i..\..\include
|
||||
..\..\bin\harbour /n troff /i..\..\include
|
||||
|
||||
cl -D_CRT_SECURE_NO_DEPRECATE -nologo -O2 -TP -W3 -I..\..\include hbdoc.c fclass1.c ffile1.c ft_funcs.c genasc.c genchm.c genhpc.c genhtm.c genng.c genos2.c genpdf1.c genrtf.c gentrf.c html.c ng.c os2.c rtf.c teeasc.c troff.c /link /subsystem:CONSOLE /LIBPATH:..\..\lib hbcpage.lib hbdebug.lib hbvm.lib hbrtl.lib gtwin.lib hblang.lib hbrdd.lib hbmacro.lib hbpp.lib rddntx.lib rddcdx.lib rddfpt.lib hbsix.lib hbcommon.lib hbpcre.lib hbzlib.lib user32.lib winspool.lib
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Header file common definition of HBDOc
|
||||
* Header file common definition of hbdoc
|
||||
*
|
||||
* Copyright 2000 Luiz Rafael Culik <culik@sl.conex.net>
|
||||
* www - http://www.harbour-project.org
|
||||
@@ -49,6 +49,7 @@
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _HBDOCDEF_CH_
|
||||
#define _HBDOCDEF_CH_
|
||||
|
||||
@@ -90,10 +91,13 @@
|
||||
|
||||
|
||||
#xcommand IF <var> IS <type> => if valtype(<var>) = <type>
|
||||
#xcommand IF <var> IS NOT <type> => if valtype(<var>) != <type>
|
||||
#xcommand IF <var> IS NOT <type> => if !( valtype(<var>) == <type> )
|
||||
#xcommand IF <ele> IS IN <array> => if !(len( <array> ) \< <ele> )
|
||||
#xcommand IF <ele> IS NOT IN <array> => if len( <array> ) \< <ele>
|
||||
#xtranslate (<var> IS <type> ) => ( valtype(<var>) = <type> )
|
||||
#xtranslate (<var> IS NOT <type>) => ( valtype(<var>) != <type> )
|
||||
|
||||
#xtranslate (<var> IS <type> ) => ( valtype(<var>) == <type> )
|
||||
#xtranslate (<var> IS NOT <type>) => ( !( valtype(<var>) == <type> ) )
|
||||
|
||||
#define pBUFFER_LENGTH 4096
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ifeq ($(HB_MAIN),)
|
||||
HB_MAIN = std
|
||||
endif
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
PRG_SOURCES=\
|
||||
hbdot.prg \
|
||||
|
||||
PRG_MAIN=hbdot.prg
|
||||
|
||||
LIBS=\
|
||||
hbdebug \
|
||||
hbvm \
|
||||
hbrtl \
|
||||
hblang \
|
||||
hbcpage \
|
||||
hbrdd \
|
||||
hbrtl \
|
||||
hbvm \
|
||||
hbmacro \
|
||||
hbpp \
|
||||
hbcplr \
|
||||
hbcommon \
|
||||
|
||||
ifeq ($(findstring -DHB_PCRE_REGEX, $(C_USR)),)
|
||||
ifeq ($(findstring -DHB_POSIX_REGEX, $(C_USR)),)
|
||||
LIBS += hbpcre
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(findstring -DHB_EXT_ZLIB, $(C_USR)),)
|
||||
LIBS += hbzlib
|
||||
endif
|
||||
|
||||
include $(TOP)$(ROOT)config/bin.cf
|
||||
@@ -1,306 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* "DOt Prompt" Console for the Harbour Language
|
||||
*
|
||||
* Copyright 2007 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
|
||||
* 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 "inkey.ch"
|
||||
#include "setcurs.ch"
|
||||
#include "hbextern.ch"
|
||||
|
||||
#define HB_HISTORY_LEN 32
|
||||
#define HB_LINE_LEN 256
|
||||
#define HB_PROMPT "."
|
||||
|
||||
STATIC s_nRow := 2, s_nCol := 0
|
||||
STATIC s_aIncDir := {}
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
PROCEDURE _APPMAIN( cFile, ... )
|
||||
LOCAL GetList
|
||||
LOCAL cLine, cCommand, cPath, cExt
|
||||
LOCAL nMaxRow, nMaxCol
|
||||
LOCAL aHistory, nHistIndex
|
||||
LOCAL bKeyUP, bKeyDown, bKeyIns
|
||||
|
||||
#ifdef _DEFAULT_INC_DIR
|
||||
AADD( s_aIncDir, "-I" + _DEFAULT_INC_DIR )
|
||||
#endif
|
||||
cPath := getenv( "HB_INC_INSTALL" )
|
||||
IF !EMPTY( cPath )
|
||||
AADD( s_aIncDir, "-I" + cPath )
|
||||
ENDIF
|
||||
#ifdef __PLATFORM__UNIX
|
||||
AADD( s_aIncDir, "-I/usr/include/harbour" )
|
||||
AADD( s_aIncDir, "-I/usr/local/include/harbour" )
|
||||
#endif
|
||||
|
||||
IF PCount() > 0
|
||||
SWITCH lower( cFile )
|
||||
CASE "-?"
|
||||
CASE "-h"
|
||||
CASE "--help"
|
||||
CASE "/?"
|
||||
CASE "/h"
|
||||
HB_DotUsage()
|
||||
EXIT
|
||||
OTHERWISE
|
||||
hb_FNameSplit( cFile, NIL, NIL, @cExt )
|
||||
IF Lower( cExt ) == ".prg"
|
||||
cFile := HB_COMPILEBUF( HB_ARGV( 0 ), "-n", "-w", "-es2", "-q0", ;
|
||||
s_aIncDir, cFile )
|
||||
IF cFile == NIL
|
||||
ERRORLEVEL( 1 )
|
||||
ELSE
|
||||
__hrbRun( cFile, ... )
|
||||
ENDIF
|
||||
ELSE
|
||||
__hrbRun( cFile, ... )
|
||||
ENDIF
|
||||
ENDSWITCH
|
||||
ELSE
|
||||
|
||||
CLEAR SCREEN
|
||||
SET SCOREBOARD OFF
|
||||
GetList := {}
|
||||
cCommand := ""
|
||||
aHistory := { padr( "quit", HB_LINE_LEN ) }
|
||||
nHistIndex := 2
|
||||
|
||||
DO WHILE .T.
|
||||
|
||||
IF cLine == NIL
|
||||
cLine := Space( HB_LINE_LEN )
|
||||
ENDIF
|
||||
|
||||
HB_DotInfo( cCommand )
|
||||
|
||||
nMaxRow := MaxRow()
|
||||
nMaxCol := MaxCol()
|
||||
@ nMaxRow, 0 SAY HB_PROMPT
|
||||
@ nMaxRow, Col() GET cLine ;
|
||||
PICTURE "@KS" + LTrim( Str( nMaxCol - Col() + 1 ) )
|
||||
|
||||
SetCursor( IIF( ReadInsert(), SC_INSERT, SC_NORMAL ) )
|
||||
|
||||
bKeyIns := SetKey( K_INS, ;
|
||||
{|| SetCursor( IIF( ReadInsert( !ReadInsert() ), ;
|
||||
SC_NORMAL, SC_INSERT ) ) } )
|
||||
bKeyUp := SetKey( K_UP, ;
|
||||
{|| IIF( nHistIndex > 1, ;
|
||||
cLine := aHistory[ --nHistIndex ], ) } )
|
||||
bKeyDown := SetKey( K_DOWN, ;
|
||||
{|| cLine := IIF( nHistIndex < LEN( aHistory ), ;
|
||||
aHistory[ ++nHistIndex ], ;
|
||||
( nHistIndex := LEN( aHistory ) + 1, Space( HB_LINE_LEN ) ) ) } )
|
||||
|
||||
READ
|
||||
|
||||
SetKey( K_DOWN, bKeyDown )
|
||||
SetKey( K_UP, bKeyUp )
|
||||
SetKey( K_INS, bKeyIns )
|
||||
|
||||
IF LastKey() == K_ESC .OR. EMPTY( cLine )
|
||||
cLine := NIL
|
||||
IF nMaxRow != MaxRow() .OR. nMaxCol != MaxCol()
|
||||
@ nMaxRow, 0 CLEAR
|
||||
ENDIF
|
||||
LOOP
|
||||
ENDIF
|
||||
|
||||
IF EMPTY( aHistory ) .OR. ! ATAIL( aHistory ) == cLine
|
||||
IF LEN( aHistory ) < HB_HISTORY_LEN
|
||||
AADD( aHistory, cLine )
|
||||
ELSE
|
||||
ADEL( aHistory, 1 )
|
||||
aHistory[ LEN( aHistory ) ] := cLine
|
||||
ENDIF
|
||||
ENDIF
|
||||
nHistIndex := LEN( aHistory ) + 1
|
||||
|
||||
cCommand := AllTrim( cLine, " " )
|
||||
cLine := NIL
|
||||
@ nMaxRow, 0 CLEAR
|
||||
HB_DotInfo( cCommand )
|
||||
|
||||
HB_DotExec( cCommand )
|
||||
|
||||
IF s_nRow >= MaxRow()
|
||||
Scroll( 2, 0, MaxRow(), MaxCol(), 1 )
|
||||
s_nRow := MaxRow() - 1
|
||||
ENDIF
|
||||
|
||||
ENDDO
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
STATIC PROCEDURE HB_DotUsage()
|
||||
|
||||
OutStd( 'Harbour "DOt Prompt" Console' + HB_OSNewLine() +;
|
||||
'Copyright 1999-2008, Przemyslaw Czerpak' + HB_OSNewLine() + ;
|
||||
'http://www.harbour-project.org' + HB_OSNewLine() +;
|
||||
HB_OSNewLine() +;
|
||||
'Syntax: hbdot [<hrbfile[.prg|.hrb]> [<parameters,...>]]' + HB_OSNewLine() + ;
|
||||
HB_OSNewLine() +;
|
||||
"Note: Linked with " + Version() + HB_OSNewLine() )
|
||||
|
||||
RETURN
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
STATIC PROCEDURE HB_DotInfo( cCommand )
|
||||
|
||||
LOCAL r := Row(), c := Col()
|
||||
|
||||
IF cCommand != NIL
|
||||
DispOutAt( 0, 0, "PP: " )
|
||||
DispOutAt( 0, 4, PadR( cCommand, MaxCol() - 3 ), "N/R" )
|
||||
ENDIF
|
||||
IF Used()
|
||||
DispOutAt( 1, 0, ;
|
||||
PadR( "RDD: " + PadR( RddName(), 6 ) + ;
|
||||
" | Area:" + Str( Select(), 3 ) + ;
|
||||
" | Dbf: " + PadR( Alias(), 10 ) + ;
|
||||
" | Index: " + PadR( OrdName( IndexOrd() ), 8 ) + ;
|
||||
" | # " + Str( RecNo(), 7 ) + "/" + Str( RecCount(), 7 ), ;
|
||||
MaxCol() + 1 ), "N/BG" )
|
||||
ELSE
|
||||
DispOutAt( 1, 0, ;
|
||||
PadR( "RDD: " + Space( 6 ) + ;
|
||||
" | Area:" + Space( 3 ) + ;
|
||||
" | Dbf: " + Space( 10 ) + ;
|
||||
" | Index: " + Space( 8 ) + ;
|
||||
" | # " + Space( 7 ) + "/" + Space( 7 ), ;
|
||||
MaxCol() + 1 ), "N/BG" )
|
||||
ENDIF
|
||||
SetPos( r, c )
|
||||
|
||||
RETURN
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
STATIC PROCEDURE HB_DotErr( oErr, cCommand )
|
||||
|
||||
LOCAL xArg, cMessage
|
||||
|
||||
cMessage := "Sorry, could not execute:;;" + cCommand + ";;"
|
||||
IF oErr:ClassName == "ERROR"
|
||||
cMessage += oErr:Description
|
||||
IF ValType( oErr:Args ) == 'A' .AND. Len( oErr:Args ) > 0
|
||||
cMessage += ";Arguments:"
|
||||
FOR EACH xArg IN oErr:Args
|
||||
cMessage += ";" + HB_CStr( xArg )
|
||||
NEXT
|
||||
ENDIF
|
||||
ELSEIF ValType( oErr ) == 'C'
|
||||
cMessage += oErr
|
||||
ENDIF
|
||||
cMessage += ";;" + ProcName( 2 ) + '(' + LTrim( Str( ProcLine( 2 ) ) ) + ')'
|
||||
|
||||
Alert( cMessage )
|
||||
|
||||
BREAK( oErr )
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
STATIC PROCEDURE HB_DotExec( cCommand )
|
||||
LOCAL pHRB, cHRB, cFunc, bBlock, cEol
|
||||
|
||||
cEol := hb_osNewLine()
|
||||
cFunc := "STATIC FUNC __HBDOT()" + cEol + ;
|
||||
"RETURN {||" + cEol + ;
|
||||
" " + cCommand + cEol + ;
|
||||
" RETURN __MVSETBASE()" + cEol + ;
|
||||
"}" + cEol
|
||||
|
||||
BEGIN SEQUENCE WITH {|oErr| HB_DotErr( oErr, cCommand ) }
|
||||
|
||||
cHRB := HB_COMPILEFROMBUF( cFunc, HB_ARGV( 0 ), "-n", "-q2", s_aIncDir )
|
||||
IF cHRB == NIL
|
||||
EVAL( ErrorBlock(), "Syntax error." )
|
||||
ELSE
|
||||
pHRB := __hrbLoad( cHRB )
|
||||
IF pHrb != NIL
|
||||
bBlock := __hrbDo( pHRB )
|
||||
DevPos( s_nRow, s_nCol )
|
||||
Eval( bBlock )
|
||||
s_nRow := Row()
|
||||
s_nCol := Col()
|
||||
IF s_nRow < 2
|
||||
s_nRow := 2
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
ENDSEQUENCE
|
||||
|
||||
__MVSETBASE()
|
||||
|
||||
RETURN
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
/* request for full screen GT driver */
|
||||
#if defined( __PLATFORM__WINCE )
|
||||
REQUEST HB_GT_WVT_DEFAULT
|
||||
#elif defined( __PLATFORM__WINDOWS )
|
||||
REQUEST HB_GT_WIN_DEFAULT
|
||||
#elif defined( __PLATFORM__UNIX )
|
||||
REQUEST HB_GT_TRM_DEFAULT
|
||||
#elif defined( __PLATFORM__DOS )
|
||||
REQUEST HB_GT_DOS_DEFAULT
|
||||
#elif defined( __PLATFORM__OS2 )
|
||||
REQUEST HB_GT_OS2_DEFAULT
|
||||
#endif
|
||||
|
||||
/* ********************************************************************** */
|
||||
@@ -10,7 +10,6 @@ ROOT = ../../
|
||||
|
||||
PRG_SOURCES=\
|
||||
hbrun.prg \
|
||||
external.prg \
|
||||
|
||||
PRG_MAIN=hbrun.prg
|
||||
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* The declarations for the functions/procedures not part of Harbour.
|
||||
*
|
||||
* Copyright 1999 Ryszard Glab <rglab@imid.med.pl>
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Fill it as needed */
|
||||
|
||||
@@ -4,13 +4,10 @@
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Standalone Harbour Portable Object file runner
|
||||
*
|
||||
* Copyright 1999 Ryszard Glab <rglab@imid.med.pl>
|
||||
* www - http://www.harbour-project.org
|
||||
* "DOt Prompt" Console and .prg/.hrb runner for the Harbour Language
|
||||
*
|
||||
* Copyright 2007 Przemyslaw Czerpak <druzus / at / priv.onet.pl>
|
||||
* added support for dynamic compilation and execution of .prg files
|
||||
* 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
|
||||
@@ -53,61 +50,257 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Please remember that in *nixes if you copy compiled version
|
||||
* of this program to /usr/bin directory then you can add to your
|
||||
* .prg files as first line:
|
||||
* #!/usr/bin/hbrun
|
||||
* and then after setting executable attribute you can directly execute
|
||||
* your .prg files
|
||||
* If you are using Linux then you can also chose default gt driver by
|
||||
* adding to above line: //gt<name>
|
||||
* F.e.
|
||||
* #!/usr/bin/hbrun //gtstd
|
||||
*/
|
||||
|
||||
#include "inkey.ch"
|
||||
#include "setcurs.ch"
|
||||
#include "hbextern.ch"
|
||||
|
||||
/* NOTE: Undocumented CA-Clipper _APPMAIN is used instead of Main to avoid
|
||||
collision with user function in HRB file with that name. [ckedem]
|
||||
*/
|
||||
FUNCTION _APPMAIN( cHRBFile, ... )
|
||||
LOCAL xRetVal, cPath, cName, cExt, cDrive, aIncDir
|
||||
#define HB_HISTORY_LEN 32
|
||||
#define HB_LINE_LEN 256
|
||||
#define HB_PROMPT "."
|
||||
|
||||
IF Empty( cHRBFile )
|
||||
OutStd( "Harbour Runner" + HB_OSNewLine() +;
|
||||
"Copyright 1999-2008, http://www.harbour-project.org" + HB_OSNewLine() +;
|
||||
HB_OSNewLine() +;
|
||||
"Syntax: hbrun <hrbfile[.hrb|.prg]> [parameters]" + HB_OSNewLine() + ;
|
||||
HB_OSNewLine() +;
|
||||
"Note: Linked with " + Version() + HB_OSNewLine() )
|
||||
ERRORLEVEL( 1 )
|
||||
ELSE
|
||||
HB_FNAMESPLIT( cHRBFile, @cPath, @cName, @cExt, @cDrive )
|
||||
STATIC s_nRow := 2, s_nCol := 0
|
||||
STATIC s_aIncDir := {}
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
PROCEDURE _APPMAIN( cFile, ... )
|
||||
LOCAL GetList
|
||||
LOCAL cLine, cCommand, cPath, cExt
|
||||
LOCAL nMaxRow, nMaxCol
|
||||
LOCAL aHistory, nHistIndex
|
||||
LOCAL bKeyUP, bKeyDown, bKeyIns
|
||||
|
||||
IF LOWER( cExt ) == ".prg"
|
||||
aIncDir := {}
|
||||
#ifdef _DEFAULT_INC_DIR
|
||||
AADD( aIncDir, "-I" + _DEFAULT_INC_DIR )
|
||||
AADD( s_aIncDir, "-I" + _DEFAULT_INC_DIR )
|
||||
#endif
|
||||
cPath := getenv( "HB_INC_INSTALL" )
|
||||
IF !EMPTY( cPath )
|
||||
AADD( aIncDir, "-I" + cPath )
|
||||
ENDIF
|
||||
cPath := getenv( "HB_INC_INSTALL" )
|
||||
IF !EMPTY( cPath )
|
||||
AADD( s_aIncDir, "-I" + cPath )
|
||||
ENDIF
|
||||
#ifdef __PLATFORM__UNIX
|
||||
AADD( aIncDir, "-I/usr/include/harbour" )
|
||||
AADD( aIncDir, "-I/usr/local/include/harbour" )
|
||||
AADD( s_aIncDir, "-I/usr/include/harbour" )
|
||||
AADD( s_aIncDir, "-I/usr/local/include/harbour" )
|
||||
#endif
|
||||
cHRBFile := HB_COMPILEBUF( HB_ARGV( 0 ), "-n", "-w", "-es2", "-q0", ;
|
||||
aIncDir, cHRBFile )
|
||||
IF cHRBFile == NIL
|
||||
ERRORLEVEL( 1 )
|
||||
ELSE
|
||||
xRetVal := __hrbRun( cHRBFile, ... )
|
||||
|
||||
IF PCount() > 0
|
||||
SWITCH lower( cFile )
|
||||
CASE "-?"
|
||||
CASE "-h"
|
||||
CASE "--help"
|
||||
CASE "/?"
|
||||
CASE "/h"
|
||||
HB_DotUsage()
|
||||
EXIT
|
||||
OTHERWISE
|
||||
hb_FNameSplit( cFile, NIL, NIL, @cExt )
|
||||
IF Lower( cExt ) == ".prg"
|
||||
cFile := HB_COMPILEBUF( HB_ARGV( 0 ), "-n", "-w", "-es2", "-q0", ;
|
||||
s_aIncDir, cFile )
|
||||
IF cFile == NIL
|
||||
ERRORLEVEL( 1 )
|
||||
ELSE
|
||||
__hrbRun( cFile, ... )
|
||||
ENDIF
|
||||
ELSE
|
||||
__hrbRun( cFile, ... )
|
||||
ENDIF
|
||||
ENDSWITCH
|
||||
ELSE
|
||||
|
||||
CLEAR SCREEN
|
||||
SET SCOREBOARD OFF
|
||||
GetList := {}
|
||||
cCommand := ""
|
||||
aHistory := { padr( "quit", HB_LINE_LEN ) }
|
||||
nHistIndex := 2
|
||||
|
||||
DO WHILE .T.
|
||||
|
||||
IF cLine == NIL
|
||||
cLine := Space( HB_LINE_LEN )
|
||||
ENDIF
|
||||
ELSE
|
||||
xRetVal := __hrbRun( cHRBFile, ... )
|
||||
ENDIF
|
||||
|
||||
HB_DotInfo( cCommand )
|
||||
|
||||
nMaxRow := MaxRow()
|
||||
nMaxCol := MaxCol()
|
||||
@ nMaxRow, 0 SAY HB_PROMPT
|
||||
@ nMaxRow, Col() GET cLine ;
|
||||
PICTURE "@KS" + LTrim( Str( nMaxCol - Col() + 1 ) )
|
||||
|
||||
SetCursor( IIF( ReadInsert(), SC_INSERT, SC_NORMAL ) )
|
||||
|
||||
bKeyIns := SetKey( K_INS, ;
|
||||
{|| SetCursor( IIF( ReadInsert( !ReadInsert() ), ;
|
||||
SC_NORMAL, SC_INSERT ) ) } )
|
||||
bKeyUp := SetKey( K_UP, ;
|
||||
{|| IIF( nHistIndex > 1, ;
|
||||
cLine := aHistory[ --nHistIndex ], ) } )
|
||||
bKeyDown := SetKey( K_DOWN, ;
|
||||
{|| cLine := IIF( nHistIndex < LEN( aHistory ), ;
|
||||
aHistory[ ++nHistIndex ], ;
|
||||
( nHistIndex := LEN( aHistory ) + 1, Space( HB_LINE_LEN ) ) ) } )
|
||||
|
||||
READ
|
||||
|
||||
SetKey( K_DOWN, bKeyDown )
|
||||
SetKey( K_UP, bKeyUp )
|
||||
SetKey( K_INS, bKeyIns )
|
||||
|
||||
IF LastKey() == K_ESC .OR. EMPTY( cLine )
|
||||
cLine := NIL
|
||||
IF nMaxRow != MaxRow() .OR. nMaxCol != MaxCol()
|
||||
@ nMaxRow, 0 CLEAR
|
||||
ENDIF
|
||||
LOOP
|
||||
ENDIF
|
||||
|
||||
IF EMPTY( aHistory ) .OR. ! ATAIL( aHistory ) == cLine
|
||||
IF LEN( aHistory ) < HB_HISTORY_LEN
|
||||
AADD( aHistory, cLine )
|
||||
ELSE
|
||||
ADEL( aHistory, 1 )
|
||||
aHistory[ LEN( aHistory ) ] := cLine
|
||||
ENDIF
|
||||
ENDIF
|
||||
nHistIndex := LEN( aHistory ) + 1
|
||||
|
||||
cCommand := AllTrim( cLine, " " )
|
||||
cLine := NIL
|
||||
@ nMaxRow, 0 CLEAR
|
||||
HB_DotInfo( cCommand )
|
||||
|
||||
HB_DotExec( cCommand )
|
||||
|
||||
IF s_nRow >= MaxRow()
|
||||
Scroll( 2, 0, MaxRow(), MaxCol(), 1 )
|
||||
s_nRow := MaxRow() - 1
|
||||
ENDIF
|
||||
|
||||
ENDDO
|
||||
ENDIF
|
||||
|
||||
RETURN xRetVal
|
||||
RETURN
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
STATIC PROCEDURE HB_DotUsage()
|
||||
|
||||
OutStd( 'Harbour "DOt Prompt" Console / runner' + HB_OSNewLine() +;
|
||||
'Copyright 1999-2008, Przemyslaw Czerpak' + HB_OSNewLine() + ;
|
||||
'http://www.harbour-project.org' + HB_OSNewLine() +;
|
||||
HB_OSNewLine() +;
|
||||
'Syntax: hbrun [<hrbfile[.prg|.hrb]> [<parameters,...>]]' + HB_OSNewLine() + ;
|
||||
HB_OSNewLine() +;
|
||||
"Note: Linked with " + Version() + HB_OSNewLine() )
|
||||
|
||||
RETURN
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
STATIC PROCEDURE HB_DotInfo( cCommand )
|
||||
|
||||
LOCAL r := Row(), c := Col()
|
||||
|
||||
IF cCommand != NIL
|
||||
DispOutAt( 0, 0, "PP: " )
|
||||
DispOutAt( 0, 4, PadR( cCommand, MaxCol() - 3 ), "N/R" )
|
||||
ENDIF
|
||||
IF Used()
|
||||
DispOutAt( 1, 0, ;
|
||||
PadR( "RDD: " + PadR( RddName(), 6 ) + ;
|
||||
" | Area:" + Str( Select(), 3 ) + ;
|
||||
" | Dbf: " + PadR( Alias(), 10 ) + ;
|
||||
" | Index: " + PadR( OrdName( IndexOrd() ), 8 ) + ;
|
||||
" | # " + Str( RecNo(), 7 ) + "/" + Str( RecCount(), 7 ), ;
|
||||
MaxCol() + 1 ), "N/BG" )
|
||||
ELSE
|
||||
DispOutAt( 1, 0, ;
|
||||
PadR( "RDD: " + Space( 6 ) + ;
|
||||
" | Area:" + Space( 3 ) + ;
|
||||
" | Dbf: " + Space( 10 ) + ;
|
||||
" | Index: " + Space( 8 ) + ;
|
||||
" | # " + Space( 7 ) + "/" + Space( 7 ), ;
|
||||
MaxCol() + 1 ), "N/BG" )
|
||||
ENDIF
|
||||
SetPos( r, c )
|
||||
|
||||
RETURN
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
STATIC PROCEDURE HB_DotErr( oErr, cCommand )
|
||||
|
||||
LOCAL xArg, cMessage
|
||||
|
||||
cMessage := "Sorry, could not execute:;;" + cCommand + ";;"
|
||||
IF oErr:ClassName == "ERROR"
|
||||
cMessage += oErr:Description
|
||||
IF ValType( oErr:Args ) == 'A' .AND. Len( oErr:Args ) > 0
|
||||
cMessage += ";Arguments:"
|
||||
FOR EACH xArg IN oErr:Args
|
||||
cMessage += ";" + HB_CStr( xArg )
|
||||
NEXT
|
||||
ENDIF
|
||||
ELSEIF ValType( oErr ) == 'C'
|
||||
cMessage += oErr
|
||||
ENDIF
|
||||
cMessage += ";;" + ProcName( 2 ) + '(' + LTrim( Str( ProcLine( 2 ) ) ) + ')'
|
||||
|
||||
Alert( cMessage )
|
||||
|
||||
BREAK( oErr )
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
STATIC PROCEDURE HB_DotExec( cCommand )
|
||||
LOCAL pHRB, cHRB, cFunc, bBlock, cEol
|
||||
|
||||
cEol := hb_osNewLine()
|
||||
cFunc := "STATIC FUNC __HBDOT()" + cEol + ;
|
||||
"RETURN {||" + cEol + ;
|
||||
" " + cCommand + cEol + ;
|
||||
" RETURN __MVSETBASE()" + cEol + ;
|
||||
"}" + cEol
|
||||
|
||||
BEGIN SEQUENCE WITH {|oErr| HB_DotErr( oErr, cCommand ) }
|
||||
|
||||
cHRB := HB_COMPILEFROMBUF( cFunc, HB_ARGV( 0 ), "-n", "-q2", s_aIncDir )
|
||||
IF cHRB == NIL
|
||||
EVAL( ErrorBlock(), "Syntax error." )
|
||||
ELSE
|
||||
pHRB := __hrbLoad( cHRB )
|
||||
IF pHrb != NIL
|
||||
bBlock := __hrbDo( pHRB )
|
||||
DevPos( s_nRow, s_nCol )
|
||||
Eval( bBlock )
|
||||
s_nRow := Row()
|
||||
s_nCol := Col()
|
||||
IF s_nRow < 2
|
||||
s_nRow := 2
|
||||
ENDIF
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
ENDSEQUENCE
|
||||
|
||||
__MVSETBASE()
|
||||
|
||||
RETURN
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
/* request for full screen GT driver */
|
||||
#if defined( __PLATFORM__WINCE )
|
||||
REQUEST HB_GT_WVT_DEFAULT
|
||||
#elif defined( __PLATFORM__WINDOWS )
|
||||
REQUEST HB_GT_WIN_DEFAULT
|
||||
#elif defined( __PLATFORM__UNIX )
|
||||
REQUEST HB_GT_TRM_DEFAULT
|
||||
#elif defined( __PLATFORM__DOS )
|
||||
REQUEST HB_GT_DOS_DEFAULT
|
||||
#elif defined( __PLATFORM__OS2 )
|
||||
REQUEST HB_GT_OS2_DEFAULT
|
||||
#endif
|
||||
|
||||
/* ********************************************************************** */
|
||||
|
||||
Reference in New Issue
Block a user