Hi John,
BTDT and forgot about it, because I now always use
sigaction and related functions to handle signals.
(Provides much more control over signal handling)
But to get rid of the warning you can use the
following code :
# include <stdio.h>
# include <signal.h>
void dotrap(int x)
{
}
int main()
{
void (*f)(int) = dotrap;
signal(SIGINT, f);
return 0;
}
Best regards
Johan
----- Original Message -----
From: "john pitman" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Tuesday, 16 November, 2004 22:24
Subject: Re: [HP3000-L] C code for ctrl-Y handling
> Thanks to Lars and Johan, I now have ctl-y working on mpe, and ctl-c
> trapping on UX. Only nuisance now is that gcc reports a warning on arg 2
> of
> signal call as
> "makes pointer from integer without cast"
> in
> (void) signal(SIGINT,(int)dotrap);
> where dotrap() is my handling routine.
> I have tried a couple of different codings for the arg, but cant get rid
> of
> the warning...anybody BTDT please?
> It works with the warnings, but I would rather it was clean.
>
> Thanks,
> jp
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|