ExternalStream.st
changeset 7737 616d849b7838
parent 7700 767e11efc326
child 7801 d930c353588d
equal deleted inserted replaced
7736:85efb0b2e62c 7737:616d849b7838
  5537 	if (__INST(binary) != true) {
  5537 	if (__INST(binary) != true) {
  5538 	    if (__isCharacter(aCharacter)) {
  5538 	    if (__isCharacter(aCharacter)) {
  5539 		c = __intVal(__characterVal(aCharacter)) & 0xFF;
  5539 		c = __intVal(__characterVal(aCharacter)) & 0xFF;
  5540     doWrite:
  5540     doWrite:
  5541 		f = __FILEVal(fp);
  5541 		f = __FILEVal(fp);
  5542 
  5542 	        if (! f) {
       
  5543 	            fprintf(stderr, "oops - fileHandle is NULL in nextPut:\n");
       
  5544 		    __INST(filePointer) = nil;
       
  5545 	            goto out;
       
  5546 	        }
  5543 
  5547 
  5544 		if (_buffered = (__INST(buffered) == true)) {
  5548 		if (_buffered = (__INST(buffered) == true)) {
  5545 		    __WRITING__(f)
  5549 		    __WRITING__(f)
  5546 		}
  5550 		}
  5547 #ifdef WIN32
  5551 #ifdef WIN32
  5566 		c = __intVal(aCharacter);
  5570 		c = __intVal(aCharacter);
  5567 		goto doWrite;
  5571 		goto doWrite;
  5568 	    }
  5572 	    }
  5569 	}
  5573 	}
  5570     }
  5574     }
       
  5575 out: ;
  5571 %}.
  5576 %}.
  5572     lastErrorNumber notNil ifTrue:[self writeError. ^ self].
  5577     lastErrorNumber notNil ifTrue:[self writeError. ^ self].
  5573     filePointer isNil ifTrue:[self errorNotOpen. ^ self].
  5578     filePointer isNil ifTrue:[self errorNotOpen. ^ self].
  5574     (mode == #readonly) ifTrue:[self errorReadOnly. ^ self].
  5579     (mode == #readonly) ifTrue:[self errorReadOnly. ^ self].
  5575     binary == true ifFalse:[
  5580     binary == true ifFalse:[
  5606 
  5611 
  5607     if (((fp = __INST(filePointer)) != nil)
  5612     if (((fp = __INST(filePointer)) != nil)
  5608 	&& (__INST(mode) != @symbol(readonly))
  5613 	&& (__INST(mode) != @symbol(readonly))
  5609     ) {
  5614     ) {
  5610 	f = __FILEVal(fp);
  5615 	f = __FILEVal(fp);
       
  5616 	if (! f) {
       
  5617 	    fprintf(stderr, "oops - fileHandle is NULL in nextPutAll:\n");
       
  5618 	    __INST(filePointer) = nil;
       
  5619 	    goto out;
       
  5620 	}
  5611 	if (_buffered = (__INST(buffered) == true)) {
  5621 	if (_buffered = (__INST(buffered) == true)) {
  5612 	    __WRITING__(f)
  5622 	    __WRITING__(f)
  5613 	}
  5623 	}
  5614 
  5624 
  5615 	if (__isString(aCollection) || __isSymbol(aCollection)) {
  5625 	if (__isString(aCollection) || __isSymbol(aCollection)) {
  5757 ! !
  5767 ! !
  5758 
  5768 
  5759 !ExternalStream class methodsFor:'documentation'!
  5769 !ExternalStream class methodsFor:'documentation'!
  5760 
  5770 
  5761 version
  5771 version
  5762     ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.262 2003-10-27 18:03:45 cg Exp $'
  5772     ^ '$Header: /cvs/stx/stx/libbasic/ExternalStream.st,v 1.263 2003-11-10 11:46:38 cg Exp $'
  5763 ! !
  5773 ! !
  5764 
  5774 
  5765 ExternalStream initialize!
  5775 ExternalStream initialize!