Mercurial > projects > pwm
comparison pwm.h @ 16:a07665727c19
Add status command
Add status command to redisplay an error message of the previous command and
unsaved changes.
Add pwm_err function to display and save error messages.
author | Guido Berhoerster <guido+pwm@berhoerster.name> |
---|---|
date | Tue, 08 Aug 2017 10:47:04 +0200 |
parents | cf81eb0c2d5a |
children | 1e39a251cbe9 |
comparison
equal
deleted
inserted
replaced
15:3380c8fd9776 | 16:a07665727c19 |
---|---|
26 | 26 |
27 #include <pws.h> | 27 #include <pws.h> |
28 | 28 |
29 struct pwm_ctx { | 29 struct pwm_ctx { |
30 const char *prev_cmd; | 30 const char *prev_cmd; |
31 char *errmsg; | |
31 char *filename; | 32 char *filename; |
32 struct pws3_file *file; | 33 struct pws3_file *file; |
33 struct record_id_tree *record_id_tree; | 34 struct record_id_tree *record_id_tree; |
34 int unsaved_changes; | 35 int unsaved_changes; |
35 unsigned int next_id; | 36 unsigned int next_id; |
36 char password[PWS3_MAX_PASSWORD_LEN + 1]; | 37 char password[PWS3_MAX_PASSWORD_LEN + 1]; |
37 }; | 38 }; |
38 | 39 |
40 void pwm_err(struct pwm_ctx *, char *, ...); | |
41 | |
39 #endif /* PWM_H */ | 42 #endif /* PWM_H */ |