Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Jul 2017 23:28:14 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 221130] libxo anchor roles don't work as documented
Message-ID:  <bug-221130-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D221130

            Bug ID: 221130
           Summary: libxo anchor roles don't work as documented
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: markj@FreeBSD.org

I'm trying to use libxo anchor roles in a piece of code, but they're not
working as described in xo_format(5):

     To give a width directly, encode it as the content of the anchor tag:

               xo_emit("({[:10}{:min/%d}/{:max/%d}{]:})\n", min, max);

     To pass a width as an argument, use "%d" as the format, which must app=
ear
     after the "/".  Note that only "%d" is supported for widths.  Using any
     other value could ruin your day.

               xo_emit("({[:/%d}{:min/%d}/{:max/%d}{]:})\n", width, min, ma=
x);

However, an attempt to follow this example leads to the width being printed:

$ xo "{[:/%d}{:address/%p}{]:}\n" 18 0xdeadbeef
0x12
$ xo "{[:18}{:address/%p}{]:}\n" 0xdeadbeef
        0xdeadbeef

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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