Changeset 724b58a in mainline


Ignore:
Timestamp:
2005-05-11T16:38:30Z (20 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d34657e
Parents:
00a44bc
Message:

doxygen-style comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/debug/print.c

    r00a44bc r724b58a  
    3333
    3434
    35 static char digits[] = "0123456789abcdef";
    36 static spinlock_t printflock;
    37 
     35static char digits[] = "0123456789abcdef"; /**< Hexadecimal characters */
     36static spinlock_t printflock;              /**< printf spinlock */
     37
     38
     39/** Print NULL terminated string
     40 *
     41 * Print characters from str using putchar() until
     42 * \x00 character is reached.
     43 *
     44 * @param str Characters to print.
     45 *
     46 */
    3847void print_str(char *str)
    3948{
     
    4655
    4756
    48 /*
    49  * This is a universal function for printing hexadecimal numbers of fixed
    50  * width.
     57/** Print hexadecimal digits
     58 *
     59 * Print fixed count of hexadecimal digits from
     60 * the number num. The digits are printed in
     61 * natural left-to-right order starting with
     62 * the width-th digit.
     63 *
     64 * @param num   Number containing digits.
     65 * @param width Count of digits to print.
     66 *
    5167 */
    5268void print_fixed_hex(__native num, int width)
     
    5874}
    5975
    60 /*
    61  * This is a universal function for printing decimal and hexadecimal numbers.
    62  * It prints only significant digits.
     76
     77/** Print number in given base
     78 *
     79 * Print significant digits of a number in given
     80 * base.
     81 *
     82 * @param num  Number to print.
     83 * @param base Base to print the number in (should
     84 *             be in range 2 .. 16).
     85 *
    6386 */
    6487void print_number(__native num, int base)
     
    7598}
    7699
    77 /*
    78  * This is our function for printing formatted text.
    79  * It's much simpler than the user-space one.
    80  * We are greateful for this function.
     100
     101/** General formatted text print
     102 *
     103 * Print text formatted according the fmt parameter
     104 * and variant arguments. Each formatting directive
     105 * begins with % (percentage) character and one of the
     106 * following character:
     107 *
     108 * %    Prints the percentage character.
     109 * s    The next variant argument is threated as char*
     110 *      and printed as a NULL terminated string.
     111 * c    The next variant argument is threated as a single char.
     112 * l    The next variant argument is threated as a 32b integer
     113 *      and printed in full hexadecimal width.
     114 * L    As with 'l', but '0x' is prefixed.
     115 * w    The next variant argument is threated as a 16b integer
     116 *      and printed in full hexadecimal width.
     117 * W    As with 'w', but '0x' is prefixed.
     118 * b    The next variant argument is threated as a 8b integer
     119 *      and printed in full hexadecimal width.
     120 * N    As with 'b', but '0x' is prefixed.
     121 * d    The next variant argument is threated as integer
     122 *      and printed in standard decimal format (only significant
     123 *      digits).
     124 * x    The next variant argument is threated as integer
     125 *      and printed in standard hexadecimal format (only significant
     126 *      digits).
     127 * X    As with 'x', but '0x' is prefixed.
     128 *
     129 * All other characters from fmt except the formatting directives
     130 * are printed in verbatim.
     131 *
     132 * @param fmt Formatting NULL terminated string.
     133 *
    81134 */
    82135void printf(char *fmt, ...)
Note: See TracChangeset for help on using the changeset viewer.