From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6941 invoked by alias); 30 Dec 2013 07:16:52 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 6930 invoked by uid 89); 30 Dec 2013 07:16:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ea0-f180.google.com Received: from mail-ea0-f180.google.com (HELO mail-ea0-f180.google.com) (209.85.215.180) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 30 Dec 2013 07:16:49 +0000 Received: by mail-ea0-f180.google.com with SMTP id f15so4940888eak.11 for ; Sun, 29 Dec 2013 23:16:46 -0800 (PST) X-Received: by 10.14.246.202 with SMTP id q50mr160773eer.58.1388387806500; Sun, 29 Dec 2013 23:16:46 -0800 (PST) Received: from [10.0.0.1] (242.91.broadband5.iol.cz. [88.100.91.242]) by mx.google.com with ESMTPSA id l4sm105992927een.13.2013.12.29.23.16.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Dec 2013 23:16:45 -0800 (PST) Message-ID: <52C11DDC.3070708@gmail.com> Date: Mon, 30 Dec 2013 07:16:00 -0000 From: =?windows-1252?Q?V=E1clav_Zeman?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: Looking for an ANSI Control Character header References: <79046CCA-0EA7-4A8D-8B00-70F18887443D@googlemail.com> <52C0BE45.6030907@aol.com> <8487D432-2245-4CE1-BBBB-B372EF5C7802@googlemail.com> <9A32A050-8342-45D2-B00F-41D4BEDE6EF8@googlemail.com> In-Reply-To: <9A32A050-8342-45D2-B00F-41D4BEDE6EF8@googlemail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8kGTwJxoNqfhRSSlmt5dHI5GgpeGcdT54" X-IsSubscribed: yes X-SW-Source: 2013-12/txt/msg00146.txt.bz2 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8kGTwJxoNqfhRSSlmt5dHI5GgpeGcdT54 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Content-length: 2010 On 12/30/2013 03:11 AM, Kevin Ingwersen wrote: > Termcap looks interesting, but I can not find anything about the control = characters I would like to use. > I am trying to find a library that=92d give me the right escape sequence = - or a function - to do certain things. Such as > - Deleting everything from the left/right of the curser > - Erasing a whole line, setting the cursor to the beginning of the line > - Starting / ending a color sequence > i know that ncurses can do the color part, but I couldn=92t find any way = to make it print soemthing like "\x1b[1K=93 for me. I know, that on some te= rminals, the \x expects an octal value rather than a hexadecimal value. (i.= e. \x033 vs. \x1b). So the library I am looking for just needs to give me t= he right sequence to use o.o > Do you know any? As far as I know, there is nothing else but curses/ncurses that can do that. One possible approach is to parse terminfo's terminal specifications yourself. You have the choice of parsing the compiled binary files or the source files. However, if you succeed with the parsing, it is IMO non-trivial to actually utilize the information that you get; you will need interpreter of the terminal handling "instructions" as well. IOW, I have tried once the same as you are trying now but I have given up, when I was confronted with the size of the task. That said, by all means, try for yourself, maybe you are a lot more tenacious than I was. >=20 > Am Mo. Dez. 30 2013 01:28:53 schrieb Tim Prince: >> >> On 12/29/2013 04:58 PM, Kevin Ingwersen wrote: >>> due to different terminals, and the fact that Win32 doesnt perfectly s= upport ANSI control characters, I wanted to ask if there is somewhere a way= one can archive this. >>> >> Do you mean termcap? >> http://www.gnu.org/software/termutils/manual/termcap-1.3/html_mono/termc= ap.html >> >> "win32" is far too vague a heading. How about using one of the current = widely used Windows ports of termcap or ncurses (cygwin, MinGW, ....) --=20 VZ --8kGTwJxoNqfhRSSlmt5dHI5GgpeGcdT54 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" Content-length: 295 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iF4EAREIAAYFAlLBHdwACgkQE3+v/RpUDYBjCAD9FxleKLkceoryo92dYmTcZWJD wrpbkOFIltRAbJSWCz0A/iQwNcnzOW6nDP8U6PbjIpiaXwSVF/QayGSPydutGMmj =q0br -----END PGP SIGNATURE----- --8kGTwJxoNqfhRSSlmt5dHI5GgpeGcdT54--