char *get_mail_conf_str_fn(const char *name, stupid_indent_str defval, int min, int max) { const char *strval; if ((strval = mail_conf_lookup_eval(name)) == 0) { strval = mail_conf_eval(defval()); mail_conf_update(name, strval); } check_mail_conf_str(name, strval, min, max); return (mystrdup(strval)); }
int spcset(int func, cc_t *valp, cc_t **valpp) { #define setval(a, b) *valp = termbuf.c_cc[a]; \ *valpp = &termbuf.c_cc[a]; \ return(b); #define defval(a) *valp = ((cc_t)a); *valpp = (cc_t *)0; return(SLC_DEFAULT); switch(func) { case SLC_EOF: setval(VEOF, SLC_VARIABLE); case SLC_EC: setval(VERASE, SLC_VARIABLE); case SLC_EL: setval(VKILL, SLC_VARIABLE); case SLC_IP: setval(VINTR, SLC_VARIABLE|SLC_FLUSHIN|SLC_FLUSHOUT); case SLC_ABORT: setval(VQUIT, SLC_VARIABLE|SLC_FLUSHIN|SLC_FLUSHOUT); case SLC_XON: setval(VSTART, SLC_VARIABLE); case SLC_XOFF: setval(VSTOP, SLC_VARIABLE); case SLC_EW: setval(VWERASE, SLC_VARIABLE); case SLC_RP: setval(VREPRINT, SLC_VARIABLE); case SLC_LNEXT: setval(VLNEXT, SLC_VARIABLE); case SLC_AO: setval(VDISCARD, SLC_VARIABLE|SLC_FLUSHOUT); case SLC_SUSP: setval(VSUSP, SLC_VARIABLE|SLC_FLUSHIN); case SLC_FORW1: setval(VEOL, SLC_VARIABLE); case SLC_FORW2: setval(VEOL2, SLC_VARIABLE); case SLC_AYT: setval(VSTATUS, SLC_VARIABLE); case SLC_BRK: case SLC_SYNCH: case SLC_EOR: defval(0); default: *valp = 0; *valpp = 0; return(SLC_NOSUPPORT); } }
int spcset(int func, cc_t *valp, cc_t **valpp) { switch(func) { case SLC_EOF: setval(VEOF, SLC_VARIABLE); case SLC_EC: setval(VERASE, SLC_VARIABLE); case SLC_EL: setval(VKILL, SLC_VARIABLE); case SLC_IP: setval(VINTR, SLC_VARIABLE|SLC_FLUSHIN|SLC_FLUSHOUT); case SLC_ABORT: setval(VQUIT, SLC_VARIABLE|SLC_FLUSHIN|SLC_FLUSHOUT); case SLC_XON: #ifdef VSTART setval(VSTART, SLC_VARIABLE); #else defval(0x13); #endif case SLC_XOFF: #ifdef VSTOP setval(VSTOP, SLC_VARIABLE); #else defval(0x11); #endif case SLC_EW: #ifdef VWERASE setval(VWERASE, SLC_VARIABLE); #else defval(0); #endif case SLC_RP: #ifdef VREPRINT setval(VREPRINT, SLC_VARIABLE); #else defval(0); #endif case SLC_LNEXT: #ifdef VLNEXT setval(VLNEXT, SLC_VARIABLE); #else defval(0); #endif case SLC_AO: #if !defined(VDISCARD) && defined(VFLUSHO) # define VDISCARD VFLUSHO #endif #ifdef VDISCARD setval(VDISCARD, SLC_VARIABLE|SLC_FLUSHOUT); #else defval(0); #endif case SLC_SUSP: #ifdef VSUSP setval(VSUSP, SLC_VARIABLE|SLC_FLUSHIN); #else defval(0); #endif #ifdef VEOL case SLC_FORW1: setval(VEOL, SLC_VARIABLE); #endif #ifdef VEOL2 case SLC_FORW2: setval(VEOL2, SLC_VARIABLE); #endif case SLC_AYT: #ifdef VSTATUS setval(VSTATUS, SLC_VARIABLE); #else defval(0); #endif case SLC_BRK: case SLC_SYNCH: case SLC_EOR: defval(0); default: *valp = 0; *valpp = 0; return(SLC_NOSUPPORT); } }
int spcset (int func, cc_t * valp, cc_t ** valpp) { switch (func) { case SLC_EOF: setval (termdesc_eofc, SLC_VARIABLE); case SLC_EC: setval (termdesc_erase, SLC_VARIABLE); case SLC_EL: setval (termdesc_kill, SLC_VARIABLE); case SLC_IP: setval (termdesc_ip, SLC_VARIABLE | SLC_FLUSHIN | SLC_FLUSHOUT); case SLC_ABORT: setval (termdesc_abort, SLC_VARIABLE | SLC_FLUSHIN | SLC_FLUSHOUT); case SLC_XON: #ifdef termdesc_xon setval (termdesc_xon, SLC_VARIABLE); #else defval (0x13); #endif case SLC_XOFF: #ifdef termdesc_xoff setval (termdesc_xoff, SLC_VARIABLE); #else defval (0x11); #endif case SLC_EW: #ifdef termdesc_ew setval (termdesc_ew, SLC_VARIABLE); #else defval (0); #endif case SLC_RP: #ifdef termdesc_rp setval (termdesc_rp, SLC_VARIABLE); #else defval (0); #endif case SLC_LNEXT: #ifdef termdesc_lnext setval (termdesc_lnext, SLC_VARIABLE); #else defval (0); #endif case SLC_AO: #ifdef termdesc_ao setval (termdesc_ao, SLC_VARIABLE | SLC_FLUSHOUT); #else defval (0); #endif case SLC_SUSP: #ifdef termdesc_susp setval (termdesc_susp, SLC_VARIABLE | SLC_FLUSHIN); #else defval (0); #endif #ifdef termdesc_forw1 case SLC_FORW1: setval (termdesc_forw1, SLC_VARIABLE); #endif #ifdef termdesc_forw2 case SLC_FORW2: setval (termdesc_forw2, SLC_VARIABLE); #endif case SLC_AYT: #ifdef termdesc_status setval (termdesc_status, SLC_VARIABLE); #else defval (0); #endif case SLC_BRK: case SLC_SYNCH: case SLC_EOR: defval (0); default: *valp = 0; *valpp = 0; return SLC_NOSUPPORT; } }