jasperserver/stringbuffer.c File Reference

#include "stringbuffer.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

Go to the source code of this file.

Defines

#define INCREMENT_STRING_SIZE   256

Functions

static xmlChar * jasperserver_stringVSprintf (const char *format, va_list argptr)
int jasperserver_string_vformat (jasperserver_string_t *jsstr, const char *format, va_list argptr)
jasperserver_string_tjasperserver_string_new ()
 Create a new blank string.
void jasperserver_string_free (jasperserver_string_t *jsstr)
 Free the memory allocated for a string.
void jasperserver_string_cappend (jasperserver_string_t *jsstr, const char *utf)
 Append an C-string to a jasperserver_string.
void jasperserver_string_append (jasperserver_string_t *jsstr, const xmlChar *utf)
 Append an string to a jasperserver_string.
void jasperserver_string_set (jasperserver_string_t *jsstr, const xmlChar *str)
 set the value of the string
void jasperserver_string_cset (jasperserver_string_t *jsstr, const char *str)
 set the value of the string
int jasperserver_string_format (jasperserver_string_t *jsstr, const char *format,...)
 set the formatted string as value of the string


Define Documentation

#define INCREMENT_STRING_SIZE   256

Definition at line 27 of file stringbuffer.c.


Function Documentation

void jasperserver_string_append ( jasperserver_string_t jsstr,
const xmlChar *  str 
)

Append an string to a jasperserver_string.

Parameters:
jsstr a pointer to a jasperserver_string
str an xmlChar *, it can contain UTF cahracters

Definition at line 95 of file stringbuffer.c.

void jasperserver_string_cappend ( jasperserver_string_t jsstr,
const char *  str 
)

Append an C-string to a jasperserver_string.

Parameters:
jsstr a pointer to a jasperserver_string
str a C-string to append

Definition at line 82 of file stringbuffer.c.

void jasperserver_string_cset ( jasperserver_string_t jsstr,
const char *  str 
)

set the value of the string

Parameters:
jsstr a pointer to a jasperserver_string
str a C-string to append

Definition at line 167 of file stringbuffer.c.

int jasperserver_string_format ( jasperserver_string_t jsstr,
const char *  format,
  ... 
)

set the formatted string as value of the string

Parameters:
jsstr a pointer to a jasperserver_string
format see printf
... set of parameters
Returns:
the bytes used by the buffer to store the string.

Definition at line 176 of file stringbuffer.c.

void jasperserver_string_free ( jasperserver_string_t jsstr  ) 

Free the memory allocated for a string.

Parameters:
jsstr a pointer to a jasperserver_string
See also:
jasperserver_string_new()

Definition at line 71 of file stringbuffer.c.

jasperserver_string_t* jasperserver_string_new (  ) 

Create a new blank string.

This function initializes a string. It is responsability of the user free the memory allocated by this function using jasperserver_string_free()

Returns:
a pointer to a new string
See also:
jasperserver_string_free()

Definition at line 56 of file stringbuffer.c.

void jasperserver_string_set ( jasperserver_string_t jsstr,
const xmlChar *  str 
)

set the value of the string

Parameters:
jsstr a pointer to a jasperserver_string
str an xmlChar *, it can contain UTF cahracters

Definition at line 159 of file stringbuffer.c.

int jasperserver_string_vformat ( jasperserver_string_t jsstr,
const char *  format,
va_list  argptr 
)

jasperserver_string_vformat:

(Function deriver by xmlTextWriterVSprintf from libxml2) Utility function for formatted output

Parameters:
format see printf
argptr pointer to the first member of the variable argument list.
Returns:
a new xmlChar buffer with the data or NULL on error. This buffer must be freed.

Definition at line 193 of file stringbuffer.c.

static xmlChar * jasperserver_stringVSprintf ( const char *  format,
va_list  argptr 
) [static]

jasperserver_stringVSprintf:

(Function deriver by xmlTextWriterVSprintf from libxml2) Utility function for formatted output

Parameters:
format see printf
argptr pointer to the first member of the variable argument list.
Returns:
a new xmlChar buffer with the data or NULL on error. This buffer must be freed.

Definition at line 208 of file stringbuffer.c.


Generated on Wed Apr 18 16:55:54 2007 for JasperServer C webservices by  doxygen 1.5.2