Changeset 87

Show
Ignore:
Timestamp:
01/22/07 00:20:57 (2 years ago)
Author:
snoyberg
Message:

Rearranged directory structure, started on dsss.conf

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/dsss-build-system/src/bintod/bintod.d

    r54 r87  
    2323import       tango.io.FileConduit; 
    2424import       tango.io.Buffer; 
    25 import       tango.io.protocol.DisplayWriter
    26 import       tango.text.convert.Unicode
    27 import       tango.text.LineIterator; 
     25import       tango.text.convert.Format
     26import       tango.text.convert.Utf
     27import       tango.text.stream.LineIterator; 
    2828import       dejavu.lang.String; 
    2929import       dejavu.lang.JObjectImpl; 
     
    6868 
    6969        parser.setInput( 
    70             new FileReader(new String(Unicode.toUtf16(aConfigPath)))); 
     70            new FileReader(new String(Utf.toUtf16(aConfigPath)))); 
    7171 
    7272        int eventType = parser.getEventType(); 
     
    114114    } 
    115115    Config        config  = parserConfig(args[1]); 
    116     auto          cfgIter = new LineIterator(new FileConduit(args[1], FileConduit.ReadWriteCreate)); 
     116    auto          cfgIter = new LineIterator!(char)(new FileConduit(args[1], FileConduit.ReadWriteCreate)); 
    117117 
    118118    FileConduit   file = new FileConduit(config.mTargetFile, FileConduit.ReadWriteCreate); 
    119119    file.truncate(); 
    120     DisplayWriter mWriter = new DisplayWriter(new Buffer(file)); 
     120    auto mWriter = new BufferedFormat!(char)(Formatter, new Buffer(file)); 
    121121 
    122     mWriter.put("//\n"c); 
    123     mWriter.put("// This file was generated with bintod\n"c); 
    124     mWriter.put("//\n"c); 
    125     mWriter.put("// The content of the config was:\n"c); 
     122   mWriter.formatln("//"); 
     123    mWriter.formatln("// This file was generated with bintod"); 
     124    mWriter.formatln("//"); 
     125    mWriter.formatln("// The content of the config was:"c); 
    126126    while (cfgIter.next) { 
    127         mWriter.put("//:"c); 
    128         mWriter.put(cfgIter.get); 
    129         mWriter.newline; 
     127        mWriter.format("//:"); 
     128        mWriter.formatln(cfgIter.get); 
    130129    } 
    131130    mWriter.formatln("module {0};", config.mTargetModule); 
    132     mWriter.put("\n"c); 
    133     mWriter.put("\n"c); 
     131    mWriter.formatln(""); 
     132    mWriter.formatln(""); 
    134133 
    135134    // Write id to variable mapper 
    136     mWriter.put("ubyte[] getDataById( char[] aId ){\n"c); 
     135    mWriter.formatln("ubyte[] getDataById( char[] aId ){"); 
    137136    foreach (ResourceData res; config.mResources) { 
    138137        mWriter.formatln("    version( {0} ){{", res.mVersion); 
    139138        mWriter.formatln("        if( aId == \"{0}\" ) return {1};", res.mId, res.mVarName); 
    140         mWriter.put("    }\n"c); 
     139        mWriter.formatln("    }"); 
    141140    } 
    142     mWriter.put("    return null;\n"c); 
    143     mWriter.put("}\n"c); 
    144     mWriter.put("\n"c); 
     141    mWriter.formatln("    return null;"c); 
     142    mWriter.formatln("}"c); 
     143    mWriter.formatln(""); 
    145144 
    146145    // Write the data 
     
    153152        foreach (uint idx, ubyte d; data) { 
    154153            if ((idx % 16) == 0) { 
    155                 mWriter.newline
    156                 mWriter.put("        "c); 
     154                mWriter.formatln("")
     155                mWriter.format("        "c); 
    157156            } 
    158157            mWriter.format("0x{0:X2}, ", d); 
    159158        } 
    160159        mWriter.formatln("];"c); 
    161         mWriter.put("}\n"c); 
    162         mWriter.put("\n\n"c); 
     160        mWriter.formatln("}"c); 
     161        mWriter.formatln(""c); 
     162        mWriter.formatln(""c); 
    163163    } 
    164164    mWriter.flush; 
  • branches/dsss-build-system/test/Makefile

    r80 r87  
    1 JAVAXMLCONVERTER=./javaxmlconvert.sh 
    2 TIOPORT=../../bin/tioport 
     1JARFILE=../bin/javaxmlconvert.jar 
     2TIOPORT=../bin/tioport 
    33TESTS=hello 
    44BUILD=bud 
     
    1818 
    1919src/%.java.xml : %-cfg.xml src/%.java 
    20     ${JAVAXMLCONVERTER} $< 
     20    java -cp ${JARFILE} javaxmlconvert.JavaXmlConverter $< 
    2121 
    2222.PHONY : all