Skip to content

Commit

Permalink
Added Str_Reserve()
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed May 31, 2003
1 parent 82394c2 commit 0657160
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions doomsday/Include/m_string.h
Expand Up @@ -14,6 +14,7 @@ typedef struct
void Str_Init(ddstring_t *ds);
void Str_Free(ddstring_t *ds);
void Str_Clear(ddstring_t *ds);
void Str_Reserve(ddstring_t *ds, int length);
void Str_Set(ddstring_t *ds, const char *text);
void Str_Append(ddstring_t *ds, const char *append_text);
void Str_PartAppend(ddstring_t *dest, const char *src, int start, int count);
Expand Down
8 changes: 8 additions & 0 deletions doomsday/Src/m_string.c
Expand Up @@ -101,6 +101,14 @@ void Str_Alloc(ddstring_t *ds, int for_length, int preserve)
ds->str = buf;
}

//===========================================================================
// Str_Reserve
//===========================================================================
void Str_Reserve(ddstring_t *ds, int length)
{
Str_Alloc(ds, length, true);
}

//===========================================================================
// Str_Set
//===========================================================================
Expand Down

0 comments on commit 0657160

Please sign in to comment.