Skip to content

Commit

Permalink
Document -M invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
dspinellis committed Aug 28, 2024
1 parent aef84e6 commit ae38997
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
9 changes: 8 additions & 1 deletion man/cscout.1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cscout \- C code analyzer and refactoring browser
[\fB\-R\fP \fIspecification\fP]
[\fB\-m\fP \fIspecification\fP]
[\fB\-t\fP \fIsname\fP]
[\fB\-o\fP | \fB\-S\fP \fIdb\fP | \fB\-s\fP \fIdb\fP]
[\fB\-o\fP | \fB\-S\fP \fIdb\fP | \fB\-s\fP \fIdb\fP | \fB\-M\fP \fIfiles\fP]
\fIfile\fR
.SH DESCRIPTION
\fICScout\fP is a source code analyzer and refactoring browser for collections
Expand Down Expand Up @@ -214,6 +214,13 @@ supported database back-ends.
Dump the workspace contents as an SQL script.
Specify \fIhelp\fP as the database dialect to obtain a list of
supported database back-ends.
.IP "\fB\-M\fP \fIfiles\fP"
Merge the specified
\fIeclasses\fP, \fIids\fP, and \fIfunctionids\fP files that contain
token, id, and functionid, details into new records
saved in three further corresponding files.
These can be directly imported into the \fItokens\fP,
\fIids\fP, and \fIfunctionids\fP tables.
.IP "\fB\-l\fP \fIlog file\fP"
Specify the location of a file where web requests will be logged.
.IP "\fB\-R\fP \fIspecification\fP"
Expand Down
15 changes: 9 additions & 6 deletions src/cscout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3276,7 +3276,7 @@ usage(char *fname)
#ifndef WIN32
"-b|" // browse-only
#endif
"-C|-c|-d D|-d H|-E RE|-o|"
"-C|-c|-d D|-d H|-E RE|-o|-M files|"
"-R URL|-r|-S db|-s db|-v] "
"[-l file] "

Expand All @@ -3299,6 +3299,7 @@ usage(char *fname)
"\t-E RE\tOutput preprocessed results and exit\n"
"\t\t(Will process file(s) matched by the regular expression)\n"
"\t-l file\tSpecify access log file\n"
"\t-M files\tMerge specified EC files\n"
"\t-m spec\tSpecify identifiers to monitor (unsound)\n"
"\t-o\tCreate obfuscated versions of the processed files\n"
"\t-P RE\tProcess only file(s) matched by the regular expression\n"
Expand Down Expand Up @@ -3343,11 +3344,13 @@ merge_tokens(char **argv)
// Skip over cscout -M
argv += 2;

// Example invocation:
// cscout -M eclasses-5.txt ids-5.txt functionids-5.txt \
// 0 1 2
// new-eclasses-5.csv new-ids-5.csv new-functioids-5.csv
// 3 4 5
/*
* Example invocation:
* cscout -M eclasses-5.txt ids-5.txt functionids-5.txt \
* 0 1 2
* new-eclasses-5.csv new-ids-5.csv new-functioids-5.csv
* 3 4 5
*/
Dbtoken::read_eclasses(argv[0]);
Dbtoken::write_eclasses(argv[3]);
Dbtoken::read_ids(argv[1]);
Expand Down

0 comments on commit ae38997

Please sign in to comment.