Home Libraries Author Links

dvec.h File Reference


Detailed Description

Specification of data types and functions for dynamic vectors and strings.

Version:
1.08-r51
Date:
2007-08-20 15:07:58 (Tom)
Author:
Tom Michaelis
SysToMath
Wittelsbacherstr. 7
D-80469 Munich
Contact:
http://www.SysToMath.com
mailto:Tom.Michaelis@SysToMath.com
This C header file contains declarations of data types and functions specifying dynamic vectors and strings. They are implemented in the C inline file _dvec.h and the C program file dvec.c belonging to the SysToMath Base C Library stmbase.

Definition in file dvec.h.

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Constants for stmFgetDstr

Constants for stmFgetDstr().

For readibility reasons the following constants should be used as values of the parameters noNl and overWrite of stmFgetDstr().

#define StmFgdPreserveNl   StmFalse
 noNl == StmFalse
#define StmFgdStripNl   StmTrue
 noNl == StmTrue
#define StmFgdAppend   StmFalse
 overWrite == StmFalse
#define StmFgdNew   StmTrue
 overWrite == StmTrue

Defines

#define stmDvecAlloc(type, dim)   ((type *) stmValloc_ (dim, sizeof (type)))
 Creation of a new dynamic type vector.
#define stmDvecResize(type, dvec, dim)   ((type *) stmVrealloc_ ((char *) (dvec), dim, sizeof (type)))
 Resize the dynamic vector dvec.
#define stmDvecFree(dvec)   (stmVfree_ ((char *) (dvec)))
 Destroy the dynamic vector dvec.
#define stmDvecDim(dvec)   (stmVdim_ ((char *) (dvec)))
 Return the element count of the dynamic vector dvec.
#define stmDvecDel(type, dvec, start, count)   ((type *) stmVdelete_ ((char *) (dvec), start, count, sizeof (type)))
 Delete elements of the dynamic vector dvec.
#define stmDvecIns(type, dvec, start, pelem, count)
 Insert elements into the dynamic vector dvec.
#define stmDvecElIns(type, dvec, start, elem)   stmDvecnElIns_ (type, dvec, start, 1, elem)
 Insert one element into the dynamic vector dvec.
#define stmDvecnElIns(type, dvec, start, count, elem)   stmDvecnElIns_ (type, dvec, start, count, elem)
 Insert multiple copies of one element into the dynamic vector dvec.
#define stmDvecApp(type, dvec, pelem, count)
 Append elements to the dynamic vector dvec.
#define stmDvecElApp(type, dvec, elem)   stmDvecnElApp_ (type, dvec, 1, elem)
 Append one element to the dynamic vector dvec.
#define stmDvecnElApp(type, dvec, count, elem)   stmDvecnElApp_ (type, dvec, count, elem)
 Append multiple copies of one element to the dynamic vector dvec.

Functions

char * stmDstrSave (const char *str, int len)
 Creation of a new dynamic string.
int stmDstrLen (const char *dstr)
 Return the length of the dynamic string dstr.
char * stmDstrResize (char *dstr, int len)
 Resize the dynamic string dstr.
char * stmDstrDel (char *dstr, unsigned start, unsigned count)
 Delete characters of the dynamic string dstr.
char * stmDstrIns (char *dstr, unsigned start, const char *str, unsigned count)
 Insert characters into the dynamic string dstr.
char * stmDstrChIns (char *dstr, unsigned start, char ch)
 Insert one character into the dynamic string dstr.
char * stmDstrApp (char *dstr, const char *str, unsigned count)
 Append characters to the dynamic string dstr.
char * stmDstrChApp (char *dstr, char ch)
 Append one character to the dynamic string dstr.
char * stmDstrReplace (char *dstr, unsigned start, unsigned rcount, const char *str, unsigned count)
 Replace a part of the dynamic string dstr.
char * stmDstrPrintf (char *dstr, const char *format,...)
 Copy arguments according with format to the dynamic string dstr.
char * stmDstrVfprintf (char *dstr, const char *format, va_list arg)
 Copy arguments according with format to the dynamic string dstr.
char * stmFgetDstr (FILE *fp, char *dstr, StmBool noNl, StmBool overWrite)
 Copy one line from the stream fp to the dynamic string dstr.


© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).