Código C rebelde

Código C rebelde

Postby hmpaquito » Mon Apr 30, 2012 5:12 pm

Hola,

Vaya por delante que no entiendo el lenguaje
Fuentes C que "siempre" han funcionado empiezaz a dar errores en la compilacion y siempre en la misma funcion:
hb_storc(). Veo que la funcion tiene como 2 parametros "fijos" aunque parece (por el .h) que admite mas.

El problema se da al usar la funcion hb_storc() con 3 parametros y el error que da es:
Error E2227 ... Extra parameter in call to hb_storc in function HB_FUN_FT_GETE

Con lo que pareciera que no le gusta que haya un tercer parametro...
Puede ser que tenga que anteponer algun include .h a otro ?

A ver si alguien puede decirme que esta pasando. Gracias.
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Código C rebelde

Postby carlos vargas » Mon Apr 30, 2012 7:08 pm

ya hace un tiempo las api extendidas de harbour cambiaron, agregando un parametro extra.
eso es lo que ha ocurrido. :-)

date una busqueda en este foro por esas funciones hb_parc o similar hasta que encuentres info mas detallada y como pudes hacer para corregirlo.

salu2
carlos vargas
Salu2
Carlos Vargas
Desde Managua, Nicaragua (CA)
User avatar
carlos vargas
 
Posts: 1688
Joined: Tue Oct 11, 2005 5:01 pm
Location: Nicaragua

Re: Código C rebelde

Postby hmpaquito » Tue May 01, 2012 9:55 am

Carlos,

Gracias por responder; utilizo el xHarbour 1.0.0 desde hace tiempo. Y esos fuentes .c compilaban bien hasta hace dos dias... es como si algo hubiera cambiado en las directivas de compilacion del BCC 5.5...

¿ Se te ocurre alguna otra cosa aparte de que busque en el foro ?

Nuevamente gracias.

Saludos
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Código C rebelde

Postby Antonio Linares » Tue May 01, 2012 10:01 am

hm,

Comprueba si la definición que tienes en hbapi.h es esta:

extern HB_EXPORT void hb_storc( const char * szText, int iParam, ... );

y asegurate que hayas cambiado los paths a otra carpeta y estes usando otro fichero hbapi.h
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41403
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Código C rebelde

Postby hmpaquito » Wed May 02, 2012 8:44 am

Antonio,

Gracias por la respuesta. He intentado:
1º Copiar la definicion (extern) del hb_storc que hay en hbapi.h al principio del puente (da error de compilacion) seguramente
por repeticion.
2º Poner el extend.api y el habapi.h de la version de xHarbour en el directorio del fuente .c y no ha habido manera.

Pongo aqui el fuente en .c el extend.api y el hbapi.h

Trozo 1:

Code: Select all  Expand view

/*
 * $Id: getenvrn.c,v 1.4 2002/04/15 04:39:01 walito Exp $
 */


/*
 * File......: GETENVRN.C
 * Author....: Rick Whitt
 * CIS ID....: 70672,605
 *
 * This is an original work by Rick Whitt and is placed in the
 * public domain.
 *
 * Modification history:
 * ---------------------
 *    Rev 1.2a  09 Sep 1996            JO
 * Added underscore prefix to environ() calls for MSC 8.0
 * Note: 5.2e version will work if linked with MSC OldNames.lib
 *
 *    Rev 1.2   01 Jan 1996 03:01:00   TED
 * Added prototypes to kill compiler warning.
 *
 *    Rev 1.1   15 Aug 1991 23:08:42   GLENN
 * Forest Belt proofread/edited/cleaned up doc
 *
 *    Rev 1.0   17 Jul 1991 22:08:12   GLENN
 * Initial revision.
 *
 */



