⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dstring.h.svn-base

📁 SumatraPDF是一款小型开源的pdf阅读工具。虽然玲珑小巧(只有800多KB)
💻 SVN-BASE
字号:
/****************************************************************************
 * 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

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -