Mercurial > projects > dwt2
comparison org.eclipse.swt.gtk.linux.x86/src/org/eclipse/swt/internal/image/GIFFileFormat.d @ 113:fb3aa8075988
D2 support for the linux port.
author | Jacob Carlborg <doob@me.com> |
---|---|
date | Wed, 06 Apr 2011 21:57:23 +0200 |
parents | c01d033c633a |
children | 536e43f63c81 |
comparison
equal
deleted
inserted
replaced
112:9f4c18c268b2 | 113:fb3aa8075988 |
---|---|
125 /* Read the 0-byte terminator at the end of the image. */ | 125 /* Read the 0-byte terminator at the end of the image. */ |
126 id = inputStream.read(); | 126 id = inputStream.read(); |
127 if (id > 0) { | 127 if (id > 0) { |
128 /* We read the terminator earlier. */ | 128 /* We read the terminator earlier. */ |
129 byte[1] arr; | 129 byte[1] arr; |
130 arr[0] = id; | 130 arr[0] = cast(byte) id; |
131 inputStream.unread( arr ); | 131 inputStream.unread( arr ); |
132 } | 132 } |
133 } catch (IOException e) { | 133 } catch (IOException e) { |
134 SWT.error(SWT.ERROR_IO, e); | 134 SWT.error(SWT.ERROR_IO, e); |
135 } | 135 } |
170 id = readID(); | 170 id = readID(); |
171 } | 171 } |
172 if (id is GIF_IMAGE_BLOCK_ID || id is GIF_TRAILER_ID) { | 172 if (id is GIF_IMAGE_BLOCK_ID || id is GIF_TRAILER_ID) { |
173 try { | 173 try { |
174 byte[1] arr; | 174 byte[1] arr; |
175 arr[0] = id; | 175 arr[0] = cast(byte) id; |
176 inputStream.unread(arr); | 176 inputStream.unread(arr); |
177 } catch (IOException e) { | 177 } catch (IOException e) { |
178 SWT.error(SWT.ERROR_IO, e); | 178 SWT.error(SWT.ERROR_IO, e); |
179 } | 179 } |
180 } | 180 } |