Revision history for DevTranslateHeader


Revision [22149]

Last edited on 2018-02-04 14:54:38 by JeffMarshall [fix title and back links (no content?)]
Additions:
{{fbdoc item="title" value="C Header Translation Tutorial"}}----
How to translate C headers to ""FreeBASIC""

==Under Construction==

{{fbdoc item="back" value="DevToc|FreeBASIC Developer Information"}}
{{fbdoc item="back" value="DocToc|Table of Contents"}}
Deletions:
=====Under Construction=====


Revision [15707]

Edited on 2012-01-16 02:30:12 by SirMud [fix title and back links (no content?)]
Additions:
=====Under Construction=====
Deletions:
{{fbdoc item="title" value="C Header Translation Style Guide"}}----

====About This Guide====
This guide is not a C tutorial or a step by step guide for converting headers. This is a style guide which represents the ##ideal## header we would like to maintain. Currently not all of the headers under our control conform to this guide 100%, but work is in progress to do this and all new contributions should attempt to use these standards.

====General====

- Translations should be very close to the original, so they look familiar and can be updated easily.
- Identifiers (including any #defines) should not be changed unless absolutely necessary.
- Smaller files may be combined into one bigger header, if they would be #included anyways and all belong to the same library.
- Original license and documentation comments should be retained.

====Coding style====

- Headers need to work with the latest FreeBASIC version.
- Naming conflicts between multiple identifiers (due to FreeBASIC's case insensitivity) or an identifier and a FreeBASIC keyword should be resolved by appending an underscore to one identifier.
- extern "c" blocks should be used instead of cdecl alias "..." for function declarations or function pointer types.
- Preprocessor directives (including #defines) should be preserved. Exception: Remove if they serve only to select options for different C compilers, i.e. extern differences, then these can be removed unless they provide support for further code. When choosing compilers the choice should favor GNU C.
- FreeBASIC keywords should be lower-case.

====Dealing with constructs not supported by FreeBASIC====

- Inline functions should be converted to a macro if appropriate.
- Preprocessor directives inside structure declarations, function bodies, or similar may need to be moved outside because in FreeBASIC they'd be scoped.
- Declarations spread across multiple lines with preprocessor directives in between them (for example function declarations, or array initializers) will need to be manually rewritten

{{fbdoc item="back" value="DevToc|FreeBASIC Developer Information"}}
{{fbdoc item="back" value="DocToc|Table of Contents"}}


Revision [15666]

Edited on 2012-01-16 01:54:45 by SirMud [fix title and back links (no content?)]
Additions:
{{fbdoc item="back" value="DevToc|FreeBASIC Developer Information"}}
{{fbdoc item="back" value="DocToc|Table of Contents"}}
Deletions:
{{fbdoc item="back" value="DevToc|Table of Contents"}}


Revision [15664]

The oldest known version of this page was created on 2012-01-16 01:52:44 by SirMud [fix title and back links (no content?)]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki



sf.net phatcode