/* -*-c-*-
*
- * $Id: client.c,v 1.8 2001/06/19 22:09:37 mdw Exp $
+ * $Id: client.c,v 1.9 2002/01/13 14:57:18 mdw Exp $
*
* Client for TrIPE
*
/*----- Revision history --------------------------------------------------*
*
* $Log: client.c,v $
+ * Revision 1.9 2002/01/13 14:57:18 mdw
+ * Track @lbuf@ changes in mLib.
+ *
* Revision 1.8 2001/06/19 22:09:37 mdw
* Move the program name to the right place when constructing the arguments
* to pass to a new server.
fprintf(logfp, "%s %s: %s\n", buf, cat, msg);
}
-static void cline(char *p, void *b)
+static void cline(char *p, size_t len, void *b)
{
char *q;
if (!p) {
die(EXIT_FAILURE, "unexpected output `%s %s'", q, p);
}
-static void sline(char *p, void *b)
+static void sline(char *p, size_t len, void *b)
{
if (!p) {
if (!(f & f_uclose))
puts(p);
}
-static void uline(char *p, void *b)
+static void uline(char *p, size_t len, void *b)
{
- size_t sz;
if (!p) {
selbuf_destroy(b);
shutdown(fd, 1);
f |= f_uclose;
} else {
- sz = strlen(p);
- p[sz] = '\n';
- write(fd, p, sz + 1);
+ p[len] = '\n';
+ write(fd, p, len + 1);
}
}