Changeset 122

Show
Ignore:
Timestamp:
02/18/07 02:27:48 (2 years ago)
Author:
Gregor
Message:

bcdgen.d: Fixed a problem with system() and made all structs align(4) (which may be bad on a 64-bit system ...)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bcd.gen/bcd/gen/bcdgen.d

    r121 r122  
    77 *  
    88 * License: 
    9  *  Copyright (C) 2006  Gregor Richards 
     9 *  Copyright (C) 2006, 2007  Gregor Richards 
    1010 *  Copyright (C) 2006  Tomas "MrSunshine" Wilhelmsson 
    1111 *   
     
    4242alias std.string.atoi atoi; 
    4343alias std.c.stdlib.free free; 
     44alias std.process.system system; 
    4445 
    4546private import bcd.gen.libxml2; 
     
    245246    // some buffers 
    246247    dhead = genhead; // the D header (extern (C)'s) 
    247     dhead ~= "module " ~ dNamespaceBase ~ dNamespace ~ "." ~ shortName ~ ";\n"; 
     248    dhead ~= "module " ~ dNamespaceBase ~ dNamespace ~ "." ~ shortName ~ ";\nalign(4):\n"; 
    248249    if (!outputC) dhead ~= "public import bcd.bind;\n"; 
    249250    dhead ~= forcedImport; 
     
    655656        // import it in D 
    656657         
    657         // first try our own namespace 
    658         if (getDirName(sname) == baseDir) { 
     658        // first try our own namespace if we didn't use -A 
     659        if (!outputAll && getDirName(sname) == baseDir) { 
    659660            char[] baseName = sname[baseDir.length + 1 .. sname.length]; 
    660661            if (find(baseName, '.') != -1) {