From ca2eae46c116091f7a5e485ad66b9a0d6e05022b Mon Sep 17 00:00:00 2001 From: "David G. Holm" Date: Wed, 16 Jun 1999 04:04:53 +0000 Subject: [PATCH] See ChangeLog entry 19990615-22:55 EDT David G. Holm --- harbour/ChangeLog | 200 +++++++++++++++++++--------------- harbour/makefile.icc | 29 ++++- harbour/source/hbpp/hbpp.c | 13 ++- harbour/source/hbpp/hbppint.c | 13 ++- harbour/source/rtl/console.c | 11 +- harbour/source/rtl/dates.c | 4 +- 6 files changed, 164 insertions(+), 106 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 01f2dbe142..ef50fc309f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,26 @@ +19990615-22:55 EDT David G. Holm + * ChangeLog + - Added comment to entry 19990615-12:30 EDT David G. Holm + about renaming two hb_ functions in source/rtl/console.c + * makefile.icc + - Build component parts of Harbour.exe separately + * source/hbpp/hbpp.c + - Added #ifdef block for IBM C++ compiler + - Added prototype for OpenInclude() + - Increased size of expreal array in ConvertPatterns from 4 to 5, + because it is being initialized from a zero terminated string + * source/hbpp/hbppint.c + - Added #ifdef block for IBM C++ compiler + * source/rtl/console.c + - I went overboard in tracking the printer position, because + Clipper doesn't make any adjustments for control characters sent + to the printer. But it does adjust the printer row and column when + QOUT() output goes to the printer, which is what I had missed. + * source/rtl/dates.c + - Changed hb_seconds() to hb__seconds(), because IBM C++ + librarian can't distinguish between HARBOUR HB_SECONDS(void) + and double hb_seconds(void) + 19990616-08:00 WIB Andi Jahja + source\rtl\natmsg\msgia.c Language module for Indonesian languange @@ -23,6 +46,9 @@ - Added HARBOUR HB_SETPOS() - Improved printer position tracking - Improved screen position tracking when not using GT API + - Renamed hb_maxrow() to hb_max_row() and hb_maxcol() to hb_max_col(), + because IBM C++ librarian can't distinguish between functions with + the same name that differ only by the return argument. * source/rtl/files.c - convert_create_flags no longer returns a value, so declare as void * source/rtl/set.c @@ -56,10 +82,10 @@ * source/compiler/harbour.y * added missing error message - + * source/compiler/harbour.l * removed printf introducced for debugging purpose - + 19990615-07:00 Ryszard Glab * source/compiler/harbour.y @@ -70,7 +96,7 @@ * corrected line continnuation logic * include/hberrors.h - + added new error message + + added new error message * include/hbsetup.h * removed unneccessary '*/' defined for Watcom compiler @@ -209,93 +235,93 @@ Fri Jun 11 1999 19:35 PST Ron Pinkas Fri Jun 11 19:14:22 1999 Gonzalo A. Diethelm - * include/Makefile: - * include/set.h: - * source/compiler/harbour.y: - * source/hbpp/harb.h: - * source/hbpp/hbpp.c: - * source/rtl/arrays.c: - * source/rtl/classes.c: - * source/rtl/console.c: - * source/rtl/dates.c: - * source/rtl/descend.c: - * source/rtl/dir.c: - * source/rtl/environ.c: - * source/rtl/files.c: - * source/rtl/hardcr.c: - * source/rtl/math.c: - * source/rtl/mtran.c: - * source/rtl/set.c: - * source/rtl/strings.c: - * source/rtl/transfrm.c: - * source/runner/run_exp.h: - * source/runner/runner.c: - * source/tools/asciisum.c: - * source/tools/ascpos.c: - * source/tools/atdiff.c: - * source/tools/chareven.c: - * source/tools/charmix.c: - * source/tools/charodd.c: - * source/tools/chrcount.c: - * source/tools/chrfirst.c: - * source/tools/chrtotal.c: - * source/tools/datesx.c: - * source/tools/debug.c: - * source/tools/hb_f.c: - * source/tools/io.c: - * source/tools/mathx.c: - * source/tools/strcount.c: - * source/tools/strcspn.c: - * source/tools/strdiff.c: - * source/tools/strexpan.c: - * source/tools/stringsx.c: - * source/tools/strleft.c: - * source/tools/strpbrk.c: - * source/tools/strright.c: - * source/vm/dynsym.c: - * source/vm/hvm.c: - * source/vm/initsymb.c: - * tests/working/Makefile: - * tests/working/dates.prg: - * tests/working/dates2.prg: - * tests/working/empty.prg: - * tests/working/filexist.prg: - * tests/working/inifiles.prg: - * tests/working/next.prg: - * tests/working/test_all.prg: - * tests/working/teststr.prg: - * tests/working/transfrm.prg: - When the compiler sees a function called FOO, it generates a call - to HB_FOO. This meant updating the code generation (with the help - of Eddie Runia) and updating all HARBOUR functions to prepend an - HB_ to each of them. I also made sure all of them where declared - in uppercase and had the signature HARBOUR HB_FOO(void). - I may have missed something. In particular, test testhbf.prg does - not work, but I wanted to commit this change anyway. + * include/Makefile: + * include/set.h: + * source/compiler/harbour.y: + * source/hbpp/harb.h: + * source/hbpp/hbpp.c: + * source/rtl/arrays.c: + * source/rtl/classes.c: + * source/rtl/console.c: + * source/rtl/dates.c: + * source/rtl/descend.c: + * source/rtl/dir.c: + * source/rtl/environ.c: + * source/rtl/files.c: + * source/rtl/hardcr.c: + * source/rtl/math.c: + * source/rtl/mtran.c: + * source/rtl/set.c: + * source/rtl/strings.c: + * source/rtl/transfrm.c: + * source/runner/run_exp.h: + * source/runner/runner.c: + * source/tools/asciisum.c: + * source/tools/ascpos.c: + * source/tools/atdiff.c: + * source/tools/chareven.c: + * source/tools/charmix.c: + * source/tools/charodd.c: + * source/tools/chrcount.c: + * source/tools/chrfirst.c: + * source/tools/chrtotal.c: + * source/tools/datesx.c: + * source/tools/debug.c: + * source/tools/hb_f.c: + * source/tools/io.c: + * source/tools/mathx.c: + * source/tools/strcount.c: + * source/tools/strcspn.c: + * source/tools/strdiff.c: + * source/tools/strexpan.c: + * source/tools/stringsx.c: + * source/tools/strleft.c: + * source/tools/strpbrk.c: + * source/tools/strright.c: + * source/vm/dynsym.c: + * source/vm/hvm.c: + * source/vm/initsymb.c: + * tests/working/Makefile: + * tests/working/dates.prg: + * tests/working/dates2.prg: + * tests/working/empty.prg: + * tests/working/filexist.prg: + * tests/working/inifiles.prg: + * tests/working/next.prg: + * tests/working/test_all.prg: + * tests/working/teststr.prg: + * tests/working/transfrm.prg: + When the compiler sees a function called FOO, it generates a call + to HB_FOO. This meant updating the code generation (with the help + of Eddie Runia) and updating all HARBOUR functions to prepend an + HB_ to each of them. I also made sure all of them where declared + in uppercase and had the signature HARBOUR HB_FOO(void). + I may have missed something. In particular, test testhbf.prg does + not work, but I wanted to commit this change anyway. Fri Jun 11 17:11:09 1999 Gonzalo A. Diethelm - * config/bin.cf: - * config/dir.cf: - * config/global.cf: - * config/install.cf: - * config/lib.cf: - * config/rules.cf: - * config/test.cf: - * config/dos/dir.cf: - * config/dos/djgpp.cf: - * config/dos/global.cf: - * config/dos/install.cf: - * config/win32/dir.cf: - * config/win32/gcc.cf: - * config/win32/global.cf: - * config/win32/install.cf: - * config/win32/msvc.cf: - * config/win32/rules.cf: - Reorganized things in an attempt to make it clearer how to support - different platforms and compilers. Also added as much support as I - could for running the GNU-make build system under plain - COMMAND.COM (DOS and Win95), not only under bash. + * config/bin.cf: + * config/dir.cf: + * config/global.cf: + * config/install.cf: + * config/lib.cf: + * config/rules.cf: + * config/test.cf: + * config/dos/dir.cf: + * config/dos/djgpp.cf: + * config/dos/global.cf: + * config/dos/install.cf: + * config/win32/dir.cf: + * config/win32/gcc.cf: + * config/win32/global.cf: + * config/win32/install.cf: + * config/win32/msvc.cf: + * config/win32/rules.cf: + Reorganized things in an attempt to make it clearer how to support + different platforms and compilers. Also added as much support as I + could for running the GNU-make build system under plain + COMMAND.COM (DOS and Win95), not only under bash. 19990611-17:00 CET Matthew Hamiltion * tests/working/inifiles.prg diff --git a/harbour/makefile.icc b/harbour/makefile.icc index 703618b925..233e8316d1 100644 --- a/harbour/makefile.icc +++ b/harbour/makefile.icc @@ -2,7 +2,7 @@ .SUFFIXES : .prg .c -path_c = source\compiler;source\vm;source\rtl;source\rtl\gt;source\rtl\natmsg;source\tools +path_c = source\compiler;source\hbpp;source\vm;source\rtl;source\rtl\gt;source\rtl\natmsg;source\tools path_h = include path_l = source\compiler path_y = source\compiler @@ -188,12 +188,29 @@ $(path_obj)\stringp.obj : {$(path_prg)}\stringp.prg $(path_h)\pcode.h $(path_h icc /C+ $(c_opt) /Fo$@ /Tp$< ilib .\libs\icc\hbtools.lib -+$@,, -$(path_exe)\harbour.exe : {$(path_c)}harboury.c {$(path_c)}harbourl.c {$(path_c)}genobj32.c {$(path_c)}harbour.c +$(path_exe)\harbour.exe : $(path_obj)\harboury.obj $(path_obj)\harbourl.obj $(path_obj)\genobj32.obj $(path_obj)\harbour.obj $(path_obj)\hbpp.obj $(path_obj)\hbppint.obj $(path_obj)\table.obj icc /C- $(c_opt) /Fe$(path_exe)\harbour.exe /Isource\compiler \ - /Fo$(path_obj)\harboury.obj /Tpsource\compiler\harboury.c \ - /Fo$(path_obj)\harbourl.obj /Tpsource\compiler\harbourl.c \ - /Fo$(path_obj)\genobj32.obj /Tpsource\compiler\genobj32.c \ - /Fo$(path_obj)\harbour.obj /Tpsource\compiler\harbour.c + $(path_obj)\harboury.obj \ + $(path_obj)\harbourl.obj \ + $(path_obj)\genobj32.obj \ + $(path_obj)\hbpp.obj \ + $(path_obj)\hbppint.obj \ + $(path_obj)\table.obj \ + $(path_obj)\harbour.obj + +$(path_obj)\genobj32.obj : {$(path_c)}genobj32.c +$(path_obj)\harbour.obj : {$(path_c)}harbour.c +$(path_obj)\harbourl.obj : {$(path_c)}harbourl.c +$(path_obj)\harboury.obj : {$(path_c)}harboury.c +$(path_obj)\hbpp.obj : {$(path_c)}hbpp.c +$(path_obj)\hbppint.obj : {$(path_c)}hbppint.c +$(path_obj)\table.obj : {$(path_c)}table.c + +{source\compiler}.c{$(path_obj)}.obj: + icc /C+ $(c_opt) /Fo$@ /Tp$< + +{source\hbpp}.c{$(path_obj)}.obj: + icc /C+ $(c_opt) /Fo$@ /Tp$< harboury.c : {$(path_y)}harbour.y # bison -d -v -y -osource\compiler\harboury.c source\compiler\harbour.y diff --git a/harbour/source/hbpp/hbpp.c b/harbour/source/hbpp/hbpp.c index 3bb79113a7..d9605adfc2 100644 --- a/harbour/source/hbpp/hbpp.c +++ b/harbour/source/hbpp/hbpp.c @@ -4,12 +4,16 @@ /* Harbour Preprocessor , version 0.9 author - Alexander Kresin */ -#if defined(__DJGPP__) || defined(__GNUC__) +#if defined(__GNUC__) #include #include #include #else - #include + #if defined(__IBMCPP__) + #include + #else + #include + #endif #endif #include @@ -59,6 +63,7 @@ char* strodup ( char * ); int NextWord ( char**, char*, int); int NextName ( char**, char*, char**); int Include( char *, PATHNAMES *, FILE** ); +int OpenInclude( char *, PATHNAMES *, FILE** ); #define isname(c) (isalnum(c) || c=='_' || (c) > 0x7e) #define SKIPTABSPACES(sptr) while ( *sptr == ' ' || *sptr == '\t' ) (sptr)++ @@ -392,7 +397,7 @@ int ConvertPatterns ( char *mpatt, int mlen, char *rpatt, int rlen ) { int i = 0, ipos, ifou; int explen,rmlen; - char exppatt[MAX_NAME], expreal[4] = "\1 0"; + char exppatt[MAX_NAME], expreal[5] = "\1 0"; char lastchar = '@', exptype; char *ptr; @@ -1431,4 +1436,4 @@ int OpenInclude( char * szFileName, PATHNAMES *pSearch, FILE** fptr ) return 0; } return 1; -} \ No newline at end of file +} diff --git a/harbour/source/hbpp/hbppint.c b/harbour/source/hbpp/hbppint.c index d786030c59..02619b5daa 100644 --- a/harbour/source/hbpp/hbppint.c +++ b/harbour/source/hbpp/hbppint.c @@ -2,12 +2,17 @@ * $Id$ */ -#if defined(__DJGPP__) || defined(__GNUC__) +#if defined(__GNUC__) #include #include #else - #include - #include + #if defined(__IBMCPP__) + #include + #include + #else + #include + #include + #endif #endif #include #include "harb.h" @@ -187,4 +192,4 @@ void _xfree( void * pMem ) /* frees fixed memory */ { if( pMem ) free( pMem ); -} \ No newline at end of file +} diff --git a/harbour/source/rtl/console.c b/harbour/source/rtl/console.c index 55d1810ac8..44fc0dfca0 100644 --- a/harbour/source/rtl/console.c +++ b/harbour/source/rtl/console.c @@ -95,7 +95,7 @@ USHORT hb_max_col( void ) } #ifndef USE_GTAPI -void adjust_pos( char * fpStr, WORD uiLen, USHORT * row, USHORT * col, USHORT max_row, USHORT max_col ) +static void adjust_pos( char * fpStr, WORD uiLen, USHORT * row, USHORT * col, USHORT max_row, USHORT max_col ) { WORD uiCount; for( uiCount = 0; uiCount < uiLen; uiCount++ ) @@ -264,7 +264,7 @@ static void hb_altout( char * fpStr, WORD uiLen ) { /* Print to printer if SET PRINTER ON and valid printer file */ write( hb_set_printhan, fpStr, uiLen ); - adjust_pos( fpStr, uiLen, &p_row, &p_col, -1, -1 ); + p_col += uiLen; } } @@ -275,7 +275,7 @@ static void hb_devout( char * fpStr, WORD uiLen ) { /* Display to printer if SET DEVICE TO PRINTER and valid printer file */ write( hb_set_printhan, fpStr, uiLen ); - adjust_pos( fpStr, uiLen, &p_row, &p_col, -1, -1 ); + p_col += uiLen; } else { @@ -366,6 +366,11 @@ HARBOUR HB_QOUT( void ) MessageBox( 0, _parc( 1 ), "Harbour", 0 ); #else hb_altout( CrLf, strlen (CrLf) ); + if( hb_set.HB_SET_PRINTER && hb_set_printhan >= 0 ) + { + p_row++; + p_col=0; + } HB_QQOUT(); #endif } diff --git a/harbour/source/rtl/dates.c b/harbour/source/rtl/dates.c index e32d1cff9f..49d07531cc 100644 --- a/harbour/source/rtl/dates.c +++ b/harbour/source/rtl/dates.c @@ -20,7 +20,7 @@ extern STACK stack; extern char *hb_monthsname[]; extern char *hb_daysname[]; -double hb_seconds( void ) +double hb__seconds( void ) { #if defined(__TURBOC__) || defined(__BORLANDC__) || defined(__DJGPP__) struct time t; @@ -588,7 +588,7 @@ HARBOUR HB_CDOW( void ) HARBOUR HB_SECONDS( void ) { if( _pcount() == 0 ) - _retnd( hb_seconds() ); + _retnd( hb__seconds() ); else { /* QUESTION: Clipper catches this at compile time! */