Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages   Examples  

XgKPrint


Functions

int NutKPrintBinary (CONST char *data, int len)
 Write a buffer to the debug output.

int NutKPrintString (CONST char *str)
 Print a string on the debug output.

int NutKPrintInteger (u_long val, u_char radix, u_char width, u_char flags)
 Print a numeric value on the debug output.

int NutKPrintFormat (CONST char *fmt,...)
 Print parameters using a format string.


Function Documentation

int NutKPrintBinary CONST char *    data,
int    len
 

Write a buffer to the debug output.

The contents of the buffer is immediately sent to the output device. The function will not return unless all characters are sent.

Parameters:
data  Buffer to be written.
len  Number of characters to be printed.
Returns:
The number of characters printed or -1 in case of an error.

int NutKPrintFormat CONST char *    fmt,
...   
 

Print parameters using a format string.

This function formats and prints characters and values to a specified character output routine.

The format string consists of ordinary characters, escape sequences, and format specifications. Ordinary characters and escape sequences are copied to the output routine in the order of their appearance. The format is scanned from left to right. If a format specification is encountered, the value of the corresponding argument is converted and output according to that format specification. If there are more arguments than format specifications, the extra arguments are ignored. If there are more format specifications than arguments, the results are undefined.

Recognized format specifiers are:

  • %c prints a character.
  • %s prints a string.
  • %o prints a numerical value in octal digits.
  • %d prints a signed numerical value in deciaml digits.
  • %u prints an unsigned numerical value in decimal digits.
  • %x prints a numerical value in hexadecimal digits using lowercase letters.
  • %X prints a numerical value in hexadecimal digits using uppercase letters.
The resulting string is immediately sent to the output device. The function will not return unless all characters are sent. For buffered output use NutPrintFormat().
Parameters:
fmt  Format string.
Returns:
The number of characters printed, or a negative value in case of an output error.

int NutKPrintInteger u_long    val,
u_char    radix,
u_char    width,
u_char    flags
 

Print a numeric value on the debug output.

The numeric value will be converted to an ASCII string and printed to the debug output device.

The resulting string is immediately sent to the output device. The function will not return unless all characters are sent.

Parameters:
val  Value to be printed.
radix  Number base, may be any value between 2 and 16.
width  Minimum width or 0 if no justification required.
flags  Format flags. Any of the following may be ored:
  • FMTFLG_ZERO for output padding with zeros.
  • FMTFLG_PLUS forces printing a sign character.
  • FMTFLG_MINUS for left justification.
  • FMTFLG_SIGNED for signed values.
  • FMTFLG_CAPITAL for using capital letters with base above 10.
Returns:
The number of characters printed or -1 in case of an error.
See also:
Format flags

int NutKPrintString CONST char *    str
 

Print a string on the debug output.

The contents of the string is immediately sent to the output device. The function will not return unless all characters are sent.

Parameters:
str  String to be printed.
Returns:
The number of characters printed or -1 in case of an error.


Generated on Thu Jan 30 22:30:59 2003 for EduNet by doxygen1.2.18