OSDN Git Service

* WorkBackup: 2015/05/06(Wed) AM 08:40
authorKoine Yuusuke(koinec) <koinec@users.sourceforge.jp>
Tue, 5 May 2015 23:40:34 +0000 (08:40 +0900)
committerKoine Yuusuke(koinec) <koinec@users.sourceforge.jp>
Tue, 5 May 2015 23:40:34 +0000 (08:40 +0900)
libedittext/drd64_libedittext_lineedit.c
libedittext/drd64_libedittext_lineinfo.c
libedittext/drd64_libedittext_lineinfo.h
libedittext/drd64_libedittext_section.c
libedittext/drd64_libedittext_section.h
libedittext/drd64_libedittext_system.c
libedittext/test_libedittext_lineedit.c
libedittext/testdata/drcc_testfile.c

index e8ea10b..a5ad49c 100644 (file)
@@ -75,7 +75,7 @@ int
        if( p_line->dw_strlen < dw_pos )
                { dw_pos        = p_line->dw_strlen; }
 
-       pb_pos  = p_tinfo->pb_text + dw_pos;
+       pb_pos  = p_tinfo->pb_text + p_line->dw_start + dw_pos;
        assert( NULL != pb_pos );
 
        if( p_line->dw_strlen > dw_pos )        {
@@ -112,7 +112,7 @@ int
        if( p_tinfo->dw_maxline <= dw_line )
                { return -0x03; }
 
-       p_line  = LINFO(p_tinfo, dw_line);
+       p_line  = LibEditText_Section_SearchLine( p_tinfo, dw_line );
        if( NULL == p_line )    { return -0x03; }
 
        i_result        = LibEditText_LineEdit_InsertString( p_tinfo, p_line, dw_pos, &b_char, 1 );
@@ -144,7 +144,7 @@ int
        if( p_tinfo->dw_maxline <= dw_line )
                { return -0x03; }
 
-       p_line  = LINFO(p_tinfo, dw_line);
+       p_line  = LibEditText_Section_SearchLine( p_tinfo, dw_line );
        if( NULL == p_line )    { return -0x03; }
 
        i_len   = strnlen( pstr_string , 1024+1 );
index cea6aca..7c0246c 100644 (file)
@@ -40,6 +40,27 @@ Comment:
 /*----------------------------------------------------------------------
 ----------------------------------------------------------------------*/
 void
+       LibEditText_LineInfo_ClearLineInfo(
+               LibEditText_LineInfo    *p_line,
+               DWord   dw_linfoid )
+{
+       assert( NULL != p_line );
+       
+       p_line->dw_id           = dw_linfoid;
+       p_line->dw_start        = 0;
+       p_line->dw_strlen       = 0;
+       p_line->dw_linelen      = 0;
+       p_line->dw_before       = INVALID_LINE;
+       p_line->dw_next         = INVALID_LINE;
+       p_line->dw_sortnext     = INVALID_LINE;
+
+       return;
+}
+
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+void
        LibEditText_LineInfo_MemCopy(
                Byte    *pb_dest,
                Byte    *pb_src, 
@@ -151,6 +172,80 @@ void
 
 /*----------------------------------------------------------------------
 ----------------------------------------------------------------------*/
+LibEditText_LineInfo   *
+       LibEditText_LineInfo_SearchChain(
+               LibEditText_TextInfo    *p_tinfo, 
+               DWord   dw_sort[],
+               int             i_element,
+               DWord   dw_linelen,
+               LibEditText_LineInfo    **pp_lbefore )
+{
+       LibEditText_LineInfo    *p_lnow;
+       LibEditText_LineInfo    *p_lbefore;
+
+       p_lbefore       = NULL;
+       p_lnow          = LINFO( p_tinfo, dw_sort[i_element] );
+
+       while( NULL != p_lnow ) {
+               if( dw_linelen >= p_lnow->dw_linelen )  { break; }
+               p_lbefore       = p_lnow;
+               p_lnow          = LINFO(p_tinfo, p_lbefore->dw_sortnext);
+       }
+
+       if( NULL != pp_lbefore )        { *pp_lbefore   = p_lbefore; }
+       return p_lnow;
+}
+
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+LIBEDITTEXT_LINEINFO_EXTERN
+LibEditText_LineInfo   *
+       LibEditText_LineInfo_DeliveryLineInfo(
+               LibEditText_TextInfo    *p_tinfo,
+               DWord                                   dw_linelen )
+{
+       int             i_result;
+       DWord   dw_expandsize;
+       LibEditText_LineInfo            *p_line         = NULL;
+       
+       assert( NULL != p_tinfo );
+
+       /* Check Remain Text-Buffer --- */
+       if( p_tinfo->dw_lastsize + dw_linelen >= p_tinfo->dw_bufsize )  {
+               dw_expandsize   = (DWord)(p_tinfo->dw_bufsize
+                                       * DRD64_LIBEDITTEXT_DEFAULT_BUFSIZE_EXPANDFACTOR);
+               i_result        = LibEditText_System_ExpandTextBuffer(
+                                                                               p_tinfo, dw_expandsize );
+               if( 0x00 != i_result )  {
+                       return NULL;
+               }
+       }
+
+       i_result        = LibEditText_LineInfo_ExpandLineInfo( p_tinfo, 0 );
+       if( 0x00 != i_result )  { return NULL; }
+
+       p_line  = LINFO(p_tinfo, p_tinfo->dw_empty[0]);
+       if( NULL == p_line )    {
+               return NULL;
+       }       
+
+       p_line->dw_start                = p_tinfo->dw_lastsize;
+       p_tinfo->dw_lastsize    += dw_linelen;
+       p_line->dw_linelen              = dw_linelen;
+
+       p_tinfo->dw_empty[0]    = p_line->dw_sortnext;
+       p_line->dw_sortnext             = INVALID_LINE;
+       p_line->dw_strlen               = 0;
+
+       p_tinfo->dw_bufline--;
+
+       return p_line;
+}
+
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
 LIBEDITTEXT_LINEINFO_EXTERN
 int
        LibEditText_LineInfo_ExpandLineBuffer(
@@ -171,35 +266,20 @@ int
 
        i_element       = LibEditText_LineInfo_CalcSortChainElement( dw_linesize );
 
-       /* Search Empty Chain ---*/
-       p_lbefore       = NULL;
-       p_lnow          = LINFO( p_tinfo, p_tinfo->dw_empty[i_element] );
-       while( NULL != p_lnow ) {
-               if( dw_linesize >= p_lnow->dw_linelen ) { break; }
-               p_lbefore       = p_lnow;
-               p_lnow          = LINFO(p_tinfo, p_lbefore->dw_sortnext);
-       }
-
+       /* Search Other Line Chain ---*/
+       p_lnow  = LibEditText_LineInfo_SearchChain(
+                               p_tinfo, p_tinfo->dw_linesort, i_element, dw_linesize, &p_lbefore );
        if( NULL != p_lnow )    {
-               LibEditText_LineInfo_MoveLineBuffer( p_tinfo, p_lnow, p_line );
+               LibEditText_LineInfo_SwapLineBuffer( p_tinfo, p_lnow, p_line );
                goto goto_LibEditText_LineInfo_ExpandLineBuffer_post;
        }
 
-       /* Search Other Line Chain ---*/
-       p_lbefore       = NULL;
-       p_lnow          = LINFO( p_tinfo, p_tinfo->dw_linesort[i_element] );
-       while( NULL != p_lnow ) {
-               if( dw_linesize >= p_lnow->dw_linelen ) { break; }
-               p_lbefore       = p_lnow;
-               p_lnow          = LINFO(p_tinfo, p_lbefore->dw_sortnext);
-       }
-
-       if( NULL != p_lnow )    {
-               LibEditText_LineInfo_SwapLineBuffer( p_tinfo, p_lnow, p_line );
+       p_lnow  = LibEditText_LineInfo_GetEmptyLineInfo( p_tinfo, dw_linesize );
+       if( NULL == p_lnow )    {
                goto goto_LibEditText_LineInfo_ExpandLineBuffer_post;
+               i_result        = -0x01;
        }
 
-       i_result        = -0x01;
 
 goto_LibEditText_LineInfo_ExpandLineBuffer_post:
 
@@ -217,13 +297,65 @@ LibEditText_LineInfo      *
 {
        int             i_result;
        int             i_element;
+       LibEditText_LineInfo            *p_line;
+       LibEditText_LineInfo            *p_lbefore;
+       
+       assert( NULL != p_tinfo );
+
+       i_element       = LibEditText_LineInfo_CalcSortChainElement( dw_linelen );
+
+       // Search EmptyChain in Indicate LineLength Chain ---
+       p_lbefore       = NULL;
+       p_line  = LibEditText_LineInfo_SearchChain(
+                               p_tinfo, p_tinfo->dw_empty, i_element, dw_linelen, &p_lbefore );
+
+       if( NULL != p_line )    {
+               if( NULL != p_lbefore )
+                       { p_lbefore->dw_sortnext        = p_line->dw_sortnext; }
+               else
+                       { p_tinfo->dw_empty[i_element]  = p_line->dw_sortnext; }
+               p_line->dw_strlen       = 0;
+               p_line->dw_sortnext     = INVALID_LINE;
+       
+               p_tinfo->dw_bufline--;
+               goto    goto_LibEditText_LineInfo_GetEmptyLineInfo_post;
+       }
+
+       p_line  = LibEditText_LineInfo_DeliveryLineInfo( p_tinfo, dw_linelen );
+
+goto_LibEditText_LineInfo_GetEmptyLineInfo_post:
+
+       return p_line;
+}
+
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+/*LIBEDITTEXT_LINEINFO_EXTERN
+LibEditText_LineInfo   *
+       LibEditText_LineInfo_GetEmptyLineInfo(
+               LibEditText_TextInfo    *p_tinfo,
+               DWord                                   dw_linelen )
+{
+       int             i_result;
+       int             i_element;
        DWord   dw_expandsize;
        LibEditText_LineInfo            *p_line;
        LibEditText_LineInfo            *p_lbefore;
        
        assert( NULL != p_tinfo );
 
-       /* Check Remain Text-Buffer --- */
+       i_element       = LibEditText_LineInfo_CalcSortChainElement( dw_linelen );
+
+       // Search EmptyChain in Indicate LineLength Chain ---
+       p_lbefore       = NULL;
+       p_line  = LibEditText_LineInfo_SearchChain(
+                               p_tinfo, p_tinfo->dw_empty, i_element, dw_linelen, &p_lbefore );
+
+       if( NULL != p_line )
+               { goto goto_LibEditText_LineInfo_GetEmptyLineInfo_setresult; }
+
+       // Check Remain Text-Buffer ---
        if( p_tinfo->dw_lastsize + dw_linelen >= p_tinfo->dw_bufsize )  {
                dw_expandsize   = (DWord)(p_tinfo->dw_bufsize
                                        * DRD64_LIBEDITTEXT_DEFAULT_BUFSIZE_EXPANDFACTOR);
@@ -237,23 +369,7 @@ LibEditText_LineInfo       *
        i_result        = LibEditText_LineInfo_ExpandLineInfo( p_tinfo, 0 );
        if( 0x00 != i_result )  { return NULL; }
 
-       i_element       = LibEditText_LineInfo_CalcSortChainElement( dw_linelen );
-
-       /* Search EmptyChain in Indicate LineLength Chain ---*/
-       p_lbefore       = NULL;
-       p_line  = LINFO(p_tinfo, p_tinfo->dw_empty[i_element]);
-       if( NULL != p_line )    {
-               do {
-                       if( dw_linelen >= p_line->dw_linelen )  { break; }
-                       p_lbefore       = p_line;
-                       p_line  = LINFO(p_tinfo, p_lbefore->dw_sortnext);
-               }while( p_line != NULL );
-       }
-
-       if( NULL != p_line )
-               { goto goto_LibEditText_LineInfo_GetEmptyLineInfo_setresult; }
-
-       /* Search EmptyChain in Empty LineLength Chain ---*/
+       // Search EmptyChain in Empty LineLength Chain ---
        i_element       = 0;
        p_lbefore       = NULL;
        p_line  = LINFO(p_tinfo, p_tinfo->dw_empty[i_element]);
@@ -263,6 +379,7 @@ LibEditText_LineInfo        *
 
        p_line->dw_start                = p_tinfo->dw_lastsize;
        p_tinfo->dw_lastsize    += dw_linelen;
+       p_line->dw_linelen      = dw_linelen;
 
 goto_LibEditText_LineInfo_GetEmptyLineInfo_setresult:
 
@@ -271,9 +388,9 @@ goto_LibEditText_LineInfo_GetEmptyLineInfo_setresult:
        else
                { p_tinfo->dw_empty[i_element]  = p_line->dw_sortnext; }
        p_line->dw_strlen       = 0;
-       p_line->dw_linelen      = dw_linelen;
-       p_line->dw_before       = INVALID_LINE;
-       p_line->dw_next         = INVALID_LINE;
+//     p_line->dw_linelen      = dw_linelen;
+       //p_line->dw_before     = INVALID_LINE;
+       //p_line->dw_next               = INVALID_LINE;
        p_line->dw_sortnext     = INVALID_LINE;
        
        p_tinfo->dw_bufline--;
@@ -281,7 +398,7 @@ goto_LibEditText_LineInfo_GetEmptyLineInfo_setresult:
 goto_LibEditText_LineInfo_GetEmptyLineInfo_post:
 
        return p_line;
-}
+}*/
 
 
 /*----------------------------------------------------------------------
@@ -484,13 +601,14 @@ int
        /* Init LineInfo Data --- */
        p_lnow  = p_line + p_tinfo->dw_maxline;
        for( dw_cnt = p_tinfo->dw_maxline; dw_cnt < dw_newlines; dw_cnt++ )     {
-               p_lnow->dw_id           = dw_cnt;
-               p_lnow->dw_start        = 0;
-               p_lnow->dw_strlen       = 0;
-               p_lnow->dw_linelen      = 0;
-               p_lnow->dw_next         = INVALID_LINE;
-               p_lnow->dw_before       = INVALID_LINE;
-               p_lnow->dw_sortnext     = INVALID_LINE;
+               LibEditText_LineInfo_ClearLineInfo( p_lnow, dw_cnt );
+               //p_lnow->dw_id         = dw_cnt;
+               //p_lnow->dw_start      = 0;
+               //p_lnow->dw_strlen     = 0;
+               //p_lnow->dw_linelen    = 0;
+               //p_lnow->dw_next               = INVALID_LINE;
+               //p_lnow->dw_before     = INVALID_LINE;
+               //p_lnow->dw_sortnext   = INVALID_LINE;
                i_result        = LibEditText_LineInfo_SetEmptyLineChain( p_tinfo, p_lnow );
         p_lnow++;
     }
@@ -503,7 +621,7 @@ int
 ----------------------------------------------------------------------*/
 LIBEDITTEXT_SYSTEM_EXTERN
 LibEditText_LineInfo   *
-       LibEditText_LineInfo_InitLineInfo(
+       LibEditText_LineInfo_Init(
                LibEditText_TextInfo    *p_tinfo,
                DWord   dw_line )
 {
@@ -528,10 +646,11 @@ LibEditText_LineInfo      *
        /* Init LineInfo Data --- */
        p_lnow  = p_line;
        for( dw_cnt = 0; dw_cnt < dw_line; dw_cnt++ )   {
-               p_lnow->dw_id           = dw_cnt;
-               p_lnow->dw_next         = INVALID_LINE;
-               p_lnow->dw_before       = INVALID_LINE;
-               p_lnow->dw_sortnext     = INVALID_LINE;
+               LibEditText_LineInfo_ClearLineInfo( p_lnow, dw_cnt );
+               //p_lnow->dw_id         = dw_cnt;
+               //p_lnow->dw_next               = INVALID_LINE;
+               //p_lnow->dw_before     = INVALID_LINE;
+               //p_lnow->dw_sortnext   = INVALID_LINE;
                i_result        = LibEditText_LineInfo_SetEmptyLineChain( p_tinfo, p_lnow );
         p_lnow++;
     }
index be4477b..ec9e259 100644 (file)
@@ -75,7 +75,7 @@ LIBEDITTEXT_SYSTEM_EXTERN
        int LibEditText_LineInfo_AddSortChain(
                        LibEditText_TextInfo *p_tinfo, LibEditText_LineInfo *p_line );
 LIBEDITTEXT_SYSTEM_EXTERN
-       LibEditText_LineInfo * LibEditText_LineInfo_InitLineInfo(
+       LibEditText_LineInfo * LibEditText_LineInfo_Init(
                        LibEditText_TextInfo *p_tinfo, DWord dw_line );
 
 #ifdef LIBEDITTEXT_LINEINFO_INTERNALFUNC
index 77a0502..beccc5d 100644 (file)
@@ -38,7 +38,6 @@ Comment:
 #include"drd64_libedittext.h"
 
 /*----------------------------------------------------------------------
- * Search Line
  * Insert Line
  * Delete Line
  * Expand SectionArea
@@ -60,6 +59,128 @@ DWord inline
        return dw_sectionid;
 }
 
+#define        CALC_LINE2SECTION(m,n)  (((n)+1)/(m)->dw_sect_steps)
+#define        SECINFO(m,n)                    ((m)->p_section+(n))
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+DWord
+       LibEditText_Section_BackwardSections_toNearTargetLine(
+               LibEditText_TextInfo    *p_tinfo, 
+               DWord   dw_secid,
+               DWord   dw_targetline )
+{
+       LibEditText_LineSection *p_snow;
+       LibEditText_LineSection *p_sbefore;
+
+       assert( NULL != p_tinfo );
+       assert( p_tinfo->dw_sections > dw_secid );
+
+       if( 0 == dw_secid )             { return dw_secid; }
+
+       p_sbefore       = SECINFO(p_tinfo, dw_secid);
+
+       do{
+               dw_secid--;
+               p_snow          = SECINFO(p_tinfo, dw_secid);
+
+               if(( dw_targetline > p_snow->dw_line )
+                               && ( dw_targetline < p_sbefore->dw_line ))
+                       { return dw_secid + 1; }
+
+               p_sbefore       = p_snow;
+       }while( 0 < dw_secid );
+
+       return 0;
+}
+
+/*----------------------------------------------------------------------
+----------------------------------------------------------------------*/
+DWord
+       LibEditText_Section_ForwardSections_toNearTargetLine(
+               LibEditText_TextInfo    *p_tinfo, 
+               DWord   dw_secid,
+               DWord   dw_targetline )
+{
+       LibEditText_LineSection *p_snow;
+       LibEditText_LineSection *p_sbefore;
+
+       assert( NULL != p_tinfo );
+       assert( p_tinfo->dw_sections > dw_secid );
+
+       if( p_tinfo->dw_sections == dw_secid + 1 )      { return dw_secid; }
+
+       p_sbefore       = SECINFO(p_tinfo, dw_secid);
+
+       do{
+               dw_secid++;
+               p_snow          = SECINFO(p_tinfo, dw_secid);
+
+               if(( dw_targetline < p_snow->dw_line )
+                               && ( dw_targetline > p_sbefore->dw_line ))
+                       { return dw_secid - 1; }
+
+               p_sbefore       = p_snow;
+       }while( p_tinfo->dw_sections > dw_secid );
+
+       return p_tinfo->dw_sections - 1;
+}
+
+/*----------------------------------------------------------------------
+               //dw_line               = (p_tinfo->dw_maxline * dw_cnt) / p_tinfo->dw_sections;
+       //dw_nowsec     = (p_tinfo->dw_maxline + 1) / p_tinfo->dw_sect_steps;
+----------------------------------------------------------------------*/
+LIBEDITTEXT_SECTION_EXTERN
+LibEditText_LineInfo   *
+       LibEditText_Section_SearchLine(
+                       LibEditText_TextInfo    *p_tinfo,
+                       DWord   dw_targline )
+{
+       int             i_move  = 0;
+       DWord   dw_secid;
+       DWord   dw_line;
+       LibEditText_LineInfo    *p_line;
+       LibEditText_LineSection *p_sec;
+
+       dw_secid        = CALC_LINE2SECTION(p_tinfo, dw_targline);
+       p_sec           = SECINFO(p_tinfo, dw_secid);
+
+       if( dw_targline < p_sec->dw_line )      {
+               i_move  = -1;
+               dw_secid        = LibEditText_Section_BackwardSections_toNearTargetLine(
+                                                               p_tinfo, dw_secid, dw_targline );
+       }
+       else if( dw_targline > p_sec->dw_line ) {
+               i_move  = 1;
+               dw_secid        = LibEditText_Section_ForwardSections_toNearTargetLine(
+                                                               p_tinfo, dw_secid, dw_targline );
+       }
+       else    {
+               p_line  = LINFO(p_tinfo, p_sec->dw_linfoid);
+               goto    goto_LibEditText_Section_SearchLine_post;
+       }
+
+       p_sec   = SECINFO(p_tinfo, dw_secid);
+       dw_line = p_sec->dw_line;
+       p_line  = LINFO(p_tinfo, p_sec->dw_linfoid);
+
+       while( NULL != p_line ) {
+               if( dw_targline == dw_line )    { break; }
+
+               if( -1 == i_move )      {
+                       p_line  = LINFO(p_tinfo, p_line->dw_before);
+                       dw_line--;
+               }
+               else if( 1 == i_move )  {
+                       p_line  = LINFO(p_tinfo, p_line->dw_next);
+                       dw_line++;
+               }
+       }
+
+goto_LibEditText_Section_SearchLine_post:
+       return p_line;
+}
+
 
 /*----------------------------------------------------------------------
 ----------------------------------------------------------------------*/
index 033b83c..162cfaf 100644 (file)
@@ -52,6 +52,9 @@ Comment:
 #endif
 
 LIBEDITTEXT_SECTION_EXTERN
+       LibEditText_LineInfo    *
+               LibEditText_Section_SearchLine( LibEditText_TextInfo *p_tinfo, DWord dw_targline );
+LIBEDITTEXT_SECTION_EXTERN
        DWord inline LibEditText_CalcSectionID(
                        LibEditText_TextInfo *p_tinfo, DWord dw_line );
 LIBEDITTEXT_SECTION_EXTERN
@@ -68,6 +71,10 @@ LIBEDITTEXT_SECTION_EXTERN
                        LibEditText_TextInfo *p_tinfo );
 
 #ifdef LIBEDITTEXT_SECTION_INTERNAL
+DWord LibEditText_Section_BackwardSections_toNearTargetLine(
+       LibEditText_TextInfo *p_tinfo, DWord dw_secid, DWord dw_targetline );
+DWord LibEditText_Section_ForwardSections_toNearTargetLine(
+       LibEditText_TextInfo *p_tinfo, DWord dw_secid, DWord dw_targetline );
 DWord LibEditText_Section_SearchLine_OldSectionInfo(
        LibEditText_LineSection *p_section, LibEditText_TextInfo *p_tinfo,
                DWord dw_secid, DWord dw_line );
index 36bf957..f2b16fd 100644 (file)
@@ -161,7 +161,7 @@ int
        memset( pb_attr, 0x00, dw_bufsize );
 
        /* Alloc LineInfo Struct --- */
-       p_line  = LibEditText_LineInfo_InitLineInfo( p_tinfo, dw_bufline );
+       p_line  = LibEditText_LineInfo_Init( p_tinfo, dw_bufline );
        if( NULL == p_line )    { return -0x13; }
 
        /* Set Param. to TextInfo Struct --- */
index 296f17a..813f793 100644 (file)
@@ -60,12 +60,12 @@ void Test_LibEditText_API_InsertStringChar_toLine_test00_001(void)
        i_result        = LibEditText_AppendLine( i_tinfoid, "Line 2: \n", 9);
        CU_ASSERT( 0x00 == i_result );
 
-       i_result        = LibEditText_AppendLine( i_tinfoid, "Line 3: \n", 5);
+       i_result        = LibEditText_AppendLine( i_tinfoid, "Line 3: \n", 9);
        CU_ASSERT( 0x00 == i_result );
 
-       for( i_cnt = 0; i_cnt < 100; i_cnt++ )  {
+       for( i_cnt = 0; i_cnt < 19; i_cnt++ )   {
                c_tmp   = 0x30 + (i_cnt % 10);
-               //i_result      = LibEditText_InsertChar_toLine( i_tinfoid, 1, 7, c_tmp );
+               i_result        = LibEditText_InsertChar_toLine( i_tinfoid, 1, 7, c_tmp );
                CU_ASSERT( 0x00 == i_result );
        }
 
index 2767b82..ce5f8d7 100644 (file)
@@ -1,18 +1,25 @@
-/*DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
+/*DrDeAmOn64DrDeAmOn6
+DrDeAmOn64DrDeAmOn64D
+DeAmOn64DrDeAmOn64DrD
+AmOn64
 
                          D r . D e a m o n  6 4
-                        for INTEL64(R), AMD64(R)
+                       
+for INTEL64(R), AMD64(R)
        
-   Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
+   Copyright(C) 2007-
+009 Koine Yuusuke(koinec). All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
+modification, are per
+itted provided that the following conditions are met:
 
  1. Redistributions of source code must retain the above copyright notice,
     this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright
     notice, this list of conditions and the following disclaimer in the
-    documentation and/or other materials provided with the distribution.
+    documentation and
+or other materials provided with the distribution.
 
 THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED