OpenVMSFileHandle.st
author Stefan Vogel <sv@exept.de>
Tue, 28 Apr 2020 14:37:04 +0200
changeset 25369 b3d232a613c9
parent 4762 7c403263e1be
child 17711 39faaaf888b4
permissions -rw-r--r--
#BUGFIX by stefan class: OrderedCollection class added: #newWithCapacity: changed: #with: (send #newWithCapacity: instead of #new:) Fix TextView selection bug, where an empty line was always prepended to the selection (bug has been introduced in last version).

OSFileHandle subclass:#OpenVMSFileHandle
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'OS-OpenVMS'
!

!OpenVMSFileHandle primitiveDefinitions!
%{
#include <stdio.h>
%}

! !


!OpenVMSFileHandle methodsFor:'finalization'!

disposed
    "a file handle was garbage collected - close the underlying file"

%{
    FILE *f = (FILE *)(__externalAddressVal(self));

    if (f) {
        __externalAddressVal(self) = NULL;
        fclose(f);
    }
%}



! !

!OpenVMSFileHandle methodsFor:'release'!

close
    "close the file"

%{
    FILE *f = (FILE *)(__externalAddressVal(self));

    if (f) {
        __externalAddressVal(self) = NULL;
        fclose(f);
    }
%}.
    Lobby unregister:self



! !

!OpenVMSFileHandle class methodsFor:'documentation'!

version
    ^ '$Header: /cvs/stx/stx/libbasic/OpenVMSFileHandle.st,v 1.1 1999-09-18 11:11:28 cg Exp $'
! !