equal
deleted
inserted
replaced
92 # define _X86_ |
92 # define _X86_ |
93 # endif |
93 # endif |
94 |
94 |
95 #ifdef WIN32 |
95 #ifdef WIN32 |
96 # undef INT |
96 # undef INT |
|
97 # undef UINT |
97 # undef Array |
98 # undef Array |
98 # undef Number |
99 # undef Number |
99 # undef Method |
100 # undef Method |
100 # undef Point |
101 # undef Point |
101 # undef Rectangle |
102 # undef Rectangle |
175 # endif |
176 # endif |
176 # ifdef __DEF_Character |
177 # ifdef __DEF_Character |
177 # define Character __DEF_Character |
178 # define Character __DEF_Character |
178 # endif |
179 # endif |
179 |
180 |
180 # define INT int |
181 # define INT STX_INT |
181 # define UINT uint |
182 # define UINT STX_UINT |
182 # define off_t long |
183 # ifndef off_t |
|
184 # define off_t long |
|
185 # endif |
183 #endif /* WIN32 */ |
186 #endif /* WIN32 */ |
184 |
187 |
185 #ifndef NO_STDIO /* use STDIO */ |
188 #ifndef NO_STDIO /* use STDIO */ |
186 # define STDIO_NEEDS_FSEEK |
189 # define STDIO_NEEDS_FSEEK |
187 # define FILEPOINTER FILE * |
190 # define FILEPOINTER FILE * |
5516 Reimplemented for speed when writing strings or byteArrays. |
5519 Reimplemented for speed when writing strings or byteArrays. |
5517 For others, falls back to general method in superclass." |
5520 For others, falls back to general method in superclass." |
5518 |
5521 |
5519 %{ |
5522 %{ |
5520 FILEPOINTER f; |
5523 FILEPOINTER f; |
5521 int len, cnt; |
5524 INT len, cnt; |
5522 OBJ fp; |
5525 OBJ fp; |
5523 int _buffered; |
5526 int _buffered; |
5524 int o_offs; |
5527 INT o_offs; |
5525 |
5528 |
5526 __INST(lastErrorNumber) = nil; |
5529 __INST(lastErrorNumber) = nil; |
5527 |
5530 |
5528 if ((__INST(handleType) == nil) |
5531 if ((__INST(handleType) == nil) |
5529 || (__INST(handleType) == @symbol(filePointer)) |
5532 || (__INST(handleType) == @symbol(filePointer)) |
5553 o_offs = (char *)__stringVal(aCollection)-(char *)__InstPtr(aCollection); |
5556 o_offs = (char *)__stringVal(aCollection)-(char *)__InstPtr(aCollection); |
5554 __WRITEBYTES_OBJ__(cnt, f, aCollection, o_offs, len, _buffered, __INST(handleType)); |
5557 __WRITEBYTES_OBJ__(cnt, f, aCollection, o_offs, len, _buffered, __INST(handleType)); |
5555 } |
5558 } |
5556 } else { |
5559 } else { |
5557 if (__INST(binary) == true) { |
5560 if (__INST(binary) == true) { |
5558 int offs; |
5561 INT offs; |
5559 |
5562 |
5560 if (__isByteArrayLike(aCollection)) { |
5563 if (__isByteArrayLike(aCollection)) { |
5561 offs = 0; |
5564 offs = 0; |
5562 len = __byteArraySize(aCollection); |
5565 len = __byteArraySize(aCollection); |
5563 } else if (__isBytes(aCollection)) { |
5566 } else if (__isBytes(aCollection)) { |
5701 ! ! |
5704 ! ! |
5702 |
5705 |
5703 !ExternalStream class methodsFor:'documentation'! |
5706 !ExternalStream class methodsFor:'documentation'! |
5704 |
5707 |
5705 version |
5708 version |
5706 ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.354 2013-01-08 17:55:11 cg Exp $' |
5709 ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.355 2013-01-10 11:43:30 cg Exp $' |
5707 ! |
5710 ! |
5708 |
5711 |
5709 version_CVS |
5712 version_CVS |
5710 ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.354 2013-01-08 17:55:11 cg Exp $' |
5713 ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.355 2013-01-10 11:43:30 cg Exp $' |
5711 ! ! |
5714 ! ! |
5712 |
5715 |
5713 |
5716 |
5714 ExternalStream initialize! |
5717 ExternalStream initialize! |