From mboxrd@z Thu Jan 1 00:00:00 1970 From: tlaronde@polynum.com Date: Thu, 15 Apr 2010 20:26:18 +0200 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20100415182618.GA9844@polynum.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Subject: [9fans] APE: a further note. Topicbox-Message-UUID: 027e7c10-ead6-11e9-9d60-3106f5b1d025 Still fixing things for correct compilation of TeX and al. under Plan9, I stumbled upon this one. Traditional lex(1) uses: char yytext[]; The code (main code for translation between Pascal and C), was declaring in the external units: char *yytext; The result is no problem at compilation/linkage, but a suicide at first yytext external access. And I wandered with acid(1) and sam(1) to try to understand what was going on. Of course, I suspected UTF/Rune and the like, before suspecting a problem on the linkage. So APE is a very good POSIX environment for verification, since, until now, when Plan9 was not agreeing, it was right. So for Plan9 lex(1), yytext is an array. And you can specify "%array" in the first definition of your *.l for flex(1) so that it handles an array too. A side note. gcc(1) is very verbose (well: I always set -Wall). ken-cc is---surprise---more laconic; but when he was saying: no! he was right, for things that were going silently under NetBSD. And I like sam(1) too... Regexp and the mouse, that's it! -- Thierry Laronde http://www.kergis.com/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C