chiark
/
gitweb
/
~mdw
/
tripe
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
17f0adc
)
Track @lbuf@ changes in mLib.
author
mdw
<mdw>
Sun, 13 Jan 2002 14:59:55 +0000
(14:59 +0000)
committer
mdw
<mdw>
Sun, 13 Jan 2002 14:59:55 +0000
(14:59 +0000)
client.c
patch
|
blob
|
blame
|
history
diff --git
a/client.c
b/client.c
index 8890f6c0682b3081b63c2146464f626793e73fac..697481c4959fd25212a2ec81ddc1a75a3f4d222e 100644
(file)
--- a/
client.c
+++ b/
client.c
@@
-1,6
+1,6
@@
/* -*-c-*-
*
/* -*-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
*
*
* Client for TrIPE
*
@@
-29,6
+29,9
@@
/*----- Revision history --------------------------------------------------*
*
* $Log: client.c,v $
/*----- 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.
* 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.
@@
-140,7
+143,7
@@
static void writelog(const char *cat, const char *msg)
fprintf(logfp, "%s %s: %s\n", buf, cat, msg);
}
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) {
{
char *q;
if (!p) {
@@
-182,7
+185,7
@@
static void cline(char *p, void *b)
die(EXIT_FAILURE, "unexpected output `%s %s'", q, 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))
{
if (!p) {
if (!(f & f_uclose))
@@
-192,17
+195,15
@@
static void sline(char *p, void *b)
puts(p);
}
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 {
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);
}
}
}
}