Sign in
plan9port
/
plan9
/
5cd829d5899a0b16b717ba65c57d1c2d7bd0f566
/
.
/
src
/
libString
/
s_putc.c
blob: 29a385d767be5b092780cb80a7b99c6f3f691d38 [
file
] [
log
] [
blame
]
rsc
7f11104
2003-12-11 18:15:57 +0000
[
diff
] [
blame
]
1
#include
<u.h>
2
#include
<libc.h>
3
#include
"libString.h"
4
5
void
6
s_putc
(
String
*
s
,
int
c
)
7
{
8
if
(
s
->
ref
>
1
)
9
sysfatal
(
"can't s_putc a shared string"
);
10
if
(
s
->
ptr
>=
s
->
end
)
11
s_grow
(
s
,
2
);
12
*(
s
->
ptr
)++
=
c
;
13
}