diff --git a/contrib/libxo/tests/core/saved/test_02.HP.err b/contrib/libxo/tests/core/saved/test_02.HP.err
index e69de29bb2d..4bd358b8813 100644
--- a/contrib/libxo/tests/core/saved/test_02.HP.err
+++ b/contrib/libxo/tests/core/saved/test_02.HP.err
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'
diff --git a/contrib/libxo/tests/core/saved/test_02.HP.out b/contrib/libxo/tests/core/saved/test_02.HP.out
index f7c9d9b44fe..2a4b954c94e 100644
--- a/contrib/libxo/tests/core/saved/test_02.HP.out
+++ b/contrib/libxo/tests/core/saved/test_02.HP.out
@@ -1,4 +1,6 @@
+
em0
+
em0
We are
{emit}
{ting}
diff --git a/contrib/libxo/tests/core/saved/test_02.J.err b/contrib/libxo/tests/core/saved/test_02.J.err
index e69de29bb2d..4bd358b8813 100644
--- a/contrib/libxo/tests/core/saved/test_02.J.err
+++ b/contrib/libxo/tests/core/saved/test_02.J.err
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'
diff --git a/contrib/libxo/tests/core/saved/test_02.J.out b/contrib/libxo/tests/core/saved/test_02.J.out
index 65732c5c28d..d6d175339c7 100644
--- a/contrib/libxo/tests/core/saved/test_02.J.out
+++ b/contrib/libxo/tests/core/saved/test_02.J.out
@@ -1 +1 @@
-{"top": {"data": {"what":"braces","length":"abcdef","fd":-1,"error":"Bad file descriptor","test":"good","fd":-1,"error":"Bad fi","test":"good","lines":20,"words":30,"characters":40, "bytes": [0,1,2,3,4],"mbuf-current":10,"mbuf-cache":20,"mbuf-total":30,"distance":50,"location":"Boston","memory":64,"total":640,"memory":64,"total":640,"ten":10,"eleven":11,"unknown":1010,"unknown":1010,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"val1":21,"val2":58368,"val3":100663296,"val4":44470272,"val5":1342172800, "flag": ["one","two","three"],"works":null,"empty-tag":true,"t1":"1000","t2":"test5000","t3":"ten-longx","t4":"xtest", "__error": {"message":"this is an error"}, "__error": {"message":"two more errors"}, "__warning": {"message":"this is an warning"}, "__warning": {"message":"two more warnings"},"count":10,"test":4, "error": {"message":"Shut 'er down, Clancey! She's a-pumpin' mud! <>!,\"!<>\n"}}}}
+{"top": {"data": {"name":"em0","flags":"0x8843","name":"em0","flags":"0x8843","what":"braces","length":"abcdef","fd":-1,"error":"Bad file descriptor","test":"good","fd":-1,"error":"Bad fi","test":"good","lines":20,"words":30,"characters":40, "bytes": [0,1,2,3,4],"mbuf-current":10,"mbuf-cache":20,"mbuf-total":30,"distance":50,"location":"Boston","memory":64,"total":640,"memory":64,"total":640,"ten":10,"eleven":11,"unknown":1010,"unknown":1010,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"min":15,"cur":20,"max":125,"val1":21,"val2":58368,"val3":100663296,"val4":44470272,"val5":1342172800, "flag": ["one","two","three"],"works":null,"empty-tag":true,"t1":"1000","t2":"test5000","t3":"ten-longx","t4":"xtest", "__error": {"message":"this is an error"}, "__error": {"message":"two more errors"}, "__warning": {"message":"this is an warning"}, "__warning": {"message":"two more warnings"},"count":10,"test":4, "error": {"message":"Shut 'er down, Clancey! She's a-pumpin' mud! <>!,\"!<>\n"}}}}
diff --git a/contrib/libxo/tests/core/saved/test_02.JP.err b/contrib/libxo/tests/core/saved/test_02.JP.err
index e69de29bb2d..4bd358b8813 100644
--- a/contrib/libxo/tests/core/saved/test_02.JP.err
+++ b/contrib/libxo/tests/core/saved/test_02.JP.err
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'
diff --git a/contrib/libxo/tests/core/saved/test_02.JP.out b/contrib/libxo/tests/core/saved/test_02.JP.out
index 9e40703c613..cf211401be6 100644
--- a/contrib/libxo/tests/core/saved/test_02.JP.out
+++ b/contrib/libxo/tests/core/saved/test_02.JP.out
@@ -1,6 +1,10 @@
{
"top": {
"data": {
+ "name": "em0",
+ "flags": "0x8843",
+ "name": "em0",
+ "flags": "0x8843",
"what": "braces",
"length": "abcdef",
"fd": -1,
diff --git a/contrib/libxo/tests/core/saved/test_02.T.err b/contrib/libxo/tests/core/saved/test_02.T.err
index 80fabe31c77..bae8367624f 100644
--- a/contrib/libxo/tests/core/saved/test_02.T.err
+++ b/contrib/libxo/tests/core/saved/test_02.T.err
@@ -1 +1,2 @@
+test_02.test: key field emitted after normal value field: 'name'
Shut 'er down, Clancey! She's a-pumpin' mud! <>!,"!<>
diff --git a/contrib/libxo/tests/core/saved/test_02.T.out b/contrib/libxo/tests/core/saved/test_02.T.out
index d65e7c50e9b..5b22c1615bb 100644
--- a/contrib/libxo/tests/core/saved/test_02.T.out
+++ b/contrib/libxo/tests/core/saved/test_02.T.out
@@ -1,4 +1,4 @@
-We are {emit}{ting} some braces
+em0 em0 We are {emit}{ting} some braces
abcdef
abcdef: Bad file descriptor
improper use of profanity; ten yard penalty; first down
diff --git a/contrib/libxo/tests/core/saved/test_02.X.err b/contrib/libxo/tests/core/saved/test_02.X.err
index e69de29bb2d..4bd358b8813 100644
--- a/contrib/libxo/tests/core/saved/test_02.X.err
+++ b/contrib/libxo/tests/core/saved/test_02.X.err
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'
diff --git a/contrib/libxo/tests/core/saved/test_02.X.out b/contrib/libxo/tests/core/saved/test_02.X.out
index 49e9355514e..2eb122d00c8 100644
--- a/contrib/libxo/tests/core/saved/test_02.X.out
+++ b/contrib/libxo/tests/core/saved/test_02.X.out
@@ -1,4 +1,4 @@
-
bracesabcdef
+em00x8843em00x8843bracesabcdef
abcdef: Bad file descriptor
improper use of profanity; ten yard penalty; first down
abcdef-1Bad file descriptorgood-1Bad figoodimproper use of profanity; ten yard penalty; first down
diff --git a/contrib/libxo/tests/core/saved/test_02.XP.err b/contrib/libxo/tests/core/saved/test_02.XP.err
index e69de29bb2d..4bd358b8813 100644
--- a/contrib/libxo/tests/core/saved/test_02.XP.err
+++ b/contrib/libxo/tests/core/saved/test_02.XP.err
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'
diff --git a/contrib/libxo/tests/core/saved/test_02.XP.out b/contrib/libxo/tests/core/saved/test_02.XP.out
index e5172d35fd8..9c18c5edca4 100644
--- a/contrib/libxo/tests/core/saved/test_02.XP.out
+++ b/contrib/libxo/tests/core/saved/test_02.XP.out
@@ -1,5 +1,9 @@
+ em0
+ 0x8843
+ em0
+ 0x8843
braces
abcdef
diff --git a/contrib/libxo/tests/core/test_01.c b/contrib/libxo/tests/core/test_01.c
index dfadc754cab..2957472464b 100644
--- a/contrib/libxo/tests/core/test_01.c
+++ b/contrib/libxo/tests/core/test_01.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Juniper Networks, Inc.
+ * Copyright (c) 2014-2019, Juniper Networks, Inc.
* All rights reserved.
* This SOFTWARE is licensed under the LICENSE provided in the
* ../Copyright file. By downloading, installing, copying, or otherwise
diff --git a/contrib/libxo/tests/core/test_02.c b/contrib/libxo/tests/core/test_02.c
index cf98d34f1f4..b3d5ca92e20 100644
--- a/contrib/libxo/tests/core/test_02.c
+++ b/contrib/libxo/tests/core/test_02.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, Juniper Networks, Inc.
+ * Copyright (c) 2014-2019, Juniper Networks, Inc.
* All rights reserved.
* This SOFTWARE is licensed under the LICENSE provided in the
* ../Copyright file. By downloading, installing, copying, or otherwise
@@ -48,6 +48,12 @@ main (int argc, char **argv)
xo_open_container("data");
+ xo_emit("{kt:name/%-*.*s}{eq:flags/0x%x}",
+ 5, 5, "em0", 34883);
+
+ xo_emit("{d:/%-*.*s}{etk:name}{eq:flags/0x%x}",
+ 5, 5, "em0", "em0", 34883);
+
xo_emit("We are {{emit}}{{ting}} some {:what}\n", "braces");
xo_message("abcdef");
diff --git a/contrib/libxo/xo/xo.c b/contrib/libxo/xo/xo.c
index f74a1b25f56..d17c738cb54 100644
--- a/contrib/libxo/xo/xo.c
+++ b/contrib/libxo/xo/xo.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2018, Juniper Networks, Inc.
+ * Copyright (c) 2014-2019, Juniper Networks, Inc.
* All rights reserved.
* This SOFTWARE is licensed under the LICENSE provided in the
* ../Copyright file. By downloading, installing, copying, or otherwise
diff --git a/lib/libxo/add.man b/lib/libxo/add.man
index 83726d75ce9..42e0217c5f0 100644
--- a/lib/libxo/add.man
+++ b/lib/libxo/add.man
@@ -3,10 +3,10 @@
.Fx
uses
.Nm libxo
-version 0.9.0.
+version 1.0.4.
Complete documentation can be found on github:
.Bd -literal -offset indent
-http://juniper.github.io/libxo/0.9.0/libxo\-manual.html
+http://juniper.github.io/libxo/1.0.4/libxo\-manual.html
.Ed
.Pp
.Nm libxo
diff --git a/lib/libxo/xo_config.h b/lib/libxo/xo_config.h
index c73c5b9b1e0..33b29a0f906 100644
--- a/lib/libxo/xo_config.h
+++ b/lib/libxo/xo_config.h
@@ -183,16 +183,16 @@
/* #undef LIBXO_TEXT_ONLY */
/* Version number as dotted value */
-#define LIBXO_VERSION "1.0.2"
+#define LIBXO_VERSION "1.0.4"
/* Version number extra information */
#define LIBXO_VERSION_EXTRA ""
/* Version number as a number */
-#define LIBXO_VERSION_NUMBER 1000002
+#define LIBXO_VERSION_NUMBER 1000004
/* Version number as string */
-#define LIBXO_VERSION_STRING "1000002"
+#define LIBXO_VERSION_STRING "1000004"
/* Enable local wcwidth implementation */
#define LIBXO_WCWIDTH 1
@@ -210,7 +210,7 @@
#define PACKAGE_NAME "libxo"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libxo 1.0.2"
+#define PACKAGE_STRING "libxo 1.0.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libxo"
@@ -219,7 +219,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.0.2"
+#define PACKAGE_VERSION "1.0.4"
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
@@ -236,7 +236,7 @@
/* #undef USE_INT_RETURN_CODES */
/* Version number of package */
-#define VERSION "1.0.2"
+#define VERSION "1.0.4"
/* Retain hash bucket size */
/* #undef XO_RETAIN_SIZE */
diff --git a/usr.bin/xohtml/xohtml.sh b/usr.bin/xohtml/xohtml.sh
index 93e6ef78065..b72452a7a45 100755
--- a/usr.bin/xohtml/xohtml.sh
+++ b/usr.bin/xohtml/xohtml.sh
@@ -12,7 +12,7 @@
#
BASE=/usr/share/libxo
-VERSION=1.0.2
+VERSION=1.0.4
CMD=cat
DONE=
WEB=http://juniper.github.io/libxo/${VERSION}/xohtml