mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Fix some minor 64-bit uncleanlieness - thanks to James Anthill
darcs-hash:20060601194231-ac50b-a6b9b94379ba1d5bb6c61f7fad4652c8f748b25f.gz
This commit is contained in:
parent
ec58ffa641
commit
4ffd2afccd
5 changed files with 8 additions and 7 deletions
4
expand.c
4
expand.c
|
@ -778,7 +778,7 @@ static int expand_variables( wchar_t *in, array_list_t *out, int last_idx )
|
|||
stop_pos++;
|
||||
while( 1 )
|
||||
{
|
||||
int tmp;
|
||||
long tmp;
|
||||
|
||||
while( iswspace(in[stop_pos]) || (in[stop_pos]==INTERNAL_SEPARATOR))
|
||||
stop_pos++;
|
||||
|
@ -814,7 +814,7 @@ static int expand_variables( wchar_t *in, array_list_t *out, int last_idx )
|
|||
int 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 ) )
|
||||
{
|
||||
error( SYNTAX_ERROR,
|
||||
|
|
|
@ -719,7 +719,8 @@ static void mangle_descriptions( 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_init( &desc_table, &hash_wcs_func, &hash_wcs_cmp );
|
||||
|
|
|
@ -753,10 +753,10 @@ static void highlight_universal_internal( wchar_t * buff,
|
|||
{
|
||||
if( prev_q == *str )
|
||||
{
|
||||
int pos1, pos2;
|
||||
long pos1, pos2;
|
||||
|
||||
level--;
|
||||
pos1 = (int)al_pop( &l );
|
||||
pos1 = (long)al_pop( &l );
|
||||
pos2 = str-buff;
|
||||
if( pos1==pos || pos2==pos )
|
||||
{
|
||||
|
|
|
@ -482,7 +482,7 @@ static int history_test( const wchar_t *needle, const wchar_t *haystack )
|
|||
/*
|
||||
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 )
|
||||
|
|
2
sanity.c
2
sanity.c
|
@ -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.
|
||||
*/
|
||||
|
||||
if( (0x00000003 & (int)ptr) != 0 )
|
||||
if( (0x00000003l & (long)ptr) != 0 )
|
||||
{
|
||||
debug( 0, _(L"The pointer '%ls' is invalid"), err );
|
||||
sanity_lose();
|
||||
|
|
Loading…
Reference in a new issue