See ChangeLog entry 19990714-22:45 EDT David G. Holm <dholm@jsd-llc.com>

This commit is contained in:
David G. Holm
1999-07-15 03:02:47 +00:00
parent 7c09706b5a
commit ed6126f7b8
24 changed files with 409 additions and 148 deletions

View File

@@ -1,3 +1,66 @@
19990714-22:45 EDT David G. Holm <dholm@jsd-llc.com>
* config/dos/djgpp.cf
* Modified to support new HB_*_COMPILE variables
* config/dos/global.cf
- Removed initialization of old HB_*_DIR variables
* config/dos/watcom.cf
* Modified to support new HB_*_COMPILE variables
+ config/os2/dir.cf
+ New GNU Make System module for OS/2
+ config/os2/gcc.cf
+ New GNU Make System module for GCC for OS/2
+ config/os2/global.cf
+ New GNU Make System module for OS/2
+ config/os2/icc.cf
+ New GNU Make System module for IBM Visual Age C++ for OS/2
+ config/os2/install.cf
+ New GNU Make System module for OS/2
* doc/gmake.txt
+ Added documentation for os2/gcc and os2/icc
* Changed names of installation variables to HB_*_INSTALL
* Changed NOTES section to reflect new 2-step process for a clean build
* include/hbsetup.h
+ Added documentation of new #define for HARBOUR_GCC_OS2, which is used
by config/os2/gcc.cf in order to ensure that the GCC build of Harbour
for OS/2 gets created as OS_DOS_COMPATIBLE and not OS_UNIX_COMPATIBLE
+ Added platform #defines for the GT API for use by the GNU Make System
* include/set.h
- Removed obsolete global variable hb_set_fixed and declaration for
obsolete HB_SETFIXED()
* source/compiler/harbour.y
+ Added #ifdef guard for GCC around generated #pragma startup directive
(like the #ifdef guard that was added to the runtime source modules)
! Display entire command line option when reporting invalid options
(like Clipper, instead of leaving off the option switch character)
* source/hbpp/hbpp.c
+ Added grouping parentheses as a safeguard around the one use of the
isname() macro parameter that didn't already have a grouping
! The use of 'exit(1);' requires that stdlib be included for all compilers
* source/hbpp/table.c
! Changed all _SET_<name> constants to match Harbour instead of Clipper
* source/rtl/Makefile
+ Added new gtxxx.c module
* source/rtl/environ.c
+ Added OS() support for GCC when using OS/2, because OS/2 uses 'version'
as the version indicator and uses 'release' as a revision indicator
* source/rtl/files.c
+ Only use S_IRUSR and S_IWUSR flags when creating a read/write file,
per correction supplied by Dave Pearson
+ source/rtl/gtxxx.c
+ Added new module to allow the GNU Make system to build the GT API
* source/rtl/set.c
+ Added #include <sys/types.h> for GCC, per warning generated by GCC for
OS/2 when sys/types.h was not included
- Removed obsolete global variable hb_set_fixed
* source/rtl/strings.c
! Replaced use of obsolete hb_set_fixed with hb_set.HB_SET_FIXED
* tests/working/codebloc.prg
! Corrected the spelling of 'Trying'
* tests/working/procline.prg
! Corrected the expected ProcLine() line numbers
* tests/working/testcgi.prg
! Initialize cRes variable to "" to get rid of run time error on line 280
Wed Jul 14 20:02:55 1999 Gonzalo A. Diethelm <Gonzalo.Diethelm@jda.cl>
* config/bin.cf:

View File

@@ -12,15 +12,15 @@ LIB_EXT = .a
CC = gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -I. -I$(HB_INC_DIR)
CPPFLAGS = -I. -I$(HB_INC_COMPILE)
CFLAGS = -Wall
LD = gcc
LD_OUT = -o
ifeq ($(HB_LIB_DIR),)
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS = $(foreach lib, $(LIBS), -L$(TOP)$(ROOT)source/$(lib)/$(ARCH))
else
LINKPATHS = -L$(HB_LIB_DIR)
LINKPATHS = -L$(HB_LIB_COMPILE)
endif
LINKLIBS = $(foreach lib, $(LIBS), -l$(lib))
# LINKLIBS += -lm

View File

@@ -12,16 +12,6 @@ ARCH_DIR = $(subst \,/,$(ARCH))
ARCH_DOS = $(subst /,\,$(ARCH))
MK := $(subst \,/,$(subst \~,~,$(MAKE)))
ifeq ($(HB_INC_DIR),)
HB_INC_DIR = $(TOP)$(ROOT)include
endif
ifeq ($(HB_LIB_DIR),)
HB_LIB_DIR = $(TOP)$(ROOT)libs
endif
ifeq ($(HB_BIN_DIR),)
HB_BIN_DIR = $(TOP)$(ROOT)bin
endif
ifeq ($(COMSPEC),) #location of command.com
COMSPEC := command.com
else
@@ -35,15 +25,15 @@ MV = move
MD = md
dirbase::
-$(MD) $(HB_ARCHITECTURE) >NUL
-$(MD) $(ARCH_DOS) >NUL
-if not exist $(HB_ARCHITECTURE) $(MD) $(HB_ARCHITECTURE)
-if not exist $(ARCH_DOS) $(MD) $(ARCH_DOS)
clean::
-echo Y | $(RM) $(ARCH_DOS)\*.*
-$(RM) *.bak
-$(RM) *.obj
-$(RM) core
-$(RM) *.o
-$(RD) $(ARCH_DOS)
-$(RD) $(HB_ARCHITECTURE)
-if exist *.bak $(RM) *.bak
-if exist *.obj $(RM) *.obj
-if exist core $(RM) core
-if exist *.o $(RM) *.o
-if exist $(ARCH_DOS) $(RD) $(ARCH_DOS)
-if exist $(HB_ARCHITECTURE) $(RD) $(HB_ARCHITECTURE)
endif

View File

@@ -17,7 +17,7 @@ CC = wpp386
CC_IN =
CC_OUT = -fo=
CPPFLAGS = -d2 -w2 -5r -zq -zt0 -bt=DOS4G
CFLAGS := -i$(subst \,\\,$(WATCOM))\\h -i$(subst /,\\,$(HB_INC_DIR)) -i.
CFLAGS := -i$(subst \,\\,$(WATCOM))\\h -i$(subst /,\\,$(HB_INC_COMPILE)) -i.
# Note: The empty line directly before 'endef' HAVE TO exist!
# It causes that the 'echo' command is separated by LF
@@ -36,7 +36,11 @@ endef
LD = wlink
LDFLAGS = debug all OP osn=DOS4G OP stack=65536
LINKLIBS := LIBP $(subst /,\,$(HB_LIB_DIR)) $(foreach lib, $(LIBS), LIB $(lib))
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS = $(foreach lib, $(LIBS), LIB $(subst /,\,$(TOP)$(ROOT)source/$(lib)/$(ARCH)/$(lib)))
else
LINKLIBS := LIBP $(subst /,\,$(HB_LIB_COMPILE)) $(foreach lib, $(LIBS), LIB $(lib))
endif
LD_RULE = $(link_exe_file)
#Note: The empty line below HAVE TO exist!

25
harbour/config/os2/dir.cf Normal file
View File

@@ -0,0 +1,25 @@
#
# $Id$
#
ifeq ($(SHLVL),) # An OS/2 command shell
ifeq ($(DIRS),) # Empty directory list
DIR_RULE =\
@echo Done
else
DIR_LIST = $(subst /,\,$(DIRS))
DIR_RULE =\
CMD.EXE /c FOR %%d IN ($(DIR_LIST)) DO $(MK) -C %%d $@
endif
else # bash
DIR_RULE =\
@for d in $(DIRS); do \
if [ -d $$d ]; then \
$(MAKE) -C $$d $@; \
fi \
done
endif # ! Windows

33
harbour/config/os2/gcc.cf Normal file
View File

@@ -0,0 +1,33 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .o
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .a
CC = gcc
CC_IN = -c
CC_OUT = -o
CPPFLAGS = -DDEBUG -I. -I$(HB_INC_COMPILE) -DHARBOUR_GCC_OS2
CFLAGS = -Wall -g
LD = gcc
LD_OUT = -o $(SPACE)
ifeq ($(HB_LIB_COMPILE),)
LINKPATHS = $(foreach lib, $(LIBS), -L$(TOP)$(ROOT)source/$(lib)/$(ARCH))
else
LINKPATHS = -L$(HB_LIB_COMPILE)
endif
LINKLIBS = $(foreach lib, $(LIBS), -l$(lib))
# LINKLIBS += -lm
LDFLAGS = $(LINKPATHS)
AR = ar
ARFLAGS =
AR_RULE = $(AR) $(ARFLAGS) r $@ $^ || $(RM) $@
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -0,0 +1,46 @@
#
# $Id$
#
all : first
ifeq ($(SHLVL),) # An OS/2 command shell
ARCH_DIR = $(ARCH)
OS2_ARCH_DIR = $(subst /,\,$(ARCH)\)
MK = $(subst /,\,$(subst \~,~,$(MAKE)))
RM = del /n
RD = rmdir
CP = copy
MV = move
MD = md
dirbase::
-CMD.EXE /c IF NOT EXIST $(HB_ARCHITECTURE) $(MD) $(HB_ARCHITECTURE)
-CMD.EXE /c IF NOT EXIST $(OS2_ARCH_DIR) $(MD) $(OS2_ARCH_DIR)
clean::
-CMD.EXE /c IF EXIST $(OS2_ARCH_DIR)\*.* $(RM) $(OS2_ARCH_DIR)\*.*
-CMD.EXE /c IF EXIST $(OS2_ARCH_DIR) $(RD) $(OS2_ARCH_DIR)
else # bash
ARCH_DIR = $(ARCH)/
MK = $(MAKE)
RM = rm -f
RD = rm -f -r
CP = cp -f
MV = mv -f
MD = mkdir
dirbase::
@[ -d $(HB_ARCHITECTURE) ] || $(MD) $(HB_ARCHITECTURE); \
[ -d $(ARCH) ] || $(MD) $(ARCH)
clean::
-$(RD) $(ARCH_DIR)
endif

32
harbour/config/os2/icc.cf Normal file
View File

@@ -0,0 +1,32 @@
#
# $Id$
#
include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf
OBJ_EXT = .obj
EXE_EXT = .exe
LIB_PREF =
LIB_EXT = .lib
CC = icc
CC_IN = /C+ /Tp
CC_OUT = /Fo
CPPFLAGS = /I$(GRANDP) /I$(HB_INC_COMPILE) /DHARBOUR_USE_GTAPI /DHARBOUR_USE_OS2_GTAPI
CFLAGS = /W2 /Se /Sd+ /Ti+
LD = icc
LD_OUT = /Fe
LDFLAGS = /C-
ifeq ($(HB_LIB_COMPILE),)
LINKLIBS = $(foreach lib, $(LIBS), $(TOP)$(ROOT)source/$(lib)/$(ARCH)/$(lib)$(LIB_EXT))
else
LINKLIBS = $(foreach lib, $(LIBS), $(lib)$(LIB_EXT))
endif
AR = ilib
ARFLAGS =
AROBJS = $(foreach file, $^, -+$(file))
AR_RULE = $(AR) $(ARFLAGS) $@ $(AROBJS),,
include $(TOP)$(ROOT)config/rules.cf

View File

@@ -0,0 +1,31 @@
#
# $Id$
#
ifeq ($(SHLVL),) # An OS/2 command shell
INSTALL_LIST = $(subst /,\,$(INSTALL_OBJS))
OS2_INSTALL_DIR = $(subst /,\,$(INSTALL_DIR))
INSTALL_RULE =\
CMD.EXE /c FOR %%f IN ($(INSTALL_LIST)) DO COPY %%f $(OS2_INSTALL_DIR)
else # bash
INSTALL_RULE =\
@if [ ! -d $(INSTALL_DIR) ]; \
then \
echo "! Can't install, path not found:" $(INSTALL_DIR); \
else \
for i in $(INSTALL_OBJS); \
do \
if [ -r $$i ]; \
then \
echo "! Installing $$i on $(INSTALL_DIR)"; \
$(CP) $$i $(INSTALL_DIR); \
else \
echo "! Can't install $$i, not found"; \
fi \
done \
fi
endif

View File

@@ -135,12 +135,10 @@ Then, you must set a couple of environment variables that indicate
your architecture and compiler.
For gcc on Win95/WinNT:
HB_ARCHITECTURE win32
HB_COMPILER gcc
For MSVC on Win95/WinNT:
HB_ARCHITECTURE win32
HB_COMPILER msvc
@@ -148,6 +146,17 @@ For GCC on Linux:
HB_ARCHITECTURE linux
HB_COMPILER gcc
For GCC on OS/2:
Note: You must point C_INCLUDE_PATH to the EMX include directory and
you must also point LIBRARY_PATH to the EMX library directory.
HB_ARCHITECTURE os2
HB_COMPILER gcc
For IBM Visual Age C++ on OS/2:
Note: You must create an empty unistd.h in the IBMCPP\INCLUDE directory.
HB_ARCHITECTURE os2
HB_COMPILER icc
For DJGPP (GCC port for DOS)
HB_ARCHITECTURE dos
HB_COMPILER djgpp
@@ -164,9 +173,9 @@ For Watcom C/C++ 10.x (default Makefile creates DOS4G extender executables)
If you issue a "make install", it will try to install your header,
executable and library files into directories given by
HB_BIN_DIR
HB_LIB_DIR
HB_INC_DIR
HB_BIN_INSTALL
HB_LIB_INSTALL
HB_INC_INSTALL
You can set those as environment variables too.
@@ -177,24 +186,21 @@ The most used targets are these:
* clean: Clean up everything made by make.
* install: Install stuff into the appropriate directory.
* install: Install stuff into the appropriate directories.
NOTES
=====
In order to get a clean build after making source changes or after
receiving updated source files, you must use the following three steps:
receiving updated source files, you must use the following two steps:
1) make -r clean
2) make -r install
3) make -r
Without the first step, changes to the Harbour compiler will not be
reflected in any object modules created from Harbour source code.
Without the first step, changes to the Harbour compiler and/or various
include files will not be reflected in any object modules created from
Harbour source code.
Without the second step, you can't build the Harbour compiler, because
it requires that the HBPP library be installed.
The third step is optional if all you want is an updated Harbour compiler,
because what it does is rebuild the working test programs (which won't
happen if you omit the first step).
The -r option isn't strictly necessary, but it does signficantly reduce
the number of rules that make has to evaluate otherwise, which may give
a big performance boost on a slow system.

