home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / slfinsta.zip / globals.c < prev    next >
C/C++ Source or Header  |  2000-03-26  |  3KB  |  133 lines

  1. /* $Id: globals.c,v 1.1 2000/03/27 04:52:54 ktk Exp $ */
  2.  
  3. /* ------------------------------------------------------------------------ */
  4. /*                                                                          */
  5. /*      Global variable declarations                                        */
  6. /*                                                                          */
  7. /* ------------------------------------------------------------------------ */
  8.  
  9. #include "os.h"
  10.  
  11. #include "acestruc.h"
  12. #include "unace.h"
  13. #include <string.h>
  14.  
  15.  
  16. //-------- Ace sign
  17. const char *acesign = "**ACE**";
  18.  
  19. //-------- Version string for program
  20. const char *version="UNACE v1.1    public version\n";
  21.  
  22. #ifdef AMIGA
  23. //-------- Version string for VERSION program
  24. static char *_version="$VER: Unace Amiga 1.1  "__AMIGADATE__"\n\n";
  25. #endif
  26.  
  27. //-------- header buffer and pointers
  28. thead head;
  29.  
  30. tmhead *t_mhead = (tmhead *) & head;
  31. tfhead *t_fhead = (tfhead *) & head;
  32.  
  33. //-------- buffers
  34. ULONG *buf_rd        =0;
  35. CHAR  *buf           =0;
  36. CHAR  *buf_wr        =0;
  37. UCHAR *readbuf       =0;
  38.  
  39. //-------- decompressor variables
  40. SHORT rpos           =0,
  41.       dcpr_do        =0,
  42.       dcpr_do_max    =0,
  43.       blocksize      =0,
  44.       dcpr_dic       =0,
  45.       dcpr_oldnum    =0,
  46.       bits_rd        =0,
  47.       dcpr_frst_file =0;
  48. USHORT dcpr_code_mn[1 << maxwd_mn],
  49.        dcpr_code_lg[1 << maxwd_lg];
  50. UCHAR dcpr_wd_mn[maxcode + 2],
  51.       dcpr_wd_lg[maxcode + 2],
  52.       wd_svwd[svwd_cnt];
  53. ULONG dcpr_dpos      =0,
  54.       cpr_dpos2      =0,
  55.       dcpr_dicsiz    =0,
  56.       dcpr_dican     =0,
  57.       dcpr_size      =0,
  58.       dcpr_olddist[4]={0,0,0,0},
  59.       code_rd        =0;
  60.  
  61. CHAR *dcpr_text      =0;
  62.  
  63. //-------- quicksort
  64. USHORT sort_org[maxcode + 2];
  65. UCHAR sort_freq[(maxcode + 2) * 2];
  66.  
  67. //-------- file handling
  68. CHAR aname[PATH_MAX];
  69. INT  archan,
  70.      wrhan;
  71. LONG skipsize=0;
  72.  
  73. //-------- structures for archive handling
  74. struct tadat adat;
  75.  
  76. //-------- flags
  77. INT  f_err      =0,
  78.      f_ovrall   =0,
  79.      f_allvol_pr=0,
  80.      f_curpas   =0,
  81.      f_criterr  =0;
  82.  
  83.  
  84. void resetglobals(void)
  85. {
  86.         t_mhead = (tmhead *) & head;
  87.         t_fhead = (tfhead *) & head;
  88.  
  89.        buf_rd        =0;
  90.        buf           =0;
  91.        buf_wr        =0;
  92.        readbuf       =0;
  93.  
  94.       rpos           =0;
  95.       dcpr_do        =0;
  96.       dcpr_do_max    =0;
  97.       blocksize      =0;
  98.       dcpr_dic       =0;
  99.       dcpr_oldnum    =0;
  100.       bits_rd        =0;
  101.       dcpr_frst_file =0;
  102.  
  103.       memset(&dcpr_code_mn, 0, sizeof(dcpr_code_mn));
  104.       memset(&dcpr_code_lg, 0, sizeof(dcpr_code_lg));
  105.       memset(&dcpr_wd_mn, 0, sizeof(dcpr_wd_mn));
  106.       memset(&dcpr_wd_lg, 0, sizeof(dcpr_wd_lg));
  107.       memset(&wd_svwd, 0, sizeof(wd_svwd));
  108.       dcpr_dpos      =0;
  109.       cpr_dpos2      =0;
  110.       dcpr_dicsiz    =0;
  111.       dcpr_dican     =0;
  112.       dcpr_size      =0;
  113.  
  114.       memset(&dcpr_olddist, 0, sizeof(dcpr_olddist));
  115.  
  116.       code_rd        =0;
  117.       dcpr_text      =0;
  118.  
  119.      memset(&sort_org, 0, sizeof(sort_org));
  120.      memset(&sort_freq, 0, sizeof(sort_freq));
  121.  
  122.      archan=0;
  123.      wrhan=0;
  124.      skipsize=0;
  125.  
  126.      f_err      =0;
  127.      f_ovrall   =0;
  128.      f_allvol_pr=0;
  129.      f_curpas   =0;
  130.      f_criterr  =0;
  131.  
  132. }
  133.