tt/mini_isam: add new isam_prototypes.h include file and fix up problems
There were a variety of potential 64b problems due to the complete lack of prototype declarations. So, we add a file, isam_prototypes.h, generated mostly by the 'cproto' tool. We also fixed up some errors that having proper prototypes pointed out, mainly in passing ints where pointers were expected and vice versa. The iserase() function was supposed to accept a char *, but was defined as only accepting a char. Fun stuff like that.
This commit is contained in:
@@ -49,7 +49,7 @@ extern char *_isunix_malloc();
|
||||
*/
|
||||
|
||||
Issort *
|
||||
_issort_create(int reclen, int nrecs, int (*compfunc)())
|
||||
_issort_create(int reclen, int nrecs, int (*compfunc)(char *, char *))
|
||||
{
|
||||
Issort *p;
|
||||
|
||||
@@ -60,7 +60,7 @@ _issort_create(int reclen, int nrecs, int (*compfunc)())
|
||||
p->ist_allocrecs = nrecs; /* Maximum number of records */
|
||||
/* that can inserted */
|
||||
p->ist_nrecs = 0; /* Current number of records */
|
||||
p->ist_currec; /* Current position */
|
||||
p->ist_currec = 0; /* Current position */
|
||||
p->ist_compf = compfunc; /* Comparison function */
|
||||
|
||||
p->ist_array = _ismalloc((unsigned)(reclen * nrecs)); /* Allocate array */
|
||||
|
||||
Reference in New Issue
Block a user