View File

@@ -3,7 +3,7 @@
*/
/*
Harbour Project source code
Harbour compiler and runtime configuration file
Copyright 1999 Ryszard Glab
@@ -54,6 +54,13 @@
*/
/*#define HARBOUR_STRICT_ANSI_C */
/* ***********************************************************************
* This symbol defines if we are trying to compile using GCC for OS/2
*
* By default it is disabled (symbol is not defined)
*/
/*#define HARBOUR_GCC_OS2*/
/* ***********************************************************************
* The name of starting procedure
* Note: You have to define it in case when Harbour cannot find the proper
@@ -66,7 +73,7 @@
* By default we are using automatic lookup (symbol not defined)
*/
#if defined(__WATCOMC__) || defined(__GNUC__)
#if !defined(__DJGPP__)
#if !defined(__DJGPP__) && !defined(HARBOUR_GCC_OS2)
#define HARBOUR_START_PROCEDURE "MAIN"
#endif
#endif
@@ -96,18 +103,22 @@
/*#define HARBOUR_STRICT_CLIPPER_COMPATIBILITY*/
/* ***********************************************************************
* This symbol defines if we want to use the GT API
* These symbols defines if we want to use the GT API (and which platform
* to build the GT API for, if using the GNU Make System).
*
* By default it is disabled (symbol is not defined)
* By default they are disabled (symbols are not defined)
*/
/*#define HARBOUR_USE_GTAPI*/
/*#define HARBOUR_USE_DOS_GTAPI*/
/*#define HARBOUR_USE_OS2_GTAPI*/
/*#define HARBOUR_USE_WIN_GTAPI*/
/* ***********************************************************************
* Operating system specific definitions
*/
#ifdef __GNUC__
/* The GNU C compiler is used */
#ifdef __DJGPP__
#if defined(__DJGPP__) || defined(HARBOUR_GCC_OS2)
/* The DJGPP port of GNU C is used - for DOS platform */
#define OS_PATH_LIST_SEPARATOR ';'
#define OS_PATH_DELIMITER '\\'

