mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
A typo fix.
Parameter list reorder
This commit is contained in:
parent
7bf5456c8c
commit
3cf7bd04c7
@ -26,10 +26,10 @@ const char* next_param(int curr, char** argv, int argc) {
|
|||||||
void help(void) {
|
void help(void) {
|
||||||
puts("Usage: capone [OPTIONS] [FILE]\n");
|
puts("Usage: capone [OPTIONS] [FILE]\n");
|
||||||
puts("Options:");
|
puts("Options:");
|
||||||
puts(" -h, --help Show this help");
|
puts(" -h, --help Show this help");
|
||||||
puts(" -v, --version Show version");
|
puts(" -v, --version Show version");
|
||||||
puts(" -d, --lib-dir [dir] Directory with startup libraries");
|
puts(" -d, --lib-dir [dir] Directory with startup libraries");
|
||||||
puts(" -e, --eval [str] Evaluate given expression\n");
|
puts(" -e, --eval [str] Evaluate given expression\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void do_file_or_expr(FILE* f, const char* expr, const char* dir) {
|
void do_file_or_expr(FILE* f, const char* expr, const char* dir) {
|
||||||
@ -97,7 +97,7 @@ int main(int argc, char** argv) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
} else if(CHECK_ARGV(a, "-e", "--expr")) {
|
} else if(CHECK_ARGV(a, "-e", "--eval")) {
|
||||||
expr = next_param(i, argv, argc);
|
expr = next_param(i, argv, argc);
|
||||||
if(!expr) {
|
if(!expr) {
|
||||||
puts("Missing expression");
|
puts("Missing expression");
|
||||||
@ -114,9 +114,9 @@ int main(int argc, char** argv) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(expr)
|
if(expr) {
|
||||||
do_file_or_expr(NULL, expr, l);
|
do_file_or_expr(NULL, expr, l);
|
||||||
else if(filename) {
|
} else if(filename) {
|
||||||
FILE* f = fopen(filename, "r");
|
FILE* f = fopen(filename, "r");
|
||||||
if(!f) {
|
if(!f) {
|
||||||
printf("Unable to open '%s'!\n", filename);
|
printf("Unable to open '%s'!\n", filename);
|
||||||
|
Loading…
Reference in New Issue
Block a user