Skip to content

Instantly share code, notes, and snippets.

@jerstlouis
Created September 25, 2014 23:38
Show Gist options
  • Select an option

  • Save jerstlouis/e0c1c2f67a13b07e41ec to your computer and use it in GitHub Desktop.

Select an option

Save jerstlouis/e0c1c2f67a13b07e41ec to your computer and use it in GitHub Desktop.
#include <stdlib.h>
int main()
{
int done = 0;
char * de = (char *)" ";
while(!done)
{
int d;
done = 1;
if(*de == ':')
de++;
while((d = (int)strtoul(de, &de, 10) && d <= 31))
{
done = 1;
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment