change argv letter s to i

This commit is contained in:
Alexander Popov 2022-09-13 23:26:02 +03:00
parent 9872fef555
commit 654cc688cf
Signed by: iiiypuk
GPG Key ID: D8C9B59A9F04A70C
2 changed files with 15 additions and 4 deletions

11
HISTORY.md Normal file
View File

@ -0,0 +1,11 @@
## Legend
- 🐛 - Bug
- ✔️ - Fixed
- ❌ - Removed
- - Added
- - Information
- ♻️ - Edited
## ??/09/2022 - (**Current**)
- ✔️ - Fixed bad returned value of `assets_version`
- ♻️ - Changed the letter argument of the program to return version information from `s` to `i`

View File

@ -8,7 +8,7 @@
#include <string.h> #include <string.h>
#include <cjson/cJSON.h> #include <cjson/cJSON.h>
#define VERSION "1.0.0" // software version #define VERSION "1.0.1" // software version
void usage(); void usage();
void info(cJSON *json); void info(cJSON *json);
@ -16,7 +16,7 @@ void generate_library_list(cJSON *input_json, cJSON *output_json, char output_sy
int main(int argc, char const *argv[]) int main(int argc, char const *argv[])
{ {
if (argc < 2 || argc > 3) if (argc <= 2 || argc > 3)
{ {
usage(); usage();
} }
@ -46,7 +46,7 @@ int main(int argc, char const *argv[])
default: default:
usage(); usage();
break; break;
case 's': case 'i':
info(json); info(json);
break; break;
case 'w': case 'w':
@ -80,7 +80,7 @@ void usage()
printf(" %s\n\n", "make-libs-string <version.json> <system>"); printf(" %s\n\n", "make-libs-string <version.json> <system>");
printf(" %s\n\n", "<system> - w|l|x (windows or linux or osx)"); printf(" %s\n\n", "<system> - w|l|x (windows or linux or osx)");
printf("%s\n", "Other:"); printf("%s\n", "Other:");
printf(" %s\n", "make-libs-string <version.json> s - to get info"); printf(" %s\n", "make-libs-string <version.json> i - to get version info");
} }
void info(cJSON *json) void info(cJSON *json)