Logo Search packages:      
Sourcecode: dbtcp version File versions  Download package

my_string.h

/*****************************************************************************
Modulo string.h 
(C) 1998 Giussani Cristian Fastflow Srl
Routine di manipolazione di stringhe con allocazione dinamica della
lunghezza.
Routine esportate:
*****************************************************************************/

#ifndef MY_STR_DYN
#define MY_STR_DYN

#include <define.h>

typedef struct _MY_STRING {
  char      *string;
  ulong increment;
  ulong length;
  ulong max_length;
} MY_STRING;

/* ---------------------------------------------------------------- Funzioni */
int string_init ( MY_STRING *stringa, ulong inizio, ulong incremento, char *valore );
int string_append ( MY_STRING *stringa, char *altra, ulong length );
int string_free ( MY_STRING *stringa );
int string_replace ( MY_STRING *string, char *find, char *replace );

#define string_clear(A) { (A)->length=0; (A)->string[0]=0x00; }
#define string_length(A) (A)->length
#define string_ptr(A) (A)->string

#endif

Generated by  Doxygen 1.6.0   Back to index