<sect1><tt/stdio.h/<label id="stdio.h"><p>
<itemize>
+<item><ref id="_poserror" name="_poserror">
<item><ref id="clearerr" name="clearerr">
<!-- <item><ref id="fclose" name="fclose"> -->
<!-- <item><ref id="fdopen" name="fdopen"> -->
<item><ref id="_heapblocksize" name="_heapblocksize">
<item><ref id="_heapmaxavail" name="_heapmaxavail">
<item><ref id="_heapmemavail" name="_heapmemavail">
-<item><ref id="_poserror" name="_poserror">
<item><ref id="_randomize" name="_randomize">
<item><ref id="_swap" name="_swap">
<item><ref id="abort" name="abort">
<sect1>_poserror<label id="_poserror"><p>
<quote>
-<descrip>
-<tag/Function/Print an error message for the error in <tt/_oserrno/.
+<descrip>
+<tag/Function/Print an error message for the error in <tt/_oserror/.
<tag/Header/<tt/<ref id="stdio.h" name="stdio.h">/
<tag/Declaration/<tt/void __fastcall__ _poserror (const char* msg);/
<tag/Description/<tt/_poserror/ prints an error message to <tt/stderr/. If
<tt/msg/ is not <tt/NULL/ and not an empty string, it is printed followed by
a colon and a blank. Then the error message for the current contents of
-<tt/_oserrno/ are printed followed by a newline. The message output is the
+<tt/_oserror/ are printed followed by a newline. The message output is the
same as returned by <tt/<ref id="_stroserror" name="_stroserror">/ with an
-argument of <tt/_oserrno/.
+argument of <tt/_oserror/.
<tag/Limits/
<itemize>
<item>Since operating system specific error code are - you guessed it -
operating system specific, the value in <tt/_oserror/ and the message that is
-printed depend on the cc65 target.
+printed depends on the cc65 target.
<item>The function is only available as fastcall function, so it may only
be used in presence of a prototype.
</itemize>
<tag/Function/Check if a given character is a letter or digit.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ isalnum (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a letter or digit. The return value is non zero if the character
-is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a letter or digit. The return value is zero if the character is anything
+else.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
<tag/Function/Check if a given character is a letter.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ isalpha (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a letter. The return value is non zero if the character is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a letter. The return value is zero if the character is anything else.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
<tag/Function/Check if a given character is in the ASCII (0..127) range.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ isascii (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is in the range 0..127 (the range of valid ASCII characters) and a non zero
-value if not.
+<tag/Description/The function returns a non zero value if the given argument
+is in the range 0..127 (the range of valid ASCII characters) and zero if not.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
<tag/Function/Check if a given character is a space or tab.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ isblank (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a space or tab character. The return value is non zero if the character
-is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a space or tab character. The return value is zero if the character is
+anything else.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
<tag/Function/Check if a given character is a control character.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ iscntrl (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a control character. The return value is non zero if the character
-is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a control character. The return value is zero if the character is anything
+else.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
<tag/Function/Check if a given character is a digit.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ isdigit (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a digit. The return value is non zero if the character is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a digit. The return value is zero if the character is anything else.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
space).
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ isgraph (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a printable character with the exception of space. The return value is non
-zero if the character is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a printable character with the exception of space. The return value is zero
+if the character is anything else.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
<tag/Function/Check if a given character is a lower case letter.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ islower (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a lower case letter. The return value is non zero if the character is
-anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a lower case letter. The return value is zero if the character is anything
+else.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
<tag/Function/Check if a given character is a printable character.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ isprint (int c);/
-<tag/Description/The function returns a value of zero if the given argument
+<tag/Description/The function returns a non zero value if the given argument
is a printable character (this includes the space character). The return value
-is non zero if the character is anything else.
+is zero if the character is anything else.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
space or an alphanumeric character.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ ispunct (int c);/
-<tag/Description/The function returns a value of zero if the given argument
+<tag/Description/The function returns a non zero value if the given argument
is a printable character, but not a space or anything alphanumeric. The return
-value is non zero if the character is anything else.
+value is zero if the character is anything else.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
<tag/Function/Check if a given character is a a white-space character.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ isspace (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a white space character. The return value is non zero if the character is
+<tag/Description/The function returns a non zero value if the given argument
+is a white space character. The return value is zero if the character is
anything else. The standard white space characters are: space, formfeed ('\f'),
newline ('\n'), carriage return ('\r'), horizontal tab ('\t'), and vertical tab
('\v').
<tag/Function/Check if a given character is an upper case letter.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ isupper (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is an upper case letter. The return value is non zero if the character is
-anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is an upper case letter. The return value is zero if the character is anything
+else.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
<tag/Function/Check if a given character is a hexadecimal digit.
<tag/Header/<tt/<ref id="ctype.h" name="ctype.h">/
<tag/Declaration/<tt/int __fastcall__ isxdigit (int c);/
-<tag/Description/The function returns a value of zero if the given argument
-is a hexadecimal digit (0..9, a..f and A..F). The return value is non zero
-if the character is anything else.
+<tag/Description/The function returns a non zero value if the given argument
+is a hexadecimal digit (0..9, a..f and A..F). The return value is zero if the
+character is anything else.
<tag/Limits/<itemize>
<item>When compiling with <tt/-Os/ the function is actually a macro. The
inline sequence generated by the macro will not work correctly for values
<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
<tag/Declaration/<tt/void __fastcall__ tgi_init (void);/
<tag/Description/The tgi_init function will set the default palette to the
-hardware and clear the screen.
+hardware.
<tag/Limits/<itemize>
<item>The function is only available as fastcall function, so it may only
be used in presence of a prototype.
+<item><tt/tgi_init/ will not clear the screen. This allows switching between
+text and graphics mode on platforms that have separate memory areas for the
+screens. If you want the screen cleared, call <tt/<ref id="tgi_clear"
+name="tgi_clear">/ after <tt/tgi_init/.
</itemize>
<tag/Availability/cc65
<tag/See also/Other tgi functions.
<descrip>
<tag/Function/Platform dependent code extensions.
<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
-<tag/Declaration/<tt/unsigned __fastcall__ tgi_ioctl (unsigned char code, unsigned val);/
+<tag/Declaration/<tt/unsigned __fastcall__ tgi_ioctl (unsigned char code, void* data);/
<tag/Description/Some platforms have extra display hardware that is not
supported by standard tgi functions. You can extend the driver to support
this extra hardware using tgi_ioctl functions.
<tag/Availability/cc65
<tag/See also/Other tgi functions.
<tag/Example/<verb>
-#define tgi_sprite(spr) tgi_ioctl(0, (unsigned)(spr))
-#define tgi_flip() tgi_ioctl(1, 0)
-#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (unsigned)(bgcol))
-#define tgi_setframerate(rate) tgi_ioctl(3, (unsigned)(rate))
-#define tgi_busy() tgi_ioctl(4, 0)
-#define tgi_updatedisplay() tgi_ioctl(4, 1)
+#define tgi_sprite(spr) tgi_ioctl(0, (void*)(spr))
+#define tgi_flip() tgi_ioctl(1, (void*)0)
+#define tgi_setbgcolor(bgcol) tgi_ioctl(2, (void*)(bgcol))
+#define tgi_setframerate(rate) tgi_ioctl(3, (void*)(rate))
+#define tgi_busy() tgi_ioctl(4, (void*)0)
+#define tgi_updatedisplay() tgi_ioctl(4, (void*)1)
if (!tgi_busy()) {
tgi_sprite(&background);
tgi_setcolor(TGI_COLOR_BLUE);
<tag/Header/<tt/<ref id="tgi.h" name="tgi.h">/
<tag/Declaration/<tt/void __fastcall__ tgi_pie slice (int x, int y,
unsigned char rx, unsigned char ry, unsigned sa, unsigned ea);/
-<tag/Description/The function draws an elliptic pie slice with center at x/y
+<tag/Description/The function draws an elliptic pie slice with center at x/y
and radii rx/ry using the current drawing color. The pie slice covers the angle
between sa and ea (startangle and endangle), which must be in the range
0..360.