some c snippets