1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-08 20:31:31 +00:00

Added file variables, other cosmetic changes

git-svn-id: svn://svn.cc65.org/cc65/trunk@1688 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2002-12-01 23:39:11 +00:00
parent 11476dced6
commit ab25c627c8

View File

@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 1998-2001 Ullrich von Bassewitz */
/* (C) 1998-2002 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
@ -66,7 +66,26 @@
/*****************************************************************************/
/* Variables */
/*****************************************************************************/
/* The file stream implementation and the POSIX I/O functions will use the
* following variables to determine the file type and the disk unit to use.
*/
extern unsigned char _curunit; /* Default 8 */
extern unsigned char _filetype; /* Default 'u' */
/*****************************************************************************/
/* Characters codes (CBM charset) */
/*****************************************************************************/
#define CH_HLINE 96
#define CH_VLINE 125
#define CH_ULCORNER 176
@ -87,7 +106,15 @@
#define CH_INS 148
#define CH_ESC 95
/* constants to use with cbm_open() for opening a file for reading or
/*****************************************************************************/
/* CBM kernal functions */
/*****************************************************************************/
/* Constants to use with cbm_open() for opening a file for reading or
* writing without the need to append ",r" or ",w" to the filename.
*
* e.g.: cbm_open(2, 8, CBM_READ, "data,s");
@ -112,10 +139,25 @@ void __fastcall__ cbm_k_clrch (void);
/* BASIC-like file I/O functions
/*****************************************************************************/
/* BASIC-like file I/O functions */
/*****************************************************************************/
/* All cbm_* IO functions set _oserror (see errno.h) in case of an
* error.
*
* All cbm_* IO functions set _oserror (see errno.h) in case of an
* error. For the meaning of the errorcode see the table below.
* errorcode BASIC error
* 1 = too many files
* 2 = file open
* 3 = file not open
* 4 = file not found
* 5 = device not present
* 6 = not input file
* 7 = not output file
* 8 = missing filename
* 9 = illegal device number
*/
@ -161,19 +203,6 @@ int __fastcall__ cbm_write (unsigned char lfn, void* buffer, unsigned int size);
* _oserror contains an errorcode then (see table below).
*/
/* Errorcodes of cbm_* I/O functions:
*
* errorcode BASIC error
* 1 = too many files
* 2 = file open
* 3 = file not open
* 4 = file not found
* 5 = device not present
* 6 = not input file
* 7 = not output file
* 8 = missing filename
* 9 = illegal device number
*/