From 459cc01862c7b6c39a94bbde237a2ff07c21fa18 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sat, 18 Jan 2003 06:18:21 +0000 Subject: [PATCH] * whobbs.c: line up the columns better * routines2.c: when doing <.ASI> command, entering a blank hostname causes it to abort instead of adding a new host. Also strip l/t whitespace. --- citadel/ChangeLog | 6 ++++++ citadel/domain.c | 6 ++++-- citadel/routines2.c | 20 ++++++++++++-------- citadel/whobbs.c | 4 ++-- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 355e5a9e1..3a58e33e9 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,9 @@ $Log$ + Revision 601.119 2003/01/18 06:18:20 ajc + * whobbs.c: line up the columns better + * routines2.c: when doing <.ASI> command, entering a blank hostname causes + it to abort instead of adding a new host. Also strip l/t whitespace. + Revision 601.118 2003/01/17 22:36:56 ajc * This commit is a figment of your imagination. @@ -4419,3 +4424,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import + diff --git a/citadel/domain.c b/citadel/domain.c index 6dcbcafc3..ac47dcb7e 100644 --- a/citadel/domain.c +++ b/citadel/domain.c @@ -5,6 +5,7 @@ * */ +#include "sysdep.h" #include #include #include @@ -120,13 +121,14 @@ int getmx(char *mxbuf, char *dest) { u_char bytes[1024]; HEADER header; } answer; +#else + char buf[SIZ]; + FILE *fp; #endif int ret; unsigned char *startptr, *endptr, *ptr; char expanded_buf[1024]; - char buf[SIZ]; - FILE *fp; unsigned short pref, type; int n = 0; int qdcount; diff --git a/citadel/routines2.c b/citadel/routines2.c index 4053a291c..30aaa3795 100644 --- a/citadel/routines2.c +++ b/citadel/routines2.c @@ -841,16 +841,20 @@ void do_internet_configuration(CtdlIPC *ipc) ch = keymenu("", "dd|elete|ave|uit"); switch(ch) { case 'a': - ++num_recs; - if (num_recs == 1) - recs = malloc(sizeof(char *)); - else recs = realloc(recs, - (sizeof(char *)) * num_recs); newprompt("Enter host name: ", buf, 50); - strcat(buf, "|"); - get_inet_rec_type(ipc, &buf[strlen(buf)]); - recs[num_recs-1] = strdup(buf); + striplt(buf); + if (strlen(buf) > 0) { + ++num_recs; + if (num_recs == 1) + recs = malloc(sizeof(char *)); + else recs = realloc(recs, + (sizeof(char *)) * num_recs); + strcat(buf, "|"); + get_inet_rec_type(ipc, + &buf[strlen(buf)]); + recs[num_recs-1] = strdup(buf); + } break; case 'd': i = intprompt("Delete which one", diff --git a/citadel/whobbs.c b/citadel/whobbs.c index 060621cb5..60221c4fb 100644 --- a/citadel/whobbs.c +++ b/citadel/whobbs.c @@ -142,9 +142,9 @@ int main(int argc, char **argv) printf("%c", ((s_pid == my_pid) ? '*' : ' ')); if (www) printf(""); - printf("%-25s", s_user); + printf("%-26s", s_user); if (www) printf(""); - printf("%-20s ", s_room); + printf("%-19s ", s_room); if (www) printf(""); printf("%-24s\n", s_host); if (www) printf("%s\n", s_client); -- 2.39.2