4762
|
1 |
OSFileHandle subclass:#OpenVMSFileHandle
|
|
2 |
instanceVariableNames:''
|
|
3 |
classVariableNames:''
|
|
4 |
poolDictionaries:''
|
|
5 |
category:'OS-OpenVMS'
|
|
6 |
!
|
|
7 |
|
|
8 |
!OpenVMSFileHandle primitiveDefinitions!
|
|
9 |
%{
|
|
10 |
#include <stdio.h>
|
|
11 |
%}
|
|
12 |
|
|
13 |
! !
|
|
14 |
|
|
15 |
|
|
16 |
!OpenVMSFileHandle methodsFor:'finalization'!
|
|
17 |
|
|
18 |
disposed
|
|
19 |
"a file handle was garbage collected - close the underlying file"
|
|
20 |
|
|
21 |
%{
|
|
22 |
FILE *f = (FILE *)(__externalAddressVal(self));
|
|
23 |
|
|
24 |
if (f) {
|
|
25 |
__externalAddressVal(self) = NULL;
|
|
26 |
fclose(f);
|
|
27 |
}
|
|
28 |
%}
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
! !
|
|
33 |
|
|
34 |
!OpenVMSFileHandle methodsFor:'release'!
|
|
35 |
|
|
36 |
close
|
|
37 |
"close the file"
|
|
38 |
|
|
39 |
%{
|
|
40 |
FILE *f = (FILE *)(__externalAddressVal(self));
|
|
41 |
|
|
42 |
if (f) {
|
|
43 |
__externalAddressVal(self) = NULL;
|
|
44 |
fclose(f);
|
|
45 |
}
|
|
46 |
%}.
|
|
47 |
Lobby unregister:self
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
! !
|
|
52 |
|
|
53 |
!OpenVMSFileHandle class methodsFor:'documentation'!
|
|
54 |
|
|
55 |
version
|
|
56 |
^ '$Header: /cvs/stx/stx/libbasic/OpenVMSFileHandle.st,v 1.1 1999-09-18 11:11:28 cg Exp $'
|
|
57 |
! !
|