Update Contributing.md

This commit is contained in:
Bob Andrews 2022-05-08 18:46:12 +02:00 committed by GitHub
parent 43af562ce1
commit fc4faa582a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 0 deletions

View File

@ -2,6 +2,8 @@ This document contains all kinds of information that you should know if you want
(''Note:'' The word "must" indicates a requirement. The word "should" indicates a recomendation.)
*this is work in progress and is constantly updated - if in doubt, please ask*
# generally
* You must obey these rules when contributing new code or documentation to cc65. We are well aware that not all existing code may respect all rules outlined here - but this is no reason for you not to respect them.
@ -88,6 +90,21 @@ if (check()) {
char* nextLine (FILE* f);
</pre>
### Header files
Headers that belong to the standard library (libc) must conform with the C standard. That means:
* all non standard functions, or functions that only exist in a certain standard, should be in #ifdefs
* the same is true for macros or typedefs
<pre>
#if __CC65_STD__ == __CC65_STD_C99__
/* stuff that only exists in C99 here */
#endif
#if __CC65_STD__ == __CC65_STD_CC65__
/* non standard stuff here */
#endif
</pre>
You can refer to Annex B of the ISO C99 standard ([here](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf) is the draft).
## Assembly Sources
* Op-code mnemonics must have lower-case letters. The names of instruction macroes may have upper-case letters.
@ -135,3 +152,10 @@ The only exception to the above are actions that are exclusive to the github act
## Wiki
* The Wiki is strictly for additional information that does not fit into the regular user manual (LinuxDoc). The wiki must not duplicate any information that is present in the user manual
# Roadmap / TODOs / open Ends
## Test suite
* specific tests to check the optimizer (rather than the codegenerator) are needed.
* we need more specific tests to check standard conformance of the library headers