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

sobj_ccode.c File Reference

Detailed Description

C code serialization.

#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include <math.h>
#include "sobject_p.h"

Include dependency graph for sobj_ccode.c:

Include dependency graph


size_t sobj_quote_cstring (const char *, size_t, char *, size_t)
 Quote a string as a C string.
size_t sobj_pack_ccode (struct sobj *sobj, struct sobj_buffer *buffer, bool binary, struct sobj_env *env)
 Serialize a simple object to a C expression.

Function Documentation

size_t sobj_quote_cstring const char *  string,
size_t  length,
char *  buffer,
size_t  buffer_size

Quote a string as a C string.

The resulting string will not contain the quoting characters.

string The string to be quoted. This string may be arbitrary binary data, including null-bytes.
length The length of the specified string.
buffer The buffer receiving the quoted string. This may be a null-pointer.
buffer_size The size of the buffer.
The length of the quoted string, not counting the terminating null-character.

Generated on Sat Jul 23 16:04:54 2005 for sobject by  doxygen