diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/calendar.c | 4 | ||||
-rw-r--r-- | apps/plugins/keybox.c | 12 | ||||
-rw-r--r-- | apps/plugins/rockboy/menu.c | 2 | ||||
-rw-r--r-- | apps/plugins/text_editor.c | 3 |
4 files changed, 10 insertions, 11 deletions
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c index e00afe19b6..cfb92909bf 100644 --- a/apps/plugins/calendar.c +++ b/apps/plugins/calendar.c | |||
@@ -568,7 +568,7 @@ static void add_memo(struct shown *shown, int type) | |||
568 | { | 568 | { |
569 | bool saved = false; | 569 | bool saved = false; |
570 | if (rb->kbd_input(memos[memos_in_memory].message, | 570 | if (rb->kbd_input(memos[memos_in_memory].message, |
571 | sizeof memos[memos_in_memory].message) != -1) | 571 | sizeof memos[memos_in_memory].message) == 0) |
572 | { | 572 | { |
573 | if (rb->strlen(memos[memos_in_memory].message)) | 573 | if (rb->strlen(memos[memos_in_memory].message)) |
574 | { | 574 | { |
@@ -634,7 +634,7 @@ static bool edit_memo(int change, struct shown *shown) | |||
634 | 634 | ||
635 | case 1: /* edit */ | 635 | case 1: /* edit */ |
636 | if(rb->kbd_input(memos[pointer_array[change]].message, | 636 | if(rb->kbd_input(memos[pointer_array[change]].message, |
637 | sizeof memos[pointer_array[change]].message) != -1) | 637 | sizeof memos[pointer_array[change]].message) == 0) |
638 | save_memo(pointer_array[change],true,shown); | 638 | save_memo(pointer_array[change],true,shown); |
639 | return false; | 639 | return false; |
640 | 640 | ||
diff --git a/apps/plugins/keybox.c b/apps/plugins/keybox.c index 6c59470fa4..733c6e95cd 100644 --- a/apps/plugins/keybox.c +++ b/apps/plugins/keybox.c | |||
@@ -190,12 +190,12 @@ static void add_entry(int selected_item) | |||
190 | 190 | ||
191 | rb->splash(HZ, "Enter title"); | 191 | rb->splash(HZ, "Enter title"); |
192 | pw_list.entries[i].title[0] = '\0'; | 192 | pw_list.entries[i].title[0] = '\0'; |
193 | if (rb->kbd_input(pw_list.entries[i].title, FIELD_LEN)) | 193 | if (rb->kbd_input(pw_list.entries[i].title, FIELD_LEN) < 0) |
194 | return; | 194 | return; |
195 | 195 | ||
196 | rb->splash(HZ, "Enter name"); | 196 | rb->splash(HZ, "Enter name"); |
197 | pw_list.entries[i].name[0] = '\0'; | 197 | pw_list.entries[i].name[0] = '\0'; |
198 | if (rb->kbd_input(pw_list.entries[i].name, FIELD_LEN)) | 198 | if (rb->kbd_input(pw_list.entries[i].name, FIELD_LEN) < 0) |
199 | { | 199 | { |
200 | pw_list.entries[i].title[0] = '\0'; | 200 | pw_list.entries[i].title[0] = '\0'; |
201 | return; | 201 | return; |
@@ -203,7 +203,7 @@ static void add_entry(int selected_item) | |||
203 | 203 | ||
204 | rb->splash(HZ, "Enter password"); | 204 | rb->splash(HZ, "Enter password"); |
205 | pw_list.entries[i].password[0] = '\0'; | 205 | pw_list.entries[i].password[0] = '\0'; |
206 | if (rb->kbd_input(pw_list.entries[i].password, FIELD_LEN)) | 206 | if (rb->kbd_input(pw_list.entries[i].password, FIELD_LEN) < 0) |
207 | { | 207 | { |
208 | pw_list.entries[i].title[0] = '\0'; | 208 | pw_list.entries[i].title[0] = '\0'; |
209 | pw_list.entries[i].name[0] = '\0'; | 209 | pw_list.entries[i].name[0] = '\0'; |
@@ -508,11 +508,11 @@ static int enter_pw(char *pw_buf, size_t buflen, bool new_pw) | |||
508 | if (new_pw) | 508 | if (new_pw) |
509 | { | 509 | { |
510 | rb->splash(HZ, "Enter new master password"); | 510 | rb->splash(HZ, "Enter new master password"); |
511 | if (rb->kbd_input(buf[0], sizeof(buf[0]))) | 511 | if (rb->kbd_input(buf[0], sizeof(buf[0])) < 0) |
512 | return -1; | 512 | return -1; |
513 | 513 | ||
514 | rb->splash(HZ, "Confirm master password"); | 514 | rb->splash(HZ, "Confirm master password"); |
515 | if (rb->kbd_input(buf[1], sizeof(buf[1]))) | 515 | if (rb->kbd_input(buf[1], sizeof(buf[1])) < 0) |
516 | return -1; | 516 | return -1; |
517 | 517 | ||
518 | if (rb->strcmp(buf[0], buf[1])) | 518 | if (rb->strcmp(buf[0], buf[1])) |
@@ -529,7 +529,7 @@ static int enter_pw(char *pw_buf, size_t buflen, bool new_pw) | |||
529 | } | 529 | } |
530 | 530 | ||
531 | rb->splash(HZ, "Enter master password"); | 531 | rb->splash(HZ, "Enter master password"); |
532 | if (rb->kbd_input(pw_buf, buflen)) | 532 | if (rb->kbd_input(pw_buf, buflen) < 0) |
533 | return -1; | 533 | return -1; |
534 | hash_pw(&pwhash); | 534 | hash_pw(&pwhash); |
535 | return 0; | 535 | return 0; |
diff --git a/apps/plugins/rockboy/menu.c b/apps/plugins/rockboy/menu.c index 0978da0b09..290cac98de 100644 --- a/apps/plugins/rockboy/menu.c +++ b/apps/plugins/rockboy/menu.c | |||
@@ -227,7 +227,7 @@ static bool do_slot(size_t slot_id, bool is_load) { | |||
227 | 227 | ||
228 | /* if we're saving to a slot, then get a brief description */ | 228 | /* if we're saving to a slot, then get a brief description */ |
229 | if (!is_load) | 229 | if (!is_load) |
230 | if (rb->kbd_input(desc_buf, 20) || !strlen(desc_buf)) | 230 | if (rb->kbd_input(desc_buf, 20) || !strlen(desc_buf) < 0) |
231 | { | 231 | { |
232 | strlcpy(desc_buf, "Untitled", 20); | 232 | strlcpy(desc_buf, "Untitled", 20); |
233 | } | 233 | } |
diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index 06dc098501..473bb68ead 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c | |||
@@ -182,10 +182,9 @@ bool save_changes(int overwrite) | |||
182 | 182 | ||
183 | if (newfile || !overwrite) | 183 | if (newfile || !overwrite) |
184 | { | 184 | { |
185 | if(rb->kbd_input(filename,MAX_PATH)) | 185 | if(rb->kbd_input(filename,MAX_PATH) < 0) |
186 | { | 186 | { |
187 | newfile = true; | 187 | newfile = true; |
188 | rb->splash(HZ, "Cancelled"); | ||
189 | return false; | 188 | return false; |
190 | } | 189 | } |
191 | } | 190 | } |