OSDN Git Service

* [libintel64asm] Create Test Binary File.
[drdeamon64/drdeamon64.git] / libedittext / drd64_libedittext_debug.c
1 /*DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
2
3                          D r . D e a m o n  6 4
4                         for INTEL64(R), AMD64(R)
5         
6    Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
7
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are met:
10
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.
16
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.
28
29 DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64*/
30
31 /* File Info -----------------------------------------------------------
32 File: drd64_.c
33 Function: 
34 Comment: 
35 ----------------------------------------------------------------------*/
36
37 #define DRD64_SRC_LIBEDITTEXT_DEBUG
38 #include"drd64_libedittext.h"
39
40
41 /*----------------------------------------------------------------------
42 ----------------------------------------------------------------------*/
43 LIBEDITTEXT_DEBUG_EXTERN
44 int
45         LibEditText_Debug_RedoInfo(
46                 LibEditText_TextInfo    *p_tinfo,
47                 Byte    b_putflag )
48 {
49         int             i_result;
50         int             i_cmdflag       = 0x00;
51         Byte    *pb_undo;
52         Byte    *pb_last;
53         Byte    *pb_now;
54         DWord   dw_line;
55         DWord   dw_pos;
56         DWord   dw_cnt;
57         DWord   dw_nowsize;
58         char    str_cmd[128];
59         LibEditText_UndoInfo    t_udinfo;
60         
61         assert( NULL != p_tinfo );
62
63         if( 0x00 != b_putflag )         {
64                 puts("[7] Redo Info +----2----+----3----+----4----+----5----+----6----+----7----+----8");
65         }
66
67         if( 0x03 > b_putflag )  {
68                 puts("  Not print-out Redo-Info Setting. (Only Check UndoInfo Data Integrity.)");
69         }
70
71         if( p_tinfo->dw_undo_lastsize == p_tinfo->dw_undo_last )        {
72                 if( 0x03 == b_putflag )         { puts("  No Redo Info."); }
73                 return 0x00;
74         }
75
76         pb_undo         = p_tinfo->pb_undo + p_tinfo->dw_undo_last;
77         pb_last         = NULL;
78         dw_line         = p_tinfo->dw_undo_line;
79         dw_pos          = p_tinfo->dw_undo_pos;
80         dw_nowsize      = p_tinfo->dw_undo_last;
81         dw_cnt          = 0;
82
83         do      {
84                 pb_now          = pb_undo;
85                 i_cmdflag       = 0x00;
86                 
87                 i_result        = LibEditText_UndoInfo_ReadUndoInfo(
88                                                         p_tinfo, &t_udinfo, dw_line, dw_pos, pb_now, 0x01 );
89
90                 switch( t_udinfo.b_cmd )        {
91                         case LIBEDITTEXT_UNDOCMD_INSERTLINE:
92                                 snprintf( str_cmd, 127, "  [%05u] InsertLine   ", dw_cnt);      break;
93                         case LIBEDITTEXT_UNDOCMD_DELETELINE:
94                                 snprintf( str_cmd, 127, "  [%05u] DeleteLine   ", dw_cnt);      break;
95                         case LIBEDITTEXT_UNDOCMD_INSERTSTRING:
96                                 snprintf( str_cmd, 127, "  [%05u] InsertString ", dw_cnt);      break;
97                         case LIBEDITTEXT_UNDOCMD_DELETESTRING:
98                                 snprintf( str_cmd, 127, "  [%05u] DeleteString ", dw_cnt);      break;
99                         case LIBEDITTEXT_UNDOCMD_INSERTCHAR:
100                                 snprintf( str_cmd, 127, "  [%05u] InsertChar   ", dw_cnt);      break;
101                         case LIBEDITTEXT_UNDOCMD_DELETECHAR:
102                                 snprintf( str_cmd, 127, "  [%05u] DeleteChar   ", dw_cnt);      break;
103                         default:
104                                 snprintf( str_cmd, 127, "  [%05u] *** Command Error!! [%2x] *** \n",
105                                                                                                         dw_cnt, t_udinfo.b_cmd);
106                                 i_cmdflag       = -0x01;
107                                 break;
108                 }
109
110                 dw_line         = t_udinfo.dw_line;
111                 dw_pos          = t_udinfo.dw_pos;
112
113                 if( 0x03 <= b_putflag ) {
114                         fputs( str_cmd, stdout );
115                         
116                         if( 0x00 == i_cmdflag ) {
117                                 printf("[%4u:%3u] ", dw_line, dw_pos );
118         
119                                 if( 0x00 != t_udinfo.t_udflag.bf_linksz )
120                                         { printf(" Link:%4u", t_udinfo.dw_prevlength ); }
121                                 else
122                                         { fputs(" No Link. ", stdout ); }
123         
124                                 fputs(" Flag[", stdout);
125                                 if( 0x00 != t_udinfo.t_udflag.bf_redone )       { putchar('R'); }
126                                 else                                                                            { putchar(' '); }
127         
128                                 if( 0x00 != t_udinfo.t_udflag.bf_chain )        { putchar('C'); }
129                                 else                                                                            { putchar(' '); }
130
131                                 if( 0x00 != t_udinfo.t_udflag.bf_line )
132                                         { printf("%d", t_udinfo.t_udflag.bf_line ); }
133                                 else                                                                            { putchar(' '); }
134
135                                 if( 0x00 != t_udinfo.t_udflag.bf_pos )
136                                         { printf("%d", t_udinfo.t_udflag.bf_pos ); }
137                                 else                                                                            { putchar(' '); }
138                                 putchar(']');
139
140                                 if( LIBEDITTEXT_UNDOCMD_INSERTSTRING == t_udinfo.b_cmd )
141                                         { printf(" String(%u): %s", t_udinfo.dw_data, t_udinfo.pb_str ); }
142                                 else if( LIBEDITTEXT_UNDOCMD_INSERTCHAR == t_udinfo.b_cmd )             {
143                                         printf(" Data: '%c'", t_udinfo.b_data );
144                                         if( '\n' == t_udinfo.b_data )   { printf(" <ERROR!!> "); }
145                                 }
146                                 else if( LIBEDITTEXT_UNDOCMD_DELETESTRING == t_udinfo.b_cmd )
147                                         { printf(" String(%u): %s", t_udinfo.dw_data, t_udinfo.pb_str ); }
148                                 else if( LIBEDITTEXT_UNDOCMD_DELETECHAR == t_udinfo.b_cmd )
149                                         { printf(" Data: '%c'", t_udinfo.b_data ); }
150                                 puts("");
151                         }
152                 }
153
154                 dw_cnt++;
155                 dw_line         += t_udinfo.dw_plusline;
156                 dw_pos          += t_udinfo.dw_pluspos;
157                 dw_nowsize      += t_udinfo.dw_uinfosize;
158                 pb_undo         += t_udinfo.dw_uinfosize;
159         }while( dw_nowsize < p_tinfo->dw_undo_lastsize );
160
161         return i_cmdflag;
162 }
163
164
165 /*----------------------------------------------------------------------
166 ----------------------------------------------------------------------*/
167 LIBEDITTEXT_DEBUG_EXTERN
168 int
169         LibEditText_Debug_UndoInfo(
170                 LibEditText_TextInfo    *p_tinfo,
171                 Byte    b_putflag )
172 {
173         int             i_result;
174         int             i_cmdflag       = 0x00;
175         Byte    *pb_undo;
176         Byte    *pb_now;
177         DWord   dw_line;
178         DWord   dw_pos;
179         DWord   dw_cnt;
180         char    str_cmd[128];
181         LibEditText_UndoInfo    t_udinfo;
182         
183         assert( NULL != p_tinfo );
184
185         if( 0x00 != b_putflag )         {
186                 puts("[6] Undo Info +----2----+----3----+----4----+----5----+----6----+----7----+----8");
187         }
188
189         if( 0x03 > b_putflag )  {
190                 puts("  Not print-out Undo-Info Setting. (Only Check UndoInfo Data Integrity.)");
191         }
192
193         if( 0 == p_tinfo->dw_undo_last )        {
194                 if( 0x00 != b_putflag )         {
195                         puts("  No Undo Info.");
196                         return 0x00;
197                 }
198         }
199
200         pb_undo = p_tinfo->pb_undo + p_tinfo->dw_undo_end;
201
202         dw_line = p_tinfo->dw_undo_line;
203         dw_pos  = p_tinfo->dw_undo_pos;
204         dw_cnt  = 1;
205
206         do      {
207                 pb_now          = pb_undo;
208                 i_cmdflag       = 0x00;
209                 
210                 i_result        = LibEditText_UndoInfo_ReadUndoInfo(
211                                                         p_tinfo, &t_udinfo, dw_line, dw_pos, pb_now, 0x00 );
212
213                 switch( t_udinfo.b_cmd )        {
214                         case LIBEDITTEXT_UNDOCMD_INSERTLINE:
215                                 snprintf( str_cmd, 127, "  [%05u] InsertLine   ", dw_cnt);      break;
216                         case LIBEDITTEXT_UNDOCMD_DELETELINE:
217                                 snprintf( str_cmd, 127, "  [%05u] DeleteLine   ", dw_cnt);      break;
218                         case LIBEDITTEXT_UNDOCMD_INSERTSTRING:
219                                 snprintf( str_cmd, 127, "  [%05u] InsertString ", dw_cnt);      break;
220                         case LIBEDITTEXT_UNDOCMD_DELETESTRING:
221                                 snprintf( str_cmd, 127, "  [%05u] DeleteString ", dw_cnt);      break;
222                         case LIBEDITTEXT_UNDOCMD_INSERTCHAR:
223                                 snprintf( str_cmd, 127, "  [%05u] InsertChar   ", dw_cnt);      break;
224                         case LIBEDITTEXT_UNDOCMD_DELETECHAR:
225                                 snprintf( str_cmd, 127, "  [%05u] DeleteChar   ", dw_cnt);      break;
226                         default:
227                                 snprintf( str_cmd, 127, "  [%05u] *** Command Error!! [%2x] *** \n",
228                                                                                                         dw_cnt, t_udinfo.b_cmd);
229                                 i_cmdflag       = -0x01;
230                                 break;
231                 }
232
233                 if( 0x03 <= b_putflag ) {
234                         fputs( str_cmd, stdout );
235                         
236                         if( 0x00 == i_cmdflag ) {
237                                 dw_line -= t_udinfo.dw_plusline;
238                                 dw_pos  -= t_udinfo.dw_pluspos;
239                                 printf("[%4u:%3u] ", dw_line, dw_pos );
240         
241                                 if( 0x00 != t_udinfo.t_udflag.bf_linksz )
242                                         { printf(" Link:%4u", t_udinfo.dw_prevlength ); }
243                                 else
244                                         { fputs(" No Link. ", stdout ); }
245         
246                                 fputs(" Flag[", stdout);
247                                 if( 0x00 != t_udinfo.t_udflag.bf_redone )       { putchar('R'); }
248                                 else                                                                            { putchar(' '); }
249         
250                                 if( 0x00 != t_udinfo.t_udflag.bf_chain )        { putchar('C'); }
251                                 else                                                                            { putchar(' '); }
252                                 putchar(']');
253
254                                 if( 0x00 != t_udinfo.t_udflag.bf_line )
255                                         { printf(" Line:%u", t_udinfo.dw_line ); }
256                                 if( 0x00 != t_udinfo.t_udflag.bf_pos )
257                                         { printf(" Pos:%u", t_udinfo.dw_pos ); }
258         
259                                 if( LIBEDITTEXT_UNDOCMD_INSERTSTRING == t_udinfo.b_cmd )
260                                         { printf(" String(%u): %s", t_udinfo.dw_data, t_udinfo.pb_str ); }
261                                 else if( LIBEDITTEXT_UNDOCMD_INSERTCHAR == t_udinfo.b_cmd )             {
262                                         printf(" Data: '%c'", t_udinfo.b_data );
263                                         if( '\n' == t_udinfo.b_data )   { printf(" <ERROR!!> "); }
264                                 }
265                                 else if( LIBEDITTEXT_UNDOCMD_DELETESTRING == t_udinfo.b_cmd )
266                                         { printf(" String(%u): %s", t_udinfo.dw_data, t_udinfo.pb_str ); }
267                                 else if( LIBEDITTEXT_UNDOCMD_DELETECHAR == t_udinfo.b_cmd )
268                                         { printf(" Data: '%c'", t_udinfo.b_data ); }
269                                 puts("");
270                         }
271                 }
272
273                 dw_line = t_udinfo.dw_line;
274                 dw_pos  = t_udinfo.dw_pos;
275
276                 dw_cnt++;
277                 pb_undo                 -= t_udinfo.dw_prevlength;
278         }while((0 < t_udinfo.dw_prevlength) && ( 0x00 == i_cmdflag ) );
279
280         if( 0x00 == i_cmdflag )         {
281                 if( 0 != dw_line )              {
282                         printf("  Error!: Last Line in Undo-Info is not Line 0. (%u)\n", dw_line );
283                         i_cmdflag       = -0x02;
284                 }
285                 if( 0 != dw_pos )       {
286                         printf("  Error!: Last Pos. in Undo-Info is not Position 0. (%u)\n", dw_pos );
287                         i_cmdflag       = -0x03;
288                 }
289         }
290
291         return i_cmdflag;
292 }
293
294
295 /*----------------------------------------------------------------------
296 ----------------------------------------------------------------------*/
297 LIBEDITTEXT_DEBUG_EXTERN
298 int
299         LibEditText_Debug_Cursor(
300                 LibEditText_TextInfo            *p_tinfo,
301                 Byte b_putflag )
302 {
303         DWord   dw_cnt;
304         LibEditText_Cursor      *p_cursor;
305         
306         if( 0x00 != b_putflag )         {
307                 puts("[5] Cursor Info ---2----+----3----+----4----+----5----+----6----+----7----+----8");
308         }
309
310         for( dw_cnt = 0; dw_cnt < DRD64_LIBEDITTEXT_DEFAULT_MAX_CURSORS; dw_cnt++ )     {
311                 p_cursor        = &(p_tinfo->t_cursor[ dw_cnt ]);
312
313                 if( 0 == p_cursor->dw_rangelines )      {
314                         if( 0x00 != b_putflag )
315                                 { printf( "  Cursor %u: Not Alloced.\n", dw_cnt ); }
316                         continue;
317                 }
318
319                 if( 0x00 != b_putflag )         {
320                         printf( "  Cursor %u: (RangeLines: %u, Updates: %s) \n",
321                                                 dw_cnt, p_cursor->dw_rangelines,
322                                                 ((0x00 != p_cursor->b_update) ? "YES" : "NO") );
323
324                         if( 1 < p_cursor->dw_rangelines )       {
325                                 printf("    Start : [%5u] (ID:%u)\n",
326                                                 p_cursor->dw_start_line, p_cursor->dw_start_lineid );
327                         }
328
329                         printf("    Center: [%5u:%3u] (ID:%u)\n",
330                                                 p_cursor->dw_line, p_cursor->dw_pos, p_cursor->dw_lineid );
331
332                         if( 1 < p_cursor->dw_rangelines )       {
333                                 printf("    End   : [%5u] (ID:%u)\n",
334                                                 p_cursor->dw_end_line, p_cursor->dw_end_lineid );
335                         }
336                 }
337         }
338
339         return 0x00;
340 }
341
342
343 /*----------------------------------------------------------------------
344 ----------------------------------------------------------------------*/
345 int
346         LibEditText_Debug_EmptyChain(
347                 LibEditText_TextInfo            *p_tinfo,
348                 Byte b_putflag )
349 {
350         int             i_cnt;
351         DWord   dw_nowlen;
352         DWord   dw_lencount     = 1;
353         LibEditText_LineInfo    *p_line;
354
355         if( 0x00 != b_putflag )         {
356                 puts("[3] Empty LineInfo Chain ----3----+----4----+----5----+----6----+----7----+----8");
357         }
358
359         for( i_cnt = 0; i_cnt < DRD64_LIBEDITTEXT_DEFAULT_LINESORT_ARRAYS; i_cnt++ )    {
360                 p_line          = LINFO(p_tinfo, p_tinfo->dw_empty[i_cnt]);
361                 if( NULL == p_line )    { continue; }
362
363                 dw_nowlen       = p_line->dw_linelen;
364                 dw_lencount     = 0;
365
366                 while( NULL != p_line )         {
367                         if( dw_nowlen < p_line->dw_linelen )    {
368                                 if( 0x00 != b_putflag )
369                                         { printf("  Empty Line Length=%u : Chains: %u\n", dw_nowlen, dw_lencount ); }
370                                 dw_lencount = 1;
371                                 dw_nowlen       = p_line->dw_linelen;
372                                 if( 0 == dw_nowlen )    { return -0x02; }
373                         }       
374                         else if( dw_nowlen > p_line->dw_linelen )
375                                 { return -0x03; }
376                         else
377                                 { dw_lencount++; }
378                         p_line  = LINFO(p_tinfo, p_line->dw_sortnext);
379                 }
380
381                 if( 0x00 != b_putflag )
382                         { printf("  Empty Line Length=%u : Chains: %u\n", dw_nowlen, dw_lencount ); }
383         }
384
385         return 0x00;
386 }
387
388
389 /*----------------------------------------------------------------------
390 ----------------------------------------------------------------------*/
391 int
392         LibEditText_Debug_SortChain(
393                 LibEditText_TextInfo            *p_tinfo,
394                 Byte b_putflag )
395 {
396         int             i_cnt;
397         DWord   dw_nowlen;
398         DWord   dw_lencount;
399         LibEditText_LineInfo            *p_line;
400
401         assert( NULL != p_tinfo );
402
403         if( 0x00 != b_putflag )         {
404                 puts("[2] LineInfo SortChain -+----3----+----4----+----5----+----6----+----7----+----8");
405         }
406
407         for( i_cnt = 0; i_cnt < DRD64_LIBEDITTEXT_DEFAULT_LINESORT_ARRAYS; i_cnt++ )    {
408                 p_line          = LINFO(p_tinfo, p_tinfo->dw_linesort[i_cnt]);
409                 if( NULL == p_line )    { continue; }
410
411                 dw_nowlen       = p_line->dw_linelen;
412                 if( 0 == dw_nowlen )    { return -0x01; }
413                 dw_lencount     = 0;
414
415                 while( NULL != p_line )         {
416                         if( dw_nowlen < p_line->dw_linelen )    {
417                                 if( 0x00 != b_putflag )
418                                         { printf("  Line Length=%u : Chains: %u\n", dw_nowlen, dw_lencount ); }
419                                 dw_lencount = 1;
420                                 dw_nowlen       = p_line->dw_linelen;
421                                 if( 0 == dw_nowlen )    { return -0x02; }
422                         }       
423                         else if( dw_nowlen > p_line->dw_linelen )
424                                 { return -0x03; }
425                         else
426                                 { dw_lencount++; }
427                         p_line  = LINFO(p_tinfo, p_line->dw_sortnext);
428                 }
429
430                 if( 0x00 != b_putflag )
431                         { printf("  Line Length=%u : Chains: %u\n", dw_nowlen, dw_lencount ); }
432         }
433
434         return 0x00;
435 }
436
437
438 /*----------------------------------------------------------------------
439 ----------------------------------------------------------------------*/
440 int
441         LibEditText_Debug_DebugSection(
442                 LibEditText_TextInfo    *p_tinfo,
443                 Byte b_putlevel )
444 {
445         DWord   dw_section;
446         LibEditText_LineSection *p_section;
447
448         if( 0x00 != b_putlevel ) {
449                 puts("[4] LineSection Info ---+----3----+----4----+----5----+----6----+----7----+----8");
450         }
451
452         for( dw_section = 0; dw_section < p_tinfo->dw_sections; dw_section++ )  {
453                 p_section       = (p_tinfo->p_section + dw_section);
454                 if( NULL == p_section )         { return -0x01; }
455
456                 if( 0x00 != b_putlevel ) {
457                         printf("  Section %04u: [%4u] LineID: %u\n",
458                                         dw_section, p_section->dw_line, p_section->dw_linfoid );
459                 }
460         }
461         
462         return 0x00;
463 }
464
465
466 /*----------------------------------------------------------------------
467 ----------------------------------------------------------------------*/
468 LIBEDITTEXT_DEBUG_EXTERN
469 int
470         LibEditText_Debug_DumpTextData(
471                 LibEditText_TextInfo    *p_tinfo,
472                 Byte b_putlevel )
473 {
474         DWord           dw_nowrow;
475         Byte            *pb_now;
476         LibEditText_LineInfo    *p_before;
477         LibEditText_LineInfo    *p_line;
478         LibEditText_LineInfo    *p_tmp;
479
480         if( 0x02 > b_putlevel )         { return 0x00; }
481         
482         puts("[8] Text Data *********** ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8");
483
484         p_before        = NULL;
485         p_line          = LINFO(p_tinfo, p_tinfo->dw_line_start);
486
487         puts(  " ROW  [strz:bufz (INFID)] <Text Data>");
488         for( dw_nowrow = 0; dw_nowrow < p_tinfo->dw_maxline; dw_nowrow++ )      {
489                 printf("%05u [%4u:%4u (%05u)] ",
490                                         dw_nowrow, p_line->dw_strlen, p_line->dw_linelen, p_line->dw_id );
491
492                 pb_now  = p_tinfo->pb_text + p_line->dw_start;
493
494                 fputs( (char *)pb_now, stdout );
495
496                 p_tmp   = LINFO(p_tinfo, p_line->dw_before);
497                 if( p_before != p_tmp ) { return -0x05; }
498                 p_before        = p_line;
499                 p_line          = LINFO(p_tinfo, p_line->dw_next);
500         }
501
502         if( NULL != p_line )    { return -0x06; }
503
504         puts("");
505         puts("************************* ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8");
506
507         return 0x00;
508 }
509
510
511 /*----------------------------------------------------------------------
512 ----------------------------------------------------------------------*/
513 LIBEDITTEXT_DEBUG_EXTERN
514 int
515         LibEditText_Debug_DebugTextInfo(
516                 int     i_tinfoid,
517                 Byte b_putflag,
518                 char    *pstr_title )
519 {
520         int                     i_result;
521         LibEditText_TextInfo    *p_tinfo;
522
523         if( 0 > i_tinfoid )             { return -0x01; }
524         p_tinfo = LibEditText_System_GetTextInfo( i_tinfoid );
525         if( NULL == p_tinfo )   { return -0x02; }
526         
527         /* 1st: Check TextInfo Strcut Data --- */
528         if( 0x00 != b_putflag )         {
529                 puts("");
530                 puts(  "********************************************************************************");
531                 if( NULL != pstr_title )        {
532                         puts( pstr_title );
533                         puts(  "********************************************************************************");
534                 }
535
536                 puts("[1] TextInfo Struct Data ----3----+----4----+----5----+----6----+----7----+----8");
537                 printf("  TextInfo Struct ID: %d\n", p_tinfo->i_fd);
538                 printf("  Path: %s\n", p_tinfo->str_pathname );
539                 printf("  File: %s\n", p_tinfo->str_filename );
540                 printf("  Lines: %u,  Buffer Lines: %u\n", p_tinfo->dw_maxline, p_tinfo->dw_bufline );
541                 printf("    (Start LineID:%u,  End LineID:%u\n", p_tinfo->dw_line_start, p_tinfo->dw_line_end );
542                 printf("  Buffer size: %u, Used Last-Byte:%u\n", p_tinfo->dw_bufsize, p_tinfo->dw_lastsize );
543                 printf("  FileDescriptor: %d, File SubType: %04x\n", p_tinfo->i_fd, p_tinfo->w_subtype );
544                 puts(  "  LineSection Info. ---");
545                 printf("    Alloc LineSections: %u,  Sections: %u,  Section Steps: %u\n"
546                                                 ,p_tinfo->dw_bufsections, p_tinfo->dw_sections, p_tinfo->dw_sect_steps );
547         }
548
549         i_result        = LibEditText_Debug_SortChain( p_tinfo, b_putflag );
550         if( 0x00 != i_result )          { return -0x3000 + i_result; }
551
552         i_result        = LibEditText_Debug_EmptyChain( p_tinfo, b_putflag );
553         if( 0x00 != i_result )          { return -0x4000 + i_result; }
554
555         i_result        = LibEditText_Debug_DebugSection( p_tinfo, b_putflag );
556         if( 0x00 != i_result )          { return -0x5000 + i_result; }
557
558         i_result        = LibEditText_Debug_Cursor( p_tinfo, b_putflag );
559         if( 0x00 != i_result )          { return -0x6000 + i_result; }
560
561         i_result        = LibEditText_Debug_UndoInfo( p_tinfo, b_putflag );
562         if( 0x00 != i_result )          { return -0x7000 + i_result; }
563
564         i_result        = LibEditText_Debug_RedoInfo( p_tinfo, b_putflag );
565         if( 0x00 != i_result )          { return -0x8000 + i_result; }
566
567         i_result        = LibEditText_Debug_DumpTextData( p_tinfo, b_putflag );
568         if( 0x00 != i_result )          { return -0x9000 + i_result; }
569
570
571         return 0x00;
572 }
573
574
575 /* EOF of drd64_.c ---------------------------------- */
576