Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 May 2019 20:20:21 +0000 (UTC)
From:      Phil Shafer <phil@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r347207 - in head: contrib/libxo contrib/libxo/doc contrib/libxo/libxo contrib/libxo/tests/core contrib/libxo/tests/core/saved contrib/libxo/xo lib/libxo usr.bin/xohtml
Message-ID:  <201905062020.x46KKLGe036492@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: phil
Date: Mon May  6 20:20:21 2019
New Revision: 347207
URL: https://svnweb.freebsd.org/changeset/base/347207

Log:
  Import libxo-1.0.4:
  - Avoid NULL deref in xo_xml_leader_len (replacing local fix in rS345967)
  - update copyright dates
  - update test cases
  - fix uncommitted version change
  
  Submitted by:	phil
  MFC after:	2 weeks

Modified:
  head/contrib/libxo/configure.ac
  head/contrib/libxo/doc/libxo-manual.html
  head/contrib/libxo/libxo/libxo.c
  head/contrib/libxo/libxo/xo_explicit.h
  head/contrib/libxo/tests/core/saved/test_02.E.err
  head/contrib/libxo/tests/core/saved/test_02.E.out
  head/contrib/libxo/tests/core/saved/test_02.H.err
  head/contrib/libxo/tests/core/saved/test_02.H.out
  head/contrib/libxo/tests/core/saved/test_02.HIPx.err
  head/contrib/libxo/tests/core/saved/test_02.HIPx.out
  head/contrib/libxo/tests/core/saved/test_02.HP.err
  head/contrib/libxo/tests/core/saved/test_02.HP.out
  head/contrib/libxo/tests/core/saved/test_02.J.err
  head/contrib/libxo/tests/core/saved/test_02.J.out
  head/contrib/libxo/tests/core/saved/test_02.JP.err
  head/contrib/libxo/tests/core/saved/test_02.JP.out
  head/contrib/libxo/tests/core/saved/test_02.T.err
  head/contrib/libxo/tests/core/saved/test_02.T.out
  head/contrib/libxo/tests/core/saved/test_02.X.err
  head/contrib/libxo/tests/core/saved/test_02.X.out
  head/contrib/libxo/tests/core/saved/test_02.XP.err
  head/contrib/libxo/tests/core/saved/test_02.XP.out
  head/contrib/libxo/tests/core/test_01.c
  head/contrib/libxo/tests/core/test_02.c
  head/contrib/libxo/xo/xo.c
  head/lib/libxo/add.man
  head/lib/libxo/xo_config.h
  head/usr.bin/xohtml/xohtml.sh
Directory Properties:
  head/contrib/libxo/   (props changed)

Modified: head/contrib/libxo/configure.ac
==============================================================================
--- head/contrib/libxo/configure.ac	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/configure.ac	Mon May  6 20:20:21 2019	(r347207)
@@ -12,7 +12,7 @@
 #
 
 AC_PREREQ(2.2)
-AC_INIT([libxo], [1.0.2], [phil@juniper.net])
+AC_INIT([libxo], [1.0.4], [phil@juniper.net])
 AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability])
 
 # Support silent build rules.  Requires at least automake-1.11.

