add underscores to _poserror and _stroserror

This commit is contained in:
mrdudz 2022-08-29 21:06:48 +02:00
parent 89c08dc6d4
commit 3b03a96375
4 changed files with 12 additions and 8 deletions

View File

@ -147,7 +147,11 @@ int __fastcall__ vfscanf (FILE* f, const char* format, __va_list ap);
FILE* __fastcall__ fdopen (int fd, const char* mode); /* Unix */
int __fastcall__ fileno (FILE* f); /* Unix */
#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 */
#define getc(f) fgetc (f) /* ANSI */

View File

@ -39,10 +39,10 @@
void __fastcall__ _poserror (const char* msg)
void __fastcall__ __poserror (const char* msg)
{
/* Fetch the message that corresponds to _oserror */
const char* errormsg = _stroserror (_oserror);
const char* errormsg = __stroserror (_oserror);
/* Different output depending on msg */
if (msg) {

View File

@ -1,11 +1,11 @@
;
; 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. */
;
.export __stroserror
.export ___stroserror
.import __sys_oserrlist
.importzp ptr1, tmp1
@ -21,7 +21,7 @@
; and terminated by an entry with length zero that is returned if the
; error code could not be found.
__stroserror:
___stroserror:
sta tmp1 ; Save the error code
ldy #<__sys_oserrlist

View File

@ -9,9 +9,9 @@
#include <errno.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();
if (msg && *msg) {