Far-reaching changes to make BitchX compatible with 64 bit architectures

like x86-64, where sizeof(int) != sizeof (void *).  This involves correctly
casting every function pointer from the global table to the correct
function type, which has the added benefit of allowing type-checking of
function arguments and return values.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@26 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2008-04-30 13:57:56 +00:00
parent 7eac4a00ce
commit 3de93b1dbc
34 changed files with 660 additions and 710 deletions

View File

@@ -18,25 +18,25 @@ CVS_REVISION(words_c)
/*
* search() looks for a character forward or backward from mark
*/
extern char *BX_search(register char *start, char **mark, char *chars, int how)
extern char *BX_strsearch(register char *start, char *mark, char *chars, int how)
{
if (!mark || !*mark)
*mark = start;
if (!mark)
mark = start;
if (how > 0) /* forward search */
{
*mark = sindex(*mark, chars);
mark = sindex(mark, chars);
how--;
for (;(how > 0) && *mark && **mark;how--)
*mark = sindex(*mark+1, chars);
for (; how > 0 && mark && *mark; how--)
mark = sindex(mark + 1, chars);
}
else if (how == 0)
return (char *) 0;
return NULL;
else /* how < 0 */
{
*mark = rsindex(*mark, start, chars, -how);
mark = rsindex(mark, start, chars, -how);
#if 0
how++;
for (;(how < 0) && *mark && **mark;how++)
@@ -44,7 +44,7 @@ extern char *BX_search(register char *start, char **mark, char *chars, int how)
#endif
}
return *mark;
return mark;
}
/* Move to an absolute word number from start */