From: lucio@proxima.alt.za
To: 9fans@9fans.net
Subject: Re: [9fans] Ogg/Vorbis ported
Date: Fri, 30 Jan 2009 06:38:43 +0200 [thread overview]
Message-ID: <42aa45f7d293eb1405d891253a687a65@proxima.alt.za> (raw)
In-Reply-To: <0af685ebe4f62a20a70ae58d427cdaa2@smgl.fr.eu.org>
> As with exit(), it can be replaced automatically with exits() but you
> still have to figure out what message you want in your exits().
If anyone is interested, this is what I used as a compatibility shim:
#include <u.h>
#include <libc.h>
void
exit (int code) {
switch (code) {
case -1:
exits("FAILURE");
case 0:
exits(0);
default:
exits("Unknown condition");
}
}
One could instead print("%d", code), or print("FAILURE: %d", code).
Two cents, please!
++L
PS: I have a small compatibility library I seldom use. It has been
useful at times. The version on sources
(contrib/lucio/sys/src/pub/compat) looks a bit skinny, I may have lost
something along the way.
next prev parent reply other threads:[~2009-01-30 4:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-28 17:53 Mathieu Lonjaret
2009-01-28 18:22 ` hiro
2009-01-29 16:27 ` ron minnich
2009-01-29 20:27 ` [9fans] porting GNU code Steve Simon
2009-01-29 20:30 ` erik quanstrom
2009-01-29 20:35 ` Steve Simon
2009-01-29 22:47 ` [9fans] Ogg/Vorbis ported Mathieu
2009-01-30 4:38 ` lucio [this message]
2009-01-30 16:21 ` erik quanstrom
2009-02-23 10:05 ` lejatorn
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=42aa45f7d293eb1405d891253a687a65@proxima.alt.za \
--to=lucio@proxima.alt.za \
--cc=9fans@9fans.net \
/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).