View File

@@ -29,6 +29,10 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
their web site at http://www.gnu.org/).
V 1.14 David G. Holm Removed the obsolete hb_set_fixed
and HB_SETFIXED(), which I should
have done when I took HB_SETFIXED()
out of source/rtl/set.c in V 1.27.
V 1.13 David G. Holm Added my email address.
V 1.12 David G. Holm Added copyright and license header,
along with a complete version history.
@@ -58,7 +62,6 @@
HARBOUR HB_SET (void);
HARBOUR HB_SETCENTURY (void);
HARBOUR HB_SETFIXED (void);
void hb_setInitialize (void);
void hb_setRelease (void);
@@ -170,7 +173,6 @@ typedef struct
extern HB_set_struct hb_set;
extern BOOL hb_set_century;
extern BOOL hb_set_fixed;
extern int hb_set_althan;
extern int hb_set_extrahan;
extern int hb_set_printhan;

View File

@@ -1312,7 +1312,7 @@ int harbour_main( int argc, char * argv[] )
default:
printf( "Invalid command line option: %s\n",
&argv[ iArg ][ 1 ] );
&argv[ iArg ][ 0 ] );
break;
}
}
@@ -2139,7 +2139,7 @@ void GenCCode( char *szFileName, char *szName ) /* generates the C languag
}
/* fprintf( yyc, " };\n\n" ); */
fprintf( yyc, "\nHB_INIT_SYMBOLS_END( %s__InitSymbols );\n", symbols.pFirst->szName );
fprintf( yyc, "#pragma startup %s__InitSymbols\n\n", symbols.pFirst->szName );
fprintf( yyc, "#if ! defined(__GNUC__)\n#pragma startup %s__InitSymbols\n#endif\n", symbols.pFirst->szName );
/* Generate functions data
*/

