1
0
mirror of git://projects.qi-hardware.com/antorcha.git synced 2024-11-01 07:17:31 +02:00

tools/ant-gui/ant-gui.c (generate): ignore coments (lines beginning with "#")

This commit is contained in:
Werner Almesberger 2012-11-01 20:10:08 -03:00
parent 86e1466388
commit 89fffcbcd9

View File

@ -177,6 +177,8 @@ static void generate(uint8_t ***imgs, int *n, const char *path)
exit(1); exit(1);
} }
while (fgets(buf, sizeof(buf), file)) { while (fgets(buf, sizeof(buf), file)) {
if (buf[0] == '#')
continue;
nl = strchr(buf, '\n'); nl = strchr(buf, '\n');
if (nl) if (nl)
*nl = 0; *nl = 0;