Skip to content

Commit 0628848

Browse files
committed
Improved help message text.
1 parent 64745a1 commit 0628848

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/maincli.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,20 @@
66
#include "codegen/c-main-generator.h"
77
#include "codegen/c-util-generator.h"
88
#include "codegen/fs-creator.h"
9+
#include "codegen/version.h"
910

1011
#define GEN_UTIL_CODE
1112

13+
char verstr[128] = {0};
14+
1215
const char* helptext =
13-
"welcome to dbccoder v1.1.\n\n"
14-
"author: Andrey Astakhov (https://github.com/astand)\n\n"
15-
"to use utility you need to provide 3 arguments:\n\n"
16+
"https://github.com/astand/c-coderdbc (project source code)\n\n"
17+
"https://coderdbc.com (web application)\n\n"
18+
"To use utility you need to provide 3 arguments:\n\n"
1619
"1. dbc file path\n"
17-
"2. directory for generated source codegen\n"
18-
"3. prefix (driver name) which will be used in driver elements naming\n\n"
19-
"Example: ./dbccoder /home/user/docs/driveshaft.dbc /home/user/docs/gen/ drivedb\n\n";
20+
"2. directory for generated source files (existable)\n"
21+
"3. prefix (driver name) which will be used for naming dirver parts\n\n"
22+
"Usage example:\n\n./dbccoder /home/user/docs/driveshaft.dbc /home/user/docs/gen/ drivedb\n\n";
2023

2124
DbcScanner* scanner;
2225
CiMainGenerator* cigen;
@@ -34,6 +37,9 @@ int main(int argc, char* argv[])
3437
ciugen = new CiUtilGenerator;
3538
fscreator = new FsCreator;
3639

40+
std::snprintf(verstr, 128, "\nDbccoder v%u.%u\n\n", CODEGEN_LIB_VERSION_MAJ, CODEGEN_LIB_VERSION_MIN);
41+
std::cout << verstr;
42+
3743
if (argc == 4)
3844
{
3945
std::ifstream reader;

0 commit comments

Comments
 (0)