Skip to content

Instantly share code, notes, and snippets.

@psqli
Created May 4, 2017 17:48
Show Gist options
  • Save psqli/ef83738fadd9ccf332b1349f7d6f8915 to your computer and use it in GitHub Desktop.
Save psqli/ef83738fadd9ccf332b1349f7d6f8915 to your computer and use it in GitHub Desktop.
simple configuration file parser
parse_line(char *line)
{
int i;
char *key;
char *value;
for (i = 0; line[i] != '\0'; i++) {
if (line[i] == ' ') {
/* jump spaces */
while (line[i] == ' ')
i++;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment