8728
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2004 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
4 |
|
|
5 |
This software is furnished under a license and may be used
|
|
6 |
only in accordance with the terms of that license and with the
|
|
7 |
inclusion of the above copyright notice. This software may not
|
|
8 |
be provided or otherwise made available to, or used by, any
|
|
9 |
other person. No title to or ownership of the software is
|
|
10 |
hereby transferred.
|
|
11 |
"
|
|
12 |
"{ Package: 'stx:libbasic' }"
|
|
13 |
|
6286
|
14 |
OSFileHandle subclass:#Win32FILEHandle
|
6285
|
15 |
instanceVariableNames:''
|
|
16 |
classVariableNames:''
|
|
17 |
poolDictionaries:''
|
|
18 |
category:'OS-Windows'
|
|
19 |
!
|
|
20 |
|
6286
|
21 |
!Win32FILEHandle primitiveDefinitions!
|
6285
|
22 |
%{
|
|
23 |
#include <stdio.h>
|
|
24 |
%}
|
|
25 |
|
|
26 |
! !
|
|
27 |
|
8728
|
28 |
!Win32FILEHandle class methodsFor:'documentation'!
|
|
29 |
|
|
30 |
copyright
|
|
31 |
"
|
|
32 |
COPYRIGHT (c) 2004 by eXept Software AG
|
|
33 |
All Rights Reserved
|
|
34 |
|
|
35 |
This software is furnished under a license and may be used
|
|
36 |
only in accordance with the terms of that license and with the
|
|
37 |
inclusion of the above copyright notice. This software may not
|
|
38 |
be provided or otherwise made available to, or used by, any
|
|
39 |
other person. No title to or ownership of the software is
|
|
40 |
hereby transferred.
|
|
41 |
"
|
9102
|
42 |
!
|
6285
|
43 |
|
9102
|
44 |
documentation
|
|
45 |
"
|
|
46 |
I represent a FILE*, as used in the stdio library.
|
6285
|
47 |
|
9102
|
48 |
Since most stdio libs are inherently buggy, thread-unsave
|
|
49 |
and hard to use in a multithreading environment,
|
|
50 |
these will no longer be used in future ST/X versions.
|
|
51 |
However, they may be useful when interfacing to external
|
|
52 |
libraries...
|
|
53 |
"
|
6285
|
54 |
! !
|
|
55 |
|
6286
|
56 |
!Win32FILEHandle methodsFor:'release'!
|
6285
|
57 |
|
9102
|
58 |
closeFile
|
6285
|
59 |
"close the file"
|
|
60 |
|
|
61 |
%{
|
|
62 |
FILE *f = (FILE *)(__externalAddressVal(self));
|
|
63 |
|
|
64 |
if (f) {
|
|
65 |
__externalAddressVal(self) = NULL;
|
|
66 |
fclose(f);
|
|
67 |
}
|
|
68 |
%}.
|
|
69 |
! !
|
|
70 |
|
6286
|
71 |
!Win32FILEHandle class methodsFor:'documentation'!
|
6285
|
72 |
|
|
73 |
version
|
13748
|
74 |
^ '$Header: /cvs/stx/stx/libbasic/Win32FILEHandle.st,v 1.5 2011-09-29 11:19:13 cg Exp $'
|
6285
|
75 |
! !
|