A few more signed/unsigned comparisons. More to come.

This commit is contained in:
William McBrine
2005-12-06 01:56:18 +00:00
parent b0e742f3b9
commit 5014ba4836
2 changed files with 6 additions and 6 deletions

View File

@@ -65,7 +65,7 @@
#endif
#ifdef PDCDEBUG
char *rcsid_util = "$Id: util.c,v 1.6 2004/08/07 07:18:46 rexx Exp $";
char *rcsid_util = "$Id: util.c,v 1.7 2005/12/06 01:56:18 wmcbrine Exp $";
#endif
/*man-start*********************************************************************
@@ -243,7 +243,7 @@ int key;
#endif
key -= KEY_MIN;
if (key >= 0
&& key <= sizeof(key_name) / sizeof(key_name[0]))
&& key <= (int)(sizeof(key_name) / sizeof(key_name[0])) )
return( key_name[key] );
else
return("NO KEY NAME");
@@ -261,7 +261,7 @@ int key;
#endif
key -= KEY_MIN;
return key >= 0
&& key <= sizeof(key_name) / sizeof(key_name[0]);
&& key <= (int)(sizeof(key_name) / sizeof(key_name[0]));
}
/***********************************************************************/
#ifdef HAVE_PROTO

View File

@@ -2133,7 +2133,7 @@ int *format;
#endif
/***********************************************************************/
{
int i=0,key=0;
unsigned long i=0,key=0;
char *string=(char *)value;
#ifdef PDCDEBUG
@@ -2145,10 +2145,10 @@ int *format;
for (i=0;i<(*length);i++)
{
key = (int)(*(string+i));
key = (unsigned long)(*(string+i));
if (key == 10) /* new line - convert to ^M */
key = 13;
XCursesSendKeyToCurses( (unsigned long)key, NULL );
XCursesSendKeyToCurses( key, NULL );
}
return;
}