/*  $DOC$
 *  $FUNCNAME$
 *     FT_GETE()
 *  $CATEGORY$
 *     Environment
 *  $ONELINER$
 *     Return the entire current environment
 *  $SYNTAX$
 *     FT_GETE( [ @<xReceiveVar> ] ) -> nNumStrings
 *  $ARGUMENTS$
 *     <xReceiveVar> is the variable to receive the environment data.
 *
 *     <xReceiveVar> can be a character type variable, in which case
 *     the function will place all environment strings in the variable
 *     separated by carriage return/line feeds (chr 13 + chr(10)).
 *
 *     <xReceiveVar> can be an array type, in which case the function
 *     will place each string in an array element.  The array MUST be
 *     declared with the proper number of elements prior to passing it
 *     to the function.  This can be done by calling FT_GETE() without
 *     parameters first to get the number of strings in the environment.
 *
 *     Note that the argument MUST be passed by reference. Since arrays
 *     are by nature passed by reference, the "@" symbol is optional when
 *     passing an array.
 *
 *     If no argument is passed, FT_GETE() merely returns the number
 *     of strings in the environment.
 *  $RETURNS$
 *     FT_GETE() returns the total number of strings found in the
 *     current program's environment.
 *  $DESCRIPTION$
 *     This function stores ALL of the current program's environment
 *     variables in either a block of text lines or in an array.  It is
 *     useful for looking at the entire environment at once, or recording
 *     a snapshot of it to a file for later inspection, such as when a
 *     program error occurs.  If the value of ONE SPECIFIC variable is
 *     desired, use Clipper's built-in GETE() function.
 *
 *     This function uses the undocumented internal variable "_environ",
 *     as well as the functions _strcpy(), _strcat(), and _strlen() from
 *     CLIPPER.LIB
 *  $EXAMPLES$
 *     Get the environment in text form and browse it:
 *
 *        cEnvBlock   := ""
 *        nNumStrings := FT_GETE(@cEnvBlock)
 *        @  0, 0 to MAXROW() - 1, MAXCOL()
 *        @  MAXROW(), 0 say 'Browse strings, press ESC to exit...'
 *        MEMOWRIT(cEnvBlock, 1, 1, MAXROW() - 2,MAXCOL() - 1, .F.)
 *
 *     Get the environment in text form and write it to a file:
 *
 *        cEnvBlock := ""
 *        FT_GETE(@cEnvBlock)
 *        MEMOWRIT("ENVIRON.TXT", cEnvBlock)
 *
 *     Get the environment in Array form:
 *
 *        aEnvArray := ARRAY(FT_GETE())
 *        FT_GETE(aEnvArray)
 *        ? aEnvArray[1]       // "COMSPEC=C:\COMMAND.COM"
 *        ? aEnvArray[2]       // "PATH=C:\;C:\DOS;C:\UTIL;C:\CLIP50\BIN"
 *          ... etc ...
 *  $END$
 */



#include <extend.api>
#include <fm.api>




#define NORETURN   0
#define CHARTYPE   1
#define ARRAYTYPE  2
#define CRLF       "\x0D\x0A"
/*
unsigned int strlen( char * );
char * strcpy( char *, char * );
char * strcat( char *, char * );
*/

HB_FUNC(FT_GETE)
{
    /* INTERNALS WARNING: All references to 'environ', strlen(), ;
       strcpy(), and strcat() are undocumented Clipper 5.0 internals.
    */

#if defined(HB_OS_DOS) || defined(HB_OS_WIN_32)
   {
   
    extern char **_environ;
    char *buffer = NULL;
    int x;
    int buffsize = 0;
    int rettype  = NORETURN;

    if (ISCHAR(1))
        rettype = CHARTYPE;
    if (ISARRAY(1))
        rettype = ARRAYTYPE;

    if (rettype == CHARTYPE)
        // scan strings first and add up total size
        {
        for (x = 0; ;x++)
            {
            if (! _environ[x])
                // null string, we're done
                break;
            // add length of this string plus 2 for the crlf
            buffsize += (strlen(_environ[x]) + 2);
            }
        // add 1 more byte for final nul character
        buffsize++;

        //  now allocate that much memory and make sure 1st byte is a nul
        buffer = ( char * ) hb_xalloc(buffsize);
        strcpy(buffer,"\0");
        }

    for (x = 0; ;x++)
        {
        if (! _environ[x])
            // null string, we're done
            break;

        if (rettype == CHARTYPE)
            {
            // tack string onto end of buffer
            strcat( buffer, _environ[x] );
            // add crlf at end of each string
            strcat( buffer, CRLF );
            }

        if (rettype == ARRAYTYPE)
            // store string to next array element
            hb_storc(_environ[x],1,x + 1);

        }

    if (rettype == CHARTYPE)
        {
        // return buffer to app and free memory
        hb_storc(buffer,1);
        hb_xfree(buffer);
        }

    // return number of strings found
    hb_retni(x);
}
#endif
}






























