File tree Expand file tree Collapse file tree 3 files changed +17
-16
lines changed Expand file tree Collapse file tree 3 files changed +17
-16
lines changed Original file line number Diff line number Diff line change 1
1
#include <stdio.h>
2
2
3
- void print_err_info () {
4
- printf ("Use spynix -h to display all valid options\n" );
5
- }
6
-
7
- void print_hlp_info () {
3
+ void print_banner () {
8
4
printf ("\n \
9
5
____ _\n \
10
6
/ ___| _ __ _ _ _ __ (_)_ __\n \
11
7
\\___ \\| '_ \\| | | | '_ \\| \\ \\/ /\n \
12
8
___) | |_) | |_| | | | | |> <\n \
13
9
|____/| .__/ \\__, |_| |_|_/_/\\_\\\n \
14
- |_| |___/\n\n \
10
+ |_| |___/\n\n" );
11
+ }
12
+
13
+ void print_err_info () {
14
+ printf ("Use spynix -h or spynix --help to display all valid options\n" );
15
+ }
16
+
17
+ void print_hlp_info () {
18
+ print_banner ();
19
+ printf ("Spynix is a commandline tool for gathering info about hardware.\n\n \
15
20
Info:\n\t \
16
21
-h or --help - show this menu\n\t \
17
- -v or --version - show version\n\n \
22
+ -v or --version - show version\n\t \
23
+ -b or --banner - show ASCII banner\n\n \
18
24
Options:\n\t \
19
25
-a or --all - show summary info about system, cpu, ram and rom\n\t \
20
26
-sys - show system info\n\t \
@@ -26,13 +32,6 @@ void print_hlp_info() {
26
32
}
27
33
28
34
void print_ver_info () {
29
- printf ("\n \
30
- ____ _\n \
31
- / ___| _ __ _ _ _ __ (_)_ __\n \
32
- \\___ \\| '_ \\| | | | '_ \\| \\ \\/ /\n \
33
- ___) | |_) | |_| | | | | |> <\n \
34
- |____/| .__/ \\__, |_| |_|_/_/\\_\\\n \
35
- |_| |___/\n\n \
36
- spynix v2.0.0\n\n \
37
- For more info visit: https://github.com/git-user-cpp/spynix\n" );
35
+ print_banner ();
36
+ printf ("spynix v2.0.0\n\nFor more info visit: https://github.com/git-user-cpp/spynix\n" );
38
37
}
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ int main(int argc, char **argv) {
29
29
print_rom_info ();
30
30
} else if (strcmp (argv [1 ], "-v" ) == 0 || strcmp (argv [1 ], "--version" ) == 0 ) {
31
31
print_ver_info ();
32
+ } else if (strcmp (argv [1 ], "-b" ) == 0 || strcmp (argv [1 ], "--banner" ) == 0 ) {
33
+ print_banner ();
32
34
} else {
33
35
print_err_info ();
34
36
}
You can’t perform that action at this time.
0 commit comments