[continued from previous message]
+
+ if (old_ae_page != AE->ae_page) {
+ ap_redraw_full_page(I,AE,base_page,ap_redraw_full);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: em_prev .. changing line %d => %d, page %d => %d\n",
+ old_ae_line,AE->ae_line,old_ae_page,AE->ae_page));
+ } else {
+ ap_draw_line(I,AE,old_ae_line);
+ ap_draw_line(I,AE,AE->ae_line);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: em_prev .. changing line %d => %d\n",
+ old_ae_line,AE->ae_line));
+ }
+
+ }
+ menu_MoveCursor(I->current_page,old_line,old_col);
+
+ }
+
+ break;
+
+ case em_next:
+ if (ae_full_page == mx && AE->show_aliases) {
+ int old_ae_line = AE->ae_line;
+ int old_ae_page = AE->ae_page;
+ int old_line,old_col;
+
+ int count = AE->aview ? get_total_alias_count(AE->aview) : 0;
+ int L = AE->ae_mode[ae_full_page].line;
+ int lines_per_page = ap_lines_per_page(L);
+ int N = 0;
+
+ menu_GetXYLocation(I->current_page,&old_line, &old_col);
+
+ if (-1 == old_ae_line &&
+ count > (N = old_ae_page * lines_per_page)) {
+
+ AE->ae_line = N;
+
+ ap_draw_line(I,AE,old_ae_line);
+ ap_draw_line(I,AE,AE->ae_line);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: em_next .. changing line %d => %d (page %d)\n",
+ old_ae_line,AE->ae_line,old_ae_page));
+
+ } else if (count > old_ae_line+1) {
+
+ AE->ae_line++;
+
+ if (AE->ae_line >= 0)
+ AE->ae_page = AE->ae_line / lines_per_page;
+
+ if (old_ae_page != AE->ae_page) {
+ ap_redraw_full_page(I,AE,base_page,ap_redraw_full);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: em_next .. changing line %d => %d, page %d => %d\n",
+ old_ae_line,AE->ae_line,old_ae_page,AE->ae_page));
+ } else {
+ ap_draw_line(I,AE,old_ae_line);
+ ap_draw_line(I,AE,AE->ae_line);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: em_next .. changing line %d => %d\n",
+ old_ae_line,AE->ae_line));
+ }
+ }
+ menu_MoveCursor(I->current_page,old_line,old_col);
+
+ }
+
+ break;
+
+ case em_page_up:
+ if (ae_full_page == mx && AE->show_aliases) {
+ int old_ae_line = AE->ae_line;
+ int old_ae_page = AE->ae_page;
+ int old_line,old_col;
+
+ menu_GetXYLocation(I->current_page,&old_line, &old_col);
+
+ if (AE->ae_page > 0) {
+ int L = AE->ae_mode[ae_full_page].line;
+ int lines_per_page = ap_lines_per_page(L);
+
+ AE->ae_page--;
+
+ if (-1 != old_ae_line &&
+ old_ae_line / lines_per_page != AE->ae_page) {
+
+ AE->ae_line = AE->ae_page * lines_per_page + lines_per_page -1;
+
+ ap_redraw_full_page(I,AE,base_page,ap_redraw_full);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: em_page_up .. changing line %d => %d, page %d => %d\n",
+ old_ae_line,AE->ae_line,old_ae_page,AE->ae_page));
+
+ } else {
+ ap_redraw_full_page(I,AE,base_page,ap_redraw_full);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: em_page_up .. page %d => %d\n",
+ old_ae_page,AE->ae_page));
+ }
+
+ } else if (old_ae_line >= 0) {
+ AE->ae_line = -1;
+
+ ap_draw_line(I,AE,old_ae_line);
+ ap_draw_line(I,AE,AE->ae_line);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: em_page_up .. changing line %d => %d\n",
+ old_ae_line,AE->ae_line));
+
+ }
+
+ menu_MoveCursor(I->current_page,old_line,old_col);
+ }
+ break;
+
+ case em_page_down:
+ if (ae_full_page == mx && AE->show_aliases) {
+ int old_ae_line = AE->ae_line;
+ int old_ae_page = AE->ae_page;
+ int old_line,old_col;
+ int count = AE->aview ? get_total_alias_count(AE->aview) : 0;
+
+ int L = AE->ae_mode[ae_full_page].line;
+ int lines_per_page = ap_lines_per_page(L);
+
+ menu_GetXYLocation(I->current_page,&old_line, &old_col);
+
+ if (count/lines_per_page > old_ae_page) {
+
+ AE->ae_page++;
+
+ if (-1 != old_ae_line &&
+ old_ae_line / lines_per_page != AE->ae_page) {
+
+ AE->ae_line = AE->ae_page * lines_per_page;
+
+ ap_redraw_full_page(I,AE,base_page,ap_redraw_full);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: em_page_down .. changing line %d => %d, page %d => %d\n",
+ old_ae_line,AE->ae_line,old_ae_page,AE->ae_page));
+
+ } else {
+ ap_redraw_full_page(I,AE,base_page,ap_redraw_full);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: em_page_down .. page %d => %d\n",
+ old_ae_page,AE->ae_page));
+ }
+
+ } else if (count > old_ae_line+1) {
+
+ AE->ae_line = count-1;
+
+ ap_draw_line(I,AE,old_ae_line);
+ ap_draw_line(I,AE,AE->ae_line);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: em_page_down .. changing line %d => %d (page %d)\n",
+ old_ae_line,AE->ae_line,old_ae_page));
+
+
+ }
+
+ menu_MoveCursor(I->current_page,old_line,old_col);
+ }
+ break;
+
+ case em_tabaction:
+ if (I->pvector[av_buffer]) {
+ struct expanded_address result;
+
+ int have_error = 0;
+
+ zero_expanded_address(&result);
+
+ dump_expanded_address(10,"gb_address_edit -- tabaction -- old",*( AE->expanded ));
+
+ ap_update_tokenized(AE,I->pvector[av_buffer]);
+ ap_print_prompt(I, clear_to_prev,&have_error);
+
+ if (have_error) {
+
+ DPRINT(Debug,10,(&Debug, "gb_address_edit: error on tokenization\n"));
+
+ goto print_error;
+ }
+
+ update_textual_from_tokenized(AE->expanded,&result,
+ AE->tokenized_buffer,
+ AE->aview,
+ I->pvector[av_buffer] /* for error message */);
+
+ free_expanded_address(AE->expanded);
+ *( AE->expanded ) = result;
+
+ dump_expanded_address(10,"gb_address_edit -- tabaction -- new",*( AE->expanded ));
+
+ if (ap_tokenized_have_error(AE->tokenized_buffer)) {
+ /* Now have error -- reprompt */
+
+ ap_print_prompt(I, clear_to_prev,&have_error);
+
+ if (have_error) {
+ int old_line,old_col;
+
+ DPRINT(Debug,10,(&Debug, "gb_address_edit: error on update texttual\n"));
+
+ error_wait();
+
+ print_error:
+
+ menu_GetXYLocation(I->current_page,&old_line, &old_col);
+
+ lib_transient(CATGETS(elm_msg_cat, MeSet,
+ MeAddrPromptErrNotify,
+ "Address have error."));
+
+ DPRINT(Debug,10, (&Debug,
+ "gb_address_edit: Setting confirm_err\n"));
+
+ AE->confirm_err = 1;
+
+ menu_MoveCursor(I->current_page,old_line,old_col);
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: tabaction with error ... canceled\n"));
+ break;
+ }
+ }
+
+ switch (expanded_to_tokenized(& (AE->tokenized_buffer),
+ & (I->pvector[av_buffer]),
+ *( AE->expanded ))) {
+ int old_line,old_col;
+ int count;
+
+ case exp2tok_changed:
+
+ ap_print_prompt(I, clear_to_prev,NULL);
+
+ menu_GetXYLocation(I->current_page,&old_line, &old_col);
+
+ AE->tabnotify = 1;
+
+ if (ae_prompt_area == mx && AE->aview && AE->title &&
+ (count = get_alias_count(AE->aview)) > 0
+ ) {
+
+ lib_transient(CATGETS(elm_msg_cat, MeSet,
+ MeAddrPromptRepeatTAB,
+ "Address rewritten. Press TAB again to open aliases menu."));
+
+ } else {
+
+ lib_transient(CATGETS(elm_msg_cat, MeSet,
+ MeAddrPromptRewrite,
+ "Address rewritten. "));
+
+ }
+
+ menu_MoveCursor(I->current_page,old_line,old_col);
+
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: tabaction with prompt changed\n"));
+ break;
+
+ case exp2tok_unchanged:
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: No changes of buffer on parsing\n"));
+ break;
+
+ }
+
+ } else {
+ /* No buffer, so no expanded address either */
+
+ free_expanded_address(AE->expanded);
+ }
+
+ if (AE->confirm_err) {
+ int old_line,old_col;
+
+ menu_GetXYLocation(I->current_page,&old_line, &old_col);
+ clear_error();
+ AE->confirm_err = 0;
+
+ DPRINT(Debug,10, (&Debug,
+ "gb_address_edit: Clearing confirm_err\n"));
+
+ menu_MoveCursor(I->current_page,old_line,old_col);
+
+ } else {
+
+ if (ae_prompt_area == mx && AE->aview && AE->title) {
+ int tac = get_total_alias_count(AE->aview);
+ int old_line,old_col;
+
+ menu_GetXYLocation(I->current_page,&old_line, &old_col);
+
+ if (tac < 1) {
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: tabaction ... no aliases .. canceled\n"));
+
+ goto no_aliases;
+ }
+
+ sort_aliases(tac, sa_visible_sort,AE->aview);
+
+ menu_MoveCursor(I->current_page,old_line,old_col);
+
+ /* Open alias menu */
+
+ if (!ap_set_full_page(I,AE,base_page)) {
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: tabaction with error ... alias menu failed ... canceled\n"));
+
+ no_aliases:
+
+ AE->tabnotify = 1;
+
+ lib_transient(CATGETS(elm_msg_cat, MeSet,
+ MeAddrPromptAliasMenuErr,
+ "Alias menu not available"));
+
+ menu_MoveCursor(I->current_page,old_line,old_col);
+ break;
+ }
+
+ AE->show_aliases = 1;
+ AE->ae_line = 0;
+ AE->ae_page = 0;
+
+ ap_redraw_full_page(I,AE,base_page, ap_redraw_full);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: tabaction .. showing aliases\n"));
+ break;
+
+ }
+
+ if (ae_prompt_area != mx && AE->aview && AE->title && !AE->show_aliases) {
+ AE->show_aliases = 1;
+ AE->ae_line = 0;
+ AE->ae_page = 0;
+
+ ap_redraw_full_page(I,AE,base_page, ap_redraw_full);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: tabaction .. showing aliases\n"));
+ }
+
+ if (ae_prompt_area != mx && AE->show_aliases) {
+ int old_ae_line = AE->ae_line;
+ int old_line,old_col;
+
+ menu_GetXYLocation(I->current_page,&old_line, &old_col);
+
+ if (-1 == old_ae_line && AE->aview) {
+ int L = AE->ae_mode[ae_full_page].line;
+ int lines_per_page = ap_lines_per_page(L);
+
+ AE->ae_line = AE->ae_page * lines_per_page;
+
+ ap_draw_line(I,AE,old_ae_line);
+ ap_draw_line(I,AE,AE->ae_line);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: tabaction .. changing line %d => %d\n",
+ old_ae_line,AE->ae_line));
+
+ } else if (old_ae_line >= 0) {
+ AE->ae_line = -1;
+
+ ap_draw_line(I,AE,old_ae_line);
+ ap_draw_line(I,AE,AE->ae_line);
+
+ DPRINT(Debug,10,(&Debug,
+ "gb_address_edit: tabaction .. changing line %d => %d\n",
+ old_ae_line,AE->ae_line));
+
+ }
+
+ menu_MoveCursor(I->current_page,old_line,old_col);
+ }
+
+ }
+
+
+ DPRINT(Debug,10,(&Debug, "gb_address_edit: tabaction ignored (now) \n"));
+
+ break;
+
+ default:
+
+ DPRINT(Debug,10,(&Debug, "gb_address_edit: Action ignored (now)\n"));
+ }
+
+ DPRINT(Debug,10,(&Debug, "gb_address_edit: Returning non-NULL\n"));
+
+ return &(I->pvector[av_buffer]);
+ }
+
+
+
+ int prompt_expanded_address P_((struct menu_context *page,
+ struct expanded_address *expanded,
+ struct mailer_info *mailer_info,
+ struct string **buffer /* for redraw */,
+ struct AliasView *aview /* May be NULL */,
+ struct string * title /* Title on full page mode */,
+ struct menu_context *prompt_area,
+ /* Cordinates use prompt_area */
+ int x, int y, int flags,
+ const char * format, const char *msg, ...));
+
+ int prompt_expanded_address (
+ #if ANSI_C
+ struct menu_context *page,
+ struct expanded_address *expanded,
+ struct mailer_info *mailer_info,
+ struct string **buffer /* for redraw */, + struct AliasView *aview /* May be NULL */,
+ struct string * title /* Title on full page mode */,
+ struct menu_context *prompt_area,
+ int x, int y, int flags,
+ const char * format, const char *msg, ...
+ #else
+ page,expanded,mailer_info,buffer,
+ aview,title,
+ prompt_area,
+ x,y,flags,format,msg, va_alist
+ #endif
+ )
+ #if !ANSI_C
+ struct menu_context *page;
+ struct expanded_address *expanded;
+ struct mailer_info *mailer_info;
+ struct string **buffer /* for redraw */;
+ struct AliasView *aview /* May be NULL */;
+ struct string * title /* Title on full page mode */;
+ struct menu_context *prompt_area;
+ int x;
+ int y;
+ int flags;
+ const char *format;
+ const char *msg;
+ va_dcl
+ #endif
+ {
+ int r = 0;
+ struct string *question = NULL;
+
+ struct address_edit AE;
+
+ struct enter_info INFO;
+ struct string *vector[av_COUNT];
+ enum ae_mode mx;
+
+ va_list vl;
+
+ int confirm_err_loop = 0;
+
+ DPRINT(Debug,5, (&Debug, "prompt_expanded_address: Entering [%s]\n",format));
+
+ zero_enter_info(&INFO);
+
+ Va_start(vl, msg); /* defined in hdrs/elm_defs.h */
+ question = elm_smessage(0,format,msg,vl);
+ va_end(vl);
+
+ if(!(x >=0 && y >= 0))
+ menu_GetXYLocation(prompt_area,&x, &y);
+
+ DPRINT(Debug,10, (&Debug, "prompt_expanded_address: (x,y) = %d,%d (line,col)\n",
+ x,y));
+
+ menu_MoveCursor(prompt_area,x,y);
+
+ AE.magic = ADDRESS_EDIT_magic;
+
+ for (mx = 0; mx < ae_mode_COUNT; mx++) {
+ AE.ae_mode[mx].line = 0;
+ AE.ae_mode[mx].col = 0;
+ }
+
+ AE.ae_mode[ae_prompt_area].line = x;
+ AE.ae_mode[ae_prompt_area].col = y;
+ AE.aview = aview;
+ AE.mailer_info = mailer_info;
+ AE.expanded = expanded;
+ AE.title = title; /* Maybe NULL ? */
+ AE.prompt_area = prompt_area;
+ AE.confirm_err = 0;
+ AE.tabnotify = 0;
+ AE.enternotify = 0;
+ AE.show_aliases = 0;
+ AE.ae_line = 0; /* current line on alias list */
+ AE.ae_page = 0; /* current page on alias list */
+ AE.index_width = 3;
+
+ if (aview) {
+
+ int count;
+
+ if (update_aview(aview)) {
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: Alias list updated\n"));
+ }
+
+ count = get_alias_count(aview);
+
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: %d aliases\n",
+ count));
+
+ if (count >= 10000)
+ AE.index_width = 5;
+ else if (count >= 1000)
+ AE.index_width = 4;
+ }
+
+ AE.tokenized_buffer = NULL;
+
+ if (!*buffer) {
+ enum exp2tok_res r_tok;
+
+ int i;
+
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: surface len %d",
+ expanded->surface_len));
+ for (i = 0; i < expanded->surface_len; i++) {
+ if (expanded->surface[i].Textual) {
+ DPRINT(Debug,12, (&Debug,
+ "\nprompt_expanded_address [%d]: %S",
+ expanded->surface[i].Textual));
+ }
+ }
+ DPRINT(Debug,10, (&Debug,"\n"));
+
+ r_tok = expanded_to_tokenized(& (AE.tokenized_buffer),
+ buffer,
+ *expanded);
+
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: expanded_to_tokenized %d", + r_tok ));
+ switch (r_tok) {
+ case exp2tok_unchanged: DPRINT(Debug,10, (&Debug," exp2tok_unchanged")); break;
+ case exp2tok_changed: DPRINT(Debug,10, (&Debug," exp2tok_changed")); break;
+ }
+ if (*buffer) {
+ DPRINT(Debug,10, (&Debug, ", buffer=%S",
+ *buffer));
+ }
+ DPRINT(Debug,10, (&Debug,"\n"));
+
+ } else if (*buffer) {
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: buffer=%S\n",
+ *buffer));
+
+ AE.tokenized_buffer = string_tokenize(*buffer, TOK_mail);
+ }
+
+ if (AE.tokenized_buffer) {
+ size_t a;
+
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: tokenized\n"));
+ for (a = 0; AE.tokenized_buffer[a].token; a++) {
+ DPRINT(Debug,10, (&Debug, " : [%zu]=%S",
+ a,AE.tokenized_buffer[a].token));
+ if (AE.tokenized_buffer[a].special) {
+ DPRINT(Debug,10, (&Debug, " special=%x",
+ AE.tokenized_buffer[a].special));
+ }
+ DPRINT(Debug,10, (&Debug,"\n"));
+ }
+ DPRINT(Debug,10, (&Debug, " : count %zu\n",a));
+ }
+
+ vector[av_question] = question;
+ vector[av_buffer] = *buffer;
+
+
+ INFO.address = &AE;
+ INFO.pvector = vector;
+
+ INFO.give_buffer = gb_address_edit;
+ INFO.alter_buffer = ab_address_edit;
+ INFO.full_page = fp_address_edit;
+ INFO.prompt_hint = ph_address_edit;
+ INFO.flags = flags;
+ INFO.ch_count = 0;
+
+ INFO.in_utils = NULL;
+ INFO.builtin = NULL;
+ INFO.browser = NULL;
+ INFO.current_page = prompt_area;
+
+ do {
+ int have_err = 0;
+ enum exp2tok_res r1 = exp2tok_unchanged; /* Not processed */
+
+ if (confirm_err_loop) {
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: On confirm_err_loop")); +
+ if (isoff(INFO.flags,OE_APPEND_CURRENT)) {
+ INFO.flags |= OE_APPEND_CURRENT;
+ DPRINT(Debug,10, (&Debug,", adding OE_APPEND_CURRENT"));
+ }
+ DPRINT(Debug,10, (&Debug,"\n"));
+ }
+
+ r = enter_helper(&INFO, prompt_area,page);
+
+ *buffer = vector[av_buffer];
+
+
+ if (0 == r && *buffer) {
+ ap_build_expanded(&AE,*buffer,mailer_info,aview);
+
+ } else if (!*buffer) {
+ free_expanded_address(expanded);
+ }
+
+ ap_print_prompt(&INFO,clear_to_prev,&have_err);
+
+ if (0 == r && !have_err) {
+ r1 = expanded_to_tokenized(&AE.tokenized_buffer,&vector[av_buffer],*expanded);
+
+ *buffer = vector[av_buffer];
+
+ switch (r1) {
+ case exp2tok_unchanged: break;
+ case exp2tok_changed:
+ ap_print_prompt(&INFO,clear_to_prev,&have_err);
+ break;
+ }
+ }
+
+ if (0 == r && have_err && !confirm_err_loop && !AE.confirm_err) {
+ int old_line,old_col;
+
+ menu_GetXYLocation(INFO.current_page,&old_line, &old_col);
+
+ error_wait();
+ confirm_err_loop++;
+
+ lib_transient(CATGETS(elm_msg_cat, MeSet,
+ MeAddrPromptErrEnter,
+ "Have error. Press enter again to confirm address."));
+
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: Setting confirm_err\n"));
+
+ AE.confirm_err = 1;
+
+ if (AE.tabnotify) {
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: Cleared tabnotify\n"));
+ AE.tabnotify = 0; /* Was erased */
+ }
+
+ if (AE.enternotify) {
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: Cleared enternotify\n"));
+ AE.enternotify = 0; /* Was erased */
+ }
+
+ menu_MoveCursor(INFO.current_page,old_line,old_col);
+
+ } else if (exp2tok_changed == r1) {
+
+ int old_line,old_col;
+
+ menu_GetXYLocation(INFO.current_page,&old_line, &old_col);
+
+ error_wait();
+ confirm_err_loop++;
+
+ lib_transient(CATGETS(elm_msg_cat, MeSet,
+ MeAddrPromptRewriteEnter,
+ "Address rewritten. Press enter again to confirm address."));
+
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: Setting enternotify\n"));
+
+ AE.enternotify = 1;
+
+ if (AE.tabnotify) {
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: Cleared tabnotify\n"));
+ AE.tabnotify = 0; /* Was erased */
+ }
+
+ } else if (AE.confirm_err || confirm_err_loop || AE.tabnotify || AE.enternotify) {
+ int old_line,old_col;
+
+ menu_GetXYLocation(INFO.current_page,&old_line, &old_col);
+
+ clear_error();
+
+ DPRINT(Debug,10, (&Debug,
+ "prompt_expanded_address: Clearing"));
+
+ if (AE.confirm_err) {
+ DPRINT(Debug,10, (&Debug," confirm_err"));
+ AE.confirm_err = 0;
+ }
+ if (confirm_err_loop) {
+ DPRINT(Debug,10, (&Debug," confirm_err_loop"));
+ confirm_err_loop = 0;
+ }
+ if (AE.tabnotify) {
+ DPRINT(Debug,10, (&Debug,
+ " tabnotify"));
+ AE.tabnotify = 0;
+ }
+ if (AE.enternotify) {
+ DPRINT(Debug,10, (&Debug,
+ " enternotify"));
+ AE.enternotify = 0;
+ }
+
+ DPRINT(Debug,10, (&Debug,"\n"));
+
+ menu_MoveCursor(INFO.current_page,old_line,old_col);
+ }
+
+ } while (confirm_err_loop && confirm_err_loop++ < 10);
+
+ if (AE.tokenized_buffer)
+ free_string_tokenized(& (AE.tokenized_buffer));
+
+ if (AE.title && AE.title != title)
+ free_string(& AE.title);
+
+
+ free_string(&question);
+
+ DPRINT(Debug,10, (&Debug, "prompt_expanded_address=%d",
+ r));
+
+ switch (r) {
+ case REDRAW_MARK: DPRINT(Debug,10, (&Debug, " REDRAW_MARK")); break;
+ case OE_ALT_SOLIDUS: DPRINT(Debug,10, (&Debug, " OE_ALT_SOLIDUS")); break;
+ }
+ if (*buffer) {
+ DPRINT(Debug,10, (&Debug,", buffer=%S",
+ *buffer));
+ }
+ if (expanded->surface_len) {
+ int i;
+ DPRINT(Debug,10, (&Debug,
+ ", surface len %d",
+ expanded->surface_len));
+
+ for (i = 0; i < expanded->surface_len; i++) {
+ if (expanded->surface[i].Textual) {
+ DPRINT(Debug,12, (&Debug,
+ "\nprompt_expanded_address [%d]: %S",
+ i,expanded->surface[i].Textual));
+ }
+ }
+ }
+ DPRINT(Debug,10, (&Debug, "\n"));
+
+ return r;
+ }
+
+ /*
+ * Local Variables:
+ * mode:c
+ * c-basic-offset:4
+ * buffer-file-coding-system: iso-8859-1
+ * End:
+ */
Index: elmME+.2.5.alpha60/src/addr_util.c
*** elmME+.2.5.alpha54/src/addr_util.c Thu Jul 23 19:38:33 2020
--- elmME+.2.5.alpha60/src/addr_util.c Thu Jul 28 18:49:52 2022 ***************
*** 1,7 ****
! static char rcsid[] = "@(#)$Id: addr_util.c,v 2.28 2020/07/23 16:38:33 hurtta Exp $";
/******************************************************************************
! * The Elm (ME+) Mail System - $Revision: 2.28 $ $State: Exp $
*
* Modified by: Kari Hurtta <
hurtta+elm@siilo.FMI.FI>
* (was
hurtta+elm@posti.FMI.FI,
hurtta+elm@ozone.FMI.FI)
--- 1,7 ----
! static char rcsid[] = "@(#)$Id: addr_util.c,v 2.31 2022/07/14 14:16:01 hurtta Exp $";
/******************************************************************************
! * The Elm (ME+) Mail System - $Revision: 2.31 $ $State: Exp $
*
* Modified by: Kari Hurtta <
hurtta+elm@siilo.FMI.FI>
* (was
hurtta+elm@posti.FMI.FI,
hurtta+elm@ozone.FMI.FI)
***************
*** 53,58 ****
--- 53,82 ----
return (char *)str;
}
+
+ void add_one_alias_to_expanded(x,a)
+