diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a48b006f52..0e19109d18 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,17 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-11-10 15:17 UTC+0100 Viktor Szakats (harbour.01 syenar hu) + * contrib/hbcurl/common.mak + * contrib/hbcurl/Makefile + * contrib/hbcurl/hbcurl.c + + contrib/hbcurl/hbcurlm.c + + Some disabled (not mainstream) functions moved to + a separate file. + + * contrib/hbwin/win_prn2.c + * Minor fix in comment. + 2008-11-10 14:41 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbapi.h * harbour/source/common/hbstr.c @@ -34,9 +45,9 @@ ; TOFIX: (this is a complete list of all Pelles C WinCE problems) [except hbmysql errors] - --- WARNINGS POLINK: warning: Multiple '.rdata' sections found with different flags (0x40000040 and 0xc0000040). POLINK: warning: Multiple '.rdata' sections found with different flags (0x40000040 and 0xc0000040). + contrib\gtwvg\gtwvg.h(78): fatal error #1035: Can't find include file . ../../ctnet.c(119): warning #2027: Missing prototype for 'WNetGetLastError'. ../../ctnet.c(167): warning #2027: Missing prototype for 'WNetCancelConnection'. ../../ctnet.c(208): warning #2027: Missing prototype for 'WNetAddConnection'. @@ -44,24 +55,6 @@ ../../ctnet.c(251): warning #2027: Missing prototype for 'WNetGetProviderName'. ../../ctnet.c(271): warning #2027: Missing prototype for 'WNetGetProviderName'. ../../disk.c(127): warning #2027: Missing prototype for 'GetDriveType'. - ../../disk.c(244): warning #2027: Missing prototype for 'SetVolumeLabel'. - ../../disk.c(270): warning #2027: Missing prototype for 'GetVolumeInformation'. - ../../disk.c(307): warning #2027: Missing prototype for 'GetVolumeInformation'. - ../../disk.c(337): warning #2027: Missing prototype for 'GetFullPathName'. - ../../winapi.c(194): warning #2027: Missing prototype for 'InsertMenuItem'. - ../../winapi.c(219): warning #2027: Missing prototype for 'SetMenu'. - ../../getenvrn.c(177): warning #2027: Missing prototype for 'GetEnvironmentStrings'. - ../../getenvrn.c(246): warning #2027: Missing prototype for 'FreeEnvironmentStrings'. - contrib\hbsqlit3\sqlite3\sqlite3.c(9936): warning #2027: Missing prototype for 'localtime'. - ../../tpwin32.c(75): warning #2027: Missing prototype for 'BuildCommDCB'. - ../../wincorec.c(164): warning #2027: Missing prototype for 'CreateMDIWindow'. - ../../fi_winfu.c(97): warning #2027: Missing prototype for 'CreateDIBitmap'. - ../../fi_winfu.c(147): warning #2027: Missing prototype for 'GetDIBits'. - ../../sqlbase.c(509): warning #2130: Result of unsigned comparison is constant. - - --- ERRORS - contrib\gtwvg\gtwvg.h(78): fatal error #1035: Can't find include file . - ../../ctnet.c(119): warning #2027: Missing prototype for 'WNetGetLastError'. ../../disk.c(129): error #2048: Undeclared identifier 'DRIVE_RAMDISK'. ../../disk.c(129): error #2045: Case label must be a constant integer expression. ../../disk.c(132): error #2048: Undeclared identifier 'DRIVE_REMOVABLE'. @@ -72,12 +65,22 @@ ../../disk.c(138): error #2045: Case label must be a constant integer expression. ../../disk.c(141): error #2048: Undeclared identifier 'DRIVE_REMOTE'. ../../disk.c(141): error #2045: Case label must be a constant integer expression. + ../../disk.c(244): warning #2027: Missing prototype for 'SetVolumeLabel'. + ../../disk.c(270): warning #2027: Missing prototype for 'GetVolumeInformation'. + ../../disk.c(307): warning #2027: Missing prototype for 'GetVolumeInformation'. + ../../disk.c(337): warning #2027: Missing prototype for 'GetFullPathName'. ../../winapi.c(70): error #2048: Undeclared identifier 'CS_OWNDC'. ../../winapi.c(75): error #2048: Undeclared identifier 'IDI_APPLICATION'. ../../winapi.c(75): error #2140: Type error in argument 2 to 'LoadIconW'; found 'int', expected 'const wchar_t *'. ../../winapi.c(181): error #2048: Undeclared identifier 'MFS_DISABLED'. + ../../winapi.c(194): warning #2027: Missing prototype for 'InsertMenuItem'. + ../../winapi.c(219): warning #2027: Missing prototype for 'SetMenu'. ../../getenvrn.c(177): error #2168: Operands of = have incompatible types 'wchar_t *' and 'int'. + ../../getenvrn.c(177): warning #2027: Missing prototype for 'GetEnvironmentStrings'. + ../../getenvrn.c(246): warning #2027: Missing prototype for 'FreeEnvironmentStrings'. ../../odbc.c(94): fatal error #1035: Can't find include file . + ../../win_ole.c(77): fatal error #1035: Can't find include file . + contrib\hbsqlit3\sqlite3\sqlite3.c(9936): warning #2027: Missing prototype for 'localtime'. contrib\hbsqlit3\sqlite3\sqlite3.c(9936): error #2168: Operands of = have incompatible types '(incomplete) struct tm *' and 'int'. contrib\hbsqlit3\sqlite3\sqlite3.c(9937): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'. contrib\hbsqlit3\sqlite3\sqlite3.c(9938): error #2152: Unknown field 'tm_mon' of '(incomplete) struct tm'. @@ -95,9 +98,13 @@ contrib\hbsqlit3\sqlite3\sqlite3.c(22151): error #2152: Unknown field 'tm_hour' of '(incomplete) struct tm'. contrib\hbsqlit3\sqlite3\sqlite3.c(22152): error #2152: Unknown field 'tm_min' of '(incomplete) struct tm'. contrib\hbsqlit3\sqlite3\sqlite3.c(22153): error #2152: Unknown field 'tm_sec' of '(incomplete) struct tm'. - ../../win_ole.c(77): fatal error #1035: Can't find include file . + ../../tpwin32.c(75): warning #2027: Missing prototype for 'BuildCommDCB'. ../../wincorec.c(150): error #2048: Undeclared identifier 'WS_MAXIMIZE'. + ../../wincorec.c(164): warning #2027: Missing prototype for 'CreateMDIWindow'. ../../wincorec.c(166): error #2168: Operands of = have incompatible types 'HWND' and 'int'. + ../../fi_winfu.c(97): warning #2027: Missing prototype for 'CreateDIBitmap'. + ../../fi_winfu.c(147): warning #2027: Missing prototype for 'GetDIBits'. + ../../sqlbase.c(509): warning #2130: Result of unsigned comparison is constant. C:\devl\allegro-4.2.2\include\allegro\platform\almsvc.h(23): fatal error #1035: Can't find include file . ../../firebird.c(456): error #2149: Undefined size for 'times' with type '(incomplete) struct tm'. ../../firebird.c(487): error #2152: Unknown field 'tm_year' of '(incomplete) struct tm'. diff --git a/harbour/contrib/hbcurl/Makefile b/harbour/contrib/hbcurl/Makefile index 81b58fc394..ac1ff3ca0d 100644 --- a/harbour/contrib/hbcurl/Makefile +++ b/harbour/contrib/hbcurl/Makefile @@ -26,6 +26,7 @@ C_USR += $(foreach d, $(HB_INC_CURL_OK), -I$(d)) $(HB_HBCURL_USR_C) C_SOURCES=\ hbcurl.c \ + hbcurlm.c \ PRG_HEADERS=\ hbcurl.ch \ diff --git a/harbour/contrib/hbcurl/common.mak b/harbour/contrib/hbcurl/common.mak index 9e96c12b42..c5a483797d 100644 --- a/harbour/contrib/hbcurl/common.mak +++ b/harbour/contrib/hbcurl/common.mak @@ -11,6 +11,7 @@ PRG_HEADERS = \ LIB_OBJS = \ $(OBJ_DIR)hbcurl$(OBJEXT) \ + $(OBJ_DIR)hbcurlm$(OBJEXT) \ all: \ $(LIB_PATH) \ diff --git a/harbour/contrib/hbcurl/hbcurl.c b/harbour/contrib/hbcurl/hbcurl.c index 4c99968e82..2a346acd97 100644 --- a/harbour/contrib/hbcurl/hbcurl.c +++ b/harbour/contrib/hbcurl/hbcurl.c @@ -55,9 +55,6 @@ #include "curl/curl.h" #include "curl/types.h" #include "curl/easy.h" -#if 0 -#include "curl/multi.h" -#endif #include "hbapi.h" #include "hbapiitm.h" @@ -1775,36 +1772,6 @@ HB_FUNC( CURL_EASY_UNESCAPE ) /* ---------------------------------------------------------------------------- */ /* Harbour interface (session independent) */ -#if 0 - -/* NOTE: Obsolete, superceded by curl_easy_escape() */ -HB_FUNC( CURL_ESCAPE ) -{ - if( ISCHAR( 1 ) ) - { - char * buffer = curl_escape( hb_parc( 1 ), hb_parclen( 1 ) ); - hb_retc( buffer ); - curl_free( buffer ); - } - else - hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); -} - -/* NOTE: Obsolete, superceded by curl_easy_unescape() */ -HB_FUNC( CURL_UNESCAPE ) -{ - if( ISCHAR( 1 ) ) - { - char * buffer = curl_unescape( hb_parc( 1 ), hb_parclen( 1 ) ); - hb_retc( buffer ); - curl_free( buffer ); - } - else - hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); -} - -#endif - HB_FUNC( CURL_VERSION ) { hb_retc( curl_version() ); @@ -1866,24 +1833,6 @@ HB_FUNC( CURL_EASY_STRERROR ) hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); } -#if 0 -HB_FUNC( CURL_SHARE_STRERROR ) -{ - if( ISNUM( 1 ) ) - hb_retc( curl_share_strerror( ( CURLSHcode ) hb_parnl( 1 ) ) ); - else - hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); -} - -HB_FUNC( CURL_MULTI_STRERROR ) -{ - if( ISNUM( 1 ) ) - hb_retc( curl_multi_strerror( ( CURLMcode ) hb_parnl( 1 ) ) ); - else - hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); -} -#endif - #endif /* NOTE: This returns the number of seconds since January 1st 1970 in the UTC time zone. */ diff --git a/harbour/contrib/hbcurl/hbcurlm.c b/harbour/contrib/hbcurl/hbcurlm.c new file mode 100644 index 0000000000..4c5280081e --- /dev/null +++ b/harbour/contrib/hbcurl/hbcurlm.c @@ -0,0 +1,110 @@ +/* + * $Id$ + */ + +/* + * Harbour Project source code: + * libcurl misc API - Harbour interface. + * + * Copyright 2008 Viktor Szakats + * www - http://www.harbour-project.org + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this software; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place, Suite 330, + * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/). + * + * As a special exception, the Harbour Project gives permission for + * additional uses of the text contained in its release of Harbour. + * + * The exception is that, if you link the Harbour libraries with other + * files to produce an executable, this does not by itself cause the + * resulting executable to be covered by the GNU General Public License. + * Your use of that executable is in no way restricted on account of + * linking the Harbour library code into it. + * + * This exception does not however invalidate any other reasons why + * the executable file might be covered by the GNU General Public License. + * + * This exception applies only to the code released by the Harbour + * Project under the name Harbour. If you copy code from other + * Harbour Project or Free Software Foundation releases into a copy of + * Harbour, as the General Public License permits, the exception does + * not apply to the code that you add in this way. To avoid misleading + * anyone as to the status of such modified files, you must delete + * this exception notice from them. + * + * If you write modifications of your own for Harbour, it is your choice + * whether to permit this exception to apply to your modifications. + * If you do not wish that, delete this exception notice. + * + */ + +#include "curl/curl.h" +#include "curl/types.h" +#include "curl/multi.h" + +#include "hbapi.h" +#include "hbapierr.h" + +#if LIBCURL_VERSION_NUM >= 0x070C00 + +HB_FUNC( CURL_MULTI_STRERROR ) +{ + if( ISNUM( 1 ) ) + hb_retc( curl_multi_strerror( ( CURLMcode ) hb_parnl( 1 ) ) ); + else + hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); +} + +#endif + +#if LIBCURL_VERSION_NUM >= 0x070C00 + +HB_FUNC( CURL_SHARE_STRERROR ) +{ + if( ISNUM( 1 ) ) + hb_retc( curl_share_strerror( ( CURLSHcode ) hb_parnl( 1 ) ) ); + else + hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); +} + +#endif + +/* Harbour interface (session independent) */ + +/* NOTE: Obsolete, superceded by curl_easy_escape() */ +HB_FUNC( CURL_ESCAPE ) +{ + if( ISCHAR( 1 ) ) + { + char * buffer = curl_escape( hb_parc( 1 ), hb_parclen( 1 ) ); + hb_retc( buffer ); + curl_free( buffer ); + } + else + hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); +} + +/* NOTE: Obsolete, superceded by curl_easy_unescape() */ +HB_FUNC( CURL_UNESCAPE ) +{ + if( ISCHAR( 1 ) ) + { + char * buffer = curl_unescape( hb_parc( 1 ), hb_parclen( 1 ) ); + hb_retc( buffer ); + curl_free( buffer ); + } + else + hb_errRT_BASE( EG_ARG, 2010, NULL, HB_ERR_FUNCNAME, HB_ERR_ARGS_BASEPARAMS ); +} diff --git a/harbour/contrib/hbwin/win_prn2.c b/harbour/contrib/hbwin/win_prn2.c index 0e7ec0bed9..73ea505712 100644 --- a/harbour/contrib/hbwin/win_prn2.c +++ b/harbour/contrib/hbwin/win_prn2.c @@ -4,8 +4,8 @@ /* * Harbour Project source code: - * Tprinter.cpp * Harbour THarbourPrinter C++ Class for Harbour print support + * * Copyright 2002 Luiz Rafael Culik * www - http://www.harbour-project.org *