•  Back 
  •  File functions 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File5.10.20  Foutstat                                                  TOS

 Name:         »Foutstat« - Determine the output status of a file.

 Opcode:       262

 Syntax:       int32_t Foutstat ( int16_t fh );

 Description:  The function Foutstat returns the number of bytes that 
               may be written to the file with the handle fh without 
               blocking the corresponding process.

               If the exact number of bytes cannot be specified, then 
               the value 1 will be returned.

               Note: In MagiC, the kernel first tries to implement the 
               call in Fcntl (FIONWRITE). If this subfunction of 
               dev_ioctl does not exist (i.e. the file driver returns 
               EINVFN), then dev_stat will be called. In that case 
               this can only result in the statement "One character 
               can be written" (return == 1) or "No character can be 
               written" (return == 0). FAT files always return the 
               value 1, shared memory returns the actual file length 
               minus the current position. Pipes return the number of 
               bytes still free in the block.

 Return value: The function can return the following results:

                >= 0 :    No error arisen (number of bytes)
                EIHNDL :  Invalid file handle.

               Note that currently this function always returns 1 for 
               disk files

 Availability: As of the first in MultiTOS integrated MiNT version 
               1.04, and in MagiC as of Version 3.0.

 Group:        File functions

 See Also:     Binding   Cauxos   Cconos   Cprnos   Fcntl   Finstat