home *** CD-ROM | disk | FTP | other *** search
/ WADS of WADS / WadsOfWads.1994.zip / ZIPS / U_Z / WNFTPSRC.ZIP / WS_GLOB.C < prev    next >
C/C++ Source or Header  |  1994-01-07  |  5KB  |  130 lines

  1. #define IS_GLOBAL_C   /* prevent externs from being read in ws_glob.h */
  2. #include "ws_glob.h"
  3. #include "winftp.h"
  4.  
  5. #ifndef MAXPACKET
  6. #define MAXPACKET 4096
  7. #endif
  8.  
  9. BOOL bAutoStart    = TRUE;     // automatically prompt for connect
  10. BOOL bAborted      = FALSE;    // set by timeout routine
  11. BOOL bRetain       = FALSE;    // retain temp files or not
  12. BOOL bDblClkVu     = FALSE;    // double click means what
  13. BOOL bAccount      = FALSE;    // use ACCOUNT password
  14. BOOL bFireWall     = FALSE;    // use FireWall Access
  15.  
  16. BOOL bLocalHistory = FALSE;
  17. BOOL bRemoteHistory= FALSE;
  18. BOOL bCancelXfer   = FALSE;
  19. BOOL bOpInProgress = FALSE;
  20.  
  21. WORD wSortType = IDM_SORTBYNAME;
  22.  
  23. u_int uiTimeOut=60000;  // 60 second timeout??
  24.  
  25. char szXferWnd[15]="WFTPXfer";
  26. char szMsgWnd[15]="WFTPZoom";
  27. char szMsgBuf[MAXPACKET];              // main i/o buffer
  28. u_char szSendPkt[MAXPACKET];           // output transfer buffer
  29. char szString[5120];                    // temp string area
  30. char szViewer[128]="pfe32";
  31. char szMailAddress[128];
  32. char szDlgPrompt[80]="input:";         // used by input dialog as prompt
  33. char szDlgEdit[80]="";                 // used by input dialog for output
  34. char szConfig[80]="";                  // used by host dialog for Config Name
  35. char szUserID[80]="";                  // used by host dialog for userid
  36. char szPassWord[80]="\0";              // used by host dialog for password
  37. char szRemoteHost[80]="";              // remote host name/addr to connect to
  38. char szAppName[20];                    // this programs name "WinFTP"
  39. char szIniFile[20]="WINFTP.INI";        // INI file name
  40. char szTmpDirFileName[20]="wftp%04d.dir";
  41. char szTmpViewFileName[20]="wftp%04d.tmp";
  42. char szLFileType[20] = "*.*";
  43. char szRFileType[20];
  44. char szAccountPass[30];
  45. char szLogFile[_MAX_PATH];
  46. char szInitDir[_MAX_PATH];
  47. char szScript[_MAX_PATH];
  48.  
  49. char szFireWallHost[80];
  50. char szFireWallUserID[30];
  51. char szFireWallUserPass[30];
  52.  
  53. #ifdef WIN32
  54.     char szDefaultHdr[40] = "WinSock FTP For Windows/NT";
  55. #else
  56.     char szDefaultHdr[40] = "WinSock FTP For Windows 3.1";
  57. #endif
  58.  
  59. char szFormName[10]="non-print";       // ** not used in this version
  60. char szModeName[10]="stream";          // ** not used in this version
  61. char szStructName[10]="file";          // ** not used in this version
  62. char szTypeName[10]="ASCII";           // ** not used in this version
  63.  
  64. LPSTR lpDebugWindow = "Debug Window";
  65.  
  66. char szTempDir[80];                    // Stores the temporary file dir
  67. char szTmpDirFile[_MAX_PATH];          // Used to create temp dir file
  68. char szTmpViewFile[_MAX_PATH];         // Used to view the file
  69. char szCurrentDir[_MAX_PATH];          // Holds File Name for LongDir
  70.  
  71. char fType=TYPE_I;                     // file transfer type
  72. char cType=TYPE_A;                     // current transfer type
  73. char cForm=FORM_N;                     // format (not used???)
  74. char cMode=MODE_S;                     // mode (not used???)
  75.  
  76. HCURSOR hStdCursor,hWaitCursor;        // cursors
  77.  
  78. HINSTANCE hInst;                       // handle of instance
  79. HWND hWndMain;                         // handle of main window
  80. HWND hWndDbg;                          // handle of Debug Window
  81.  
  82. // child window handles
  83. HWND hLbxLDir,hLbxLFiles,hLbxRDir,hLbxRFiles, hLbxLDirLst, hLbxRDirLst;
  84. HWND hTxtLDir,hTxtRHost,hTxtRDir,hTxtLBytes,hTxtRBytes;
  85. HWND hRBascii,hRBbinary,hRBl8, hScroll;
  86.  
  87. BOOL bConnected=FALSE;     // connected flag
  88. BOOL bCmdInProgress=FALSE; // command in progress flag
  89. BOOL bSendPort=TRUE;       // use PORT commands (must be 1!!!)
  90.  
  91. int  nWndx;                // the x axis multiplier
  92. int  nWndy;                // the y axis multiplier
  93.  
  94. int nTimerID;              // Timer ID to set
  95. int nAcctType=0;           // Account Processing Type
  96. int nLogFlag=MF_UNCHECKED; // Do not log messages
  97.  
  98. // options
  99. int bBell=2;               // completion bell (not used in this version)
  100. int bCRstrip=2;            // crlf conversion (not used in this version)
  101. int bDoGlob=2;             // globbing (not used in this version)
  102. int bHash=2;               // show hash (not used in this version)
  103. int bInteractive=0;        // prompting (not used in this version)
  104. int bMCase=2;              // case conversion (not used in this version)
  105. int bRecvUniq=0;           // unique name on receive (not used in this ver)
  106. int bStorUniq=2;           // unique name on transmit (not used in this ver)
  107. int bVerbose=0;            // maximum verbosity (turns extra debug msgs on)
  108. int nHostType=0;
  109. int iCode;                 // return code from last command(..)
  110.  
  111. int ptrhGMem=0;
  112. int nCfgNum=0;
  113. int nViewNum=0;
  114.  
  115. SOCKET ctrl_socket = INVALID_SOCKET;   // control channel socket
  116. SOCKET data_socket = INVALID_SOCKET;   // data channel socket
  117. SOCKET listen_socket = INVALID_SOCKET; // data listen socket
  118.  
  119. struct sockaddr_in saDestAddr;     
  120. struct sockaddr_in saFromAddr;     
  121. struct sockaddr_in saSockAddr;         // endpoint address
  122. struct sockaddr_in saSockAddr1;        // used when bSendPort==0
  123. struct sockaddr_in saCtrlAddr;
  124.  
  125. WORD sVPos;                            // scroll pos for debug window
  126.  
  127. WSADATA WSAData;                       // windows sockets dll information
  128.  
  129.  
  130.