util  Check-in [4af59f8377]

Overview
Comment:fix usage error
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4af59f83775d208a96ce58de62bfe9a8c6edd340862d5ee29d79a13c70829ffb
User & Date: lexi on 2019-07-19 20:50:31
Other Links: manifest | tags
Context
2019-07-20
18:12
fixes check-in: 00358989c7 user: lexi tags: trunk
2019-07-19
20:50
fix usage error check-in: 4af59f8377 user: lexi tags: trunk
12:07
fxi ubgs check-in: 8ce91f9627 user: lexi tags: trunk
Changes

Modified ord.c from [c509ad7fa4] to [c1a75e9d61].

   268    268   #	endif
   269    269   #	define OR "\x1b[34m|\x1b[93m" 
   270    270   #	define plus "\x1b[94m+\x1b[m"
   271    271   #	define par(s) "<\x1b[4m" s "\x1b[24m>"
   272    272   #	define lit(l) "\x1b[3m" l "\x1b[23m"
   273    273   #	define box(s) "\x1b[94m[\x1b[93m" s "\x1b[94m]\x1b[m"
   274    274   		const pstr forms[] = {
   275         -			p(box(box("options") " " par("in:spec")) " " par("value:int") plus " "
          275  +			p(box("options") " " box(par("in:spec")) " " par("value:int") plus " "
   276    276   					box(lit("to") " " box(par("out:spec")))),
   277         -			p(box(box("options") " " par("in:spec")) " " box(lit("to") " " box(par("out:spec")))
          277  +			p(box("options") " " box(par("in:spec")) " " box(lit("to") " " box(par("out:spec")))
   278    278   					" " lit("--") " " par("value:int") plus),
   279    279   		}, specs[] = {
   280    280   			p(box(lit("bin") OR lit("tern") OR lit("oct")
   281    281   					OR lit("dec") OR lit("hex") OR
   282    282   					lit("base") " " box("0-9") plus OR "asc")),
   283    283   		}, ints[] = {
   284    284   			p("default base: \x1b[94m.+\x1b[m"),
................................................................................
   292    292   			p("-m --manual-prefix: specify a manual prefix to print before each number"),
   293    293   			p("-l --lowercase    : prefer lowercase for case-insensitive bases"),
   294    294   		};
   295    295   #	undef p
   296    296   #	undef OR
   297    297   #	undef plus
   298    298   
   299         -#	define hl_on  "\x1b[1m" 
   300         -#	define hl_off "\x1b[21m"
          299  +#	define hl_on  "\x1b[;1m" 
          300  +#	define hl_off "\x1b[m"
   301    301   	enum { ansilen = sizeof (hl_on hl_off) };
   302    302   #	define hl(x) (hl_on x hl_off)
   303    303   		const char form_head []= hl("usage: ");
   304    304   		const char spec_head []= hl("- spec: ");
   305    305   		const char int_head  []= hl("- int: ");
   306    306   		const char opt_head  []= hl("- options: ");
   307    307   		const char space     []=    "           "; /* sigh */