2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 1999-2007 Hiroyuki Yamamoto and the Claws Mail Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #include <glib/gi18n.h>
33 #include "procheader.h"
34 #include "addr_compl.h"
35 #include "gtk/inputdialog.h"
37 #include "quote_fmt.h"
38 #include "quote_fmt_lex.h"
43 bison -p quote_fmt quote_fmt.y
48 static MsgInfo
*msginfo
= NULL
;
49 static PrefsAccount
*account
= NULL
;
51 static gchar default_dictionary
[BUFFSIZE
];
53 static gboolean
*visible
= NULL
;
54 static gboolean dry_run
= FALSE
;
55 static gint maxsize
= 0;
56 static gint stacksize
= 0;
57 static GHashTable
*var_table
= NULL
;
59 typedef
struct st_buffer
66 static struct st_buffer main_expr
= { NULL
, 0, 0 };
67 static struct st_buffer sub_expr
= { NULL
, 0, 0 };
68 static struct st_buffer
* current
= NULL
;
70 static const gchar
*quote_str
= NULL
;
71 static const gchar
*body
= NULL
;
72 static gint
error = 0;
74 static gint cursor_pos
= -1;
76 extern
int quote_fmt_firsttime
;
79 static void add_visibility
(gboolean val
)
82 if
(maxsize
< stacksize
) {
84 visible
= g_realloc
(visible
, maxsize
* sizeof
(gboolean
));
89 visible
[stacksize
- 1] = val
;
92 static void remove_visibility
(void)
96 g_warning
("Error: visibility stack underflow\n");
101 static void add_buffer
(const gchar
*s
)
109 if
(current
->bufsize
+ len
+ 1 > current
->bufmax
) {
110 if
(current
->bufmax
== 0)
111 current
->bufmax
= 128;
112 while
(current
->bufsize
+ len
+ 1 > current
->bufmax
)
113 current
->bufmax
*= 2;
114 current
->buffer
= g_realloc
(current
->buffer
, current
->bufmax
);
116 strcpy
(current
->buffer
+ current
->bufsize
, s
);
117 current
->bufsize
+= len
;
120 static void clear_buffer
(void)
123 *current
->buffer
= '\0';
125 /* force to an empty string, as buffer should not be left unallocated */
127 current
->bufsize
= 0;
130 gchar
*quote_fmt_get_buffer
(void)
132 if
(current
!= &main_expr
)
133 g_warning
("Error: parser still in sub-expr mode\n");
138 return current
->buffer
;
141 gint quote_fmt_get_line
(void)
146 gint quote_fmt_get_cursor_pos
(void)
151 #define INSERT(buf) \
152 if
(stacksize
!= 0 && visible
[stacksize
- 1])\
155 #define INSERT_CHARACTER(chr) \
156 if
(stacksize
!= 0 && visible
[stacksize
- 1]) { \
163 void quote_fmt_reset_vartable
(void)
166 g_hash_table_destroy
(var_table
);
172 void quote_fmt_init
(MsgInfo
*info
, const gchar
*my_quote_str
,
173 const gchar
*my_body
, gboolean my_dry_run
,
174 PrefsAccount
*compose_account
,
175 GtkAspell
*compose_gtkaspell
)
177 void quote_fmt_init
(MsgInfo
*info
, const gchar
*my_quote_str
,
178 const gchar
*my_body
, gboolean my_dry_run
,
179 PrefsAccount
*compose_account
)
182 quote_str
= my_quote_str
;
185 account
= compose_account
;
187 gchar
*dict
= gtkaspell_get_default_dictionary
(compose_gtkaspell
);
189 strncpy2
(default_dictionary
, dict
, sizeof
(default_dictionary
));
191 *default_dictionary
= '\0';
193 dry_run
= my_dry_run
;
195 add_visibility
(TRUE
);
196 main_expr.bufmax
= 0;
198 current
= &main_expr
;
204 var_table
= g_hash_table_new_full
(g_str_hash
, g_str_equal
,
208 * force LEX initialization
210 quote_fmt_firsttime
= 1;
214 void quote_fmterror
(char *str
)
216 g_warning
("Error: %s at line %d\n", str
, line
);
220 int quote_fmtwrap
(void)
225 static int isseparator
(int ch
)
227 return g_ascii_isspace
(ch
) || ch
== '.' || ch
== '-';
230 static void quote_fmt_show_date
(const MsgInfo
*msginfo
, const gchar
*format
)
243 * ALF - GNU C's strftime() has a nice format specifier
244 * for time zone offset (%z). Non-standard however, so
248 #define RLEFT (sizeof result) - (rptr - result)
249 #define STR_SIZE(x) (sizeof (x) - 1)
253 if
(procheader_date_parse_to_tm
(msginfo
->date
, <
, zone
)) {
255 * break up format string in tiny bits delimited by valid %z's and
256 * feed it to strftime(). don't forget that '%%z' mean literal '%z'.
258 for
(rptr
= result
, fptr
= format
; fptr
&& *fptr
&& rptr
< &result
[sizeof result
- 1];) {
263 if
(NULL
!= (zptr
= strstr
(fptr
, "%z"))) {
265 * count nr. of prepended percent chars
267 for
(perc
= 0, p
= zptr
; p
&& p
>= format
&& *p
== '%'; p
--, perc
++)
272 tmp
= g_strndup
(fptr
, zptr
- fptr
+ (perc %
2 ?
0 : STR_SIZE
("%z")));
274 rptr
+= strftime
(rptr
, RLEFT
, tmp
, <
);
278 * append time zone offset
280 if
(zone
[0] && perc %
2)
281 rptr
+= g_snprintf
(rptr
, RLEFT
, "%s", zone
);
282 fptr
= zptr
+ STR_SIZE
("%z");
284 rptr
+= strftime
(rptr
, RLEFT
, fptr
, <
);
289 if
(g_utf8_validate
(result
, -1, NULL
)) {
292 gchar
*utf
= conv_codeset_strdup
(result
,
293 conv_get_locale_charset_str_no_utf8
(),
296 !g_utf8_validate
(utf
, -1, NULL
)) {
298 utf
= g_malloc
(strlen
(result
)*2+1);
299 conv_localetodisp
(utf
,
300 strlen
(result
)*2+1, result
);
302 if
(g_utf8_validate
(utf
, -1, NULL
)) {
312 static void quote_fmt_show_first_name
(const MsgInfo
*msginfo
)
317 if
(!msginfo
->fromname
)
320 p
= (guchar
*)strchr
(msginfo
->fromname
, ',');
322 /* fromname is like "Duck, Donald" */
324 while
(*p
&& isspace
(*p
)) p
++;
325 str
= alloca
(strlen
((char *)p
) + 1);
327 strcpy
(str
, (char *)p
);
331 /* fromname is like "Donald Duck" */
332 str
= alloca
(strlen
(msginfo
->fromname
) + 1);
334 strcpy
(str
, msginfo
->fromname
);
336 while
(*p
&& !isspace
(*p
)) p
++;
343 static void quote_fmt_show_last_name
(const MsgInfo
*msginfo
)
348 /* This probably won't work together very well with Middle
349 names and the like - thth */
350 if
(!msginfo
->fromname
)
353 str
= alloca
(strlen
(msginfo
->fromname
) + 1);
355 strcpy
(str
, msginfo
->fromname
);
356 p
= strchr
(str
, ',');
358 /* fromname is like "Duck, Donald" */
362 /* fromname is like "Donald Duck" */
364 while
(*p
&& !isspace
(*p
)) p
++;
366 /* We found a space. Get first
367 none-space char and insert
368 rest of string from there. */
369 while
(*p
&& isspace
(*p
)) p
++;
373 /* If there is no none-space
374 char, just insert whole
379 /* If there is no space, just
380 insert whole fromname. */
387 static void quote_fmt_show_sender_initial
(const MsgInfo
*msginfo
)
389 #define MAX_SENDER_INITIAL 20
390 gchar tmp
[MAX_SENDER_INITIAL
];
395 if
(!msginfo
->fromname
)
398 p
= (guchar
*)msginfo
->fromname
;
401 if
(*p
&& g_utf8_validate
((gchar
*)p
, 1, NULL
)) {
405 if
(len
>= MAX_SENDER_INITIAL
- 1)
409 while
(*p
&& !isseparator
(*p
)) p
++;
410 while
(*p
&& isseparator
(*p
)) p
++;
416 static void quote_fmt_show_msg
(MsgInfo
*msginfo
, const gchar
*body
,
417 gboolean quoted
, gboolean signature
,
418 const gchar
*quote_str
)
423 if
(!(msginfo
->folder || body
))
427 fp
= str_open_as_stream
(body
);
429 if
(MSG_IS_ENCRYPTED
(msginfo
->flags
))
430 fp
= procmime_get_first_encrypted_text_content
(msginfo
);
432 fp
= procmime_get_first_text_content
(msginfo
);
436 g_warning
("Can't get text part\n");
438 while
(fgets
(buf
, sizeof
(buf
), fp
) != NULL
) {
441 if
(!signature
&& strncmp
(buf
, "-- \n", 4) == 0)
444 if
(quoted
&& quote_str
)
453 static void quote_fmt_insert_file
(const gchar
*filename
)
458 if
((file
= g_fopen
(filename
, "rb")) != NULL
) {
459 while
(fgets
(buffer
, sizeof
(buffer
), file
)) {
467 static void quote_fmt_insert_program_output
(const gchar
*progname
)
472 if
((file
= popen
(progname
, "r")) != NULL
) {
473 while
(fgets
(buffer
, sizeof
(buffer
), file
)) {
480 static void quote_fmt_insert_user_input
(const gchar
*varname
)
488 if
((text
= g_hash_table_lookup
(var_table
, varname
)) == NULL
) {
489 buf
= g_strdup_printf
(_
("Enter text to replace '%s'"), varname
);
490 text
= input_dialog
(_
("Enter variable"), buf
, "");
494 g_hash_table_insert
(var_table
, g_strdup
(varname
), g_strdup
(text
));
496 /* don't free the one in hashtable at the end */
497 text
= g_strdup
(text
);
506 static gchar
*quote_fmt_complete_address
(const gchar
*addr
)
509 gchar
*res
, *tmp
, *email_addr
;
512 debug_print
("quote_fmt_complete_address: %s\n", addr
);
516 /* if addr is a list of message, try the 1st element only */
517 split
= g_strsplit
(addr
, ",", -1);
518 if
(!split ||
!split
[0] ||
*split
[0] == '\0') {
523 Xstrdup_a
(email_addr
, split
[0], return NULL
);
524 extract_address
(email_addr
);
531 start_address_completion
(NULL
);
532 if
(1 < (count
= complete_address
(email_addr
))) {
533 tmp
= get_complete_address
(1);
534 res
= procheader_get_fromname
(tmp
);
537 end_address_completion
();
540 debug_print
("quote_fmt_complete_address: matched %s\n", res
);
552 %token SHOW_NEWSGROUPS
553 %token SHOW_DATE SHOW_FROM SHOW_FULLNAME SHOW_FIRST_NAME SHOW_LAST_NAME
554 %token SHOW_SENDER_INITIAL SHOW_SUBJECT SHOW_TO SHOW_MESSAGEID
555 %token SHOW_PERCENT SHOW_CC SHOW_REFERENCES SHOW_MESSAGE
556 %token SHOW_QUOTED_MESSAGE SHOW_BACKSLASH SHOW_TAB SHOW_MAIL_ADDRESS
557 %token SHOW_QUOTED_MESSAGE_NO_SIGNATURE SHOW_MESSAGE_NO_SIGNATURE
558 %token SHOW_EOL SHOW_QUESTION_MARK SHOW_EXCLAMATION_MARK SHOW_PIPE SHOW_OPARENT SHOW_CPARENT
559 %token SHOW_ACCOUNT_FULL_NAME SHOW_ACCOUNT_MAIL_ADDRESS SHOW_ACCOUNT_NAME SHOW_ACCOUNT_ORGANIZATION
560 %token SHOW_ACCOUNT_DICT
561 %token SHOW_DICT SHOW_TAGS
562 %token SHOW_ADDRESSBOOK_COMPLETION_FOR_CC
563 %token SHOW_ADDRESSBOOK_COMPLETION_FOR_FROM
564 %token SHOW_ADDRESSBOOK_COMPLETION_FOR_TO
566 %token QUERY_DATE QUERY_FROM
567 %token QUERY_FULLNAME QUERY_SUBJECT QUERY_TO QUERY_NEWSGROUPS
568 %token QUERY_MESSAGEID QUERY_CC QUERY_REFERENCES
569 %token QUERY_ACCOUNT_FULL_NAME QUERY_ACCOUNT_ORGANIZATION QUERY_ACCOUNT_DICT
571 %token QUERY_CC_FOUND_IN_ADDRESSBOOK
572 %token QUERY_FROM_FOUND_IN_ADDRESSBOOK
573 %token QUERY_TO_FOUND_IN_ADDRESSBOOK
574 /* tokens QUERY_NOT */
575 %token QUERY_NOT_DATE QUERY_NOT_FROM
576 %token QUERY_NOT_FULLNAME QUERY_NOT_SUBJECT QUERY_NOT_TO QUERY_NOT_NEWSGROUPS
577 %token QUERY_NOT_MESSAGEID QUERY_NOT_CC QUERY_NOT_REFERENCES
578 %token QUERY_NOT_ACCOUNT_FULL_NAME QUERY_NOT_ACCOUNT_ORGANIZATION QUERY_NOT_ACCOUNT_DICT
579 %token QUERY_NOT_DICT
580 %token QUERY_NOT_CC_FOUND_IN_ADDRESSBOOK
581 %token QUERY_NOT_FROM_FOUND_IN_ADDRESSBOOK
582 %token QUERY_NOT_TO_FOUND_IN_ADDRESSBOOK
584 %token INSERT_FILE INSERT_PROGRAMOUTPUT INSERT_USERINPUT
585 %token OPARENT CPARENT
587 %token SHOW_DATE_EXPR
588 %token SET_CURSOR_POS
592 %token
<chr
> CHARACTER
593 %type
<chr
> character
599 character_or_special_or_insert_or_query_list
;
602 character_or_special_list
;
604 character_or_special_or_insert_or_query_list:
605 character_or_special_or_insert_or_query character_or_special_or_insert_or_query_list
606 | character_or_special_or_insert_or_query
;
608 character_or_special_list:
609 character_or_special character_or_special_list
610 | character_or_special
;
612 character_or_special_or_insert_or_query:
618 character_or_special:
622 INSERT_CHARACTER
($1);
639 strncpy
($$
, $1, sizeof
($$
));
640 $$
[sizeof
($$
) - 1] = '\0';
642 if
(len
+ 1 < sizeof
($$
)) {
651 if
(msginfo
->newsgroups
)
652 INSERT
(msginfo
->newsgroups
);
654 | SHOW_DATE_EXPR OPARENT
string CPARENT
656 quote_fmt_show_date
(msginfo
, $3);
661 INSERT
(msginfo
->date
);
666 INSERT
(msginfo
->from
);
671 gchar
*stripped_address
= g_strdup
(msginfo
->from
);
672 extract_address
(stripped_address
);
673 INSERT
(stripped_address
);
674 g_free
(stripped_address
);
679 if
(msginfo
->fromname
)
680 INSERT
(msginfo
->fromname
);
684 quote_fmt_show_first_name
(msginfo
);
688 quote_fmt_show_last_name
(msginfo
);
690 | SHOW_SENDER_INITIAL
692 quote_fmt_show_sender_initial
(msginfo
);
696 if
(msginfo
->subject
)
697 INSERT
(msginfo
->subject
);
707 INSERT
(msginfo
->msgid
);
722 INSERT
(msginfo
->inreplyto
);
723 for
(item
= msginfo
->references
; item
!= NULL
; item
= g_slist_next
(item
))
729 quote_fmt_show_msg
(msginfo
, body
, FALSE
, TRUE
, quote_str
);
731 | SHOW_QUOTED_MESSAGE
733 quote_fmt_show_msg
(msginfo
, body
, TRUE
, TRUE
, quote_str
);
735 | SHOW_MESSAGE_NO_SIGNATURE
737 quote_fmt_show_msg
(msginfo
, body
, FALSE
, FALSE
, quote_str
);
739 | SHOW_QUOTED_MESSAGE_NO_SIGNATURE
741 quote_fmt_show_msg
(msginfo
, body
, TRUE
, FALSE
, quote_str
);
743 | SHOW_ACCOUNT_FULL_NAME
745 if
(account
&& account
->name
)
746 INSERT
(account
->name
);
748 | SHOW_ACCOUNT_MAIL_ADDRESS
750 if
(account
&& account
->address
)
751 INSERT
(account
->address
);
755 if
(account
&& account
->account_name
)
756 INSERT
(account
->account_name
);
758 | SHOW_ACCOUNT_ORGANIZATION
760 if
(account
&& account
->organization
)
761 INSERT
(account
->organization
);
766 if
(account
&& account
->enable_default_dictionary
) {
767 gchar
*dictname
= g_path_get_basename
(account
->default_dictionary
);
776 INSERT
(default_dictionary
);
781 gchar
*tags
= procmsg_msginfo_get_tags_str
(msginfo
);
803 | SHOW_EXCLAMATION_MARK
821 cursor_pos
= current
->bufsize
;
823 | SHOW_ADDRESSBOOK_COMPLETION_FOR_CC
825 gchar
*tmp
= quote_fmt_complete_address
(msginfo
->cc
);
831 | SHOW_ADDRESSBOOK_COMPLETION_FOR_FROM
833 gchar
*tmp
= quote_fmt_complete_address
(msginfo
->from
);
839 | SHOW_ADDRESSBOOK_COMPLETION_FOR_TO
841 gchar
*tmp
= quote_fmt_complete_address
(msginfo
->to
);
851 add_visibility
(msginfo
->date
!= NULL
);
853 OPARENT quote_fmt CPARENT
859 add_visibility
(msginfo
->from
!= NULL
);
861 OPARENT quote_fmt CPARENT
867 add_visibility
(msginfo
->fromname
!= NULL
);
869 OPARENT quote_fmt CPARENT
875 add_visibility
(msginfo
->subject
!= NULL
);
877 OPARENT quote_fmt CPARENT
883 add_visibility
(msginfo
->to
!= NULL
);
885 OPARENT quote_fmt CPARENT
891 add_visibility
(msginfo
->newsgroups
!= NULL
);
893 OPARENT quote_fmt CPARENT
899 add_visibility
(msginfo
->msgid
!= NULL
);
901 OPARENT quote_fmt CPARENT
907 add_visibility
(msginfo
->cc
!= NULL
);
909 OPARENT quote_fmt CPARENT
918 found
= (msginfo
->inreplyto
!= NULL
);
919 for
(item
= msginfo
->references
; found
== FALSE
&& item
!= NULL
; item
= g_slist_next
(item
))
922 add_visibility
(found
== TRUE
);
924 OPARENT quote_fmt CPARENT
928 | QUERY_ACCOUNT_FULL_NAME
930 add_visibility
(account
!= NULL
&& account
->name
!= NULL
);
932 OPARENT quote_fmt CPARENT
936 | QUERY_ACCOUNT_ORGANIZATION
938 add_visibility
(account
!= NULL
&& account
->organization
!= NULL
);
940 OPARENT quote_fmt CPARENT
947 add_visibility
(account
!= NULL
&& account
->enable_default_dictionary
== TRUE
&&
948 account
->default_dictionary
!= NULL
&& *account
->default_dictionary
!= '\0');
950 add_visibility
(FALSE
);
953 OPARENT quote_fmt CPARENT
960 add_visibility
(*default_dictionary
!= '\0');
962 add_visibility
(FALSE
);
965 OPARENT quote_fmt CPARENT
969 | QUERY_CC_FOUND_IN_ADDRESSBOOK
971 gchar
*tmp
= quote_fmt_complete_address
(msginfo
->cc
);
972 add_visibility
(tmp
!= NULL
&& *tmp
!= '\0');
975 OPARENT quote_fmt CPARENT
979 | QUERY_FROM_FOUND_IN_ADDRESSBOOK
981 gchar
*tmp
= quote_fmt_complete_address
(msginfo
->from
);
982 add_visibility
(tmp
!= NULL
&& *tmp
!= '\0');
985 OPARENT quote_fmt CPARENT
989 | QUERY_TO_FOUND_IN_ADDRESSBOOK
991 gchar
*tmp
= quote_fmt_complete_address
(msginfo
->to
);
992 add_visibility
(tmp
!= NULL
&& *tmp
!= '\0');
995 OPARENT quote_fmt CPARENT
1003 add_visibility
(msginfo
->date
== NULL
);
1005 OPARENT quote_fmt CPARENT
1007 remove_visibility
();
1011 add_visibility
(msginfo
->from
== NULL
);
1013 OPARENT quote_fmt CPARENT
1015 remove_visibility
();
1017 | QUERY_NOT_FULLNAME
1019 add_visibility
(msginfo
->fromname
== NULL
);
1021 OPARENT quote_fmt CPARENT
1023 remove_visibility
();
1027 add_visibility
(msginfo
->subject
== NULL
);
1029 OPARENT quote_fmt CPARENT
1031 remove_visibility
();
1035 add_visibility
(msginfo
->to
== NULL
);
1037 OPARENT quote_fmt CPARENT
1039 remove_visibility
();
1041 | QUERY_NOT_NEWSGROUPS
1043 add_visibility
(msginfo
->newsgroups
== NULL
);
1045 OPARENT quote_fmt CPARENT
1047 remove_visibility
();
1049 | QUERY_NOT_MESSAGEID
1051 add_visibility
(msginfo
->msgid
== NULL
);
1053 OPARENT quote_fmt CPARENT
1055 remove_visibility
();
1059 add_visibility
(msginfo
->cc
== NULL
);
1061 OPARENT quote_fmt CPARENT
1063 remove_visibility
();
1065 | QUERY_NOT_REFERENCES
1070 found
= (msginfo
->inreplyto
!= NULL
);
1071 for
(item
= msginfo
->references
; found
== FALSE
&& item
!= NULL
; item
= g_slist_next
(item
))
1074 add_visibility
(found
== FALSE
);
1076 OPARENT quote_fmt CPARENT
1078 remove_visibility
();
1080 | QUERY_NOT_ACCOUNT_FULL_NAME
1082 add_visibility
(account
== NULL || account
->name
== NULL
);
1084 OPARENT quote_fmt CPARENT
1086 remove_visibility
();
1088 | QUERY_NOT_ACCOUNT_ORGANIZATION
1090 add_visibility
(account
== NULL || account
->organization
== NULL
);
1092 OPARENT quote_fmt CPARENT
1094 remove_visibility
();
1096 | QUERY_NOT_ACCOUNT_DICT
1099 add_visibility
(account
== NULL || account
->enable_default_dictionary
== FALSE
1100 ||
*account
->default_dictionary
== '\0');
1102 add_visibility
(FALSE
);
1105 OPARENT quote_fmt CPARENT
1107 remove_visibility
();
1112 add_visibility
(*default_dictionary
== '\0');
1114 add_visibility
(FALSE
);
1117 OPARENT quote_fmt CPARENT
1119 remove_visibility
();
1121 | QUERY_NOT_CC_FOUND_IN_ADDRESSBOOK
1123 gchar
*tmp
= quote_fmt_complete_address
(msginfo
->cc
);
1124 add_visibility
(tmp
== NULL ||
*tmp
== '\0');
1127 OPARENT quote_fmt CPARENT
1129 remove_visibility
();
1131 | QUERY_NOT_FROM_FOUND_IN_ADDRESSBOOK
1133 gchar
*tmp
= quote_fmt_complete_address
(msginfo
->from
);
1134 add_visibility
(tmp
== NULL ||
*tmp
== '\0');
1137 OPARENT quote_fmt CPARENT
1139 remove_visibility
();
1141 | QUERY_NOT_TO_FOUND_IN_ADDRESSBOOK
1143 gchar
*tmp
= quote_fmt_complete_address
(msginfo
->to
);
1144 add_visibility
(tmp
== NULL ||
*tmp
== '\0');
1147 OPARENT quote_fmt CPARENT
1149 remove_visibility
();
1155 current
= &sub_expr
;
1158 OPARENT sub_expr CPARENT
1160 current
= &main_expr
;
1162 quote_fmt_insert_file
(sub_expr.buffer
);
1165 | INSERT_PROGRAMOUTPUT
1167 current
= &sub_expr
;
1170 OPARENT sub_expr CPARENT
1172 current
= &main_expr
;
1174 quote_fmt_insert_program_output
(sub_expr.buffer
);
1179 current
= &sub_expr
;
1182 OPARENT sub_expr CPARENT
1184 current
= &main_expr
;
1186 quote_fmt_insert_user_input
(sub_expr.buffer
);