VirtualBox

Changeset 16169 in vbox


Ignore:
Timestamp:
Jan 22, 2009 2:17:56 PM (16 years ago)
Author:
vboxsync
Message:

Update the correct place of our Changelog file to match reality.
Correct grammos & typos while I'm here.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/VBox-CodingGuidelines.cpp

    r9396 r16169  
    4444 *
    4545 *      - Use static wherever possible. This makes the namespace less polluted
    46  *        and avoid nasty name clash problems which can occure, especially on
     46 *        and avoid nasty name clash problems which can occur, especially on
    4747 *        Unix like systems. (1)
    4848 *
     
    6161 *        them from defines.
    6262 *
    63  *      - Pointer typedefs start with 'P'. If pointer to const value then 'PC'.
    64  *
    65  *      - Function typedefs start with 'FN'. If pointer to one then 'PFN'.
     63 *      - Pointer typedefs start with 'P'. If pointer to const then 'PC'.
     64 *
     65 *      - Function typedefs start with 'FN'. If pointer to FN then 'PFN'.
    6666 *
    6767 *      - All files are case sensitive.
     
    7171 *      - char strings are UTF-8.
    7272 *
    73  *      - All functions returns VBox status codes. There are three general exceptions
    74  *        from this:
    75  *              -# Predicate functions. These are function which are boolean in nature
    76  *                 and usage. They return bool. The function name will include
    77  *                 'Has', 'Is' or similar.
     73 *      - All functions return VBox status codes. There are three general
     74 *        exceptions from this:
     75 *              -# Predicate functions. These are function which are boolean in
     76 *                 nature and usage. They return bool. The function name will
     77 *                 include 'Has', 'Is' or similar.
    7878 *              -# Functions which by nature cannot possibly fail.
    7979 *                 These return void.
     
    9191 *      - Other useful constructs are also put in the IPRT.
    9292 *
    93  *      - The code shall not cause compiler warnings. Check this with on ALL
     93 *      - The code shall not cause compiler warnings. Check this on ALL
    9494 *        the platforms.
    9595 *
     
    9999 *
    100100 *      - All public functions are fully documented in Doxygen style using the
    101  *        javadoc dialect (using the 'at' insdead of the 'slash' as commandprefix.)
    102  *
    103  *      - All structures in header files are described, including all of their
     101 *        javadoc dialect (using the 'at' instead of the 'slash' as
     102 *        commandprefix.)
     103 *
     104 *      - All structures in header files are described, including all their
    104105 *        members.
    105106 *
     
    107108 *        describes the intent and actual implementation.
    108109 *
    109  *      - Code which is doing things that are not immediatly comprehendable
    110  *        shall include explanatory comments!
     110 *      - Code which is doing things that are not immediately comprehensible
     111 *        shall include explanatory comments.
    111112 *
    112113 *      - Documentation and comments are kept up to date.
    113114 *
    114  *      - Headers in /include/VBox shall not contain any slash-slash C++ comments,
    115  *        only ansi C comments!
     115 *      - Headers in /include/VBox shall not contain any slash-slash C++
     116 *        comments, only ANSI C comments!
    116117 *
    117118 *
     
    123124 *     shared libraries. The Windows / PE __declspect(import) and
    124125 *     __declspect(export) constructs are the main reason for this.
    125  *     OTH, we do perhaps have a bit too detailed graining of this in VMM...
     126 *     OTOH, we do perhaps have a bit too detailed graining of this in VMM...
    126127 *
    127128 *
     
    153154 *
    154155 *      - RT_OS_WINDOWS is defined to indicate Windows. Do not use __WIN32__,
    155  *        __WIN64__ and __WIN__ because they are all deprecated and schedule
     156 *        __WIN64__ and __WIN__ because they are all deprecated and scheduled
    156157 *        for removal (if not removed already). Do not use the compiler
    157158 *        defined _WIN32, _WIN64, or similar either. The bitness can be
     
    181182 *        for this purpose.
    182183 *
    183  *      - RT_ARCH_AMD64 is defined when compiling for the AMD64 the architecture.
     184 *      - RT_ARCH_AMD64 is defined when compiling for the AMD64 architecture.
    184185 *        Do not use __AMD64__, __amd64__ or __x64_86__.
    185186 *
     
    200201 * @section sec_vbox_guideline_optional         Optional
    201202 *
    202  * First part is the actual coding style and all the prefixes the second part is
    203  * the a bunch of good advice.
     203 * First part is the actual coding style and all the prefixes. The second part
     204 * is a bunch of good advice.
    204205 *
    205206 *
     
    217218 *        @endcode
    218219 *
    219  *      - The else of an if is always first statement on a line. (No curly
     220 *      - The else of an if is always the first statement on a line. (No curly
    220221 *        stuff before it!)
    221222 *
    222  *      - else and if goes on the same line if no curly stuff is needed around the if.
     223 *      - else and if go on the same line if no { compound statement }
     224 *        follows the if.
    223225 *        Example:
    224226 *        @code
     
    254256 *
    255257 *      - In a do while construction, the while is on the same line as the
    256  *        closing bracket if any are used.
     258 *        closing "}" if any are used.
    257259 *        Example:
    258260 *        @code
     
    267269 *        disabling a few lines of code.
    268270 *
    269  *      - Sligtly complex boolean expressions are splitt into multiple lines,
     271 *      - Slightly complex boolean expressions are split into multiple lines,
    270272 *        putting the operators first on the line and indenting it all according
    271273 *        to the nesting of the expression. The purpose is to make it as easy as
     
    338340 *      - When writing code think as the compiler.
    339341 *
    340  *      - When reading code think as that it's fully of bugs - find them and fix them.
     342 *      - When reading code think as if it's full of bugs - find them and fix them.
    341343 *
    342344 *      - Pointer within range tests like:
     
    350352 *        Which is shorter and potentially faster. (1)
    351353 *
    352  *      - Avoid unnecessary casting. All pointers automatically casts down to void *,
    353  *        at least for non class instance pointers.
     354 *      - Avoid unnecessary casting. All pointers automatically cast down to
     355 *        void *, at least for non class instance pointers.
    354356 *
    355357 *      - It's very very bad practise to write a function larger than a
    356  *        screen full (1024x768) without any comprehendable and explaining comments.
     358 *        screen full (1024x768) without any comprehensibility and explaining
     359 *        comments.
    357360 *
    358361 *      - More to come....
     
    393396}
    394397@endcode
    395  * If I understood it correctly, the compiler will convert a to an unsigned long before
    396  * doing the compare.
     398 * If I understood it correctly, the compiler will convert a to an
     399 * unsigned long before doing the compare.
    397400 *
    398401 *
     
    407410 *        NEVER CHECK IN TO A BROKEN BUILD.
    408411 *
    409  *      - When checking in keep in mind that a commit is atomical and that the Tinderbox and
     412 *      - When checking in keep in mind that a commit is atomic and that the Tinderbox and
    410413 *        developers are constantly checking out the tree. Therefore do not split up the
    411  *        commit unless it's into 100% indepentant parts. If you need to split it up in order
     414 *        commit unless it's into 100% independent parts. If you need to split it up in order
    412415 *        to have sensible commit comments, make the sub-commits as rapid as possible.
    413416 *
    414  *      - Make sure you add an entry to the ChangeLog file.
     417 *      - If you make a user visible change, such as fixing a reported bug,
     418 *        make sure you add an entry to doc/manual/user_ChangeLogImpl.xml.
    415419 *
    416420 *
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette