home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 September / Simtel20_Sept92.cdr / msdos / telix / tlxpcp15.arc / DIALBBS.SLT < prev    next >
Text File  |  1988-12-10  |  2KB  |  60 lines

  1. //This area is for user configurable variables
  2.  
  3. str message_tone[]="y";
  4.  
  5.  
  6. ///////////////////////////////////////////////////////////////////////////////
  7. //                                                                           //
  8. //                 dialbbs v1.0 Copyright (c) by Charles Lee                 //
  9. //                         November 1988                                     //
  10. //                                                                           //
  11. ///////////////////////////////////////////////////////////////////////////////
  12.  
  13. beep(int freq)
  14. {
  15.     if((message_tone=="y")|(message_tone=="Y"))
  16.     {
  17.         tone(freq,20);
  18.     }
  19. }
  20.  
  21. main()
  22. {
  23.     int baud,
  24.         status,
  25.         fp;
  26.     str fon_path[76],
  27.         fondir_path[76],
  28.         script_name[13];
  29.  
  30.     baud=get_baud();
  31.     status=dial("",0,1);
  32.     if(!status)
  33.     {
  34.         beep(500);
  35.         status_wind("User aborted!",10);
  36.         return;
  37.     }
  38.     set_cparams(baud,0,8,2);
  39.  
  40.     if(_entry_enum)
  41.     {
  42.         fondir_path=_script_dir;
  43.         strcat(fondir_path,"fondir.pcp");
  44.         fp=fopen(fondir_path,"r");
  45.         fgets(fon_path,76,fp);
  46.         fclose(fp);
  47.         fp=fopen(fon_path,"r");
  48.         fseek(fp,(((_entry_enum-1)*86)+110),0);
  49.         fgets(script_name,12,fp);
  50.         fclose(fp);
  51.         //If there is a script associated with the number, execute it!
  52.         if(subchr(script_name,0))
  53.         {
  54.             call(script_name);
  55.         }
  56.     }
  57.  
  58. }
  59.  
  60.