conprint.h File Reference


Detailed Description

A simple text output console.

#include "ma.h"
#include "maarg.h"
#include "mastring.h"
#include "mavsprintf.h"

Functions

void InitConsole (void)
 Initialize the printf console.
void DisplayConsole (void)
 Display the printf console.
void PrintConsole (const char *str)
 Prints a C string to the console.
int puts (const char *str)
int printf (const char *fmt,...)
 Prints a formatted string to the console.
int vprintf (const char *fmt, va_list args)
int putchar (int character)

Variables

int gConsoleTextColor
 The console text color.
int gConsoleBackgroundColor
 The console background color.
int gConsoleLogging
 Console logging option.
MAHandle gConsoleFile
 Console file logging handle.
int gConsoleDisplay
 Console display option.


Function Documentation

void InitConsole void   ) 
 

Initialize the printf console.

See also:
PrintConsole printf

void DisplayConsole void   ) 
 

Display the printf console.

See also:
PrintConsole printf

void PrintConsole const char *  str  ) 
 

Prints a C string to the console.

Parameters:
str A C string
See also:
InitConsole printf

int puts const char *  str  ) 
 

int printf const char *  fmt,
  ...
 

Prints a formatted string to the console.

Parameters:
fmt A C string that may contain formatting
Returns:
Returns length of the printed string
Warning:
This function uses a fixed buffer size. Outputting too much data at once will cause a buffer overrun.
See also:
InitConsole PrintConsole

int vprintf const char *  fmt,
va_list  args
 

int putchar int  character  ) 
 


Variable Documentation

int gConsoleTextColor
 

The console text color.

The default color is 0x00ff00 (green).

See also:
PrintConsole printf

int gConsoleBackgroundColor
 

The console background color.

The default color is 0x000000 (black).

See also:
PrintConsole printf

int gConsoleLogging
 

Console logging option.

If non-zero, all text sent to PrintConsole will also be sent to maWriteLog(). The default value is non-zero.

See also:
PrintConsole printf

MAHandle gConsoleFile
 

Console file logging handle.

If greater than zero, all text sent to PrintConsole will also be sent to the file specified by this handle. The default value is zero. You'll have to open the handle yourself.

See also:
maFileOpen()

int gConsoleDisplay
 

Console display option.

If non-zero, console will be displayed, otherwise not. The default value is non-zero.

See also:
PrintConsole printf


Generated on Sat Feb 13 00:15:37 2010 for MoSync 2 beta 1 by  doxygen 1.4.6-NO