Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Changeset 3726

Show
Ignore:
Timestamp:
07/08/08 13:41:39 (5 months ago)
Author:
keinfarbton
Message:

fix compile errors

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/experimental/D2.0/tango/io/Buffer.d

    r3724 r3726  
    740740                return ret; 
    741741        } 
    742          
     742 
    743743        /*********************************************************************** 
    744744 
     
    12561256                Returns an array representing the content, and throws 
    12571257                IOException on error 
    1258                                
     1258 
    12591259        ***********************************************************************/ 
    12601260 
     
    12631263                return slice(); 
    12641264        } 
    1265          
     1265 
    12661266        /*********************************************************************** 
    12671267 
     
    14701470 
    14711471        alias Buffer.slice  slice; 
    1472         alias Buffer.append append;  
    1473  
    1474         /*********************************************************************** 
    1475          
     1472        alias Buffer.append append; 
     1473 
     1474        /*********************************************************************** 
     1475 
    14761476                Create a GrowBuffer with the specified initial size. 
    14771477 
     
    14871487 
    14881488        /*********************************************************************** 
    1489          
     1489 
    14901490                Create a GrowBuffer with the specified initial size. 
    14911491 
     
    14991499 
    15001500        /*********************************************************************** 
    1501          
     1501 
    15021502                Read a chunk of data from the buffer, loading from the 
    15031503                conduit as necessary. The specified number of bytes is 
    1504                 loaded into the buffer, and marked as having been read  
     1504                loaded into the buffer, and marked as having been read 
    15051505                when the 'eat' parameter is set true. When 'eat' is set 
    15061506                false, the read position is not adjusted. 
     
    15111511 
    15121512        override void[] slice (uint size, bool eat = true) 
    1513         {    
     1513        { 
    15141514                if (size > readable) 
    15151515                   { 
     
    15301530                if (eat) 
    15311531                    index += size; 
    1532                 return data [i .. i + size];                
    1533         } 
    1534  
    1535         /*********************************************************************** 
    1536          
    1537                 Append an array of data to this buffer. This is often used  
     1532                return data [i .. i + size]; 
     1533        } 
     1534 
     1535        /*********************************************************************** 
     1536 
     1537                Append an array of data to this buffer. This is often used 
    15381538                in lieu of a Writer. 
    15391539 
    15401540        ***********************************************************************/ 
    15411541 
    1542         override IBuffer append (void *src, uint length)         
    1543         {                
     1542        override IBuffer append (const(void) *src, uint length) 
     1543        { 
    15441544                if (length > writable) 
    15451545                    makeRoom (length); 
     
    15511551        /*********************************************************************** 
    15521552 
    1553                 Try to fill the available buffer with content from the  
    1554                 specified conduit.  
     1553                Try to fill the available buffer with content from the 
     1554                specified conduit. 
    15551555 
    15561556                Returns the number of bytes read, or IConduit.Eof 
    1557          
     1557 
    15581558        ***********************************************************************/ 
    15591559 
     
    15641564 
    15651565                return write (&src.read); 
    1566         }  
    1567  
    1568         /*********************************************************************** 
    1569          
    1570                 Expand and consume the conduit content, up to the maximum  
     1566        } 
     1567 
     1568        /*********************************************************************** 
     1569 
     1570                Expand and consume the conduit content, up to the maximum 
    15711571                size indicated by the argument or until conduit.Eof 
    15721572 
     
    15761576 
    15771577        uint fill (uint size = uint.max) 
    1578         {    
     1578        { 
    15791579                while (readable < size) 
    15801580                       if (fill(source) is IConduit.Eof) 
     
    15861586 
    15871587                make some room in the buffer 
    1588                          
     1588 
    15891589        ***********************************************************************/ 
    15901590 
     
    15951595 
    15961596                dimension += size; 
    1597                 data.length = dimension;                
     1597                data.length = dimension; 
    15981598                return writable(); 
    15991599        } 
  • branches/experimental/D2.0/tango/io/Conduit.d

    r3724 r3726  
    4747        ***********************************************************************/ 
    4848 
    49         abstract Cutf8 toUtf8 (); 
     49        abstract Cutf8 toString (); 
    5050 
    5151        /*********************************************************************** 
     
    7474 
    7575                Returns the number of bytes read, which may be less than 
    76                 requested in dst. Eof is returned whenever an end-of-flow  
     76                requested in dst. Eof is returned whenever an end-of-flow 
    7777                condition arises. 
    7878 
     
    8787 
    8888                Returns the number of bytes written from src, which may 
    89                 be less than the quantity provided. Eof is returned when  
     89                be less than the quantity provided. Eof is returned when 
    9090                an end-of-flow condition arises. 
    9191 
     
    209209                Returns an array representing the content, and throws 
    210210                IOException on error 
    211                  
     211 
    212212        ***********************************************************************/ 
    213213 
     
    226226                Returns an array representing the content, and throws 
    227227                IOException on error 
    228                  
     228 
    229229        ***********************************************************************/ 
    230230 
     
    233233                auto index = 0; 
    234234                auto chunk = 256; 
    235                  
     235 
    236236                do { 
    237237                   if (dst.length - index < chunk) 
     
    246246 
    247247        /*********************************************************************** 
    248                  
     248 
    249249                Low-level data transfer, where max represents the maximum 
    250250                number of bytes to transfer, and tmp represents space for 
     
    321321 
    322322                Returns the number of bytes read, which may be less than 
    323                 requested in dst. Eof is returned whenever an end-of-flow  
     323                requested in dst. Eof is returned whenever an end-of-flow 
    324324                condition arises. 
    325325 
     
    351351                Returns an array representing the content, and throws 
    352352                IOException on error 
    353                                
     353 
    354354        ***********************************************************************/ 
    355355 
     
    411411 
    412412                Returns the number of bytes written from src, which may 
    413                 be less than the quantity provided. Eof is returned when  
     413                be less than the quantity provided. Eof is returned when 
    414414                an end-of-flow condition arises. 
    415415 
  • branches/experimental/D2.0/tango/stdc/stringz.d

    r3724 r3726  
    2121const(char)* toStringz (Cutf8 s, char[] tmp=null) 
    2222{ 
    23         static char[] empty = "\0"; 
     23        static auto empty = "\0"; 
    2424 
    2525        auto len = s.length; 
     
    4040 
    4141/********************************* 
    42  * Convert a series of char[] to C-style 0 terminated strings, using  
     42 * Convert a series of char[] to C-style 0 terminated strings, using 
    4343 * tmp as a workspace and dst as a place to put the resulting char*'s. 
    4444 * This is handy for efficiently converting multiple strings at once. 
     
    4949 */ 
    5050 
    51 char*[] toStringz (char[] tmp, char*[] dst, char[][] strings...) 
     51const(char)*[] toStringz (char[] tmp, const(char)*[] dst, char[][] strings...) 
    5252{ 
    5353        assert (dst.length >= strings.length); 
  • branches/experimental/D2.0/tango/sys/Process.d

    r3724 r3726  
    387387            { 
    388388                command ~= '"'; 
    389                 command ~= _args[i].substitute("\\", "\\\\").substitute(`"`, `\"`); 
     389                command ~= _args[i].substitute(cast(Cutf8)"\\", cast(Cutf8)"\\\\").substitute(cast(Cutf8)`"`, cast(Cutf8)`\"`); 
    390390                command ~= '"'; 
    391391            } 
     
    658658            memset(_info, '\0', PROCESS_INFORMATION.sizeof); 
    659659 
    660            /*  
     660           /* 
    661661            * quotes and backslashes in the command line are handled very 
    662662            * strangely by Windows.  Through trial and error, I believe that 
     
    727727                // rule 1 and be halved. 
    728728                // 
    729                  
     729 
    730730                if(nextarg[$-1] == '\\') 
    731731                {