linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: Sam Ravnborg <sam@ravnborg.org>, linux-kernel@vger.kernel.org
Subject: Re: kconfig: avoid temporary file
Date: Mon, 3 Jan 2005 06:10:02 +0100	[thread overview]
Message-ID: <20050103051002.GB8113@mars.ravnborg.org> (raw)
In-Reply-To: <200501030155.05203.zippel@linux-m68k.org>

On Mon, Jan 03, 2005 at 01:55:04AM +0100, Roman Zippel wrote:
> 
> I'm not really against the change, but the reason is weird. In the end the 
> string is still written to a file anyway...
Next step is to integrate Petr Baudis patch to link lxdialog with mconf.
Then it is nice to get rid of the file based interface.
 
> > +/* 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.

I will update my patch with your suggestions later this week.

	Sam

  reply	other threads:[~2005-01-03  5:09 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
2005-01-03  5:10     ` Sam Ravnborg [this message]
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=20050103051002.GB8113@mars.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zippel@linux-m68k.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 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).