From 60f8ef1aa46f1f1d4870645c8429f65d027d2761 Mon Sep 17 00:00:00 2001 From: Lorenzo Fiorini Date: Wed, 9 May 2007 08:08:49 +0000 Subject: [PATCH] 2007-05-09 10:10 UTC+0200 Lorenzo Fiorini (lorenzo.fiorini/at/gmail.com) * harbour/config/w32/mingw32.cf * fixed typo * harbour/include/Makefile * removed reference to deleted hbrddwrk.h * harbour/include/std.ch * added SET EOL clause * harbour/include/hbcompat.ch * fixed typos and added TEXT INTO * harbour/contrib/gd/Makefile * fixed install of includes * harbour/contrib/gd/gdwrp.c * fixed warnings --- harbour/ChangeLog | 14 ++++++++++++ harbour/config/w32/mingw32.cf | 2 +- harbour/contrib/gd/Makefile | 9 +++++--- harbour/contrib/gd/gdwrp.c | 42 +++++++++++++++++------------------ harbour/include/Makefile | 1 - harbour/include/hbcompat.ch | 6 +++-- harbour/include/std.ch | 1 + 7 files changed, 47 insertions(+), 28 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8ad6888d79..2cc5710602 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,20 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-05-09 10:10 UTC+0200 Lorenzo Fiorini (lorenzo.fiorini/at/gmail.com) + * harbour/config/w32/mingw32.cf + * fixed typo + * harbour/include/Makefile + * removed reference to deleted hbrddwrk.h + * harbour/include/std.ch + * added SET EOL clause + * harbour/include/hbcompat.ch + * fixed typos and added TEXT INTO + * harbour/contrib/gd/Makefile + * fixed install of includes + * harbour/contrib/gd/gdwrp.c + * fixed warnings + 2007-05-08 16:06 UTC+0300 Chen Kedem * source/rtl/mlctopos.c ! Make the function MLCTOPOS() more compatible. diff --git a/harbour/config/w32/mingw32.cf b/harbour/config/w32/mingw32.cf index 6b3e82f962..9b1bd077f0 100644 --- a/harbour/config/w32/mingw32.cf +++ b/harbour/config/w32/mingw32.cf @@ -55,7 +55,7 @@ LDLIBS += -l$(HB_GT_LIB) ifneq ($(HB_GT_DEFAULT),) ifneq ($(HB_GT_DEFAULT),$(HB_GT_LIB)) LINKPATHS += -L$(TOP)$(ROOT)source/rtl/$(HB_GT_DEFAULT)/$(HB_ARCH) -LDLIB += -l$(HB_GT_DEFAULT) +LDLIBS += -l$(HB_GT_DEFAULT) endif endif diff --git a/harbour/contrib/gd/Makefile b/harbour/contrib/gd/Makefile index 4184861a51..44edcc7006 100644 --- a/harbour/contrib/gd/Makefile +++ b/harbour/contrib/gd/Makefile @@ -15,12 +15,10 @@ PRG_SOURCES=\ gdbar.prg \ gdchart.prg \ gdimage.prg \ - gdbarcod.prg + gdbarcod.prg \ LIBNAME=hbgd -include $(TOP)$(ROOT)config/lib.cf - ifeq ($(HB_COMPILER),mingw32) CFLAGS := $(CFLAGS) -I/usr/include else @@ -28,4 +26,9 @@ else endif include $(TOP)$(ROOT)config/header.cf +INSTALL_RULE_HEADERS := $(INSTALL_RULE) +include $(TOP)$(ROOT)config/lib.cf + +install:: + $(INSTALL_RULE_HEADERS) diff --git a/harbour/contrib/gd/gdwrp.c b/harbour/contrib/gd/gdwrp.c index d17e7d3a6a..d6ff8325cc 100644 --- a/harbour/contrib/gd/gdwrp.c +++ b/harbour/contrib/gd/gdwrp.c @@ -175,26 +175,9 @@ static void SaveImageToFile( char *szFile, void *iptr, int sz ) /* ---------------------------------------------------------------------------*/ -static void AddImageToFile( char *szFile, void *iptr, int sz ) -{ - FHANDLE fhandle; - - if ( ( fhandle = hb_fsOpen( ( BYTE * ) szFile, FO_READWRITE ) ) != FS_ERROR ) - { - /* move to end of file */ - hb_fsSeek(fhandle, 0, FS_END); - - /* Write Image */ - SaveImageToHandle( fhandle, ( BYTE *) iptr, (ULONG) sz ); - - /* Close file */ - hb_fsClose( fhandle ); - } -} - static void GDImageCreateFrom( int nType ) { - gdImagePtr im; + gdImagePtr im = NULL; char *szFile; int sz; void *iptr; @@ -294,9 +277,9 @@ static void GDImageSaveTo( int nType ) gdImagePtr im; char *szFile; int sz; - void *iptr; + void *iptr = NULL; FHANDLE fhandle; - int level, fg; + int level = 0, fg = 0; /* Retrieve image pointer */ im = (gdImagePtr)hb_parptr(1); @@ -3830,6 +3813,24 @@ HB_FUNC( GDIMAGEINTERLACE ) // void gdImageInterlace(gdImagePtr im, int interlac /* ---------------------------------------------------------------------------*/ #if ( GD_VERS >= 2033 ) + +static void AddImageToFile( char *szFile, void *iptr, int sz ) +{ + FHANDLE fhandle; + + if ( ( fhandle = hb_fsOpen( ( BYTE * ) szFile, FO_READWRITE ) ) != FS_ERROR ) + { + /* move to end of file */ + hb_fsSeek(fhandle, 0, FS_END); + + /* Write Image */ + SaveImageToHandle( fhandle, ( BYTE *) iptr, (ULONG) sz ); + + /* Close file */ + hb_fsClose( fhandle ); + } +} + //BGD_DECLARE(void *) gdImageGifAnimBeginPtr(gdImagePtr im, int *size, int GlobalCM, int Loops); // implementation: (void *) gdImageGifAnimBegin( gdImagePtr im, cFile | nHandle, int GlobalCM, int Loops); HB_FUNC( GDIMAGEGIFANIMBEGIN ) @@ -4008,6 +4009,5 @@ HB_FUNC( GDIMAGEGIFANIMEND ) } } - /* ---------------------------------------------------------------------------*/ #endif // ( GD_VERS >= 2033 ) diff --git a/harbour/include/Makefile b/harbour/include/Makefile index b2f1009425..bee3bb3ebe 100644 --- a/harbour/include/Makefile +++ b/harbour/include/Makefile @@ -41,7 +41,6 @@ C_HEADERS=\ hbrdddel.h \ hbrddntx.h \ hbrddsdf.h \ - hbrddwrk.h \ hbregex.h \ hbset.h \ hbsetup.h \ diff --git a/harbour/include/hbcompat.ch b/harbour/include/hbcompat.ch index 6acd03a34f..653c806e42 100644 --- a/harbour/include/hbcompat.ch +++ b/harbour/include/hbcompat.ch @@ -67,7 +67,7 @@ #xtranslate hb_gtInfo([]) => gtInfo([]) #xtranslate hb_gtVersion([]) => hb_gt_Version([]) - #xtranslate isregex([]) => isregexstring([]) + #xtranslate hb_isregex([]) => hb_isregexstring([]) #else @@ -82,7 +82,7 @@ #xtranslate gfxPrimitive([])=> hb_gfxPrimitive([]) #xtranslate gfxText([]) => hb_gfxText([]) - #xtranslate isregexstring([]) => isregex([]) + #xtranslate hb_isregexstring([]) => hb_isregex([]) /* SWITCH ... ; case ... ; DEFAULT ; ... ; END */ #xcommand DEFAULT => OTHERWISE @@ -116,6 +116,8 @@ #xtranslate NUMTOHEX() => NTOC(, 16) #xtranslate HEXTONUM() => CTON(, 16) + #xcommand TEXT INTO => #pragma __text|+=%s+HB_OSNEWLINE();:="" + #endif #endif /* __HARBOUR__ */ diff --git a/harbour/include/std.ch b/harbour/include/std.ch index ce0246891e..48a366bd22 100644 --- a/harbour/include/std.ch +++ b/harbour/include/std.ch @@ -667,6 +667,7 @@ #command SET DBFLOCKSCHEME TO => Set( _SET_DBFLOCKSCHEME, 0 ) #command SET HARDCOMMIT => Set( _SET_HARDCOMMIT, <(x)> ) #command SET HARDCOMMIT () => Set( _SET_HARDCOMMIT, ) + #command SET EOL => Set( _SET_EOL, ) #endif #endif /* HB_STD_CH_ */