#endif /* ! __P */
static int socket_connection _P((char *, int));
-static int getline _P((popserver, char **));
+static int pop_getline _P((popserver, char **));
static int sendline _P((popserver, char *));
static int fullwrite _P((int, char *, int));
static int getok _P((popserver));
return (-1);
}
- if (sendline (server, "STAT") || (getline (server, &fromserver) < 0))
+ if (sendline (server, "STAT") || (pop_getline (server, &fromserver) < 0))
return (-1);
if (strncmp (fromserver, "+OK ", 4))
free ((char *) *sizes);
return (-1);
}
- if (getline (server, &fromserver) < 0)
+ if (pop_getline (server, &fromserver) < 0)
{
free ((char *) *IDs);
free ((char *) *sizes);
return (-1);
}
- if (sendline (server, command) || (getline (server, response) < 0))
+ if (sendline (server, command) || (pop_getline (server, response) < 0))
{
return (-1);
}
return (-1);
}
- if ((ret = getline (server, &fromserver)) < 0)
+ if ((ret = pop_getline (server, &fromserver)) < 0)
{
return (-1);
}
if (sendline (server, "LAST"))
return (-1);
- if (getline (server, &fromserver) < 0)
+ if (pop_getline (server, &fromserver) < 0)
return (-1);
if (! strncmp (fromserver, "-ERR", 4))
} /* socket_connection */
/*
- * Function: getline
+ * Function: pop_getline
*
* Purpose: Get a line of text from the connection and return a
* pointer to it. The carriage return and linefeed at the end of
* error (in which case the contents of LINE are undefined. In
* case of error, an error message is copied into pop_error.
*
- * Notes: The line returned is overwritten with each call to getline.
+ * Notes: The line returned is overwritten with each call to pop_getline.
*
* Side effects: Closes the connection on error.
*
* THE RETURNED LINE MAY CONTAIN EMBEDDED NULLS!
*/
static int
-getline (server, line)
+pop_getline (server, line)
popserver server;
char **line;
{
server->buffer = (char *)realloc (server->buffer, server->buffer_size);
if (! server->buffer)
{
- strcpy (pop_error, "Out of memory in getline");
+ strcpy (pop_error, "Out of memory in pop_getline");
pop_trash (server);
return (-1);
}
}
else if (ret == 0)
{
- strcpy (pop_error, "Unexpected EOF from server in getline");
+ strcpy (pop_error, "Unexpected EOF from server in pop_getline");
pop_trash (server);
return (-1);
}
{
char *fromline;
- if (getline (server, &fromline) < 0)
+ if (pop_getline (server, &fromline) < 0)
{
return (-1);
}
{
char *fromserver;
- if (getline (server, &fromserver) < 0)
+ if (pop_getline (server, &fromserver) < 0)
return (-1);
if (strcmp (fromserver, "."))