From: David Presotto <presotto@closedmind.org>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] libndb
Date: Sun, 7 Mar 2004 11:17:49 -0500 [thread overview]
Message-ID: <11736d5a032860f5a5f617703661555d@plan9.bell-labs.com> (raw)
In-Reply-To: <404B49F4.1070107@nospam.com>
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
I have a better idea. Why don't I make the interface
csgetvalue(char *netroot, char *attr, char *val, char *rattr, char **pp);
If buf is non-zero, I strdup a reply and sick a pointer to it in pp.
Given how much these routines to, it probably doesn't hurt to do the
extra malloc/free.
[-- Attachment #2: Type: message/rfc822, Size: 2559 bytes --]
From: bs <bs@nospam.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] libndb
Date: Sun, 07 Mar 2004 11:12:36 -0500
Message-ID: <404B49F4.1070107@nospam.com>
Can i pass null for the buffer and a pointer to the length, and get the
length needed to be allocated?
> No, it just truncates. Suggest something else if you like. It's easy enough to
> call werrstr in it.
>
> | These do the same thing csgetval, ndbgetval and ndbloolval but take a
> | length for the buffer that gets filled.
>
> How do they signal that it wasn't big enough?
next prev parent reply other threads:[~2004-03-07 16:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-07 0:20 David Presotto
2004-03-07 1:38 ` Scott Schwartz
2004-03-07 1:50 ` David Presotto
2004-03-07 16:12 ` bs
2004-03-07 16:17 ` David Presotto [this message]
2004-03-07 2:20 David Presotto
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=11736d5a032860f5a5f617703661555d@plan9.bell-labs.com \
--to=presotto@closedmind.org \
--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).