Subject: | |
From: | |
Reply To: | |
Date: | Fri, 3 Feb 1995 17:34:46 GMT |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
I'm having a problem with the C Compiler on MPE/iX 4.0 (the version of the
compiler is: 31506 A.04.01)
I have a function which takes a pointer to a function as an argument --
long cix_read_next (char *base, char *set,
void *buffer, int (*perform)(void *));
is the prototype.
The problem is when I try to make this call:
int jcx372_proc_entry (job_pfm_hist_dtl *jphd);
lresult = cix_read_next (base, dset, &jphd, jcx372_proc_entry);
the compiler tells me that the pointers are not assignment compatible for
argument 4 - the pointer to the function. If I remove the "void *" from the
prototype of the "perform" function in the prototype of cix_read_next, the
compile works, and the module executes correctly. I would, however, like
the type checking that the original prototype provided - namely that the
function takes one argument, and this argument is a pointer to some data type.
BTW - job_pfm_hist_dtl is a typedef'd struct (It, of course, represents
the layout of an IMAGE detail dataset.)
BTW2 - I modified a routine we're already using which contains a call to
qsort. I ran into the smae problem there when I declared the compare function
to use pointers to typedef'd structs.
I don't understand what I'm doing wrong, particularly when the
"void *buffer" argument in cix_read_next takes a pointer to the same
structure that "(*perform) (void *)" is rejecting!!
Can anybody out there help me?
Brian J. White
[log in to unmask]
|
|
|