Skip to content

Commit

Permalink
Removed String from the windows scaffold. Builds but does not link.
Browse files Browse the repository at this point in the history
  • Loading branch information
LindseyB committed Apr 12, 2010
1 parent 5fe6c52 commit e2f3418
Show file tree
Hide file tree
Showing 15 changed files with 152 additions and 6,392 deletions.
2 changes: 2 additions & 0 deletions core/string.d
Expand Up @@ -475,6 +475,8 @@ string formatv(string format, Variadic vars) {
dvalue = var.to!(double);
formatDouble = true;
break;
default:
break;
}

string result = "";
Expand Down
6 changes: 1 addition & 5 deletions networking/ftp.d
Expand Up @@ -444,9 +444,7 @@ protected:
case Code.NLI: //530

throw new Exception("Login Incorrect");
close();
//raiseSignal(Signal.LoginIncorrect);
break;
case Code.RFAPFI: //350
_busy.up();

Expand All @@ -459,8 +457,6 @@ protected:
case Code.RANTFUA:

throw new Exception("File does not exist on server");

break;
default:
break;
}
Expand Down Expand Up @@ -497,7 +493,7 @@ protected:
{
throw new Exception("File does not exist on local machine");
}
check = _dskt.write(f,f.length);
check = _dskt.write(f,cast(uint)f.length);
f.close();
break;
case DataMode.PrintFile:
Expand Down
4 changes: 0 additions & 4 deletions platform/win/gui/osbutton.d
Expand Up @@ -27,10 +27,6 @@ import graphics.graphics;

class OSButton : Button, WinWidget {

this(int x, int y, int width, int height, String value) {
super(x,y,width,height,value);
}

this(int x, int y, int width, int height, string value) {
super(x,y,width,height,value);
}
Expand Down
6 changes: 5 additions & 1 deletion platform/win/platform/application.d
Expand Up @@ -47,6 +47,10 @@ class ApplicationController {
void exitCode(uint value) {
_exitCode = value;
}

uint exitCode() {
return _exitCode;
}

void start() {
}
Expand Down Expand Up @@ -202,7 +206,7 @@ private:

if (chr == ' ' || chr == '\t' || chr == '\n' || chr == '\0') {
if (last != i) {
String token = new String(Unicode.toUtf8(cmdlne[last..i]));
string token = Unicode.toUtf8(cmdlne[last..i]);

args.add(token);
}
Expand Down
16 changes: 10 additions & 6 deletions platform/win/platform/vars/window.d
Expand Up @@ -18,6 +18,7 @@ import binding.win32.winuser;

import core.definitions;
import core.string;
import core.unicode;

import gui.window;

Expand Down Expand Up @@ -70,7 +71,7 @@ struct WindowPlatformVars {
HWND parenthWnd;
void* userData;

String oldTitle;
string oldTitle;

Window windowClass;

Expand Down Expand Up @@ -105,11 +106,12 @@ struct WindowPlatformVars {
if (pleaseStop) {
return;
}

oldTitle.appendChar('\0');

wstring oldTitleW = Unicode.toUtf16(oldTitle.dup);
oldTitleW ~='\0';

while(hWnd is null) {
hWnd = CreateWindowExW(iexstyle, "djehutyApp\0"w.ptr,oldTitle.ptr, cast(DWORD)(istyle | WS_CLIPSIBLINGS),
hWnd = CreateWindowExW(iexstyle, "djehutyApp\0"w.ptr,oldTitleW.ptr, cast(DWORD)(istyle | WS_CLIPSIBLINGS),
oldX, oldY, oldWidth, oldHeight, null,
cast(HMENU) null, null, cast(void*)userData);
}
Expand Down Expand Up @@ -198,8 +200,10 @@ struct WindowPlatformVars {
return;
}

oldTitle.appendChar('\0');
hWnd = CreateWindowExW(0, "djehutyApp\0"w.ptr,oldTitle.ptr, istyle ,
wstring oldTitleW = Unicode.toUtf16(oldTitle.dup);
oldTitleW ~='\0';

hWnd = CreateWindowExW(0, "djehutyApp\0"w.ptr,oldTitleW.ptr, istyle ,
oldX, oldY, oldWidth, oldHeight, null,
cast(HMENU) null, null, cast(void*)userData);

Expand Down
4 changes: 2 additions & 2 deletions platform/win/scaffold/console.d
Expand Up @@ -289,7 +289,7 @@ void ConsoleShowCaret()
SetConsoleCursorInfo(hStdout, &ccinfo);
}

void ConsolePutString(dchar[] chrs)
void ConsolePutString(char[] chrs)
{
HANDLE hStdout = GetStdHandle(STD_OUTPUT_HANDLE);

Expand All @@ -301,7 +301,7 @@ void ConsolePutString(dchar[] chrs)

// print line by line

String str = new String(Unicode.toUtf8(chrs));
string str = chrs.dup;

//wstring str = Unicode.toUtf16(chrs);

Expand Down

0 comments on commit e2f3418

Please sign in to comment.