Date: Thu, 19 May 2011 13:42:20 +0000 (UTC) From: Poul-Henning Kamp <phk@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r222095 - head/share/man/man9 Message-ID: <201105191342.p4JDgKoH039716@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: phk Date: Thu May 19 13:42:19 2011 New Revision: 222095 URL: http://svn.freebsd.org/changeset/base/222095 Log: When adding examples to man-pages, try to make them at least look like they might work. Prodded by: Vadim Goncharov Modified: head/share/man/man9/sbuf.9 Modified: head/share/man/man9/sbuf.9 ============================================================================== --- head/share/man/man9/sbuf.9 Thu May 19 13:09:39 2011 (r222094) +++ head/share/man/man9/sbuf.9 Thu May 19 13:42:19 2011 (r222095) @@ -492,13 +492,13 @@ will return zero for success and \-1 and struct sbuf *sb; sb = sbuf_new_auto(); -sbuf_cat("Customers found:\en"); +sbuf_cat(sb, "Customers found:\en"); TAILQ_FOREACH(foo, &foolist, list) { - sbuf_printf(" %4d %s\en", foo->index, foo->name); - sbuf_printf(" Address: %s\en", foo->address); - sbuf_printf(" Zip: %s\en", foo->zipcode); + sbuf_printf(sb, " %4d %s\en", foo->index, foo->name); + sbuf_printf(sb, " Address: %s\en", foo->address); + sbuf_printf(sb, " Zip: %s\en", foo->zipcode); } -if (sbuf_finish(sb)) +if (sbuf_finish(sb)) /* Check for any and all errors */ err(1,"Could not generate message"); transmit_msg(sbuf_data(sb), sbuf_len(sb)); sbuf_delete(sb);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105191342.p4JDgKoH039716>