Show More
@@ -25,7 +25,7 b' all: $(TARGET)' | |||
|
25 | 25 | $(CC) $(LDFLAGS) -o $@ $(OBJS) |
|
26 | 26 | |
|
27 | 27 | chg.o: hgclient.h procutil.h util.h |
|
28 | hgclient.o: hgclient.h util.h | |
|
28 | hgclient.o: hgclient.h procutil.h util.h | |
|
29 | 29 | procutil.o: procutil.h util.h |
|
30 | 30 | util.o: util.h |
|
31 | 31 |
@@ -23,6 +23,7 b'' | |||
|
23 | 23 | #include <unistd.h> |
|
24 | 24 | |
|
25 | 25 | #include "hgclient.h" |
|
26 | #include "procutil.h" | |
|
26 | 27 | #include "util.h" |
|
27 | 28 | |
|
28 | 29 | enum { |
@@ -71,6 +72,8 b' struct hgclient_tag_ {' | |||
|
71 | 72 | |
|
72 | 73 | static const size_t defaultdatasize = 4096; |
|
73 | 74 | |
|
75 | static void attachio(hgclient_t *hgc); | |
|
76 | ||
|
74 | 77 | static void initcontext(context_t *ctx) |
|
75 | 78 | { |
|
76 | 79 | ctx->ch = '\0'; |
@@ -248,6 +251,13 b' static void handlesystemrequest(hgclient' | |||
|
248 | 251 | memcpy(ctx->data, &r_n, sizeof(r_n)); |
|
249 | 252 | ctx->datasize = sizeof(r_n); |
|
250 | 253 | writeblock(hgc); |
|
254 | } else if (strcmp(args[0], "pager") == 0) { | |
|
255 | setuppager(args[1]); | |
|
256 | if (hgc->capflags & CAP_ATTACHIO) | |
|
257 | attachio(hgc); | |
|
258 | /* unblock the server */ | |
|
259 | static const char emptycmd[] = "\n"; | |
|
260 | sendall(hgc->sockfd, emptycmd, sizeof(emptycmd) - 1); | |
|
251 | 261 | } else { |
|
252 | 262 | abortmsg("unknown type in system request: %s", args[0]); |
|
253 | 263 | } |
General Comments 0
You need to be logged in to leave comments.
Login now