Removed err_* and sln_* functions; replaced all calls with scr_* functions.
authorArt Cancro <ajc@citadel.org>
Thu, 2 Sep 2010 01:21:38 +0000 (21:21 -0400)
committerArt Cancro <ajc@citadel.org>
Thu, 2 Sep 2010 01:21:38 +0000 (21:21 -0400)
Removed all build script references to curses and ncurses.
I want all output to go through a single path.

13 files changed:
citadel/buildpackages
citadel/configure.ac
citadel/debian/control
citadel/textclient/citadel.c
citadel/textclient/client_chat.c
citadel/textclient/commands.c
citadel/textclient/messages.c
citadel/textclient/rooms.c
citadel/textclient/routines.c
citadel/textclient/routines2.c
citadel/textclient/screen.c
citadel/textclient/screen.h
citadel/textclient/tuiconfig.c

index 8cb0f70d7d1262792ab315672c028c890d9b8d1a..25da56385f03b1ed6a3704719c9ed6d280fc1a8b 100755 (executable)
@@ -82,7 +82,6 @@ EMAIL=citadel@outgesourced.org
        ./configure \
            --with-db=/opt/csw/bdb44 \
            --with-ical=/usr/local/ \
-           --without-curses \
            --with-prefix=/opt/csw/ \
            --with-datadir=/opt/csw/var/lib/citadel \
            --with-sysconfdir=/opt/csw/etc/citadel \
index b4ec4a178e5450d5b52e9eba0956b2350aee747d..3e0a8cd35a8e882aeec13a30c28126cb88dd2570 100644 (file)
@@ -247,8 +247,6 @@ AC_ARG_WITH(ssl,
                fi
        ]
 )
