Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Get rid of '-' nonsense.

It doesn't work well with getopt anyway, and apparently causes utf8
errors on Windows. Reading from stdin is achieved by omitting the
inputfile anyway.
  • Loading branch information...
commit ecdea852852631ea05ce0026b749e15167d0b8d8 1 parent 7c00396
H. S. Teoh quickfur authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 ddemangle.d
6 ddemangle.d
@@ -18,10 +18,10 @@ import std.c.stdlib;
18 18 void showhelp(string[] args)
19 19 {
20 20 stderr.writef(q"ENDHELP
21   -Usage: %s [options] <inputfile>
  21 +Usage: %s [options] [<inputfile>]
22 22 Demangles all occurrences of mangled D symbols in the input and writes to
23 23 standard output.
24   -If <inputfile> is a single dash '-', standard input is read.
  24 +If <inputfile> is omitted, standard input is read.
25 25 Options:
26 26 --help, -h Show this help
27 27 ENDHELP", args[0]);
@@ -49,7 +49,7 @@ void main(string[] args)
49 49 // Process input
50 50 try
51 51 {
52   - auto f = (args.length==2 && args[1]!="-") ? File(args[1], "r") : stdin;
  52 + auto f = (args.length==2) ? File(args[1], "r") : stdin;
53 53 auto r = regex(r"\b(_D[0-9a-zA-Z_]+)\b", "g");
54 54
55 55 foreach (line; stdin.byLine())

0 comments on commit ecdea85

Please sign in to comment.
Something went wrong with that request. Please try again.