//====================== extend.api ==========================================
#ifdef 0
/*
 * $Id: extend.api,v 1.2 2002/01/12 10:04:27 ronpinkas Exp $
 */


/*
 * Harbour Project source code:
 * Compatibility header file for CA-Clipper Extend API
 *
 * Copyright 1999-2001 Viktor Szakats <viktor.szakats@syenar.hu>
 * 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.
 *
 */


/* DON'T USE THIS FILE FOR NEW HARBOUR C CODE */

#ifndef _EXTEND_API
#define _EXTEND_API

#include "clipdefs.h"
#include "hbapi.h"

typedef PHB_ITEM  ITEM;
#ifndef CLIPPERDEFS
   typedef double    XDOUBLE;
#endif

/* Compatible defines */

#define UNDEF           HB_IT_NIL
#define CHARACTER       HB_IT_STRING
#define NUMERIC         HB_IT_NUMERIC
#define LOGICAL         HB_IT_LOGICAL
#if !(defined(HB_OS_WIN_32) && defined(HB_OS_WIN_32_USED))
   #define DATE            HB_IT_DATE
#endif
#define ALIAS           HB_IT_ALIAS
#define MPTR            HB_IT_BYREF        /* or'ed with type when passed by reference */
#define MEMO            HB_IT_MEMO
/* NOTE: CA-Cl*pper bug: WORD will conflict with the typedef with the same
         name in clipdefs.h [vszakats] */

#if !(defined(HB_OS_WIN_32) && defined(HB_OS_WIN_32_USED))
   #define WORD            ( HB_IT_INTEGER | HB_IT_LONG )
#endif
#define ARRAY           HB_IT_ARRAY
#define BLOCK           HB_IT_BLOCK
#if !(defined(HB_OS_WIN_32) && defined(HB_OS_WIN_32_USED))
   #define DOUBLE          HB_IT_DOUBLE
#endif

/* Macros */

#define PCOUNT          hb_pcount()
#define ALENGTH( n )    hb_parinfa( n, 0 )

/* Functions */

#define _parc           hb_parc
#define _parclen        hb_parclen
#define _parcsiz        hb_parcsiz
#define _pards          hb_pards
#define _parinfa        hb_parinfa
#define _parinfo        hb_parinfo
#define _parl           hb_parl
#define _parnd          hb_parnd
#define _parni          hb_parni
#define _parnl          hb_parnl

#define _ret            hb_ret
#define _retc           hb_retc
#define _retclen        hb_retclen
#define _retds          hb_retds
#define _retl           hb_retl
#define _retnd          hb_retnd
#define _retni          hb_retni
#define _retnl          hb_retnl

#define _storc          hb_storc
#define _storclen       hb_storclen
#define _stords         hb_stords
#define _storl          hb_storl
#define _stornd         hb_stornd
#define _storni         hb_storni
#define _stornl         hb_stornl

#endif /* _EXTEND_API */

#endif



 
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Código C rebelde

Postby hmpaquito » Wed May 02, 2012 8:50 am

Antonio,

En el trozo 1 iban el .c y el extend.api.
En el trozo 2 van el hbapi.h

Code: Select all  Expand view

//===================== habapi.h =============================
#ifdef 0
/*
 * $Id: hbapi.h,v 1.219 2007/09/25 07:32:32 marchuet Exp $
 */


