1 /* 2 * $Id: text.h 768 2007-10-24 00:10:03Z hubert@u.washington.edu $ 3 * 4 * ======================================================================== 5 * Copyright 2013-2021 Eduardo Chappa 6 * Copyright 2006-2007 University of Washington 7 * 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 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * ======================================================================== 15 */ 16 17 #ifndef PITH_TEXT_INCLUDED 18 #define PITH_TEXT_INCLUDED 19 20 21 #include "../pith/atttype.h" 22 #include "../pith/filter.h" 23 #include "../pith/handle.h" 24 25 26 typedef enum {InLine, QStatus} DetachErrStyle; 27 28 29 typedef struct local_for_2022_jp_trans { 30 int report_err; 31 } LOC_2022_JP; 32 33 34 /* 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. 39 */ 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; 50 51 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 *); 56 57 58 #endif /* PITH_TEXT_INCLUDED */ 59