reactos/rosapps/smartpdf/baseutils/dstring.h
Klemens Friedl 435a566751 SmartPDF - lightweight pdf viewer app for rosapps
* sumatrapdf - vendor import
* everything compiles (libjpeg, poppler, fitz, sumatrapdf)
* does NOT link

(remove the comment tags in the parent directory.rbuild file (rosapps dir) to build it)

svn path=/trunk/; revision=29295
2007-09-29 08:39:35 +00:00

74 lines
2 KiB
C

/****************************************************************************
* Dynamic strings
****************************************************************************/
/*
* tcl.h --
*
* This header file describes the externally-visible facilities
* of the Tcl interpreter.
*
* Copyright (c) 1987-1994 The Regents of the University of California.
* Copyright (c) 1994-1996 Sun Microsystems, Inc.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
* SCCS: @(#) tcl.h 1.283 96/10/02 17:17:39
*/
#ifndef DSTRING_H
#define DSTRING_H
#ifdef __cplusplus
extern "C"
{
#endif
#define kDstringStaticSize 200
typedef struct DString {
char *pString; /* Points to beginning of string: either
* staticSpace below or a malloc'ed array. */
int length; /* Number of non-NULL characters in the
* string. */
int spaceAvl; /* Total number of bytes available for the
* string and its terminating NULL char. */
char staticSpace[kDstringStaticSize];
/* Space to use in common case where string
* is small. */
} DString;
#define DStringLength(dsPtr) ((dsPtr)->length)
#define DStringValue(dsPtr) ((dsPtr)->pString)
#define DStringTrunc DStringSetLength
char*
DStringAppend(DString* dsPtr,
const char* string,
int length);
void
DStringFree(DString* dsPtr);
void
DStringInit(DString* dsPtr);
void
DStringSetLength(DString* dsPtr,
int length);
void
DStringSprintf(DString* pDs,
const char* pFormat,
...);
char*
DStringAppendLowerCase(DString* pDs,
const char* pIn,
int length);
#ifdef __cplusplus
}
#endif
#endif