/*
 * Harbour Project source code:
 * Header file for the Extend API, Array API, misc API and base declarations
 *
 * Copyright 1999 Antonio Linares <alinares@fivetech.com>
 * 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.
 *
 */


/* TOFIX: There are several things in this file which are not part of the
          standard Harbour API, in other words these things are not
          guaranteed to remain unchanged. To avoid confusion these should be
          moved to somewhere else (like HBRTL.H). [vszakats] */


#ifndef HB_APIEXT_H_
#define HB_APIEXT_H_

#include "hbvmpub.h"

HB_EXTERN_BEGIN


// ...


/* Extend API */
extern HB_EXPORT char *   hb_parc( int iParam, ... );  /* retrieve a string parameter */
extern HB_EXPORT char *   hb_parcx( int iParam, ... );  /* retrieve a string parameter */
extern HB_EXPORT ULONG    hb_parclen( int iParam, ... ); /* retrieve a string parameter length */
extern HB_EXPORT ULONG    hb_parcsiz( int iParam, ... ); /* retrieve a by-reference string parameter length, including terminator */
extern HB_EXPORT char *   hb_pards( int iParam, ... ); /* retrieve a date as a string yyyymmdd */
extern HB_EXPORT char *   hb_pardts( int iParam, ... ); /* retrieve a date as a string yyyymmddhhmmss.ccc */
extern HB_EXPORT char *   hb_pardsbuff( char * szDate, int iParam, ... ); /* retrieve a date as a string yyyymmdd */
extern HB_EXPORT char *   hb_pardtsbuff( char * szDateTime, int iParam, ... ); /* retrieve a date as a string yyyymmddhhmmss.ccc */
extern HB_EXPORT LONG     hb_pardl( int iParam, ... ); /* retrieve a date as long integer - number of days from Julian's day */
extern HB_EXPORT LONG     hb_part( int iParam, ... ); /* retrieve a time part from a datetime as long in milliseconds */
extern HB_EXPORT double   hb_pardtd( int iParam, ... ); /* retrieve a datetime as double - number of days from Julian's day plus time as decimal part of date */
extern HB_EXPORT double   hb_pardtsec( int iParam, ... ); /* retrieve a datetime as double - number of seconds from Julian's day plus time */
extern HB_EXPORT ULONG    hb_parinfa( int iParamNum, ULONG uiArrayIndex ); /* retrieve length or element type of an array parameter */
extern HB_EXPORT ULONG    hb_parinfo( int iParam ); /* Determine the param count or data type */
extern HB_EXPORT int      hb_parl( int iParam, ... ); /* retrieve a logical parameter as an int */
extern HB_EXPORT double   hb_parnd( int iParam, ... ); /* retrieve a numeric parameter as a double */
extern HB_EXPORT int      hb_parni( int iParam, ... ); /* retrieve a numeric parameter as a integer */
extern HB_EXPORT LONG     hb_parnl( int iParam, ... ); /* retrieve a numeric parameter as a LONG */
extern HB_EXPORT HB_LONG  hb_parnint( int iParam, ... ); /* retrieve a numeric parameter as a HB_LONG */
extern HB_EXPORT void *   hb_parptr( int iParam, ... ); /* retrieve a parameter as a pointer */
extern HB_EXPORT void *   hb_parptrGC( HB_GARBAGE_FUNC_PTR pFunc, int iParam, ... ); /* retrieve a parameter as a pointer if it's a pointer to GC allocated block */
extern HB_EXPORT PHB_ITEM hb_param( int iParam, LONG lMask ); /* retrieve a generic parameter */
extern HB_EXPORT PHB_ITEM hb_paramError( int iParam ); /* Returns either the generic parameter or a NIL item if param not provided */
extern HB_EXPORT BOOL     hb_extIsArray( int iParam );
extern HB_EXPORT BOOL     hb_extIsObject( int iParam );

#ifndef HB_LONG_LONG_OFF
   extern LONGLONG HB_EXPORT hb_parnll( int iParam, ... ); /* retrieve a numeric parameter as a double */
#endif

#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) )

