version 1.138, 2017/05/12 22:43:15 |
version 1.139, 2017/05/29 15:43:48 |
|
|
|
|
#include <ctype.h> |
#include <ctype.h> |
#include <errno.h> |
#include <errno.h> |
|
#include <fnmatch.h> |
#include <libgen.h> |
#include <libgen.h> |
#include <netdb.h> |
#include <netdb.h> |
#include <stdarg.h> |
#include <stdarg.h> |
|
|
|
|
/* Is there a length limit or whatnot? */ |
/* Is there a length limit or whatnot? */ |
switch (copy[0]) { |
switch (copy[0]) { |
|
case 'm': |
|
if (copy[1] != ':') |
|
break; |
|
compare = -2; |
|
copy += 2; |
|
break; |
case '!': |
case '!': |
if (copy[1] == '=' && copy[2] == ':') { |
if (copy[1] == '=' && copy[2] == ':') { |
compare = -1; |
compare = -1; |
|
|
if (compare == 1 && strcmp(left, right) == 0) |
if (compare == 1 && strcmp(left, right) == 0) |
value = xstrdup("1"); |
value = xstrdup("1"); |
else if (compare == -1 && strcmp(left, right) != 0) |
else if (compare == -1 && strcmp(left, right) != 0) |
|
value = xstrdup("1"); |
|
else if (compare == -2 && fnmatch(left, right, 0) == 0) |
value = xstrdup("1"); |
value = xstrdup("1"); |
else |
else |
value = xstrdup("0"); |
value = xstrdup("0"); |