Page MenuHomeFreeBSD

D26157.id76082.diff
No OneTemporary

D26157.id76082.diff

Index: contrib/libxo/libxo/xo_create.3
===================================================================
--- contrib/libxo/libxo/xo_create.3
+++ contrib/libxo/libxo/xo_create.3
@@ -33,7 +33,7 @@
Example:
xo_handle_t *xop = xo_create(XO_STYLE_JSON, XOF_WARN);
....
- xo_emit_h(xop, "testing\n");
+ xo_emit_h(xop, "testing\\n");
.Ed
.Pp
By default,
Index: contrib/libxo/libxo/xo_emit.3
===================================================================
--- contrib/libxo/libxo/xo_emit.3
+++ contrib/libxo/libxo/xo_emit.3
@@ -48,7 +48,7 @@
source code:
.Bd -literal -offset indent
xo_emit(" {:lines/%7ju} {:words/%7ju} "
- "{:characters/%7ju} {d:filename/%s}\n",
+ "{:characters/%7ju} {d:filename/%s}\\n",
linect, wordct, charct, file);
.Ed
Output can then be generated in various style, using
Index: contrib/libxo/libxo/xo_emit_f.3
===================================================================
--- contrib/libxo/libxo/xo_emit_f.3
+++ contrib/libxo/libxo/xo_emit_f.3
@@ -84,14 +84,14 @@
.Bd -literal -offset indent
for (i = 0; i < 1000; i++) {
xo_open_instance("item");
- xo_emit_f(XOEF_RETAIN, "{:name} {:count/%d}\n",
+ xo_emit_f(XOEF_RETAIN, "{:name} {:count/%d}\\n",
name[i], count[i]);
}
.Ed
.Pp
In this example, the caller desires to clear the retained information.
.Bd -literal -offset indent
- const char *fmt = "{:name} {:count/%d}\n";
+ const char *fmt = "{:name} {:count/%d}\\n";
for (i = 0; i < 1000; i++) {
xo_open_instance("item");
xo_emit_f(XOEF_RETAIN, fmt, name[i], count[i]);
Index: contrib/libxo/libxo/xo_open_container.3
===================================================================
--- contrib/libxo/libxo/xo_open_container.3
+++ contrib/libxo/libxo/xo_open_container.3
@@ -141,7 +141,7 @@
.Bd -literal -offset indent -compact
EXAMPLE:
xo_open_container("system");
- xo_emit("The host name is {:host-name}\n", hn);
+ xo_emit("The host name is {:host-name}\\n", hn);
xo_close_container("system");
XML:
<system><host-name>foo</host-name></system>
Index: contrib/libxo/libxo/xo_open_list.3
===================================================================
--- contrib/libxo/libxo/xo_open_list.3
+++ contrib/libxo/libxo/xo_open_list.3
@@ -77,7 +77,7 @@
for (ip = list; ip->i_title; ip++) {
xo_open_instance("item");
- xo_emit("{L:Item} '{:name/%s}':\n", ip->i_title);
+ xo_emit("{L:Item} '{:name/%s}':\\n", ip->i_title);
xo_close_instance("item");
}
@@ -91,7 +91,7 @@
xo_open_list("user");
for (i = 0; i < num_users; i++) {
xo_open_instance("user");
- xo_emit("{k:name}:{:uid/%u}:{:gid/%u}:{:home}\n",
+ xo_emit("{k:name}:{:uid/%u}:{:gid/%u}:{:home}\\n",
pw[i].pw_name, pw[i].pw_uid,
pw[i].pw_gid, pw[i].pw_dir);
xo_close_instance("user");
@@ -138,7 +138,7 @@
function using the ""l"" modifier:
.Bd -literal -offset indent -compact
for (ip = list; ip->i_title; ip++) {
- xo_emit("{Lwc:Item}{l:item}\n", ip->i_title);
+ xo_emit("{Lwc:Item}{l:item}\\n", ip->i_title);
}
.Ed
.Pp

File Metadata

Mime Type
text/plain
Expires
Sat, Jul 25, 9:32 PM (15 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35500098
Default Alt Text
D26157.id76082.diff (3 KB)

Event Timeline