#ifndef HB_ARRAY_COUNTER_DEFAULT_HOLDERS
   #define HB_ARRAY_COUNTER_DEFAULT_HOLDERS 1
#endif

#define HB_VAR_PARAM_FLAG 255

#ifdef HB_API_MACROS
   #include "hbapiitm.h"
   #ifndef HB_COMP_H_
      #include "hbstack.h"
   #endif

   #define hb_pcount()                          ( ( int ) ( ( * HB_VM_STACK.pBase )->item.asSymbol.paramcnt ) )

    #define hb_ret()                             hb_itemClear( hb_stackReturnItem() )
    #define hb_reta( ulLen )                     hb_arrayNew( hb_stackReturnItem(), (ulLen) )
    #define hb_retc( szText )                    hb_itemPutC( hb_stackReturnItem(), (szText) )
    #define hb_retclen( szText, ulLen )          hb_itemPutCL( hb_stackReturnItem(), (szText), (ulLen) )

    #define hb_retcAdopt( szText )               hb_itemPutCPtr( hb_stackReturnItem(), (szText), ( (szText) ? strlen( szText ) : 0 ) )
    #define hb_retclenAdopt( szText, ulLen )     hb_itemPutCPtr( hb_stackReturnItem(), (szText), (ulLen) )
    #define hb_retcStatic( szText )              hb_itemPutCStatic( hb_stackReturnItem(), (szText) )
    #define hb_retclenStatic( szText, ulLen )    hb_itemPutCLStatic( hb_stackReturnItem(), (szText), (ulLen) )

    #define hb_retclenAdoptRaw( szText, ulLen )  hb_itemPutCRaw( hb_stackReturnItem(), (szText), (ulLen) )

    #define hb_retds( szDate )                   hb_itemPutDS( hb_stackReturnItem(), (szDate) )
    #define hb_retdts( szDateTime )              hb_itemPutDTS( hb_stackReturnItem(), (szDateTime) )
    #define hb_retd( iYear, iMonth, iDay )       hb_itemPutD( hb_stackReturnItem(), (iYear), (iMonth), (iDay) )
    #define hb_retdl( lJulian )                  hb_itemPutDL( hb_stackReturnItem(), (lJulian) )
    #define hb_retdt( iYear, iMonth, iDay, iHour, iMin, dSec, iAmPm )   hb_itemPutDT( hb_stackReturnItem(), (iYear), (iMonth), (iDay), (iHour), (iMin), (dSec), (iAmPm) )
    #define hb_retdtd( dDateTime )               hb_itemPutDTD( hb_stackReturnItem(), (dDateTime) )
    #define hb_retdtl( lDate, lTime )            hb_itemPutDTL( hb_stackReturnItem(), (lDate), (lTime) )
    #define hb_retl( iLogical )                  hb_itemPutL( hb_stackReturnItem(), (iLogical) ? TRUE : FALSE )
    #define hb_retnd( dNumber )                  hb_itemPutND( hb_stackReturnItem(), (dNumber) )
    #define hb_retni( iNumber )                  hb_itemPutNI( hb_stackReturnItem(), (iNumber) )
    #define hb_retnl( lNumber )                  hb_itemPutNL( hb_stackReturnItem(), (lNumber) )
    #define hb_retnlen( dNumber, iWidth, iDec )  hb_itemPutNLen( hb_stackReturnItem(), (dNumber), (iWidth), (iDec) )
    #define hb_retndlen( dNumber, iWidth, iDec ) hb_itemPutNDLen( hb_stackReturnItem(), (dNumber), (iWidth), (iDec) )
    #define hb_retnilen( iNumber, iWidth )       hb_itemPutNILen( hb_stackReturnItem(), (iNumber), (iWidth) )
    #define hb_retnllen( lNumber, iWidth )       hb_itemPutNLLen( hb_stackReturnItem(), (lNumber), (iWidth) )
    #define hb_retptr( voidPtr )                 hb_itemPutPtr( hb_stackReturnItem(), (voidPtr) )
    #define hb_retptrGC( voidPtr )               hb_itemPutPtrGC( hb_stackReturnItem(), (voidPtr) )
    #define hb_retnint( llNumber )               hb_itemPutNInt( hb_stackReturnItem(), (llNumber) )
    #define hb_retnintlen( llNumber, iWidth )    hb_itemPutNIntLen( hb_stackReturnItem(), (llNumber), (iWidth) )
    #define hb_retnll( llNumber )                hb_itemPutNLL( hb_stackReturnItem(), (llNumber) )
    #define hb_retnlllen( llNumber, iWidth )     hb_itemPutNLLLen( hb_stackReturnItem(), (llNumber), (iWidth) )

