2007-11-17 03:08 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* make_vcce.bat
* make_vcce.mak
! Minor corrections (syncing with existing files).
* doc/genhtm.bat
! Minor fix to make it work out of the box.
- Some obsolete stuff removed from it.
* include/hbapiitm.h
* include/hbapi.h
* source/vm/itemapi.c
+ Added hb_itemPutCLConst() which is the same as
hb_itemPutCConst() but the buffer length can be passed.
Same as xhb hb_itemPutCRawStatic().
+ contrib/xhb/hbcompat.h
+ Added C level compatibility header file.
* contrib/win32/w32_ole.c
! hb_itemPutCRawStatic() -> hb_itemPutCLConst()
! Some more xhb API calls changed to Harbour ones.
! TraceLog() -> HB_TRACE()
! HB_ITEM s_OleAuto -> PHB_ITEM s_pOleAuto
TOFIX (new): s_pOleAuto is not freed on app exit.
! Fixed a few more internal accesses by using API
calls.
; NOTE: There are four more complicated problems here
to be solved:
1) hb_stackSetActionRequest() call
2) Passing direct references to HB_ITEM .value
members to external functions.
3) Storing "hidden" information in string ITEMs
prepended after the strings' actual content.
4) Not freeing s_pOleAuto (this var BTW is used in
one static function only)
* source/rtl/hbinet.c
* source/rdd/dbcmd.c
! Changed some xhb C level API calls to Harbour ones.
* contrib/xhb/Makefile
* contrib/freeimage/Makefile
* contrib/apollo/Makefile
* contrib/firebird/Makefile
* contrib/libct/Makefile
* contrib/telepath/Makefile
* contrib/pgsql/Makefile
* contrib/gd/Makefile
* contrib/libnf/Makefile
* contrib/tip/Makefile
* contrib/adordd/Makefile
* contrib/rdd_ads/Makefile
* contrib/btree/Makefile
* contrib/samples/Makefile
* contrib/mysql/Makefile
* contrib/odbc/Makefile
* contrib/pdflib/Makefile
! Added C and Harbour public headers to GNU makefiles.
! Added one missing SVN header.
* contrib/pdflib/pdfhbdoc.ch
* contrib/pdflib/pdf.ch
! Added missing SVN headers.
- contrib/pdflib/pdflib.h
- Removed this file which belongs to the pdflib
package. This package is needed anyway to use
this contrib. (but the contrib is badly broken)
* contrib/pdflib/make_b32.bat
* contrib/pdflib/make_vc.bat
! Minor typo.
* source/rtl/persist.prg
! Prefixed static var name with "s_"
This commit is contained in:
@@ -8,6 +8,83 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2007-11-17 03:08 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* make_vcce.bat
|
||||
* make_vcce.mak
|
||||
! Minor corrections (syncing with existing files).
|
||||
|
||||
* doc/genhtm.bat
|
||||
! Minor fix to make it work out of the box.
|
||||
- Some obsolete stuff removed from it.
|
||||
|
||||
* include/hbapiitm.h
|
||||
* include/hbapi.h
|
||||
* source/vm/itemapi.c
|
||||
+ Added hb_itemPutCLConst() which is the same as
|
||||
hb_itemPutCConst() but the buffer length can be passed.
|
||||
Same as xhb hb_itemPutCRawStatic().
|
||||
|
||||
+ contrib/xhb/hbcompat.h
|
||||
+ Added C level compatibility header file.
|
||||
|
||||
* contrib/win32/w32_ole.c
|
||||
! hb_itemPutCRawStatic() -> hb_itemPutCLConst()
|
||||
! Some more xhb API calls changed to Harbour ones.
|
||||
! TraceLog() -> HB_TRACE()
|
||||
! HB_ITEM s_OleAuto -> PHB_ITEM s_pOleAuto
|
||||
TOFIX (new): s_pOleAuto is not freed on app exit.
|
||||
! Fixed a few more internal accesses by using API
|
||||
calls.
|
||||
; NOTE: There are four more complicated problems here
|
||||
to be solved:
|
||||
1) hb_stackSetActionRequest() call
|
||||
2) Passing direct references to HB_ITEM .value
|
||||
members to external functions.
|
||||
3) Storing "hidden" information in string ITEMs
|
||||
prepended after the strings' actual content.
|
||||
4) Not freeing s_pOleAuto (this var BTW is used in
|
||||
one static function only)
|
||||
|
||||
* source/rtl/hbinet.c
|
||||
* source/rdd/dbcmd.c
|
||||
! Changed some xhb C level API calls to Harbour ones.
|
||||
|
||||
* contrib/xhb/Makefile
|
||||
* contrib/freeimage/Makefile
|
||||
* contrib/apollo/Makefile
|
||||
* contrib/firebird/Makefile
|
||||
* contrib/libct/Makefile
|
||||
* contrib/telepath/Makefile
|
||||
* contrib/pgsql/Makefile
|
||||
* contrib/gd/Makefile
|
||||
* contrib/libnf/Makefile
|
||||
* contrib/tip/Makefile
|
||||
* contrib/adordd/Makefile
|
||||
* contrib/rdd_ads/Makefile
|
||||
* contrib/btree/Makefile
|
||||
* contrib/samples/Makefile
|
||||
* contrib/mysql/Makefile
|
||||
* contrib/odbc/Makefile
|
||||
* contrib/pdflib/Makefile
|
||||
! Added C and Harbour public headers to GNU makefiles.
|
||||
! Added one missing SVN header.
|
||||
|
||||
* contrib/pdflib/pdfhbdoc.ch
|
||||
* contrib/pdflib/pdf.ch
|
||||
! Added missing SVN headers.
|
||||
|
||||
- contrib/pdflib/pdflib.h
|
||||
- Removed this file which belongs to the pdflib
|
||||
package. This package is needed anyway to use
|
||||
this contrib. (but the contrib is badly broken)
|
||||
|
||||
* contrib/pdflib/make_b32.bat
|
||||
* contrib/pdflib/make_vc.bat
|
||||
! Minor typo.
|
||||
|
||||
* source/rtl/persist.prg
|
||||
! Prefixed static var name with "s_"
|
||||
|
||||
2007-11-16 21:00 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/win32/w32_ole.c
|
||||
! Some trivial cases fixed where low-level stuff was
|
||||
|
||||
@@ -7,6 +7,9 @@ ROOT = ../../
|
||||
PRG_SOURCES= \
|
||||
adordd.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
adordd.ch \
|
||||
|
||||
LIBNAME=adordd
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
C_SOURCES= \
|
||||
apollo.c
|
||||
C_SOURCES=\
|
||||
apollo.c \
|
||||
|
||||
PRG_SOURCES=\
|
||||
apollo1.prg \
|
||||
|
||||
@@ -8,13 +8,13 @@ C_SOURCES=\
|
||||
hb_btree.c \
|
||||
|
||||
C_HEADERS=\
|
||||
hb_btree.api
|
||||
hb_btree.api \
|
||||
|
||||
PRG_SOURCES=\
|
||||
tbtree.prg \
|
||||
tbtree.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
hb_btree.ch
|
||||
hb_btree.ch \
|
||||
|
||||
LIBNAME=hbbtree
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ C_SOURCES=\
|
||||
firebird.c \
|
||||
|
||||
PRG_SOURCES=\
|
||||
tfirebird.prg \
|
||||
tfirebird.prg \
|
||||
|
||||
LIBNAME=firebird
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@ C_SOURCES = \
|
||||
|
||||
PRG_SOURCES= \
|
||||
|
||||
PRG_HEADERS=\
|
||||
freeimage.ch \
|
||||
|
||||
LIBNAME=fi_lib
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
@@ -9,9 +9,10 @@ C_SOURCES=\
|
||||
|
||||
PRG_HEADERS=\
|
||||
gd.ch \
|
||||
gdexternal.ch \
|
||||
|
||||
PRG_SOURCES=\
|
||||
gd.prg \
|
||||
gd.prg \
|
||||
gdbar.prg \
|
||||
gdchart.prg \
|
||||
gdimage.prg \
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
C_SOURCES = \
|
||||
C_SOURCES =\
|
||||
addascii.c \
|
||||
asciisum.c \
|
||||
ascpos.c \
|
||||
@@ -82,7 +82,7 @@ C_SOURCES = \
|
||||
wordrepl.c \
|
||||
wordtoch.c \
|
||||
|
||||
PRG_SOURCES= \
|
||||
PRG_SOURCES=\
|
||||
blank.prg \
|
||||
ct.prg \
|
||||
ctmisc.prg \
|
||||
@@ -99,6 +99,13 @@ PRG_SOURCES= \
|
||||
scrmark.prg \
|
||||
showtime.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
ct.ch \
|
||||
ctdisk.ch \
|
||||
cterror.ch \
|
||||
ctextern.ch \
|
||||
ctvideo.ch \
|
||||
|
||||
LIBNAME=ct
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
C_SOURCES = \
|
||||
C_SOURCES =\
|
||||
alt.c \
|
||||
caplock.c \
|
||||
chdir.c \
|
||||
@@ -36,12 +36,12 @@ C_SOURCES = \
|
||||
shift.c \
|
||||
stod.c \
|
||||
|
||||
BAD_C_SOURCES = \
|
||||
BAD_C_SOURCES =\
|
||||
ontick.c \
|
||||
peek.c \
|
||||
poke.c \
|
||||
|
||||
PRG_SOURCES= \
|
||||
PRG_SOURCES=\
|
||||
aading.prg \
|
||||
aavg.prg \
|
||||
acctadj.prg \
|
||||
@@ -144,9 +144,12 @@ PRG_SOURCES= \
|
||||
xbox.prg \
|
||||
year.prg \
|
||||
|
||||
BAD_PRG_SOURCES= \
|
||||
BAD_PRG_SOURCES=\
|
||||
mouse1.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
ftmenuto.ch \
|
||||
|
||||
LIBNAME=nf
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
@@ -8,9 +8,12 @@ C_SOURCES=\
|
||||
mysql.c \
|
||||
|
||||
PRG_SOURCES=\
|
||||
tmysql.prg \
|
||||
tmysql.prg \
|
||||
tsqlbrw.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
mysql.ch \
|
||||
|
||||
LIBNAME=hbmysql
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
@@ -7,11 +7,12 @@ ROOT = ../../
|
||||
C_SOURCES= \
|
||||
odbc.c \
|
||||
|
||||
|
||||
PRG_SOURCES= \
|
||||
todbc.prg \
|
||||
browodbc.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
sql.ch \
|
||||
|
||||
LIBNAME=hbodbc
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ PRG_SOURCES= \
|
||||
pdf1.prg \
|
||||
# pdfhbdocs.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
pdf.ch \
|
||||
|
||||
LIBNAME=hbpdflib
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
@@ -4,7 +4,7 @@ rem $Id$
|
||||
rem
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
rem IMPORTANT: You'll need PDFLIB lib sources this envvar
|
||||
rem IMPORTANT: You'll need PDFLIB lib sources and this envvar
|
||||
rem to be set to successfully build this library:
|
||||
rem set C_USR=-IC:\pdflib\src\pdflib
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
@@ -4,7 +4,7 @@ rem $Id$
|
||||
rem
|
||||
|
||||
rem ---------------------------------------------------------------
|
||||
rem IMPORTANT: You'll need PDFLIB lib sources this envvar
|
||||
rem IMPORTANT: You'll need PDFLIB lib sources and this envvar
|
||||
rem to be set to successfully build this library:
|
||||
rem set C_USR=-IC:\pdflib\src\pdflib
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
#include "fileio.ch"
|
||||
#include "common.ch"
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/* Defines */
|
||||
#define FONTBOLD "Courier-Bold"
|
||||
#define FONTNORMAL "Courier"
|
||||
|
||||
@@ -1,681 +0,0 @@
|
||||
/*---------------------------------------------------------------------------*
|
||||
| PDFlib - A library for dynamically generating PDF documents |
|
||||
+---------------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2000 Thomas Merz. All rights reserved. |
|
||||
+---------------------------------------------------------------------------+
|
||||
| This software is NOT in the public domain. It can be used under two |
|
||||
| substantially different licensing terms: |
|
||||
| |
|
||||
| The commercial license is available for a fee, and allows you to |
|
||||
| - ship a commercial product based on PDFlib |
|
||||
| - implement commercial Web services with PDFlib |
|
||||
| - distribute (free or commercial) software when the source code is |
|
||||
| not made available |
|
||||
| Details can be found in the file PDFlib-license.pdf. |
|
||||
| |
|
||||
| The "Aladdin Free Public License" doesn't require any license fee, |
|
||||
| and allows you to |
|
||||
| - develop and distribute PDFlib-based software for which the complete |
|
||||
| source code is made available |
|
||||
| - redistribute PDFlib non-commercially under certain conditions |
|
||||
| - redistribute PDFlib on digital media for a fee if the complete |
|
||||
| contents of the media are freely redistributable |
|
||||
| Details can be found in the file aladdin-license.pdf. |
|
||||
| |
|
||||
| These conditions extend to ports to other programming languages. |
|
||||
| PDFlib is distributed with no warranty of any kind. Commercial users, |
|
||||
| however, will receive warranty and support statements in writing. |
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
/* pdflib.h
|
||||
*
|
||||
* PDFlib public function and constant declarations
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef PDFLIB_H
|
||||
#define PDFLIB_H
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* Setup, mostly Windows calling conventions and DLL stuff
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#ifndef SWIG
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#define PDFLIB_CALL __cdecl
|
||||
|
||||
#ifdef PDFLIB_EXPORTS
|
||||
#define PDFLIB_API __declspec(dllexport) /* prepare a DLL (PDFlib-internal use only) */
|
||||
|
||||
#elif defined(PDFLIB_DLL)
|
||||
#define PDFLIB_API __declspec(dllimport) /* PDFlib clients - import PDFlib DLL fcts. */
|
||||
|
||||
#else /* !PDFLIB_DLL */
|
||||
#define PDFLIB_API /* */ /* default: generate or use static library */
|
||||
|
||||
#endif /* !PDFLIB_DLL */
|
||||
|
||||
#else /* !WIN32 */
|
||||
|
||||
#if (((defined __IBMC__) || (defined __IBMCPP__)) && (defined __DLL__))
|
||||
#define PDFLIB_CALL _Export
|
||||
#define PDFLIB_API
|
||||
#endif /* IBM VisualAge C++ DLL */
|
||||
|
||||
#ifndef PDFLIB_CALL
|
||||
#define PDFLIB_CALL
|
||||
#endif
|
||||
#ifndef PDFLIB_API
|
||||
#define PDFLIB_API
|
||||
#endif
|
||||
|
||||
#endif /* !WIN32 */
|
||||
|
||||
/* Make our declarations C++ compatible */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Define the basic PDF type. This is used opaquely at the API level. */
|
||||
typedef struct PDF_s PDF;
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* p_basic.c
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* General Functions */
|
||||
|
||||
#ifndef SWIG
|
||||
/*
|
||||
* The version defines below may be used to check the version of the
|
||||
* include file against the library. This is not reasonable at the
|
||||
* scripting API level since both version constants and version functions
|
||||
* are supplied from the library in this case.
|
||||
*/
|
||||
|
||||
/* PDFlib version number, major part */
|
||||
#define PDFLIB_MAJORVERSION 3
|
||||
|
||||
/* PDFlib version number, minor part (must use two decimal places if != 0) */
|
||||
#define PDFLIB_MINORVERSION 02
|
||||
#define PDFLIB_VERSIONSTRING "3.02"
|
||||
|
||||
/*
|
||||
* ActiveX uses the Class ID;
|
||||
* Tcl and Perl have intrinsic versioning which we make use of;
|
||||
*/
|
||||
#if !defined(PDFLIB_ACTIVEX) && !defined(PDFLIB_TCL) && !defined(PDFLIB_PERL)
|
||||
|
||||
/* Returns the PDFlib major version number. */
|
||||
PDFLIB_API int PDFLIB_CALL
|
||||
PDF_get_majorversion(void);
|
||||
|
||||
/* Returns the PDFlib minor version number. */
|
||||
PDFLIB_API int PDFLIB_CALL
|
||||
PDF_get_minorversion(void);
|
||||
|
||||
#endif /* !defined(PDFLIB_ACTIVEX) && !defined(PDFLIB_TCL) && !defined(PDFLIB_PERL) */
|
||||
|
||||
/* Boot PDFlib. Recommended although currently not required.
|
||||
Booting is done automatically for Java, Tcl, Perl, and Python. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_boot(void);
|
||||
|
||||
/* Shut down PDFlib. Recommended although currently not required. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_shutdown(void);
|
||||
|
||||
/* This typedef is required to pacify the Watcom compiler in C++ mode. */
|
||||
typedef void (*errorproc)(PDF *p, int type, const char *msg);
|
||||
|
||||
/* Create a new PDF object. Returns a pointer to the opaque PDF datatype
|
||||
which you will need as the "p" argument for all other functions. All
|
||||
function pointers may be NULL if default handlers are to be used. */
|
||||
PDFLIB_API PDF * PDFLIB_CALL
|
||||
PDF_new2(errorproc errorhandler,
|
||||
void* (*allocproc)(PDF *p, size_t size, const char *caller),
|
||||
void* (*reallocproc)(PDF *p, void *mem, size_t size, const char *caller),
|
||||
void (*freeproc)(PDF *p, void *mem),
|
||||
void *opaque);
|
||||
|
||||
/* Fetch opaque application pointer stored in PDFlib (useful for
|
||||
multi-threading) */
|
||||
PDFLIB_API void * PDFLIB_CALL
|
||||
PDF_get_opaque(PDF *p);
|
||||
|
||||
#endif /* !SWIG */
|
||||
|
||||
/* Create a new PDF object. */
|
||||
PDFLIB_API PDF * PDFLIB_CALL
|
||||
PDF_new(void);
|
||||
|
||||
/* Delete the PDF object. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_delete(PDF *p);
|
||||
|
||||
/* Open a new PDF file associated with p, using the supplied file name.
|
||||
Returns -1 on error. */
|
||||
PDFLIB_API int PDFLIB_CALL
|
||||
PDF_open_file(PDF *p, const char *filename);
|
||||
|
||||
/* Close the generated PDF file. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_close(PDF *p);
|
||||
|
||||
#if !defined(SWIG)
|
||||
/* Open a new PDF file associated with p, using the supplied file handle.
|
||||
Returns -1 on error. */
|
||||
PDFLIB_API int PDFLIB_CALL
|
||||
PDF_open_fp(PDF *p, FILE *fp);
|
||||
|
||||
/* Open a new PDF in memory, and install a callback for fetching the data */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_open_mem(PDF *p, size_t (*writeproc)(PDF *p, void *data, size_t size));
|
||||
#endif /* !defined(SWIG) */
|
||||
|
||||
/* Get the contents of the PDF output buffer. The result must be used
|
||||
by the client before calling any other PDFlib function. Must not be
|
||||
called within page descriptions. */
|
||||
PDFLIB_API const char * PDFLIB_CALL
|
||||
PDF_get_buffer(PDF *p, long *size);
|
||||
|
||||
/* Start a new page. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_begin_page(PDF *p, float width, float height);
|
||||
|
||||
/* Finish the page. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_end_page(PDF *p);
|
||||
|
||||
#ifndef SWIG
|
||||
/* PDFlib exceptions which may be handled by a user-supplied error handler */
|
||||
#define PDF_MemoryError 1
|
||||
#define PDF_IOError 2
|
||||
#define PDF_RuntimeError 3
|
||||
#define PDF_IndexError 4
|
||||
#define PDF_TypeError 5
|
||||
#define PDF_DivisionByZero 6
|
||||
#define PDF_OverflowError 7
|
||||
#define PDF_SyntaxError 8
|
||||
#define PDF_ValueError 9
|
||||
#define PDF_SystemError 10
|
||||
#define PDF_NonfatalError 11
|
||||
#define PDF_UnknownError 12
|
||||
|
||||
#endif /* !SWIG */
|
||||
|
||||
/* Set some PDFlib parameter with string type */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_set_parameter(PDF *p, const char *key, const char *value);
|
||||
|
||||
/* Set the contents of some PDFlib parameter with string type */
|
||||
PDFLIB_API const char * PDFLIB_CALL
|
||||
PDF_get_parameter(PDF *p, const char *key, float modifier);
|
||||
|
||||
/* Set some PDFlib parameter with float type */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_set_value(PDF *p, const char *key, float value);
|
||||
|
||||
/* Get the value of some PDFlib parameter with float type */
|
||||
PDFLIB_API float PDFLIB_CALL
|
||||
PDF_get_value(PDF *p, const char *key, float modifier);
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* p_font.c
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Text Functions, Font Handling Functions */
|
||||
|
||||
/* Prepare a font for later use with PDF_setfont(). The metrics will be
|
||||
loaded, and if embed is nonzero, the font file will be checked (but not
|
||||
yet used. Encoding is one of "builtin", "macroman", "winansi", "host", or
|
||||
a user-defined name, or the name of a CMap. */
|
||||
PDFLIB_API int PDFLIB_CALL
|
||||
PDF_findfont(PDF *p, const char *fontname, const char *encoding, int embed);
|
||||
|
||||
/* Set the current font in the given size. The font descriptor must have
|
||||
been retrieved via PDF_findfont(). */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setfont(PDF *p, int font, float fontsize);
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* p_text.c
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Text Output Functions */
|
||||
|
||||
/* Print text in the current font and size at the current position. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_show(PDF *p, const char *text);
|
||||
|
||||
/* Print text in the current font at (x, y). */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_show_xy(PDF *p, const char *text, float x, float y);
|
||||
|
||||
/* Print text at the next line. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_continue_text(PDF *p, const char *text);
|
||||
|
||||
/* Format text in the current font and size into the supplied text box
|
||||
according to the requested formatting mode. If width and height
|
||||
are 0, only a single line is placed at the point (left, top) in the
|
||||
requested mode. Returns the number of characters which didn't fit in
|
||||
the box. */
|
||||
PDFLIB_API int PDFLIB_CALL
|
||||
PDF_show_boxed(PDF *p, const char *text, float left, float top, float width, float height, const char *hmode, const char *feature);
|
||||
|
||||
/* Set a transformation matrix to be applied to the current font. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_set_text_matrix(PDF *p, float a, float b, float c, float d, float e, float f);
|
||||
|
||||
/* Set the text output position to (x, y). */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_set_text_pos(PDF *p, float x, float y);
|
||||
|
||||
/* Return the width of text in an arbitrary font which has been selected
|
||||
with PDF_findfont(). */
|
||||
PDFLIB_API float PDFLIB_CALL
|
||||
PDF_stringwidth(PDF *p, const char *text, int font, float size);
|
||||
|
||||
#ifndef SWIG
|
||||
|
||||
/* Function duplicates with explicit string length for use with
|
||||
strings containing null characters. These are for C and C++ clients only,
|
||||
but are used internally for the other language bindings. */
|
||||
|
||||
/* Same as PDF_show() but with explicit string length. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_show2(PDF *p, const char *text, int len);
|
||||
|
||||
/* Same as PDF_show_xy() but with explicit string length. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_show_xy2(PDF *p, const char *text, int len, float x, float y);
|
||||
|
||||
/* Same as PDF_continue_text but with explicit string length. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_continue_text2(PDF *p, const char *text, int len);
|
||||
|
||||
/* Same as PDF_stringwidth but with explicit string length. */
|
||||
PDFLIB_API float PDFLIB_CALL
|
||||
PDF_stringwidth2(PDF *p, const char *text, int len, int font, float size);
|
||||
|
||||
#endif /* !SWIG */
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* p_gstate.c
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Graphics Functions, General Graphics State Functions */
|
||||
|
||||
/* Set the current dash pattern to b black and w white units. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setdash(PDF *p, float b, float w);
|
||||
|
||||
/* Set a more complicated dash pattern defined by an array. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setpolydash(PDF *p, float *dasharray, int length);
|
||||
|
||||
#ifndef SWIG
|
||||
/* Maximum length of dash arrays */
|
||||
#define MAX_DASH_LENGTH 8
|
||||
#endif
|
||||
|
||||
/* Set the flatness to a value between 0 and 100 inclusive. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setflat(PDF *p, float flatness);
|
||||
|
||||
/* Set the line join parameter to a value between 0 and 2 inclusive. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setlinejoin(PDF *p, int linejoin);
|
||||
|
||||
/* Set the linecap parameter to a value between 0 and 2 inclusive. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setlinecap(PDF *p, int linecap);
|
||||
|
||||
/* Set the miter limit to a value greater than or equal to 1. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setmiterlimit(PDF *p, float miter);
|
||||
|
||||
/* Set the current linewidth to width. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setlinewidth(PDF *p, float width);
|
||||
|
||||
|
||||
/* Special Graphics State Functions */
|
||||
|
||||
/* Save the current graphics state. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_save(PDF *p);
|
||||
|
||||
/* Restore the most recently saved graphics state. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_restore(PDF *p);
|
||||
|
||||
/* Translate the origin of the coordinate system to (tx, ty). */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_translate(PDF *p, float tx, float ty);
|
||||
|
||||
/* Scale the coordinate system by (sx, sy). */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_scale(PDF *p, float sx, float sy);
|
||||
|
||||
/* Rotate the coordinate system by phi degrees. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_rotate(PDF *p, float phi);
|
||||
|
||||
/* Skew the coordinate system in x and y direction by alpha and beta degrees. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_skew(PDF *p, float alpha, float beta);
|
||||
|
||||
/* Concatenate a matrix to the CTM. a*d must not be equal to b*c. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_concat(PDF *p, float a, float b, float c, float d, float e, float f);
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* p_draw.c
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Path Segment Functions */
|
||||
|
||||
/* Set the current point to (x, y). */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_moveto(PDF *p, float x, float y);
|
||||
|
||||
/* Draw a line from the current point to (x, y). */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_lineto(PDF *p, float x, float y);
|
||||
|
||||
/* Draw a Bezier curve from the current point, using 3 more control points. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_curveto(PDF *p, float x1, float y1, float x2, float y2, float x3, float y3);
|
||||
|
||||
/* Draw a circle with center (x, y) and radius r. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_circle(PDF *p, float x, float y, float r);
|
||||
|
||||
/* Draw a circular arc with center (x, y) and radius r from alpha1 to alpha2. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_arc(PDF *p, float x, float y, float r, float alpha1, float alpha2);
|
||||
|
||||
/* Draw a rectangle at lower left (x, y) with width and height. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_rect(PDF *p, float x, float y, float width, float height);
|
||||
|
||||
/* Close the current path. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_closepath(PDF *p);
|
||||
|
||||
/* Path Painting and Clipping Functions */
|
||||
|
||||
/* Stroke the path with the current color and line width,and clear it. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_stroke(PDF *p);
|
||||
|
||||
/* Close the path, and stroke it. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_closepath_stroke(PDF *p);
|
||||
|
||||
/* Fill the interior of the path with the current fill color. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_fill(PDF *p);
|
||||
|
||||
/* Fill and stroke the path with the current fill and stroke color. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_fill_stroke(PDF *p);
|
||||
|
||||
/* Close the path, fill, and stroke it. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_closepath_fill_stroke(PDF *p);
|
||||
|
||||
/* End the current path. Deprecated, use one of the stroke, fill, or clip
|
||||
functions instead. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_endpath(PDF *p);
|
||||
|
||||
/* Use the current path as clipping path. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_clip(PDF *p);
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* p_color.c
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Color Functions */
|
||||
|
||||
/* Set the current fill color to a gray value between 0 and 1 inclusive. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setgray_fill(PDF *p, float g);
|
||||
|
||||
/* Set the current stroke color to a gray value between 0 and 1 inclusive. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setgray_stroke(PDF *p, float g);
|
||||
|
||||
/* Set the current fill and stroke color. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setgray(PDF *p, float g);
|
||||
|
||||
/* Set the current fill color to the supplied RGB values. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setrgbcolor_fill(PDF *p, float red, float green, float blue);
|
||||
|
||||
/* Set the current stroke color to the supplied RGB values. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setrgbcolor_stroke(PDF *p, float red, float green, float blue);
|
||||
|
||||
/* Set the current fill and stroke color to the supplied RGB values. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setrgbcolor(PDF *p, float red, float green, float blue);
|
||||
|
||||
#ifdef PDF_CMYK_SUPPORTED
|
||||
|
||||
/* Set the current fill color to the supplied CMYK values. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setcmykcolor_fill(PDF *p, float cyan, float magenta, float yellow, float black);
|
||||
|
||||
/* Set the current stroke color to the supplied CMYK values. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setcmykcolor_stroke(PDF *p, float cyan, float magenta, float yellow, float black);
|
||||
|
||||
/* Set the current fill and stroke color to the supplied CMYK values. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_setcmykcolor(PDF *p, float cyan, float magenta, float yellow, float black);
|
||||
|
||||
#endif /* PDF_CMYK_SUPPORTED */
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* p_image.c
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Image Functions */
|
||||
|
||||
/* Place an image at the lower left corner (x, y), and scale it. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_place_image(PDF *p, int image, float x, float y, float scale);
|
||||
|
||||
/* Use image data from a variety of data sources. Returns an image descriptor
|
||||
or -1. Supported types are "jpeg", "ccitt", "raw". Supported sources are
|
||||
"memory", "fileref", "url". len is only used for type="raw", params is only
|
||||
used for type="ccitt". */
|
||||
PDFLIB_API int PDFLIB_CALL
|
||||
PDF_open_image(PDF *p, const char *type, const char *source, const char *data, long length, int width, int height, int components, int bpc, const char *params);
|
||||
|
||||
/* Open an image for later use. Returns an image descriptor or -1. Supported
|
||||
types are "jpeg", "tiff", "gif", and "png" (depending on configuration,
|
||||
however). stringparam is either "", "mask", "masked", or "page". intparam
|
||||
is either 0, the image number of the applied mask, or the page. */
|
||||
PDFLIB_API int PDFLIB_CALL
|
||||
PDF_open_image_file(PDF *p, const char *type, const char *filename, const char *stringparam, int intparam);
|
||||
|
||||
/* Close an image retrieved with one of the PDF_open_image*() functions. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_close_image(PDF *p, int image);
|
||||
|
||||
#ifdef PDF_THUMBNAILS_SUPPORTED
|
||||
/* Add an existing image as thumbnail for the current page. PDFlib doesn't
|
||||
help with preparing the thumbnail, but simply places it in the output. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_add_thumbnail(PDF *p, int im);
|
||||
#endif /* PDF_THUMBNAILS_SUPPORTED */
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* p_ccitt.c
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Open a raw CCITT image for later use. Returns an image descriptor or -1. */
|
||||
PDFLIB_API int PDFLIB_CALL
|
||||
PDF_open_CCITT(PDF *p, const char *filename, int width, int height, int BitReverse, int K, int BlackIs1);
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* p_hyper.c
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Hypertext Functions, Bookmarks */
|
||||
|
||||
/* Add a nested bookmark under parent, or a new top-level bookmark if
|
||||
parent = 0. text may be Unicode. Returns a bookmark descriptor which may be
|
||||
used as parent for subsequent nested bookmarks. If open = 1, child
|
||||
bookmarks will be folded out, and invisible if open = 0. */
|
||||
PDFLIB_API int PDFLIB_CALL
|
||||
PDF_add_bookmark(PDF *p, const char *text, int parent, int open);
|
||||
|
||||
/* Document Information Fields */
|
||||
|
||||
/* Fill document information field key with value. value may be Unicode. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_set_info(PDF *p, const char *key, const char *value);
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* p_annots.c
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* File Attachments */
|
||||
|
||||
/* Add a file attachment annotation. description and author may be Unicode.
|
||||
icon is one of "graph, "paperclip", "pushpin", or "tag". */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_attach_file(PDF *p, float llx, float lly, float urx, float ury, const char *filename, const char *description, const char *author, const char *mimetype, const char *icon);
|
||||
|
||||
/* Note Annotations */
|
||||
|
||||
/* Add a note annotation. contents and title may be Unicode. icon is one
|
||||
of "comment, "insert", "note", "paragraph", "newparagraph", "key", or "help".
|
||||
*/
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_add_note(PDF *p, float llx, float lly, float urx, float ury, const char *contents, const char *title, const char *icon, int open);
|
||||
|
||||
/* Links */
|
||||
|
||||
/* Add a file link annotation (to a PDF file). */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_add_pdflink(PDF *p, float llx, float lly, float urx, float ury, const char *filename, int page, const char *dest);
|
||||
|
||||
/* Add a launch annotation (arbitrary file type). */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_add_launchlink(PDF *p, float llx, float lly, float urx, float ury, const char *filename);
|
||||
|
||||
/* Add a link annotation with a target within the current file. dest can be
|
||||
"fullpage" or "fitwidth". */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_add_locallink(PDF *p, float llx, float lly, float urx, float ury, int page, const char *dest);
|
||||
|
||||
/* Add a weblink annotation. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_add_weblink(PDF *p, float llx, float lly, float urx, float ury, const char *url);
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_add_weblinks(PDF *p, float llx, float lly, float urx, float ury, const char *url);
|
||||
|
||||
/* Set the border style for all kinds of annotations.
|
||||
These settings are used for all annotations until a new style is set.
|
||||
Supported border style names are "solid" and "dashed". */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_set_border_style(PDF *p, const char *style, float width);
|
||||
|
||||
/* Set the border color for all kinds of annotations. */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_set_border_color(PDF *p, float red, float green, float blue);
|
||||
|
||||
/* Set the border dash style for all kinds of annotations. See PDF_setdash(). */
|
||||
PDFLIB_API void PDFLIB_CALL
|
||||
PDF_set_border_dash(PDF *p, float b, float w);
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------
|
||||
* Convenience stuff
|
||||
* ----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/* Page Size Formats */
|
||||
|
||||
/*
|
||||
Although PDF doesn´t impose any restrictions on the usable page size,
|
||||
Acrobat implementations suffer from architectural limits concerning
|
||||
the page size.
|
||||
Although PDFlib will generate PDF documents with page sizes outside
|
||||
these limits, the default error handler will issue a warning message.
|
||||
|
||||
Acrobat 3 minimum page size: 1" = 72 pt = 2.54 cm
|
||||
Acrobat 3 maximum page size: 45" = 3240 pt = 114.3 cm
|
||||
Acrobat 4 minimum page size: 0.25" = 18 pt = 0.635 cm
|
||||
Acrobat 4 maximum page size: 200" = 14400 pt = 508 cm
|
||||
*/
|
||||
|
||||
/* The page sizes are only available to the C and C++ bindings */
|
||||
#ifndef SWIG
|
||||
#define a0_width (float) 2380.0
|
||||
#define a0_height (float) 3368.0
|
||||
#define a1_width (float) 1684.0
|
||||
#define a1_height (float) 2380.0
|
||||
#define a2_width (float) 1190.0
|
||||
#define a2_height (float) 1684.0
|
||||
#define a3_width (float) 842.0
|
||||
#define a3_height (float) 1190.0
|
||||
#define a4_width (float) 595.0
|
||||
#define a4_height (float) 842.0
|
||||
#define a5_width (float) 421.0
|
||||
#define a5_height (float) 595.0
|
||||
#define a6_width (float) 297.0
|
||||
#define a6_height (float) 421.0
|
||||
#define b5_width (float) 501.0
|
||||
#define b5_height (float) 709.0
|
||||
#define letter_width (float) 612.0
|
||||
#define letter_height (float) 792.0
|
||||
#define legal_width (float) 612.0
|
||||
#define legal_height (float) 1008.0
|
||||
#define ledger_width (float) 1224.0
|
||||
#define ledger_height (float) 792.0
|
||||
#define p11x17_width (float) 792.0
|
||||
#define p11x17_height (float) 1224.0
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* PDFLIB_H */
|
||||
@@ -1,3 +1,6 @@
|
||||
#
|
||||
# $Id$
|
||||
#
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
@@ -5,7 +8,10 @@ C_SOURCES=\
|
||||
postgres.c \
|
||||
|
||||
PRG_SOURCES=\
|
||||
tpostgre.prg \
|
||||
tpostgre.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
postgres.ch \
|
||||
|
||||
LIBNAME=hbpg
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
ROOT = ../../
|
||||
|
||||
C_SOURCES= \
|
||||
ads1.c \
|
||||
adsfunc.c \
|
||||
C_SOURCES=\
|
||||
ads1.c \
|
||||
adsfunc.c \
|
||||
adsmgmnt.c \
|
||||
|
||||
PRG_HEADERS=\
|
||||
|
||||
@@ -16,6 +16,9 @@ C_SOURCES=\
|
||||
|
||||
PRG_SOURCES=\
|
||||
|
||||
PRG_HEADERS=\
|
||||
time87.ch \
|
||||
|
||||
LIBNAME=samples
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
@@ -8,17 +8,20 @@ ifneq ($(HB_ARCHITECTURE),dos)
|
||||
|
||||
ifeq ($(HB_ARCHITECTURE),linux)
|
||||
C_SOURCES=\
|
||||
tplinux.c
|
||||
tplinux.c \
|
||||
else ($(HB_ARCHITECTURE),win32)
|
||||
C_SOURCES=\
|
||||
tpwin32.c
|
||||
tpwin32.c \
|
||||
else
|
||||
C_SOURCES=\
|
||||
tpos2.c
|
||||
tpos2.c \
|
||||
endif
|
||||
|
||||
PRG_SOURCES=\
|
||||
telepath.prg
|
||||
telepath.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
telepath.ch \
|
||||
|
||||
LIBNAME=telepath
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ ROOT = ../../
|
||||
C_SOURCES = \
|
||||
base64x.c \
|
||||
encmthd.c \
|
||||
utils.c \
|
||||
utils.c \
|
||||
|
||||
PRG_SOURCES= \
|
||||
popcln.prg \
|
||||
@@ -26,6 +26,10 @@ PRG_SOURCES= \
|
||||
thtml.prg \
|
||||
sendmail.prg
|
||||
|
||||
PRG_HEADERS= \
|
||||
thtml.ch \
|
||||
tip.ch \
|
||||
|
||||
LIBNAME=tip
|
||||
|
||||
include $(TOP)$(ROOT)config/lib.cf
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "hbvmopt.h"
|
||||
#include "hbvmopt.h" // TOFIX
|
||||
#include "hbapi.h"
|
||||
#include "hbstack.h"
|
||||
#include "hbapierr.h"
|
||||
@@ -92,7 +92,7 @@
|
||||
static void RetValue( void );
|
||||
|
||||
static HRESULT s_nOleError;
|
||||
static HB_ITEM s_OleAuto; // TOFIX
|
||||
static PHB_ITEM s_pOleAuto = NULL;
|
||||
|
||||
static PHB_DYNS s_pSym_TOleAuto = NULL;
|
||||
static PHB_DYNS s_pSym_hObj = NULL;
|
||||
@@ -115,6 +115,7 @@ static BOOL s_bInit = FALSE;
|
||||
|
||||
#define EG_OLEEXECPTION 1001
|
||||
#define HB_STRING_ALLOC( p, l ) hb_itemReSizeString( p, l )
|
||||
|
||||
static void hb_itemPushForward( PHB_ITEM pItem )
|
||||
{
|
||||
hb_itemMove( hb_stackAllocItem(), pItem );
|
||||
@@ -125,66 +126,6 @@ static void hb_vmRequestReset( void )
|
||||
hb_stackSetActionRequest( 0 ); // TOFIX
|
||||
}
|
||||
|
||||
PHB_ITEM HB_EXPORT hb_itemPutCRawStatic( PHB_ITEM pItem, const char * szText, ULONG ulLen )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutCRawStatic(%p, %s, %lu)", pItem, szText, ulLen));
|
||||
|
||||
if( pItem )
|
||||
{
|
||||
if( HB_IS_COMPLEX( pItem ) )
|
||||
hb_itemClear( pItem );
|
||||
}
|
||||
else
|
||||
pItem = hb_itemNew( NULL );
|
||||
|
||||
pItem->type = HB_IT_STRING; // TOFIX
|
||||
pItem->item.asString.allocated = 0; // TOFIX
|
||||
|
||||
if( szText == NULL )
|
||||
{
|
||||
pItem->item.asString.value = ""; // TOFIX
|
||||
pItem->item.asString.length = 0; // TOFIX
|
||||
}
|
||||
else
|
||||
{
|
||||
pItem->item.asString.value = ( char * ) szText; // TOFIX
|
||||
pItem->item.asString.length = ulLen; // TOFIX
|
||||
}
|
||||
|
||||
return pItem;
|
||||
}
|
||||
|
||||
static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
{
|
||||
FILE *hFile;
|
||||
|
||||
if( !sTraceMsg )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if( sFile == NULL )
|
||||
{
|
||||
hFile = fopen( "trace.log", "a" );
|
||||
}
|
||||
else
|
||||
{
|
||||
hFile = fopen( sFile, "a" );
|
||||
}
|
||||
|
||||
if( hFile )
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start( ap, sTraceMsg );
|
||||
vfprintf( hFile, sTraceMsg, ap );
|
||||
va_end( ap );
|
||||
|
||||
fclose( hFile );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
static EXCEPINFO excep;
|
||||
|
||||
@@ -343,7 +284,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
|
||||
if( cString )
|
||||
{
|
||||
hb_retclenAdopt( cString, strlen( cString ) );
|
||||
hb_retclen_buffer( cString, strlen( cString ) );
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -398,7 +339,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
|
||||
if( bByRef )
|
||||
{
|
||||
hb_itemPutCRawStatic( pItem, (char *) hb_oleAnsiToSysString( sString ), ulLen * 2 + 1 );
|
||||
hb_itemPutCLConst( pItem, (char *) hb_oleAnsiToSysString( sString ), ulLen * 2 + 1 );
|
||||
|
||||
pVariant->n1.n2.vt = VT_BYREF | VT_BSTR;
|
||||
pVariant->n1.n2.n3.pbstrVal = (BSTR *) &( pItem->item.asString.value ); // TOFIX
|
||||
@@ -534,7 +475,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
pDisp = (IDispatch *) hb_parnl( -1 );
|
||||
pDisp->lpVtbl->AddRef( pDisp );
|
||||
|
||||
//TraceLog( NULL, "Dispatch: in: %s(%i)%ld\n", pDisp, __FILE__, __LINE__ );
|
||||
//HB_TRACE(HB_TR_INFO, ("Dispatch: in: %s(%i)%ld\n", pDisp, __FILE__, __LINE__));
|
||||
|
||||
if( bByRef )
|
||||
{
|
||||
@@ -633,14 +574,14 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
break;
|
||||
|
||||
default:
|
||||
TraceLog( NULL, "Unexpected VT type %p in: %s(%i)!\n", pVariant->n1.n2.vt, __FILE__, __LINE__ );
|
||||
HB_TRACE(HB_TR_INFO, ("Unexpected VT type %p in: %s(%i)!\n", pVariant->n1.n2.vt, __FILE__, __LINE__));
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
TraceLog( NULL, "Class: '%s' not suported!\n", hb_objGetClsName( pItem ) );
|
||||
HB_TRACE(HB_TR_INFO, ("Class: '%s' not suported!\n", hb_objGetClsName( pItem )));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -657,7 +598,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
rgsabound.cElements = hb_arrayLen( pItem );
|
||||
rgsabound.lLbound = 0;
|
||||
|
||||
//TraceLog( NULL, "ItemToVariant() Array len: %i type: %i ByRef: %i in: %s(%i) \n", rgsabound.cElements, vt, bByRef, __FILE__, __LINE__ );
|
||||
//HB_TRACE(HB_TR_INFO, ("ItemToVariant() Array len: %i type: %i ByRef: %i in: %s(%i) \n", rgsabound.cElements, vt, bByRef, __FILE__, __LINE__));
|
||||
|
||||
parray = SafeArrayCreate( vt, 1, &rgsabound );
|
||||
|
||||
@@ -686,7 +627,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
|
||||
default:
|
||||
{
|
||||
TraceLog( NULL, "Unexpected type %p in: %s(%i)!\n", hb_itemType( pItem ), __FILE__, __LINE__ );
|
||||
//HB_TRACE(HB_TR_INFO, ("Unexpected type %p in: %s(%i)!\n", hb_itemType( pItem ), __FILE__, __LINE__));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -716,7 +657,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
|
||||
aPrgParams[ n ] = hb_stackItemFromBase( nArg + nOffset );
|
||||
|
||||
//TraceLog( NULL, "N: %i Arg: %i Type: %i %i ByRef: %i\n", n, nArg, hb_itemType( pParam ), hb_itemType( aPrgParams[ n ] ), bByRef );
|
||||
//HB_TRACE(HB_TR_INFO, ("N: %i Arg: %i Type: %i %i ByRef: %i\n", n, nArg, hb_itemType( pParam ), hb_itemType( aPrgParams[ n ] ), bByRef));
|
||||
|
||||
hb_oleItemToVariant( &( pArgs[ n ] ), aPrgParams[ n ] );
|
||||
}
|
||||
@@ -759,7 +700,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
|
||||
//nParam = pDispParams->cArgs - n;
|
||||
|
||||
//TraceLog( NULL, "*** N: %i, Param: %i Type: %i\n", n, nParam, pVariant->n1.n2.vt);
|
||||
//HB_TRACE(HB_TR_INFO, ("*** N: %i, Param: %i Type: %i\n", n, nParam, pVariant->n1.n2.vt));
|
||||
|
||||
if( bByRef )
|
||||
{
|
||||
@@ -811,7 +752,10 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
}
|
||||
}
|
||||
|
||||
s_OleAuto.type = HB_IT_NIL; // TOFIX
|
||||
if( s_pOleAuto == NULL )
|
||||
s_pOleAuto = hb_itemNew( NULL ); // TOFIX: Never released
|
||||
else
|
||||
hb_itemClear( s_pOleAuto );
|
||||
|
||||
if( s_pSym_TOleAuto )
|
||||
{
|
||||
@@ -819,17 +763,17 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
hb_vmPushNil();
|
||||
hb_vmDo( 0 );
|
||||
|
||||
hb_itemForwardValue( &s_OleAuto, hb_stackReturnItem() );
|
||||
hb_itemForwardValue( s_pOleAuto, hb_stackReturnItem() );
|
||||
}
|
||||
|
||||
if( s_pSym_New && s_OleAuto.type ) // TOFIX
|
||||
if( s_pSym_New && hb_itemType( s_pOleAuto ) )
|
||||
{
|
||||
// Implemented in :New()
|
||||
//pDisp->lpVtbl->AddRef( pDisp );
|
||||
|
||||
//TOleAuto():New( nDispatch )
|
||||
hb_vmPushSymbol( hb_dynsymSymbol( s_pSym_New ) );
|
||||
hb_itemPushForward( &s_OleAuto );
|
||||
hb_itemPushForward( s_pOleAuto );
|
||||
hb_vmPushLong( ( LONG ) pDisp );
|
||||
hb_vmSend( 1 );
|
||||
|
||||
@@ -911,7 +855,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
}
|
||||
else
|
||||
{
|
||||
TraceLog( NULL, "Unexpected type %p in: %s(%i)!\n", pVariant->n1.n2.vt, __FILE__, __LINE__ );
|
||||
HB_TRACE(HB_TR_INFO, ("Unexpected type %p in: %s(%i)!\n", pVariant->n1.n2.vt, __FILE__, __LINE__));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -919,7 +863,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
{
|
||||
if( pVariant->n1.n2.vt & VT_BYREF )
|
||||
{
|
||||
TraceLog( NULL, "Unexpected type %p in: %s(%i)!\n", pVariant->n1.n2.vt, __FILE__, __LINE__ );
|
||||
HB_TRACE(HB_TR_INFO, ("Unexpected type %p in: %s(%i)!\n", pVariant->n1.n2.vt, __FILE__, __LINE__));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1025,16 +969,16 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
|
||||
if( SUCCEEDED( SafeArrayGetElement( parray, rgIndices, pTarget ) ) )
|
||||
{
|
||||
//TraceLog( NULL, "Type: %p in: %s(%i)\n", mElem.n1.n2.vt, __FILE__, __LINE__ );
|
||||
//HB_TRACE(HB_TR_INFO, ("Type: %p in: %s(%i)\n", mElem.n1.n2.vt, __FILE__, __LINE__));
|
||||
|
||||
hb_oleVariantToItem( pArray->item.asArray.value->pItems + ( i - iFrom ), &mElem );
|
||||
hb_oleVariantToItem( hb_arrayGetItemPtr( pArray, i - iFrom + 1 ), &mElem );
|
||||
|
||||
VariantClear( &mElem );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//TraceLog( NULL, "Return len: %i\n", pArray->item.asArray.value->ulLen ); // TOFIX
|
||||
//HB_TRACE(HB_TR_INFO, ("Return len: %i\n", pArray->item.asArray.value->ulLen));
|
||||
|
||||
// Wrap our array with VTArrayWrapper() class ( aArray := VTArrayWrapper( vt, aArray) )
|
||||
if( HB_IS_ARRAY( pArray ) && vt != VT_VARIANT )
|
||||
@@ -1173,7 +1117,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
|
||||
hb_itemForwardValue( pOleAuto, hb_stackReturnItem() );
|
||||
|
||||
if( pOleAuto->type )
|
||||
if( hb_itemType( pOleAuto ) )
|
||||
{
|
||||
//TOleAuto():New( nDispatch )
|
||||
hb_vmPushSymbol( hb_dynsymSymbol( s_pSym_New ) );
|
||||
@@ -1337,7 +1281,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
vt &= ~VT_ARRAY;
|
||||
vt &= ~VT_BYREF;
|
||||
|
||||
//TraceLog( NULL, "Type: %p in: %s(%i)\n", vt, __FILE__, __LINE__ );
|
||||
//HB_TRACE(HB_TR_INFO, ("Type: %p in: %s(%i)\n", vt, __FILE__, __LINE__));
|
||||
|
||||
pArray = SafeArrayToArray( parray, iDims, rgIndices, vt );
|
||||
|
||||
@@ -1353,7 +1297,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
}
|
||||
else
|
||||
{
|
||||
TraceLog( NULL, "Unexpected type %p in: %s(%i)!\n", pVariant->n1.n2.vt, __FILE__, __LINE__ );
|
||||
HB_TRACE(HB_TR_INFO, ("Unexpected type %p in: %s(%i)!\n", pVariant->n1.n2.vt, __FILE__, __LINE__));
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
@@ -1423,7 +1367,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
LPSTR source;
|
||||
|
||||
source = hb_oleWideToAnsi( excep.bstrSource );
|
||||
hb_retcAdopt( source );
|
||||
hb_retc_buffer( source );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1435,7 +1379,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
LPSTR description;
|
||||
|
||||
description = hb_oleWideToAnsi( excep.bstrDescription );
|
||||
hb_retcAdopt( description );
|
||||
hb_retc_buffer( description );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1523,7 +1467,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
return "MK_E_UNAVAILABLE";
|
||||
|
||||
default:
|
||||
TraceLog( NULL, "TOleAuto Error %p\n", s_nOleError );
|
||||
HB_TRACE(HB_TR_INFO, ("TOleAuto Error %p\n", s_nOleError));
|
||||
return "Unknown error";
|
||||
};
|
||||
}
|
||||
@@ -1568,7 +1512,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
|
||||
SysFreeString( bstrClassID );
|
||||
|
||||
//TraceLog( NULL, "Result: %p\n", s_nOleError );
|
||||
//HB_TRACE(HB_TR_INFO, ("Result: %p\n", s_nOleError));
|
||||
|
||||
if( hb_pcount() == 2 )
|
||||
{
|
||||
@@ -1588,9 +1532,9 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
|
||||
if( SUCCEEDED( s_nOleError ) )
|
||||
{
|
||||
//TraceLog( NULL, "Class: %i\n", ClassID );
|
||||
//HB_TRACE(HB_TR_INFO, ("Class: %i\n", ClassID));
|
||||
s_nOleError = CoCreateInstance( (REFCLSID) &ClassID, NULL, CLSCTX_SERVER, (REFIID) riid, &pDisp );
|
||||
//TraceLog( NULL, "Result: %p\n", s_nOleError );
|
||||
//HB_TRACE(HB_TR_INFO, ("Result: %p\n", s_nOleError));
|
||||
}
|
||||
|
||||
hb_retnl( ( LONG ) pDisp );
|
||||
@@ -1664,7 +1608,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
{
|
||||
IDispatch *pDisp = ( IDispatch * ) hb_parnl( 1 );
|
||||
|
||||
//TraceLog( NULL, "OleAddRef( %p )\n", pDisp );
|
||||
//HB_TRACE(HB_TR_INFO, ("OleAddRef( %p )\n", pDisp));
|
||||
|
||||
s_nOleError = pDisp->lpVtbl->AddRef( pDisp );
|
||||
|
||||
@@ -1676,7 +1620,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
{
|
||||
IDispatch *pDisp = ( IDispatch * ) hb_parnl( 1 );
|
||||
|
||||
//TraceLog( NULL, "OleReleaseObject( %p )\n", pDisp );
|
||||
//HB_TRACE(HB_TR_INFO, ("OleReleaseObject( %p )\n", pDisp));
|
||||
|
||||
s_nOleError = pDisp->lpVtbl->Release( pDisp );
|
||||
|
||||
@@ -1761,7 +1705,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
&excep,
|
||||
&uArgErr );
|
||||
|
||||
//TraceLog( NULL, "OleGetValue: %p\n", s_nOleError );
|
||||
//HB_TRACE(HB_TR_INFO, ("OleGetValue: %p\n", s_nOleError));
|
||||
|
||||
return s_nOleError;
|
||||
}
|
||||
@@ -1806,7 +1750,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
sDescription = Ole2TxtError();
|
||||
}
|
||||
|
||||
//TraceLog( NULL, "Desc: '%s'\n", sDescription );
|
||||
//HB_TRACE(HB_TR_INFO, ("Desc: '%s'\n", sDescription));
|
||||
|
||||
pReturn = hb_errRT_SubstParams( hb_parcx( -1 ), EG_OLEEXECPTION, (ULONG) s_nOleError, sDescription, hb_itemGetSymbol( hb_stackBaseItem() )->szName );
|
||||
|
||||
@@ -1837,7 +1781,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
VariantClear( &s_RetVal );
|
||||
|
||||
OleGetProperty( pDisp, DISPID_VALUE, &s_EmptyDispParams );
|
||||
//TraceLog( NULL, "GetDefault: %p\n", s_nOleError );
|
||||
//HB_TRACE(HB_TR_INFO, ("GetDefault: %p\n", s_nOleError));
|
||||
|
||||
if( SUCCEEDED( s_nOleError ) )
|
||||
{
|
||||
@@ -1870,7 +1814,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
aPrgParams = GetParams( &DispParams, 0 );
|
||||
|
||||
OleSetProperty( pDisp, DISPID_VALUE, &DispParams );
|
||||
//TraceLog( NULL, "SetDefault: %p\n", s_nOleError );
|
||||
//HB_TRACE(HB_TR_INFO, ("SetDefault: %p\n", s_nOleError));
|
||||
|
||||
FreeParams( &DispParams, aPrgParams );
|
||||
|
||||
@@ -1963,7 +1907,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
bstrMessage = hb_oleAnsiToSysString( szName + 1 );
|
||||
s_nOleError = pDisp->lpVtbl->GetIDsOfNames( pDisp, (REFIID) &IID_NULL, (wchar_t **) &bstrMessage, 1, LOCALE_SYSTEM_DEFAULT, pDispID );
|
||||
SysFreeString( bstrMessage );
|
||||
//TraceLog( NULL, "1. ID of: '%s' -> %i Result: %p\n", hb_itemGetSymbol( hb_stackBaseItem() )->szName + 1, DispID, s_nOleError );
|
||||
//HB_TRACE(HB_TR_INFO, ("1. ID of: '%s' -> %i Result: %p\n", hb_itemGetSymbol( hb_stackBaseItem() )->szName + 1, DispID, s_nOleError));
|
||||
|
||||
if( SUCCEEDED( s_nOleError ) )
|
||||
{
|
||||
@@ -1984,7 +1928,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
bstrMessage = hb_oleAnsiToSysString( szName );
|
||||
s_nOleError = pDisp->lpVtbl->GetIDsOfNames( pDisp, (REFIID) &IID_NULL, (wchar_t **) &bstrMessage, 1, 0, pDispID );
|
||||
SysFreeString( bstrMessage );
|
||||
//TraceLog( NULL, "2. ID of: '%s' -> %i Result: %p\n", szName, *pDispID, s_nOleError );
|
||||
//HB_TRACE(HB_TR_INFO, ("2. ID of: '%s' -> %i Result: %p\n", szName, *pDispID, s_nOleError));
|
||||
}
|
||||
|
||||
return s_nOleError;
|
||||
@@ -2078,7 +2022,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
BOOL bSetFirst = FALSE, bTryDefault = TRUE;
|
||||
PHB_ITEM *aPrgParams = GetParams( &DispParams, 0 );
|
||||
|
||||
//TraceLog( NULL, "Class: '%s' Message: '%s', Params: %i Arg1: %i\n", hb_objGetClsName( hb_stackSelfItem() ), hb_itemGetSymbol( hb_stackBaseItem() )->szName, hb_pcount(), hb_parinfo(1) );
|
||||
//HB_TRACE(HB_TR_INFO, ("Class: '%s' Message: '%s', Params: %i Arg1: %i\n", hb_objGetClsName( hb_stackSelfItem() ), hb_itemGetSymbol( hb_stackBaseItem() )->szName, hb_pcount(), hb_parinfo(1)));
|
||||
|
||||
hb_vmPushSymbol( hb_dynsymSymbol( s_pSym_hObj ) );
|
||||
hb_vmPush( hb_stackSelfItem() );
|
||||
@@ -2098,7 +2042,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
hb_itemReturn( hb_stackItemFromBase( 1 ) );
|
||||
}
|
||||
|
||||
//TraceLog( NULL, "FIRST OleSetProperty %i\n", s_nOleError );
|
||||
//HB_TRACE(HB_TR_INFO, ("FIRST OleSetProperty %i\n", s_nOleError));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2112,7 +2056,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
RetValue();
|
||||
}
|
||||
|
||||
//TraceLog( NULL, "OleInvoke %i\n", s_nOleError );
|
||||
//HB_TRACE(HB_TR_INFO, ("OleInvoke %i\n", s_nOleError));
|
||||
}
|
||||
|
||||
if( FAILED( s_nOleError ) )
|
||||
@@ -2122,7 +2066,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
RetValue();
|
||||
}
|
||||
|
||||
//TraceLog( NULL, "OleGetProperty(%i) %i\n", DispParams.cArgs, s_nOleError );
|
||||
//HB_TRACE(HB_TR_INFO, ("OleGetProperty(%i) %i\n", DispParams.cArgs, s_nOleError));
|
||||
}
|
||||
|
||||
if( FAILED( s_nOleError ) && bSetFirst == FALSE && hb_pcount() >= 1 )
|
||||
@@ -2132,14 +2076,14 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
hb_itemReturn( hb_stackItemFromBase( 1 ) );
|
||||
}
|
||||
|
||||
//TraceLog( NULL, "OleSetProperty %i\n", s_nOleError );
|
||||
//HB_TRACE(HB_TR_INFO, ("OleSetProperty %i\n", s_nOleError));
|
||||
}
|
||||
}
|
||||
|
||||
if( SUCCEEDED( s_nOleError ) )
|
||||
{
|
||||
//TraceLog( NULL, "Invoke Succeeded!\n" );
|
||||
if( HB_IS_OBJECT( hb_stackReturnItem() ) && hb_clsIsParent( hb_stackReturnItem()->item.asArray.value->uiClass , "TOLEAUTO" ) ) // TOFIX
|
||||
//HB_TRACE(HB_TR_INFO, ("Invoke Succeeded!\n"));
|
||||
if( HB_IS_OBJECT( hb_stackReturnItem() ) && hb_clsIsParent( hb_objGetClass( hb_stackReturnItem() ), "TOLEAUTO" ) )
|
||||
{
|
||||
PHB_ITEM pReturn = hb_itemNew( NULL );
|
||||
PHB_ITEM pOleClassName = hb_itemNew( NULL );
|
||||
@@ -2161,7 +2105,7 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
sOleClassName[ iClassNameLen ] = ':';
|
||||
strcpy( sOleClassName + iClassNameLen + 1, hb_itemGetSymbol( hb_stackBaseItem() )->szName );
|
||||
|
||||
//TraceLog( NULL, "Class: '%s'\n", sOleClassName );
|
||||
//HB_TRACE(HB_TR_INFO, ("Class: '%s'\n", sOleClassName));
|
||||
|
||||
hb_itemPutCPtr( pOleClassName, sOleClassName, iClassNameLen + 1 + iMsgNameLen );
|
||||
|
||||
@@ -2185,13 +2129,13 @@ static void TraceLog( const char * sFile, const char * sTraceMsg, ... )
|
||||
{
|
||||
bTryDefault = FALSE;
|
||||
|
||||
//TraceLog( NULL, "Try using DISPID_VALUE\n" );
|
||||
//HB_TRACE(HB_TR_INFO, ("Try using DISPID_VALUE\n"));
|
||||
pDisp = s_OleVal.n1.n2.n3.pdispVal;
|
||||
goto OleGetID;
|
||||
}
|
||||
}
|
||||
|
||||
//TraceLog( NULL, "Invoke Failed!\n" );
|
||||
//HB_TRACE(HB_TR_INFO, ("Invoke Failed!\n"));
|
||||
OleThrowError();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,28 +5,31 @@
|
||||
ROOT = ../../
|
||||
|
||||
C_SOURCES=\
|
||||
hbxml.c \
|
||||
hbxml.c \
|
||||
hbsyslog.c \
|
||||
hboutdbg.c \
|
||||
cstructc.c \
|
||||
xhbenum.c \
|
||||
xhbfunc.c \
|
||||
xhbmsgs.c \
|
||||
xhbwith.c \
|
||||
xhbenum.c \
|
||||
xhbfunc.c \
|
||||
xhbmsgs.c \
|
||||
xhbwith.c \
|
||||
|
||||
C_HEADERS=\
|
||||
hbcompat.h \
|
||||
|
||||
PRG_SOURCES=\
|
||||
txml.prg \
|
||||
hblog.prg \
|
||||
txml.prg \
|
||||
hblog.prg \
|
||||
hblognet.prg \
|
||||
cstruct.prg \
|
||||
xhbcomp.prg \
|
||||
cstruct.prg \
|
||||
xhbcomp.prg \
|
||||
|
||||
PRG_HEADERS=\
|
||||
xhb.ch \
|
||||
xhb.ch \
|
||||
hbcompat.ch \
|
||||
hblog.ch \
|
||||
hblog.ch \
|
||||
hblogdef.ch \
|
||||
cstruct.ch \
|
||||
cstruct.ch \
|
||||
hbctypes.ch \
|
||||
wintypes.ch \
|
||||
xhbextrn.ch \
|
||||
|
||||
79
harbour/contrib/xhb/hbcompat.h
Normal file
79
harbour/contrib/xhb/hbcompat.h
Normal file
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* Header file for cross-compatibility between different Harbour flavours
|
||||
*
|
||||
* Copyright 1999-2007 {list of individual authors and e-mail addresses}
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HB_COMPAT_H_
|
||||
#define HB_COMPAT_H_
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapiitm.h"
|
||||
|
||||
/* xHarbour functions mapped to Harbour ones */
|
||||
|
||||
#ifdef __XHARBOUR__
|
||||
|
||||
#define hb_retc_buffer( szText ) hb_retcAdopt( (szText) )
|
||||
#define hb_retclen_buffer( szText, ulLen ) hb_retclenAdopt( (szText), (ulLen) )
|
||||
#define hb_retc_const( szText ) hb_retcStatic( (szText) )
|
||||
#define hb_storclen_buffer hb_storclenAdopt
|
||||
#define hb_itemPutCLConst hb_itemPutCRawStatic
|
||||
|
||||
#else
|
||||
|
||||
#define hb_retcAdopt( szText ) hb_retc_buffer( (szText) )
|
||||
#define hb_retclenAdopt( szText, ulLen ) hb_retclen_buffer( (szText), (ulLen) )
|
||||
#define hb_retcStatic( szText ) hb_retc_const( (szText) )
|
||||
#define hb_storclenAdopt hb_storclen_buffer
|
||||
#define hb_itemPutCRawStatic hb_itemPutCLConst
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -3,10 +3,6 @@ rem
|
||||
rem $Id$
|
||||
rem
|
||||
|
||||
hbdoc -htm genhtm.lnk genhtm.rsp
|
||||
..\bin\hbdoc -htm genhtm.lnk genhtm.rsp
|
||||
cd htm
|
||||
echo renaming Harbour.htm to index.htm
|
||||
ren harbour.htm index.htm
|
||||
del genwww.lnk
|
||||
ren genwww.old genwww.lnk
|
||||
|
||||
|
||||
@@ -630,11 +630,12 @@ extern HB_EXPORT void hb_retnlllen( LONGLONG lNumber, int iWidth ); /* returns
|
||||
|
||||
#define HB_IS_VALID_INDEX( idx, max ) ( (idx) > 0 && ( ULONG ) (idx) <= (max) )
|
||||
|
||||
/* xHarbour compatible function */
|
||||
/* xHarbour compatible functions */
|
||||
#define hb_retcAdopt( szText ) hb_retc_buffer( (szText) )
|
||||
#define hb_retclenAdopt( szText, ulLen ) hb_retclen_buffer( (szText), (ulLen) )
|
||||
#define hb_retcStatic( szText ) hb_retc_const( (szText) )
|
||||
#define hb_storclenAdopt hb_storclen_buffer
|
||||
#define hb_itemPutCRawStatic hb_itemPutCLConst
|
||||
|
||||
#ifdef HB_API_MACROS
|
||||
|
||||
|
||||
@@ -65,107 +65,108 @@ typedef struct
|
||||
PHB_ITEM pItems[ HB_EVAL_PARAM_MAX_ + 1 ];
|
||||
} EVALINFO, * PEVALINFO, * EVALINFO_PTR;
|
||||
|
||||
extern HB_EXPORT PHB_ITEM hb_evalLaunch ( PEVALINFO pEvalInfo );
|
||||
extern HB_EXPORT BOOL hb_evalNew ( PEVALINFO pEvalInfo, PHB_ITEM pItem );
|
||||
extern HB_EXPORT BOOL hb_evalPutParam ( PEVALINFO pEvalInfo, PHB_ITEM pItem );
|
||||
extern HB_EXPORT BOOL hb_evalRelease ( PEVALINFO pEvalInfo );
|
||||
extern HB_EXPORT PHB_ITEM hb_evalLaunch ( PEVALINFO pEvalInfo );
|
||||
extern HB_EXPORT BOOL hb_evalNew ( PEVALINFO pEvalInfo, PHB_ITEM pItem );
|
||||
extern HB_EXPORT BOOL hb_evalPutParam ( PEVALINFO pEvalInfo, PHB_ITEM pItem );
|
||||
extern HB_EXPORT BOOL hb_evalRelease ( PEVALINFO pEvalInfo );
|
||||
|
||||
extern HB_EXPORT void hb_evalBlock( PHB_ITEM pCodeBlock, ... );
|
||||
extern HB_EXPORT void hb_evalBlock0( PHB_ITEM pCodeBlock );
|
||||
extern HB_EXPORT void hb_evalBlock1( PHB_ITEM pCodeBlock, PHB_ITEM pParam );
|
||||
|
||||
extern HB_EXPORT BOOL hb_execFromArray( PHB_ITEM pParam );
|
||||
extern HB_EXPORT BOOL hb_execFromArray ( PHB_ITEM pParam );
|
||||
|
||||
extern HB_EXPORT PHB_ITEM hb_itemDo ( PHB_ITEM pItem, ULONG ulPCount, ... );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemDoC ( char * szFunc, ULONG ulPCount, ... );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemDo ( PHB_ITEM pItem, ULONG ulPCount, ... );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemDoC ( char * szFunc, ULONG ulPCount, ... );
|
||||
|
||||
extern HB_EXPORT PHB_ITEM hb_itemArrayGet ( PHB_ITEM pArray, ULONG ulIndex );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemArrayNew ( ULONG ulLen );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemArrayPut ( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem );
|
||||
extern HB_EXPORT ULONG hb_itemCopyC ( PHB_ITEM pItem, char * szBuffer, ULONG ulLen );
|
||||
extern HB_EXPORT BOOL hb_itemFreeC ( char * szText );
|
||||
extern HB_EXPORT char * hb_itemGetC ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT char * hb_itemGetCPtr ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT ULONG hb_itemGetCLen ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT char * hb_itemGetDS ( PHB_ITEM pItem, char * szDate );
|
||||
extern HB_EXPORT long hb_itemGetDL ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT BOOL hb_itemGetL ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT double hb_itemGetND ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT double hb_itemGetNDDec ( PHB_ITEM pItem, int * piDec );
|
||||
extern HB_EXPORT int hb_itemGetNI ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT long hb_itemGetNL ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT HB_LONG hb_itemGetNInt ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT void hb_itemGetNLen ( PHB_ITEM pItem, int * piWidth, int * piDec );
|
||||
extern HB_EXPORT void * hb_itemGetPtr ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT void * hb_itemGetPtrGC ( PHB_ITEM pItem, HB_GARBAGE_FUNC_PTR pFunc );
|
||||
extern HB_EXPORT PHB_SYMB hb_itemGetSymbol( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemNew ( PHB_ITEM pNull );
|
||||
extern HB_EXPORT void hb_itemInit ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT USHORT hb_itemPCount ( void );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemParam ( USHORT uiParam );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutC ( PHB_ITEM pItem, const char * szText );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutCConst( PHB_ITEM pItem, const char * szText );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutCL ( PHB_ITEM pItem, const char * szText, ULONG ulLen );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutCPtr ( PHB_ITEM pItem, char * szText, ULONG ulLen );
|
||||
extern HB_EXPORT void hb_itemSetCMemo ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutD ( PHB_ITEM pItem, int iYear, int iMonth, int iDay );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutDS ( PHB_ITEM pItem, const char * szDate );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutDL ( PHB_ITEM pItem, long lJulian );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutL ( PHB_ITEM pItem, BOOL bValue );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutND ( PHB_ITEM pItem, double dNumber );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNI ( PHB_ITEM pItem, int iNumber );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNL ( PHB_ITEM pItem, long lNumber );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNInt ( PHB_ITEM pItem, HB_LONG lNumber );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemArrayGet ( PHB_ITEM pArray, ULONG ulIndex );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemArrayNew ( ULONG ulLen );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemArrayPut ( PHB_ITEM pArray, ULONG ulIndex, PHB_ITEM pItem );
|
||||
extern HB_EXPORT ULONG hb_itemCopyC ( PHB_ITEM pItem, char * szBuffer, ULONG ulLen );
|
||||
extern HB_EXPORT BOOL hb_itemFreeC ( char * szText );
|
||||
extern HB_EXPORT char * hb_itemGetC ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT char * hb_itemGetCPtr ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT ULONG hb_itemGetCLen ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT char * hb_itemGetDS ( PHB_ITEM pItem, char * szDate );
|
||||
extern HB_EXPORT long hb_itemGetDL ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT BOOL hb_itemGetL ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT double hb_itemGetND ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT double hb_itemGetNDDec ( PHB_ITEM pItem, int * piDec );
|
||||
extern HB_EXPORT int hb_itemGetNI ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT long hb_itemGetNL ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT HB_LONG hb_itemGetNInt ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT void hb_itemGetNLen ( PHB_ITEM pItem, int * piWidth, int * piDec );
|
||||
extern HB_EXPORT void * hb_itemGetPtr ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT void * hb_itemGetPtrGC ( PHB_ITEM pItem, HB_GARBAGE_FUNC_PTR pFunc );
|
||||
extern HB_EXPORT PHB_SYMB hb_itemGetSymbol ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemNew ( PHB_ITEM pNull );
|
||||
extern HB_EXPORT void hb_itemInit ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT USHORT hb_itemPCount ( void );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemParam ( USHORT uiParam );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutC ( PHB_ITEM pItem, const char * szText );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutCL ( PHB_ITEM pItem, const char * szText, ULONG ulLen );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutCConst ( PHB_ITEM pItem, const char * szText );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutCLConst( PHB_ITEM pItem, const char * szText, ULONG ulLen );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutCPtr ( PHB_ITEM pItem, char * szText, ULONG ulLen );
|
||||
extern HB_EXPORT void hb_itemSetCMemo ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutD ( PHB_ITEM pItem, int iYear, int iMonth, int iDay );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutDS ( PHB_ITEM pItem, const char * szDate );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutDL ( PHB_ITEM pItem, long lJulian );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutL ( PHB_ITEM pItem, BOOL bValue );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutND ( PHB_ITEM pItem, double dNumber );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNI ( PHB_ITEM pItem, int iNumber );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNL ( PHB_ITEM pItem, long lNumber );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNInt ( PHB_ITEM pItem, HB_LONG lNumber );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNIntLen( PHB_ITEM pItem, HB_LONG lNumber, int iWidth );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNLen ( PHB_ITEM pItem, double dNumber, int iWidth, int iDec );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNDLen ( PHB_ITEM pItem, double dNumber, int iWidth, int iDec );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNDDec ( PHB_ITEM pItem, double dNumber, int iDec );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNILen ( PHB_ITEM pItem, int iNumber, int iWidth );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNLLen ( PHB_ITEM pItem, long lNumber, int iWidth );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNLen ( PHB_ITEM pItem, double dNumber, int iWidth, int iDec );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNDLen ( PHB_ITEM pItem, double dNumber, int iWidth, int iDec );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNDDec ( PHB_ITEM pItem, double dNumber, int iDec );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNILen ( PHB_ITEM pItem, int iNumber, int iWidth );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNLLen ( PHB_ITEM pItem, long lNumber, int iWidth );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNumType( PHB_ITEM pItem, double dNumber, int iDec, int iType1, int iType2 );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutPtr ( PHB_ITEM pItem, void * pValue );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutPtrGC ( PHB_ITEM pItem, void * pValue );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutSymbol( PHB_ITEM pItem, PHB_SYMB pSym );
|
||||
extern HB_EXPORT BOOL hb_itemRelease ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemReturn ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutPtr ( PHB_ITEM pItem, void * pValue );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutPtrGC ( PHB_ITEM pItem, void * pValue );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutSymbol ( PHB_ITEM pItem, PHB_SYMB pSym );
|
||||
extern HB_EXPORT BOOL hb_itemRelease ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemReturn ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemReturnForward( PHB_ITEM pItem );
|
||||
extern HB_EXPORT void hb_itemReturnRelease( PHB_ITEM pItem );
|
||||
extern HB_EXPORT ULONG hb_itemSize ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT HB_TYPE hb_itemType ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT char * hb_itemTypeStr ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT ULONG hb_itemSize ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT HB_TYPE hb_itemType ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT char * hb_itemTypeStr ( PHB_ITEM pItem );
|
||||
#ifndef HB_LONG_LONG_OFF
|
||||
extern HB_EXPORT LONGLONG hb_itemGetNLL ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNLL ( PHB_ITEM pItem, LONGLONG lNumber );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNLLLen( PHB_ITEM pItem, LONGLONG lNumber, int iWidth );
|
||||
extern HB_EXPORT LONGLONG hb_itemGetNLL ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNLL ( PHB_ITEM pItem, LONGLONG lNumber );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemPutNLLLen ( PHB_ITEM pItem, LONGLONG lNumber, int iWidth );
|
||||
#endif
|
||||
|
||||
/* Non Clipper compliant internal API */
|
||||
|
||||
extern HB_EXPORT PHB_ITEM hb_itemParamPtr ( USHORT uiParam, long lMask );
|
||||
extern HB_EXPORT int hb_itemStrCmp ( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ); /* our string compare */
|
||||
extern HB_EXPORT int hb_itemStrICmp ( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ); /* our string compare */
|
||||
extern HB_EXPORT void hb_itemCopy ( PHB_ITEM pDest, PHB_ITEM pSource ); /* copies an item to one place to another respecting its containts */
|
||||
extern HB_EXPORT void hb_itemCopyToRef( PHB_ITEM pDest, PHB_ITEM pSource );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemParamPtr ( USHORT uiParam, long lMask );
|
||||
extern HB_EXPORT int hb_itemStrCmp ( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ); /* our string compare */
|
||||
extern HB_EXPORT int hb_itemStrICmp ( PHB_ITEM pFirst, PHB_ITEM pSecond, BOOL bForceExact ); /* our string compare */
|
||||
extern HB_EXPORT void hb_itemCopy ( PHB_ITEM pDest, PHB_ITEM pSource ); /* copies an item to one place to another respecting its containts */
|
||||
extern HB_EXPORT void hb_itemCopyToRef ( PHB_ITEM pDest, PHB_ITEM pSource );
|
||||
extern HB_EXPORT void hb_itemCopyFromRef( PHB_ITEM pDest, PHB_ITEM pSource );
|
||||
extern HB_EXPORT void hb_itemMove ( PHB_ITEM pDest, PHB_ITEM pSource ); /* moves the value of an item without incrementing of reference counters, source is cleared */
|
||||
extern HB_EXPORT void hb_itemMoveRef ( PHB_ITEM pDest, PHB_ITEM pSource );
|
||||
extern HB_EXPORT void hb_itemMoveToRef( PHB_ITEM pDest, PHB_ITEM pSource );
|
||||
extern HB_EXPORT void hb_itemMove ( PHB_ITEM pDest, PHB_ITEM pSource ); /* moves the value of an item without incrementing of reference counters, source is cleared */
|
||||
extern HB_EXPORT void hb_itemMoveRef ( PHB_ITEM pDest, PHB_ITEM pSource );
|
||||
extern HB_EXPORT void hb_itemMoveToRef ( PHB_ITEM pDest, PHB_ITEM pSource );
|
||||
extern HB_EXPORT void hb_itemMoveFromRef( PHB_ITEM pDest, PHB_ITEM pSource );
|
||||
extern HB_EXPORT void hb_itemClear ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemUnRef ( PHB_ITEM pItem ); /* de-references passed variable */
|
||||
extern HB_EXPORT PHB_ITEM hb_itemUnRefOnce( PHB_ITEM pItem ); /* de-references passed variable, one step*/
|
||||
extern HB_EXPORT void hb_itemClear ( PHB_ITEM pItem );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemUnRef ( PHB_ITEM pItem ); /* de-references passed variable */
|
||||
extern HB_EXPORT PHB_ITEM hb_itemUnRefOnce ( PHB_ITEM pItem ); /* de-references passed variable, one step*/
|
||||
extern HB_EXPORT PHB_ITEM hb_itemUnRefRefer( PHB_ITEM pItem ); /* de-references passed variable, leaving the last reference */
|
||||
extern HB_EXPORT PHB_ITEM hb_itemUnRefWrite( PHB_ITEM pItem, PHB_ITEM pSource ); /* de-references passed variable for writing */
|
||||
extern HB_EXPORT PHB_ITEM hb_itemUnShare ( PHB_ITEM pItem ); /* un-share given string item */
|
||||
extern HB_EXPORT PHB_ITEM hb_itemUnShare ( PHB_ITEM pItem ); /* un-share given string item */
|
||||
extern HB_EXPORT PHB_ITEM hb_itemUnShareString( PHB_ITEM pItem ); /* un-share given string item - the pItem have to be valid unrefed string item */
|
||||
extern HB_EXPORT PHB_ITEM hb_itemReSizeString( PHB_ITEM pItem, ULONG ulSize ); /* Resize string buffer of given string item - the pItem have to be valid unrefed string item */
|
||||
extern HB_EXPORT PHB_ITEM hb_itemClone ( PHB_ITEM pItem ); /* clone the given item */
|
||||
extern HB_EXPORT char * hb_itemStr ( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec ); /* convert a number to a string */
|
||||
extern HB_EXPORT char * hb_itemString ( PHB_ITEM pItem, ULONG * ulLen, BOOL * bFreeReq ); /* Convert any scalar to a string */
|
||||
extern HB_EXPORT BOOL hb_itemStrBuf ( char *szResult, PHB_ITEM pNumber, int iSize, int iDec ); /* convert a number to a string */
|
||||
extern HB_EXPORT PHB_ITEM hb_itemValToStr ( PHB_ITEM pItem ); /* Convert any scalar to a string */
|
||||
extern HB_EXPORT char * hb_itemPadConv ( PHB_ITEM pItem, ULONG * pulSize, BOOL * bFreeReq );
|
||||
extern HB_EXPORT void hb_itemSwap ( PHB_ITEM pItem1, PHB_ITEM pItem2 );
|
||||
extern HB_EXPORT PHB_ITEM hb_itemClone ( PHB_ITEM pItem ); /* clone the given item */
|
||||
extern HB_EXPORT char * hb_itemStr ( PHB_ITEM pNumber, PHB_ITEM pWidth, PHB_ITEM pDec ); /* convert a number to a string */
|
||||
extern HB_EXPORT char * hb_itemString ( PHB_ITEM pItem, ULONG * ulLen, BOOL * bFreeReq ); /* Convert any scalar to a string */
|
||||
extern HB_EXPORT BOOL hb_itemStrBuf ( char *szResult, PHB_ITEM pNumber, int iSize, int iDec ); /* convert a number to a string */
|
||||
extern HB_EXPORT PHB_ITEM hb_itemValToStr ( PHB_ITEM pItem ); /* Convert any scalar to a string */
|
||||
extern HB_EXPORT char * hb_itemPadConv ( PHB_ITEM pItem, ULONG * pulSize, BOOL * bFreeReq );
|
||||
extern HB_EXPORT void hb_itemSwap ( PHB_ITEM pItem1, PHB_ITEM pItem2 );
|
||||
|
||||
#if defined( _HB_API_INTERNAL_ )
|
||||
|
||||
|
||||
@@ -20,10 +20,11 @@ rem set HB_MAKE_FLAGS=
|
||||
rem set HB_CC_NAME=
|
||||
rem ---------------------------------------------------------------
|
||||
|
||||
if "%HB_CC_NAME%" == "" set HB_CC_NAME=vcce
|
||||
if "%HB_GT_LIB%" == "" set HB_GT_LIB=gtwvt
|
||||
if "%HB_CC_NAME%" == "" set HB_CC_NAME=vcce
|
||||
if "%HB_GT_DEFAULT%" == "" set HB_GT_DEFAULT=wvt
|
||||
if "%HB_MAKE_PROGRAM%" == "" set HB_MAKE_PROGRAM=nmake.exe
|
||||
set HB_MAKEFILE=make_%HB_CC_NAME%.mak
|
||||
|
||||
set C_USR=%C_USR% -DHB_NO_WIN_CONSOLE
|
||||
|
||||
@@ -44,20 +45,20 @@ if "%1" == "INSTALL" goto INSTALL
|
||||
|
||||
:BUILD
|
||||
|
||||
%HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% /f make_%HB_CC_NAME%.mak %1 %2 %3 > make_ce.log
|
||||
%HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% %1 %2 %3 > make_%HB_CC_NAME%.log
|
||||
if errorlevel 1 notepad make_%HB_CC_NAME%.log
|
||||
goto EXIT
|
||||
|
||||
:CLEAN
|
||||
|
||||
%HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% /f make_%HB_CC_NAME%.mak CLEAN > make_ce.log
|
||||
%HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% CLEAN > make_%HB_CC_NAME%.log
|
||||
if exist make_%HB_CC_NAME%.log del make_%HB_CC_NAME%.log > nul
|
||||
if exist inst_%HB_CC_NAME%.log del inst_%HB_CC_NAME%.log > nul
|
||||
goto EXIT
|
||||
|
||||
:INSTALL
|
||||
|
||||
%HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% /f make_%HB_CC_NAME%.mak INSTALL > nul
|
||||
%HB_MAKE_PROGRAM% %HB_MAKE_FLAGS% -f %HB_MAKEFILE% INSTALL > nul
|
||||
goto EXIT
|
||||
|
||||
:EXIT
|
||||
|
||||
@@ -707,7 +707,7 @@ LDFLAGSDLL = /DEBUG $(LDFLAGSDLL)
|
||||
# General BUILD rules (not used !)
|
||||
#**********************************************************
|
||||
# General Library BUILD rule
|
||||
#{$(OBJ_DIR)}.obj{$(COMMON_DIR)}.lib:
|
||||
#{$(OBJ_DIR)}$(OBJEXT){$(COMMON_DIR)}.lib:
|
||||
# IF EXIST "$@" $(DEL) "$@" > nul
|
||||
# $(MKLIB) /out:$@ <<
|
||||
#$**
|
||||
@@ -984,12 +984,12 @@ $(DLL_OBJ_DIR)\mainstd.obj : $(VM_DIR)\mainstd.c
|
||||
#**********************************************************
|
||||
#**********************************************************
|
||||
#**********************************************************
|
||||
#
|
||||
|
||||
#**********************************************************
|
||||
# EXTRA Object's DEPENDENCIES
|
||||
#
|
||||
#**********************************************************
|
||||
|
||||
# Generated by an intermediate utility ppgen.exe
|
||||
# Generated by an intermediate utility hbppgen.exe
|
||||
# built at the initial phase of build process
|
||||
$(OBJ_DIR)\pptable.obj : $(OBJ_DIR)\pptable.c
|
||||
$(DLL_OBJ_DIR)\pptable.obj : $(OBJ_DIR)\pptable.c
|
||||
|
||||
@@ -911,7 +911,7 @@ HB_FUNC( FIELDNAME )
|
||||
szName = ( char * ) hb_xgrab( pArea->uiMaxFieldNameLength + 1 );
|
||||
szName[ 0 ] = '\0';
|
||||
SELF_FIELDNAME( pArea, uiIndex, szName );
|
||||
hb_retcAdopt( szName );
|
||||
hb_retc_buffer( szName );
|
||||
return;
|
||||
}
|
||||
/* This is not Clipper compatible! - David G. Holm <dholm@jsd-llc.com>
|
||||
|
||||
@@ -1008,7 +1008,7 @@ static void s_inetRecvPattern( char *szPattern )
|
||||
hb_itemPutNI( pResult, iPos );
|
||||
}
|
||||
|
||||
hb_retclenAdopt( Buffer, iPos );
|
||||
hb_retclen_buffer( Buffer, iPos );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1211,7 +1211,7 @@ HB_FUNC( HB_INETRECVENDBLOCK )
|
||||
hb_itemPutNI( pResult, iPos - (iprotosize[ifindproto]-1) );
|
||||
}
|
||||
|
||||
hb_retclenAdopt( Buffer, iPos - (iprotosize[ifindproto]-1) );
|
||||
hb_retclen_buffer( Buffer, iPos - (iprotosize[ifindproto]-1) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -113,13 +113,13 @@ METHOD SaveToText( cObjectName ) CLASS HBPersistent
|
||||
local oNew := &( ::ClassName() + "()" ):CreateNew()
|
||||
local aProperties, n, uValue, uNewValue, cObject, cType
|
||||
|
||||
static nIndent := -3
|
||||
static s_nIndent := -3
|
||||
|
||||
DEFAULT cObjectName TO "o" + ::ClassName()
|
||||
|
||||
nIndent += 3
|
||||
cObject := iif( nIndent > 0, hb_OSNewLine(), "" ) + Space( nIndent ) + ;
|
||||
"OBJECT " + iif( nIndent != 0, "::", "" ) + cObjectName + " AS " + ;
|
||||
s_nIndent += 3
|
||||
cObject := iif( s_nIndent > 0, hb_OSNewLine(), "" ) + Space( s_nIndent ) + ;
|
||||
"OBJECT " + iif( s_nIndent != 0, "::", "" ) + cObjectName + " AS " + ;
|
||||
::ClassName() + hb_OSNewLine()
|
||||
|
||||
aProperties := __ClsGetProperties( ::ClassH )
|
||||
@@ -133,9 +133,9 @@ METHOD SaveToText( cObjectName ) CLASS HBPersistent
|
||||
|
||||
do case
|
||||
case cType == "A"
|
||||
nIndent += 3
|
||||
cObject += ArrayToText( uValue, aProperties[ n ], nIndent )
|
||||
nIndent -= 3
|
||||
s_nIndent += 3
|
||||
cObject += ArrayToText( uValue, aProperties[ n ], s_nIndent )
|
||||
s_nIndent -= 3
|
||||
if n < Len( aProperties )
|
||||
cObject += hb_OSNewLine()
|
||||
endif
|
||||
@@ -152,7 +152,7 @@ METHOD SaveToText( cObjectName ) CLASS HBPersistent
|
||||
if n == 1
|
||||
cObject += hb_OSNewLine()
|
||||
endif
|
||||
cObject += Space( nIndent ) + " ::" + ;
|
||||
cObject += Space( s_nIndent ) + " ::" + ;
|
||||
aProperties[ n ] + " = " + ValToText( uValue ) + ;
|
||||
hb_OSNewLine()
|
||||
endcase
|
||||
@@ -161,8 +161,8 @@ METHOD SaveToText( cObjectName ) CLASS HBPersistent
|
||||
|
||||
next
|
||||
|
||||
cObject += hb_OSNewLine() + Space( nIndent ) + "ENDOBJECT" + hb_OSNewLine()
|
||||
nIndent -= 3
|
||||
cObject += hb_OSNewLine() + Space( s_nIndent ) + "ENDOBJECT" + hb_OSNewLine()
|
||||
s_nIndent -= 3
|
||||
|
||||
return cObject
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
* The following parts are Copyright of the individual authors.
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* Copyright 1999-2001 Viktor Szakats <viktor.szakats@syenar.hu>
|
||||
* Copyright 1999-2007 Viktor Szakats <viktor.szakats@syenar.hu>
|
||||
* hb_itemPCount()
|
||||
* hb_itemParamPtr()
|
||||
* hb_itemReturnPtr()
|
||||
@@ -66,6 +66,7 @@
|
||||
* hb_itemGetCLen()
|
||||
* hb_itemGetNLen()
|
||||
* hb_itemPutCConst()
|
||||
* hb_itemPutCLConst()
|
||||
* hb_itemPutNLen()
|
||||
* hb_itemPutNDLen()
|
||||
* hb_itemPutNILen()
|
||||
@@ -226,35 +227,6 @@ HB_EXPORT PHB_ITEM hb_itemPutC( PHB_ITEM pItem, const char * szText )
|
||||
return pItem;
|
||||
}
|
||||
|
||||
HB_EXPORT PHB_ITEM hb_itemPutCConst( PHB_ITEM pItem, const char * szText )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutCConst(%p, %s)", pItem, szText));
|
||||
|
||||
if( pItem )
|
||||
{
|
||||
if( HB_IS_COMPLEX( pItem ) )
|
||||
hb_itemClear( pItem );
|
||||
}
|
||||
else
|
||||
pItem = hb_itemNew( NULL );
|
||||
|
||||
pItem->type = HB_IT_STRING;
|
||||
pItem->item.asString.allocated = 0;
|
||||
|
||||
if( szText == NULL )
|
||||
{
|
||||
pItem->item.asString.value = "";
|
||||
pItem->item.asString.length = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pItem->item.asString.value = ( char * ) szText;
|
||||
pItem->item.asString.length = strlen( szText );
|
||||
}
|
||||
|
||||
return pItem;
|
||||
}
|
||||
|
||||
HB_EXPORT PHB_ITEM hb_itemPutCL( PHB_ITEM pItem, const char * szText, ULONG ulLen )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutCL(%p, %s, %lu)", pItem, szText, ulLen));
|
||||
@@ -297,6 +269,64 @@ HB_EXPORT PHB_ITEM hb_itemPutCL( PHB_ITEM pItem, const char * szText, ULONG ulLe
|
||||
return pItem;
|
||||
}
|
||||
|
||||
HB_EXPORT PHB_ITEM hb_itemPutCConst( PHB_ITEM pItem, const char * szText )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutCConst(%p, %s)", pItem, szText));
|
||||
|
||||
if( pItem )
|
||||
{
|
||||
if( HB_IS_COMPLEX( pItem ) )
|
||||
hb_itemClear( pItem );
|
||||
}
|
||||
else
|
||||
pItem = hb_itemNew( NULL );
|
||||
|
||||
pItem->type = HB_IT_STRING;
|
||||
pItem->item.asString.allocated = 0;
|
||||
|
||||
if( szText == NULL )
|
||||
{
|
||||
pItem->item.asString.value = "";
|
||||
pItem->item.asString.length = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pItem->item.asString.value = ( char * ) szText;
|
||||
pItem->item.asString.length = strlen( szText );
|
||||
}
|
||||
|
||||
return pItem;
|
||||
}
|
||||
|
||||
HB_EXPORT PHB_ITEM hb_itemPutCLConst( PHB_ITEM pItem, const char * szText, ULONG ulLen )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutCConst(%p, %s, %lu)", pItem, szText, ulLen));
|
||||
|
||||
if( pItem )
|
||||
{
|
||||
if( HB_IS_COMPLEX( pItem ) )
|
||||
hb_itemClear( pItem );
|
||||
}
|
||||
else
|
||||
pItem = hb_itemNew( NULL );
|
||||
|
||||
pItem->type = HB_IT_STRING;
|
||||
pItem->item.asString.allocated = 0;
|
||||
|
||||
if( szText == NULL )
|
||||
{
|
||||
pItem->item.asString.value = "";
|
||||
pItem->item.asString.length = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pItem->item.asString.value = ( char * ) szText;
|
||||
pItem->item.asString.length = ulLen;
|
||||
}
|
||||
|
||||
return pItem;
|
||||
}
|
||||
|
||||
HB_EXPORT PHB_ITEM hb_itemPutCPtr( PHB_ITEM pItem, char * szText, ULONG ulLen )
|
||||
{
|
||||
HB_TRACE(HB_TR_DEBUG, ("hb_itemPutCPtr(%p, %s, %lu)", pItem, szText, ulLen));
|
||||
|
||||
Reference in New Issue
Block a user