Skip to content

Instantly share code, notes, and snippets.

@madx
Created May 9, 2010 15:40
Show Gist options
  • Save madx/395229 to your computer and use it in GitHub Desktop.
Save madx/395229 to your computer and use it in GitHub Desktop.
void sgf_putc(OFILE* file, char c) {
assert (file->mode == WRITE_MODE);
if ((file->ptr != 0) && ((file->ptr % BLOCK_SIZE) == 0)) {
sgf_append_block (file);
}
file->buffer[ (file->ptr % BLOCK_SIZE) ] = c;
file->ptr++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment