| 
    CNDP
    22.08.0
    
   | 
 
#include <termios.h>#include <stdarg.h>#include <stdint.h>#include <stdio.h>#include <string.h>#include <unistd.h>#include <cne_atomic.h>#include <cne_common.h>#include <cne_system.h>#include <vt100_out.h>Go to the source code of this file.
Functions | |
| CNDP_API int | cne_printf (const char *fmt,...) | 
| CNDP_API int | cne_printf_pos (int16_t r, int16_t c, const char *fmt,...) | 
| CNDP_API int | cne_fprintf (FILE *f, const char *fmt,...) | 
| CNDP_API int | cne_snprintf (char *buff, int len, const char *fmt,...) | 
| CNDP_API int | cne_cprintf (int16_t r, int16_t ncols, const char *fmt,...) | 
| CNDP_API int | cne_vsnprintf (char *buff, int len, const char *fmt, va_list ap) | 
| CNDP_API int | cne_vprintf (const char *fmt, va_list ap) | 
CNE cursor and color support for VT100 using ANSI color escape codes.
Definition in file cne_stdio.h.
| CNDP_API int cne_printf | ( | const char * | fmt, | 
| ... | |||
| ) | 
A printf like routine to output to tty file descriptor.
| fmt | The formatting string for a printf like API | 
| CNDP_API int cne_printf_pos | ( | int16_t | r, | 
| int16_t | c, | ||
| const char * | fmt, | ||
| ... | |||
| ) | 
cursor position the text at the given location for r and c.
| r | The row to place the text. | 
| c | The column to place the text. | 
| fmt | The cne_printf() like format string. | 
| CNDP_API int cne_fprintf | ( | FILE * | f, | 
| const char * | fmt, | ||
| ... | |||
| ) | 
Routine similar to fprintf() to output text to a file descriptor.
| f | The file descriptor to output the text to. | 
| fmt | The format string to output. | 
| CNDP_API int cne_snprintf | ( | char * | buff, | 
| int | len, | ||
| const char * | fmt, | ||
| ... | |||
| ) | 
Format a string with color formatting and return the number of bytes
| buff | The buffer to place the formatted string with color | 
| len | The max length of the buff array | 
| fmt | The formatting string to use with any arguments | 
| CNDP_API int cne_cprintf | ( | int16_t | r, | 
| int16_t | ncols, | ||
| const char * | fmt, | ||
| ... | |||
| ) | 
Output a string at a given row/column using printf like formatting. Centering the text on the console display, using the ncols value
| r | The row to start the print out of the string. | 
| ncols | Number of columns on the line. Used to center the text on the line. | 
| fmt | The formatting string to use to print the text data. | 
| CNDP_API int cne_vsnprintf | ( | char * | buff, | 
| int | len, | ||
| const char * | fmt, | ||
| va_list | ap | ||
| ) | 
vsnprintf() like function using va_list pointer with color tags.
| buff | The output buffer to place the text | 
| len | The length of the buff array | 
| fmt | The format string with color tags | 
| ap | The va_list pointer to be used byt vsnprintf() | 
| CNDP_API int cne_vprintf | ( | const char * | fmt, | 
| va_list | ap | ||
| ) | 
vprintf() like function using va_list pointer with color tags.
| fmt | The format string with color tags | 
| ap | The va_list pointer to be used |