File: usage.cc

package info (click to toggle)
oxref 2.02.00-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 692 kB
  • sloc: cpp: 1,282; makefile: 131; sh: 48
file content (58 lines) | stat: -rw-r--r-- 2,694 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//                     usage.cc

#include "main.ih"

namespace {

char const usageText[] = R"(
Where:
   [options] - optional arguments (short options between parentheses):

      --arg (-a) ...
              count - display function argument counts only
              first - only display the first word of the parameter types
              <len> - restrict parameter types to the first <len> characters
      --called-by (-c) regex  - display (recursively) the function(s) calling 
                                the function specified at 'regex'.
      --full-symbol (-f)      - display the full symbol names (e.g.,
                                including class name prefixes)
      --help (-h)             - provide this help
      --no-xref (-X)          - don't generate the cross-reference listing
      --objdump command       - the command calling the object dump program
                                (see the man-page for details)
      --object-files (-o)     - display the object file names
      --replace (-R) spec     - spec is XfirstXsecondX. 'first' found in 
                                objdump's output is replaced by 'second'; X is
                                a unique separator character.
                                (multiple -R options may be specified)
      --replace-file (-r) fname - fname contains 'spec' replacement
                                specifications as used with the --replace
                                options (empty lines and lines beginning with
                                // are skipped)  
      --select name           - only display the cross-reference of `name',
                                where `name' is the (initial substring of an)
                                entity's name.
      --select-pattern regex  - only display the cross-reference of `regex',
                                where `regex' is a regular expression
                                against which (full) symbols are matched
      --source-files (-s)     - display the source file names
      --tree (-t) symbol      - display the call-tree for symbol
      --xref-source-files (-x)- display the source file names in the 
                                cross-reference lists
      --version (-v)          - show version information and terminate

   args   - non-stripped .o or libraries whose symbols must be
            cross-referenced.

)";

}   // namespace
void usage(std::string const &progname)
{
    cout << '\n' <<
    progname << " by " << Icmbuild::author << '\n' <<
    progname << " V " << Icmbuild::version << " " << Icmbuild::years << "\n"
    "\n"
    "Usage: " << progname << " [options] args" <<
    usageText;
}