View File

@@ -24,9 +24,9 @@
their web site at http://www.gnu.org/).
*/
#include <stdlib.h>
#if defined(__GNUC__)
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#else
#if (defined(_MSC_VER) || defined(__IBMCPP__))
@@ -87,7 +87,7 @@ int NextName ( char**, char*, char**);
int Include( char *, PATHNAMES *, FILE** );
int OpenInclude( char *, PATHNAMES *, FILE** );
#define isname(c) (isalnum(c) || c=='_' || (c) > 0x7e)
#define isname(c) (isalnum(c) || (c)=='_' || (c) > 0x7e)
#define SKIPTABSPACES(sptr) while ( *sptr == ' ' || *sptr == '\t' ) (sptr)++
#define MAX_NAME 255
#define BUFF_SIZE 8192

View File

@@ -46,45 +46,45 @@ int koldef = 42;
DEFINES aDefines[] =
{
{"__HARBOUR__",NULL,0,"" },
{"_SET_EXACT",NULL,0,"1" },
{"_SET_FIXED",NULL,0,"2" },
{"_SET_DECIMALS",NULL,0,"3"},
{"_SET_DATEFORMAT",NULL,0,"4"},
{"_SET_EPOCH",NULL,0,"5"},
{"_SET_PATH",NULL,0,"6"},
{"_SET_DEFAULT",NULL,0,"7"},
{"_SET_EXCLUSIVE",NULL,0,"8"},
{"_SET_SOFTSEEK",NULL,0,"9"},
{"_SET_UNIQUE",NULL,0,"10"},
{"_SET_DELETED",NULL,0,"11"},
{"_SET_CANCEL",NULL,0,"12"},
{"_SET_DEBUG",NULL,0,"13"},
{"_SET_TYPEAHEAD",NULL,0,"14"},
{"_SET_COLOR",NULL,0,"15"},
{"_SET_CURSOR",NULL,0,"16"},
{"_SET_CONSOLE",NULL,0,"17"},
{"_SET_ALTERNATE",NULL,0,"18"},
{"_SET_ALTFILE",NULL,0,"19"},
{"_SET_DEVICE",NULL,0,"20"},
{"_SET_EXTRA",NULL,0,"21"},
{"_SET_EXTRAFILE",NULL,0,"22"},
{"_SET_PRINTER",NULL,0,"23"},
{"_SET_PRINTFILE",NULL,0,"24"},
{"_SET_MARGIN",NULL,0,"25"},
{"_SET_BELL",NULL,0,"26"},
{"_SET_CONFIRM",NULL,0,"27"},
{"_SET_ESCAPE",NULL,0,"28"},
{"_SET_INSERT",NULL,0,"29"},
{"_SET_EXIT",NULL,0,"30"},
{"_SET_INTENSITY",NULL,0,"31"},
{"_SET_SCOREBOARD",NULL,0,"32"},
{"_SET_DELIMITERS",NULL,0,"33"},
{"_SET_DELIMCHARS",NULL,0,"34"},
{"_SET_WRAP",NULL,0,"35"},
{"_SET_MESSAGE",NULL,0,"36"},
{"_SET_MCENTER",NULL,0,"37"},
{"_SET_SCROLLBREAK",NULL,0,"38"},
{"_SET_COUNT",NULL,0,"38"},
{"_SET_ALTERNATE",NULL,0,"1"},
{"_SET_ALTFILE",NULL,0,"2"},
{"_SET_BELL",NULL,0,"3"},
{"_SET_CANCEL",NULL,0,"4"},
{"_SET_COLOR",NULL,0,"5"},
{"_SET_CONFIRM",NULL,0,"6"},
{"_SET_CONSOLE",NULL,0,"7"},
{"_SET_CURSOR",NULL,0,"8"},
{"_SET_DATEFORMAT",NULL,0,"9"},
{"_SET_DEBUG",NULL,0,"10"},
{"_SET_DECIMALS",NULL,0,"11"},
{"_SET_DEFAULT",NULL,0,"12"},
{"_SET_DELETED",NULL,0,"13"},
{"_SET_DELIMCHARS",NULL,0,"14"},
{"_SET_DELIMITERS",NULL,0,"15"},
{"_SET_DEVICE",NULL,0,"16"},
{"_SET_EPOCH",NULL,0,"17"},
{"_SET_ESCAPE",NULL,0,"18"},
{"_SET_EVENTMASK",NULL,0,"19"},
{"_SET_EXACT",NULL,0,"20"},
{"_SET_EXCLUSIVE",NULL,0,"21"},
{"_SET_EXIT",NULL,0,"22"},
{"_SET_EXTRA",NULL,0,"23"},
{"_SET_EXTRAFILE",NULL,0,"24"},
{"_SET_FIXED",NULL,0,"25"},
{"_SET_INSERT",NULL,0,"26"},
{"_SET_INTENSITY",NULL,0,"27"},
{"_SET_MARGIN",NULL,0,"28"},
{"_SET_MCENTER",NULL,0,"29"},
{"_SET_MESSAGE",NULL,0,"30"},
{"_SET_PATH",NULL,0,"31"},
{"_SET_PRINTER",NULL,0,"32"},
{"_SET_PRINTFILE",NULL,0,"33"},
{"_SET_SCOREBOARD",NULL,0,"34"},
{"_SET_SCROLLBREAK",NULL,0,"35"},
{"_SET_SOFTSEEK",NULL,0,"36"},
{"_SET_TYPEAHEAD",NULL,0,"37"},
{"_SET_UNIQUE",NULL,0,"38"},
{"_SET_WRAP",NULL,0,"39"},
{"_SET_CH",NULL,0,NULL},
{"_DFSET","x,y",2,"Set( _SET_DATEFORMAT, if(__SetCentury(), x, y) )"}
};