-AC_ARG_WITH(ncurses, [  --without-ncurses       don't use ncurses])
-
 AC_ARG_WITH(with_ldap, [  --with-ldap             use OpenLDAP client library])
 dnl AC_ARG_WITH(with_libdspam, [  --with-libdspam         use libdspam mail spam scanning library])
 AC_ARG_WITH(with_gc, [  --with-gc             use the Boehm-Demers-Weiser garbage collection library])
@@ -292,7 +290,6 @@ case "$host" in
        dnl TCP buffering isn't ideal under OS X. This define should also be
        dnl checked in other cases of OS X-Linux differences.
        *-*-darwin*)
-               AC_DEFINE(DISABLE_CURSES,[],[define this to disable use of curses])
                AC_DEFINE(HAVE_DARWIN, [], [define if using OS X/Darwin])
                AC_MSG_RESULT([Mac OS X])
        ;;
@@ -500,14 +497,6 @@ test "$enable_chkpwd" != no && LIBS=$save_LIBS
                fi
        fi
 
-if test "x$with_ncurses" != "xno"; then
-       AC_SEARCH_LIBS(tgetent, [ncurses curses termcap])
-       AC_SEARCH_LIBS(scrollok, [ncurses curses])
-       AC_SEARCH_LIBS(initscr, [ncurses curses])
-else
-       AC_SEARCH_LIBS(tgetent, [curses termcap])
-       AC_SEARCH_LIBS(initscr, [curses])
-fi
 AC_CHECK_FUNCS(vw_printw wcolor_set resizeterm wresize)
 
 dnl Check for libpthread(s) if we're not using Digital UNIX or FreeBSD. (On
@@ -819,15 +808,7 @@ dnl
 dnl TODO: for the DB header checks, we should check whether the headers
 dnl define db_env_create, somehow
 dnl
-AC_CHECK_HEADERS(curses.h dl.h fcntl.h limits.h malloc.h termios.h sys/ioctl.h sys/select.h sys/stat.h sys/time.h sys/prctl.h syslog.h unistd.h utmp.h utmpx.h paths.h db.h db4/db.h pthread.h netinet/in.h arpa/nameser.h arpa/nameser_compat.h syscall.h sys/syscall.h)
-
-dnl
-dnl need to check if this is actually compilable, sometimes there are
-dnl conflicts with the system's headers (eg solaris xpg4 style headers)
-dnl
-if test "x$with_ncurses" != xno; then
-       AC_CHECK_HEADERS(ncurses.h,,,[ ])
-fi
+AC_CHECK_HEADERS(dl.h fcntl.h limits.h malloc.h termios.h sys/ioctl.h sys/select.h sys/stat.h sys/time.h sys/prctl.h syslog.h unistd.h utmp.h utmpx.h paths.h db.h db4/db.h pthread.h netinet/in.h arpa/nameser.h arpa/nameser_compat.h syscall.h sys/syscall.h)
 
 AC_CHECK_HEADER(resolv.h,AC_DEFINE(HAVE_RESOLV_H, [], [define this if you have the resolv.h header file.]),,
 [#ifdef HAVE_SYS_TYPES_H
index c095bd262287adaebc93b112ce7ebbf6dfc3a344..b2a0492bb90cb8a504061ddcd02d6f5660c88d21 100644 (file)
@@ -3,7 +3,7 @@ Section: mail
 Priority: extra
 Maintainer: Wilfried Goesgens <w.goesgens@outgesourced.org>
 Build-Depends: debhelper (>= 4), po-debconf, bison, autotools-dev,
- libdb-dev, libical-dev (>=0.43), libldap2-dev, libncurses5-dev,
+ libdb-dev, libical-dev (>=0.43), libldap2-dev,
  libpam0g-dev, libsieve2-dev, libssl-dev, libexpat1-dev, libcitadel-dev (>= 7.42),
  libcurl4-openssl-dev | libcurl3-openssl-dev, zlib1g-dev
 Standards-Version: 3.8.0
index 406617eb126eba30e1d2297867da761ced5775af..f96c64fe20c60580fbfd6ca7be8bc9d9d6791cc3 100644 (file)
@@ -1403,8 +1403,8 @@ int shift(int argc, char **argv, int start, int count) {
 }
 
 static void statusHook(char *s) {
-       sln_printf(s);
-       sln_flush();
+       scr_printf(s);
+       scr_flush();
 }
 
 /*
@@ -1456,15 +1456,15 @@ int main(int argc, char **argv)
        eCrash_Init(&params);
 #endif 
        setIPCDeathHook(screen_delete);
-       setIPCErrorPrintf(err_printf);
+       setIPCErrorPrintf(scr_printf);
        setCryptoStatusHook(statusHook);
        
        /* Permissions sanity check - don't run citadel setuid/setgid */
        if (getuid() != geteuid()) {
-               err_printf("Please do not run citadel setuid!\n");
+               scr_printf("Please do not run citadel setuid!\n");
                logoff(NULL, 3);
        } else if (getgid() != getegid()) {
-               err_printf("Please do not run citadel setgid!\n");
+               scr_printf("Please do not run citadel setgid!\n");
                logoff(NULL, 3);
        }
 
@@ -1564,7 +1564,7 @@ int main(int argc, char **argv)
        newprompt("Connect to (return for local server): ", hostbuf, 64);
 #endif
 
-       sln_printf("Attaching to server...\n");
+       scr_printf("Attaching to server...\n");
        ipc = CtdlIPC_new(argc, argv, hostbuf, portbuf);
        if (!ipc) {
                screen_delete();
@@ -1573,7 +1573,7 @@ int main(int argc, char **argv)
        }
 
        if (!(ipc->isLocal)) {
-               sln_printf("Connected to %s [%s].\n", ipc->ip_hostname, ipc->ip_address);
+               scr_printf("Connected to %s [%s].\n", ipc->ip_hostname, ipc->ip_address);
        }
 
 #if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
@@ -2337,7 +2337,7 @@ TERMN8:   scr_printf("%s logged out.", fullname);
                remove_march(marchptr->march_name, 0);
        }
        if (mcmd == 30) {
-               sln_printf("\n\nType 'off' to disconnect, or next user...\n");
+               scr_printf("\n\nType 'off' to disconnect, or next user...\n");
        }
        CtdlIPCLogout(ipc);
        if ((mcmd == 29) || (mcmd == 15)) {
index 3f8ed7799a9c6d5c54fcbc28d9a364210a2799c3..dbe0ce900f40503e7232f89e973177648247fec0 100644 (file)
@@ -96,12 +96,12 @@ void chatmode(CtdlIPC *ipc)
        strcpy(wbuf, "");
        strcpy(last_user, ""); 
        color(BRIGHT_YELLOW);
-       sln_printf_if("\n");
-       sln_printf("> ");
+       scr_printf("\n");
+       scr_printf("> ");
        send_complete_line = 0;
 
        while (1) {
-               sln_flush();
+               scr_flush();
                FD_ZERO(&rfds);
                FD_SET(0, &rfds);
                tv.tv_sec = 1;
@@ -116,10 +116,10 @@ void chatmode(CtdlIPC *ipc)
                        } else if ((ch == 8) || (ch == 127)) {
                                if (!IsEmptyStr(wbuf)) {
                                        wbuf[strlen(wbuf) - 1] = 0;
-                                       sln_printf("%c %c", 8, 8);
+                                       scr_printf("%c %c", 8, 8);
                                }
                        } else {
-                               sln_putc(ch);
+                               scr_putc(ch);
                                wbuf[strlen(wbuf) + 1] = 0;
                                wbuf[strlen(wbuf)] = ch;
                        }
@@ -132,8 +132,8 @@ void chatmode(CtdlIPC *ipc)
                                CtdlIPC_chat_send(ipc, "RCHT exit");
                                CtdlIPC_chat_recv(ipc, response);       /* don't care about the result */
                                color(BRIGHT_WHITE);
-                               sln_printf("\rExiting chat mode\n");
-                               sln_flush();
+                               scr_printf("\rExiting chat mode\n");
+                               scr_flush();
                                return;
                        }
 
@@ -184,7 +184,7 @@ void chatmode(CtdlIPC *ipc)
                        seq = extract_int(&response[4], 0);
                        extract_token(c_user, &response[4], 2, '|', sizeof c_user);
                        while (CtdlIPC_chat_recv(ipc, c_text), strcmp(c_text, "000")) {
-                               sln_printf("\r%79s\r", "");
+                               scr_printf("\r%79s\r", "");
                                if (!strcmp(c_user, fullname)) {
                                        color(BRIGHT_YELLOW);
                                } else if (!strcmp(c_user, ":")) {
@@ -203,7 +203,7 @@ void chatmode(CtdlIPC *ipc)
                                        strcat(buf, " ");
                                }
                                if (strcmp(c_user, last_user)) {
-                                       sln_printf("\r%79s\n", "");
+                                       scr_printf("\r%79s\n", "");
                                        strcpy(last_user, c_user);
                                }
                                scr_printf("\r%s\n", buf);
@@ -211,8 +211,8 @@ void chatmode(CtdlIPC *ipc)
                        }
                }
                color(BRIGHT_YELLOW);
-               sln_printf("\r> %s", wbuf);
-               sln_flush();
+               scr_printf("\r> %s", wbuf);
+               scr_flush();
                strcpy(buf, "");
        }
 }
