striplt() is now string_trim()
[citadel.git] / textclient / routines.c
index 56b4fd3375ae8f246172c2a1366b1c6d390689b9..1dff2b7d1003a464932e2dabf01b23443a236169 100644 (file)
@@ -81,7 +81,7 @@ void edit_user_internet_email_addresses(CtdlIPC * ipc, char *who) {
                switch (ch) {
                case 'a':
                        newprompt("Enter new email address: ", buf, 50);
-                       striplt(buf);
+                       string_trim(buf);
                        if (!IsEmptyStr(buf)) {
                                // FIXME validate the email address (format, our own domain, addr does not belong to another user)
                                ++num_recs;
@@ -490,6 +490,9 @@ void locate_host(CtdlIPC * ipc, char *hbuf) {
                return;
        }
        fgets(hbuf, SIZ, who);
+       if (hbuf[strlen(hbuf) - 1] == '\n') {
+               hbuf[strlen(hbuf) - 1] = 0;
+       }
        pclose(who);
        stripallbut(hbuf, '(', ')');
 }