Mercurial > projects > dwt-mac
diff dwt/dwthelper/utils.d @ 126:38807a925e24
Fixed compile errors, support for SWT language files
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Fri, 16 Jan 2009 23:35:40 +0100 |
parents | 63a09873578e |
children | 07399639c0c8 |
line wrap: on
line diff
--- a/dwt/dwthelper/utils.d Fri Jan 16 12:49:08 2009 +0100 +++ b/dwt/dwthelper/utils.d Fri Jan 16 23:35:40 2009 +0100 @@ -4,6 +4,7 @@ module dwt.dwthelper.utils; public import dwt.dwthelper.System; +public import dwt.dwthelper.Runnable; public import Math = tango.math.Math; public import tango.core.Exception : IllegalArgumentException, IOException, PlatformException; @@ -42,6 +43,8 @@ alias ClassInfo Class; +public import dwt.dwthelper.array; + void implMissing( String file, uint line ){ Stderr.formatln( "implementation missing in file {} line {}", file, line ); Stderr.formatln( "exiting ..." ); @@ -269,8 +272,7 @@ public static float NEGATIVE_INFINITY = ((-1.0f) / 0.0f); public static float NaN = (0.0f / 0.0f); public static float MAX_VALUE = 3.4028235e+38f; - public static float MIN_VALUE = float.min; - //public static float MIN_VALUE = 1.4e-45f; + public static float MIN_VALUE = 1.4e-45f; public static int SIZE = 32; this( float value ){ @@ -565,7 +567,7 @@ return tango.text.Unicode.toUpper( str ); } -public int indexOf( String str, char searched ){ +/*public int indexOf( String str, char searched ){ int res = tango.text.Util.locate( str, searched ); if( res is str.length ) res = -1; return res; @@ -575,9 +577,9 @@ int res = tango.text.Util.locate( str, searched, startpos ); if( res is str.length ) res = -1; return res; -} +}*/ -public int indexOf(String str, String ch){ +/*public int indexOf(String str, String ch){ return indexOf( str, ch, 0 ); } @@ -585,7 +587,7 @@ int res = tango.text.Util.locatePattern( str, ch, start ); if( res is str.length ) res = -1; return res; -} +}*/ public int lastIndexOf(String str, char ch){ return lastIndexOf( str, ch, str.length ); @@ -698,10 +700,10 @@ } } -public String fromStringz (char* str) -{ - return tango.stdc.stringz.fromStringz(str); -} +public alias tango.stdc.stringz.toStringz toStringz; +public alias tango.stdc.stringz.toString16z toString16z; +public alias tango.stdc.stringz.fromStringz fromStringz; +public alias tango.stdc.stringz.fromString16z fromString16z; static String toHex(uint value, bool prefix = true, int radix = 8){ return tango.text.convert.Integer.toString(