* whobbs.c: line up the columns better
authorArt Cancro <ajc@citadel.org>
Sat, 18 Jan 2003 06:18:21 +0000 (06:18 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 18 Jan 2003 06:18:21 +0000 (06:18 +0000)
* 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
citadel/domain.c
citadel/routines2.c
citadel/whobbs.c

index 355e5a9e121729decbbb4e8c93600f8651833c7a..3a58e33e9fd30496d6558dbc532b89a4ee3e084b 100644 (file)
@@ -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 <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index 6dcbcafc32d5b89d7219158d2bc55a315faea752..ac47dcb7eaf6cbea3553a2507ee4c04001c84d3b 100644 (file)
@@ -5,6 +5,7 @@
  *
  */
 
+#include "sysdep.h"
 #include <stdlib.h>
 #include <unistd.h>
 #include <string.h>
@@ -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;
index 4053a291c242b15b5a5acdb38823f6f9d301862a..30aaa37955e778344f0dc39f0f568982ed72dd16 100644 (file)
@@ -841,16 +841,20 @@ void do_internet_configuration(CtdlIPC *ipc)
                ch = keymenu("", "<A>dd|<D>elete|<S>ave|<Q>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",
index 060621cb5df427cb55c915151b83cb35305b7f15..60221c4fb3ac20a2d7b4615ce02b7e16dfe30d88 100644 (file)
@@ -142,9 +142,9 @@ int main(int argc, char **argv)
                        printf("%c", 
                                ((s_pid == my_pid) ? '*' : ' '));
                        if (www) printf("</TD><TD>");
-                       printf("%-25s", s_user);
+                       printf("%-26s", s_user);
                        if (www) printf("</TD><TD>");
-                       printf("%-20s ", s_room);
+                       printf("%-19s ", s_room);
                        if (www) printf("</TD><TD>");
                        printf("%-24s\n", s_host);
                        if (www) printf("</TD><TD>%s</TD></TR>\n", s_client);