Hi coders,
Tired of always writing something like this?
if ((ptr = malloc(size)) == NULL) {
(void) fprintf(stderr, "%s: out of memory\n", prog);
exit(1);
}
Well, now you can just write this:
if ((ptr = malloc(size)) == NULL)
err(1, "%s: out of memory", prog);
This is now possible thanks to err/warn function family being integrated
into libc in the ON consolidation.
More details and examples can be found in the man page, blog entry and
PSARC materials:
err(3C) / available in Nevada since build 72
http://blogs.sun.com/vlad/entry/closing_bsd_compatibility_gap
http://www.opensolaris.org/os/community/arc/caselog/2006/662/
v.
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code