UnixFileHandle.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 20:55:17 +0200
changeset 24417 03b083548da2
parent 7595 89c4c7dba914
child 17711 39faaaf888b4
permissions -rw-r--r--
#REFACTORING by exept class: Smalltalk class changed: #recursiveInstallAutoloadedClassesFrom:rememberIn:maxLevels:noAutoload:packageTop:showSplashInLevels: Transcript showCR:(... bindWith:...) -> Transcript showCR:... with:...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7595
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
     1
"
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
     2
 COPYRIGHT (c) 1999 by eXept Software AG
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
     3
              All Rights Reserved
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
     4
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
     5
 This software is furnished under a license and may be used
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
     6
 only in accordance with the terms of that license and with the
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
     8
 be provided or otherwise made available to, or used by, any
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
     9
 other person.  No title to or ownership of the software is
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    10
 hereby transferred.
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    11
"
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    12
5409
9b5890348f9c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4762
diff changeset
    13
"{ Package: 'stx:libbasic' }"
9b5890348f9c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4762
diff changeset
    14
4762
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
OSFileHandle subclass:#UnixFileHandle
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	instanceVariableNames:''
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	classVariableNames:''
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	poolDictionaries:''
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	category:'OS-Unix'
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!UnixFileHandle primitiveDefinitions!
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
%{
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
#include <stdio.h>
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
%}
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
! !
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
7595
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    28
!UnixFileHandle class methodsFor:'documentation'!
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    29
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    30
copyright
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    31
"
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    32
 COPYRIGHT (c) 1999 by eXept Software AG
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    33
              All Rights Reserved
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    34
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    35
 This software is furnished under a license and may be used
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    36
 only in accordance with the terms of that license and with the
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    37
 inclusion of the above copyright notice.   This software may not
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    38
 be provided or otherwise made available to, or used by, any
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    39
 other person.  No title to or ownership of the software is
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    40
 hereby transferred.
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    41
"
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    42
! !
4762
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
5413
4e67713bf25a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5409
diff changeset
    44
!UnixFileHandle methodsFor:'release'!
4762
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
5409
9b5890348f9c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4762
diff changeset
    46
closeFile
9b5890348f9c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4762
diff changeset
    47
    "close the underlying file"
4762
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
%{
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    FILE *f = (FILE *)(__externalAddressVal(self));
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    if (f) {
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
        __externalAddressVal(self) = NULL;
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
        fclose(f);
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
    }
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
%}
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
! !
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
!UnixFileHandle class methodsFor:'documentation'!
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
version
7595
89c4c7dba914 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5413
diff changeset
    63
    ^ '$Header: /cvs/stx/stx/libbasic/UnixFileHandle.st,v 1.4 2003-08-30 12:36:42 cg Exp $'
4762
7c403263e1be initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
! !