From 87138080c022b24d9d6928eedbe8bde6e735bb31 Mon Sep 17 00:00:00 2001 From: "David G. Holm" Date: Sat, 5 Jun 1999 04:19:32 +0000 Subject: [PATCH] See ChangeLog entry 19990604-23:15 EDT David G. Holm --- harbour/ChangeLog | 16 ++++++++++++++++ harbour/include/version.h | 27 +++++++++++++++++++++++++++ harbour/source/rtl/environ.c | 10 +++++++--- harbour/source/rtl/set.c | 3 +++ harbour/tests/working/makefile.dos | 2 +- harbour/tests/working/version.prg | 7 +++++++ 6 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 harbour/include/version.h create mode 100644 harbour/tests/working/version.prg diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 63aed5daf2..3e4287aae6 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,19 @@ +19990604-23:15 EDT David G. Holm + + include/version.h + - New file to specify version info. A future revision will be + to specify where to find the version information, so that it + may be pulled from other modules and/or the CVS. + * source/rtl/environ.c + - Modified HARBOUR OS() function to work with DJGPP. + - Modified HARBOUR VERSION() function to format the version info + similar to how Clipper does it (version, build, and date). + * source/rtl/set.c + - Added #include for DJGPP. + * tests/working/makefile.dos + - Added compiler and library to the PRG to C dependency. + + tests/working/version.prg + - Added new module to test the VERSION function. + 19990604-22:07 EST Les. Griffith added logic for msguk.c and msguk.obj to makefile.b32 diff --git a/harbour/include/version.h b/harbour/include/version.h new file mode 100644 index 0000000000..5f89b3ff8c --- /dev/null +++ b/harbour/include/version.h @@ -0,0 +1,27 @@ +/* + * $Id$ + */ + +#ifndef _VERSION_H +#define _VERSION_H + +/* + extern int hb_major; + extern int hb_minor; + extern char * hb_revision; + extern int hb_build; + extern int hb_year; + extern int hb_month; + extern int hb_day; +*/ + + #define hb_major 0 /* Major version number */ + #define hb_minor 0 /* Minor version number */ + #define hb_revision "a" /* Revision letter */ + #define hb_build 219 /* Build number */ + #define hb_year 1999 /* Build year */ + #define hb_month 6 /* Build month */ + #define hb_day 4 /* Build day */ + +#endif + diff --git a/harbour/source/rtl/environ.c b/harbour/source/rtl/environ.c index 7df8194afd..9fb7a3fbc1 100644 --- a/harbour/source/rtl/environ.c +++ b/harbour/source/rtl/environ.c @@ -7,8 +7,9 @@ #endif #include +#include -#if defined(__TURBOC__) || defined(__BORLANDC__) +#if defined(__TURBOC__) || defined(__BORLANDC__) || defined(__DJGPP__) #include #endif @@ -46,7 +47,7 @@ HARBOUR OS() #else -#ifdef __GNUC__ +#if defined(__GNUC__) && !defined(__DJGPP__) #else @@ -166,7 +167,10 @@ HARBOUR OS() HARBOUR VERSION() { - _retc( "Harbour alpha version" ); + char hb_ver[ 80 ]; + sprintf( hb_ver, "Harbour %d.%d%s Intl. (Build %d) (%04d.%02d.%02d)", + hb_major, hb_minor, hb_revision, hb_build, hb_year, hb_month, hb_day ); + _retc( hb_ver ); } HARBOUR GETENV() diff --git a/harbour/source/rtl/set.c b/harbour/source/rtl/set.c index 5c42c1db75..2445ec3f62 100644 --- a/harbour/source/rtl/set.c +++ b/harbour/source/rtl/set.c @@ -6,6 +6,9 @@ #include #include #include +#ifdef __DJGPP__ + #include +#endif #include #include #include diff --git a/harbour/tests/working/makefile.dos b/harbour/tests/working/makefile.dos index 2e06236305..f0dbfd5c71 100644 --- a/harbour/tests/working/makefile.dos +++ b/harbour/tests/working/makefile.dos @@ -13,7 +13,7 @@ $(TARGET): $(TARGET).exe $(TARGET).exe: $(TARGET).o $(CC) $? -L$(HARBOURDIR)/libs -lharb -o $@ -$(TARGET).c: $(TARGET).prg +$(TARGET).c: $(TARGET).prg $(HARBOURDIR)/bin/harbour.exe $(HARBOURDIR)/libs/libharb.a $(HARBOURDIR)/bin/harbour $(TARGET).prg -n $(TARGET).o: $(TARGET).c diff --git a/harbour/tests/working/version.prg b/harbour/tests/working/version.prg new file mode 100644 index 0000000000..b038f4745e --- /dev/null +++ b/harbour/tests/working/version.prg @@ -0,0 +1,7 @@ +// Testing the VERSION function + +function Main() + + QOUT( VERSION() ) + +return nil