osprey/common/util/vstring.c File Reference

#include <stdarg.h>
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include "vstring.h"
#include "errors.h"

Include dependency graph for vstring.c:

Go to the source code of this file.

Defines

#define USE_STANDARD_TYPES
#define MAX(a, b)   ((a>=b)?a:b)
#define vstr_max(v)   ((v).max+0)
#define set_vstr_max(v, m)   (v).max = m
#define set_vstr_len(v, l)   (v).len = l
#define set_vstr_str(v, s)   (v).str = s

Functions/Subroutines

static void Realloc_Vstring (vstring *v, int newlen)
vstring vstr_begin (int len)
void vstr_end (vstring v)
vstring vstr_append (vstring v, const char c)
vstring vstr_concat (vstring v, const char *s)
int vstr_sprintf (vstring *v, int index, const char *format,...)

Variables

static vstring current_vstring = {0,0,NULL}


Define Documentation

#define MAX ( a,
b   )     ((a>=b)?a:b)

Definition at line 51 of file vstring.c.

#define set_vstr_len ( v,
 )     (v).len = l

Definition at line 55 of file vstring.c.

Referenced by vstr_begin(), vstr_concat(), vstr_end(), and vstr_sprintf().

#define set_vstr_max ( v,
 )     (v).max = m

Definition at line 54 of file vstring.c.

Referenced by Realloc_Vstring(), and vstr_begin().

#define set_vstr_str ( v,
 )     (v).str = s

Definition at line 56 of file vstring.c.

Referenced by Realloc_Vstring(), and vstr_begin().

#define USE_STANDARD_TYPES

Definition at line 39 of file vstring.c.

#define vstr_max (  )     ((v).max+0)

Definition at line 53 of file vstring.c.

Referenced by Realloc_Vstring(), vstr_append(), vstr_begin(), vstr_concat(), and vstr_sprintf().


Function Documentation

static void Realloc_Vstring ( vstring v,
int  newlen 
) [static]

Definition at line 61 of file vstring.c.

References MAX, realloc, set_vstr_max, set_vstr_str, vstr_max, and vstr_str.

Referenced by vstr_append(), vstr_begin(), vstr_concat(), and vstr_sprintf().

vstring vstr_append ( vstring  v,
const char  c 
)

Definition at line 106 of file vstring.c.

References vstring::len, Realloc_Vstring(), vstring::str, vstr_len, and vstr_max.

Referenced by r_assemble_list().

vstring vstr_begin ( int  len  ) 

vstring vstr_concat ( vstring  v,
const char *  s 
)

void vstr_end ( vstring  v  ) 

Definition at line 97 of file vstring.c.

References set_vstr_len, and vstring::str.

Referenced by ErrMsg_Report_Nonuser(), ErrMsg_Report_User(), and r_assemble_list().

int vstr_sprintf ( vstring v,
int  index,
const char *  format,
  ... 
)


Variable Documentation

vstring current_vstring = {0,0,NULL} [static]

Definition at line 58 of file vstring.c.


Generated on Wed Apr 8 14:43:43 2009 for Open64 by  doxygen 1.5.6