Next
Previous
Contents
The C library contains a large subset of the ISO C library. Functions are
usually missing in areas, where there is no support on typical 6502 systems.
Wide character sets are an example for this.
I will not go into detail about the ISO functions. If a function is not
mentioned here explicitly, expect it to be available and to behave as defined
in the C standard.
Functions that are NOT available:
- ftell/fseek/fgetpos/fsetpos
- tmpfile/tmpnam
- The scanf family of functions
- time/asctime/ctime/difftime/asctime/gmtime/localtime/mktime/strftime
- system
- All functions that handle floating point numbers in some manner.
- The div and ldiv functions (because cc65 is not able to return
structs).
- All functions handling wide character strings.
- Signals and all related functions (having SIGSEGV would be cool:-)
- rename/remove/rewind
- setbuf/setvbuf/ungetc
Functions that are limited in any way:
- fopen/fread/fwrite/fclose/fputs/fgets/fscanf....
These functions are built on open/read/write/close. Neither of these low
level functions is currently available for the supported systems, and so,
fopen and friends do not work. However, the functions exist and are tested
to some degree under the ACE operating systems (which is no longer
supported).
- strcspn/strpbrk/strspn
These functions have a length limitation of 256 for the second string
argument. Since this string gives a character set, and there are only 256
distinct characters, this shouldn't be a problem.
- getenv
Since there is no such thing as an environment on all supported systems, the
getenv function will always return a NULL pointer.
- locale
There is no other locale than the "C" locale. The native locale is identical
to the "C" locale.
In addition to these limitations, some more functions are limited if inlined
versions are requested by using -Os:
- The strlen function only works for strings with a maximum length of
255 characters.
- The isxxx character classification functions from
<ctype.h>
will give unpredictable results if the argument is not in character range
(0..255). This limitation may be removed by #undef'ing the function name
(when using -Os, the functions are actually macros that expand to inline
assembler code, but the real functions are still available if the macro
definition is removed).
Next
Previous
Contents