Changeset 770

Show
Ignore:
Timestamp:
02/21/10 16:56:39 (2 years ago)
Author:
Mike Wey
Message:

make sure things compile

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/gtkD2/wrap/utils/ConvParms.d

    r769 r770  
    1717 */ 
    1818 
    19 module utils.convparms; 
     19module utils.ConvParms; 
    2020 
    2121//debug = omitCode; 
     
    2323//debug = overrides; 
    2424 
     25private import std.stdio; 
     26 
    2527public struct ConvParms 
    2628{ 
    27  
    28     private import utils.GtkDClass; 
    29     private import std.stdio; 
    30      
    3129    public string inFile; 
    3230    public string outPack; 
     
    4240    public string[] prefixes; 
    4341    public bool strictPrefix;   /// include only function that match the prefix 
    44     public string[] imprts; 
     42    public string[] imports; 
    4543    public string[string] structWrap; 
    4644    public string[] noStructs; 
     
    7169        impl = null; 
    7270        strictPrefix = false; 
    73         imprts = null; 
     71        imports = null; 
    7472        structWrap = null; 
    7573        noPrefixes = null; 
     
    141139         
    142140        text ~= "\n * imports:"; 
    143         foreach ( string imp ; imprts ) 
     141        foreach ( string imp ; imports ) 
    144142        { 
    145143            text ~= "\n * \t- "~imp; 
  • branches/gtkD2/wrap/utils/GtkWrapper.d

    r769 r770  
    2222import std.file; 
    2323import std.path; 
    24  
    25 import utils.convparms; 
     24import std.stdio; 
     25import std.string; 
     26 
     27import utils.ConvParms; 
    2628import utils.DefReader; 
     29import utils.Package; 
     30import utils.Utils; 
    2731import utils.WrapError; 
    28 import utils.Package; 
    2932 
    3033void main() 
    3134{ 
    32     //create an in memory repesentation of the classes 
    33     //resolve wraped types/imports 
     35    GtkWrapper wrapper = new GtkWrapper("./"); 
     36    wrapper.proccess("APILookup.txt"); 
    3437 
    3538    //use the in memory representation to generate the d code. 
     
    6366            switch ( defReader.key ) 
    6467            { 
    65                 case "licence": 
     68                case "license": 
    6669                    licence = defReader.readBlock(); 
    6770                    break; 
     
    9497                    { 
    9598                        try 
    96                             mkdir(outDir); 
     99                            mkpath(outDir); 
    97100                        catch (FileException) 
    98101                            throw new WrapError(defReader, "Failed to create directory: "~ outDir); 
     
    132135        { 
    133136            try 
     137            { 
    134138                pack = new Package(defReader.value, srcDir, bindDir, outputRoot); 
    135             catch (Exceptoin e) 
     139                defReader.popFront(); 
     140            } 
     141            catch (Exception e) 
    136142                throw new WrapError(defReader, e.msg); 
    137143        } 
     
    186192                    convParms.interf = defReader.value; 
    187193                    break; 
     194                case "extend": 
     195                    writefln("%s(%s): extend is depreciated use extends", 
     196                        defReader.filename, defReader.lineNumber); 
    188197                case "extends": 
    189198                    convParms.extend = defReader.value; 
  • branches/gtkD2/wrap/utils/HtmlStrip.d

    r757 r770  
    2525import std.range; 
    2626import std.string : indexOf, munch, tolower; 
     27 
     28import utils.Utils; 
    2729 
    2830struct HtmlStrip 
     
    115117} 
    116118 
    117 string consumeUntil(ref string str, char sentinel, OpenRight openRight = OpenRight.no) 
    118 { 
    119     int i = str.indexOf(sentinel); 
    120  
    121     if ( openRight == OpenRight.no ) 
    122         i++; 
    123  
    124     string result = str[0..i]; 
    125     str = str[i..$]; 
    126  
    127     return result; 
    128 } 
    129  
    130119version (standAlone) 
    131120{ 
  • branches/gtkD2/wrap/utils/Package.d

    r769 r770  
    2020 
    2121import std.file; 
     22import std.path; 
     23 
     24import utils.Utils; 
    2225 
    2326class Package 
     
    5659        this.srcDir = srcDir; 
    5760        this.bindDir = bindDir; 
    58         this.outputRoor = outputRoot; 
     61        this.outputRoot = outputRoot; 
    5962 
    6063        try 
    6164        { 
    6265            if ( !exists(join(outputRoot, srcDir, bindDir)) ) 
    63                 mkdir(join(outputRoot, srcDir, bindDir)); 
     66                mkpath(join(outputRoot, srcDir, bindDir)); 
    6467        } 
    6568        catch (Exception) 
     
    7174        { 
    7275            if ( !exists(join(outputRoot, srcDir, pack)) ) 
    73                 mkdir(join(outputRoot, srcDir, pack)); 
     76                mkpath(join(outputRoot, srcDir, pack)); 
    7477        } 
    7578        catch (Exception) 
     
    7881        } 
    7982 
    80         packages[value] ~= this; 
     83        packages[value] = this; 
    8184    } 
    8285} 
  • branches/gtkD2/wrap/utils/WrapError.d

    r769 r770  
    3030    this(DefReader defReader, string msg) 
    3131    { 
     32        super(msg); 
     33 
    3234        this.file = defReader.filename; 
    3335        this.line = defReader.lineNumber; 
    34         this.msg  = msg; 
    3536    } 
    3637