De *.C Para *.Obj en BCC74 no funciona más.


Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby Antonio Linares » Sat Oct 14, 2023 3:41 pm

Dear Enrico,

great!

going to test it... :-)
regards, saludos

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


Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby Eroni » Fri Nov 17, 2023 2:55 pm

Dear
Any ideas on how I could resolve this error?
Code: Select all  Expand view

static uint16_t crc_ccitt_generic( const unsigned char *input_str, size_t num_bytes, uint16_t start_value ) {

    uint16_t crc;
    uint16_t tmp;
    uint16_t short_c;
    const unsigned char *ptr;
    size_t a;

    if ( ! crc_tabccitt_init ) init_crcccitt_tab();

    crc = start_value;
    ptr = input_str;

    if ( ptr != NULL ) for (a=0; a<num_bytes; a++) {

        short_c = 0x00ff & (unsigned short) *ptr;     // Conversion may lose significant digits in function crc_ccitt_generic
        tmp     = (crc >> 8) ^ short_c;               // Conversion may lose significant digits in function crc_ccitt_generic
        crc     = (crc << 8) ^ crc_tabccitt[tmp];     // Conversion may lose significant digits in function crc_ccitt_generic

        ptr++;
    }

    return crc;
 


Thanks in advance
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
User avatar
Eroni
 
Posts: 90
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil

Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby Enrico Maria Giordano » Fri Nov 17, 2023 3:16 pm

Eroni wrote:Dear
Any ideas on how I could resolve this error?
Code: Select all  Expand view

static uint16_t crc_ccitt_generic( const unsigned char *input_str, size_t num_bytes, uint16_t start_value ) {

    uint16_t crc;
    uint16_t tmp;
    uint16_t short_c;
    const unsigned char *ptr;
    size_t a;

    if ( ! crc_tabccitt_init ) init_crcccitt_tab();

    crc = start_value;
    ptr = input_str;

    if ( ptr != NULL ) for (a=0; a<num_bytes; a++) {

        short_c = 0x00ff & (unsigned short) *ptr;     // Conversion may lose significant digits in function crc_ccitt_generic
        tmp     = (crc >> 8) ^ short_c;               // Conversion may lose significant digits in function crc_ccitt_generic
        crc     = (crc << 8) ^ crc_tabccitt[tmp];     // Conversion may lose significant digits in function crc_ccitt_generic

        ptr++;
    }

    return crc;
 


Thanks in advance


Try this and let me know if it works for you:

Code: Select all  Expand view
short_c = ( uint16_t ) ( 0x00ff & (unsigned short) *ptr );
tmp     = ( uint16_t ) ( (crc >> 8) ^ short_c );
crc     = ( uint16_t ) ( (crc << 8) ^ crc_tabccitt[tmp] );
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby paquitohm » Fri Nov 17, 2023 5:45 pm




Mr. Enrico,

Thank you very much for your efforts.

Three items.
- Is stable release ?
- a few old 7/7/23 perhaps ?
- What it provides, it is faster, more compatible ?
Regards
paquitohm
 
Posts: 108
Joined: Fri Jan 14, 2022 8:37 am

Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby Eroni » Fri Nov 17, 2023 5:49 pm

Enrico Maria Giordano wrote:
Eroni wrote:Dear
Any ideas on how I could resolve this error?
Code: Select all  Expand view

static uint16_t crc_ccitt_generic( const unsigned char *input_str, size_t num_bytes, uint16_t start_value ) {

    uint16_t crc;
    uint16_t tmp;
    uint16_t short_c;
    const unsigned char *ptr;
    size_t a;

    if ( ! crc_tabccitt_init ) init_crcccitt_tab();

    crc = start_value;
    ptr = input_str;

    if ( ptr != NULL ) for (a=0; a<num_bytes; a++) {

        short_c = 0x00ff & (unsigned short) *ptr;     // Conversion may lose significant digits in function crc_ccitt_generic
        tmp     = (crc >> 8) ^ short_c;               // Conversion may lose significant digits in function crc_ccitt_generic
        crc     = (crc << 8) ^ crc_tabccitt[tmp];     // Conversion may lose significant digits in function crc_ccitt_generic

        ptr++;
    }

    return crc;
 


Thanks in advance


Try this and let me know if it works for you:

Code: Select all  Expand view
short_c = ( uint16_t ) ( 0x00ff & (unsigned short) *ptr );
tmp     = ( uint16_t ) ( (crc >> 8) ^ short_c );
crc     = ( uint16_t ) ( (crc << 8) ^ crc_tabccitt[tmp] );



Mr Enrico, works!
Thank you so much!
FWH 1709 BCC72 MySql MariaDB
Visual Studio 2019 / Xamarin / C#
User avatar
Eroni
 
Posts: 90
Joined: Fri Jul 21, 2006 7:15 pm
Location: Criciuma/SC Brazil

Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby Enrico Maria Giordano » Fri Nov 17, 2023 6:34 pm

paquitohm wrote:



Mr. Enrico,

Thank you very much for your efforts.

Three items.
- Is stable release ?
- a few old 7/7/23 perhaps ?
- What it provides, it is faster, more compatible ?
Regards


Yes, it is stable. Date is 28 october 2023. I don't think it is faster than 7.60 but it is worth to use it as it is an updated version.
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby paquitohm » Fri Nov 17, 2023 9:06 pm

In other words.
Actually I am using bcc73.
Are there big differences than bcc76 ?

Thanks in advance
paquitohm
 
Posts: 108
Joined: Fri Jan 14, 2022 8:37 am


Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby karinha » Sat Nov 18, 2023 12:07 pm

Enrico Maria Giordano wrote:No, you can use it without problems. I recommend the new BCC 7.70:

http://xharbour.org/index.asp?page=download/windows/required_win


Gran noticias Maestro Enrico. ¡Lo probaré ahora!

Great news master Enrico. I'll test it now!

Gracias, thanks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7214
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby karinha » Sat Nov 18, 2023 1:16 pm

Funciona perfecto!

C:\BCC77
C:\XHBBCC77

https://imgur.com/4UcCRHC

Image

Gracias, thanks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7214
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby Enrico Maria Giordano » Sat Nov 18, 2023 1:20 pm

Great! Can you test curl, if you are familiar with it, please?
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby karinha » Sat Nov 18, 2023 1:37 pm

Enrico Maria Giordano wrote:Great! Can you test curl, if you are familiar with it, please?


Never used. Do you have a model and the names of the .LIBs that I should use?

Nunca usé. ¿Tiene un modelo y los nombres de los .LIB que debo usar?

Gracias, thanks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7214
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: De *.C Para *.Obj en BCC74 no funciona más.

Postby Enrico Maria Giordano » Sat Nov 18, 2023 1:41 pm

hbcurl.lib, but I don't know how to use it, sorry.
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

PreviousNext

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 73 guests