diff --git a/asm-savers.h b/asm-savers.h index e4adf4c..701d60e 100644 --- a/asm-savers.h +++ b/asm-savers.h @@ -199,6 +199,22 @@ typedef struct { word_t* memory_size; } ntsys_argument_parser_t; +#include + +int __regist_ignore_strcmp(char* str1, char* str2) { + size_t t = strlen(str1); + size_t l2_len = strlen(str2); + size_t i = 0; + while (i < t) { + char i1 = toupper(str1[i]); + char i2 = toupper(i > l2_len ? '\0' : str2[i]); + if (i1 > i2) return 1; + if (i1 < i2) return -1; + i ++; + } + return 0; +} + static void __input_datatype(ntsys_argument_parser_t* parser, byte_t* mode) { ntsys_exit_if_error(parser) { ntsys_error("Cannot find argument!"); @@ -391,7 +407,7 @@ static int select_argument(ntsys_argument_parser_t* parser) { } strncpy(buf, table[i], t); buf[t] = '\0'; - if (strcmp(str, buf) == 0) { + if (__regist_ignore_strcmp(str, buf) == 0) { char* se = &table[i][t + 1]; while (strlen(se) > 1) { char is[3]; diff --git a/ntsys b/ntsys index 6c2aa22..4e214ff 100755 Binary files a/ntsys and b/ntsys differ