#include "dstr.h"
#include "exc.h"
#include "ident.h"
+#include "macros.h"
#include "selbuf.h"
/*----- Main code ---------------------------------------------------------*/
/* --- Skip past any leading whitespace --- */
- while (isspace((unsigned char)*p))
+ while (ISSPACE(*p))
p++;
/* --- Now start work on the string itself --- */
for (;;) {
- if (*p == 0 || *p == ':' || *p == ',' || isspace((unsigned char)*p))
+ if (*p == 0 || *p == ':' || *p == ',' || ISSPACE(*p))
break;
else if (*p == '\\') {
p++;
/* --- Tidy up afterwards --- */
- while (isspace((unsigned char)*p))
+ while (ISSPACE(*p))
p++;
if (*p == 0)
*pp = 0;
/* --- Find out what sort of a reply this is --- */
q = next(&p);
- if (strcmp(q, "USERID") == 0) {
+ if (STRCMP(q, ==, "USERID")) {
i->type = IDENT_USERID;
i->u.userid.os = next(&p);
i->u.userid.user = next(&p);
- } else if (strcmp(q, "ERROR") == 0) {
+ } else if (STRCMP(q, ==, "ERROR")) {
i->type = IDENT_ERROR;
i->u.error = next(&p);
} else
sin.sin_addr = rq->remote.sin_addr;
if (conn_init(&rq->c, rq->s, fd, (struct sockaddr *)&sin, sizeof(sin),
connected, rq))
- goto fail_1;
+ goto fail_0;
/* --- Finish off initializing the block --- */
void (*func)(ident_reply */*i*/, void */*p*/),
void *p)
{
- size_t sinsz;
+ socklen_t sinsz;
if ((sinsz = sizeof(struct sockaddr_in),
getsockname(sk, (struct sockaddr *)&rq->local, &sinsz)) ||
(sinsz = sizeof(struct sockaddr_in),