From: Art Cancro Date: Mon, 7 Mar 2005 04:03:29 +0000 (+0000) Subject: * auth.c: shrink the margins on the login screen so the user sees something X-Git-Tag: v7.86~4983 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=e5b8fd20d51d020910f790519fcd6b793ee89e18 * auth.c: shrink the margins on the login screen so the user sees something resembling a window. * Allow editing of address book entries wherever possible. * Anything that was a (link) is now a [link] --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 73906490c..92e219904 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,10 @@ $Log$ +Revision 603.9 2005/03/07 04:03:28 ajc +* auth.c: shrink the margins on the login screen so the user sees something + resembling a window. +* Allow editing of address book entries wherever possible. +* Anything that was a (link) is now a [link] + Revision 603.8 2005/03/07 01:45:30 ajc * Rolled back to the old RTE because the new one doesn't work in Safari. @@ -2463,6 +2469,3 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix - - - diff --git a/webcit/auth.c b/webcit/auth.c index a5d87b08d..a837c275f 100644 --- a/webcit/auth.c +++ b/webcit/auth.c @@ -47,7 +47,7 @@ void display_login(char *mesg) output_headers(1, 1, 2, 0, 0, 0, 0); //wprintf("
\n"); - wprintf("
\n"); + wprintf("
\n"); if (mesg != NULL) if (strlen(mesg) > 0) { stresc(buf, mesg, 0, 0); diff --git a/webcit/messages.c b/webcit/messages.c index 4edb1e339..1af10564c 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -323,9 +323,10 @@ void display_vcard(char *vcard_source, char alpha, int full, char *storename) { if (storename != NULL) { fetchname_parsed_vcard(v, storename); } - else if ( (alpha == 0) - || ((isalpha(alpha)) && (tolower(alpha) == tolower(this_alpha)) ) - || ((!isalpha(alpha)) && (!isalpha(this_alpha))) ) { + else if ( (alpha == 0) + || ((isalpha(alpha)) && (tolower(alpha) == tolower(this_alpha)) ) + || ((!isalpha(alpha)) && (!isalpha(this_alpha))) + ) { display_parsed_vcard(v, full); } @@ -613,12 +614,14 @@ void read_message(long msgnum) { if (part_source != NULL) { /* If it's my vCard I can edit it */ - if ( (!strcasecmp(WC->wc_roomname, USERCONFIGROOM)) - || (!strcasecmp(&WC->wc_roomname[11], USERCONFIGROOM))) { + if ( (!strcasecmp(WC->wc_roomname, USERCONFIGROOM)) + || (!strcasecmp(&WC->wc_roomname[11], USERCONFIGROOM)) + || (WC->wc_view == VIEW_ADDRESSBOOK) + ) { wprintf("", msgnum, vcard_partnum); - wprintf("(edit)"); + wprintf("[edit]"); } /* In all cases, display the full card */ @@ -775,12 +778,14 @@ void display_addressbook(long msgnum, char alpha) { display_vcard(vcard_source, alpha, 0, NULL); /* If it's my vCard I can edit it */ - if ( (!strcasecmp(WC->wc_roomname, USERCONFIGROOM)) - || (!strcasecmp(&WC->wc_roomname[11], USERCONFIGROOM))) { + if ( (!strcasecmp(WC->wc_roomname, USERCONFIGROOM)) + || (!strcasecmp(&WC->wc_roomname[11], USERCONFIGROOM)) + || (WC->wc_view == VIEW_ADDRESSBOOK) + ) { wprintf("", msgnum, vcard_partnum); - wprintf("(edit)"); + wprintf("[edit]"); } free(vcard_source); diff --git a/webcit/vcard.c b/webcit/vcard.c index 59f99f7fe..7c1ebae86 100644 --- a/webcit/vcard.c +++ b/webcit/vcard.c @@ -3,7 +3,7 @@ * * vCard data type implementation for Citadel/UX * - * Copyright (C) 1999-2004 by Art Cancro + * Copyright (C) 1999-2005 by Art Cancro * This code is freely redistributable under the terms of the GNU General * Public License. All other rights reserved. */ @@ -63,6 +63,7 @@ struct vCard *vcard_load(char *vtext) { int i; int colonpos, nlpos; + if (vtext == NULL) return vcard_new(); mycopy = strdup(vtext); if (mycopy == NULL) return NULL; @@ -97,15 +98,20 @@ struct vCard *vcard_load(char *vtext) { strncpy(valuebuf, &ptr[colonpos+1], nlpos-colonpos-1); valuebuf[nlpos-colonpos-1] = 0; - if ( (!strcasecmp(namebuf, "end")) - && (!strcasecmp(valuebuf, "vcard")) ) valid = 0; - if ( (!strcasecmp(namebuf, "begin")) - && (!strcasecmp(valuebuf, "vcard")) ) valid = 1; + if (!strcasecmp(namebuf, "end")) { + valid = 0; + } + if ( (!strcasecmp(namebuf, "begin")) + && (!strcasecmp(valuebuf, "vcard")) + ) { + valid = 1; + } if ( (valid) && (strcasecmp(namebuf, "begin")) ) { ++v->numprops; v->prop = realloc(v->prop, - (v->numprops * sizeof(char *) * 2) ); + (v->numprops * sizeof(struct vCardProp)) + ); v->prop[v->numprops-1].name = namebuf; v->prop[v->numprops-1].value = valuebuf; } @@ -208,7 +214,7 @@ void vcard_set_prop(struct vCard *v, char *name, char *value, int append) { /* Otherwise, append it */ ++v->numprops; v->prop = realloc(v->prop, - (v->numprops * sizeof(char *) * 2) ); + (v->numprops * sizeof(struct vCardProp)) ); v->prop[v->numprops-1].name = strdup(name); v->prop[v->numprops-1].value = strdup(value); } diff --git a/webcit/vcard_edit.c b/webcit/vcard_edit.c index d9aca9dd2..fb18a33e4 100644 --- a/webcit/vcard_edit.c +++ b/webcit/vcard_edit.c @@ -106,13 +106,13 @@ void do_edit_vcard(long msgnum, char *partnum, char *return_to) { } total_len = atoi(&buf[4]); - serialized_vcard = malloc(total_len + 1); + serialized_vcard = malloc(total_len + 2); read_server_binary(serialized_vcard, total_len); serv_puts("CLOS"); serv_gets(buf); - serialized_vcard[total_len + 1] = 0; + serialized_vcard[total_len] = 0; v = vcard_load(serialized_vcard); free(serialized_vcard); diff --git a/webcit/who.c b/webcit/who.c index d57b18504..bc4a55246 100644 --- a/webcit/who.c +++ b/webcit/who.c @@ -102,11 +102,11 @@ void whobbs(void) wprintf(" (kill)"); + ">[kill]"); } if (sess == WC->ctdl_pid) { wprintf(" (edit)"); + ">[edit]"); } wprintf("");