From: Roman Zippel <zippel@linux-m68k.org>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: kconfig: avoid temporary file
Date: Mon, 3 Jan 2005 01:55:04 +0100 [thread overview]
Message-ID: <200501030155.05203.zippel@linux-m68k.org> (raw)
In-Reply-To: <20041230235216.GB9450@mars.ravnborg.org>
Hi,
On Friday 31 December 2004 00:52, Sam Ravnborg wrote:
> # scripts/kconfig/mconf.c
> # 2004/12/30 22:29:51+01:00 sam@mars.ravnborg.org +78 -28
> # introduce a general growable string.
> # Allow us to skip one additional temporary file
I'm not really against the change, but the reason is weird. In the end the
string is still written to a file anyway...
> +/* Growable string. Allocates memory as needed when string expands */
> +struct gstr {
> + char *s;
> + size_t len;
> +};
I would prefer something more like this:
struct gstr {
int size;
char s[0];
};
and this would be better names for the functions:
struct gstr *str_new(void);
void str_free(struct gstr *gs);
void str_append(struct gstr *gs, const char *s);
It would be useful to have these sort of functions in the library, so we can
e.g. use them to dynamically generate the help text.
bye, Roman
next prev parent reply other threads:[~2005-01-03 1:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-30 23:51 kconfig: Sam Ravnborg
2004-12-30 23:52 ` kconfig: avoid temporary file Sam Ravnborg
2005-01-03 0:55 ` Roman Zippel [this message]
2005-01-03 5:10 ` Sam Ravnborg
2005-01-05 12:40 ` Roman Zippel
2005-01-05 18:14 ` Sam Ravnborg
2005-01-06 14:53 ` Roman Zippel
2004-12-30 23:52 ` kconfig: remove noise from show_expr Sam Ravnborg
2004-12-30 23:53 ` kconfig: help includes dependency information Sam Ravnborg
2005-01-01 4:02 ` Ingo Oeser
2005-01-02 20:16 ` Sam Ravnborg
2005-01-03 19:24 ` Ingo Oeser
2005-01-03 0:34 ` kconfig: Roman Zippel
2005-01-03 5:11 ` kconfig: Sam Ravnborg
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=200501030155.05203.zippel@linux-m68k.org \
--to=zippel@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sam@ravnborg.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.