included errno.h instead of declaring _oserrno as external
git-svn-id: svn://svn.cc65.org/cc65/trunk@940 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -5,8 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cbm.h>
|
#include <cbm.h>
|
||||||
|
#include <errno.h>
|
||||||
extern unsigned char _oserror;
|
|
||||||
|
|
||||||
/* loads file "name" from given device to given address or to the load address
|
/* loads file "name" from given device to given address or to the load address
|
||||||
* of the file if addr is 0
|
* of the file if addr is 0
|
||||||
|
|||||||
@@ -6,8 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cbm.h>
|
#include <cbm.h>
|
||||||
|
#include <errno.h>
|
||||||
extern unsigned char _oserror;
|
|
||||||
|
|
||||||
/* It's like BASIC's: OPEN lfn, device, sec_addr, "name"
|
/* It's like BASIC's: OPEN lfn, device, sec_addr, "name"
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cbm.h>
|
#include <cbm.h>
|
||||||
|
#include <errno.h>
|
||||||
extern unsigned char _oserror;
|
|
||||||
|
|
||||||
int cbm_read(unsigned char lfn, void* buffer, unsigned int size)
|
int cbm_read(unsigned char lfn, void* buffer, unsigned int size)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,8 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cbm.h>
|
#include <cbm.h>
|
||||||
|
#include <errno.h>
|
||||||
extern unsigned char _oserror;
|
|
||||||
|
|
||||||
/* saves a memory area from start to end-1 to a file.
|
/* saves a memory area from start to end-1 to a file.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,8 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cbm.h>
|
#include <cbm.h>
|
||||||
|
#include <errno.h>
|
||||||
extern unsigned char _oserror;
|
|
||||||
|
|
||||||
int cbm_write(unsigned char lfn, void* buffer, unsigned int size) {
|
int cbm_write(unsigned char lfn, void* buffer, unsigned int size) {
|
||||||
|
|
||||||
@@ -22,7 +21,7 @@ int cbm_write(unsigned char lfn, void* buffer, unsigned int size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (cbm_k_readst()) {
|
if (cbm_k_readst()) {
|
||||||
_oserror = 5; /* device not present */
|
_oserror = 5; /* device not present */
|
||||||
byteswritten = -1;
|
byteswritten = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user