Fix merge conflicts

This commit is contained in:
Marek Kraus 2022-09-12 13:16:23 +02:00
commit 8bb1a6306f
2 changed files with 14 additions and 3 deletions

View File

@ -14,7 +14,7 @@ cmd_write_args_init() {
cmd_write_argtable[0] = cmd
= arg_rex1(NULL, NULL, "write", NULL, REG_ICASE, NULL);
cmd_write_argtable[1] = binary_to_write
= arg_file0(NULL, NULL, "<input>", "Binary to write");
= arg_file1(NULL, NULL, "<input>", "Binary to write");
cmd_write_argtable[2] = end = arg_end(10);
if (arg_nullcheck(cmd_write_argtable) != 0) {
@ -24,12 +24,22 @@ cmd_write_args_init() {
return 0;
}
void cmd_write_args_print_glossary() {
fputs("Usage: blisp", stdout);
arg_print_syntax(stdout,cmd_write_argtable,"\n");
puts("Writes firmware to SPI Flash");
arg_print_glossary(stdout,cmd_write_argtable," %-25s %s\n");
}
uint8_t
cmd_write_parse_exec(int argc, char** argv) {
int errors = arg_parse(argc, argv, cmd_write_argtable);
if (errors == 0) {
printf("yeet\n");
return 1;
} else if (cmd->count == 1) {
cmd_write_args_print_glossary();
return 1;
}
return 0;
}

View File

@ -24,16 +24,17 @@ int8_t args_init() {
fprintf(stderr, "insufficient memory\n");
return -1;
}
return 0;
}
void print_help() {
puts("Usage:");
for (uint8_t i = 0; i < cmds_count; i++) {
fputs("\tblisp", stdout);
fputs(" blisp", stdout);
cmds[i]->args_print_syntax();
}
fputs("\tblisp", stdout);
fputs(" blisp", stdout);
arg_print_syntax(stdout, argtable,"\n");
}