HP3000-L Archives

November 2004, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Johan Harmsen <[log in to unmask]>
Reply To:
Johan Harmsen <[log in to unmask]>
Date:
Wed, 17 Nov 2004 09:29:00 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (54 lines)
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 *

ATOM RSS1 RSS2