Fix Red confirm_delete, CHECKWPS & DBTOOL

Change-Id: I2f375def92e4c3c4b6be9d0494de682e6d3ebd2d
This commit is contained in:
William Wilgus 2022-11-24 23:44:35 -05:00
parent 71934d4c16
commit 853d70e938

View file

@ -1133,15 +1133,6 @@ int read_line(int fd, char* buffer, int buffer_size)
return rdbufend >= 0 ? num_read : -1;
}
int confirm_delete_yesno(const char *name)
{
const char *lines[] = { ID2P(LANG_REALLY_DELETE), name };
const char *yes_lines[] = { ID2P(LANG_DELETING), name };
const struct text_message message = { lines, 2 };
const struct text_message yes_message = { yes_lines, 2 };
return gui_syncyesno_run(&message, &yes_message, NULL);
}
char* skip_whitespace(char* const str)
{
char *s = str;
@ -1153,6 +1144,16 @@ char* skip_whitespace(char* const str)
}
#if !defined(CHECKWPS) && !defined(DBTOOL)
int confirm_delete_yesno(const char *name)
{
const char *lines[] = { ID2P(LANG_REALLY_DELETE), name };
const char *yes_lines[] = { ID2P(LANG_DELETING), name };
const struct text_message message = { lines, 2 };
const struct text_message yes_message = { yes_lines, 2 };
return gui_syncyesno_run(&message, &yes_message, NULL);
}
/* time_split_units()
split time values depending on base unit
unit_idx: UNIT_HOUR, UNIT_MIN, UNIT_SEC, UNIT_MS