2010-11-09 15:13 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbplist
+ Enabled hbzebra.
* contrib/hbzebra/hbzebra.hbp
+ Added optional cairo dependency.
+ Enabled cairo dependent components if cairo is detected.
- Deleted hard-coded reference to cairo lib.
+ Adjusted reference to hbcairo.hbc.
* contrib/hbzebra/itf.c
* contrib/hbzebra/codabar.c
* Silenced three warnings.
; TOFIX: Remains one:
../../../../../contrib/hbzebra/code128.c: In function 'hb_zebra_create_code128':
../../../../../contrib/hbzebra/code128.c:316:19: warning: suggest parentheses around '&&' within '||'
* contrib/hbzebra/core.c
! Replaced hbcairo.h header reference with hbstack.h
* contrib/hbzebra/cairo.c
* contrib/hbzebra/hbzebra.hbc
! Added EOL at EOF.
* Indenting.
This commit is contained in:
@@ -16,6 +16,31 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-11-09 15:13 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* contrib/hbplist
|
||||
+ Enabled hbzebra.
|
||||
|
||||
* contrib/hbzebra/hbzebra.hbp
|
||||
+ Added optional cairo dependency.
|
||||
+ Enabled cairo dependent components if cairo is detected.
|
||||
- Deleted hard-coded reference to cairo lib.
|
||||
+ Adjusted reference to hbcairo.hbc.
|
||||
|
||||
* contrib/hbzebra/itf.c
|
||||
* contrib/hbzebra/codabar.c
|
||||
* Silenced three warnings.
|
||||
; TOFIX: Remains one:
|
||||
../../../../../contrib/hbzebra/code128.c: In function 'hb_zebra_create_code128':
|
||||
../../../../../contrib/hbzebra/code128.c:316:19: warning: suggest parentheses around '&&' within '||'
|
||||
|
||||
* contrib/hbzebra/core.c
|
||||
! Replaced hbcairo.h header reference with hbstack.h
|
||||
|
||||
* contrib/hbzebra/cairo.c
|
||||
* contrib/hbzebra/hbzebra.hbc
|
||||
! Added EOL at EOF.
|
||||
* Indenting.
|
||||
|
||||
2010-11-09 14:56 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* src/common/hbver.c
|
||||
+ Added support for hb_iswin*() and HB_OSISWIN*() functions
|
||||
|
||||
@@ -41,6 +41,7 @@ hbtpathy/hbtpathy.hbp
|
||||
hbwin/hbwin.hbp
|
||||
hbxbp/hbxbp.hbp
|
||||
hbxpp/hbxpp.hbp
|
||||
hbzebra/hbzebra.hbp
|
||||
hbziparc/hbziparc.hbp
|
||||
rddads/rddads.hbp
|
||||
rddbmcdx/rddbmcdx.hbp
|
||||
|
||||
@@ -98,13 +98,13 @@ int hb_zebra_draw_cairo( PHB_ZEBRA pZebra, cairo_t * pCairo, double dX, double d
|
||||
|
||||
HB_FUNC( HB_ZEBRA_DRAW_CAIRO )
|
||||
{
|
||||
PHB_ZEBRA pZebra = hb_zebra_param( 1 );
|
||||
if( pZebra )
|
||||
{
|
||||
cairo_t * pCairo = hb_cairo_param( 2 );
|
||||
if( pCairo )
|
||||
{
|
||||
hb_retni( hb_zebra_draw_cairo( pZebra, pCairo, hb_parnd( 3 ), hb_parnd( 4 ), hb_parnd( 5 ), hb_parnd( 6 ), hb_parni( 7 ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
PHB_ZEBRA pZebra = hb_zebra_param( 1 );
|
||||
if( pZebra )
|
||||
{
|
||||
cairo_t * pCairo = hb_cairo_param( 2 );
|
||||
if( pCairo )
|
||||
{
|
||||
hb_retni( hb_zebra_draw_cairo( pZebra, pCairo, hb_parnd( 3 ), hb_parnd( 4 ), hb_parnd( 5 ), hb_parnd( 6 ), hb_parni( 7 ) ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ static char _codabar_charno( char ch )
|
||||
char * ptr = strchr( s_symbols, ch );
|
||||
if( ptr && *ptr )
|
||||
return ptr - s_symbols + 10;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -153,8 +153,8 @@ PHB_ZEBRA hb_zebra_create_codabar( const char * szCode, HB_SIZE nLen, int iFlags
|
||||
|
||||
pZebra->pBits = hb_bitbuffer_create();
|
||||
|
||||
if( iLen == 0 || _codabar_charno( szCode[ 0 ] ) < 16 )
|
||||
_codabar_add( pZebra->pBits, s_code[ _codabar_charno( 'A' ) ], iFlags, HB_FALSE ); /* Default start A */
|
||||
if( iLen == 0 || _codabar_charno( ( int ) szCode[ 0 ] ) < 16 )
|
||||
_codabar_add( pZebra->pBits, s_code[ ( int ) _codabar_charno( 'A' ) ], iFlags, HB_FALSE ); /* Default start A */
|
||||
|
||||
for( i = 0; i < iLen; i++ )
|
||||
{
|
||||
@@ -163,7 +163,7 @@ PHB_ZEBRA hb_zebra_create_codabar( const char * szCode, HB_SIZE nLen, int iFlags
|
||||
}
|
||||
|
||||
if( iLen == 0 || _codabar_charno( szCode[ i - 1 ] ) < 16 )
|
||||
_codabar_add( pZebra->pBits, s_code[ _codabar_charno( 'B' ) ], iFlags, HB_TRUE ); /* Default stop B */
|
||||
_codabar_add( pZebra->pBits, s_code[ ( int ) _codabar_charno( 'B' ) ], iFlags, HB_TRUE ); /* Default stop B */
|
||||
|
||||
return pZebra;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "hbzebra.h"
|
||||
#include "hbapiitm.h"
|
||||
#include "hbapierr.h"
|
||||
#include "hbcairo.h"
|
||||
#include "hbstack.h"
|
||||
|
||||
|
||||
/* ================ Bit buffer ================ */
|
||||
@@ -118,7 +118,7 @@ HB_SIZE hb_bitbuffer_len( PHB_BITBUFFER pBitBuffer )
|
||||
|
||||
HB_BOOL hb_bitbuffer_get( PHB_BITBUFFER pBitBuffer, HB_SIZE nPos )
|
||||
{
|
||||
return nPos > pBitBuffer->nLen ? HB_FALSE :
|
||||
return nPos > pBitBuffer->nLen ? HB_FALSE :
|
||||
( ( pBitBuffer->pBuffer[ nPos >> 3 ] >> ( nPos & 7 ) ) & 1 );
|
||||
}
|
||||
|
||||
|
||||
@@ -6,4 +6,4 @@ incpaths=.
|
||||
|
||||
libs=${hb_name}
|
||||
|
||||
..\hbcairo\hbcairo.hbc
|
||||
..\hbcairo\hbcairo.hbc
|
||||
|
||||
@@ -25,6 +25,16 @@ itf.c
|
||||
msi.c
|
||||
|
||||
# Drawing backends
|
||||
-Ic:\devel\cairo-1.8.10\include\cairo
|
||||
cairo.c
|
||||
hbcairo.hbc
|
||||
|
||||
-depoptional=cairo:yes
|
||||
-depkeyhead=cairo:cairo.h
|
||||
-depcontrol=cairo:no{HB_BUILD_3RDEXT='no'}
|
||||
-depcontrol=cairo:${HB_WITH_CAIRO}
|
||||
-depincpath=cairo:/usr/include/cairo
|
||||
-depincpath=cairo:/opt/local/include/cairo
|
||||
-depimplibs=cairo:../../bin/libcairo-2.dll
|
||||
-depimplibd=cairo:cairo
|
||||
-depfinish=cairo
|
||||
|
||||
cairo.c{HBMK_HAS_CAIRO}
|
||||
../hbcairo/hbcairo.hbc{HBMK_HAS_CAIRO}
|
||||
|
||||
@@ -60,8 +60,8 @@ static char s_code[] = { 0x0C, 0x11, 0x12, 0x03, 0x14, 0x05, 0x06, 0x18, 0x09, 0
|
||||
static char _itf_checksum( const char * szCode )
|
||||
{
|
||||
int i, sum = 0;
|
||||
|
||||
for ( i = 0; szCode[ i ]; i++ )
|
||||
|
||||
for ( i = 0; szCode[ i ]; i++ )
|
||||
sum += ( szCode[ i ] - '0' ) * ( i & 1 ? 1 : 3 );
|
||||
return '0' + ( 100000 - sum ) % 10;
|
||||
}
|
||||
@@ -100,6 +100,8 @@ PHB_ZEBRA hb_zebra_create_itf( const char * szCode, HB_SIZE nLen, int iFlags )
|
||||
szCode = pZebra->szCode;
|
||||
if( iFlags & HB_ZEBRA_FLAG_CHECKSUM )
|
||||
csum = _itf_checksum( pZebra->szCode );
|
||||
else
|
||||
csum = 0;
|
||||
|
||||
if( iFlags & HB_ZEBRA_FLAG_WIDE2_5 )
|
||||
{
|
||||
@@ -125,7 +127,7 @@ PHB_ZEBRA hb_zebra_create_itf( const char * szCode, HB_SIZE nLen, int iFlags )
|
||||
hb_bitbuffer_cat_int( pZebra->pBits, 3, iN );
|
||||
hb_bitbuffer_cat_int( pZebra->pBits, 0, iN );
|
||||
|
||||
for( i = 0; szCode[ i ]; i += 2 )
|
||||
for( i = 0; szCode[ i ]; i += 2 )
|
||||
{
|
||||
char c1 = s_code[ szCode[ i ] - '0' ], c2 = szCode[ i + 1 ] ? s_code[ szCode[ i + 1 ] - '0' ] : csum;
|
||||
hb_bitbuffer_cat_int( pZebra->pBits, 31, c1 & 1 ? iW : iN ); hb_bitbuffer_cat_int( pZebra->pBits, 0, c2 & 1 ? iW : iN ); c1 >>= 1; c2 >>= 1;
|
||||
|
||||
Reference in New Issue
Block a user