UFO: Alien Invasion
|
Header for string hunk management. More...
#include "ufotypes.h"
Go to the source code of this file.
Data Structures | |
struct | stringHunk_s |
Typedefs | |
typedef struct stringHunk_s | stringHunk_t |
typedef void(* | stringHunkVisitor_t )(const char *string) |
Functions | |
bool | STRHUNK_Add (stringHunk_t *hunk, const char *string) |
void | STRHUNK_Reset (stringHunk_t *hunk) |
void | STRHUNK_Visit (stringHunk_t *hunk, stringHunkVisitor_t visitor) |
stringHunk_t * | STRHUNK_Create (size_t size) |
void | STRHUNK_Delete (stringHunk_t **hunk) |
int | STRHUNK_Size (const stringHunk_t *hunk) |
size_t | STRHUNK_GetFreeSpace (const stringHunk_t *hunk) |
Header for string hunk management.
Definition in file stringhunk.h.
typedef struct stringHunk_s stringHunk_t |
typedef void(* stringHunkVisitor_t)(const char *string) |
Definition at line 36 of file stringhunk.h.
bool STRHUNK_Add | ( | stringHunk_t * | hunk, |
const char * | string | ||
) |
true
if the add was successful, false
if there was an overflow and the string was cut. Definition at line 32 of file stringhunk.cpp.
References stringHunk_s::entries, stringHunk_s::hunk, stringHunk_s::pos, Q_strncpyz(), and stringHunk_s::size.
Referenced by SV_LogAdd(), and TEST_F().
stringHunk_t* STRHUNK_Create | ( | size_t | size | ) |
Definition at line 88 of file stringhunk.cpp.
References stringHunk_s::hunk, Mem_AllocType, Mem_AllocTypeN, stringHunk_s::pos, and stringHunk_s::size.
Referenced by SV_LogInit(), and TEST_F().
void STRHUNK_Delete | ( | stringHunk_t ** | hunk | ) |
Definition at line 97 of file stringhunk.cpp.
References Mem_Free.
Referenced by SV_LogShutdown(), and TEST_F().
size_t STRHUNK_GetFreeSpace | ( | const stringHunk_t * | hunk | ) |
Definition at line 83 of file stringhunk.cpp.
References stringHunk_s::hunk, stringHunk_s::pos, and stringHunk_s::size.
Referenced by TEST_F().
void STRHUNK_Reset | ( | stringHunk_t * | hunk | ) |
Definition at line 55 of file stringhunk.cpp.
References stringHunk_s::entries, stringHunk_s::hunk, and stringHunk_s::pos.
Referenced by SV_LogHandleOutput(), and TEST_F().
int STRHUNK_Size | ( | const stringHunk_t * | hunk | ) |
Definition at line 78 of file stringhunk.cpp.
References stringHunk_s::entries.
Referenced by TEST_F().
void STRHUNK_Visit | ( | stringHunk_t * | hunk, |
stringHunkVisitor_t | visitor | ||
) |
Definition at line 62 of file stringhunk.cpp.
References stringHunk_s::entries, and stringHunk_s::hunk.
Referenced by SV_LogHandleOutput(), and TEST_F().