2012-10-16 18:25 UTC+0200 Viktor Szakats (harbour syenar.net)

* contrib/hbzebra/codabar.c
  * contrib/hbzebra/code39.c
  * contrib/hbzebra/code93.c
    * cleanup for 64-bit compatibility
This commit is contained in:
Viktor Szakats
2012-10-16 16:26:27 +00:00
parent 9485ec31aa
commit 90fe21fd75
4 changed files with 19 additions and 13 deletions

View File

@@ -16,6 +16,12 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-10-16 18:25 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbzebra/codabar.c
* contrib/hbzebra/code39.c
* contrib/hbzebra/code93.c
* cleanup for 64-bit compatibility
2012-10-16 18:13 UTC+0200 Viktor Szakats (harbour syenar.net)
* contrib/hbnf/hbnf.hbx
* contrib/hbnf/mouse.c

View File

@@ -75,9 +75,9 @@ static const char s_code[] = {
0x2C, /* A */
0x4A, /* B */
0x68, /* C */
0x38}; /* D */
0x38 }; /* D */
static HB_PTRDIFF _codabar_charno( char ch )
static int _codabar_charno( char ch )
{
static const char * s_symbols = "-$:/.+ABCD";
@@ -87,7 +87,7 @@ static HB_PTRDIFF _codabar_charno( char ch )
{
const char * ptr = strchr( s_symbols, ch );
if( ptr && *ptr )
return ptr - s_symbols + 10;
return ( int ) ( ptr - s_symbols + 10 );
}
return -1;
}
@@ -132,7 +132,7 @@ PHB_ZEBRA hb_zebra_create_codabar( const char * szCode, HB_SIZE nLen, int iFlags
{
PHB_ZEBRA pZebra;
int i, iLen = ( int ) nLen;
HB_PTRDIFF j;
int j;
pZebra = hb_zebra_create();
pZebra->iType = HB_ZEBRA_TYPE_CODABAR;
@@ -159,7 +159,7 @@ PHB_ZEBRA hb_zebra_create_codabar( const char * szCode, HB_SIZE nLen, int iFlags
for( i = 0; i < iLen; i++ )
{
HB_PTRDIFF no = _codabar_charno( szCode[ i ] );
HB_ISIZ no = _codabar_charno( szCode[ i ] );
_codabar_add( pZebra->pBits, s_code[ no ], iFlags, i > 0 && no >= 16 );
}

View File

@@ -103,7 +103,7 @@ static const HB_UCHAR s_code[] =
0xA2, /* + */
0xA8 }; /* % */
static HB_PTRDIFF _code39_charno( char ch )
static int _code39_charno( char ch )
{
static const char * s_symbols = "-. $/+%";
@@ -115,7 +115,7 @@ static HB_PTRDIFF _code39_charno( char ch )
{
const char * ptr = strchr( s_symbols, ch );
if( ptr && *ptr )
return ptr - s_symbols + 36;
return ( int ) ( ptr - s_symbols + 36 );
}
return -1;
}
@@ -166,7 +166,7 @@ PHB_ZEBRA hb_zebra_create_code39( const char * szCode, HB_SIZE nLen, int iFlags
{
PHB_ZEBRA pZebra;
int i, iLen = ( int ) nLen;
HB_PTRDIFF csum;
int csum;
pZebra = hb_zebra_create();
pZebra->iType = HB_ZEBRA_TYPE_CODE39;
@@ -192,7 +192,7 @@ PHB_ZEBRA hb_zebra_create_code39( const char * szCode, HB_SIZE nLen, int iFlags
csum = 0;
for( i = 0; i < iLen; i++ )
{
HB_PTRDIFF no = _code39_charno( szCode[ i ] );
int no = _code39_charno( szCode[ i ] );
_code39_add( pZebra->pBits, ( char ) s_code[ no ], iFlags, HB_FALSE );
csum += no;
}

View File

@@ -105,7 +105,7 @@ static const char s_code[] = {
0x4C, /* (+) 46 */
0x7A}; /* Start/Stop 47 */
static HB_PTRDIFF _code93_charno( char ch )
static int _code93_charno( char ch )
{
static const char * s_symbols = "-. $/+%";
@@ -117,7 +117,7 @@ static HB_PTRDIFF _code93_charno( char ch )
{
const char * ptr = strchr( s_symbols, ch );
if( ptr && *ptr )
return ptr - s_symbols + 36;
return ( int ) ( ptr - s_symbols + 36 );
}
return -1;
}
@@ -126,7 +126,7 @@ PHB_ZEBRA hb_zebra_create_code93( const char * szCode, HB_SIZE nLen, int iFlags
{
PHB_ZEBRA pZebra;
int k, i, j, iLen = ( int ) nLen;
HB_PTRDIFF csum, ksum;
int csum, ksum;
HB_SYMBOL_UNUSED( iFlags );
@@ -169,7 +169,7 @@ PHB_ZEBRA hb_zebra_create_code93( const char * szCode, HB_SIZE nLen, int iFlags
k++;
for( i = 0; i < iLen; i++ )
{
HB_PTRDIFF no = _code93_charno( szCode[ i ] );
int no = _code93_charno( szCode[ i ] );
if( no >= 0 )
{
hb_bitbuffer_cat_int( pZebra->pBits, 1, 1 );