diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 61de429bb6..6e45b64603 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,62 @@ +Mon Jun 07 12:58:17 1999 Gonzalo A. Diethelm + + * source/hbpp/Makefile: + * source/hbpp/harb.c: + * source/hbpp/harb.h: + * source/hbpp/hbpp.c: + * source/hbpp/table.c: + Added a GNU-make Makefile to this directory. + Solved portability problems under gcc. + Got rid of a few warnings and unused variables. + + * source/rtl/msgxxx.c: + This file includes the correct message file based on the value of + HB_LANGUAGE, whose default is UK. + + * source/rtl/classes.c: + * source/rtl/console.c: + * source/rtl/dir.c: + * source/rtl/files.c: + * source/rtl/set.c: + Solved portability problems under gcc. + Got rid of a few warnings and unused variables. + + * source/rtl/dir.c: + This file had definite bugs, see difference between r1.4 and r1.3 + for more details. + + * source/rtl/natmsg/msgdut.c: + * source/rtl/natmsg/msggal.c: + * source/rtl/natmsg/msgger.c: + * source/rtl/natmsg/msghu.c: + * source/rtl/natmsg/msgpor.c: + * source/rtl/natmsg/msgr1251.c: + * source/rtl/natmsg/msgru866.c: + * source/rtl/natmsg/msgspa.c: + * source/rtl/natmsg/msguk.c: + Added Id keywords. + + * config/bin.cf: + * config/global.cf: + * config/header.cf: + * config/lib.cf: + * config/prg.cf: + * config/test.cf: + * config/win32/rules.cf: + Use GRANDP to refer to ../../ and change environment variables to + start with a HB_. + + * config/win32/rules.cf: + Added a -I$(TOP) to the list of paths for included files in the + rule to compile a PRG file with Harbour. + + * include/Makefile: + * source/Makefile: + * source/rtl/Makefile: + * source/tools/Makefile: + * tests/working/Makefile: + Updated the file list. + 19990607-15:15 CET Matthew Hamilton * tests/working/inifiles.prg diff --git a/harbour/config/bin.cf b/harbour/config/bin.cf index 72e1c9e9b0..36750a95ad 100644 --- a/harbour/config/bin.cf +++ b/harbour/config/bin.cf @@ -14,14 +14,14 @@ first : dirbase descend descend : @cd $(ARCH_DIR); \ - $(MAKE) -f ../../Makefile 'TOP=../../' $(EXE_NAME); \ - cd ../../ + $(MAKE) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(EXE_NAME); \ + cd $(GRANDP) $(EXE_NAME) : $(ALL_OBJS) $(LD_RULE) INSTALL_OBJS = $(EXE_ARCH) -INSTALL_DIR = $(BIN_DIR) +INSTALL_DIR = $(HB_BIN_DIR) include $(TOP)$(ROOT)config/install.cf diff --git a/harbour/config/global.cf b/harbour/config/global.cf index 27dfe6b2d0..85430e043e 100644 --- a/harbour/config/global.cf +++ b/harbour/config/global.cf @@ -4,13 +4,16 @@ all : first -ARCH_DIR = $(ARCHITECTURE)/$(COMPILER)/ +GRANDP = ../../ +ARCH = $(HB_ARCHITECTURE)/$(HB_COMPILER) -include $(TOP)$(ROOT)config/$(ARCHITECTURE)/$(COMPILER).cf +ARCH_DIR = $(ARCH)/ + +include $(TOP)$(ROOT)config/$(ARCH).cf dirbase:: - @if [ ! -d $(ARCHITECTURE) ]; then \ - $(MD) $(ARCHITECTURE); \ + @if [ ! -d $(HB_ARCH) ]; then \ + $(MD) $(HB_ARCH); \ fi; \ if [ ! -d $(ARCH_DIR) ]; then \ $(MD) $(ARCH_DIR); \ diff --git a/harbour/config/header.cf b/harbour/config/header.cf index 158ae974f5..4d01a55b8d 100644 --- a/harbour/config/header.cf +++ b/harbour/config/header.cf @@ -12,6 +12,6 @@ ALL_HEADERS = $(C_HEADERS) $(PRG_HEADERS) $(API_HEADERS) first : INSTALL_OBJS = $(ALL_HEADERS) -INSTALL_DIR = $(INC_DIR) +INSTALL_DIR = $(HB_INC_DIR) include $(TOP)$(ROOT)config/install.cf diff --git a/harbour/config/lib.cf b/harbour/config/lib.cf index b452de1539..6cdf239222 100644 --- a/harbour/config/lib.cf +++ b/harbour/config/lib.cf @@ -15,14 +15,14 @@ first : dirbase descend descend : @cd $(ARCH_DIR); \ - $(MAKE) -f ../../Makefile 'TOP=../../' $(LIB_NAME); \ - cd ../../ + $(MAKE) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(LIB_NAME); \ + cd $(GRANDP) $(LIB_NAME) : $(ALL_OBJS) $(AR_RULE) INSTALL_OBJS = $(LIB_ARCH) -INSTALL_DIR = $(LIB_DIR) +INSTALL_DIR = $(HB_LIB_DIR) include $(TOP)$(ROOT)config/install.cf diff --git a/harbour/config/prg.cf b/harbour/config/prg.cf index abef307f11..886c8d1fe5 100644 --- a/harbour/config/prg.cf +++ b/harbour/config/prg.cf @@ -12,4 +12,4 @@ $(PRG_EXES) : %$(EXE_EXT) : %$(OBJ_EXT) $(PRG_OBJS) : %$(OBJ_EXT) : %.c -$(PRG_C_SOURCES) : %.c : ../../%.prg +$(PRG_C_SOURCES) : %.c : $(GRANDP)%.prg diff --git a/harbour/config/test.cf b/harbour/config/test.cf index 520f962c8f..1c33574410 100644 --- a/harbour/config/test.cf +++ b/harbour/config/test.cf @@ -9,5 +9,5 @@ first : dirbase descend descend : @cd $(ARCH_DIR); \ - $(MAKE) -f ../../Makefile 'TOP=../../' $(PRG_EXES); \ - cd ../../ + $(MAKE) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(PRG_EXES); \ + cd $(GRANDP) diff --git a/harbour/config/win32/rules.cf b/harbour/config/win32/rules.cf index a6e21964e8..8f3aeaac59 100644 --- a/harbour/config/win32/rules.cf +++ b/harbour/config/win32/rules.cf @@ -12,7 +12,7 @@ LEX_FLAGS = -i # How to run Harbour. HB = harbour$(EXE_EXT) -HB_FLAGS = -n -q -I$(INC_DIR) +HB_FLAGS = -n -q -I$(TOP) -I$(INC_DIR) # The rule to link an executable. LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$@ $^ $(LDFLAGS) $(LINKLIBS) @@ -26,8 +26,8 @@ LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$@ $^ $(LDFLAGS) $(LINKLIBS) # Rule to generate an object file from a C source file in the parent. -%$(OBJ_EXT) : ../../%.c - $(CC) $(CPPFLAGS) $(CFLAGS) -c $? $(CC_OUT)$(subst .c,$(OBJ_EXT),$(subst ../../,,$?)) +%$(OBJ_EXT) : $(GRANDP)%.c + $(CC) $(CPPFLAGS) $(CFLAGS) -c $? $(CC_OUT)$(subst .c,$(OBJ_EXT),$(subst $(GRANDP),,$?)) # Rule to generate an object file from a C source file. %$(OBJ_EXT) : %.c @@ -38,7 +38,7 @@ LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$@ $^ $(LDFLAGS) $(LINKLIBS) $(LD_RULE) # Rule to generate a C file from a PRG file. -%.c : ../../%.prg +%.c : $(GRANDP)%.prg $(HB) $? $(HB_FLAGS) # Generic rule to clean up. diff --git a/harbour/doc/gmake.txt b/harbour/doc/gmake.txt new file mode 100644 index 0000000000..e113820d4f --- /dev/null +++ b/harbour/doc/gmake.txt @@ -0,0 +1,166 @@ +# +# $Id$ +# + +INTRODUCTION +============ + +This file explains the philosophy for the GNU-make based build system +for Harbour, and gives instructions on how to use it. + + +PHILOSOPHY +========== + +This build system is based on GNU-make, the idea being that GNU-make +is freely available for every platform you can dream up, and it is +usually more powerful than any native make. + +Each directory in the project contains one makefile, called Makefile, +which lists the data (file names, directory names, etc.) that is used +to determine how to bring ever target up to date within that +directory. There are no rules in the Makefiles, to keep them +platform-independent. The rules itself are included from the +"appropriate" configuration file. + +For example, this could be the Makefile for the VM library: + +-- Cut here --------------------------------------- +# +# $Id$ +# + +ROOT = ../../ + +C_SOURCES=\ + dynsym.c \ + hvm.c \ + initsymb.c \ + +LIB=vm + +include $(TOP)$(ROOT)config/lib.cf +-- Cut here --------------------------------------- + +What this means is: + +* The root of the source directory is in ../../; that is where the + config/ directory lives, with all the real rules to make the + targets. +* The only sources in this directory are C sources (three files). +* The library name is "vm". This will be translated to a real file + name depending on the rules file: "libvm.a" on Unix, "VM.LIB" on + DOS. +* The final line includes the rules file. In this case, we include a + set of rules to build a library. + +Let's look at another Makefile, this one for the Harbour compiler: + +-- Cut here --------------------------------------- +# +# $Id$ +# + +ROOT = ../../ + +YACC_SOURCE=harbour.y + +LEX_SOURCE=harbour.l + +C_SOURCES=\ + genobj32.c \ + +C_MAIN=harbour.c + +include $(TOP)$(ROOT)config/bin.cf +-- Cut here --------------------------------------- + +Notice how we now have other kinds of source files: yacc sources and +lex sources. Also, since this is a Makefile for a stand-alone +executable, we indicate the name for the file containing the "main" +function, which also defines the executable name. The rules included +in this Makefile are those appropriate to build a stand-alone binary. + +One final Makefile, this one from the source directory: + +# +# $Id$ +# + +-- Cut here --------------------------------------- +ROOT = ../ + +DIRS=\ + compiler \ + hbpp \ + rtl \ + vm \ + rdd \ + tools \ + +include $(ROOT)config/dir.cf +-- Cut here --------------------------------------- + +This Makefile is used to traverse the subdirectories hanging from the +current directory. It simply lists all the subdirectories to be +traversed. + +Now. let's take a look at the rules themselves. They all live in the +config/ directory, with the following structure: + + config/: The generic configuration files. + config/win32: Configuration files for win32 platforms. + + +Finally, you will notice one thing: the build system compiles +everything into a subdirectory (for example, win32/gcc for WIN32 files +compiled with gcc). This has two advantages: + +1. It allows you to compile for multiple platforms/compilers at the + same time. +2. It creates all temporary, object, binary, intermediate, etc. files + in the subdirectory; cleaning up is very easy. + + +USAGE +===== + +To use the system, you need to install GNU-make 3.75 or later in your +system. To check this, type "make -v"; you should see + + GNU Make version 3.75, by Richard Stallman and Roland McGrath. + ... + +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 + +These are the only two supported compilers right now (guess which ones +I own). + +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 + +You can set those as environment variables too. + +The most used targets are these: + +* all: Same as typing "make" without arguments. It will usually try to + compile and link the obvious target in the directory. + +* clean: Clean up everything made by make. + +* install: Install stuff into the appropriate directory. diff --git a/harbour/include/Makefile b/harbour/include/Makefile index 6bb84e65e0..295673c472 100644 --- a/harbour/include/Makefile +++ b/harbour/include/Makefile @@ -18,12 +18,15 @@ C_HEADERS=\ pcode.h \ set.h \ types.h \ + version.h \ PRG_HEADERS=\ + cgi.ch \ error.ch \ inkey.ch \ set.ch \ setcurs.ch \ + test.ch \ API_HEADERS=\ error.api \ diff --git a/harbour/source/Makefile b/harbour/source/Makefile index a9ce5861f9..329daff85c 100644 --- a/harbour/source/Makefile +++ b/harbour/source/Makefile @@ -6,6 +6,7 @@ ROOT = ../ DIRS=\ compiler \ + hbpp \ rtl \ vm \ rdd \ diff --git a/harbour/source/hbpp/Makefile b/harbour/source/hbpp/Makefile new file mode 100644 index 0000000000..c58ca11a6c --- /dev/null +++ b/harbour/source/hbpp/Makefile @@ -0,0 +1,13 @@ +# +# $Id$ +# + +ROOT = ../../ + +C_SOURCES=\ + harb.c \ + table.c \ + +C_MAIN=hbpp.c + +include $(TOP)$(ROOT)config/bin.cf diff --git a/harbour/source/hbpp/harb.c b/harbour/source/hbpp/harb.c index 0266944932..3935286e15 100644 --- a/harbour/source/hbpp/harb.c +++ b/harbour/source/hbpp/harb.c @@ -1,8 +1,21 @@ -#include -#include +/* + * $Id$ + */ + +#if defined(__DJGPP__) #ifndef __dj_include_stdio_h_ #include #endif +#endif + +#if defined(__DJGPP__) || defined(__GNUC__) + #include + #include +#else + #include +#endif + +#include #include "harb.h" /* * Split given filename into path, name and extension diff --git a/harbour/source/hbpp/harb.h b/harbour/source/hbpp/harb.h index 9d921f103a..196bdab2a4 100644 --- a/harbour/source/hbpp/harb.h +++ b/harbour/source/hbpp/harb.h @@ -1,3 +1,7 @@ +/* + * $Id$ + */ + /* --------------------------------------------- Definitions, copied from Harbour.y and types.h */ @@ -24,4 +28,4 @@ void * _xgrab( ULONG ); /* allocates fixed memory */ void * _xrealloc( void *, ULONG ); /* reallocates memory */ void _xfree( void * ); /* frees fixed memory */ -/* ------------------------------------------ */ \ No newline at end of file +/* ------------------------------------------ */ diff --git a/harbour/source/hbpp/hbpp.c b/harbour/source/hbpp/hbpp.c index 1ecb2fde9c..fa1bd58ac6 100644 --- a/harbour/source/hbpp/hbpp.c +++ b/harbour/source/hbpp/hbpp.c @@ -1,9 +1,21 @@ +/* + * $Id$ + */ + /* Harbour Preprocessor , version 0.8 author - Alexander Kresin */ + +#if defined(__DJGPP__) || defined(__GNUC__) + #include + #include + #include +#else + #include +#endif + #include #include #include -#include #include #include "harb.h" @@ -99,7 +111,7 @@ int kolcommands = 0, maxcommands = INITIAL_ACOM_SIZE; int main (int argc,char* argv[]) { -int handl_i,handl_o,i; +int handl_i,handl_o; char szFileName[ _POSIX_PATH_MAX ]; FILENAME *pFileName =NULL; @@ -230,7 +242,7 @@ int ParseDirective( char* sLine ) { printf("\nCan't open %s",sLine); return 1001; } lInclude++; - Hp_Parse(handl_i, NULL); + Hp_Parse(handl_i, 0); lInclude--; close(handl_i); } diff --git a/harbour/source/hbpp/table.c b/harbour/source/hbpp/table.c index ecf1417b59..71ee89b191 100644 --- a/harbour/source/hbpp/table.c +++ b/harbour/source/hbpp/table.c @@ -1,4 +1,9 @@ +/* + * $Id$ + */ + #include + typedef struct { char *name; diff --git a/harbour/source/rtl/Makefile b/harbour/source/rtl/Makefile index 7706a3cb42..4a67117420 100644 --- a/harbour/source/rtl/Makefile +++ b/harbour/source/rtl/Makefile @@ -10,17 +10,23 @@ C_SOURCES=\ codebloc.c \ console.c \ dates.c \ + descend.c \ + dir.c \ environ.c \ errorapi.c \ extend.c \ files.c \ gtapi.c \ + hardcr.c \ itemapi.c \ math.c \ + mtran.c \ set.c \ strcmp.c \ strings.c \ transfrm.c \ + \ + msgxxx.c \ PRG_SOURCES=\ asort.prg \ diff --git a/harbour/source/rtl/classes.c b/harbour/source/rtl/classes.c index abcddcd717..88ee5e9d6a 100644 --- a/harbour/source/rtl/classes.c +++ b/harbour/source/rtl/classes.c @@ -246,7 +246,6 @@ HARBOUR CLASSCREATE() { WORD wSuper = _parni( 3 ); /* Super class present */ WORD wSize; - PHB_ITEM pItem; PCLASS pNewCls; PCLASS pSprCls; @@ -939,7 +938,6 @@ HARBOUR __INSTSUPER( void ) { PHB_ITEM pString = _param( 1, IT_STRING ); PDYNSYM pDynSym; - PHB_ITEM pSuperCls; BYTE bFound = FALSE; WORD w; diff --git a/harbour/source/rtl/console.c b/harbour/source/rtl/console.c index 0b52e22db6..1c4e66f236 100644 --- a/harbour/source/rtl/console.c +++ b/harbour/source/rtl/console.c @@ -11,7 +11,7 @@ #include #include #include -#ifdef __DJGPP__ +#if defined(__DJGPP__) || defined(__GNUC__) #include #endif #ifdef USE_GTAPI diff --git a/harbour/source/rtl/dir.c b/harbour/source/rtl/dir.c index 6bd07e688b..0486eb56e5 100644 --- a/harbour/source/rtl/dir.c +++ b/harbour/source/rtl/dir.c @@ -4,6 +4,7 @@ #include #include +#include #include #if defined(__GNUC__) || defined(__DJGPP__) @@ -85,6 +86,10 @@ #undef DIRECTORY #endif + +static BOOL hb_strMatchDOS (char *pszString, char *pszMask); + + HARBOUR DIRECTORY( void ) { #if defined(HAVE_POSIX_IO) @@ -106,13 +111,7 @@ HARBOUR DIRECTORY( void ) char fname[_POSIX_PATH_MAX+1]; char fext[_POSIX_PATH_MAX+1]; char filesize[10]; - char yyear[5]; - char mmonth[3]; - char dday[3]; char ddate[9]; - char hh[3]; - char mm[3]; - char ss[3]; char ttime[9]; int attrib; char aatrib[7]; @@ -141,7 +140,7 @@ HARBOUR DIRECTORY( void ) if( pos ) { strcpy(pattern,(pos+1)); - string[pos-string+1] = '\0'; + *(pos+1) = '\0'; strcpy(dirname,string); } else @@ -166,7 +165,7 @@ HARBOUR DIRECTORY( void ) if( pos ) { strcpy(pfext,(pos+1)); - string[pos-string] = '\0'; + *pos = '\0'; strcpy(pfname,string); } else @@ -204,7 +203,7 @@ HARBOUR DIRECTORY( void ) if( pos ) { strcpy(fext,(pos+1)); - string[pos-string] = '\0'; + *pos = '\0'; strcpy(fname,string); } else @@ -224,8 +223,6 @@ HARBOUR DIRECTORY( void ) if (hb_strMatchDOS( fname,pfname) && hb_strMatchDOS( fext,pfext)) { - ddate[0] = '\0'; - ttime[0] = '\0'; aatrib[0] = '\0'; filesize[0] = '\0'; filename[0] = '\0'; @@ -242,54 +239,23 @@ HARBOUR DIRECTORY( void ) } fsize = statbuf.st_size; - ltoa(fsize,filesize,10); + sprintf(filesize, "%ld", fsize); ftime = statbuf.st_mtime; ft = localtime(&ftime); - itoa(ft->tm_year+1900,yyear,10); - strcat(ddate,yyear); - itoa(ft->tm_mon,mmonth,10); - if (strlen(mmonth) < 2) - { - strcat(mmonth,"0"); - strrev(mmonth); - } - strcat(ddate,mmonth); - itoa(ft->tm_mday,dday,10); - if (strlen(dday) < 2) - { - strcat(dday,"0"); - strrev(dday); - } - strcat(ddate,dday); - itoa(ft->tm_hour,hh,10); - if (strlen(hh) < 2) - { - strcat(hh,"0"); - strrev(hh); - } - strcat(ttime,hh); - strcat(ttime,":"); - itoa(ft->tm_min,mm,10); - if (strlen(mm) < 2) - { - strcat(mm,"0"); - strrev(mm); - } - strcat(ttime,mm); - strcat(ttime,":"); - itoa(ft->tm_sec,ss,10); - if (strlen(ss) < 2) - { - strcat(ss,"0"); - strrev(ss); - } - strcat(ttime,ss); + sprintf(ddate, "%04d%02d%02d", + ft->tm_year+1900, ft->tm_mon, ft->tm_mday); + sprintf(ttime, "%02d:%02d:%02d", + ft->tm_hour, ft->tm_min, ft->tm_sec); /* debug code printf("\n name date time %s %s %s ",entry,ddate,ttime); while(0==getchar()); */ + +#if defined(__GNUC__) || defined(__DJGPP__) + aatrib[0] = '\0'; +#else /* TODO: seems to not clear on root entries ? */ attrib = _chmod(fullfile,0); if (attrib & FA_ARCH) @@ -304,17 +270,18 @@ HARBOUR DIRECTORY( void ) strcat(aatrib,"R"); if (attrib & FA_SYSTEM) strcat(aatrib,"S"); +#endif /* TODO: attribute match rtn */ - pos = 0; + pos = string; if( arg2_it && _parclen(2) >= 1) { strcpy(string, _parc(2)); - while (string[pos]) string[pos] = toupper(string[pos]); + while (*pos != '\0') *pos = toupper(*pos); pos = strchr(string,*aatrib); } else - pos = 1; + pos = string; if ( pos ) { diff --git a/harbour/source/rtl/files.c b/harbour/source/rtl/files.c index 3a341061d0..7d2885fffd 100644 --- a/harbour/source/rtl/files.c +++ b/harbour/source/rtl/files.c @@ -5,6 +5,10 @@ #include #include +#if defined(__GNUC__) + #include +#endif + #if defined(__GNUC__) || defined(__DJGPP__) #include #include @@ -269,6 +273,7 @@ int _fsLock( int handle, long start, long length, long mode ) { int result=0; +#if !defined(__GNUC__) && !defined(__DJGPP__) #if defined(HAVE_POSIX_IO) if (mode == FL_LOCK) { @@ -283,6 +288,7 @@ int _fsLock( int handle, long start, long length, long mode ) last_error = errno; } result = (last_error=0?1:0); +#endif #endif return result; diff --git a/harbour/source/rtl/msgxxx.c b/harbour/source/rtl/msgxxx.c new file mode 100644 index 0000000000..62aaed52aa --- /dev/null +++ b/harbour/source/rtl/msgxxx.c @@ -0,0 +1,27 @@ +/* + * $Id$ + */ + +#if !defined(HB_LANGUAGE) +#define HB_LANGUAGE UK +#endif + +#if (HB_LANGUAGE == DUT) +#include "natmsg/msgdut.c" +#elif (HB_LANGUAGE == GAL) +#include "natmsg/msggal.c" +#elif (HB_LANGUAGE == GER) +#include "natmsg/msgger.c" +#elif (HB_LANGUAGE == HU) +#include "natmsg/msghu.c" +#elif (HB_LANGUAGE == POR) +#include "natmsg/msgpor.c" +#elif (HB_LANGUAGE == R1251) +#include "natmsg/msgr1251.c" +#elif (HB_LANGUAGE == RU886) +#include "natmsg/msgru886.c" +#elif (HB_LANGUAGE == SPA) +#include "natmsg/msgspa.c" +#elif (HB_LANGUAGE == UK) +#include "natmsg/msguk.c" +#endif diff --git a/harbour/source/rtl/natmsg/msgdut.c b/harbour/source/rtl/natmsg/msgdut.c index f3337396ba..dc915679cd 100644 --- a/harbour/source/rtl/natmsg/msgdut.c +++ b/harbour/source/rtl/natmsg/msgdut.c @@ -1,3 +1,7 @@ +/* + * $Id$ + */ + #include #include diff --git a/harbour/source/rtl/natmsg/msggal.c b/harbour/source/rtl/natmsg/msggal.c index a92ca92e0c..8f17536861 100644 --- a/harbour/source/rtl/natmsg/msggal.c +++ b/harbour/source/rtl/natmsg/msggal.c @@ -1,3 +1,7 @@ +/* + * $Id$ + */ + /* * Language support unit for Galician * diff --git a/harbour/source/rtl/natmsg/msgger.c b/harbour/source/rtl/natmsg/msgger.c index acb2e15087..c8dc9856bc 100644 --- a/harbour/source/rtl/natmsg/msgger.c +++ b/harbour/source/rtl/natmsg/msgger.c @@ -1,3 +1,7 @@ +/* + * $Id$ + */ + #include #include @@ -10,4 +14,4 @@ char *hb_monthsname[ 12 ] = { char *hb_daysname[ 7 ] = { "Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", - "Samstag" }; \ No newline at end of file + "Samstag" }; diff --git a/harbour/source/rtl/natmsg/msghu.c b/harbour/source/rtl/natmsg/msghu.c index b3ac665d62..8f0a422ccf 100644 --- a/harbour/source/rtl/natmsg/msghu.c +++ b/harbour/source/rtl/natmsg/msghu.c @@ -1,3 +1,6 @@ +/* + * $Id$ + */ /* Hungarian language module (2 char. ISO language code: HU) */ /* Codepage: 852 */ diff --git a/harbour/source/rtl/natmsg/msgpor.c b/harbour/source/rtl/natmsg/msgpor.c index b8d0e1af8f..1572c2fda0 100644 --- a/harbour/source/rtl/natmsg/msgpor.c +++ b/harbour/source/rtl/natmsg/msgpor.c @@ -1,3 +1,7 @@ +/* + * $Id$ + */ + #include #include diff --git a/harbour/source/rtl/natmsg/msgr1251.c b/harbour/source/rtl/natmsg/msgr1251.c index 11bfc3c861..782029e3d9 100644 --- a/harbour/source/rtl/natmsg/msgr1251.c +++ b/harbour/source/rtl/natmsg/msgr1251.c @@ -1,3 +1,7 @@ +/* + * $Id$ + */ + #include #include diff --git a/harbour/source/rtl/natmsg/msgru866.c b/harbour/source/rtl/natmsg/msgru866.c index 90aea62a4c..b8b581466a 100644 --- a/harbour/source/rtl/natmsg/msgru866.c +++ b/harbour/source/rtl/natmsg/msgru866.c @@ -1,3 +1,7 @@ +/* + * $Id$ + */ + #include #include diff --git a/harbour/source/rtl/natmsg/msgspa.c b/harbour/source/rtl/natmsg/msgspa.c index 6d28d10371..3473d5347e 100644 --- a/harbour/source/rtl/natmsg/msgspa.c +++ b/harbour/source/rtl/natmsg/msgspa.c @@ -1,3 +1,7 @@ +/* + * $Id$ + */ + #include #include diff --git a/harbour/source/rtl/natmsg/msguk.c b/harbour/source/rtl/natmsg/msguk.c index c9a6c06498..87e698ce8b 100644 --- a/harbour/source/rtl/natmsg/msguk.c +++ b/harbour/source/rtl/natmsg/msguk.c @@ -1,3 +1,7 @@ +/* + * $Id$ + */ + /* English language module */ /* Codepage: N/A */ diff --git a/harbour/source/rtl/set.c b/harbour/source/rtl/set.c index 080620a9ad..7cc27f9f34 100644 --- a/harbour/source/rtl/set.c +++ b/harbour/source/rtl/set.c @@ -2,14 +2,16 @@ * $Id$ */ +#if defined(__GNUC__) || defined(__DJGPP__) + #include + #include +#endif + #include #include #include #include -#ifdef __DJGPP__ - #include -#endif -/* #include */ + #include #include @@ -104,7 +106,13 @@ static int open_handle (char * file_name, BOOL bMode, char * def_ext) /* Open the file either in append (bMode) or truncate mode (!bMode), but always use binary mode */ handle = open (path, O_BINARY | O_WRONLY | O_CREAT | (bMode ? O_APPEND : O_TRUNC )); /* , S_IWRITE); */ -if (handle < 0) printf("\nError %d creating %s (DOS error %02x)", errno, path, _doserrno); + if (handle < 0) + { + printf("\nError %d creating %s", errno, path); +#if !defined(__GNUC__) && !defined(__DJGPP__) + printf(" (DOS error %02x)", _doserrno); +#endif + } if (handle < 0) { char error_message [32]; diff --git a/harbour/source/tools/Makefile b/harbour/source/tools/Makefile index 274adfe0a9..9eaa86e8bf 100644 --- a/harbour/source/tools/Makefile +++ b/harbour/source/tools/Makefile @@ -5,12 +5,30 @@ ROOT = ../../ C_SOURCES=\ + asciisum.c \ + ascpos.c \ + atdiff.c \ + chareven.c \ + charmix.c \ + charodd.c \ + chrcount.c \ + chrfirst.c \ + chrtotal.c \ datesx.c \ debug.c \ genobj.c \ + hb_f.c \ io.c \ mathx.c \ + strasint.c \ + strcount.c \ + strcspn.c \ + strdiff.c \ + strexpan.c \ stringsx.c \ + strleft.c \ + strpbrk.c \ + strright.c \ PRG_SOURCES=\ stringp.prg \ diff --git a/harbour/tests/working/Makefile b/harbour/tests/working/Makefile index 50cf1a5722..224eb97c48 100644 --- a/harbour/tests/working/Makefile +++ b/harbour/tests/working/Makefile @@ -8,63 +8,108 @@ PRG_SOURCES=\ ainstest.prg \ and_or.prg \ array16.prg \ + arrayidx.prg \ arrays.prg \ + arrindex.prg \ asctest.prg \ atest.prg \ byref.prg \ calling.prg \ + cdow.prg \ + clasinit.prg \ classes.prg \ + codebl.prg \ codebl2.prg \ codebloc.prg \ comments.prg \ dates.prg \ dates2.prg \ + dates3.prg \ debugtst.prg \ + descend.prg \ + dirtest.prg \ docase.prg \ - dupvars.prg \ + dynobj.prg \ empty.prg \ errorsys.prg \ + exittest.prg \ fib.prg \ fileio.prg \ + filexist.prg \ fornext.prg \ fornext2.prg \ + funcarr.prg \ guess.prg \ + hardcr.prg \ hello.prg \ ifelse.prg \ ifinline.prg \ + inherit.prg \ + inifiles.prg \ initexit.prg \ + inline.prg \ + instr.prg \ + iotest.prg \ + iotest2.prg \ + keywords.prg \ longstr.prg \ mankala.prg \ mathtest.prg \ + mtran.prg \ + multiarg.prg \ next.prg \ nums.prg \ + objarr.prg \ + objasign.prg \ objects.prg \ operat.prg \ + os.prg \ + output.prg \ + overload.prg \ + passref.prg \ procname.prg \ + readhrb.prg \ recursiv.prg \ returns.prg \ rtl_test.prg \ + scroll.prg \ set_num.prg \ set_test.prg \ + spawn.prg \ + spawn2.prg \ statfun.prg \ statics.prg \ strcmp.prg \ + strdelim.prg \ strings.prg \ strings2.prg \ strings3.prg \ strings4.prg \ + strip.prg \ t1.prg \ test.prg \ test10.prg \ + test_all.prg \ + testcgi.prg \ testerro.prg \ + testfor.prg \ + testgt.prg \ + testhbf.prg \ + testhtml.prg \ testid.prg \ testinc.prg \ testmem.prg \ + teststr.prg \ testtok.prg \ + testvars.prg \ transfrm.prg \ val.prg \ + version.prg \ while.prg \ +BAD_PRG_SOURCES=\ + dupvars.prg \ + LIBS=\ vm \ rtl \