📄 library-2.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><HTML><HEAD> <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.20"> <TITLE>cc65 Library Overview: ISO C compatible library</TITLE> <LINK HREF="library-3.html" REL=next> <LINK HREF="library-1.html" REL=previous> <LINK HREF="library.html#toc2" REL=contents></HEAD><BODY><A HREF="library-3.html">Next</A><A HREF="library-1.html">Previous</A><A HREF="library.html#toc2">Contents</A><HR><H2><A NAME="s2">2.</A> <A HREF="library.html#toc2">ISO C compatible library</A></H2><P>The C library contains a large subset of the ISO C library. Functions areusually missing in areas, where there is no support on typical 6502 systems.Wide character sets are an example for this.</P><P>I will not go into detail about the ISO functions. If a function is notmentioned here explicitly, expect it to be available and to behave as definedin the C standard.</P><P>Functions that are <EM>not</EM> available:</P><P><UL><LI><CODE>tmpfile/tmpnam</CODE></LI><LI>The <CODE>scanf</CODE> family of functions</LI><LI><CODE>system</CODE></LI><LI>All functions that handle floating point numbers in some manner.</LI><LI>The <CODE>ldiv</CODE> function (cc65 is currently not able to return structswith a size not equal to 1, 2 or 4 bytes by value).</LI><LI>All functions handling wide character strings.</LI><LI>Signals and all related functions (having <CODE>SIGSEGV</CODE> would becool:-)</LI><LI><CODE>setbuf/setvbuf/ungetc</CODE></LI></UL></P><P>Functions not available on all supported systems:</P><P><UL><LI><CODE>fopen/fread/fwrite/fclose/fputs/fgets/fscanf</CODE>: The functionsare built on open/read/write/close. These latter functions are not availableon all systems.</LI><LI><CODE>ftell/fseek/fgetpos/fsetpos</CODE>: Support depends on thecapabilities of the target machine.</LI><LI><CODE>rename/remove/rewind</CODE>: Support depends on the capabilities ofthe target machine.</LI><LI><CODE>time</CODE>: Since many of the supported systems do not have a realtime clock, which means that the <CODE>time</CODE> function is not available. Pleasenote that the other functions from <CODE>time.h</CODE> <EM>are</EM> available.</LI></UL></P><P>Functions that are limited in any way:</P><P><UL><LI><CODE>strcspn/strpbrk/strspn</CODE>: These functions have a lengthlimitation of 256 for the second string argument. Since this string gives acharacter set, and there are only 256 distinct characters, this shouldn't bea problem.</LI><LI><CODE>getenv</CODE>: Since there is no such thing as an environment on allsupported systems, the <CODE>getenv</CODE> function will always return a <CODE>NULL</CODE>pointer.</LI><LI><CODE>locale</CODE>: There is no other locale than the "C" locale. Thenative locale is identical to the "C" locale.</LI></UL></P><P>In addition to these limitations, some more functions are limited if inlinedversions are requested by using -Os:</P><P><UL><LI>The <CODE>strlen</CODE> function only works for strings with a maximum lengthof 255 characters.</LI><LI>The <CODE>isxxx</CODE> character classification functions from<CODE><ctype.h></CODE> will give unpredictable results if the argument is notin character range (0..255). This limitation may be removed by #undef'ingthe function name (when using <CODE>-Os</CODE>, the functions are actually macrosthat expand to inline assembler code, but the real functions are stillavailable if the macro definition is removed).</LI></UL></P><HR><A HREF="library-3.html">Next</A><A HREF="library-1.html">Previous</A><A HREF="library.html#toc2">Contents</A></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -