home *** CD-ROM | disk | FTP | other *** search
/ RBBS in a Box Volume 1 #2 / RBBS_vol1_no2.iso / add2 / jmd4tlx.zip / JDOWN.SLT < prev    next >
Text File  |  1989-03-20  |  2KB  |  66 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. // This TELIX 3.11 script implements the JMODEM DOWNLOAD function.
  3. //
  4. // It first simulates the TELIX window for obtaining file names.
  5. // This is necessary because TELIX only permits 1 filename to be entered.
  6. //
  7. // It then calls JXFER.SLC with the parameter indicating DOWNLOAD.
  8. //
  9. // NOTE:  The file list may contain multiple filespecs, but NO WILDCARDS!
  10. //
  11. // Written by: Michael K. Bozovich
  12. // Date: 3-19-89
  13. ///////////////////////////////////////////////////////////////////////////////
  14.  
  15. /////// Integer Variable Declarations.
  16.  
  17. int old_x;                      // Place holder for cursor x-position.
  18. int old_y;                      // Place holder for cursor x-position.
  19. int old_screen;                 // Pointer to old screen area.
  20.  
  21. main()
  22.  
  23. {
  24.  
  25.   /////// Save the portion of the screen to be modified.
  26.  
  27.   old_screen = vsavearea(06, 10, 74, 16);
  28.  
  29.   /////// Save the current cursor position.
  30.  
  31.   old_x = getx();
  32.   old_y = gety();
  33.  
  34.   /////// Draw the file list prompt box similar to that of TELIX.
  35.  
  36.   box(06, 10, 74, 16, 3, 0, 112);
  37.   pstraxy("Enter file(s) to download to, <CR or ESC> to abort.", 8, 13, 112);
  38.   pstraxy("^p ", 8, 14, 112);
  39.  
  40.   /////// Get the input from the user.
  41.  
  42.   getsxy(_ext_filespec, 64, getx(), gety(), 112);
  43.  
  44.   /////// Restore the screen portion that was changed.
  45.  
  46.   vrstrarea(old_screen);
  47.  
  48.   /////// Move the cursor back to where it was before.
  49.  
  50.   gotoxy(old_x, old_y);
  51.  
  52.   /////// If the user didn't use wildcards, call "JXFER",
  53.   /////// otherwise, print a diagnostic and exit back to terminal.
  54.  
  55.   if(strpos(_ext_filespec, "*", 0) == -1 && strpos(_ext_filespec, "?", 0) == -1)
  56.     call("jxfer", "R");
  57.   else
  58.     {
  59.     prints("^gYou may not specify wild cards when downloading with Jmodem!");
  60.     return();
  61.     }
  62.  
  63. }
  64.  
  65. // eof jdown.slt
  66.