1 /*DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
4 for INTEL64(R), AMD64(R)
6 Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are met:
11 1. Redistributions of source code must retain the above copyright notice,
12 this list of conditions and the following disclaimer.
13 2. Redistributions in binary form must reproduce the above copyright
14 notice, this list of conditions and the following disclaimer in the
15 documentation and/or other materials provided with the distribution.
17 THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
18 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 DISCLAIMED. IN NO EVENT SHALL Koine Yuusuke(koinec) OR CONTRIBUTORS BE
21 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27 OF THE POSSIBILITY OF SUCH DAMAGE.
29 DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64*/
31 /* File Info -----------------------------------------------------------
35 ----------------------------------------------------------------------*/
37 #ifndef DRD64_HEADER_LIBEDITTEXT_TYPES
38 #define DRD64_HEADER_LIBEDITTEXT_TYPES
40 #define INVALID_LINE (DWord)0xffffffff
41 #define MAXLINES (DWord)0x7fffffff
43 #define LINFO(m,n) (INVALID_LINE==(n) ? NULL : (((m)->p_lineinfo)+(n)))
44 /* (m): (Drd64_DrCC_TextInfo *) TextInfo Strcut Pointer */
45 /* (n): (DWord) LineInfo ID */
46 #define LINFO_ID(m,n) ((((m)->p_lineinfo)+(n))->dw_id)
47 /* (m): (Drd64_DrCC_TextInfo *) TextInfo Strcut Pointer */
48 /* (n): (DWord) LineInfo ID */
49 #define LINFO_SORTNEXT(m,n) (((m)->p_lineinfo)+((((m)->p_lineinfo)+(n))->dw_sortnext))
50 /* (m): (Drd64_DrCC_TextInfo *) TextInfo Strcut Pointer */
51 /* (n): (DWord) LineInfo ID */
56 DWord dw_start; /* Start Bytes of This Line in Text-Buffer */
57 DWord dw_strlen; /* Length of This LineString */
58 DWord dw_linelen; /* Line Alloced Bytes */
62 } LibEditText_LineInfo;
67 } LibEditText_LineSection;
73 DWord dw_pos; // Cursor Pos. in line
76 DWord dw_start_lineid;
90 char str_regstr[DRD64_LIBEDITTEXT_DEFAULT_REGSTR_SIZE];
92 DWord dw_find_prevpos_start;
93 DWord dw_find_prevpos_len;
94 DWord dw_find_prevlineid;
99 int i_id; /* ID of TextInfo Struct */
102 Word w_subtype; /* TextFile Sub-Type (.c/.h/Makefile/etc) */
104 /* --- Buffer Info. --- */
105 Byte *pb_text; /* Buffer of TextData */
106 Byte *pb_attr; /* Attribute Buffer of Text */
107 DWord dw_bufsize; /* TextData Buffer Size */
108 DWord dw_attrsize; /* Attribute Buffer Size */
109 DWord dw_lastsize; /* Available Buffer Position */
111 /* --- Lines Info. --- */
112 DWord dw_maxline; /* Max TextFile Lines */
113 DWord dw_bufline; /* Lines of Alloc LineInfo Strcut */
116 LibEditText_LineInfo *p_lineinfo; /* LineInfo structs TopPointer */
118 /* --- Sections Info. --- */
119 DWord dw_bufsections;
122 LibEditText_LineSection *p_section;
124 /* --- Cursors Info. --- */
126 LibEditText_Cursor t_cursor[DRD64_LIBEDITTEXT_DEFAULT_MAX_CURSORS];
128 /* --- Undo Info. --- */
130 Byte b_undo_flagchain;
131 DWord dw_undo_bufsize;
132 DWord dw_undo_lastsize;
138 DWord dw_linesort[DRD64_LIBEDITTEXT_DEFAULT_LINESORT_ARRAYS];
139 DWord dw_empty[DRD64_LIBEDITTEXT_DEFAULT_LINESORT_ARRAYS];
140 char str_pathname[DRD64_MAX_PATH];
141 char str_filename[DRD64_MAX_PATH];
142 } LibEditText_TextInfo;
144 #endif /* DRD64_HEADER_LIBEDITTEXT */
147 /* EOF of drd64_.h ----------------------------------- */