|
|
1.1 ! root 1: /* main.c - widget */ ! 2: ! 3: #ifndef lint ! 4: static char *rcsid = "$Header: /f/osi/others/quipu/uips/sd/RCS/main.c,v 7.2 90/07/27 08:45:47 mrose Exp $"; ! 5: #endif ! 6: ! 7: /* ! 8: * $Header: /f/osi/others/quipu/uips/sd/RCS/main.c,v 7.2 90/07/27 08:45:47 mrose Exp $ ! 9: */ ! 10: ! 11: /* ! 12: * $Log: main.c,v $ ! 13: * Revision 7.2 90/07/27 08:45:47 mrose ! 14: * update ! 15: * ! 16: * Revision 7.1 90/07/09 14:41:56 mrose ! 17: * sync ! 18: * ! 19: * Revision 7.0 90/06/12 13:14:05 mrose ! 20: * *** empty log message *** ! 21: * ! 22: * Revision 1.6 90/04/26 10:36:27 emsrdsm ! 23: * *** empty log message *** ! 24: * ! 25: * Revision 1.5 90/04/25 15:07:40 emsrdsm ! 26: * i) lint'ed ! 27: * ! 28: * Revision 1.4 90/04/20 17:57:54 emsrdsm ! 29: * i) no more freeing ! 30: * ! 31: * Revision 1.3 90/04/18 18:27:58 emsrdsm ! 32: * fixed i) does not move to leaves ! 33: * ii) added default mechanism described using "typeDefaults" file. ! 34: * iii) added 'sorting' to attribute display ! 35: * ! 36: * Revision 1.2 90/03/15 16:32:06 emsrdsm ! 37: * fixes i) Prints messages correctly on exit. ! 38: * ii) Added rfc822 to greybook mailbox conversion ! 39: * iii) Removed bug that caused crash if 'local_dit' undefined ! 40: * ! 41: * Revision 1.1 90/03/09 17:40:30 emsrdsm ! 42: * Initial revision ! 43: * ! 44: * Revision 1.1 90/03/09 13:36:54 emsrdsm ! 45: * Initial revision ! 46: * ! 47: */ ! 48: ! 49: #include <signal.h> ! 50: #include <stdio.h> ! 51: #define IP _IP ! 52: #include <curses.h> ! 53: #undef OK ! 54: #include "manifest.h" ! 55: #include <varargs.h> ! 56: ! 57: #include "widget.h" ! 58: #include "quipu/util.h" ! 59: ! 60: char currentpath[1024]; ! 61: ! 62: extern int wprint(),new_service(); ! 63: extern char goto_path[], namestr[], passwd[]; ! 64: extern char *myname; ! 65: extern WINDOW *Text; ! 66: extern WIDGET mainwdgts[]; ! 67: extern WIDGET cnnctwdgts[]; ! 68: extern int print_parse_errors; ! 69: ! 70: main(argc, argv) ! 71: int argc; ! 72: char *argv[]; ! 73: { ! 74: print_parse_errors = FALSE; ! 75: quipu_syntaxes(); ! 76: dsap_init (&argc,&argv); ! 77: ! 78: initwidgets(); /* Call the screen/curses/widget*/ ! 79: setsignals(); ! 80: ! 81: user_tailor(); ! 82: main_bind(); ! 83: cnnct_bind(); ! 84: help_init(); ! 85: interact(); ! 86: quit("\n", -1); ! 87: } ! 88: ! 89: ! 90: setsignals() ! 91: { ! 92: int i; ! 93: ! 94: for (i=0; i<18; i++) ! 95: (void) signal(i, SIG_DFL); ! 96: } ! 97: ! 98: eprint(str) ! 99: char *str; ! 100: { ! 101: tprint(str); ! 102: } ! 103: ! 104: sd_quit() ! 105: { ! 106: quit("\n", 0); ! 107: } ! 108: ! 109: /* This tidies up the terminal, writes the current history list and finishes */ ! 110: quit(error, sig) ! 111: char *error; ! 112: int sig; ! 113: { ! 114: endwidgets(); ! 115: (void) ds_unbind(); ! 116: hide_picture(); ! 117: (void) printf(error); ! 118: exit(sig); ! 119: } ! 120: ! 121: void int_quit(sig) ! 122: int sig; ! 123: { ! 124: quit(sig); ! 125: } ! 126: ! 127: ! 128: void advise (va_alist) ! 129: va_dcl ! 130: { ! 131: int code; ! 132: va_list ap; ! 133: extern LLog * log_dsap; ! 134: ! 135: va_start (ap); ! 136: ! 137: code = va_arg (ap, int); ! 138: ! 139: (void) _ll_log (log_dsap, code, ap); ! 140: ! 141: va_end (ap); ! 142: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.