diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a26c6fc38b..530ad42b56 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,17 @@ The license applies to all entries newer than 2009-04-28. */ +2010-11-10 19:12 UTC+0300 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) + * harbour/contrib/hbzebra/codabar.c + * harbour/contrib/hbzebra/code11.c + * harbour/contrib/hbzebra/code128.c + * harbour/contrib/hbzebra/code39.c + * harbour/contrib/hbzebra/code93.c + * harbour/contrib/hbzebra/eanupc.c + * harbour/contrib/hbzebra/itf.c + * harbour/contrib/hbzebra/msi.c + * pacified warning + 2010-11-10 15:40 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * contrib/hbzebra/d_gen.c + Implemented C level callback interface. diff --git a/harbour/contrib/hbzebra/codabar.c b/harbour/contrib/hbzebra/codabar.c index 080ae748c7..8c23947115 100644 --- a/harbour/contrib/hbzebra/codabar.c +++ b/harbour/contrib/hbzebra/codabar.c @@ -77,7 +77,7 @@ static char s_code[] = { 0x68, /* C */ 0x38}; /* D */ -static char _codabar_charno( char ch ) +static int _codabar_charno( char ch ) { static char * s_symbols = "-$:/.+ABCD"; @@ -146,7 +146,7 @@ PHB_ZEBRA hb_zebra_create_codabar( const char * szCode, HB_SIZE nLen, int iFlags } } - pZebra->szCode = hb_xgrab( iLen + 1 ); + pZebra->szCode = ( char * ) hb_xgrab( iLen + 1 ); hb_xmemcpy( pZebra->szCode, szCode, iLen ); pZebra->szCode[ iLen ] = '\0'; szCode = pZebra->szCode; diff --git a/harbour/contrib/hbzebra/code11.c b/harbour/contrib/hbzebra/code11.c index 85a10bdb0d..8722725c97 100644 --- a/harbour/contrib/hbzebra/code11.c +++ b/harbour/contrib/hbzebra/code11.c @@ -130,7 +130,7 @@ PHB_ZEBRA hb_zebra_create_code11( const char * szCode, HB_SIZE nLen, int iFlags } } - pZebra->szCode = hb_xgrab( iLen + 1 ); + pZebra->szCode = ( char * ) hb_xgrab( iLen + 1 ); hb_xmemcpy( pZebra->szCode, szCode, iLen ); pZebra->szCode[ iLen ] = '\0'; szCode = pZebra->szCode; diff --git a/harbour/contrib/hbzebra/code128.c b/harbour/contrib/hbzebra/code128.c index 68aa186354..34e0f9e726 100644 --- a/harbour/contrib/hbzebra/code128.c +++ b/harbour/contrib/hbzebra/code128.c @@ -223,7 +223,7 @@ PHB_ZEBRA hb_zebra_create_code128( const char * szCode, HB_SIZE nLen, int iFlags } /* make print string */ - pZebra->szCode = hb_xgrab( j + 1 ); + pZebra->szCode = ( char * ) hb_xgrab( j + 1 ); j = 0; for( i = 0; i < iLen; i++ ) { diff --git a/harbour/contrib/hbzebra/code39.c b/harbour/contrib/hbzebra/code39.c index b1b794db56..ff43d8593a 100644 --- a/harbour/contrib/hbzebra/code39.c +++ b/harbour/contrib/hbzebra/code39.c @@ -58,49 +58,49 @@ /* Usually one character bitmap does not fit into 1 byte, but if we use enough good encoding, we can manage to fit :) [Mindaugas] */ static char s_code[] = { - 0x58, /* 0 */ - 0x09, /* 1 */ - 0x0C, /* 2 */ - 0x0D, /* 3 */ - 0x18, /* 4 */ - 0x19, /* 5 */ - 0x1C, /* 6 */ - 0x48, /* 7 */ - 0x49, /* 8 */ - 0x4C, /* 9 */ - 0x21, /* A */ - 0x24, /* B */ - 0x25, /* C */ - 0x30, /* D */ - 0x31, /* E */ - 0x34, /* F */ - 0x60, /* G */ - 0x61, /* H */ - 0x64, /* I */ - 0x70, /* J */ - 0x81, /* K */ - 0x84, /* L */ - 0x85, /* M */ - 0x90, /* N */ - 0x91, /* O */ - 0x94, /* P */ - 0xC0, /* Q */ - 0xC1, /* R */ - 0xC4, /* S */ - 0xD0, /* T */ - 0x03, /* U */ - 0x06, /* V */ - 0x07, /* W */ - 0x12, /* X */ - 0x13, /* Y */ - 0x16, /* Z */ - 0x42, /* - */ - 0x43, /* . */ - 0x46, /* */ - 0x2A, /* $ */ - 0x8A, /* / */ - 0xA2, /* + */ - 0xA8}; /* % */ + 0x58, /* 0 */ + 0x09, /* 1 */ + 0x0C, /* 2 */ + 0x0D, /* 3 */ + 0x18, /* 4 */ + 0x19, /* 5 */ + 0x1C, /* 6 */ + 0x48, /* 7 */ + 0x49, /* 8 */ + 0x4C, /* 9 */ + 0x21, /* A */ + 0x24, /* B */ + 0x25, /* C */ + 0x30, /* D */ + 0x31, /* E */ + 0x34, /* F */ + 0x60, /* G */ + 0x61, /* H */ + 0x64, /* I */ + 0x70, /* J */ + ( char ) 0x81, /* K */ + ( char ) 0x84, /* L */ + ( char ) 0x85, /* M */ + ( char ) 0x90, /* N */ + ( char ) 0x91, /* O */ + ( char ) 0x94, /* P */ + ( char ) 0xC0, /* Q */ + ( char ) 0xC1, /* R */ + ( char ) 0xC4, /* S */ + ( char ) 0xD0, /* T */ + 0x03, /* U */ + 0x06, /* V */ + 0x07, /* W */ + 0x12, /* X */ + 0x13, /* Y */ + 0x16, /* Z */ + 0x42, /* - */ + 0x43, /* . */ + 0x46, /* */ + 0x2A, /* $ */ + ( char ) 0x8A, /* / */ + ( char ) 0xA2, /* + */ + ( char ) 0xA8}; /* % */ static int _code39_charno( char ch ) { diff --git a/harbour/contrib/hbzebra/code93.c b/harbour/contrib/hbzebra/code93.c index 6e2d6674bd..0fa4976f12 100644 --- a/harbour/contrib/hbzebra/code93.c +++ b/harbour/contrib/hbzebra/code93.c @@ -147,7 +147,7 @@ PHB_ZEBRA hb_zebra_create_code93( const char * szCode, HB_SIZE nLen, int iFlags k += _code93_charno( szCode[ i ] ) >= 0 ? 1 : 2; } - pZebra->szCode = hb_xgrab( j + 1 ); + pZebra->szCode = ( char * ) hb_xgrab( j + 1 ); j = 0; for( i = 0; i < iLen; i++ ) { diff --git a/harbour/contrib/hbzebra/eanupc.c b/harbour/contrib/hbzebra/eanupc.c index f26e1d41ca..c6fcd4a390 100644 --- a/harbour/contrib/hbzebra/eanupc.c +++ b/harbour/contrib/hbzebra/eanupc.c @@ -156,7 +156,7 @@ PHB_ZEBRA hb_zebra_create_ean13( const char * szCode, HB_SIZE nLen, int iFlags ) if( iLen == 12 ) { - pZebra->szCode = hb_xgrab( 14 ); + pZebra->szCode = ( char * ) hb_xgrab( 14 ); hb_xmemcpy( pZebra->szCode, szCode, 12 ); pZebra->szCode[ 12 ] = _ean13_checksum( szCode ); pZebra->szCode[ 13 ] = '\0'; @@ -168,7 +168,7 @@ PHB_ZEBRA hb_zebra_create_ean13( const char * szCode, HB_SIZE nLen, int iFlags ) pZebra->iError = HB_ZEBRA_ERROR_BADCHECKSUM; return pZebra; } - pZebra->szCode = hb_xgrab( 14 ); + pZebra->szCode = ( char * ) hb_xgrab( 14 ); hb_xmemcpy( pZebra->szCode, szCode, 13 ); pZebra->szCode[ 13 ] = '\0'; } @@ -224,7 +224,7 @@ PHB_ZEBRA hb_zebra_create_ean8( const char * szCode, HB_SIZE nLen, int iFlags ) if( iLen == 7 ) { - pZebra->szCode = hb_xgrab( 9 ); + pZebra->szCode = ( char * ) hb_xgrab( 9 ); hb_xmemcpy( pZebra->szCode, szCode, 7 ); pZebra->szCode[ 7 ] = _ean8_checksum( szCode ); pZebra->szCode[ 8 ] = '\0'; @@ -236,7 +236,7 @@ PHB_ZEBRA hb_zebra_create_ean8( const char * szCode, HB_SIZE nLen, int iFlags ) pZebra->iError = HB_ZEBRA_ERROR_BADCHECKSUM; return pZebra; } - pZebra->szCode = hb_xgrab( 9 ); + pZebra->szCode = ( char * ) hb_xgrab( 9 ); hb_xmemcpy( pZebra->szCode, szCode, 8 ); pZebra->szCode[ 8 ] = '\0'; } @@ -286,7 +286,7 @@ PHB_ZEBRA hb_zebra_create_upca( const char * szCode, HB_SIZE nLen, int iFlags ) if( iLen == 11 ) { - pZebra->szCode = hb_xgrab( 13 ); + pZebra->szCode = ( char * ) hb_xgrab( 13 ); hb_xmemcpy( pZebra->szCode, szCode, 11 ); pZebra->szCode[ 11 ] = _upca_checksum( szCode ); pZebra->szCode[ 12 ] = '\0'; @@ -298,7 +298,7 @@ PHB_ZEBRA hb_zebra_create_upca( const char * szCode, HB_SIZE nLen, int iFlags ) pZebra->iError = HB_ZEBRA_ERROR_BADCHECKSUM; return pZebra; } - pZebra->szCode = hb_xgrab( 13 ); + pZebra->szCode = ( char * ) hb_xgrab( 13 ); hb_xmemcpy( pZebra->szCode, szCode, 12 ); pZebra->szCode[ 12 ] = '\0'; } @@ -348,7 +348,7 @@ PHB_ZEBRA hb_zebra_create_upce( const char * szCode, HB_SIZE nLen, int iFlags ) if( iLen == 6 ) { - pZebra->szCode = hb_xgrab( 8 ); + pZebra->szCode = ( char * ) hb_xgrab( 8 ); hb_xmemcpy( pZebra->szCode, szCode, 6 ); pZebra->szCode[ 6 ] = _upce_checksum( szCode ); pZebra->szCode[ 7 ] = '\0'; @@ -360,7 +360,7 @@ PHB_ZEBRA hb_zebra_create_upce( const char * szCode, HB_SIZE nLen, int iFlags ) pZebra->iError = HB_ZEBRA_ERROR_BADCHECKSUM; return pZebra; } - pZebra->szCode = hb_xgrab( 8 ); + pZebra->szCode = ( char * ) hb_xgrab( 8 ); hb_xmemcpy( pZebra->szCode, szCode, 7 ); pZebra->szCode[ 7 ] = '\0'; } diff --git a/harbour/contrib/hbzebra/itf.c b/harbour/contrib/hbzebra/itf.c index 24a4fded0c..9b6f24d93c 100644 --- a/harbour/contrib/hbzebra/itf.c +++ b/harbour/contrib/hbzebra/itf.c @@ -92,7 +92,7 @@ PHB_ZEBRA hb_zebra_create_itf( const char * szCode, HB_SIZE nLen, int iFlags ) } else { - pZebra->szCode = hb_xgrab( iLen + 1 ); + pZebra->szCode = ( char * ) hb_xgrab( iLen + 1 ); hb_xmemcpy( pZebra->szCode, szCode, iLen ); pZebra->szCode[ iLen ] = '\0'; } diff --git a/harbour/contrib/hbzebra/msi.c b/harbour/contrib/hbzebra/msi.c index 91f82348a1..d055823997 100644 --- a/harbour/contrib/hbzebra/msi.c +++ b/harbour/contrib/hbzebra/msi.c @@ -69,7 +69,7 @@ static char _msi_checksum( const char * szCode ) j = 1 - j; } sum %= 10; - return '0' + (sum ? 10 - sum : 0); + return ( char ) ( '0' + ( sum ? 10 - sum : 0 ) ); } PHB_ZEBRA hb_zebra_create_msi( const char * szCode, HB_SIZE nLen, int iFlags ) @@ -89,7 +89,7 @@ PHB_ZEBRA hb_zebra_create_msi( const char * szCode, HB_SIZE nLen, int iFlags ) } } - pZebra->szCode = hb_xgrab( iLen + 1 ); + pZebra->szCode = ( char * ) hb_xgrab( iLen + 1 ); hb_xmemcpy( pZebra->szCode, szCode, iLen ); pZebra->szCode[ iLen ] = '\0'; szCode = pZebra->szCode;