home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / doslynx / src / tdoslyn5.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  2.2 KB  |  89 lines

  1. //    Copyright (c) 1993, University of Kansas, All Rights Reserved
  2. //
  3. //    Class:        TDosLynx : public TApplication
  4. //    Include File:    TDosLynx.h
  5. //    Purpose:    Implement our application object.
  6. //    Remarks/Portability/Dependencies/Restrictions:
  7. //    Revision History:
  8. //        12-09-93    created
  9. //        02-09-94    Split all members into seperate files to
  10. //                enhance overlay support.
  11. #define Uses_TDeskTop
  12. #include"tdoslynx.h"
  13. #include"tcapture.h"
  14. #include"gridtext.h"
  15. #include"globals.h"
  16. #include<new.h>
  17.  
  18. TDosLynx::~TDosLynx()    {
  19. //    Purpose:    Destructor
  20. //    Arguments:    void
  21. //    Return Value:    none
  22. //    Remarks/Portability/Dependencies/Restrictions:
  23. //    Revision History:
  24. //        12-13-93    created
  25.  
  26.     doslynxmessage("Shutting down application.  Please wait...");
  27.  
  28.     //    Go through the loaded HTexts and destroy them.
  29.     HText *HTp_text;
  30.     while(::TNSCp_LoadedHTexts->getCount() > 0)    {
  31.         //    Remove the HText from the collection first.
  32.         HTp_text = (HText *)(::TNSCp_LoadedHTexts->at(0));
  33.         //    Free it.  HText_free removes the HText from the
  34.         //    collection.
  35.         ::HText_free(HTp_text);
  36.     }
  37.     //    Destroy the HText collection.
  38.     destroy(::TNSCp_LoadedHTexts);
  39.  
  40.     //    Free our global ini path
  41.     if(cp_inipath != NULL)
  42.         delete(cp_inipath);
  43.     //    Free the global temp dir
  44.     if(cp_TempDir != NULL)
  45.         delete(cp_TempDir);
  46.     //    Free the global mail address
  47.     if(cp_ReplyTo != NULL)    {
  48.         delete(cp_ReplyTo);
  49.     }
  50.     //    Free the global printer
  51.     if(cp_Printer != NULL)    {
  52.         delete(cp_Printer);
  53.     }
  54.     //    Free the global home address
  55.     if(cp_Home != NULL)    {
  56.         delete(cp_Home);
  57.     }
  58.     //    Free the global hotlist path
  59.     if(cp_HotList != NULL)    {
  60.         delete(cp_HotList);
  61.     }
  62.     //    Free the global errorhtml filename
  63.     if(cp_ErrorHTML != NULL)    {
  64.         delete(cp_ErrorHTML);
  65.     }
  66.     //    Free the global news host.
  67.     if(cp_nntphost != NULL)    {
  68.         delete(cp_nntphost);
  69.     }
  70.     //    Free the proxy variables.
  71.     if(cp_http_proxy != NULL)    {
  72.         delete(cp_http_proxy);
  73.     }
  74.     //    Free the proxy variables.
  75.     if(cp_gopher_proxy != NULL)    {
  76.         delete(cp_gopher_proxy);
  77.     }
  78.     //    Free the proxy variables.
  79.     if(cp_ftp_proxy != NULL)    {
  80.         delete(cp_ftp_proxy);
  81.     }
  82.     //    Free the proxy variables.
  83.     if(cp_wais_proxy != NULL)    {
  84.         delete(cp_wais_proxy);
  85.     }
  86.  
  87.     //    Reset the old memory handler.
  88.     set_new_handler(vfp_old_new_handler);
  89. }