Fix some minor 64-bit uncleanlieness - thanks to James Anthill

darcs-hash:20060601194231-ac50b-a6b9b94379ba1d5bb6c61f7fad4652c8f748b25f.gz
This commit is contained in:
axel 2006-06-02 05:42:31 +10:00
parent ec58ffa641
commit 4ffd2afccd
5 changed files with 8 additions and 7 deletions

View file

@ -778,7 +778,7 @@ static int expand_variables( wchar_t *in, array_list_t *out, int last_idx )
stop_pos++; stop_pos++;
while( 1 ) while( 1 )
{ {
int tmp; long tmp;
while( iswspace(in[stop_pos]) || (in[stop_pos]==INTERNAL_SEPARATOR)) while( iswspace(in[stop_pos]) || (in[stop_pos]==INTERNAL_SEPARATOR))
stop_pos++; stop_pos++;
@ -814,7 +814,7 @@ static int expand_variables( wchar_t *in, array_list_t *out, int last_idx )
int j; int j;
for( j=0; j<al_get_count( var_idx_list ); j++) for( j=0; j<al_get_count( var_idx_list ); j++)
{ {
int tmp = (int)al_get( var_idx_list, j ); long tmp = (long)al_get( var_idx_list, j );
if( tmp < 1 || tmp > al_get_count( &var_item_list ) ) if( tmp < 1 || tmp > al_get_count( &var_item_list ) )
{ {
error( SYNTAX_ERROR, error( SYNTAX_ERROR,

View file

@ -719,7 +719,8 @@ static void mangle_descriptions( array_list_t *l )
*/ */
static void join_completions( array_list_t *l ) static void join_completions( array_list_t *l )
{ {
int i, in, out; long i;
int in, out;
hash_table_t desc_table; hash_table_t desc_table;
hash_init( &desc_table, &hash_wcs_func, &hash_wcs_cmp ); hash_init( &desc_table, &hash_wcs_func, &hash_wcs_cmp );

View file

@ -753,10 +753,10 @@ static void highlight_universal_internal( wchar_t * buff,
{ {
if( prev_q == *str ) if( prev_q == *str )
{ {
int pos1, pos2; long pos1, pos2;
level--; level--;
pos1 = (int)al_pop( &l ); pos1 = (long)al_pop( &l );
pos2 = str-buff; pos2 = str-buff;
if( pos1==pos || pos2==pos ) if( pos1==pos || pos2==pos )
{ {

View file

@ -482,7 +482,7 @@ static int history_test( const wchar_t *needle, const wchar_t *haystack )
/* /*
return wcsncmp( haystack, needle, wcslen(needle) )==0; return wcsncmp( haystack, needle, wcslen(needle) )==0;
*/ */
return (int)wcsstr( haystack, needle ); return !!wcsstr( haystack, needle );
} }
const wchar_t *history_prev_match( const wchar_t *str ) const wchar_t *history_prev_match( const wchar_t *str )

View file

@ -60,7 +60,7 @@ void validate_pointer( const void *ptr, const wchar_t *err, int null_ok )
Test if the pointer data crosses a segment boundary. Test if the pointer data crosses a segment boundary.
*/ */
if( (0x00000003 & (int)ptr) != 0 ) if( (0x00000003l & (long)ptr) != 0 )
{ {
debug( 0, _(L"The pointer '%ls' is invalid"), err ); debug( 0, _(L"The pointer '%ls' is invalid"), err );
sanity_lose(); sanity_lose();