home *** CD-ROM | disk | FTP | other *** search
/ ftp.update.uu.se / ftp.update.uu.se.2014.03.zip / ftp.update.uu.se / pub / rainbow / msdos / decus / RB139 / mail20r.lzh / MAIL.PAS < prev    next >
Pascal/Delphi Source File  |  1988-10-09  |  4KB  |  143 lines

  1. program mail ;
  2.  
  3.   { RELIANCE MAILING LIST, Version 2.0R.
  4.  
  5.     Copyright (c) 1986 William Meacham, All Rights Reserved
  6.  
  7.     William Meacham
  8.     1004 Elm Street
  9.     Austin, Tx  78703
  10.  
  11.     Revised:  3/7/86 }
  12.   {Revised for DEC Rainbow MS-DOS on  9-Oct-1988 by
  13.  
  14.     David P. Maroun
  15.     9395 Windsor Street
  16.     Chilliwack, British Columbia
  17.     V2P 6C5  }
  18.  
  19. { ----------------------------------------------------------- }
  20.  
  21. {$C-,V-}
  22.  
  23. const copyright : string[69] =
  24.    'RELIANCE MAILING LIST VERSION 2.0 COPYRIGHT (c) 1986 WILLIAM MEACHAM' ;
  25.     version = 2.0 ;
  26.  
  27.   { TURBO ACCESS constants }
  28.     MaxDataRecSize = 216 ;
  29.     MaxKeyLen      = 15 ;
  30.     PageSize       = 24 ;
  31.     Order          = 12 ;
  32.     PageStackSize  = 8 ;
  33.     MaxHeight      = 5 ;
  34.  
  35. {$i access.box }
  36. {$i getkey.box }
  37. {$i addkey.box }
  38. {$i delkey.box }
  39. {$i io20.inc }
  40. {$i maildate.inc }
  41. {$i mailglob.inc }
  42.  
  43. { ------------------------------------------------------------------------ }
  44. {                      functions and procedures                            }
  45. { ------------------------------------------------------------------------ }
  46.  
  47. function exists (filename : str14) : boolean ;
  48.   { test to see if file exists }
  49. var
  50.     infile : file ;
  51. begin
  52.     assign (infile,filename) ;
  53.     {$i-} reset(infile) {$i+} ;
  54.     exists := (ioresult = 0) ;
  55.     close (infile)
  56. end ; { function exists }
  57.  
  58. {------------------------------------------------------------- }
  59.  
  60. function files_exist : boolean ;
  61. begin
  62.     files_exist := exists(scr_fname) and exists(mf_fname)
  63.                and exists(ix1_fname) and exists(ix2_fname)
  64. end ;  { function files_exist }
  65.  
  66. { ----------------------------------------------------------- }
  67.  
  68. {$i mroot1.inc -- miscellaneous }
  69.  
  70. { ----------------------------------------------------------- }
  71.  
  72. {$i mroot2.inc -- clear_master, display_master, input_master, select }
  73.  
  74. { ---- BEGIN OVERLAY AREA 000 ------------------------------- }
  75.  
  76. {$i minit.inc -- procs initialize and reset_disks }
  77.  
  78. { ----------------------------------------------------------- }
  79.  
  80. {$i msetup.inc -- proc set_up }
  81.  
  82. { ----------------------------------------------------------- }
  83.  
  84. {$i maddetc.inc -- procs add, change, record_contributions, delete_name }
  85.  
  86. { ----------------------------------------------------------- }
  87.  
  88. {$i mprint.inc -- proc print (list, labels) }
  89.  
  90. { ----------------------------------------------------------- }
  91.  
  92. {$i mailmerg.inc -- proc make_mailmerge_file }
  93.  
  94. { ---- END OVERLAY AREA 000 --------------------------------- }
  95.  
  96. begin { -------- MAIN -------- }
  97.  
  98.     initialize ;
  99.     repeat
  100.         paint_screen (0) ;     { Main menu }
  101.         repeat
  102.             fld := 1 ;
  103.             choice := 0 ;
  104.             read_int (choice,1, 31,21) ;
  105.             if fld < 1 then choice := 0 ;
  106.             if fld = maxint then
  107.               begin
  108.                 write_str (' ',31,21) ;
  109.                 write_str ('QUIT NOW? (Y/N)',26,23) ;
  110.                 read_yn (OK,42,23) ; { global, in Access.box }
  111.                 if not OK then
  112.                   begin
  113.                     fld := 1 ;
  114.                     choice := 0 ;
  115.                     clrline (26,23)
  116.                   end
  117.               end ;
  118.         until (choice in [1 .. 9]) or (fld = maxint) ;
  119.         if not (fld = maxint) then
  120.             case choice of
  121.               1: set_up ;
  122.               2: do_name (add) ;
  123.               3: do_name (change) ;
  124.               4: do_name (del_rec) ;
  125.               5: do_name (contribution) ;
  126.               6: print (list) ;
  127.               7: print (labels) ;
  128.               8: make_mailmerge_file ;
  129.               9: reset_disks
  130.             else
  131.                  beep
  132.             end  { case }
  133.     until fld = maxint ;
  134.     clrscr ;
  135.     write_str ('Thank you for using the Reliance Mailing List program.',12,5) ;
  136.     write_str ('Don''t forget to back up your data files! ',12,7) ;
  137.     write_str ('If you find this program useful, please let me know you did',12,10) ;
  138.     write_str ('to encourage me to write some more.  Thanks!',12,11) ;
  139.     write_str ('Bill Meacham',34,13) ;
  140.     write_str ('1004 Elm Street',32,14) ;
  141.     write_str ('Austin, Tx  78703',31,15)
  142. end.
  143.