Import sources from 2011-03-30 iso image
This commit is contained in:
commit
e5888a1ffd
7810 changed files with 2489717 additions and 0 deletions
13
sys/src/libString/s_putc.c
Executable file
13
sys/src/libString/s_putc.c
Executable file
|
@ -0,0 +1,13 @@
|
|||
#include <u.h>
|
||||
#include <libc.h>
|
||||
#include "String.h"
|
||||
|
||||
void
|
||||
s_putc(String *s, int c)
|
||||
{
|
||||
if(s->ref > 1)
|
||||
sysfatal("can't s_putc a shared string");
|
||||
if (s->ptr >= s->end)
|
||||
s_grow(s, 2);
|
||||
*(s->ptr)++ = c;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue