mirror of
https://github.com/bol-van/zapret.git
synced 2024-12-22 22:35:54 +00:00
allow comments in hostlist
comments must start with "#", ";", "/" or newline at beginning of line
This commit is contained in:
parent
4df4d193d2
commit
183ce40aa8
@ -51,6 +51,7 @@ bool AppendHostList(strpool **hostlist, char *filename)
|
||||
e = zbuf + zsize;
|
||||
while(p<e)
|
||||
{
|
||||
if ( *p == '#' || *p == ';' || *p == '/' || *p == '\n' ) continue;
|
||||
if (!addpool(hostlist,&p,e))
|
||||
{
|
||||
fprintf(stderr, "Not enough memory to store host list : %s\n", filename);
|
||||
@ -74,6 +75,7 @@ bool AppendHostList(strpool **hostlist, char *filename)
|
||||
while (fgets(s, 256, F))
|
||||
{
|
||||
p = s;
|
||||
if ( *p == '#' || *p == ';' || *p == '/' || *p == '\n' ) continue;
|
||||
if (!addpool(hostlist,&p,p+strlen(p)))
|
||||
{
|
||||
fprintf(stderr, "Not enough memory to store host list : %s\n", filename);
|
||||
|
@ -51,6 +51,7 @@ bool AppendHostList(strpool **hostlist, char *filename)
|
||||
e = zbuf + zsize;
|
||||
while(p<e)
|
||||
{
|
||||
if ( *p == '#' || *p == ';' || *p == '/' || *p == '\n' ) continue;
|
||||
if (!addpool(hostlist,&p,e))
|
||||
{
|
||||
fprintf(stderr, "Not enough memory to store host list : %s\n", filename);
|
||||
@ -74,6 +75,7 @@ bool AppendHostList(strpool **hostlist, char *filename)
|
||||
while (fgets(s, 256, F))
|
||||
{
|
||||
p = s;
|
||||
if ( *p == '#' || *p == ';' || *p == '/' || *p == '\n' ) continue;
|
||||
if (!addpool(hostlist,&p,p+strlen(p)))
|
||||
{
|
||||
fprintf(stderr, "Not enough memory to store host list : %s\n", filename);
|
||||
|
Loading…
Reference in New Issue
Block a user