/*----------------------------------------------------------------------
----------------------------------------------------------------------*/
+DWord
+ LibEditText_Section_AvoidanceInLineSection(
+ LibEditText_TextInfo *p_tinfo,
+ DWord dw_line,
+ DWord dw_secid )
+{
+ DWord dw_cnt;
+ DWord dw_ret;
+ LibEditText_LineSection *p_section;
+ LibEditText_LineInfo *p_line;
+
+ p_section = SECINFO(p_tinfo, dw_secid);
+ assert( NULL != p_section );
+
+ dw_ret = dw_secid;
+
+ if( p_section->dw_line < dw_line )
+ { return dw_ret + 1; }
+ else if( p_section->dw_line > dw_line )
+ { assert( 0 ); /* ERROR!! - NO exit function!! */ }
+
+ /* follow statement is if( dw_line == p_section->dw_line ) */
+
+ for( dw_cnt = dw_secid; dw_cnt > 0; dw_cnt-- ) {
+
+ p_section = SECINFO(p_tinfo, dw_cnt);
+ assert( NULL != p_section );
+
+ if( p_section->dw_line != dw_line ) { break; }
+
+ p_line = LINFO(p_tinfo, p_section->dw_linfoid);
+
+ if(( 0 < dw_cnt ) && ( 0 < dw_line )) {
+ p_line = LINFO(p_tinfo, p_line->dw_before);
+ assert( NULL != p_line );
+ p_section->dw_line = dw_line - 1;
+ p_section->dw_linfoid = p_line->dw_id;
+
+ dw_ret = dw_secid + 1;
+ }
+ else if( dw_line + 1 < p_tinfo->dw_maxline ) {
+ p_line = LINFO(p_tinfo, p_line->dw_next);
+ assert( NULL != p_line );
+ p_section->dw_line = dw_line + 1;
+ p_section->dw_linfoid = p_line->dw_id;
+ }
+ }
+
+ return dw_ret;
+}
+
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
LIBEDITTEXT_SECTION_EXTERN
void
LibEditText_Section_DeleteLine(
p_tinfo, dw_secid, dw_line );
}
- p_section = SECINFO(p_tinfo, dw_secid);
+/* p_section = SECINFO(p_tinfo, dw_secid);
assert( NULL != p_section );
if( dw_line == p_section->dw_line ) {
}
dw_cnt = dw_secid + 1;
+*/
+ dw_cnt = LibEditText_Section_AvoidanceInLineSection( p_tinfo, dw_line, dw_secid );
-goto_LibEditText_Section_DeleteLine_lineup:
+//goto_LibEditText_Section_DeleteLine_lineup:
/* if( dw_line != p_section->dw_line )
{ dw_cnt = dw_secid + 1; }
else