Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

sobj_debug.c File Reference


Detailed Description

Debugging functions for internal use by the the simple objects library.

#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include <sys/types.h>
#include <unistd.h>
#include "sobject_p.h"

Include dependency graph for sobj_debug.c:

Include dependency graph

Functions

void sobj_debug_log (const char *format,...)
 Write a log message to a log file.
void sobj_debug_vlog (const char *format, va_list ap)
 Write a log message to a log file (va_list variant).
void sobj_dump (struct sobj *sobj)
 Dump an object representation to standard error.
void sobj_xdump (struct sobj *sobj)
 Dump an object structure representation of an object to standard error.
void sobj_xdump_fp (struct sobj *sobj, FILE *out)
 Dump an object structure representation of an object to a specified C stream.
void sobj_debug_cleanup (void)
 Cleanup function.

Variables

const int sobj_xdump_shiftwidth = 2
 Number of leading whitespace characters per indent level.
const int sobj_xdump_maxhex = 512
 Maximum number of bytes dumped as hex.

Function Documentation

void sobj_debug_cleanup void   ) 
 

Cleanup function.

This is the cleanup function called by sobj_cleanup().

See also:
sobj_cleanup().

void sobj_debug_log const char *  format,
  ...
 

Write a log message to a log file.

The function appends the specified log message to a log file specified in the environment variable SOBJ_DEBUG_FILENAME. If this environment variable is not set, the log message is discarded (i.e. the call has no effect).

Parameters:
format printf-style format string.

void sobj_debug_vlog const char *  format,
va_list  ap
 

Write a log message to a log file (va_list variant).

Parameters:
format printf-style format string.
ap Variable argument list.
See also:
sobj_debug_log()

void sobj_dump struct sobj sobj  ) 
 

Dump an object representation to standard error.

The function uses the SOBJ_SER_TEXT_DISPLAY mode (i.e. the ClassEnv::pack() call is skipped).

Parameters:
sobj The object to be dumped.
See also:
sobj_xdump().

void sobj_xdump struct sobj sobj  ) 
 

Dump an object structure representation of an object to standard error.

Parameters:
sobj The object to be dumped.
See also:
sobj_xdump_fp().

void sobj_xdump_fp struct sobj sobj,
FILE *  out
 

Dump an object structure representation of an object to a specified C stream.

Parameters:
sobj The object to be dumped.
out The output stream.


Variable Documentation

const int sobj_xdump_maxhex = 512 [static]
 

Maximum number of bytes dumped as hex.

const int sobj_xdump_shiftwidth = 2 [static]
 

Number of leading whitespace characters per indent level.


Generated on Sat Jul 23 16:05:03 2005 for sobject by  doxygen 1.3.9.1