Modified: head/contrib/libxo/doc/libxo-manual.html
==============================================================================
--- head/contrib/libxo/doc/libxo-manual.html	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/doc/libxo-manual.html	Mon May  6 20:20:21 2019	(r347207)
@@ -22011,7 +22011,7 @@ jQuery(function ($) {
 </tr>
 <tr>
 <td class="header left"></td>
-<td class="header right">April 2, 2019</td>
+<td class="header right">April 24, 2019</td>
 </tr>
 </table></div>
 <p id="title" class="title">libxo: The Easy Way to Generate text, XML, JSON, and HTML output<br><span class="filename">libxo-manual</span></p>

Modified: head/contrib/libxo/libxo/libxo.c
==============================================================================
--- head/contrib/libxo/libxo/libxo.c	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/libxo/libxo.c	Mon May  6 20:20:21 2019	(r347207)
@@ -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

Modified: head/contrib/libxo/libxo/xo_explicit.h
==============================================================================
--- head/contrib/libxo/libxo/xo_explicit.h	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/libxo/xo_explicit.h	Mon May  6 20:20:21 2019	(r347207)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015, Juniper Networks, Inc.
+ * Copyright (c) 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

Modified: head/contrib/libxo/tests/core/saved/test_02.E.err
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.E.err	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.E.err	Mon May  6 20:20:21 2019	(r347207)
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'

Modified: head/contrib/libxo/tests/core/saved/test_02.E.out
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.E.out	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.E.out	Mon May  6 20:20:21 2019	(r347207)
@@ -1,6 +1,10 @@
 op create: [] [] [0]
 op open_container: [top] [] [0x40010]
 op open_container: [data] [] [0x40010]
+op string: [name] [em0] [0x1080]
+op string: [flags] [0x8843] [0x18]
+op string: [name] [em0] [0x1088]
+op string: [flags] [0x8843] [0x18]
 op string: [what] [braces] [0]
 op string: [length] [abcdef] [0]
 op content: [fd] [-1] [0]

Modified: head/contrib/libxo/tests/core/saved/test_02.H.err
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.H.err	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.H.err	Mon May  6 20:20:21 2019	(r347207)
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'

Modified: head/contrib/libxo/tests/core/saved/test_02.H.out
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.H.out	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.H.out	Mon May  6 20:20:21 2019	(r347207)
@@ -1,4 +1,4 @@
-<div class="line"><div class="text">We are </div><div class="text">{emit}</div><div class="text">{ting}</div><div class="text"> some </div><div class="data" data-tag="what">braces</div></div><div class="line"><div class="message">abcdef
+<div class="line"><div class="data" data-tag="name">em0  </div><div class="data">em0  </div><div class="text">We are </div><div class="text">{emit}</div><div class="text">{ting}</div><div class="text"> some </div><div class="data" data-tag="what">braces</div></div><div class="line"><div class="message">abcdef
 </div></div><div class="line"><div class="message">abcdef: Bad file descriptor
 </div></div><div class="line"><div class="message">improper use of profanity; ten yard penalty; first down
 </div></div><div class="line"><div class="text">length </div><div class="data" data-tag="length">abcdef</div></div><div class="line"><div class="text">close </div><div class="data" data-tag="fd">-1</div><div class="text"> returned </div><div class="data" data-tag="error">Bad file descriptor</div><div class="text"> </div><div class="data" data-tag="test">good</div></div><div class="line"><div class="text">close </div><div class="data" data-tag="fd">-1</div><div class="text"> returned </div><div class="data" data-tag="error">Bad fi</div><div class="text"> </div><div class="data" data-tag="test">good</div></div><div class="line"><div class="message">improper use of profanity; ten yard penalty; first down

Modified: head/contrib/libxo/tests/core/saved/test_02.HIPx.err
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.HIPx.err	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.HIPx.err	Mon May  6 20:20:21 2019	(r347207)
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'

Modified: head/contrib/libxo/tests/core/saved/test_02.HIPx.out
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.HIPx.out	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.HIPx.out	Mon May  6 20:20:21 2019	(r347207)
@@ -1,9 +1,11 @@
 <div class="line">
+  <div class="data" data-tag="name" data-xpath="/top/data/name">em0  </div>
+  <div class="data">em0  </div>
   <div class="text">We are </div>
   <div class="text">{emit}</div>
   <div class="text">{ting}</div>
   <div class="text"> some </div>
-  <div class="data" data-tag="what" data-xpath="/top/data/what">braces</div>
+  <div class="data" data-tag="what" data-xpath="/top/data[name = 'em0  '][name = 'em0']/what">braces</div>
 </div>
 <div class="line">
   <div class="message">abcdef
@@ -19,23 +21,23 @@
 </div>
 <div class="line">
   <div class="text">length </div>
-  <div class="data" data-tag="length" data-xpath="/top/data/length">abcdef</div>
+  <div class="data" data-tag="length" data-xpath="/top/data[name = 'em0  '][name = 'em0']/length">abcdef</div>
 </div>
 <div class="line">
   <div class="text">close </div>
-  <div class="data" data-tag="fd" data-xpath="/top/data/fd">-1</div>
+  <div class="data" data-tag="fd" data-xpath="/top/data[name = 'em0  '][name = 'em0']/fd">-1</div>
   <div class="text"> returned </div>
-  <div class="data" data-tag="error" data-xpath="/top/data/error">Bad file descriptor</div>
+  <div class="data" data-tag="error" data-xpath="/top/data[name = 'em0  '][name = 'em0']/error">Bad file descriptor</div>
   <div class="text"> </div>
-  <div class="data" data-tag="test" data-xpath="/top/data/test">good</div>
+  <div class="data" data-tag="test" data-xpath="/top/data[name = 'em0  '][name = 'em0']/test">good</div>
 </div>
 <div class="line">
   <div class="text">close </div>
-  <div class="data" data-tag="fd" data-xpath="/top/data/fd">-1</div>
+  <div class="data" data-tag="fd" data-xpath="/top/data[name = 'em0  '][name = 'em0']/fd">-1</div>
   <div class="text"> returned </div>
-  <div class="data" data-tag="error" data-xpath="/top/data/error">Bad fi</div>
+  <div class="data" data-tag="error" data-xpath="/top/data[name = 'em0  '][name = 'em0']/error">Bad fi</div>
   <div class="text"> </div>
-  <div class="data" data-tag="test" data-xpath="/top/data/test">good</div>
+  <div class="data" data-tag="test" data-xpath="/top/data[name = 'em0  '][name = 'em0']/test">good</div>
 </div>
 <div class="line">
   <div class="message">improper use of profanity; ten yard penalty; first down
@@ -43,155 +45,155 @@
 </div>
 <div class="line">
   <div class="text"> </div>
-  <div class="data" data-tag="lines" data-xpath="/top/data/lines">     20</div>
+  <div class="data" data-tag="lines" data-xpath="/top/data[name = 'em0  '][name = 'em0']/lines">     20</div>
   <div class="text"> </div>
-  <div class="data" data-tag="words" data-xpath="/top/data/words">     30</div>
+  <div class="data" data-tag="words" data-xpath="/top/data[name = 'em0  '][name = 'em0']/words">     30</div>
   <div class="text"> </div>
-  <div class="data" data-tag="characters" data-xpath="/top/data/characters">     40</div>
+  <div class="data" data-tag="characters" data-xpath="/top/data[name = 'em0  '][name = 'em0']/characters">     40</div>
   <div class="text"> </div>
-  <div class="data" data-tag="filename" data-xpath="/top/data/filename">file</div>
+  <div class="data" data-tag="filename" data-xpath="/top/data[name = 'em0  '][name = 'em0']/filename">file</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="bytes" data-xpath="/top/data/bytes">0</div>
+  <div class="data" data-tag="bytes" data-xpath="/top/data[name = 'em0  '][name = 'em0']/bytes">0</div>
   <div class="padding"> </div>
   <div class="note">bytes</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="bytes" data-xpath="/top/data/bytes">1</div>
+  <div class="data" data-tag="bytes" data-xpath="/top/data[name = 'em0  '][name = 'em0']/bytes">1</div>
   <div class="padding"> </div>
   <div class="note">byte</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="bytes" data-xpath="/top/data/bytes">2</div>
+  <div class="data" data-tag="bytes" data-xpath="/top/data[name = 'em0  '][name = 'em0']/bytes">2</div>
   <div class="padding"> </div>
   <div class="note">bytes</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="bytes" data-xpath="/top/data/bytes">3</div>
+  <div class="data" data-tag="bytes" data-xpath="/top/data[name = 'em0  '][name = 'em0']/bytes">3</div>
   <div class="padding"> </div>
   <div class="note">bytes</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="bytes" data-xpath="/top/data/bytes">4</div>
+  <div class="data" data-tag="bytes" data-xpath="/top/data[name = 'em0  '][name = 'em0']/bytes">4</div>
   <div class="padding"> </div>
   <div class="note">bytes</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="mbuf-current" data-xpath="/top/data/mbuf-current">10</div>
+  <div class="data" data-tag="mbuf-current" data-xpath="/top/data[name = 'em0  '][name = 'em0']/mbuf-current">10</div>
   <div class="text">/</div>
-  <div class="data" data-tag="mbuf-cache" data-xpath="/top/data/mbuf-cache">20</div>
+  <div class="data" data-tag="mbuf-cache" data-xpath="/top/data[name = 'em0  '][name = 'em0']/mbuf-cache">20</div>
   <div class="text">/</div>
-  <div class="data" data-tag="mbuf-total" data-xpath="/top/data/mbuf-total">30</div>
+  <div class="data" data-tag="mbuf-total" data-xpath="/top/data[name = 'em0  '][name = 'em0']/mbuf-total">30</div>
   <div class="text"> </div>
   <div class="note">mbufs &lt;&amp;&gt; in use (current/cache/total)</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="distance" data-units="miles" data-xpath="/top/data/distance">50</div>
+  <div class="data" data-tag="distance" data-units="miles" data-xpath="/top/data[name = 'em0  '][name = 'em0']/distance">50</div>
   <div class="padding"> </div>
   <div class="text"> from </div>
-  <div class="data" data-tag="location" data-xpath="/top/data/location">Boston</div>
+  <div class="data" data-tag="location" data-xpath="/top/data[name = 'em0  '][name = 'em0']/location">Boston</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="memory" data-units="k" data-xpath="/top/data/memory">64</div>
+  <div class="data" data-tag="memory" data-units="k" data-xpath="/top/data[name = 'em0  '][name = 'em0']/memory">64</div>
   <div class="text"> left out of </div>
-  <div class="data" data-tag="total" data-units="kb" data-xpath="/top/data/total">640</div>
+  <div class="data" data-tag="total" data-units="kb" data-xpath="/top/data[name = 'em0  '][name = 'em0']/total">640</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="memory" data-units="k" data-xpath="/top/data/memory">64</div>
+  <div class="data" data-tag="memory" data-units="k" data-xpath="/top/data[name = 'em0  '][name = 'em0']/memory">64</div>
   <div class="text"> left out of </div>
-  <div class="data" data-tag="total" data-units="kilobytes" data-xpath="/top/data/total">640</div>
+  <div class="data" data-tag="total" data-units="kilobytes" data-xpath="/top/data[name = 'em0  '][name = 'em0']/total">640</div>
 </div>
 <div class="line">
   <div class="title">beforeworkingafter:</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="some" data-xpath="/top/data/some">string</div>
+  <div class="data" data-tag="some" data-xpath="/top/data[name = 'em0  '][name = 'em0']/some">string</div>
   <div class="decoration">:</div>
   <div class="padding"> </div>
-  <div class="data" data-tag="ten" data-xpath="/top/data/ten">10</div>
-  <div class="data" data-tag="eleven" data-xpath="/top/data/eleven">11</div>
+  <div class="data" data-tag="ten" data-xpath="/top/data[name = 'em0  '][name = 'em0']/ten">10</div>
+  <div class="data" data-tag="eleven" data-xpath="/top/data[name = 'em0  '][name = 'em0']/eleven">11</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="unknown" data-xpath="/top/data/unknown">1010</div>
+  <div class="data" data-tag="unknown" data-xpath="/top/data[name = 'em0  '][name = 'em0']/unknown">1010</div>
   <div class="text"> </div>
   <div class="note">packets here/there/everywhere</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="unknown" data-xpath="/top/data/unknown">1010</div>
+  <div class="data" data-tag="unknown" data-xpath="/top/data[name = 'em0  '][name = 'em0']/unknown">1010</div>
   <div class="text"> </div>
   <div class="note">packets here/there/everywhere</div>
 </div>
 <div class="line">
   <div class="text">(</div>
   <div class="padding">                     </div>
-  <div class="data" data-tag="min" data-xpath="/top/data/min">15</div>
+  <div class="data" data-tag="min" data-xpath="/top/data[name = 'em0  '][name = 'em0']/min">15</div>
   <div class="text">/</div>
-  <div class="data" data-tag="cur" data-xpath="/top/data/cur">20</div>
+  <div class="data" data-tag="cur" data-xpath="/top/data[name = 'em0  '][name = 'em0']/cur">20</div>
   <div class="text">/</div>
-  <div class="data" data-tag="max" data-xpath="/top/data/max">125</div>
+  <div class="data" data-tag="max" data-xpath="/top/data[name = 'em0  '][name = 'em0']/max">125</div>
   <div class="text">)</div>
 </div>
 <div class="line">
   <div class="text">(</div>
   <div class="padding">                     </div>
-  <div class="data" data-tag="min" data-xpath="/top/data/min">15</div>
+  <div class="data" data-tag="min" data-xpath="/top/data[name = 'em0  '][name = 'em0']/min">15</div>
   <div class="text">/</div>
-  <div class="data" data-tag="cur" data-xpath="/top/data/cur">20</div>
+  <div class="data" data-tag="cur" data-xpath="/top/data[name = 'em0  '][name = 'em0']/cur">20</div>
   <div class="text">/</div>
-  <div class="data" data-tag="max" data-xpath="/top/data/max">125</div>
+  <div class="data" data-tag="max" data-xpath="/top/data[name = 'em0  '][name = 'em0']/max">125</div>
   <div class="text">)</div>
 </div>
 <div class="line">
   <div class="text">(</div>
-  <div class="data" data-tag="min" data-xpath="/top/data/min">15</div>
+  <div class="data" data-tag="min" data-xpath="/top/data[name = 'em0  '][name = 'em0']/min">15</div>
   <div class="text">/</div>
-  <div class="data" data-tag="cur" data-xpath="/top/data/cur">20</div>
+  <div class="data" data-tag="cur" data-xpath="/top/data[name = 'em0  '][name = 'em0']/cur">20</div>
   <div class="text">/</div>
-  <div class="data" data-tag="max" data-xpath="/top/data/max">125</div>
+  <div class="data" data-tag="max" data-xpath="/top/data[name = 'em0  '][name = 'em0']/max">125</div>
   <div class="padding">                     </div>
   <div class="text">)</div>
 </div>
 <div class="line">
   <div class="text">(</div>
-  <div class="data" data-tag="min" data-xpath="/top/data/min">15</div>
+  <div class="data" data-tag="min" data-xpath="/top/data[name = 'em0  '][name = 'em0']/min">15</div>
   <div class="text">/</div>
-  <div class="data" data-tag="cur" data-xpath="/top/data/cur">20</div>
+  <div class="data" data-tag="cur" data-xpath="/top/data[name = 'em0  '][name = 'em0']/cur">20</div>
   <div class="text">/</div>
-  <div class="data" data-tag="max" data-xpath="/top/data/max">125</div>
+  <div class="data" data-tag="max" data-xpath="/top/data[name = 'em0  '][name = 'em0']/max">125</div>
   <div class="padding">                     </div>
   <div class="text">)</div>
 </div>
 <div class="line">
   <div class="text">Humanize: </div>
-  <div class="data" data-tag="val1" data-xpath="/top/data/val1" data-number="21">21</div>
+  <div class="data" data-tag="val1" data-xpath="/top/data[name = 'em0  '][name = 'em0']/val1" data-number="21">21</div>
   <div class="text">, </div>
-  <div class="data" data-tag="val2" data-xpath="/top/data/val2" data-number="58368">57 K</div>
+  <div class="data" data-tag="val2" data-xpath="/top/data[name = 'em0  '][name = 'em0']/val2" data-number="58368">57 K</div>
   <div class="text">, </div>
-  <div class="data" data-tag="val3" data-xpath="/top/data/val3" data-number="100663296">96M</div>
+  <div class="data" data-tag="val3" data-xpath="/top/data[name = 'em0  '][name = 'em0']/val3" data-number="100663296">96M</div>
   <div class="text">, </div>
-  <div class="data" data-tag="val4" data-xpath="/top/data/val4" data-number="44470272">44M</div>
+  <div class="data" data-tag="val4" data-xpath="/top/data[name = 'em0  '][name = 'em0']/val4" data-number="44470272">44M</div>
   <div class="text">, </div>
-  <div class="data" data-tag="val5" data-xpath="/top/data/val5" data-number="1342172800">1.2G</div>
+  <div class="data" data-tag="val5" data-xpath="/top/data[name = 'em0  '][name = 'em0']/val5" data-number="1342172800">1.2G</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="flag" data-xpath="/top/data/flag">one</div>
+  <div class="data" data-tag="flag" data-xpath="/top/data[name = 'em0  '][name = 'em0']/flag">one</div>
   <div class="text"> </div>
-  <div class="data" data-tag="flag" data-xpath="/top/data/flag">two</div>
+  <div class="data" data-tag="flag" data-xpath="/top/data[name = 'em0  '][name = 'em0']/flag">two</div>
   <div class="text"> </div>
-  <div class="data" data-tag="flag" data-xpath="/top/data/flag">three</div>
+  <div class="data" data-tag="flag" data-xpath="/top/data[name = 'em0  '][name = 'em0']/flag">three</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="works" data-xpath="/top/data/works">(null)</div>
+  <div class="data" data-tag="works" data-xpath="/top/data[name = 'em0  '][name = 'em0']/works">(null)</div>
 </div>
 <div class="line">
   <div class="text">1:</div>
-  <div class="data" data-tag="t1" data-xpath="/top/data/t1">  1000</div>
+  <div class="data" data-tag="t1" data-xpath="/top/data[name = 'em0  '][name = 'em0']/t1">  1000</div>
   <div class="text"> 2:</div>
-  <div class="data" data-tag="t2" data-xpath="/top/data/t2">test5000    </div>
+  <div class="data" data-tag="t2" data-xpath="/top/data[name = 'em0  '][name = 'em0']/t2">test5000    </div>
   <div class="text"> 3:</div>
-  <div class="data" data-tag="t3" data-xpath="/top/data/t3">  ten-longx</div>
+  <div class="data" data-tag="t3" data-xpath="/top/data[name = 'em0  '][name = 'em0']/t3">  ten-longx</div>
   <div class="text"> 4:</div>
-  <div class="data" data-tag="t4" data-xpath="/top/data/t4">xtest      </div>
+  <div class="data" data-tag="t4" data-xpath="/top/data[name = 'em0  '][name = 'em0']/t4">xtest      </div>
 </div>
 <div class="line">
   <div class="error">this is an error</div>
@@ -208,10 +210,10 @@
 <div class="line">
   <div class="label">V1/V2 packets</div>
   <div class="text">: </div>
-  <div class="data" data-tag="count" data-xpath="/top/data/count">10</div>
+  <div class="data" data-tag="count" data-xpath="/top/data[name = 'em0  '][name = 'em0']/count">10</div>
 </div>
 <div class="line">
-  <div class="data" data-tag="test" data-xpath="/top/data/test">0004</div>
+  <div class="data" data-tag="test" data-xpath="/top/data[name = 'em0  '][name = 'em0']/test">0004</div>
   <div class="text"> </div>
   <div class="label">tries</div>
 </div>

Modified: head/contrib/libxo/tests/core/saved/test_02.HP.err
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.HP.err	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.HP.err	Mon May  6 20:20:21 2019	(r347207)
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'

Modified: head/contrib/libxo/tests/core/saved/test_02.HP.out
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.HP.out	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.HP.out	Mon May  6 20:20:21 2019	(r347207)
@@ -1,4 +1,6 @@
 <div class="line">
+  <div class="data" data-tag="name">em0  </div>
+  <div class="data">em0  </div>
   <div class="text">We are </div>
   <div class="text">{emit}</div>
   <div class="text">{ting}</div>

Modified: head/contrib/libxo/tests/core/saved/test_02.J.err
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.J.err	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.J.err	Mon May  6 20:20:21 2019	(r347207)
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'

Modified: head/contrib/libxo/tests/core/saved/test_02.J.out
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.J.out	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.J.out	Mon May  6 20:20:21 2019	(r347207)
@@ -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!  S
 he's a-pumpin' mud!  <>!,\"!<>\n"}}}}