View File

@@ -5,38 +5,39 @@
ROOT = ../../
C_SOURCES=\
arrays.c \
classes.c \
codebloc.c \
console.c \
copyfile.c \
dates.c \
descend.c \
dir.c \
environ.c \
errorapi.c \
extend.c \
files.c \
gtapi.c \
hardcr.c \
itemapi.c \
math.c \
memvars.c \
mtran.c \
set.c \
strcmp.c \
strings.c \
transfrm.c \
\
msgxxx.c \
arrays.c \
classes.c \
codebloc.c \
console.c \
copyfile.c \
dates.c \
descend.c \
dir.c \
environ.c \
errorapi.c \
extend.c \
files.c \
gtapi.c \
hardcr.c \
itemapi.c \
math.c \
memvars.c \
mtran.c \
set.c \
strcmp.c \
strings.c \
transfrm.c \
\
gtxxx.c \
msgxxx.c \
PRG_SOURCES=\
asort.prg \
devoutp.prg \
error.prg \
errorsys.prg \
objfunc.prg \
tclass.prg \
asort.prg \
devoutp.prg \
error.prg \
errorsys.prg \
objfunc.prg \
tclass.prg \
LIB=rtl

View File

@@ -84,12 +84,11 @@ HARBOUR HB_OS(void)
uname( &un );
sprintf( version, "%s %s", un.sysname, un.release );
/* DAP: Currently, OS() is coded with the expection that the operating
system plays the major/minor version number game. Not all operating
systems work like that. So, we do a little bit of mucking around
because we've managed to work out version[] on our own. */
#if defined(HARBOUR_GCC_OS2)
sprintf( version, "%s %s", un.sysname, un.version );
#else
sprintf( version, "%s %s", un.sysname, un.release );
#endif
hb_os = "";
hb_osmajor = -2;

