mirror of
https://github.com/cc65/cc65.git
synced 2024-06-15 02:29:32 +00:00
add underscores to _poserror and _stroserror
This commit is contained in:
parent
89c08dc6d4
commit
3b03a96375
|
@ -147,7 +147,11 @@ int __fastcall__ vfscanf (FILE* f, const char* format, __va_list ap);
|
||||||
FILE* __fastcall__ fdopen (int fd, const char* mode); /* Unix */
|
FILE* __fastcall__ fdopen (int fd, const char* mode); /* Unix */
|
||||||
int __fastcall__ fileno (FILE* f); /* Unix */
|
int __fastcall__ fileno (FILE* f); /* Unix */
|
||||||
#endif
|
#endif
|
||||||
void __fastcall__ _poserror (const char* msg); /* cc65 */
|
void __fastcall__ __poserror (const char* msg); /* cc65 */
|
||||||
|
#if __CC65_STD__ == __CC65_STD_CC65__
|
||||||
|
/* define old name with one underscore for backwards compatibility */
|
||||||
|
#define _poserror __poserror
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Masking macros for some functions */
|
/* Masking macros for some functions */
|
||||||
#define getc(f) fgetc (f) /* ANSI */
|
#define getc(f) fgetc (f) /* ANSI */
|
||||||
|
|
|
@ -39,10 +39,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void __fastcall__ _poserror (const char* msg)
|
void __fastcall__ __poserror (const char* msg)
|
||||||
{
|
{
|
||||||
/* Fetch the message that corresponds to _oserror */
|
/* Fetch the message that corresponds to _oserror */
|
||||||
const char* errormsg = _stroserror (_oserror);
|
const char* errormsg = __stroserror (_oserror);
|
||||||
|
|
||||||
/* Different output depending on msg */
|
/* Different output depending on msg */
|
||||||
if (msg) {
|
if (msg) {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
;
|
;
|
||||||
; Ullrich von Bassewitz, 17.07.2002
|
; Ullrich von Bassewitz, 17.07.2002
|
||||||
;
|
;
|
||||||
; const char* __fastcall__ _stroserror (unsigned char errcode);
|
; const char* __fastcall__ __stroserror (unsigned char errcode);
|
||||||
; /* Map an operating system error number to an error message. */
|
; /* Map an operating system error number to an error message. */
|
||||||
;
|
;
|
||||||
|
|
||||||
.export __stroserror
|
.export ___stroserror
|
||||||
.import __sys_oserrlist
|
.import __sys_oserrlist
|
||||||
.importzp ptr1, tmp1
|
.importzp ptr1, tmp1
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
; and terminated by an entry with length zero that is returned if the
|
; and terminated by an entry with length zero that is returned if the
|
||||||
; error code could not be found.
|
; error code could not be found.
|
||||||
|
|
||||||
__stroserror:
|
___stroserror:
|
||||||
sta tmp1 ; Save the error code
|
sta tmp1 ; Save the error code
|
||||||
|
|
||||||
ldy #<__sys_oserrlist
|
ldy #<__sys_oserrlist
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <geos.h>
|
#include <geos.h>
|
||||||
|
|
||||||
void __fastcall__ _poserror (const char* msg)
|
void __fastcall__ __poserror (const char* msg)
|
||||||
{
|
{
|
||||||
const char *errmsg = _stroserror(_oserror);
|
const char *errmsg = __stroserror(_oserror);
|
||||||
|
|
||||||
ExitTurbo();
|
ExitTurbo();
|
||||||
if (msg && *msg) {
|
if (msg && *msg) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user