Details |
Last modification |
View Log
| RSS feed
Rev |
Author |
Line No. |
Line |
2 |
- |
1 |
#include <u.h>
|
|
|
2 |
#include <libc.h>
|
|
|
3 |
#include "String.h"
|
|
|
4 |
|
|
|
5 |
void
|
|
|
6 |
s_terminate(String *s)
|
|
|
7 |
{
|
|
|
8 |
if(s->ref > 1)
|
|
|
9 |
sysfatal("can't s_terminate a shared string");
|
|
|
10 |
if (s->ptr >= s->end)
|
|
|
11 |
s_grow(s, 1);
|
|
|
12 |
*s->ptr = 0;
|
|
|
13 |
}
|