From owner-svn-src-vendor@freebsd.org Mon May 6 20:15:06 2019 Return-Path: Delivered-To: svn-src-vendor@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B08841594A24; Mon, 6 May 2019 20:15:06 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E3D587B77; Mon, 6 May 2019 20:15:06 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 00F82BDF1; Mon, 6 May 2019 20:15:05 +0000 (UTC) (envelope-from phil@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x46KF5B2035996; Mon, 6 May 2019 20:15:05 GMT (envelope-from phil@FreeBSD.org) Received: (from phil@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x46KF0j8035968; Mon, 6 May 2019 20:15:00 GMT (envelope-from phil@FreeBSD.org) Message-Id: <201905062015.x46KF0j8035968@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phil set sender to phil@FreeBSD.org using -f From: Phil Shafer Date: Mon, 6 May 2019 20:15:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r347205 - in vendor/Juniper/libxo/dist: . doc libxo tests/core tests/core/saved xo X-SVN-Group: vendor X-SVN-Commit-Author: phil X-SVN-Commit-Paths: in vendor/Juniper/libxo/dist: . doc libxo tests/core tests/core/saved xo X-SVN-Commit-Revision: 347205 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E3D587B77 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-vendor@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the vendor work area tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 May 2019 20:15:07 -0000 Author: phil Date: Mon May 6 20:15:00 2019 New Revision: 347205 URL: https://svnweb.freebsd.org/changeset/base/347205 Log: Import libxo 1.0.4 Modified: vendor/Juniper/libxo/dist/configure.ac vendor/Juniper/libxo/dist/doc/libxo-manual.html vendor/Juniper/libxo/dist/libxo/libxo.c vendor/Juniper/libxo/dist/libxo/xo_explicit.h vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.out vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.err vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.out vendor/Juniper/libxo/dist/tests/core/test_01.c vendor/Juniper/libxo/dist/tests/core/test_02.c vendor/Juniper/libxo/dist/xo/xo.c Modified: vendor/Juniper/libxo/dist/configure.ac ============================================================================== --- vendor/Juniper/libxo/dist/configure.ac Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/configure.ac Mon May 6 20:15:00 2019 (r347205) @@ -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: vendor/Juniper/libxo/dist/doc/libxo-manual.html ============================================================================== --- vendor/Juniper/libxo/dist/doc/libxo-manual.html Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/doc/libxo-manual.html Mon May 6 20:15:00 2019 (r347205) @@ -22011,7 +22011,7 @@ jQuery(function ($) { -April 2, 2019 +April 24, 2019

libxo: The Easy Way to Generate text, XML, JSON, and HTML output
libxo-manual

Modified: vendor/Juniper/libxo/dist/libxo/libxo.c ============================================================================== --- vendor/Juniper/libxo/dist/libxo/libxo.c Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/libxo/libxo.c Mon May 6 20:15:00 2019 (r347205) @@ -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 @@ -600,7 +600,7 @@ xo_no_setlocale (void) static const char * xo_xml_leader_len (xo_handle_t *xop, const char *name, xo_ssize_t nlen) { - if (isalpha(name[0]) || name[0] == '_') + if (name == NULL || isalpha(name[0]) || name[0] == '_') return ""; xo_failure(xop, "invalid XML tag name: '%.*s'", nlen, name); Modified: vendor/Juniper/libxo/dist/libxo/xo_explicit.h ============================================================================== --- vendor/Juniper/libxo/dist/libxo/xo_explicit.h Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/libxo/xo_explicit.h Mon May 6 20:15:00 2019 (r347205) @@ -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: vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.E.out Mon May 6 20:15:00 2019 (r347205) @@ -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: vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.H.out Mon May 6 20:15:00 2019 (r347205) @@ -1,4 +1,4 @@ -
We are
{emit}
{ting}
some
braces
abcdef +
em0
em0
We are
{emit}
{ting}
some
braces
abcdef
abcdef: Bad file descriptor
improper use of profanity; ten yard penalty; first down
length
abcdef
close
-1
returned
Bad file descriptor
good
close
-1
returned
Bad fi
good
improper use of profanity; ten yard penalty; first down Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.HIPx.out Mon May 6 20:15:00 2019 (r347205) @@ -1,9 +1,11 @@
+
em0
+
em0
We are
{emit}
{ting}
some
-
braces
+
braces
abcdef @@ -19,23 +21,23 @@
length
-
abcdef
+
abcdef
close
-
-1
+
-1
returned
-
Bad file descriptor
+
Bad file descriptor
-
good
+
good
close
-
-1
+
-1
returned
-
Bad fi
+
Bad fi
-
good
+
good
improper use of profanity; ten yard penalty; first down @@ -43,155 +45,155 @@
-
20
+
20
-
30
+
30
-
40
+
40
-
file
+
file
-
0
+
0
bytes
-
1
+
1
byte
-
2
+
2
bytes
-
3
+
3
bytes
-
4
+
4
bytes
-
10
+
10
/
-
20
+
20
/
-
30
+
30
mbufs <&> in use (current/cache/total)
-
50
+
50
from
-
Boston
+
Boston
-
64
+
64
left out of
-
640
+
640
-
64
+
64
left out of
-
640
+
640
beforeworkingafter:
-
string
+
string
:
-
10
-
11
+
10
+
11
-
1010
+
1010
packets here/there/everywhere
-
1010
+
1010
packets here/there/everywhere
(
-
15
+
15
/
-
20
+
20
/
-
125
+
125
)
(
-
15
+
15
/
-
20
+
20
/
-
125
+
125
)
(
-
15
+
15
/
-
20
+
20
/
-
125
+
125
)
(
-
15
+
15
/
-
20
+
20
/
-
125
+
125
)
Humanize:
-
21
+
21
,
-
57 K
+
57 K
,
-
96M
+
96M
,
-
44M
+
44M
,
-
1.2G
+
1.2G
-
one
+
one
-
two
+
two
-
three
+
three
-
(null)
+
(null)
1:
-
1000
+
1000
2:
-
test5000
+
test5000
3:
-
ten-longx
+
ten-longx
4:
-
xtest
+
xtest
this is an error
@@ -208,10 +210,10 @@
V1/V2 packets
:
-
10
+
10
-
0004
+
0004
tries
Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.HP.out Mon May 6 20:15:00 2019 (r347205) @@ -1,4 +1,6 @@
+
em0
+
em0
We are
{emit}
{ting}
Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.J.out Mon May 6 20:15:00 2019 (r347205) @@ -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: vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.JP.out Mon May 6 20:15:00 2019 (r347205) @@ -1,6 +1,10 @@ { "top": { "data": { + "name": "em0", + "flags": "0x8843", + "name": "em0", + "flags": "0x8843", "what": "braces", "length": "abcdef", "fd": -1, Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.err Mon May 6 20:15:00 2019 (r347205) @@ -1 +1,2 @@ +test_02.test: key field emitted after normal value field: 'name' Shut 'er down, Clancey! She's a-pumpin' mud! <>!,"!<> Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.T.out Mon May 6 20:15:00 2019 (r347205) @@ -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: vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.X.out Mon May 6 20:15:00 2019 (r347205) @@ -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 Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.err ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.err Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.err Mon May 6 20:15:00 2019 (r347205) @@ -0,0 +1 @@ +test_02.test: key field emitted after normal value field: 'name' Modified: vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.out ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.out Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/saved/test_02.XP.out Mon May 6 20:15:00 2019 (r347205) @@ -1,5 +1,9 @@ + em0 + 0x8843 + em0 + 0x8843 braces abcdef Modified: vendor/Juniper/libxo/dist/tests/core/test_01.c ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/test_01.c Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/test_01.c Mon May 6 20:15:00 2019 (r347205) @@ -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: vendor/Juniper/libxo/dist/tests/core/test_02.c ============================================================================== --- vendor/Juniper/libxo/dist/tests/core/test_02.c Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/tests/core/test_02.c Mon May 6 20:15:00 2019 (r347205) @@ -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: vendor/Juniper/libxo/dist/xo/xo.c ============================================================================== --- vendor/Juniper/libxo/dist/xo/xo.c Mon May 6 20:01:13 2019 (r347204) +++ vendor/Juniper/libxo/dist/xo/xo.c Mon May 6 20:15:00 2019 (r347205) @@ -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