#else
   /* JC1: including thread anyways, because it defines some void macros when not in MT */
   #include "thread.h"
    extern int   HB_EXPORT  hb_pcount( void );          /* returns the number of suplied parameters */

    extern void  HB_EXPORT  hb_ret( void );             /* post a NIL return value */
    extern void  HB_EXPORT  hb_retc( const char * szText );   /* returns a string */
    extern void  HB_EXPORT  hb_retclen( const char * szText, ULONG ulLen ); /* returns a string with a specific length */

    extern void  HB_EXPORT  hb_retcAdopt( char * szText );
    extern void  HB_EXPORT  hb_retclenAdopt( char * szText, ULONG ulLen );
    extern void  HB_EXPORT  hb_retclenAdoptRaw( char * szText, ULONG ulLen );

    extern void  HB_EXPORT  hb_retcStatic( const char * szText );
    extern void  HB_EXPORT  hb_retclenStatic( const char * szText, ULONG ulLen );

    extern void  HB_EXPORT  hb_retclenRaw( char * szText, ULONG ulLen );

    extern void  HB_EXPORT  hb_retds( const char * szDate );  /* returns a date, must use yyyymmdd format */
    extern void  HB_EXPORT  hb_retdts( char * szDateTime );  /* returns a date, must use yyyymmdd hh:mm:ss.cc format */
    extern void  HB_EXPORT  hb_retd( int iYear, int iMonth, int iDay ); /* returns a date */
    extern void  HB_EXPORT  hb_retdl( LONG lJulian );   /* returns a LONG value as a julian date */
    extern void  HB_EXPORT  hb_retdt( int iYear, int iMonth, int iDay, int iHour, int iMin, double dSec, int iAmPm ); /* returns a datetime */
    extern void  HB_EXPORT  hb_retdtd( double dDateTime ); /* returns a datetime as double */
    extern void  HB_EXPORT  hb_retdtl( LONG lDate, LONG lTime ); /* returns a datetime as JulianÝs date and seconds */
    extern void  HB_EXPORT  hb_retl( int iTrueFalse );  /* returns a logical integer */
    extern void  HB_EXPORT  hb_retnd( double dNumber ); /* returns a double */
    extern void  HB_EXPORT  hb_retni( int iNumber );    /* returns a integer number */
    extern void  HB_EXPORT  hb_retnl( LONG lNumber );   /* returns a LONG number */
    extern void  HB_EXPORT  hb_retnlen( double dNumber, int iWidth, int iDec ); /* returns a double, with specific width and decimals */
    extern void  HB_EXPORT  hb_retndlen( double dNumber, int iWidth, int iDec ); /* returns a double, with specific width and decimals */
    extern void  HB_EXPORT  hb_retnilen( int iNumber, int iWidth ); /* returns a integer number, with specific width */
    extern void  HB_EXPORT  hb_retnllen( LONG lNumber, int iWidth ); /* returns a LONG number, with specific width */
    extern void  HB_EXPORT  hb_reta( ULONG ulLen );  /* returns an array with a specific length */
    extern void  HB_EXPORT  hb_retptr( void * voidPtr );  /* returns a pointer */
    extern void  HB_EXPORT  hb_retptrGC( void * voidPtr ); /* returns a pointer to an allocated memory, collected by GC */
    extern void  HB_EXPORT  hb_retnint( HB_LONG llNumber );
    extern void  HB_EXPORT  hb_retnintlen( HB_LONG llNumber, int iWidth );