Modified: head/contrib/libxo/tests/core/saved/test_02.JP.err
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.JP.err	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.JP.err	Mon May  6 20:20:21 2019	(r347207)
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'

Modified: head/contrib/libxo/tests/core/saved/test_02.JP.out
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.JP.out	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.JP.out	Mon May  6 20:20:21 2019	(r347207)
@@ -1,6 +1,10 @@
 {
   "top": {
     "data": {
+      "name": "em0",
+      "flags": "0x8843",
+      "name": "em0",
+      "flags": "0x8843",
       "what": "braces",
       "length": "abcdef",
       "fd": -1,

Modified: head/contrib/libxo/tests/core/saved/test_02.T.err
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.T.err	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.T.err	Mon May  6 20:20:21 2019	(r347207)
@@ -1 +1,2 @@
+test_02.test: key field emitted after normal value field: 'name'
 Shut 'er down, Clancey!  She's a-pumpin' mud!  <>!,"!<>

Modified: head/contrib/libxo/tests/core/saved/test_02.T.out
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.T.out	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.T.out	Mon May  6 20:20:21 2019	(r347207)
@@ -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

Modified: head/contrib/libxo/tests/core/saved/test_02.X.err
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.X.err	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.X.err	Mon May  6 20:20:21 2019	(r347207)
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'

Modified: head/contrib/libxo/tests/core/saved/test_02.X.out
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.X.out	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.X.out	Mon May  6 20:20:21 2019	(r347207)
@@ -1,4 +1,4 @@
-<top><data><what>braces</what><message>abcdef
+<top><data><name>em0</name><flags>0x8843</flags><name>em0</name><flags>0x8843</flags><what>braces</what><message>abcdef
 </message><message>abcdef: Bad file descriptor
 </message><message>improper use of profanity; ten yard penalty; first down
 </message><length>abcdef</length><fd>-1</fd><error>Bad file descriptor</error><test>good</test><fd>-1</fd><error>Bad fi</error><test>good</test><message>improper use of profanity; ten yard penalty; first down

Modified: head/contrib/libxo/tests/core/saved/test_02.XP.err
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.XP.err	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.XP.err	Mon May  6 20:20:21 2019	(r347207)
@@ -0,0 +1 @@
+test_02.test: key field emitted after normal value field: 'name'

Modified: head/contrib/libxo/tests/core/saved/test_02.XP.out
==============================================================================
--- head/contrib/libxo/tests/core/saved/test_02.XP.out	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/saved/test_02.XP.out	Mon May  6 20:20:21 2019	(r347207)
@@ -1,5 +1,9 @@
 <top>
   <data>
+    <name>em0</name>
+    <flags>0x8843</flags>
+    <name>em0</name>
+    <flags>0x8843</flags>
     <what>braces</what>
   <message>abcdef
 </message>

Modified: head/contrib/libxo/tests/core/test_01.c
==============================================================================
--- head/contrib/libxo/tests/core/test_01.c	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/test_01.c	Mon May  6 20:20:21 2019	(r347207)
@@ -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

Modified: head/contrib/libxo/tests/core/test_02.c
==============================================================================
--- head/contrib/libxo/tests/core/test_02.c	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/tests/core/test_02.c	Mon May  6 20:20:21 2019	(r347207)
@@ -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
@@ -47,6 +47,12 @@ main (int argc, char **argv)
     xo_open_container_h(NULL, "top");
 
     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");
 

Modified: head/contrib/libxo/xo/xo.c
==============================================================================
--- head/contrib/libxo/xo/xo.c	Mon May  6 20:15:18 2019	(r347206)
+++ head/contrib/libxo/xo/xo.c	Mon May  6 20:20:21 2019	(r347207)
@@ -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

Modified: head/lib/libxo/add.man
==============================================================================
--- head/lib/libxo/add.man	Mon May  6 20:15:18 2019	(r347206)
+++ head/lib/libxo/add.man	Mon May  6 20:20:21 2019	(r347207)
@@ -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

Modified: head/lib/libxo/xo_config.h
==============================================================================
--- head/lib/libxo/xo_config.h	Mon May  6 20:15:18 2019	(r347206)
+++ head/lib/libxo/xo_config.h	Mon May  6 20:20:21 2019	(r347207)
@@ -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 */

Modified: head/usr.bin/xohtml/xohtml.sh
==============================================================================
--- head/usr.bin/xohtml/xohtml.sh	Mon May  6 20:15:18 2019	(r347206)
+++ head/usr.bin/xohtml/xohtml.sh	Mon May  6 20:20:21 2019	(r347207)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905062020.x46KKLGe036492>