View File

@@ -214,7 +214,7 @@ static void convert_create_flags( int flags, int *result_flags, unsigned *result
/* by default FC_NORMAL is set */
*result_flags = O_BINARY | O_CREAT | O_TRUNC | O_RDWR;
*result_pmode = S_IRWXU;
*result_pmode = S_IRUSR | S_IWUSR;
if( flags & FC_READONLY )
*result_pmode = S_IRUSR;

View File

@@ -0,0 +1,16 @@
/*
* $Id$
*/
#if defined(HARBOUR_USE_GTAPI)
#if defined(HARBOUR_USE_DOS_GTAPI)
#include "gt/gtdos.c"
#elif defined(HARBOUR_USE_OS2_GTAPI)
#include "gt/gtos2.c"
#elif defined(HARBOUR_USE_WIN_GTAPI)
#include "gt/gtwin.c"
#else
#error The GT API platform was not specified via HARBOUR_USE_<platform>_GT
#error See include/hbsetup.h for details
#endif
#endif

View File

@@ -29,6 +29,10 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
their web site at http://www.gnu.org/).
V 1.43 David G. Holm Removed the obsolete hb_set_fixed,
which I should have done when I took
HB_SETFIXED() out in V 1.27.
V 1.42 Ryszard Glab Added guard around #pragma startup.
V 1.41 David G. Holm Added my email address.
V 1.40 David G. Holm Added header template and filled in
complete version history by cross-
@@ -137,6 +141,7 @@
#if defined(__GNUC__)
#include <unistd.h>
#include <sys/types.h>
#if defined(__DJGPP__)
#include <io.h>
#endif
@@ -160,7 +165,6 @@
HB_set_struct hb_set;
BOOL hb_set_century;
BOOL hb_set_fixed;
int hb_set_althan;
int hb_set_extrahan;
int hb_set_printhan;
@@ -873,7 +877,6 @@ HARBOUR HB_SET (void)
void hb_setInitialize (void)
{
hb_set_century = FALSE;
hb_set_fixed = FALSE;
hb_set_althan = -1;
hb_set_extrahan = -1;
hb_set_printhan = -1;

View File

@@ -1143,7 +1143,7 @@ char * hb_str( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec )
iWidth = 20;
if( iDec > 9 )
iDec = 9;
if( hb_set_fixed )
if( hb_set.HB_SET_FIXED )
iDec = hb_set.HB_SET_DECIMALS;
if( pWidth )

View File

@@ -23,7 +23,7 @@ function Main()
d ="with access to local variables"
a ={ |b,c| OutStd( "I am a second codeblock " +d +b +;
IIF(c==NIL, ' empty second parameter ', c)), OutStd(crlf), "WITH return value" }
IIF(c==NIL, ' empty second parameter ', c)), OutStd(crlf), "WITH return value" }
EVAL( a, ", codeblock parameters" )
OutStd( crlf )
@@ -54,16 +54,16 @@ function Main()
yy :=5
x :={|xx| OutStd(LTRIM(STR(xx))), OutStd("+"), OutStd(LTRIM(STR(yy))), OutStd("="), xx + yy }
OutStd( EVAL( x, 1 ) ) //this is OK
OutStd( EVAL( x, 1 ) ) //this is OK
OutStd( CRLF )
OutStd( EVAL( x, 1, 2 ) ) //this should ignore unnecesary parameters
OutStd( EVAL( x, 1, 2 ) ) //this should ignore unnecesary parameters
QOut( EVAL( RetBlock(), 5 ) )
// BugToFix()
OutStd( crlf )
OutStd( "Traying to use detached variable ..." )
OutStd( "Trying to use detached variable ..." )
OutStd( crlf )
x1 :=5
x2 :=6

