Skip over lines that start with # (comments)

MFC after: 3 days
This commit is contained in:
Enji Cooper 2015-11-26 07:03:59 +00:00
parent 84da2236a4
commit 059d81a6e4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=291359

View File

@ -87,6 +87,8 @@ load(const char *fname)
if ((fp = fopen(fname, "r")) == NULL)
err(1, "Cannot open `%s'", fname);
while ((line = fgetln(fp, &len)) != NULL) {
if (line[0] == '#')
continue;
char c = line[len];
char *ptr;
line[len] = '\0';