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_SECTION
38 #define DRD64_HEADER_LIBEDITTEXT_SECTION
40 #ifdef DRD64_SRC_LIBEDITTEXT_SECTION
41 #define LIBEDITTEXT_SECTION_EXTERN
43 #define LIBEDITTEXT_SECTION_EXTERN extern
46 #if defined DRD64_SRC_LIBEDITTEXT_SECTION
47 #define LIBEDITTEXT_SECTION_INTERNAL
48 #define LIBEDITTEXT_SECTION_INTERNALFUNC
49 #elif defined DRD64_SRC_TEST_LIBEDITTEXT_SECTION
50 #define LIBEDITTEXT_SECTION_INTERNAL
51 #define LIBEDITTEXT_SECTION_INTERNALFUNC extern
54 #define INVALID_SECTION (DWord)0xffffffff
56 #define CALC_LINE2SECTION(m,n) ((n)/(m)->dw_sect_steps)
57 #define CALC_SECTION2LINE(m,n) (((m)->dw_sect_steps)*(n))
58 #define SECINFO(m,n) ((INVALID_SECTION!=(n)) ? ((m)->p_section+(n)) : NULL)
61 LIBEDITTEXT_SECTION_EXTERN
62 LibEditText_LineInfo *
63 LibEditText_Section_SearchLine(
64 LibEditText_TextInfo *p_tinfo, DWord dw_targline );
65 LIBEDITTEXT_SECTION_EXTERN
66 int LibEditText_Section_AddSection(
67 LibEditText_TextInfo *p_tinfo );
68 LIBEDITTEXT_SECTION_EXTERN
69 void LibEditText_Section_DeleteLine(
70 LibEditText_TextInfo *p_tinfo, DWord dw_line );
71 LIBEDITTEXT_SECTION_EXTERN
72 int LibEditText_Section_InsertLine(
73 LibEditText_TextInfo *p_tinfo, DWord dw_line );
74 LIBEDITTEXT_SECTION_EXTERN
75 int LibEditText_Section_ConstractSection(
76 LibEditText_TextInfo *p_tinfo );
77 LIBEDITTEXT_SECTION_EXTERN
78 int LibEditText_Section_TermSection(
79 LibEditText_TextInfo *p_tinfo );
80 LIBEDITTEXT_SECTION_EXTERN
81 int LibEditText_Section_InitSection(
82 LibEditText_TextInfo *p_tinfo );
84 #ifdef LIBEDITTEXT_SECTION_INTERNAL
85 DWord LibEditText_Section_BackwardSections_toNearTargetLine(
86 LibEditText_TextInfo *p_tinfo, DWord dw_secid, DWord dw_targetline );
87 DWord LibEditText_Section_ForwardSections_toNearTargetLine(
88 LibEditText_TextInfo *p_tinfo, DWord dw_secid, DWord dw_targetline );
89 void LibEditText_Section_ReviewSection(
90 LibEditText_TextInfo *p_tinfo, DWord dw_secid_min, DWord dw_secid_high );
91 DWord LibEditText_Section_SearchLine_OldSectionInfo(
92 LibEditText_LineSection *p_section, LibEditText_TextInfo *p_tinfo,
93 DWord dw_secid, DWord dw_line );
94 int LibEditText_Section_ExpandSectionInfo( LibEditText_TextInfo *p_tinfo );
95 int LibEditText_Section_SplitSection( LibEditText_TextInfo *p_tinfo );
96 void LibEditText_Section_DeleteMidSection( LibEditText_TextInfo *p_tinfo, DWord dw_secid );
97 void LibEditText_Section_DeleteEndSection( LibEditText_TextInfo *p_tinfo );
101 #endif /* DRD64_HEADER_XXX */
103 /* EOF of drd64_.h ----------------------------------- */