diff options
Diffstat (limited to 'src/lib/libcrypto/ui/ui_locl.h')
| -rw-r--r-- | src/lib/libcrypto/ui/ui_locl.h | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/lib/libcrypto/ui/ui_locl.h b/src/lib/libcrypto/ui/ui_locl.h index 39789e2638..d6c4e26192 100644 --- a/src/lib/libcrypto/ui/ui_locl.h +++ b/src/lib/libcrypto/ui/ui_locl.h | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | * are met: | 10 | * are met: |
| 11 | * | 11 | * |
| 12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright |
| 13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. |
| 14 | * | 14 | * |
| 15 | * 2. Redistributions in binary form must reproduce the above copyright | 15 | * 2. Redistributions in binary form must reproduce the above copyright |
| 16 | * notice, this list of conditions and the following disclaimer in | 16 | * notice, this list of conditions and the following disclaimer in |
| @@ -66,8 +66,7 @@ | |||
| 66 | #undef _ | 66 | #undef _ |
| 67 | #endif | 67 | #endif |
| 68 | 68 | ||
| 69 | struct ui_method_st | 69 | struct ui_method_st { |
| 70 | { | ||
| 71 | char *name; | 70 | char *name; |
| 72 | 71 | ||
| 73 | /* All the functions return 1 or non-NULL for success and 0 or NULL | 72 | /* All the functions return 1 or non-NULL for success and 0 or NULL |
| @@ -96,11 +95,10 @@ struct ui_method_st | |||
| 96 | The returned string shall always be allocated on the heap with | 95 | The returned string shall always be allocated on the heap with |
| 97 | malloc(), and need to be free'd with free(). */ | 96 | malloc(), and need to be free'd with free(). */ |
| 98 | char *(*ui_construct_prompt)(UI *ui, const char *object_desc, | 97 | char *(*ui_construct_prompt)(UI *ui, const char *object_desc, |
| 99 | const char *object_name); | 98 | const char *object_name); |
| 100 | }; | 99 | }; |
| 101 | 100 | ||
| 102 | struct ui_string_st | 101 | struct ui_string_st { |
| 103 | { | ||
| 104 | enum UI_string_types type; /* Input */ | 102 | enum UI_string_types type; /* Input */ |
| 105 | const char *out_string; /* Input */ | 103 | const char *out_string; /* Input */ |
| 106 | int input_flags; /* Flags from the user */ | 104 | int input_flags; /* Flags from the user */ |
| @@ -111,10 +109,8 @@ struct ui_string_st | |||
| 111 | with size in result_maxsize. Otherwise, it | 109 | with size in result_maxsize. Otherwise, it |
| 112 | may be allocated by the UI routine, meaning | 110 | may be allocated by the UI routine, meaning |
| 113 | result_minsize is going to be overwritten.*/ | 111 | result_minsize is going to be overwritten.*/ |
| 114 | union | 112 | union { |
| 115 | { | 113 | struct { |
| 116 | struct | ||
| 117 | { | ||
| 118 | int result_minsize; /* Input: minimum required | 114 | int result_minsize; /* Input: minimum required |
| 119 | size of the result. | 115 | size of the result. |
| 120 | */ | 116 | */ |
| @@ -123,21 +119,19 @@ struct ui_string_st | |||
| 123 | 119 | ||
| 124 | const char *test_buf; /* Input: test string to verify | 120 | const char *test_buf; /* Input: test string to verify |
| 125 | against */ | 121 | against */ |
| 126 | } string_data; | 122 | } string_data; |
| 127 | struct | 123 | struct { |
| 128 | { | ||
| 129 | const char *action_desc; /* Input */ | 124 | const char *action_desc; /* Input */ |
| 130 | const char *ok_chars; /* Input */ | 125 | const char *ok_chars; /* Input */ |
| 131 | const char *cancel_chars; /* Input */ | 126 | const char *cancel_chars; /* Input */ |
| 132 | } boolean_data; | 127 | } boolean_data; |
| 133 | } _; | 128 | } _; |
| 134 | 129 | ||
| 135 | #define OUT_STRING_FREEABLE 0x01 | 130 | #define OUT_STRING_FREEABLE 0x01 |
| 136 | int flags; /* flags for internal use */ | 131 | int flags; /* flags for internal use */ |
| 137 | }; | 132 | }; |
| 138 | 133 | ||
| 139 | struct ui_st | 134 | struct ui_st { |
| 140 | { | ||
| 141 | const UI_METHOD *meth; | 135 | const UI_METHOD *meth; |
| 142 | STACK_OF(UI_STRING) *strings; /* We might want to prompt for more | 136 | STACK_OF(UI_STRING) *strings; /* We might want to prompt for more |
| 143 | than one thing at a time, and | 137 | than one thing at a time, and |
| @@ -148,6 +142,6 @@ struct ui_st | |||
| 148 | #define UI_FLAG_REDOABLE 0x0001 | 142 | #define UI_FLAG_REDOABLE 0x0001 |
| 149 | #define UI_FLAG_PRINT_ERRORS 0x0100 | 143 | #define UI_FLAG_PRINT_ERRORS 0x0100 |
| 150 | int flags; | 144 | int flags; |
| 151 | }; | 145 | }; |
| 152 | 146 | ||
| 153 | #endif | 147 | #endif |
