From e8ae80bf4a53945457399d3aefcc0bb804d593d1 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 10 Jan 1999 04:04:54 +0000 Subject: [PATCH] minor fix to multiline pages --- citadel/client_chat.c | 7 ++++--- citadel/commands.c | 1 + citadel/tasklist.txt | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/citadel/client_chat.c b/citadel/client_chat.c index 79f72622b..b1bdd58a1 100644 --- a/citadel/client_chat.c +++ b/citadel/client_chat.c @@ -226,20 +226,20 @@ void page_user() { return; } fp = fopen(temp, "w"); + fp = freopen(temp, "rb+", fp); if (fp==NULL) printf("Error: %s\n", strerror(errno)); + unlink(temp); printf("Type message to send. Enter a blank line when finished.\n"); citedit(fp, 0); - fclose(fp); snprintf(buf, sizeof buf, "SEXP %s|-", touser); serv_puts(buf); serv_gets(buf); if (buf[0]=='4') { strcpy(last_paged, touser); - fp = fopen(temp, "r"); + rewind(fp); while (fgets(buf, sizeof buf, fp) != NULL) { buf[strlen(buf)-1] = 0; if (strcmp(buf, "000")) serv_puts(buf); - fclose(fp); unlink(temp); } serv_puts("000"); @@ -248,6 +248,7 @@ void page_user() { else { printf("%s\n", &buf[4]); } + fclose(fp); } } diff --git a/citadel/commands.c b/citadel/commands.c index ec51dbaaf..24537952c 100644 --- a/citadel/commands.c +++ b/citadel/commands.c @@ -77,6 +77,7 @@ void print_express(void) { FILE *outpipe; if (express_msgs == 0) return; + printf("printing express messages\n"); express_msgs = 0; serv_puts("PEXP"); serv_gets(buf); diff --git a/citadel/tasklist.txt b/citadel/tasklist.txt index a10f3e101..61804edad 100644 --- a/citadel/tasklist.txt +++ b/citadel/tasklist.txt @@ -5,7 +5,6 @@ Priority items Important items --------------- * In the client, make oto go directly to Mail> when there's new mail. -* Implement multi-line pages. Honeydew items -------------- -- 2.39.2