home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / plotting / imagetoo / imagetl1.lha / Imagetool / src+obj / myftp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-03-11  |  14.5 KB  |  571 lines

  1. /* cat > headers/myftp.h << "EOF" */
  2. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  3. /* myftp.h: header for myftp.c file            */
  4. /*        myftp.c creates ftp connection, get and put    */
  5. /*        files, and real time simulations of        */
  6. /*        computation runs.                */
  7. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  8. /* SCCS information: %W%    %G% - NCSA */
  9.  
  10. #define myftp_h        1
  11.  
  12. #include "all.h"
  13. #include "newext.h"
  14.  
  15.     static Panel_item inc_item, intv_item;
  16.  
  17.     static int ftp_connected, do_inc;
  18.     static int inc_amt=1;
  19.     static int intv_amt;
  20.     static char remote_image[MAXNAMELEN];
  21.  
  22.     static Notify_value show_remote_image ();
  23.     static void ftp_discon ();
  24.     static void loop_start ();
  25.     static int set_loop_option ();
  26.     static int option_done ();
  27.     static char *inc_fname ();
  28.     static Frame option_box ();
  29.     static void set_timer ();
  30.     static void stop_timer ();
  31.  
  32. /* EOF */
  33. /* cat > src+obj/myftp/create_ftp_menu.c << "EOF" */
  34. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  35. /* create_ftp_menu: create ftp menu            */
  36. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  37. /* SCCS information: %W%    %G% - NCSA */
  38.  
  39. /* #include "myftp.h" */
  40.  
  41. create_ftp_menu ()
  42. {
  43.     ftp_menu = menu_create (
  44.                 MENU_FONT, font_menu,
  45.                 MENU_ACTION_ITEM, "Connect", ftp_connect,
  46.                 MENU_ACTION_ITEM, "Disconnect", ftp_discon,
  47.                 MENU_ACTION_ITEM, "Get loop", loop_start,
  48.                 MENU_ACTION_ITEM, "Stop", loop_stop,
  49.                 0);
  50. }
  51. /* EOF */
  52. /* cat > src+obj/myftp/ftp_connect.c << "EOF" */
  53. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  54. /* ftp_connect: establish ftp connection        */
  55. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  56. /* SCCS information: %W%    %G% - NCSA */
  57.  
  58. /* #include "myftp.h" */
  59.  
  60. void
  61. ftp_connect (m, mi)
  62.     Menu            m;
  63.     Menu_item       mi;
  64. {
  65.     int             answer;
  66.  
  67.     static char     host[MAXNAMELEN] = "";
  68.  
  69.     while (answer = mydialog ("Host name: ", NULL, host, 0, 20, 40))
  70.     {
  71.         if (strip_wspace (host) > 0)
  72.         {
  73.             if (word_count (host) != 1)    /* must be one word */
  74.                 msg_write ("Error: Host name must be one word. Please retype or cancel.");
  75.             else
  76.             {
  77.                 sprintf (msgstr, "ftp %s\r", host);
  78.                 tty_write (msgstr);
  79.                 ftp_connected = 1;
  80.                 intv_amt = 15;
  81.                 return;
  82.             }
  83.         }
  84.         else
  85.             msg_write ("Error: No host name. Please type one in or cancel.");
  86.     }
  87.     ftp_connected = 0;
  88.     return;
  89. }
  90. /* EOF */
  91. /* cat > src+obj/myftp/ftp_discon.c << "EOF" */
  92. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  93. /* ftp_discon: (static) disconnect ftp connection    */
  94. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  95. /* SCCS information: %W%    %G% - NCSA */
  96.  
  97. /* #include "myftp.h" */
  98.  
  99. static void
  100. ftp_discon (m, mi)
  101.     Menu            m;
  102.     Menu_item       mi;
  103. {
  104.     sprintf (msgstr, "quit\r");
  105.     tty_write (msgstr);
  106. }
  107. /* EOF */
  108. /* cat > src+obj/myftp/ftp_handler.c << "EOF" */
  109. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  110. /* ftp_handler: handler for ftp                */
  111. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  112. /* SCCS information: %W%    %G% - NCSA */
  113.  
  114. /* #include "myftp.h" */
  115.  
  116. ftp_handler (item, event)
  117.     Panel_item      item;
  118.     Event          *event;
  119. {
  120.     if (display_panel_menu (item, event, menu_panel, ftp_menu))
  121.         ftp_connect (ftp_menu, menu_get (ftp_menu, MENU_NTH_ITEM, 1));
  122. }
  123. /* EOF */
  124. /* cat > src+obj/myftp/inc_fname.c << "EOF" */
  125. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  126. /* inc_fname: (static) file name increment        */
  127. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  128. /* SCCS information: %W%    %G% - NCSA */
  129.  
  130. /* #include "myftp.h" */
  131.  
  132. static char    *
  133. inc_fname (name)
  134.     char           *name;
  135. {
  136.     char            uc, lc, *s, str[MAXNAMELEN];
  137.     int             carry, atmp, stmp, nframe;
  138.  
  139.     if (name == NULL)
  140.         return (NULL);
  141.     if (inc_amt == 0)
  142.         return (name);
  143.  
  144.         /* handle names ending in digits or letters separately */
  145.     s = &name[strlen (name) - 1];
  146.     if (isdigit (*s))
  147.     {
  148.         while (isdigit (*(s - 1)))
  149.             s--;
  150.         nframe = atoi (s) + inc_amt;
  151.         *s = '\0';
  152.         sprintf (str, "%s%.3d", name, nframe);
  153.         strncpy (name, str, MAXNAMELEN - 1);
  154.     }
  155.     else if (isalpha (*s))
  156.     {
  157.         if (isupper (*s))
  158.         {
  159.             uc = 'Z';
  160.             lc = 'A';
  161.         }
  162.         else
  163.         {
  164.             uc = 'z';
  165.             lc = 'a';
  166.         }
  167.         atmp = inc_amt;
  168.         carry = 0;
  169.         do
  170.         {
  171.             stmp = (int) *s;
  172.             stmp += atmp % 26 + carry;
  173.             if (stmp > uc)
  174.             {
  175.                 stmp = (stmp - uc - 1) + lc;
  176.                 carry = 1;
  177.             }
  178.             else
  179.                 carry = 0;
  180.             *s = (char) (stmp & 0x7f);
  181.             s--;
  182.         } while ((atmp /= 26) > 0 || carry > 0);
  183.     }
  184.  
  185.     return (name);
  186. }
  187. /* EOF */
  188. /* cat > src+obj/myftp/loop_start.c << "EOF" */
  189. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  190. /* loop_start: (static) routine to start get loop    */
  191. /*           dialog to get user input on options    */
  192. /*           start timer to signal loop operation     */
  193. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  194. /* SCCS information: %W%    %G% - NCSA */
  195.  
  196. /* #include "myftp.h" */
  197.  
  198. static void
  199. loop_start (menu, item)
  200.     Menu            menu;
  201.     Menu_item       item;
  202. {
  203.     Frame           dialog;
  204.     int             answer;
  205.     struct itimerval blink_timer;
  206.  
  207.     if (!ftp_connected)
  208.     {
  209.         msg_write ("Error: No ftp connection. Please connect first.");
  210.         return;
  211.     }
  212.  
  213.         /* get user input */
  214.     dialog = option_box ();
  215.     answer = (int) window_loop (dialog);
  216.     window_set (dialog, FRAME_NO_CONFIRM, TRUE, 0);
  217.     window_destroy (dialog);
  218.     if (!answer)
  219.     {        /* cancel operation */
  220.         loop_stop (NULL, NULL);
  221.         return;
  222.     }
  223.  
  224.     strcpy (remote_image, (char *) panel_get_value (image_board));
  225.  
  226.         /* set timer */
  227.     set_timer (intv_amt, intv_amt);
  228.  
  229.         /* get first image - set binary mode first */
  230.     sprintf (msgstr, "binary \r");
  231.     tty_write (msgstr);
  232.     sprintf (msgstr, "get %s\r", remote_image);
  233.     tty_write (msgstr);
  234.  
  235.     getloop_go = 1;
  236. }
  237. /* EOF */
  238. /* cat > src+obj/myftp/loop_stop.c << "EOF" */
  239. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  240. /* loop_stop: loop termination                */
  241. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  242. /* SCCS information: %W%    %G% - NCSA */
  243.  
  244. /* #include "myftp.h" */
  245.  
  246. void
  247. loop_stop (menu, item)
  248.     Menu            menu;
  249.     Menu_item       item;
  250. {
  251.     loop_zoomed = 0;
  252.     getloop_go = 0;
  253.  
  254.     stop_timer();
  255.  
  256.     msg_write ("Note: Get loop stopped.");
  257. }
  258. /* EOF */
  259. /* cat > src+obj/myftp/option_box.c << "EOF" */
  260. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  261. /* option_box: (static) option box            */
  262. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  263. /* SCCS information: %W%    %G% - NCSA */
  264.  
  265. /* #include "myftp.h" */
  266.  
  267. static          Frame
  268. option_box ()
  269. {
  270.     Frame           dialog;
  271.     Panel           panel;
  272.     char            msg[MAXNAMELEN];
  273.  
  274.     dialog = window_create (NULL, FRAME, FRAME_SHOW_LABEL, FALSE, 0);
  275.     panel = window_create (dialog, PANEL, 0);
  276.  
  277.     panel_create_item (panel, PANEL_MESSAGE,
  278.                PANEL_ITEM_X, ATTR_COL (1),
  279.                PANEL_ITEM_Y, ATTR_ROW (0),
  280.                PANEL_LABEL_STRING, "Loop defaults: ",
  281.                PANEL_LABEL_BOLD, TRUE,
  282.                0);
  283.  
  284.     sprintf (msg, "%d", inc_amt);
  285.     inc_item = panel_create_item (panel, PANEL_TEXT,
  286.                       PANEL_ITEM_X, ATTR_COL (4),
  287.                       PANEL_ITEM_Y, ATTR_ROW (1),
  288.                       PANEL_LABEL_STRING, "Image name increment: ",
  289.                       PANEL_LABEL_BOLD, FALSE,
  290.                       PANEL_VALUE_STORED_LENGTH, 20,
  291.                       PANEL_VALUE_DISPLAY_LENGTH, 20,
  292.                       PANEL_VALUE, msg,
  293.                       0);
  294.  
  295.     sprintf (msg, "%d", intv_amt);
  296.     intv_item = panel_create_item (panel, PANEL_TEXT,
  297.                        PANEL_ITEM_X, ATTR_COL (4),
  298.                        PANEL_ITEM_Y, ATTR_ROW (2),
  299.                        PANEL_LABEL_STRING, "Interval (sec): ",
  300.                        PANEL_LABEL_BOLD, FALSE,
  301.                        PANEL_VALUE_STORED_LENGTH, 20,
  302.                        PANEL_VALUE_DISPLAY_LENGTH, 20,
  303.                        PANEL_VALUE, msg,
  304.                        0);
  305.  
  306.     panel_create_item (panel, PANEL_CYCLE,
  307.                PANEL_ITEM_X, ATTR_COL (4),
  308.                PANEL_ITEM_Y, ATTR_ROW (3),
  309.                PANEL_LABEL_STRING, "Zoomed image  ",
  310.                PANEL_LABEL_BOLD, FALSE,
  311.                PANEL_CHOICE_STRINGS, "off", "on", 0,
  312.                PANEL_VALUE, 0,
  313.                PANEL_NOTIFY_PROC, set_loop_option,
  314.                0);
  315.     panel_create_item (panel, PANEL_BUTTON,
  316.                PANEL_ITEM_X, ATTR_COL (30),
  317.                PANEL_ITEM_Y, ATTR_ROW (4),
  318.                PANEL_LABEL_IMAGE, panel_button_image (panel, "Ok", 3, NULL),
  319.                PANEL_CLIENT_DATA, 1,
  320.                PANEL_NOTIFY_PROC, option_done,
  321.                0);
  322.     panel_create_item (panel, PANEL_BUTTON,
  323.                PANEL_ITEM_X, ATTR_COL (36),
  324.                PANEL_ITEM_Y, ATTR_ROW (4),
  325.                PANEL_LABEL_IMAGE, panel_button_image (panel, "Cancel", 7, NULL),
  326.                PANEL_CLIENT_DATA, 0,
  327.                PANEL_NOTIFY_PROC, option_done,
  328.                0);
  329.     window_fit (panel);
  330.     window_fit (dialog);
  331. /*
  332.     init_same_colormap((Pixwin *)window_get(dialog,WIN_PIXWIN));
  333.     init_same_colormap((Pixwin *)window_get(panel,WIN_PIXWIN));
  334. */
  335.     return dialog;
  336. }
  337. /* EOF */
  338. /* cat > src+obj/myftp/option_done.c << "EOF" */
  339. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  340. /* option_done: (static) done with option        */
  341. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  342. /* SCCS information: %W%    %G% - NCSA */
  343.  
  344. /* #include "myftp.h" */
  345.  
  346. static
  347. option_done (item, event)
  348.     Panel_item      item;
  349.     Event          *event;
  350. {
  351.     char            str[MAXNAMELEN];
  352.  
  353.     strcpy (str, (char *) panel_get_value (inc_item));
  354.     inc_amt = atoi (str);
  355.     strcpy (str, (char *) panel_get_value (intv_item));
  356.     intv_amt = atoi (str);
  357.     window_return ((int) panel_get (item, PANEL_CLIENT_DATA));
  358. }
  359. /* EOF */
  360. /* cat > src+obj/myftp/set_loop_option.c << "EOF" */
  361. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  362. /* set_loop_option: (static) set loop option        */
  363. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  364. /* SCCS information: %W%    %G% - NCSA */
  365.  
  366. /* #include "myftp.h" */
  367.  
  368. static
  369. set_loop_option (item, value, event)
  370.     Panel_item      item;
  371.     int             value;
  372.     Event          *event;
  373. {
  374.     loop_zoomed = value;
  375. }
  376. /* EOF */
  377. /* cat > src+obj/myftp/set_timer.c << "EOF" */
  378. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  379. /* set_timer: (static) start timer to signal loop    */
  380. /*          operation                    */
  381. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  382. /* SCCS information: %W%    %G% - NCSA */
  383.  
  384. /* #include "myftp.h" */
  385.  
  386. static void
  387. set_timer (start_time, interval_time)
  388.     int             start_time, interval_time;
  389. {
  390.     struct itimerval blink_timer;
  391.  
  392.         /* set timer parameters and start timer */
  393.     blink_timer.it_value.tv_sec = start_time;
  394.     blink_timer.it_value.tv_usec = 0;
  395.     blink_timer.it_interval.tv_sec = interval_time;
  396.     blink_timer.it_interval.tv_usec = 0;
  397.  
  398.     (void) notify_set_itimer_func (ttysw, show_remote_image,
  399.                        ITIMER_REAL, &blink_timer, NULL);
  400. }
  401. /* EOF */
  402. /* cat > src+obj/myftp/show_remote_image.c << "EOF" */
  403. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  404. /* show_remote_image: (static) looping routine to get    */
  405. /*              image from network and display    */
  406. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  407. /* SCCS information: %W%    %G% - NCSA */
  408.  
  409. /* #include "myftp.h" */
  410.  
  411. static          Notify_value
  412. show_remote_image (client, itimer_type)
  413.     Notify_client   client;
  414.     int             itimer_type;
  415. {
  416. /* implementation note(s): 
  417.     1. Attempt to display image.
  418.     2. If no error then build new image filename
  419.     3. Get the new image filename.
  420. */
  421.     int        index_type;
  422.     enum desired_img_type in_type;
  423.     enum img_type   out_type;
  424.     int             err;
  425.     char            filename[MAXNAMELEN];
  426.     int             dim_x, dim_y;
  427.     uint16          iref;
  428.     bool            load_pal, load_pal_old;
  429.  
  430.         /* show which image filename will be displayed */
  431.     panel_set_value (image_board, remote_image);
  432.  
  433.         /* display image */
  434.     index_type = (int) panel_get_value (load_toggle);
  435.     in_type = index_type % 3;
  436.     load_pal = (index_type < 2) ? TRUE : FALSE;
  437.  
  438.     switch ((err = check_imgfn (filename)))
  439.     {
  440.         case 0:        /* no error */
  441.             break;
  442.         case 1:
  443.             msg_write ("Error: Image file not found.");
  444.             loop_stop (NULL, NULL);
  445.             return;
  446.         case 2:
  447.             msg_write ("Error: Image file not a file.");
  448.             loop_stop (NULL, NULL);
  449.             return;
  450.         case 3:
  451.             msg_write ("Error: No image filename.");
  452.             loop_stop (NULL, NULL);
  453.             return;
  454.         case 4:
  455.             msg_write ("Error: More than one image file given.");
  456.             loop_stop (NULL, NULL);
  457.             return;
  458.         case 5:
  459.             msg_write ("Error: Wildcard matches more than one image file.");
  460.             loop_stop (NULL, NULL);
  461.             return;
  462.         case 6:
  463.             msg_write ("Error: Wildcard syntax.");
  464.             loop_stop (NULL, NULL);
  465.             return;
  466.         default:
  467.             sprintf (wkstr, "Internal error (%d): While checking image filename.", err);
  468.             msg_write (wkstr);
  469.             loop_stop (NULL, NULL);
  470.             return;
  471.     }
  472.  
  473.     load_pal_old = load_pal;
  474.     switch ((err = check_image (in_type, filename, &out_type, &dim_x, &dim_y, &iref, &load_pal)))
  475.     {
  476.         case 0:        /* no error */
  477.             break;
  478.         case 1:
  479.             msg_write ("Error: Image file does not exist.");
  480.             loop_stop (NULL, NULL);
  481.             return;
  482.         case 2:
  483.             msg_write ("Error: Dimension(s) are bad.");
  484.             loop_stop (NULL, NULL);
  485.             return;
  486.         case 3:
  487.             msg_write ("Error: Size of image doesn't match dimensions.");
  488.             loop_stop (NULL, NULL);
  489.             return;
  490.         case 4:
  491.             msg_write ("Error: No 8-bit Raster Image Set found in image file.");
  492.             loop_stop (NULL, NULL);
  493.             return;
  494.         case 5:
  495.             msg_write ("Error: No 2D Scientific Data Set found in image file.");
  496.             loop_stop (NULL, NULL);
  497.             return;
  498.         case 6:
  499.             msg_write ("Error: No 8-bit Raster Image Set or 2D Scientific Data Set found in image file.");
  500.             loop_stop (NULL, NULL);
  501.             return;
  502.         case 7:
  503.             sprintf (wkstr, "Error: Image too big!. (x, y) size = (%d, %d) not in range (%d, %d)", dim_x, dim_y, XMAX_IMAGE, YMAX_IMAGE);
  504.             msg_write (wkstr);
  505.             loop_stop (NULL, NULL);
  506.             return;
  507.         default:
  508.             sprintf (wkstr, "HDF file error (DFerror = %d): While checking image file.", err);
  509.             msg_write (wkstr);
  510.             loop_stop (NULL, NULL);
  511.             return;
  512.     }
  513.     if (out_type == RIS8 && (load_pal != load_pal_old))
  514.         msg_write ("Warning: No palette with 8-bit Raster Image Set in image file.");
  515.     switch (out_type)
  516.     {
  517.         case RAWI:
  518.             if (load_RAWI (filename, dim_x, dim_y, FTP_SEQUENCE))
  519.                 return;
  520.             break;
  521.         case RIS8:
  522.             if (load_RIS8 (filename, dim_x, dim_y, iref, load_pal, FTP_SEQUENCE))
  523.                 return;
  524.             break;
  525.         case SDS2D:
  526.             if (((int) panel_get_value (SDS_toggle)) == 0)
  527.             {        /* popup dialog box case */
  528.                 stop_timer ();
  529.                 if (load_SDS2D (filename, dim_x, dim_y, FTP_SEQUENCE))
  530.                 {
  531.                     loop_stop (NULL, NULL);
  532.                     return;
  533.                 }
  534.                 set_timer (intv_amt, intv_amt);
  535.             }
  536.             else
  537.             {
  538.                 if (load_SDS2D (filename, dim_x, dim_y, FTP_SEQUENCE))
  539.                 {
  540.                     loop_stop (NULL, NULL);
  541.                     return;
  542.                 }
  543.             }
  544.             break;
  545.     }
  546.         /* increment filename */
  547.     inc_fname (remote_image);
  548.  
  549.         /* get file */
  550.         sprintf (msgstr, "get %s\r", remote_image);
  551.     tty_write (msgstr);
  552.  
  553.     return (NOTIFY_DONE);
  554. }
  555. /* EOF */
  556. /* cat > src+obj/myftp/stop_timer.c << "EOF" */
  557. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  558. /* stop_timer: stop the looping timer            */
  559. /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
  560. /* SCCS information: %W%    %G% - NCSA */
  561.  
  562. /* #include "myftp.h" */
  563.  
  564. static void
  565. stop_timer ()
  566. {
  567.     (void) notify_set_itimer_func (ttysw, show_remote_image,
  568.                        ITIMER_REAL, NULL, NULL);
  569. }
  570. /* EOF */
  571.