* Bug fix: Memory corruption when alpine searches for a string that is
[alpine.git] / pith / text.h
blobd9616787a17713ab07b58e9c0d05e1d557e89c1d
1 /*
2 * $Id: text.h 768 2007-10-24 00:10:03Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2021 Eduardo Chappa
6 * Copyright 2006-2007 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PITH_TEXT_INCLUDED
18 #define PITH_TEXT_INCLUDED
21 #include "../pith/atttype.h"
22 #include "../pith/filter.h"
23 #include "../pith/handle.h"
26 typedef enum {InLine, QStatus} DetachErrStyle;
29 typedef struct local_for_2022_jp_trans {
30 int report_err;
31 } LOC_2022_JP;
35 * If the number of lines in the quote is equal to lines or less, then
36 * we show the quote. If the number of lines in the quote is more than lines,
37 * then we show lines-1 of the quote followed by one line of editorial
38 * comment.
40 typedef struct del_q_s {
41 int lines; /* show this many lines (counting editorial) */
42 int indent_length; /* skip over this indent */
43 int is_flowed; /* message is labelled flowed */
44 int do_color;
45 int delete_all; /* delete quotes completely, no comments */
46 HANDLE_S **handlesp;
47 int in_quote; /* dynamic data */
48 char **saved_line; /* " */
49 } DELQ_S;
52 /* exported prototypes */
53 int decode_text(ATTACH_S *, long, gf_io_t, HANDLE_S **, DetachErrStyle, int);
54 int translate_utf8_to_2022_jp(long, char *, LT_INS_S **, void *);
55 int delete_quotes(long, char *, LT_INS_S **, void *);
58 #endif /* PITH_TEXT_INCLUDED */