View File

@@ -4,12 +4,11 @@
FUNCTION Main()
local a
? "hello 1", ProcLine(), "Expected: ", 8
? "hello 1", ProcLine(), "Expected: ", 4
? "hello 2", ProcLine(), "Expected: ", 10
? "hello 2", ProcLine(), "Expected: ", 6
? "hello 3", ProcLine(), "Expected: ", 9
? "hello 3", ProcLine(), "Expected: ", 13
RETURN NIL

View File

@@ -38,7 +38,7 @@ FUNCTION Main()
hFile := fOpen( "list.txt", 0 )
cString := space( IF_BUFFER )
cBuf := ""
cBuf := ""
cTable := ""
// Builds dynamic table replacement
@@ -46,12 +46,12 @@ FUNCTION Main()
i := 1
DO WHILE i <= nPos
IF substr( cString, i, 1 ) = chr( 13 )
IF substr( cString, i, 1 ) = chr( 13 )
i := i + 1
cLine := cBuf
cBuf := ""
cBuf := ""
IF left( cLine, 1 ) <> ';'
IF left( cLine, 1 ) <> ';'
cTable += '<TR>' + chr(10)+chr(13) + ;
'<TD WIDTH="50%"><FONT SIZE="2" FACE="Tahoma">' + ;
ParseString( cLine, ';', 1 ) + '</FONT></TD>' + chr(10)+chr(13) + ;
@@ -71,12 +71,12 @@ FUNCTION Main()
'&nbsp' ) + ;
'</TD>' + chr(10)+chr(13) + ;
'</TR>'
ENDIF
ELSE
cBuf := cBuf + substr( cString, i, 1 )
ENDIF
ENDIF
ELSE
cBuf := cBuf + substr( cString, i, 1 )
ENDIF
i++
i++
ENDDO
ENDDO
@@ -251,7 +251,7 @@ STATIC FUNCTION AddPara( cPara, cAlign )
STATIC FUNCTION Generate()
LOCAL Self := QSelf()
LOCAL cFile, i, hFile, nPos, cRes
LOCAL cFile, i, hFile, nPos, cRes := ""
LOCAL lFlag := .f.
// Is this a meta file or hand generated script?