$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.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
+
*
*/
+#include "sysdep.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
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;
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",
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);