From ae38997abed787ec8cc1706cb80fd3bc3a708710 Mon Sep 17 00:00:00 2001 From: Diomidis Spinellis Date: Wed, 28 Aug 2024 16:07:44 +0300 Subject: [PATCH] Document -M invocation --- man/cscout.1 | 9 ++++++++- src/cscout.cpp | 15 +++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/man/cscout.1 b/man/cscout.1 index de3545e5..034437c3 100644 --- a/man/cscout.1 +++ b/man/cscout.1 @@ -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 @@ -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" diff --git a/src/cscout.cpp b/src/cscout.cpp index 6b4e3fd2..17ccc1a7 100644 --- a/src/cscout.cpp +++ b/src/cscout.cpp @@ -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] " @@ -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" @@ -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]);