#ifndef HB_LONG_LONG_OFF
    extern void  HB_EXPORT  hb_retnll( LONGLONG llNumber ); /* returns a long long int */
    extern void  HB_EXPORT  hb_retnlllen( LONGLONG llNumber, int iWidth ); /* returns a long long int, with specific width */
#endif

#endif

extern void  HB_EXPORT  hb_storc( char * szText, int iParam, ... ); /* stores a szString on a variable by reference */
extern void  HB_EXPORT  hb_storclen( char * szText, ULONG ulLength, int iParam, ... ); /* stores a fixed length string on a variable by reference */
extern void  HB_EXPORT  hb_storclenAdopt( char * szText, ULONG ulLength, int iParam, ... ); /* stores a fixed length string on a variable by reference */
extern void  HB_EXPORT  hb_stords( char * szDate, int iParam, ... );   /* szDate must have yyyymmdd format */
extern void  HB_EXPORT  hb_stordts( char * szDateTime, int iParam, ... );   /* szDate must have yyyymmdd format */
extern void  HB_EXPORT  hb_stord( int iYear, int iMonth, int iDay, int iParam, ... ); /* stores a Julian's date value on a variable by reference */
extern void  HB_EXPORT  hb_stordt( int iYear, int iMonth, int iDay, int iHour, int iMin, double dSec, int iAmPm, int iParam, ... ); /* stores a Julian's date value on a variable by reference */
extern void  HB_EXPORT  hb_stordl( LONG lJulian, int iParam, ... ); /* stores a Julian's date value on a variable by reference */
extern void  HB_EXPORT  hb_stordtd( double dDateTime, int iParam, ... ); /* stores a date and time double on a variable by reference */
extern void  HB_EXPORT  hb_stordtl( LONG lDate, LONG lTime, int iParam, ... ); /* stores a logical integer on a variable by reference */
extern void  HB_EXPORT  hb_storl( int iLogical, int iParam, ... ); /* stores a logical integer on a variable by reference */
extern void  HB_EXPORT  hb_storni( int iValue, int iParam, ... ); /* stores an integer on a variable by reference */
extern void  HB_EXPORT  hb_stornl( LONG lValue, int iParam, ... ); /* stores a LONG on a variable by reference */
extern void  HB_EXPORT  hb_stornint( HB_LONG lValue, int iParam, ... ); /* stores a HB_LONG on a variable by reference */
extern void  HB_EXPORT  hb_stornd( double dValue, int iParam, ... ); /* stores a double on a variable by reference */
extern void  HB_EXPORT  hb_storptr( void * pointer, int iParam, ... ); /* stores a pointer on a variable by reference */

// ...

#endif
 
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Código C rebelde

Postby Carlos Mora » Thu May 03, 2012 11:53 am

Paquito,

¿que pasa si en un funcion c cambias, en donde tienes 3 parámetros, hb_storc por hb_storvc()?

esa sería la corrección para el Harbour nuevo, no se como funcionaría con xharbour.
Saludos
Carlos Mora
http://harbouradvisor.blogspot.com/
StackOverflow http://stackoverflow.com/users/549761/carlos-mora
“If you think education is expensive, try ignorance"
Carlos Mora
 
Posts: 988
Joined: Thu Nov 24, 2005 3:01 pm
Location: Madrid, España

Re: Código C rebelde

Postby hmpaquito » Thu May 03, 2012 2:25 pm

Carlos,

Antes de nada: gracias por responder.

Es que de lo que se trata es que no he cambiado nada de los fuentes .c (que no son mios: son publicos: en el caso que nos trae, se trata de la Nanfor.Lib)

Aparte de ese fuente tengo mas en las mismas condiciones.
Me huele que tiene que ser un SET INCLUDE o algo asi, pero no lo pillo: tampoco, APARENTEMENTE, he cambiado nada del entorno de compilacion...

Gracias nuevamente por tu interés

Un saludo
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 42 guests