/home/mob/svn/appWeb/1.2.3/mpr/embedded.cpp File Reference


Detailed Description

Miscellaneous routines safe for embedded programming.

This module provides safe replacements for the standard library string and formatting routines. It also provides some thread-safe replacements for functions that are only safe when single-threaded.

:
Remarks:
Most routines in this file are not thread-safe. It is the callers responsibility to perform all thread synchronization.

#include "mpr.h"


Functions

int mprStaticPrintf (char *fmt,...)
int mprPrintf (char *fmt,...)
int mprFprintf (int fd, char *fmt,...)

Function Documentation

int mprFprintf int  fd,
char *  fmt,
... 
 

Parameters:
fd File descriptor. Note: this is not a FILE pointer type.
fmt Printf style format string
Returns:
Returns the number of bytes written
Stability Classification:
Evolving.
Library:
libappWeb
See also:
mprPrintf, mprLog

int mprPrintf char *  fmt,
... 
 

Synopsis:
Compact printf. This will use less memory than the standard printf
Overview:
Linking without printf and all its derivatives will save memory for applications that demand minimal footprint. The MPR can be build without using any printf routines.
Parameters:
fmt Printf style format string
Returns:
Returns the number of bytes written
Stability Classification:
Evolving.
Library:
libappWeb
See also:
MprLogListener, mprLog

int mprStaticPrintf char *  fmt,
... 
 

Synopsis:
Print a message to the applications standard output without allocating memory.
Overview:
Normal Printf routines may allocate dynamic memory when parsing the format string. mprStaticPrintf uses a static buffer and will never allocate dynamic memory. It is suitable for use by low-level handlers that must not error when doing output.
Parameters:
fmt Printf style format string
Returns:
Returns the number of bytes written
Remarks:
The maximum output is MPR_MAX_STRING - 1.
Stability Classification:
Evolving.
Library:
libappWeb
See also:
mprPrintf, mprLog

© Mbedthis Software LLC, 2003-2004. All rights reserved. Mbedthis is a trademark of Mbedthis Software LLC.