#include <mLib/crc32.h>
#include <mLib/dstr.h>
#include <mLib/hash.h>
+#include <mLib/macros.h>
#include <mLib/str.h>
#include <mLib/sub.h>
#include <mLib/sym.h>
static time_t exptime(const char *p)
{
size_t sz = strlen(p);
- if (strncmp(p, "expired", sz) == 0)
+ if (STRNCMP(p, ==, "expired", sz))
return (KEXP_EXPIRE);
- else if (strncmp(p, "forever", sz) == 0)
+ else if (STRNCMP(p, ==, "forever", sz))
return (KEXP_FOREVER);
else
return (atol(p));
* maintained file I don't know.
*/
- while (isspace((unsigned char)*p))
+ while (ISSPACE(*p))
p++;
if (!*p || *p == '#')
goto skip;
/* --- Parse up the attributes, if specified --- */
- sym_create(&k->a);
- if (vf[4] && strcmp(vf[4], "-") != 0) {
- url_dctx uc;
+ sym_create(&k->a);
+ if (vf[4] && STRCMP(vf[4], !=, "-")) {
+ url_dctx uc;
for (url_initdec(&uc, vf[4]); url_dec(&uc, n, v); ) {
key_putattr(f, k, n->buf, v->buf);
DRESET(n); DRESET(v);