Lines Matching refs:uis
52 static void free_string(UI_STRING *uis)
54 if (uis->flags & OUT_STRING_FREEABLE) {
55 OPENSSL_free((char *)uis->out_string);
56 switch (uis->type) {
58 OPENSSL_free((char *)uis->_.boolean_data.action_desc);
59 OPENSSL_free((char *)uis->_.boolean_data.ok_chars);
60 OPENSSL_free((char *)uis->_.boolean_data.cancel_chars);
70 OPENSSL_free(uis);
459 UI_STRING uis;
461 memset(&uis, 0, sizeof(uis));
462 uis.type = UIT_ERROR;
463 uis.out_string = str;
466 && ui->meth->ui_write_string(ui, &uis) <= 0)
641 int (*writer) (UI *ui, UI_STRING *uis))
660 int (*reader) (UI *ui, UI_STRING *uis))
769 enum UI_string_types UI_get_string_type(UI_STRING *uis)
771 return uis->type;
774 int UI_get_input_flags(UI_STRING *uis)
776 return uis->input_flags;
779 const char *UI_get0_output_string(UI_STRING *uis)
781 return uis->out_string;
784 const char *UI_get0_action_string(UI_STRING *uis)
786 switch (uis->type) {
788 return uis->_.boolean_data.action_desc;
799 const char *UI_get0_result_string(UI_STRING *uis)
801 switch (uis->type) {
804 return uis->result_buf;
814 int UI_get_result_string_length(UI_STRING *uis)
816 switch (uis->type) {
819 return uis->result_len;
829 const char *UI_get0_test_string(UI_STRING *uis)
831 switch (uis->type) {
833 return uis->_.string_data.test_buf;
844 int UI_get_result_minsize(UI_STRING *uis)
846 switch (uis->type) {
849 return uis->_.string_data.result_minsize;
859 int UI_get_result_maxsize(UI_STRING *uis)
861 switch (uis->type) {
864 return uis->_.string_data.result_maxsize;
874 int UI_set_result(UI *ui, UI_STRING *uis, const char *result)
876 return UI_set_result_ex(ui, uis, result, strlen(result));
879 int UI_set_result_ex(UI *ui, UI_STRING *uis, const char *result, int len)
883 switch (uis->type) {
886 if (len < uis->_.string_data.result_minsize) {
890 uis->_.string_data.result_minsize,
891 uis->_.string_data.result_maxsize);
894 if (len > uis->_.string_data.result_maxsize) {
898 uis->_.string_data.result_minsize,
899 uis->_.string_data.result_maxsize);
903 if (uis->result_buf == NULL) {
908 memcpy(uis->result_buf, result, len);
909 if (len <= uis->_.string_data.result_maxsize)
910 uis->result_buf[len] = '\0';
911 uis->result_len = len;
917 if (uis->result_buf == NULL) {
922 uis->result_buf[0] = '\0';
924 if (strchr(uis->_.boolean_data.ok_chars, *p)) {
925 uis->result_buf[0] = uis->_.boolean_data.ok_chars[0];
928 if (strchr(uis->_.boolean_data.cancel_chars, *p)) {
929 uis->result_buf[0] = uis->_.boolean_data.cancel_chars[0];