From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,f9642664cfbe6417 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!z27g2000prz.googlegroups.com!not-for-mail From: Emile8 Newsgroups: comp.lang.ada Subject: Re: ACCESS TO SYSTEM VARIABLES Date: Tue, 8 Mar 2011 09:13:00 -0800 (PST) Organization: http://groups.google.com Message-ID: <3b341a26-9317-4dbe-bf5b-c0312a3d914e@z27g2000prz.googlegroups.com> References: <31c9ef20-db49-4d3e-bafb-0d2a5dca7866@e9g2000vbk.googlegroups.com> <4d74c5c3$0$6878$9b4e6d93@newsspool2.arcor-online.net> <6ea98f8c-33eb-4f20-a696-eb59a519b80d@n18g2000vbq.googlegroups.com> NNTP-Posting-Host: 92.143.82.80 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1299604381 11885 127.0.0.1 (8 Mar 2011 17:13:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 8 Mar 2011 17:13:01 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z27g2000prz.googlegroups.com; posting-host=92.143.82.80; posting-account=u9P-fgoAAAB1qVhsrmxVpcdi-eIb_an8 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.2.14) Gecko/20110221 Ubuntu/10.10 (maverick) Firefox/3.6.14,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:17966 Date: 2011-03-08T09:13:00-08:00 List-Id: On 7 mar, 22:32, "Peter C. Chapin" wrote: > On Mon, 7 Mar 2011, Emile8 wrote: > > It is not a very elegant solution and I should look also at how the > > Ada version of ncurses manages to get the same informations. > > When the terminal is resized the programs running in it receive a Unix > signal (SIGWINCH?). By default that signal is ignored. However, one can > install a signal handler for it and then presumably call into the system > (some terminal API) to ask for the new sizes. > > I could probably figure out how to do this in C, but I'm not familiar with > how Ada on Unix deals with Unix signals. > > Peter You are right, the approach by a user handler attached to the relevant UNIX signal is certainly the good approach to cope with terminal modifications. I am looking at some documentation to understand how to proceed with these handles in Ada (Rosetta Code ans Big Online Book of Linux Ada to begin). Thank you.