Done: https://github.com/FiveTechSoft/harbour ... 230707.zipAntonio Linares wrote:Dear Enrico,
Could you please upload it to https://github.com/FiveTechSoft/harbour ... our_builds ?
many thanks
Please test it. I am not sure it works properly.
Done: https://github.com/FiveTechSoft/harbour ... 230707.zipAntonio Linares wrote:Dear Enrico,
Could you please upload it to https://github.com/FiveTechSoft/harbour ... our_builds ?
many thanks
Code: Select all | Expand
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;
Try this and let me know if it works for you:Eroni wrote:Dear
Any ideas on how I could resolve this error?Thanks in advanceCode: Select all | Expand
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;
Code: Select all | Expand
short_c = ( uint16_t ) ( 0x00ff & (unsigned short) *ptr );
tmp = ( uint16_t ) ( (crc >> 8) ^ short_c );
crc = ( uint16_t ) ( (crc << 8) ^ crc_tabccitt[tmp] );
Enrico Maria Giordano wrote:32-bit version: https://github.com/FiveTechSoft/harbour ... 230707.zip
Enrico Maria Giordano wrote:Try this and let me know if it works for you:Eroni wrote:Dear
Any ideas on how I could resolve this error?Thanks in advanceCode: Select all | Expand
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;
Code: Select all | Expand
short_c = ( uint16_t ) ( 0x00ff & (unsigned short) *ptr ); tmp = ( uint16_t ) ( (crc >> 8) ^ short_c ); crc = ( uint16_t ) ( (crc << 8) ^ crc_tabccitt[tmp] );
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.paquitohm wrote:Enrico Maria Giordano wrote:32-bit version: https://github.com/FiveTechSoft/harbour ... 230707.zip
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
Gran noticias Maestro Enrico. ¡Lo probaré ahora!Enrico Maria Giordano wrote:No, you can use it without problems. I recommend the new BCC 7.70:
http://xharbour.org/index.asp?page=down ... quired_win
Never used. Do you have a model and the names of the .LIBs that I should use?Enrico Maria Giordano wrote:Great! Can you test curl, if you are familiar with it, please?