From: Russ Cox <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] ports update
Date: Fri, 26 Mar 2004 12:39:37 -0500 [thread overview]
Message-ID: <40646AD9.7030304@swtch.com> (raw)
In-Reply-To: <051da330d0a61ef476d5c5bdf2f1f98d@plan9.escet.urjc.es>
Fco.J.Ballesteros wrote:
>Do you mean that you use global search and replace both to
>translate anonymous struct/unions to named ones and
>also to translate array initialization syntax?
>
>
Yes, but different search-and-replaces.
>Initialization syntax can be hard to do that way, unless I'm
>missing something obvious (eg. like it existing now in the std).
>
>
It's easy to turn
int x[10] = {
[a] 1,
[b] 2,
[c] 3,
};
into
int x[10];
static void
initx(void)
{
x[a]= 1;
x[b]= 2;
x[c]= 3;
};
and then call initx() from somewhere appropriate.
> Do you have the translator at hand anyway?
I'd have to dig it up and it doesn't entirely work.
Russ
next prev parent reply other threads:[~2004-03-26 17:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-26 2:21 Russ Cox
2004-03-26 9:54 ` Douglas A. Gwyn
2004-03-26 12:32 ` Fco.J.Ballesteros
2004-03-26 15:41 ` Russ Cox
2004-03-26 15:48 ` Fco.J.Ballesteros
2004-03-26 17:39 ` Russ Cox [this message]
2004-03-27 13:07 ` boyd, rounin
2004-03-26 15:42 ` Russ Cox
2004-03-26 18:24 ` Scott Schwartz
2004-03-26 15:52 Richard C Bilson
2004-03-26 16:07 ` Axel Belinfante
2004-03-26 16:21 ` Russ Cox
2004-03-26 16:26 ` Sam
2004-03-26 19:05 Richard C Bilson
2004-03-26 19:16 ` Russ Cox
2004-03-26 19:27 ` Axel Belinfante
2004-03-27 13:10 ` boyd, rounin
2004-03-27 13:09 ` boyd, rounin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40646AD9.7030304@swtch.com \
--to=rsc@swtch.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).