PE> Well, you got me to look up my standard, but unless your section
PE> 7.7.1.1 is different from mine, the return value from your handler is
PE> irrelevant. Actually, not so much irrelevant as ILLEGAL.
FA> From memory he was asking about ctrlbrk(), which is a borland function,
Fair enough.
PE> The signal handler is meant to be of return type "void".
FA> I did look at ANSI, i presume you meant 4.7.1.1.
To convert ISO to ANSI, subtract 3 from the high-level number, and you will
almost always be right.
FA> I'm back to my normal confused state now, the function definition does
FA> indicate a void func..
FA> void (*signal(int sig, void (*func)(int)))(int);
FA> That sounds a bit contradictory, how can a void func(whatever) execute
FA> a return statement ?
By going "return;"! Didn't you know you could put a return
statement in a void function? Especially used if you want to return from
multiple places within the function. Personally I put it in all the time,
to avoid getting warnings from IBM's C/370 compiler, which thinks that it's
a good idea to always put them in.
BFN. Paul.
@EOT:
---
* Origin: X (3:711/934.9)
|