index 0465db3cda427f53d275501b0de02f6f046648a4..9ab121e00cbfd7e7bd5774435ec036d3c69ae918 100644 (file)
@@ -1352,7 +1352,7 @@ int fmout(
        /* Space for a single word, which can be at most screenwidth */
        word = (char *)calloc(1, width);
        if (!word) {
-               err_printf("Can't alloc memory to print message: %s!\n",
+               scr_printf("Can't alloc memory to print message: %s!\n",
                                strerror(errno));
                logoff(NULL, 3);
        }
@@ -1361,7 +1361,7 @@ int fmout(
        if (fpin) {
                buffer = load_message_from_file(fpin);
                if (!buffer) {
-                       err_printf("Can't print message: %s!\n",
+                       scr_printf("Can't print message: %s!\n",
                                        strerror(errno));
                        logoff(NULL, 3);
                }
index e98e262abe9c1883f35fa59dec349a4ff20af070..0f0636d673ee3d1f6fd674678009da31415b02ca 100644 (file)
@@ -426,7 +426,7 @@ int read_message(CtdlIPC *ipc,
 
        r = CtdlIPCGetSingleMessage(ipc, num, (pagin == READ_HEADER ? 1 : 0), 4, &message, buf);
        if (r / 100 != 1) {
-               err_printf("*** msg #%ld: %d %s\n", num, r, buf);
+               scr_printf("*** msg #%ld: %d %s\n", num, r, buf);
                ++lines_printed;
                lines_printed = checkpagin(lines_printed, pagin, screenheight);
                stty_ctdl(0);
@@ -866,7 +866,7 @@ int client_make_message(CtdlIPC *ipc,
                {
                        editor_path = editor_paths[0];
                } else {
-                       err_printf("*** No editor available; using built-in editor.\n");
+                       scr_printf("*** No editor available; using built-in editor.\n");
                        mode = 0;
                }
        }
@@ -914,7 +914,7 @@ int client_make_message(CtdlIPC *ipc,
                } else {
                        fp = fopen(filename, "w");
                        if (fp == NULL) {
-                               err_printf("*** Error opening temp file!\n    %s: %s\n",
+                               scr_printf("*** Error opening temp file!\n    %s: %s\n",
                                        filename, strerror(errno)
                                );
                        return(1);
@@ -928,7 +928,7 @@ ME1:        switch (mode) {
        case 0:
                fp = fopen(filename, "r+");
                if (fp == NULL) {
-                       err_printf("*** Error opening temp file!\n    %s: %s\n",
+                       scr_printf("*** Error opening temp file!\n    %s: %s\n",
                                filename, strerror(errno)
                        );
                        return(1);
@@ -940,7 +940,7 @@ ME1:        switch (mode) {
        case 1:
                fp = fopen(filename, "a");
                if (fp == NULL) {
-                       err_printf("*** Error opening temp file!\n"
+                       scr_printf("*** Error opening temp file!\n"
                                "    %s: %s\n",
                                filename, strerror(errno));
                        return(1);
@@ -990,7 +990,7 @@ ME1:        switch (mode) {
 
 MECR:  if (mode >= 2) {
                if (file_checksum(filename) == cksum) {
-                       err_printf("*** Aborted message.\n");
+                       scr_printf("*** Aborted message.\n");
                        e_ex_code = 1;
                }
                if (e_ex_code == 0) {
@@ -1249,7 +1249,7 @@ int entmsg(CtdlIPC *ipc,
        fp = fopen(temp, "r");
 
        if (!fp || !(message.text = load_message_from_file(fp))) {
-               err_printf("*** Internal error while trying to save message!\n"
+               scr_printf("*** Internal error while trying to save message!\n"
                        "%s: %s\n",
                        temp, strerror(errno));
                unlink(temp);
index a27df07233eab803be331359fe44984a8ec7c34b..34f1fea19a2f30029af5432af09d5be0d7955455 100644 (file)
@@ -788,7 +788,7 @@ int save_buffer(void *file, size_t filelen, const char *pathname)
 
        fp = fopen(pathname, "w");
        if (!fp) {
-               err_printf("Cannot open '%s': %s\n", pathname, strerror(errno));
+               scr_printf("Cannot open '%s': %s\n", pathname, strerror(errno));
                return 0;
        }
        do {
@@ -799,7 +799,7 @@ int save_buffer(void *file, size_t filelen, const char *pathname)
        fclose(fp);
 
        if (bytes_written < filelen) {
-               err_printf("Trouble saving '%s': %s\n", pathname,
+               scr_printf("Trouble saving '%s': %s\n", pathname,
                                strerror(errno));
                return 0;
        }
index 8dff0a5f947d5a03ce4b4aa1497a2e1db25c3d2c..0bed6b54668e4be7de791d39fb5a71d6362ab1ec 100644 (file)
@@ -439,16 +439,16 @@ void progress(CtdlIPC* ipc, unsigned long curr, unsigned long cmax)
        unsigned long a;
 
        if (curr >= cmax) {
-               sln_printf("\r%79s\r","");
+               scr_printf("\r%79s\r","");
        } else {
                /* a will be range 0-50 rather than 0-100 */
                a=(curr * 50) / cmax;
                sprintf(fmt, "[%%s%%%lds] %%3ld%%%% %%10ld/%%10ld\r", 50 - a);
                strncpy(dots_printed, dots, a);
                dots_printed[a] = 0;
-               sln_printf(fmt, dots_printed, "",
+               scr_printf(fmt, dots_printed, "",
                                curr * 100 / cmax, curr, cmax);
-               sln_flush();
+               scr_flush();
        }
 }
 
index 3aab13d830ec30e7a2e07ac5e99ab1613b930a19..89c0acf927560eddaa4c0933c2cd4e999a983b5d 100644 (file)
@@ -62,7 +62,7 @@ int eopen(char *name, int mode)
        int ret;
        ret = open(name, mode);
        if (ret < 0) {
-               err_printf("Cannot open file '%s', mode=%d, errno=%d\n",
+               scr_printf("Cannot open file '%s', mode=%d, errno=%d\n",
                        name, mode, errno);
                interr(errno);
        }
@@ -287,15 +287,15 @@ void cli_image_upload(CtdlIPC *ipc, char *keyname)
        /* Can we upload this image? */
        r = CtdlIPCImageUpload(ipc, 0, NULL, keyname, NULL, buf);
        if (r / 100 != 2) {
-               err_printf("%s\n", buf);
+               scr_printf("%s\n", buf);
                return;
        }
        newprompt("Image file to be uploaded: ", flnm, 55);
        r = CtdlIPCImageUpload(ipc, 1, flnm, keyname, progress, buf);
        if (r / 100 == 5) {
-               err_printf("%s\n", buf);
+               scr_printf("%s\n", buf);
        } else if (r < 0) {
-               err_printf("Cannot upload '%s': %s\n", flnm, strerror(errno));
+               scr_printf("Cannot upload '%s': %s\n", flnm, strerror(errno));
        }
        /* else upload succeeded */
 }
@@ -522,7 +522,7 @@ void subshell(void)
                signal(SIGINT, SIG_DFL);
                signal(SIGQUIT, SIG_DFL);
                execlp(getenv("SHELL"), getenv("SHELL"), NULL);
-               err_printf("Could not open a shell: %s\n", strerror(errno));
+               scr_printf("Could not open a shell: %s\n", strerror(errno));
                exit(errno);
        }
        do {
@@ -544,7 +544,7 @@ void deletefile(CtdlIPC *ipc)
        if (IsEmptyStr(filename))
                return;
        CtdlIPCDeleteFile(ipc, filename, buf);
-       err_printf("%s\n", buf);
+       scr_printf("%s\n", buf);
 }
 
 
@@ -562,7 +562,7 @@ void movefile(CtdlIPC *ipc)
                return;
        newprompt("Enter target room: ", newroom, ROOMNAMELEN - 1);
        CtdlIPCMoveFile(ipc, filename, newroom, buf);
-       err_printf("%s\n", buf);
+       scr_printf("%s\n", buf);
 }
 
 
index 44fa8dfa6037e92b688778bb42b3482e3582b75a..dfc38a4ab943fb12c386aaa26f93f70633a3db84 100644 (file)
@@ -85,36 +85,6 @@ int screen_reset(void)
  * scr_printf() outputs to the terminal
  */
 int scr_printf(char *fmt, ...)
-{
-       va_list ap;
-       register int retval;
-
-       va_start(ap, fmt);
-       retval = vprintf(fmt, ap);
-       va_end(ap);
-       return retval;
-}
-
-
-/*
- * err_printf() outputs to error status window (or stderr if not in curses)
- */
-int err_printf(char *fmt, ...)
-{
-       va_list ap;
-       register int retval;
-
-       va_start(ap, fmt);
-       retval = vfprintf(stderr, fmt, ap);
-       va_end(ap);
-       return retval;
-}
-
-
-/*
- * sln_printf() outputs to error status window (or stderr if not in curses)
- */
-int sln_printf(char *fmt, ...)
 {
        va_list ap;
        register int retval;
@@ -126,15 +96,8 @@ int sln_printf(char *fmt, ...)
 
 
 /*
- * sln_printf_if() outputs to status window, no output if not in curses
+ * Read one character from the terminal
  */
-int sln_printf_if(char *fmt, ...)
-{
-       register int retval = 1;
-       return retval;
-}
-
-
 int scr_getc(int delay)
 {
        unsigned char buf;
@@ -145,7 +108,7 @@ int scr_getc(int delay)
 }
 
 /*
- * scr_putc() outputs a single character
+ * Output one character to the terminal
  */
 int scr_putc(int c)
 {
@@ -155,18 +118,6 @@ int scr_putc(int c)
 }
 
 
-int sln_putc(int c)
-{
-       return putc(c, stdout);
-}
-
-
-int sln_putc_if(int c)
-{
-       return 1;
-}
-
-
 /*
  * scr_color() sets the window color for mainwindow
  */
@@ -182,17 +133,6 @@ void scr_flush(void)
 }
 
 
-void err_flush(void)
-{
-               fflush(stderr);
-}
-
-
-void sln_flush(void)
-{
-       fflush(stdout);
-}
-
 static volatile int caught_sigwinch = 0;
 
 /*
index 134a99cd24f947e9a7d00911b8cdcd99324b617e..77cabc6b7c76398ea37b19e855d8272df0feccea 100644 (file)
@@ -1,40 +1,21 @@
 
 /* client code may need the ERR define: */
 
-#ifndef DISABLE_CURSES
-#ifdef HAVE_NCURSES_H
-#include <ncurses.h>
-#elif defined(HAVE_CURSES_H)
-#include <curses.h>
-#endif
-#endif
-
-void status_line(const char *humannode, const char *site_location,
-                const char *room_name, int secure, int newmailcount);
 void screen_new(void);
 void screen_delete(void);
 int screen_set(void);
 int screen_reset(void);
 int scr_printf(char *fmt, ...);
-int err_printf(char *fmt, ...);
-int sln_printf(char *fmt, ...);
-int sln_printf_if(char *fmt, ...);
 
 #define SCR_NOBLOCK 0
 #define SCR_BLOCK -1
 int scr_getc(int delay);
 
 int scr_putc(int c);
-int sln_putc(int c);
 int scr_color(int colornum);
 void scr_flush(void);
-void err_flush(void);
-void sln_flush(void);
 int scr_set_windowsize(CtdlIPC* ipc);
-void windows_new(void);
-void windows_delete(void);
 int scr_blockread(void);
-int is_curses_enabled(void);
 RETSIGTYPE scr_winch(int signum);
 void wait_indicator(int state);
 void ctdl_beep(void);
index 4ea9cc0f026022c86ce5d5df8ce959f090929307..093a5d3a5cb4790c66b1ae89cea767327ca1e7c6 100644 (file)
@@ -359,7 +359,7 @@ void do_system_configuration(CtdlIPC *ipc)
                        r += 1 + strlen(sc[a]);
                resp = (char *)calloc(1, r);
                if (!resp) {
-                       err_printf("Can't save config - out of memory!\n");
+                       scr_printf("Can't save config - out of memory!\n");
                        logoff(ipc, 1);
                }
                for (a = 0; a < NUM_CONFIGS; a++) {
@@ -368,18 +368,18 @@ void do_system_configuration(CtdlIPC *ipc)
                }
                r = CtdlIPCSetSystemConfig(ipc, resp, buf);
                if (r / 100 != 4) {
-                       err_printf("%s\n", buf);
+                       scr_printf("%s\n", buf);
                }
                free(resp);
 
                r = CtdlIPCSetMessageExpirationPolicy(ipc, 2, site_expirepolicy, buf);
                if (r / 100 != 2) {
-                       err_printf("%s\n", buf);
+                       scr_printf("%s\n", buf);
                }
 
                r = CtdlIPCSetMessageExpirationPolicy(ipc, 3, mbx_expirepolicy, buf);
                if (r / 100 != 2) {
-                       err_printf("%s\n", buf);
+                       scr_printf("%s\n", buf);
                }
 
        }
@@ -506,7 +506,7 @@ void do_internet_configuration(CtdlIPC *ipc)
                                        r += 1 + strlen(recs[i]);
                                resp = (char *)calloc(1, r);
                                if (!resp) {
-                                       err_printf("Can't save config - out of memory!\n");
+                                       scr_printf("Can't save config - out of memory!\n");
                                        logoff(ipc, 1);
                                }
                                if (num_recs) for (i = 0; i < num_recs; i++) {
@@ -515,7 +515,7 @@ void do_internet_configuration(CtdlIPC *ipc)
                                }
                                r = CtdlIPCSetSystemConfigByType(ipc, INTERNETCFG, resp, buf);
                                if (r / 100 != 4) {
-                                       err_printf("%s\n", buf);
+                                       scr_printf("%s\n", buf);
                                } else {
                                        scr_printf("Wrote %d records.\n", num_recs);
                                        modified = 0;
@@ -569,7 +569,7 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment)
 
        tempfp = fopen(filename, "w");
        if (tempfp == NULL) {
-               err_printf("Cannot open %s: %s\n", filename, strerror(errno));
+               scr_printf("Cannot open %s: %s\n", filename, strerror(errno));
                return;
        }
 
@@ -625,7 +625,7 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment)
        }
 
        if (file_checksum(filename) == cksum) {
-               err_printf("*** No changes to save.\n");
+               scr_printf("*** No changes to save.\n");
                e_ex_code = 1;
        }
 
@@ -778,7 +778,7 @@ void do_ignet_configuration(CtdlIPC *ipc) {
                                        r += 1 + strlen(recs[i]);
                                listing = (char*) calloc(1, r);
                                if (!listing) {
-                                       err_printf("Can't save config - out of memory!\n");
+                                       scr_printf("Can't save config - out of memory!\n");
                                        logoff(ipc, 1);
                                }
                                if (num_recs) for (i = 0; i < num_recs; ++i) {
@@ -903,7 +903,7 @@ void do_filterlist_configuration(CtdlIPC *ipc)
                                        r += 1 + strlen(recs[i]);
                                listing = (char*) calloc(1, r);
                                if (!listing) {
-                                       err_printf("Can't save config - out of memory!\n");
+                                       scr_printf("Can't save config - out of memory!\n");
                                        logoff(ipc, 1);
                                }
                                if (num_recs) for (i = 0; i < num_recs; ++i) {
@@ -1053,7 +1053,7 @@ void do_pop3client_configuration(CtdlIPC *ipc)
                                }
                                listing = (char*) calloc(1, r);
                                if (!listing) {
-                                       err_printf("Can't save config - out of memory!\n");
+                                       scr_printf("Can't save config - out of memory!\n");
                                        logoff(ipc, 1);
                                }
                                if (num_recs) for (i = 0; i < num_recs; ++i) {
@@ -1198,7 +1198,7 @@ void do_rssclient_configuration(CtdlIPC *ipc)
                                }
                                listing = (char*) calloc(1, r);
                                if (!listing) {
-                                       err_printf("Can't save config - out of memory!\n");
+                                       scr_printf("Can't save config - out of memory!\n");
                                        logoff(ipc, 1);
                                }
                                if (num_recs) for (i = 0; i < num_recs; ++i) {