Mercurial > projects > dwt2
comparison org.eclipse.swt.win32.win32.x86/src/org/eclipse/swt/printing/Printer.d @ 39:0ecb2b338560
further work on phobosification
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 25 Mar 2009 13:20:43 +0100 |
parents | 2e09b0e6857a |
children |
comparison
equal
deleted
inserted
replaced
38:2e09b0e6857a | 39:0ecb2b338560 |
---|---|
105 if (nameCount is deviceNames.length) { | 105 if (nameCount is deviceNames.length) { |
106 String[] newNames = new String[](deviceNames.length + 5); | 106 String[] newNames = new String[](deviceNames.length + 5); |
107 System.arraycopy(deviceNames, 0, newNames, 0, deviceNames.length); | 107 System.arraycopy(deviceNames, 0, newNames, 0, deviceNames.length); |
108 deviceNames = newNames; | 108 deviceNames = newNames; |
109 } | 109 } |
110 deviceNames[nameCount] = buf[index .. i ].idup; | 110 deviceNames[nameCount] = buf[index .. i ]._idup(); |
111 nameCount++; | 111 nameCount++; |
112 index = i + 1; | 112 index = i + 1; |
113 } | 113 } |
114 } | 114 } |
115 PrinterData printerList[] = new PrinterData[nameCount]; | 115 PrinterData printerList[] = new PrinterData[nameCount]; |
118 String driver = ""; //$NON-NLS-1$ | 118 String driver = ""; //$NON-NLS-1$ |
119 if (OS.GetProfileString(TCHARsToStr(profile), device, null, buf, length) > 0) { | 119 if (OS.GetProfileString(TCHARsToStr(profile), device, null, buf, length) > 0) { |
120 int commaIndex = 0; | 120 int commaIndex = 0; |
121 while (buf[commaIndex] !is ',' && commaIndex < length) commaIndex++; | 121 while (buf[commaIndex] !is ',' && commaIndex < length) commaIndex++; |
122 if (commaIndex < length) { | 122 if (commaIndex < length) { |
123 driver = buf[0 .. commaIndex].idup; | 123 driver = buf[0 .. commaIndex]._idup(); |
124 } | 124 } |
125 } | 125 } |
126 printerList[p] = new PrinterData(driver, device); | 126 printerList[p] = new PrinterData(driver, device); |
127 } | 127 } |
128 return printerList; | 128 return printerList; |
145 int n = OS.GetProfileString(TCHARsToStr(appName), TCHARsToStr(keyName), null, buf, length); | 145 int n = OS.GetProfileString(TCHARsToStr(appName), TCHARsToStr(keyName), null, buf, length); |
146 if (n is 0) return null; | 146 if (n is 0) return null; |
147 int commaIndex = 0; | 147 int commaIndex = 0; |
148 while(buf[commaIndex] !is ',' && commaIndex < length) commaIndex++; | 148 while(buf[commaIndex] !is ',' && commaIndex < length) commaIndex++; |
149 if (commaIndex < length) { | 149 if (commaIndex < length) { |
150 deviceName = buf[0 .. commaIndex].idup; | 150 deviceName = buf[0 .. commaIndex]._idup(); |
151 } | 151 } |
152 String driver = ""; //$NON-NLS-1$ | 152 String driver = ""; //$NON-NLS-1$ |
153 if (OS.GetProfileString(TCHARsToStr(profile), deviceName, null, buf, length) > 0) { | 153 if (OS.GetProfileString(TCHARsToStr(profile), deviceName, null, buf, length) > 0) { |
154 commaIndex = 0; | 154 commaIndex = 0; |
155 while (buf[commaIndex] !is ',' && commaIndex < length) commaIndex++; | 155 while (buf[commaIndex] !is ',' && commaIndex < length) commaIndex++; |
156 if (commaIndex < length) { | 156 if (commaIndex < length) { |
157 driver = buf[0 .. commaIndex].idup; | 157 driver = buf[0 .. commaIndex]._idup(); |
158 } | 158 } |
159 } | 159 } |
160 return new PrinterData(driver, deviceName); | 160 return new PrinterData(driver, deviceName); |
161 } | 161 } |
162 | 162 |