~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/src/Xv/tw_init.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /**@(#)
  2 **/
  3 #include <stdio.h>
  4 #include <math.h>
  5 #include <tina/sys.h>
  6 #include <tina/math.h>
  7 #include <tina/tw.h>
  8 #include <tina/tv.h>
  9 #include <tina/tvfuncs.h>
 10 #include <tina/tv_screen.h>
 11 #include <xview/xview.h>
 12 #include <xview/frame.h>
 13 #include <xview/panel.h>
 14 #include <xview/textsw.h>
 15 #include <xview/font.h>
 16 #include <xview/canvas.h>
 17 #include <xview/cms.h>
 18 #include <xview/xv_xrect.h>
 19 #include <xview/openmenu.h>
 20 #include <tina/Xvfuncs.h>
 21 #include <tina/X11funcs.h>
 22 
 23 
 24 
 25 static Bool save = false;
 26 
 27 Bool    tw_save(void)
 28 {
 29     return (save);
 30 }
 31 
 32 static Bool recover = false;
 33 
 34 Bool    tw_recover(void)
 35 {
 36     return (recover);
 37 }
 38 
 39 void tw_set_save(Bool newsave)
 40 {
 41     save =  newsave;
 42 }
 43 
 44 static char *progname;
 45 
 46 char   *tw_get_progname(void)
 47 {
 48     return (progname);
 49 }
 50 
 51 void    tw_init(int *argc, char **argv)
 52 {
 53     int     i;
 54 
 55     xv_init(XV_INIT_ARGC_PTR_ARGV, argc, argv, NULL);
 56     progname = argv[0];
 57     for (i = 1; i < *argc; i++)
 58     {
 59         if (argv[i][0] != '-')
 60             continue;
 61         switch (argv[i][1])
 62         {
 63         case 's':
 64             save = true;
 65             break;
 66         case 'r':
 67             recover = true;
 68             break;
 69         case 'f':
 70             recover = true;
 71             progname =  argv[i+1];
 72             break;
 73         }
 74     }
 75     /* handle interrupts */
 76 #ifdef ANSIFYING
 77 #ifdef __STRICT_ANSI__
 78     (void) signal(SIGALRM, (void (*) (int)) alarm_handler);
 79     (void) signal(SIGINT, (void (*) (int)) interrupt_handler);
 80 #else
 81     (void) signal(SIGALRM, (void (*) ()) alarm_handler);
 82     (void) signal(SIGINT, (void (*) ()) interrupt_handler);
 83 #endif                          /* __STRICT_ANSI__ */
 84 #endif                          /* ANSIFYING */
 85 }
 86 
 87 /* ARGSUSED quieten lint */
 88 void    tw_quit(int dummy)
 89 {
 90     extern void exit(int);
 91 
 92     exit(0);
 93 }
 94 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.