[Issue 363] XHTML support
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Thu Oct 12 01:35:24 PDT 2006
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=363
thomas-dloop at kuehne.cn changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |
------- Comment #4 from thomas-dloop at kuehne.cn  2006-10-12 03:35 -------
The html.c source included in dmd-0.168/0.169 isn't the source used for
compiling dmd-0.168/0.169. Thus the dmd binaries don't support parsing of XHTML
source files.
html.c:529: int lineSepLength = isLineSeperator(p);
The implementation of isLineSeparator can't be found in DMD's frontend
sources(it was introduced into GDC-0.10's frontend for simplifying parsing).
Due to a typo, GDC calls this function isLineSeperator instead of
isLineSeparator.
/**
 * identify DOS, Linux, Mac, Next and Unicode line endings
 * 0 if this is no line separator
 * >0 the length of the separator
 * Note: input has to be UTF-8
 */
static int isLineSeparator(const unsigned char* p){
        // Linux
        if( p[0]=='\n'){
                return 1;
        }
        // Mac & Dos
        if( p[0]=='\r'){
                return (p[1]=='\n') ? 2 : 1;
        }
        // Unicode (line || paragraph sep.)
        if( p[0]==0xE2 && p[1]==0x80 && (p[2]==0xA8 || p[2]==0xA9)){
                return 3;
        }
        // Next
        if( p[0]==0xC2 && p[1]==0x85){
                return 2;
        }
        return 0;
}
-- 
    
    
More information about the Digitalmars-d-bugs
mailing list