From c099b0a256e8913d46be62cb3d8eac03a562ca18 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 1 Sep 2010 21:21:38 -0400 Subject: [PATCH] Removed err_* and sln_* functions; replaced all calls with scr_* functions. Removed all build script references to curses and ncurses. I want all output to go through a single path. --- citadel/buildpackages | 1 - citadel/configure.ac | 21 +---------- citadel/debian/control | 2 +- citadel/textclient/citadel.c | 16 ++++---- citadel/textclient/client_chat.c | 22 +++++------ citadel/textclient/commands.c | 4 +- citadel/textclient/messages.c | 14 +++---- citadel/textclient/rooms.c | 4 +- citadel/textclient/routines.c | 6 +-- citadel/textclient/routines2.c | 14 +++---- citadel/textclient/screen.c | 64 +------------------------------- citadel/textclient/screen.h | 19 ---------- citadel/textclient/tuiconfig.c | 24 ++++++------ 13 files changed, 56 insertions(+), 155 deletions(-) diff --git a/citadel/buildpackages b/citadel/buildpackages index 8cb0f70d7..25da56385 100755 --- a/citadel/buildpackages +++ b/citadel/buildpackages @@ -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 \ diff --git a/citadel/configure.ac b/citadel/configure.ac index b4ec4a178..3e0a8cd35 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -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 diff --git a/citadel/debian/control b/citadel/debian/control index c095bd262..b2a0492bb 100644 --- a/citadel/debian/control +++ b/citadel/debian/control @@ -3,7 +3,7 @@ Section: mail Priority: extra Maintainer: Wilfried Goesgens 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 diff --git a/citadel/textclient/citadel.c b/citadel/textclient/citadel.c index 406617eb1..f96c64fe2 100644 --- a/citadel/textclient/citadel.c +++ b/citadel/textclient/citadel.c @@ -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(¶ms); #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)) { diff --git a/citadel/textclient/client_chat.c b/citadel/textclient/client_chat.c index 3f8ed7799..dbe0ce900 100644 --- a/citadel/textclient/client_chat.c +++ b/citadel/textclient/client_chat.c @@ -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, ""); } } diff --git a/citadel/textclient/commands.c b/citadel/textclient/commands.c index 0465db3cd..9ab121e00 100644 --- a/citadel/textclient/commands.c +++ b/citadel/textclient/commands.c @@ -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); } diff --git a/citadel/textclient/messages.c b/citadel/textclient/messages.c index e98e262ab..0f0636d67 100644 --- a/citadel/textclient/messages.c +++ b/citadel/textclient/messages.c @@ -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); diff --git a/citadel/textclient/rooms.c b/citadel/textclient/rooms.c index a27df0723..34f1fea19 100644 --- a/citadel/textclient/rooms.c +++ b/citadel/textclient/rooms.c @@ -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; } diff --git a/citadel/textclient/routines.c b/citadel/textclient/routines.c index 8dff0a5f9..0bed6b546 100644 --- a/citadel/textclient/routines.c +++ b/citadel/textclient/routines.c @@ -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(); } } diff --git a/citadel/textclient/routines2.c b/citadel/textclient/routines2.c index 3aab13d83..89c0acf92 100644 --- a/citadel/textclient/routines2.c +++ b/citadel/textclient/routines2.c @@ -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); } diff --git a/citadel/textclient/screen.c b/citadel/textclient/screen.c index 44fa8dfa6..dfc38a4ab 100644 --- a/citadel/textclient/screen.c +++ b/citadel/textclient/screen.c @@ -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; /* diff --git a/citadel/textclient/screen.h b/citadel/textclient/screen.h index 134a99cd2..77cabc6b7 100644 --- a/citadel/textclient/screen.h +++ b/citadel/textclient/screen.h @@ -1,40 +1,21 @@ /* client code may need the ERR define: */ -#ifndef DISABLE_CURSES -#ifdef HAVE_NCURSES_H -#include -#elif defined(HAVE_CURSES_H) -#include -#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); diff --git a/citadel/textclient/tuiconfig.c b/citadel/textclient/tuiconfig.c index 4ea9cc0f0..093a5d3a5 100644 --- a/citadel/textclient/tuiconfig.c +++ b/citadel/textclient/tuiconfig.c @@ -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) { -- 2.30.2