summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2006-07-02 22:16:25 (UTC)
committer Michael Krelin <hacker@klever.net>2006-07-02 22:16:25 (UTC)
commit577427e68ef10a4d2b75d28e42b22952ae3bcf23 (patch) (side-by-side diff)
tree24c8fc94ea6524059cab7927ef76639bb1a1a98d
parent24e693797daef020ece3fa19bb5acce000e37165 (diff)
downloadpumpkin-577427e68ef10a4d2b75d28e42b22952ae3bcf23.zip
pumpkin-577427e68ef10a4d2b75d28e42b22952ae3bcf23.tar.gz
pumpkin-577427e68ef10a4d2b75d28e42b22952ae3bcf23.tar.bz2
Do not close RRQ socket until the last ACK is received.
git-svn-id: http://svn.klever.net/kin/pumpkin/trunk@152 fe716a7a-6dde-0310-88d9-d003556173a8
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--PumpKINDlg.cpp22
-rw-r--r--PumpKINDlg.h3
-rw-r--r--pumpkin.mak238
3 files changed, 83 insertions, 180 deletions
diff --git a/PumpKINDlg.cpp b/PumpKINDlg.cpp
index 070f3e8..2a01918 100644
--- a/PumpKINDlg.cpp
+++ b/PumpKINDlg.cpp
@@ -1,2159 +1,2163 @@
// PumpKINDlg.cpp : implementation file
//
#include "stdafx.h"
#include "PumpKIN.h"
#include "PumpKINDlg.h"
#include "ACLTargetCombo.h"
#include "PropsServer.h"
#include "PropsNetwork.h"
#include "PropsSounds.h"
#include "PropsACL.h"
#include "ConfirmRRQDlg.h"
#include "ConfirmWRQDlg.h"
#include "RequestDlg.h"
#include "Resolver.h"
#include "Retrier.h"
#include "Trayer.h"
#include <io.h>
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
IMPLEMENT_DYNAMIC(CXferSocket, CAsyncSocket)
IMPLEMENT_DYNAMIC(CWRQSocket, CXferSocket)
IMPLEMENT_DYNAMIC(CRRQSocket, CXferSocket)
/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About
class CAboutDlg : public CDialog
{
public:
CAboutDlg();
// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
afx_msg void OnKlevernet();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
ON_BN_CLICKED(IDC_KLEVERNET, OnKlevernet)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPumpKINDlg dialog
CPumpKINDlg::CPumpKINDlg(CWnd* pParent /*=NULL*/)
: CDialog(CPumpKINDlg::IDD, pParent), m_MinSize(0,0)
{
m_Listener.m_Daddy = this;
m_bListen = TRUE;
m_ListenPort = 69;
m_bTFTPSubdirs = TRUE;
m_RRQMode = rrqAlwaysConfirm;
m_WRQMode = wrqAlwaysConfirm;
m_TFTPTimeOut = CTimeSpan(0,0,0,30);
m_RetryTimeOut = CTimeSpan(0,0,0,10);
m_LogLength = 100;
m_SpeakPort = 69;
m_PromptTimeOut=30;
m_bShown=TRUE;
m_bExiting=FALSE;
m_BlockSize=1024;
m_bnw.AssignSound("(bang)",IDR_WAVE_RING,CBellsNWhistles::CBang::bangResource);
m_bnw.AssignSound("(done)",IDR_WAVE_FINISHED,CBellsNWhistles::CBang::bangResource);
m_bnw.AssignSound("(oops)",IDR_WAVE_ABORTED,CBellsNWhistles::CBang::bangResource);
m_bnw.AssignSound("(none)",(int)0,CBellsNWhistles::CBang::bangNone);
m_bnwRequest="(bang)"; m_bnwSuccess="(done)";
m_bnwAbort="(oops)";
//{{AFX_DATA_INIT(CPumpKINDlg)
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
m_bmpBack.LoadBitmap(IDB_BACKGROUND);
m_bmpBack.GetBitmap(&m_bitmapBack);
m_Retrier = new CRetrier(this);
ASSERT(m_Retrier);
m_Trayer = new CTrayer(this);
ASSERT(m_Trayer);
/* Ensure we're backwards compatible */
ASSERT(CPumpKINDlg::rrqGiveAll==0);
ASSERT(CPumpKINDlg::rrqAlwaysConfirm==1);
ASSERT(CPumpKINDlg::rrqDenyAll==2);
ASSERT(CPumpKINDlg::wrqTakeAll==0);
ASSERT(CPumpKINDlg::wrqConfirmIfExists==1);
ASSERT(CPumpKINDlg::wrqAlwaysConfirm==2);
ASSERT(CPumpKINDlg::wrqDenyAll==3);
/* -- */
LoadSettings();
}
void CPumpKINDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPumpKINDlg)
DDX_Control(pDX, ID_HELP, m_HelpCtl);
DDX_Control(pDX, IDC_PUT, m_PutCtl);
DDX_Control(pDX, IDC_GET, m_GetCtl);
DDX_Control(pDX, IDC_EXIT, m_ExitCtl);
DDX_Control(pDX, IDC_LISTENING, m_ListenCtl);
DDX_Control(pDX, IDC_ABORT, m_AbortCtl);
DDX_Control(pDX, IDC_OPTIONS, m_OptionsCtl);
DDX_Control(pDX, IDC_LOG, m_Log);
DDX_Control(pDX, IDC_CONNECTIONS, m_List);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CPumpKINDlg, CDialog)
//{{AFX_MSG_MAP(CPumpKINDlg)
ON_WM_SYSCOMMAND()
ON_WM_DESTROY()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_WM_CREATE()
ON_BN_CLICKED(IDC_OPTIONS, OnOptions)
ON_WM_TIMER()
ON_BN_CLICKED(IDC_EXIT, OnExit)
ON_BN_CLICKED(IDC_PUT, OnPut)
ON_BN_CLICKED(IDC_GET, OnGet)
ON_NOTIFY(LVN_DELETEALLITEMS, IDC_CONNECTIONS, OnDeleteallitemsConnections)
ON_NOTIFY(LVN_DELETEITEM, IDC_CONNECTIONS, OnDeleteitemConnections)
ON_NOTIFY(LVN_INSERTITEM, IDC_CONNECTIONS, OnInsertitemConnections)
ON_NOTIFY(LVN_ITEMCHANGED, IDC_CONNECTIONS, OnItemchangedConnections)
ON_BN_CLICKED(IDC_ABORT, OnAbort)
ON_WM_CLOSE()
ON_COMMAND(ID_TRAY_SHOWPUMPKINWINDOW, OnTrayShowpumpkinwindow)
ON_COMMAND(ID_TRAY_LISTEN, OnTrayListen)
ON_COMMAND(ID_TRAY_EXIT, OnTrayExit)
ON_COMMAND(ID_TRAY_ABOUTPUMPKIN, OnTrayAboutpumpkin)
ON_COMMAND(ID_TRAY_FETCHFILE, OnTrayFetchfile)
ON_COMMAND(ID_TRAY_HELP, OnTrayHelp)
ON_COMMAND(ID_TRAY_OPTIONS, OnTrayOptions)
ON_COMMAND(ID_TRAY_SENDFILE, OnTraySendfile)
ON_WM_WINDOWPOSCHANGING()
ON_LBN_SELCHANGE(IDC_LOG, OnSelchangeLog)
ON_COMMAND(ID_TRAY_OPENFILESFOLDER, OnTrayOpenfilesfolder)
ON_WM_DROPFILES()
ON_BN_CLICKED(ID_HELP, OnHelp)
ON_BN_CLICKED(IDC_LISTENING, OnListening)
ON_WM_GETMINMAXINFO()
ON_WM_SIZE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CPumpKINDlg message handlers
BOOL CPumpKINDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
VERIFY(m_Retrier->Create(NULL,"PumpKIN-Retrier",WS_CHILD,CRect(0,0,0,0),this,0));
m_Images.Create(16,16,TRUE,2,1);
m_iRRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_RRQ));
m_iWRQ = m_Images.Add(AfxGetApp()->LoadIcon(IDI_WRQ));
ASSERT(m_iRRQ>=0);
ASSERT(m_iWRQ>=0);
m_List.SetImageList(&m_Images,LVSIL_NORMAL);
m_List.SetImageList(&m_Images,LVSIL_SMALL);
m_List.SetImageList(&m_Images,LVSIL_STATE);
m_List.SetTextColor(RGB(255,255,0)); // Yellow
m_List.SetTextBkColor(RGB(12,167,0)); // Green
m_List.SetBkColor(RGB(12,167,0)); // Green
CRect listrc;
m_List.GetClientRect(&listrc);
m_List.InsertColumn(0,"File",LVCFMT_LEFT,listrc.Width()-((listrc.Width()/7)*3+listrc.Width()*2/7),subitemFile);
m_List.InsertColumn(1,"type",LVCFMT_CENTER,listrc.Width()/7,subitemType);
m_List.InsertColumn(2,"peer",LVCFMT_LEFT,listrc.Width()*2/7,subitemPeer);
m_List.InsertColumn(3,"ACK",LVCFMT_RIGHT,listrc.Width()/7,subitemBytes);
m_List.InsertColumn(4,"tsize",LVCFMT_RIGHT,listrc.Width()/7,subitemTSize);
LogLine(IDS_LOG_START);
SetupButtons();
CRect wrci, wrco;
GetWindowRect(&wrco);
GetClientRect(&wrci);
CRect brc;
m_GetCtl.GetWindowRect(&brc); ScreenToClient(&brc);
m_rightGapButtons = wrci.right-brc.right;
m_List.GetWindowRect(&brc); ScreenToClient(&brc);
m_rightGapList = wrci.right-brc.right;
m_ListenCtl.GetWindowRect(&brc); ScreenToClient(&brc);
m_bottomGapListen = wrci.bottom-brc.bottom;
m_Log.GetWindowRect(&brc); ScreenToClient(&brc);
m_bottomGapLog = wrci.bottom-brc.bottom;
m_MinSize.cx = wrco.Width(); m_MinSize.cy=wrco.Height();
CRect rc, drc;
GetWindowRect(rc);
GetDesktopWindow()->GetWindowRect(drc);
SetWindowPos(NULL,drc.right-6-rc.Width(),6,0,0,SWP_NOACTIVATE|SWP_NOSIZE|SWP_NOZORDER);
if(m_bShown)
ShowWindow(SW_SHOW);
else
ShowWindow(SW_HIDE);
m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0);
// CG: The following block was added by the ToolTips component.
{
// Create the ToolTip control.
m_tooltip.Create(this);
m_tooltip.Activate(TRUE);
m_tooltip.AddTool(&m_List,IDC_CONNECTIONS);
m_tooltip.AddTool(GetDlgItem(IDC_PUT),IDC_PUT);
m_tooltip.AddTool(GetDlgItem(IDC_GET),IDC_GET);
m_tooltip.AddTool(&m_AbortCtl,IDC_ABORT);
m_tooltip.AddTool(GetDlgItem(IDC_OPTIONS),IDC_OPTIONS);
m_tooltip.AddTool(GetDlgItem(IDC_EXIT),IDC_EXIT);
m_tooltip.AddTool(GetDlgItem(ID_HELP),ID_HELP);
m_tooltip.AddTool(GetDlgItem(IDC_LOG),IDC_LOG);
}
return TRUE; // return TRUE unless you set the focus to a control
}
void CPumpKINDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}
void CPumpKINDlg::OnDestroy()
{
SaveSettings();
NOTIFYICONDATA nid;
memset(&nid,0,sizeof(nid));
nid.cbSize=sizeof(nid);
nid.hWnd=m_Trayer->m_hWnd;
nid.uID=IDC_TRAYICON;
nid.uFlags=0;
VERIFY(Shell_NotifyIcon(NIM_DELETE,&nid));
WinHelp(0L, HELP_QUIT);
CDialog::OnDestroy();
POSITION p = m_LogTimes.GetStartPosition();
while(p){
CTime *t,*tt;
m_LogTimes.GetNextAssoc(p,t,tt);
ASSERT(t && tt && t==tt);
delete t;
}
// *** Abort and cleanup transfers
m_LogTimes.RemoveAll();
}
// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.
void CPumpKINDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting
SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);
// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;
// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CPaintDC pDC(this);
CDC bmpDC;
bmpDC.CreateCompatibleDC(&pDC);
bmpDC.SelectObject(&m_bmpBack);
CRect rc;
GetClientRect(&rc);
for(int x=-m_bitmapBack.bmWidth*2/4;x<rc.Width();x+=m_bitmapBack.bmWidth)
for(int y=-m_bitmapBack.bmHeight*2/4;y<rc.Height();y+=m_bitmapBack.bmHeight)
pDC.BitBlt(x,y,m_bitmapBack.bmWidth,m_bitmapBack.bmHeight,&bmpDC,0,0,SRCCOPY);
bmpDC.DeleteDC();
CDialog::OnPaint();
}
}
// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CPumpKINDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}
int CPumpKINDlg::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CDialog::OnCreate(lpCreateStruct) == -1)
return -1;
if(!m_Listener.SetListen(m_bListen)) {
m_bListen=FALSE;
TRACE0("Failed to create socket\n");
AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION);
}
if(!m_Trayer->Create(NULL,"PumpKIN TrayIcon",WS_CHILD,CRect(0,0,0,0),this,0)){
TRACE0("Failed to create trayer\n");
return -1;
}
NOTIFYICONDATA nid;
memset(&nid,0,sizeof(nid));
nid.cbSize=sizeof(nid);
nid.hWnd=m_Trayer->m_hWnd;
nid.uID=IDC_TRAYICON;
nid.uFlags=NIF_MESSAGE|NIF_ICON|NIF_TIP;
nid.uCallbackMessage=WM_TRAYICON;
nid.hIcon=AfxGetApp()->LoadIcon(IDR_MAINFRAME);
// *** Load from resource
strcpy(nid.szTip,"PumpKIN");
VERIFY(Shell_NotifyIcon(NIM_ADD,&nid));
return 0;
}
void CListenSocket::OnReceive(int nErrorCode)
{
ASSERT(m_Daddy);
if(nErrorCode){
m_Daddy->LogLine(IDS_LOG_LISTENRECEIVEERROR);
return;
}
DWORD fionread = 0;
VERIFY(IOCtl(FIONREAD,&fionread)); // *** Do some checking on the value acquired
tftp *tftpRQ = tftp::Allocate(fionread);
ASSERT(tftpRQ);
SOCKADDR_IN sin;
if(!tftpRQ->Receive(this,fionread,&sin)){
m_Daddy->LogLine(IDS_LOG_LISTENACCEPTERROR);
delete tftpRQ;
return;
}
#ifndef NDEBUG
CString tmp;
tmp.Format("%u - %s - %u\n",tftpRQ->Opcode(),inet_ntoa(sin.sin_addr),sin.sin_port);
TRACE0(tmp);
#endif
POSITION p = m_Daddy->m_Xfers.GetStartPosition();
while(p){
SOCKET key;
CXferSocket *sock;
m_Daddy->m_Xfers.GetNextAssoc(p,key,sock);
ASSERT(sock);
if(sock->m_Peer.sin_addr.s_addr==sin.sin_addr.s_addr && sock->m_Peer.sin_port==sin.sin_port){
TRACE0("Ignoring request which we are already processing\n");
delete tftpRQ;
return;
}
}
switch(tftpRQ->Opcode()){
case tftp::opRRQ:
// Read Request
{
CString tmp;
tmp.Format(IDS_LOG_RRQSERVE,tftpRQ->rqFileName(),tftpRQ->rqType(),inet_ntoa(sin.sin_addr));
m_Daddy->LogLine(tmp);
CRRQSocket *s = new CRRQSocket(m_Daddy,tftpRQ->rqFileName(),tftpRQ->rqType(),&sin);
ASSERT(s);
tftpRQ->GetOptions(&s->m_Options);
if(!s->Create())
s->Destroy(FALSE);
}
break;
case tftp::opWRQ:
// Write Request
{
CString tmp;
tmp.Format(IDS_LOG_WRQSERVE,tftpRQ->rqFileName(),tftpRQ->rqType(),inet_ntoa(sin.sin_addr));
m_Daddy->LogLine(tmp);
CWRQSocket *s = new CWRQSocket(m_Daddy,tftpRQ->rqFileName(),tftpRQ->rqType(),&sin);
ASSERT(s);
tftpRQ->GetOptions(&s->m_Options);
if(!s->Create(NULL,NULL))
s->Destroy(FALSE);
}
break;
default:
m_Daddy->LogLine(IDS_LOG_LISTENOPCODE);
delete tftpRQ;
return;
}
delete tftpRQ;
}
BOOL tftp::Receive(CAsyncSocket* socket,UINT maxLength,SOCKADDR_IN *sin)
{
ASSERT(socket);
int saddrLen = sizeof(SOCKADDR_IN);
length = sin ?
socket->ReceiveFrom(udpBase(),maxLength,(SOCKADDR*)sin,&saddrLen)
:
socket->Receive(udpBase(),maxLength)
;
if(!length)
return FALSE;
if(length==(tftpLength)SOCKET_ERROR)
return FALSE;
return TRUE;
}
UINT tftp::Opcode()
{
return REVERSEBYTES(opcode);
}
CString tftp::rqFileName()
{
ASSERT(length);
ASSERT(Opcode()==opRRQ || Opcode()==opWRQ);
CString rv;
if(memchr(&data.m_RQ.data,0,length-sizeof(opcode)))
rv = (LPCTSTR)data.m_RQ.data;
return rv;
}
CString tftp::rqType()
{
ASSERT(length);
ASSERT(Opcode()==opRRQ || Opcode()==opWRQ);
CString rv;
char *tmp = (char*)memchr(&data.m_RQ.data,0,length-sizeof(opcode));
if(tmp++)
rv = (LPCTSTR)tmp;
return rv;
}
UINT tftp::GetOptions(tftp::tftpOptions* ops)
{
ASSERT(length);
ASSERT(Opcode()==opRRQ || Opcode()==opWRQ || Opcode()==opOACK);
ASSERT(ops);
tftpOptions& o = *ops;
LPSTR base = (LPSTR)&data.m_RQ.data;
UINT basePtr = 0;
if(Opcode()==opRRQ || Opcode()==opWRQ){
base = (LPSTR)memchr(&data.m_RQ.data,0,length-sizeof(opcode));
if(!base)
return 0;
base++;
basePtr = (base-(LPSTR)&data.m_RQ.data);
base = (LPSTR)memchr(base,0,length-basePtr);
if(!base)
return 0;
base++;
basePtr = (base-(LPSTR)&data.m_RQ.data);
}
ops->RemoveAll();
UINT rv = 0;
while(basePtr<(length-sizeof(opcode))){
CString onam = (LPSTR)&data.m_RQ.data[basePtr];
basePtr+=onam.GetLength()+1;
CString oval = (LPSTR)&data.m_RQ.data[basePtr];
basePtr+=oval.GetLength()+1;
onam.MakeLower();
o[onam]=oval;
rv++;
}
return rv;
}
tftp::tftp()
{
length=0;
}
void CXferSocket::OnSend(int nErrorCode)
{
if(nErrorCode){
ASSERT(m_Daddy);
m_Daddy->LogLine(IDS_LOG_XFERSEND);
return;
}
if(!m_Queue.IsEmpty()){
tftp *p = m_Queue.GetHead();
ASSERT(p);
m_Queue.RemoveHead();
if(!p->Send(this,&m_Peer)){
ASSERT(m_Daddy);
m_Daddy->LogLine(IDS_LOG_XFERUDPSEND);
}
delete p;
}
DoSelect();
if(m_Queue.IsEmpty()){
switch(state){
case stateDeny:
Destroy(FALSE);
break;
case stateFinish:
Destroy(TRUE);
break;
}
}
}
BOOL tftp::Send(CAsyncSocket *socket,SOCKADDR_IN* saddr)
{
ASSERT(socket);
int rv = socket->SendTo(udpBase(),length,(SOCKADDR*)saddr,sizeof(SOCKADDR_IN));
if(rv!=length)
return FALSE;
return TRUE;
}
-void CXferSocket::DoSelect()
+void CXferSocket::DoSelect(BOOL do_select)
{
if(m_Peer.sin_addr.s_addr!=INADDR_NONE)
- AsyncSelect(FD_CLOSE|FD_READ|(m_Queue.IsEmpty()?0:FD_WRITE));
+ AsyncSelect(FD_CLOSE|FD_READ|((m_Queue.IsEmpty()&&!do_select)?0:FD_WRITE));
}
void CXferSocket::OnReceive(int nErrorCode)
{
if(nErrorCode){
ASSERT(m_Daddy);
m_Daddy->LogLine(IDS_LOG_XFERRECEIVE);
return;
}
ASSERT(m_Daddy);
DWORD fionread = 0;
VERIFY(IOCtl(FIONREAD,&fionread));
tftp *p = tftp::Allocate(fionread);
ASSERT(p);
SOCKADDR_IN sin;
if(!p->Receive(this,fionread,&sin)){
m_Daddy->LogLine(IDS_LOG_XFERUDPRECEIVE);
delete p;
}else
if(m_Peer.sin_addr.s_addr==INADDR_NONE){
m_Peer.sin_addr=sin.sin_addr;
m_Peer.sin_port=sin.sin_port;
}
BOOL alive = TRUE;
if(state==stateInit){
state=stateXfer;
m_Peer.sin_port=sin.sin_port;
UpdateList();
}
if(sin.sin_addr.s_addr!=m_Peer.sin_addr.s_addr || sin.sin_port!=m_Peer.sin_port){
m_Daddy->LogLine(IDS_LOG_XFERSOURCETID);
// *** Bounce it!
}else{
alive = OnTFTP(p);
}
delete p;
if(alive){
DoSelect();
ResetTimeout();
}
}
void CXferSocket::SetPeer(SOCKADDR_IN *sin)
{
ASSERT(sin);
memmove(&m_Peer,sin,sizeof(m_Peer));
}
void CXferSocket::UpdateList()
{
ASSERT(m_Daddy);
LV_FINDINFO lvf;
memset(&lvf,0,sizeof(lvf));
lvf.flags=LVFI_PARAM;
lvf.lParam=(LPARAM)this;
int i = m_Daddy->m_List.FindItem(&lvf);
if(i<0){
ASSERT(IsKindOf(RUNTIME_CLASS(CRRQSocket)) || IsKindOf(RUNTIME_CLASS(CWRQSocket)));
i=m_Daddy->m_List.InsertItem(0,m_FileName,IsKindOf(RUNTIME_CLASS(CRRQSocket))?m_Daddy->m_iRRQ:m_Daddy->m_iWRQ);
ASSERT(!(i<0));
m_Daddy->m_List.SetItemData(i,(DWORD)this);
}
m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemFile,m_FileName);
m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemType,m_Type);
m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemPeer,inet_ntoa(m_Peer.sin_addr));
CString tmp;
tmp.Format(IDS_FMT_BYTES,GetACK());
m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemBytes,tmp);
if(m_xferSize>=0){
tmp.Format(IDS_FMT_BYTES,m_xferSize);
m_Daddy->m_List.SetItemText(i,CPumpKINDlg::subitemTSize,tmp);
}
}
CXferSocket::CXferSocket()
: m_wndResolver(NULL), m_Retry(NULL), m_bRetry(FALSE),
m_blkSize(512), m_timeOut(30), m_xferSize(-1),
m__blkSize(512), m__timeOut(30)
{
m_Daddy=NULL;
m_Peer.sin_addr.s_addr=INADDR_NONE;
m_Peer.sin_family=AF_INET;
state=stateNone;
}
ULONG CXferSocket::GetACK()
{
return 0;
}
CXferSocket::CXferSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN* sin)
: m_wndResolver(NULL), m_Retry(NULL), m_bRetry(FALSE),
m_blkSize(512), m_timeOut(30), m_xferSize(-1),
m__blkSize(512), m__timeOut(30)
{
m_Peer.sin_family=AF_INET;
state=stateNone;
ASSERT(daddy);
m_Daddy=daddy;
m_timeOut=m__timeOut=m_Daddy->m_TFTPTimeOut.GetTotalSeconds();
if(sin){
m_Peer.sin_addr.s_addr=sin->sin_addr.s_addr;
m_Peer.sin_port=sin->sin_port;
}else
m_Peer.sin_addr.s_addr=INADDR_NONE;
m_FileName=fileName;
m_Type=type;
}
BOOL CRRQSocket::Create(LPCTSTR localFile,LPCTSTR hostName)
{
if(!CAsyncSocket::Create(0,SOCK_DGRAM))
return FALSE;
ASSERT(m_Daddy);
ASSERT(m_Peer.sin_addr.s_addr!=INADDR_NONE || hostName);
m_Daddy->m_Xfers[m_hSocket]=this;
CString lFile = localFile?localFile:m_FileName;
TurnSlashes(lFile,TRUE);
UpdateList();
if(!localFile){ // Check only for incoming requests
if(CheckBadRelativeness(m_FileName)){
Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS);
return TRUE;
}
int atar=m_Daddy->m_aclRules.FindTarget(acl_rule::opRRQ,m_Peer.sin_addr.s_addr);
if(atar<0)
atar = m_Daddy->m_RRQMode;
switch(atar){
case CPumpKINDlg::rrqGiveAll:
break;
case CPumpKINDlg::rrqAlwaysConfirm:
if(ConfirmRequest())
break;
default:
TRACE1("Unexpected access target: %d\n",atar);
case CPumpKINDlg::rrqDenyAll:
Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS);
return TRUE;
}
}
CString fn = localFile?ApplyRootGently(lFile):ApplyRoot(lFile);
CFileException e;
if(!m_File.Open(fn,CFile::modeRead|CFile::shareDenyWrite,&e)){
if(localFile){
CString tmp;
tmp.Format(IDS_LOG_FAILEDLOCALFILE,fn);
m_Daddy->LogLine(tmp);
return FALSE;
}
Deny(&e);
return TRUE;
}
m_xferSize=m_File.GetLength(); // *** HANDLE EXCEPTION
if(hostName){
m_HostName=hostName;
CString tmp;
tmp.Format(IDS_LOG_SENDING,m_FileName,m_HostName);
m_Daddy->LogLine(tmp);
CString inAddr = hostName;
int at = inAddr.Find('@');
if(at>=0)
inAddr=inAddr.Mid(at+1);
if((m_Peer.sin_addr.s_addr=inet_addr((LPCTSTR)inAddr))==INADDR_NONE){
ASSERT(!m_wndResolver);
m_wndResolver = new CResolver(this);
ASSERT(m_wndResolver);
return m_wndResolver->Resolve();
}
else
OnHostKnown();
}else{
tftp::tftpOptions o;
CString v;
if(m_Options.Lookup(tftpoBSize,v)){
m__blkSize=atoi(v);
if(m__blkSize){
m_blkSize=m__blkSize;
v.Format("%u",m_blkSize);
o[tftpoBSize]=v;
}
}
if(m_Options.Lookup(tftpoTSize,v)){
v.Format("%lu",m_xferSize);
o[tftpoTSize]=v;
}
if(m_Options.Lookup(tftpoTOut,v)){
m__timeOut=atoi(v);
if(m__timeOut){
m_timeOut=m__timeOut;
v.Format("%u",m_timeOut);
o[tftpoTOut]=v;
}
}
state = stateXfer;
m_ACK=0;
if(o.GetCount()){
tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&o));
ASSERT(p);
p->SetOpcode(tftp::opOACK);
p->data.m_OACK.Set(&o);
PostTFTP(p,TRUE);
}else
DoXfer();
}
return TRUE;
}
CRRQSocket::CRRQSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin)
: CXferSocket(daddy,fileName,type,sin)
{
m_ACK=0;
m_LastSlack=0;
}
UINT tftp::tftpERROR::tftpSize(LPCTSTR msg)
{
return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpERROR::tftpErrorCode)+strlen(msg)+1;
}
tftp* tftp::Allocate(UINT tftpSize)
{
ASSERT(tftpSize);
tftp* rv = (tftp*) new BYTE[tftpSlackSize+tftpSize];
ASSERT(rv);
rv->length=tftpSize;
return rv;
}
void tftp::errSet(UINT code,LPCTSTR msg)
{
ASSERT(this);
ASSERT(length>=data.m_ERROR.tftpSize(msg));
strcpy((char*)data.m_ERROR.data,msg);
data.m_ERROR.SetCode(code);
}
void CXferSocket::PostTFTP(tftp* p,BOOL retryable)
{
ASSERT(p);
m_Queue.AddTail(p);
DoSelect();
if(!m_bRetry){
if(retryable)
SetTry(p);
else
SetTry();
}
ResetTimeout();
}
void CXferSocket::Deny(UINT errCode,UINT errID)
{
PostError(errCode,errID);
state=stateDeny;
}
void CRRQSocket::DoXfer()
{
tftp *p = tftp::Allocate(tftp::tftpDATA::tftpSize(m_blkSize));
ASSERT(p);
p->SetOpcode(tftp::opDATA);
TRY{
m_File.Seek(m_ACK*m_blkSize,CFile::begin);
int bytes = m_File.Read(p->data.m_DATA.data,m_blkSize);
p->data.m_DATA.SetBlock(m_ACK+1);
p->length=p->length-m_blkSize+bytes;
m_LastSlack = m_blkSize-bytes;
PostTFTP(p);
if(bytes<m_blkSize){
- state=stateFinish;
- ASSERT(m_Daddy);
- CString tmp;
- tmp.Format(IDS_LOG_XFERRRQFINISHED,(LPCTSTR)m_FileName);
- m_Daddy->LogLine(tmp);
+ state=stateClosing; m_ACKtoClose = m_ACK+1;
}
}CATCH(CFileException,e){
Deny(e);
}END_CATCH
}
UINT tftp::tftpDATA::tftpSize(UINT blkSize)
{
return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpDATA)
-sizeof(BYTE)+blkSize;
}
void CXferSocket::Deny(CFileException* e)
{
PostError(e);
state=stateDeny;
}
void CXferSocket::PostError(UINT errCode,UINT errID)
{
CString msg;
msg.LoadString(errID);
ASSERT(m_Daddy);
/* // ***
CString tmp;
tmp.Format(IDS_LOG_SENTTFTPERROR,errCode,(LPCTSTR)msg);
m_Daddy->LogLine(tmp);
*/
tftp* err = tftp::Allocate(tftp::tftpERROR::tftpSize(msg));
err->SetOpcode(tftp::opERROR);
err->errSet(errCode,msg);
PostTFTP(err);
}
void CXferSocket::PostError(CFileException* e)
{
UINT eCode;
UINT eMsgID;
switch(e->m_cause){
case CFileException::fileNotFound:
eCode=tftp::errNotFound;
eMsgID=IDS_TFTP_ERROR_NOTFOUND;
break;
case CFileException::accessDenied:
eCode=tftp::errAccessViolation;
eMsgID=IDS_TFTP_ERROR_ACCESS;
break;
case CFileException::directoryFull:
eCode=tftp::errDiskFull;
eMsgID=IDS_TFTP_ERROR_DIRFULL;
break;
case CFileException::sharingViolation:
eCode=tftp::errAccessViolation;
eMsgID=IDS_TFTP_ERROR_SHARING;
break;
case CFileException::diskFull:
eCode=tftp::errDiskFull;
eMsgID=IDS_TFTP_ERROR_DISKFULL;
break;
default:
eCode=tftp::errUndefined;
eMsgID=IDS_TFTP_ERROR_UNDEFINED;
break;
}
PostError(eCode,eMsgID);
}
ULONG CRRQSocket::GetACK(void)
{
return (m_ACK*m_blkSize)-m_LastSlack;
}
BOOL CRRQSocket::OnTFTP(tftp* p)
{
BOOL rv = TRUE;
switch(p->Opcode()){
case tftp::opOACK:
+ {
m_ACK=0;
ASSERT(state!=stateFinish);
- {
tftp::tftpOptions o;
if(p->GetOptions(&o)){
CString v;
if(o.Lookup(tftpoBSize,v)){
m_blkSize=atoi(v);
if(!m_blkSize){ // *** More sanity checks
Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE);
rv = TRUE;
break;
}
}
if(o.Lookup(tftpoTOut,v)){
m_timeOut=atoi(v);
if(!m_timeOut){ // *** More sanity checks
Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT);
rv = TRUE;
break;
}
}
if(o.Lookup(tftpoXResume,v)){
m_ACK=atoi(v);
}
}
UpdateList();
DoXfer();
}
break;
case tftp::opACK:
m_ACK=p->data.m_ACK.Block();
- if(state!=stateFinish){
+ if(state==stateClosing && m_ACK==m_ACKtoClose) {
+ state = stateFinish;
+ ASSERT(m_Daddy);
+ CString tmp;
+ tmp.Format(IDS_LOG_XFERRRQFINISHED,(LPCTSTR)m_FileName);
+ m_Daddy->LogLine(tmp);
+ rv = FALSE;
+ DoSelect(TRUE);
+ }else if(state!=stateFinish){
UpdateList();
DoXfer();
}
break;
case tftp::opERROR:
{
ASSERT(m_Daddy);
CString tmp;
tmp.Format(IDS_LOG_GOTTFTPERROR,p->data.m_ERROR.Code(),(LPCTSTR)p->errMessage());
m_Daddy->LogLine(tmp);
}
Destroy(FALSE);
rv = FALSE;
break;
default:
{
ASSERT(m_Daddy);
CString tmp;
tmp.Format(IDS_LOG_XFEROPCODE,p->Opcode());
m_Daddy->LogLine(tmp);
// *** Self destruct maybe??
}
break;
}
return rv;
}
BOOL CWRQSocket::OnTFTP(tftp* p)
{
switch(p->Opcode()){
case tftp::opOACK:
ASSERT(state!=stateFinish);
{
if(m_bResume)
m_ACK=m_File.GetLength()/m_blkSize;
else
m_ACK=0;
tftp::tftpOptions o;
if(p->GetOptions(&o)){
CString v;
if(o.Lookup(tftpoBSize,v)){
m_blkSize=atoi(v);
if(!m_blkSize){ // *** More sanity checks
Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE);
return TRUE;
}
}
if(o.Lookup(tftpoTOut,v)){
m_timeOut=atoi(v);
if(!m_timeOut){ // *** More sanity checks
Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT);
return TRUE;
}
}
if(o.Lookup(tftpoTSize,v)){
m_xferSize=atoi(v);
}
}
UpdateList();
DoXfer();
}
break;
case tftp::opDATA:
{
UINT block = p->data.m_DATA.Block();
TRY{
m_File.Seek((block-1)*m_blkSize,CFile::begin);
int bytes = p->length-sizeof(p->data.m_DATA.block)-(tftpHdrSize-tftpSlackSize);
if(bytes){
m_File.Write(p->data.m_DATA.data,bytes);
// *** Move to the other place where we can do it not that often
m_File.SetLength(m_File.GetPosition());
}
if(bytes<m_blkSize){
state=stateFinish;
ASSERT(m_Daddy);
CString tmp;
tmp.Format(IDS_LOG_XFERWRQFINISHED,(LPCTSTR)m_FileName);
m_Daddy->LogLine(tmp);
}
m_ACK=block;
m_LastSlack=m_blkSize-bytes;
UpdateList();
DoXfer();
}CATCH(CFileException,e){
Deny(e);
}END_CATCH
}
break;
case tftp::opERROR:
{
ASSERT(m_Daddy);
CString tmp;
tmp.Format(IDS_LOG_GOTTFTPERROR,p->data.m_ERROR.Code(),(LPCTSTR)p->errMessage());
m_Daddy->LogLine(tmp);
}
Destroy(FALSE);
return FALSE;
default:
{
ASSERT(m_Daddy);
CString tmp;
tmp.Format(IDS_LOG_XFEROPCODE,p->Opcode());
m_Daddy->LogLine(tmp);
// *** Self destruct maybe??
}
break;
}
return TRUE;
}
void tftp::SetOpcode(WORD op)
{
opcode = REVERSEBYTES(op);
}
void tftp::tftpDATA::SetBlock(WORD b)
{
block=REVERSEBYTES(b);
}
WORD tftp::tftpDATA::Block()
{
return REVERSEBYTES(block);
}
WORD tftp::tftpACK::Block()
{
return REVERSEBYTES(block);
}
void tftp::tftpACK::SetBlock(WORD b)
{
block = REVERSEBYTES(b);
}
WORD tftp::tftpERROR::Code()
{
return REVERSEBYTES(code);
}
void tftp::tftpERROR::SetCode(WORD c)
{
code = REVERSEBYTES(c);
}
CString tftp::errMessage()
{
CString rv;
if(memchr(data.m_ERROR.data,0,length-(tftpHdrSize-tftpSlackSize)-sizeof(data.m_ERROR.code)))
rv = (LPCTSTR)data.m_ERROR.data;
return rv;
}
void CXferSocket::Destroy(BOOL success)
{
if(m_wndResolver){
delete m_wndResolver;
m_wndResolver=NULL;
}
SetTry();
m_Daddy->m_bnw.StartSound(
success
? m_Daddy->m_bnwSuccess
: m_Daddy->m_bnwAbort
);
if(m_File.m_hFile!=CFile::hFileNull){
TRY{
m_File.Close();
}CATCH(CFileException,e){
TRACE0("Error closing file\n");
}END_CATCH
}
ASSERT(m_Daddy);
m_Daddy->KillTimer(m_hSocket);
m_Daddy->m_Xfers.RemoveKey(m_hSocket);
LV_FINDINFO lvf;
memset(&lvf,0,sizeof(lvf));
lvf.flags=LVFI_PARAM;
lvf.lParam=(LPARAM)this;
int i = m_Daddy->m_List.FindItem(&lvf);
if(i>=0)
m_Daddy->m_List.DeleteItem(i);
delete this;
}
void CPumpKINDlg::LogLineToScreen(LPCTSTR str)
{
ASSERT(m_LogLength);
while(m_Log.GetCount()>m_LogLength && m_Log.GetCount()!=LB_ERR){
CTime *t = (CTime*)m_Log.GetItemData(0);
if(((DWORD)t)!=LB_ERR){
ASSERT(t);
m_LogTimes.RemoveKey(t);
delete t;
}
m_Log.DeleteString(0);
}
int i = m_Log.AddString(str);
ASSERT(i!=LB_ERR);
CTime *t = new CTime(CTime::GetCurrentTime());
m_Log.SetItemData(i,(DWORD)(m_LogTimes[t]=t));
m_Log.SetCurSel(i);
}
void CPumpKINDlg::LogLine(UINT msgID)
{
CString tmp;
tmp.Format(msgID);
LogLine(tmp);
}
void CXferSocket::TurnSlashes(CString& fn,BOOL bBack)
{
int s = fn.Find(bBack?'/':'\\');
while(s>=0){
fn.SetAt(s,bBack?'\\':'/');
s = fn.Find(bBack?'/':'\\');
}
}
CString CXferSocket::ApplyRoot(LPCTSTR fileName)
{
ASSERT(m_Daddy);
CString fn = fileName;
CString rv = m_Daddy->m_TFTPRoot;
if(rv.IsEmpty())
rv = ".";
if(rv[rv.GetLength()-1]!='\\')
rv+="\\";
while((!fn.IsEmpty()) && fn[0]=='\\')
fn=fn.Mid(1);
rv+=fn;
return rv;
}
void CPumpKINDlg::OnOptions()
{
CPropertySheet cps(IDS_TITLE_OPTIONS,this);
CPropsServer server;
CPropsNetwork network;
CPropsSounds sounds;
CPropsACL acl;
server.m_RRQMode=m_RRQMode;
server.m_TFTPRoot=m_TFTPRoot;
server.m_TFTPSubdirs=m_bTFTPSubdirs;
server.m_WRQMode=m_WRQMode;
server.m_PromptTimeOut=m_PromptTimeOut;
server.m_LogFile=m_LogFile;
network.m_ListenPort=m_ListenPort;
network.m_SpeakPort=m_SpeakPort;
network.m_TimeOut=m_TFTPTimeOut.GetTotalSeconds();
network.m_BlockSize=m_BlockSize;
sounds.m_Request = m_bnwRequest;
sounds.m_Success = m_bnwSuccess;
sounds.m_Abort = m_bnwAbort;
acl.m_rulist = m_aclRules;
cps.AddPage(&server);
cps.AddPage(&network);
cps.AddPage(&sounds);
cps.AddPage(&acl);
if(cps.DoModal()==IDOK){
m_RRQMode=server.m_RRQMode;
m_TFTPRoot=server.m_TFTPRoot;
m_bTFTPSubdirs=server.m_TFTPSubdirs;
m_WRQMode=server.m_WRQMode;
m_PromptTimeOut=server.m_PromptTimeOut;
m_LogFile=server.m_LogFile;
m_ListenPort=network.m_ListenPort;
m_SpeakPort=network.m_SpeakPort;
m_TFTPTimeOut=CTimeSpan(network.m_TimeOut);
m_BlockSize=network.m_BlockSize;
m_bnwRequest = sounds.m_Request;
m_bnwSuccess = sounds.m_Success;
m_bnwAbort = sounds.m_Abort;
m_aclRules = acl.m_rulist;
m_lastlogerr.Empty();
}
}
BOOL CRRQSocket::ConfirmRequest()
{
CConfirmRRQDlg cd(NULL);
cd.m_Daddy=this;
cd.m_File=m_FileName;
cd.m_Host=inet_ntoa(m_Peer.sin_addr);
if(cd.DoModal()==IDOK)
return TRUE;
return FALSE;
}
CWRQSocket::CWRQSocket(CPumpKINDlg* daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin)
: CXferSocket(daddy,fileName,type,sin)
{
state=stateNone;
m_ACK=0;
m_LastSlack=0;
m_bResume=FALSE;
}
BOOL CWRQSocket::Create(LPCTSTR localFile,LPCTSTR hostName)
{
if(!CAsyncSocket::Create(0,SOCK_DGRAM))
return FALSE;
ASSERT(m_Daddy);
ASSERT(m_Peer.sin_addr.s_addr!=INADDR_NONE || hostName);
m_Daddy->m_Xfers[m_hSocket]=this;
UpdateList();
CString lf;
if(!localFile) {
lf = m_FileName;
TurnSlashes(lf,TRUE);
}
CString fn = localFile?ApplyRootGently(localFile):ApplyRoot(lf);
if(!localFile){ // This is an incoming request..
if(CheckBadRelativeness(m_FileName)){
Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS);
return TRUE;
}
BOOL exists;
if(!_access((LPCTSTR)fn,0))
m_Rename=exists=TRUE;
else
m_Rename=exists=FALSE;
int atar=m_Daddy->m_aclRules.FindTarget(acl_rule::opWRQ,m_Peer.sin_addr.s_addr);
if(atar<0)
atar=m_Daddy->m_WRQMode;
switch(atar){
case CPumpKINDlg::wrqTakeAll:
if(exists){
if(!RenameFile(fn)){
Deny(tftp::errDiskFull,IDS_TFTP_ERROR_FAILEDTORENAME);
return TRUE;
}
}
break;
case CPumpKINDlg::wrqConfirmIfExists:
if(!exists)
break;
case CPumpKINDlg::wrqAlwaysConfirm:
if(exists)
m_bResume=TRUE;
if(ConfirmRequest()){
if(m_Rename){
RenameFile(fn);
if(SaveAs(fn))
break;
}else
break;
}
default:
TRACE1("Unexpected access target: %d\n",atar);
case CPumpKINDlg::wrqDenyAll:
Deny(tftp::errAccessViolation,IDS_TFTP_ERROR_ACCESS);
return TRUE;
}
}
CFileException e;
if(!m_File.Open(
fn,
m_bResume
?(CFile::modeWrite|CFile::shareDenyWrite)
:(CFile::modeCreate|CFile::modeWrite|CFile::shareDenyWrite),
&e
)){
if(localFile){ // Outgoing request
CString tmp;
tmp.Format(IDS_LOG_FAILEDTOOPEN,fn);
m_Daddy->LogLine(tmp);
return FALSE;
}else{
Deny(&e);
return TRUE;
}
}
if(hostName){
m_HostName=hostName;
CString tmp;
tmp.Format(IDS_LOG_REQUESTING,m_FileName,m_HostName);
m_Daddy->LogLine(tmp);
CString inAddr = hostName;
int at = inAddr.Find('@');
if(at>=0)
inAddr=inAddr.Mid(at+1);
if((m_Peer.sin_addr.s_addr=inet_addr((LPCTSTR)inAddr))==INADDR_NONE){
ASSERT(!m_wndResolver);
m_wndResolver = new CResolver(this);
ASSERT(m_wndResolver);
return m_wndResolver->Resolve();
}else{
OnHostKnown();
return TRUE;
}
}
CString v;
tftp::tftpOptions oack;
if(m_Options.Lookup(tftpoTSize,v)){
m_xferSize=atol(v);
if(!m_xferSize){
Deny(tftp::errOption,IDS_TFTP_ERROR_TSIZE);
return TRUE;
}
}
if(m_Options.Lookup(tftpoBSize,v)){
m_blkSize=atoi(v);
if(!m_blkSize){ // *** Do more about sanity check
Deny(tftp::errOption,IDS_TFTP_ERROR_BSIZE);
return TRUE;
}
v.Format("%u",m_blkSize);
oack[tftpoBSize]=v;
}
if(m_Options.Lookup(tftpoTOut,v)){
m_timeOut=atoi(v);
if(!m_timeOut){ // *** Do more about sanity check
Deny(tftp::errOption,IDS_TFTP_ERROR_TOUT);
return TRUE;
}
v.Format("%u",m_timeOut);
oack[tftpoTOut]=v;
}
if(m_Options.Lookup(tftpoXResume,v) && m_bResume){
m_ACK=m_File.GetLength()/m_blkSize;
v.Format("%u",m_ACK);
oack[tftpoXResume]=v;
}else
m_ACK=0;
state=stateXfer;
if(oack.GetCount()){
tftp *p = tftp::Allocate(tftp::tftpOACK::tftpSize(&oack));
ASSERT(p);
p->SetOpcode(tftp::opOACK);
p->data.m_OACK.Set(&oack);
PostTFTP(p,TRUE);
}else
DoXfer();
return TRUE;
}
BOOL CWRQSocket::ConfirmRequest()
{
CConfirmWRQDlg cd(NULL);
cd.m_Daddy=this;
cd.m_File=m_FileName;
cd.m_Host=inet_ntoa(m_Peer.sin_addr);
switch(cd.DoModal()){
case IDOK:
m_Rename=FALSE;
m_bResume=FALSE;
return TRUE;
case IDC_RENAME:
m_bResume=FALSE;
m_Rename=TRUE;
return TRUE;
case IDC_RESUME:
m_Rename=FALSE;
m_bResume=TRUE;
return TRUE;
case IDCANCEL:
return FALSE;
}
return FALSE;
}
BOOL CWRQSocket::RenameFile(CString& fn)
{
CString renamed = fn;
if(fn.IsEmpty())
return FALSE;
if(fn[fn.GetLength()-1]==')'){
int op = fn.ReverseFind('(');
if(op>0 && fn[op-1]==' '){
if(fn.Mid(op+1,fn.GetLength()-op-2).SpanExcluding("0123456789").IsEmpty())
renamed = renamed.Left(op-1);
}
}
CString testFN;
for(UINT tmp=0;tmp<32768;tmp++){
testFN.Format("%s (%u)",(LPCTSTR)renamed,tmp);
if(!_access((LPCTSTR)testFN,0))
continue;
fn=testFN;
return TRUE;
}
return FALSE;
}
BOOL CWRQSocket::SaveAs(CString& fn)
{
CFileDialog cfd(FALSE,NULL,fn,OFN_EXPLORER|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,NULL,m_Daddy);
CString title;
title.LoadString(IDS_RENAME_TITLE);
cfd.m_ofn.lpstrTitle=(LPCTSTR)title;
if(cfd.DoModal()!=IDOK)
return FALSE;
fn = cfd.GetPathName();
return TRUE;
}
void CWRQSocket::DoXfer()
{
tftp *p = tftp::Allocate(tftp::tftpACK::tftpSize());
ASSERT(p);
p->SetOpcode(tftp::opACK);
p->data.m_ACK.SetBlock(m_ACK);
TRACE1("WRQ-ACK-%u\n",m_ACK);
PostTFTP(p,TRUE); // *** ??? Hope this is right
}
UINT tftp::tftpACK::tftpSize()
{
return tftpHdrSize-tftpSlackSize+sizeof(tftp::tftpACK);
}
ULONG CWRQSocket::GetACK()
{
return (m_ACK*m_blkSize)-m_LastSlack;
}
void CXferSocket::ResetTimeout()
{
ASSERT(m_Daddy);
m_Daddy->m_Retrier->KillTimer(m_hSocket);
if(m_Retry)
m_Daddy->m_Retrier->SetTimer(m_hSocket,min(60,m_Daddy->m_RetryTimeOut.GetTotalSeconds())*1000,NULL);
if(!m_bRetry){
m_Daddy->KillTimer(m_hSocket);
m_Daddy->SetTimer(m_hSocket,min(60,m_timeOut)*1000,NULL);
}
}
void CXferSocket::Abort()
{
ASSERT(m_Daddy);
CString tmp;
tmp.Format(IDS_LOG_XFERABORTED,(LPCTSTR)m_FileName);
m_Daddy->LogLine(tmp);
Destroy(FALSE);
}
void CPumpKINDlg::OnTimer(UINT nIDEvent)
{
CXferSocket *socket;
if(m_Xfers.Lookup(nIDEvent,socket)){
CString tmp;
tmp.Format(IDS_LOG_TIMEDOUT,socket->m_FileName);
LogLine(tmp);
socket->Abort();
}else{
TRACE0("Failed to find timed out socket!\n");
}
CDialog::OnTimer(nIDEvent);
}
void CPumpKINDlg::OnExit()
{
if(!m_Xfers.IsEmpty()){
CString title,text;
title.LoadString(IDS_CONFIRMEXIT_TITLE);
text.LoadString(IDS_CONFIRMEXIT_TEXT);
if(MessageBox(text,title,MB_ICONQUESTION|MB_YESNO)!=IDYES)
return;
}
m_bExiting=TRUE;
EndDialog(IDOK);
}
void CPumpKINDlg::OnPut()
{
CRequestDlg crd(NULL);
crd.m_Put=TRUE;
crd.m_BSize=m_BlockSize;
if(crd.DoModal()==IDOK){
CRRQSocket *socket = new CRRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL);
if(crd.m_BSize)
socket->m__blkSize=crd.m_BSize;
if(!socket->Create(crd.m_LocalFile,crd.m_Host))
socket->Destroy();
}
}
void CPumpKINDlg::OnGet()
{
CRequestDlg crd(NULL);
crd.m_Put=FALSE;
crd.m_BSize=m_BlockSize;
if(crd.DoModal()==IDOK){
CWRQSocket *socket = new CWRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL);
if(crd.m_BSize)
socket->m__blkSize=crd.m_BSize;
if(!socket->Create(crd.m_LocalFile,crd.m_Host))
socket->Destroy();
}
}
void CPumpKINDlg::SetupButtons()
{
m_AbortCtl.EnableWindow(m_List.GetSelectedCount()>0);
}
void CPumpKINDlg::OnDeleteallitemsConnections(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
SetupButtons();
*pResult = 0;
}
void CPumpKINDlg::OnDeleteitemConnections(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
SetupButtons();
*pResult = 0;
}
void CPumpKINDlg::OnInsertitemConnections(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
SetupButtons();
*pResult = 0;
}
void CPumpKINDlg::OnItemchangedConnections(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)pNMHDR;
SetupButtons();
*pResult = 0;
}
void CPumpKINDlg::OnAbort()
{
if(!m_List.GetSelectedCount())
return;
int items = m_List.GetItemCount();
for(int tmp=0;tmp<items;tmp++){
if(!(m_List.GetItemState(tmp,LVIS_SELECTED)&LVIS_SELECTED))
continue;
CXferSocket *xfer = (CXferSocket*) m_List.GetItemData(tmp);
ASSERT(xfer);
xfer->Abort();
}
}
void CXferSocket::OnFailedToResolve()
{
TRACE0("Resolve failed\n");
delete m_wndResolver;
m_wndResolver=NULL;
ASSERT(m_Daddy);
CString tmp;
tmp.Format(IDS_LOG_RESOLVEFAILED,m_HostName);
m_Daddy->LogLine(tmp);
Abort();
}
void CXferSocket::OnResolved()
{
delete m_wndResolver;
m_wndResolver=NULL;
TRACE0("Resolved\n");
m_Peer.sin_addr.s_addr = *(DWORD*)(((hostent*)m_ResolveBuff)->h_addr);
}
void CRRQSocket::OnResolved()
{
CXferSocket::OnResolved();
OnHostKnown();
}
void CRRQSocket::OnHostKnown()
{
ASSERT(m_Daddy);
m_Peer.sin_port=htons(m_Daddy->m_SpeakPort);
tftp::tftpOptions o;
CString v;
ASSERT(m_xferSize>=0);
v.Format("%lu",m_xferSize);
o[tftpoTSize] = v;
ASSERT(m__blkSize);
v.Format("%u",m__blkSize);
o[tftpoBSize] = v;
ASSERT(m__timeOut);
v.Format("%u",m__timeOut);
o[tftpoTOut] = v;
o[tftpoXResume] = "0";
tftp *p = tftp::Allocate(tftp::tftpWRQ::tftpSize(m_FileName,m_Type,&o));
ASSERT(p);
p->SetOpcode(tftp::opWRQ);
p->data.m_WRQ.Set(m_FileName,m_Type,&o);
PostTFTP(p,TRUE);
state=stateInit;
UpdateList();
}
UINT tftp::tftpRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
{
UINT rv = tftpHdrSize-tftpSlackSize+strlen(file)+1+strlen(type)+1;
if(ops){
tftpOptions& o = *ops;
POSITION p = o.GetStartPosition();
while(p){
CString n,v;
o.GetNextAssoc(p,n,v);
rv+=n.GetLength()+1+v.GetLength()+1;
}
}
return rv;
}
UINT tftp::tftpRRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
{
return tftp::tftpRQ::tftpSize(file,type,ops);
}
UINT tftp::tftpWRQ::tftpSize(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
{
return tftp::tftpRQ::tftpSize(file,type,ops);
}
UINT tftp::tftpOACK::tftpSize(tftp::tftpOptions* ops)
{
UINT rv = tftpHdrSize-tftpSlackSize;
if(ops){
tftpOptions& o = *ops;
POSITION p = o.GetStartPosition();
while(p){
CString n,v;
o.GetNextAssoc(p,n,v);
rv+=n.GetLength()+1+v.GetLength()+1;
}
}
return rv;
}
void tftp::tftpRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
{
// MAY BE DANGEROUS!
UINT ptr = 0;
strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1;
strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1;
if(ops){
tftpOptions& o = *ops;
POSITION p = o.GetStartPosition();
while(p){
CString n,v;
o.GetNextAssoc(p,n,v);
strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1;
strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1;
}
}
}
void tftp::tftpRRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
{
// MAY BE DANGEROUS!
UINT ptr = 0;
strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1;
strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1;
if(ops){
tftpOptions& o = *ops;
POSITION p = o.GetStartPosition();
while(p){
CString n,v;
o.GetNextAssoc(p,n,v);
strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1;
strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1;
}
}
}
void tftp::tftpWRQ::Set(LPCTSTR file,LPCTSTR type,tftp::tftpOptions* ops)
{
// MAY BE DANGEROUS!
UINT ptr = 0;
strcpy((LPTSTR)&data[ptr],file); ptr+=strlen(file)+1;
strcpy((LPTSTR)&data[ptr],type); ptr+=strlen(type)+1;
if(ops){
tftpOptions& o = *ops;
POSITION p = o.GetStartPosition();
while(p){
CString n,v;
o.GetNextAssoc(p,n,v);
strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1;
strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1;
}
}
}
void tftp::tftpOACK::Set(tftpOptions* ops)
{
ASSERT(ops);
UINT ptr = 0;
tftpOptions& o = *ops;
POSITION p = o.GetStartPosition();
while(p){
CString n,v;
o.GetNextAssoc(p,n,v);
strcpy((LPTSTR)&data[ptr],(LPCTSTR)n); ptr+=n.GetLength()+1;
strcpy((LPTSTR)&data[ptr],(LPCTSTR)v); ptr+=v.GetLength()+1;
}
}
void CWRQSocket::OnResolved()
{
CXferSocket::OnResolved();
OnHostKnown();
}
void CWRQSocket::OnHostKnown()
{
ASSERT(m_Daddy);
m_Peer.sin_port=htons(m_Daddy->m_SpeakPort);
tftp::tftpOptions o;
CString v;
o[tftpoTSize]="0";
if(m__blkSize){
v.Format("%u",m__blkSize);
o[tftpoBSize]=v;
}
if(m__timeOut){
v.Format("%u",m__timeOut);
o[tftpoTOut]=v;
}
tftp *p = tftp::Allocate(tftp::tftpRRQ::tftpSize(m_FileName,m_Type,&o));
ASSERT(p);
p->SetOpcode(tftp::opRRQ);
p->data.m_RRQ.Set(m_FileName,m_Type,&o);
PostTFTP(p,TRUE);
state=stateInit;
UpdateList();
}
void CPumpKINDlg::OnClose()
{
OnTrayShowpumpkinwindow();
}
void CPumpKINDlg::OnTrayShowpumpkinwindow()
{
if(IsWindowVisible()){
m_bShown=FALSE;
ShowWindow(SW_HIDE);
}else{
m_bShown=TRUE;
ShowWindow(SW_SHOW);
SetForegroundWindow();
SetFocus();
}
}
void CPumpKINDlg::OnTrayExit()
{
OnExit();
}
void CPumpKINDlg::OnTrayAboutpumpkin()
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
void CPumpKINDlg::OnTrayFetchfile()
{
OnGet();
}
void CPumpKINDlg::OnTrayHelp()
{
OnHelp();
}
void CPumpKINDlg::OnTrayOptions()
{
OnOptions();
}
void CPumpKINDlg::OnTraySendfile()
{
OnPut();
}
void CPumpKINDlg::LoadSettings()
{
CWinApp *app = AfxGetApp();
ASSERT(app);
m_bListen=app->GetProfileInt("TFTPSettings","Listen",m_bListen);
m_bnwRequest=app->GetProfileString("BellsNWhistles","Request",m_bnwRequest);
m_bnwSuccess=app->GetProfileString("BellsNWhistles","Success",m_bnwSuccess);
m_bnwAbort=app->GetProfileString("BellsNWhistles","Abort",m_bnwAbort);
m_bTFTPSubdirs=app->GetProfileInt("TFTPSettings","Subdirs",m_bTFTPSubdirs);
m_ListenPort=app->GetProfileInt("TFTPSettings","ListenPort",m_ListenPort);
m_LogLength=app->GetProfileInt("UISettings","LogLength",m_LogLength);
m_PromptTimeOut=app->GetProfileInt("UISettings","PromptTimeout",m_PromptTimeOut);
m_RRQMode=app->GetProfileInt("TFTPSettings","RRQMode",m_RRQMode);
m_SpeakPort=app->GetProfileInt("TFTPSettings","SpeakPort",m_SpeakPort);
m_TFTPRoot=app->GetProfileString("TFTPSettings","TFTPRoot",m_TFTPRoot);
m_LogFile=app->GetProfileString("General","LogFile",m_LogFile);
m_TFTPTimeOut=CTimeSpan(app->GetProfileInt("TFTPSettings","TFTPTimeout",m_TFTPTimeOut.GetTotalSeconds()));
m_BlockSize=app->GetProfileInt("TFTPSettings","TFTPBlockSize",m_BlockSize);
m_RetryTimeOut=CTimeSpan(app->GetProfileInt("TFTPSettings","RetryTimeout",m_RetryTimeOut.GetTotalSeconds()));
m_WRQMode=app->GetProfileInt("TFTPSettings","WRQMode",m_WRQMode);
m_bShown=app->GetProfileInt("UISettings","Visble",m_bShown);
if(m_TFTPRoot.IsEmpty()){
DWORD dL = ::GetCurrentDirectory(0,NULL);
VERIFY(::GetCurrentDirectory(dL,m_TFTPRoot.GetBuffer(dL)));
m_TFTPRoot.ReleaseBuffer();
}
::SetCurrentDirectory(m_TFTPRoot);
m_aclRules.LoadProfile(app);
}
void CPumpKINDlg::SaveSettings()
{
CWinApp *app = AfxGetApp();
ASSERT(app);
app->WriteProfileInt("TFTPSettings","Listen",m_bListen);
app->WriteProfileString("BellsNWhistles","Request",m_bnwRequest);
app->WriteProfileString("BellsNWhistles","Success",m_bnwSuccess);
app->WriteProfileString("BellsNWhistles","Abort",m_bnwAbort);
app->WriteProfileInt("TFTPSettings","Subdirs",m_bTFTPSubdirs);
app->WriteProfileInt("TFTPSettings","ListenPort",m_ListenPort);
app->WriteProfileInt("UISettings","LogLength",m_LogLength);
app->WriteProfileInt("UISettings","PromptTimeout",m_PromptTimeOut);
app->WriteProfileInt("TFTPSettings","RRQMode",m_RRQMode);
app->WriteProfileInt("TFTPSettings","SpeakPort",m_SpeakPort);
app->WriteProfileString("TFTPSettings","TFTPRoot",m_TFTPRoot);
app->WriteProfileString("General","LogFile",m_LogFile);
app->WriteProfileInt("TFTPSettings","TFTPTimeout",m_TFTPTimeOut.GetTotalSeconds());
app->WriteProfileInt("TFTPSettings","TFTPBlockSize",m_BlockSize);
app->WriteProfileInt("TFTPSettings","RetryTimeout",m_RetryTimeOut.GetTotalSeconds());
app->WriteProfileInt("TFTPSettings","WRQMode",m_WRQMode);
app->WriteProfileInt("UISettings","Visble",m_bShown);
m_aclRules.SaveProfile(app);
}
void CPumpKINDlg::OnWindowPosChanging(WINDOWPOS FAR* lpwndpos)
{
CDialog::OnWindowPosChanging(lpwndpos);
if(!m_bExiting){
if(m_bShown){
lpwndpos->flags&=~SWP_HIDEWINDOW;
lpwndpos->flags|=SWP_SHOWWINDOW;
}else{
lpwndpos->flags&=~SWP_SHOWWINDOW;
lpwndpos->flags|=SWP_HIDEWINDOW;
if(::GetForegroundWindow()==m_hWnd && (m_Trayer && !m_Trayer->m_inMenu))
GetDesktopWindow()->SetForegroundWindow();
}
}
}
CString CXferSocket::ApplyRootGently(LPCTSTR fn)
{
CString f = fn;
CString rv = f;
if((!f.IsEmpty()) && f[0]!='\\' && f.Find(":")<0 && f.Find("\\")<0)
rv = ApplyRoot(f);
return rv;
}
BOOL CXferSocket::CheckBadRelativeness(LPCTSTR file)
{
CString tmp = file;
if(tmp.IsEmpty())
return FALSE;
if(tmp.Find("..")>=0)
return TRUE;
if(tmp.Find(":")>=0)
return TRUE;
if((!m_Daddy->m_bTFTPSubdirs) && m_FileName.Find('\\')>=0)
return TRUE;
return FALSE;
}
void CAboutDlg::OnKlevernet()
{
CString url;
url.LoadString(IDS_KLEVERNET_URL);
ShellExecute(::GetDesktopWindow(),"open",url,NULL,NULL,SW_SHOWMAXIMIZED);
}
BOOL CPumpKINDlg::PreTranslateMessage(MSG* pMsg)
{
// CG: The following block was added by the ToolTips component.
{
// Let the ToolTip process this message.
m_tooltip.RelayEvent(pMsg);
return CDialog::PreTranslateMessage(pMsg);
}
}
void CPumpKINDlg::OnSelchangeLog()
{
int sel = m_Log.GetCurSel();
if(sel==LB_ERR){
TRACE0("Error retrieving selection\n");
}else{
CTime *t = (CTime*)m_Log.GetItemData(sel);
ASSERT(t);
m_tooltip.UpdateTipText(t->Format(IDS_LOGTIMEFORMAT),&m_Log);
}
}
void CPumpKINDlg::OnTrayOpenfilesfolder()
{
ShellExecute(::GetDesktopWindow(),NULL,m_TFTPRoot,NULL,NULL,SW_SHOWDEFAULT);
}
void CPumpKINDlg::OnDropFiles(HDROP hDropInfo)
{
UINT files = ::DragQueryFile(hDropInfo,0xFFFFFFFF,NULL,0);
ASSERT(files);
for(UINT file=0;file<files;file++){
CString theFile;
UINT fileNameLength = ::DragQueryFile(hDropInfo,file,NULL,0);
ASSERT(fileNameLength);
VERIFY(::DragQueryFile(hDropInfo,file,theFile.GetBuffer(fileNameLength+5),fileNameLength+4)<=fileNameLength);
theFile.ReleaseBuffer();
// Send it over!
CRequestDlg crd(NULL);
crd.m_Drop=TRUE;
crd.m_Put=TRUE;
crd.m_BSize=m_BlockSize;
crd.m_LocalFile=theFile;
if(crd.DoModal()==IDOK){
CRRQSocket *socket = new CRRQSocket(this,crd.m_RemoteFile,crd.m_Type,NULL);
if(crd.m_BSize)
socket->m__blkSize=crd.m_BSize;
if(!socket->Create(crd.m_LocalFile,crd.m_Host))
socket->Destroy();
}
}
::DragFinish(hDropInfo);
}
void CPumpKINDlg::OnCancel()
{
OnClose();
}
CPumpKINDlg::~CPumpKINDlg()
{
delete m_Trayer;
delete m_Retrier;
}
void CXferSocket::OnRetry()
{
if(!m_Retry){
TRACE("Retrying unretriable..\n");
return;
}
TRACE0("Retrying..\n");
m_bRetry=TRUE;
PostTFTP(tftp::Copy(m_Retry));
m_bRetry=FALSE;
}
tftp* tftp::Copy(tftp *src)
{
ASSERT(src);
ASSERT(src->length);
tftp* rv = Allocate(src->length);
ASSERT(rv);
memmove(rv,src,tftpSlackSize+src->length);
return rv;
}
void CXferSocket::SetTry(tftp *p)
{
if(m_Retry)
delete m_Retry;
m_Retry=p?tftp::Copy(p):NULL;
}
void CPumpKINDlg::OnHelp()
{
AfxGetApp()->WinHelp(0,HELP_FINDER);
}
BOOL CListenSocket::SetListen(BOOL b) {
ASSERT(m_Daddy);
if(b==m_bListen)
return TRUE;
if(b) {
if(!Create(m_Daddy->m_ListenPort,SOCK_DGRAM))
return FALSE;
return m_bListen=TRUE;
}else{
Close(); m_bListen=FALSE;
return TRUE;
}
}
void CPumpKINDlg::OnListening()
{
if(!m_Listener.SetListen(m_ListenCtl.GetCheck()==1)) {
TRACE0("Failed to create socket\n");
AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION);
}
m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0);
m_bListen=m_Listener.m_bListen;
}
void CPumpKINDlg::OnTrayListen()
{
if(!m_Listener.SetListen(!m_Listener.m_bListen)) {
TRACE0("Failed to create socket\n");
AfxMessageBox(IDS_BOX_CANTBIND,MB_OK|MB_ICONEXCLAMATION);
}
m_ListenCtl.SetCheck(m_Listener.m_bListen?1:0);
m_bListen=m_Listener.m_bListen;
}
void CPumpKINDlg::LogLine(LPCTSTR str)
{
LogLineToScreen(str);
if(!m_LogFile.IsEmpty()) {
if(!Klever::LogRecord((LPCTSTR)m_LogFile,str)) {
if(m_lastlogerr!=m_LogFile) {
CString tmp;
tmp.Format(IDS_LOG_LOGERROR,m_LogFile);
LogLineToScreen(tmp);
m_lastlogerr=m_LogFile;
}
}
}
}
void CPumpKINDlg::OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI)
{
CDialog::OnGetMinMaxInfo(lpMMI);
if(m_MinSize.cx>0 && m_MinSize.cy>0){
lpMMI->ptMinTrackSize.x = m_MinSize.cx;
lpMMI->ptMinTrackSize.y = m_MinSize.cy;
}
}
void CPumpKINDlg::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
if(nType==SIZE_RESTORED)
RecalcLayout(cx,cy);
}
void CPumpKINDlg::RecalcLayout(int,int)
{
CRect wrc;
GetClientRect(&wrc);
AdjustButton(m_GetCtl,wrc);
AdjustButton(m_PutCtl,wrc);
AdjustButton(m_AbortCtl,wrc);
AdjustButton(m_HelpCtl,wrc);
AdjustButton(m_ExitCtl,wrc);
AdjustButton(m_OptionsCtl,wrc);
CRect brc;
m_List.GetWindowRect(&brc); ScreenToClient(&brc);
m_List.SetWindowPos(
0,
brc.left, brc.top,
wrc.right-m_rightGapList-brc.left, brc.bottom-brc.top,
SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER|SWP_NOCOPYBITS );
m_Log.GetWindowRect(&brc); ScreenToClient(&brc);
m_Log.SetWindowPos(
0,
brc.left, brc.top,
wrc.right-m_rightGapButtons-brc.left, wrc.bottom-m_bottomGapLog-brc.top,
SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOZORDER|SWP_NOCOPYBITS );
m_ListenCtl.GetWindowRect(&brc); ScreenToClient(&brc);
m_ListenCtl.SetWindowPos(
0,
wrc.right-brc.Width()-m_rightGapButtons, wrc.bottom-brc.Height()-m_bottomGapListen,
0,0,
SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS );
int i = m_Log.GetCount();
if(i!=LB_ERR)
m_Log.SetCurSel(i-1);
}
void CPumpKINDlg::AdjustButton(CWnd& w,CRect& wrc)
{
CRect brc;
w.GetWindowRect(&brc); ScreenToClient(&brc);
w.SetWindowPos(
0,
wrc.right-brc.Width()-m_rightGapButtons, brc.top,
0, 0,
SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER|SWP_NOCOPYBITS );
}
diff --git a/PumpKINDlg.h b/PumpKINDlg.h
index c5469f1..23c2657 100644
--- a/PumpKINDlg.h
+++ b/PumpKINDlg.h
@@ -1,500 +1,501 @@
// PumpKINDlg.h : header file
//
//#define REVERSEBYTES(w) MAKEWORD(HIBYTE(w),LOBYTE(w));
#define REVERSEBYTES(w) (htons((WORD)w))
#define tftpoBSize "blksize"
#define tftpoTSize "tsize"
#define tftpoTOut "timeout"
#define tftpoXResume "x-resume"
struct tftp {
typedef CMapStringToString tftpOptions;
typedef WORD tftpLength;
typedef WORD tftpOpcode;
tftpLength length;
tftpOpcode opcode;
enum {
opRRQ = 1,
opWRQ = 2,
opDATA = 3,
opACK = 4,
opERROR = 5,
opOACK = 6,
errUndefined = 0,
errNotFound = 1,
errAccessViolation = 2,
errDiskFull = 3,
errIllegalOp = 4,
errUnknownTID = 5,
errFileExists = 6,
errNoUser = 7,
errOption = 8
};
struct tftpUNKNOWN {
BYTE data[1];
};
struct tftpRQ {
BYTE data[1];
public:
void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
};
struct tftpRRQ {
BYTE data[1];
public:
void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
};
struct tftpWRQ {
BYTE data[1];
public:
void Set(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
static UINT tftpSize(LPCTSTR file,LPCTSTR type,tftpOptions* ops=NULL);
};
struct tftpDATA {
WORD block;
BYTE data[1];
public:
WORD Block();
void SetBlock(WORD b);
static UINT tftpSize(UINT blkSize=512);
};
struct tftpACK {
WORD block;
public:
static UINT tftpSize();
void SetBlock(WORD b);
WORD Block();
};
struct tftpERROR {
typedef WORD tftpErrorCode;
tftpErrorCode code;
BYTE data[1];
public:
void SetCode(WORD c);
WORD Code();
static UINT tftpSize(LPCTSTR msg);
};
struct tftpOACK {
BYTE data[1];
public:
void Set(tftpOptions* ops);
static UINT tftpSize(tftpOptions* ops);
};
union tftpPacket {
tftpUNKNOWN m_UNKNOWN;
tftpRQ m_RQ;
tftpRRQ m_RRQ;
tftpWRQ m_WRQ;
tftpDATA m_DATA;
tftpACK m_ACK;
tftpERROR m_ERROR;
tftpOACK m_OACK;
} data;
void *udpBase(void) { return &opcode; }
public:
static tftp* Copy(tftp *src);
CString errMessage();
void SetOpcode(WORD op);
void errSet(UINT code,LPCTSTR msg);
static tftp* Allocate(UINT tftpSize=0);
BOOL Send(CAsyncSocket *socket,SOCKADDR_IN* saddr);
CString rqType();
CString rqFileName();
UINT GetOptions(tftpOptions* ops);
tftp();
UINT Opcode();
BOOL Receive(CAsyncSocket* socket,UINT maxLength,SOCKADDR_IN *sin=NULL);
};
#define tftpHdrSize (sizeof(tftp)-sizeof(tftp::tftpPacket))
#define tftpSlackSize sizeof(tftp::tftpLength)
struct acl_rule {
enum {
opRRQ=tftp::opRRQ, opWRQ=tftp::opWRQ
};
int op;
DWORD addr, mask;
enum {
rrqGrant=0, rrqPrompt, rrqDeny,
rrqRules,
rrqNone=-1
};
enum {
wrqGrant=0, wrqPromptIfExists, wrqPrompt, wrqDeny,
wrqRules,
wrqNone=-1
};
int target;
acl_rule()
: op(-1), addr(0), mask(0), target(-1) { }
acl_rule(int o,DWORD a,DWORD m,int t)
: op(o), addr(a), mask(m), target(t) { }
acl_rule(const acl_rule& s)
: op(s.op), addr(s.addr), mask(s.mask), target(s.target) { }
BOOL IsValid() {
if(op==opRRQ) {
if(target<rrqNone || target>=rrqRules)
return FALSE;
}else if(op==opWRQ) {
if(target<wrqNone || target>=wrqRules)
return FALSE;
}else
return FALSE;
return TRUE;
}
BOOL IsMatch(int o,DWORD a) {
if(o!=op) return FALSE;
if( (a&mask) != (addr&mask)) return FALSE;
return TRUE;
}
CString str_addr() {
return inet_ntoa(*(struct in_addr*)&addr);
}
CString str_mask() {
return inet_ntoa(*(struct in_addr*)&mask);
}
CString str_target() {
if(op==opRRQ) {
switch(target) {
case rrqNone: return "fallback";
case rrqGrant: return "grant";
case rrqPrompt: return "prompt";
case rrqDeny: return "deny";
default: return "?";
}
}else if(op==opWRQ) {
switch(target) {
case wrqNone: return "fallback";
case wrqGrant: return "grant";
case wrqPromptIfExists: return "prompt if exists";
case wrqPrompt: return "prompt";
case wrqDeny: return "deny";
default: return "?";
}
}else
return "?";
}
void SaveProfile(CWinApp* app,int i) {
CString n; n.Format("%d",i);
app->WriteProfileInt("ACL","op_"+n,op);
app->WriteProfileString("ACL","addr_"+n,str_addr());
app->WriteProfileString("ACL","mask_"+n,str_mask());
app->WriteProfileInt("ACL","target_"+n,target);
}
void LoadProfile(CWinApp* app,int i) {
CString n; n.Format("%d",i);
op=app->GetProfileInt("ACL","op_"+n,-1);
addr=inet_addr(app->GetProfileString("ACL","addr_"+n));
mask=inet_addr(app->GetProfileString("ACL","mask_"+n));
target=app->GetProfileInt("ACL","target_"+n,-1);
}
};
class acl_rules_t : public CArray<acl_rule,acl_rule&> {
public:
acl_rules_t& operator=(const acl_rules_t& s) {
// Copy(s); XXX: unsuprisingly, there's a bug in MFC Copy, *pDst++=*pSrc (no ++ for Src)
RemoveAll();
int ns = s.GetSize();
SetSize(ns);
for(int i=0;i<ns;++i)
m_pData[i]=s.m_pData[i];
return *this;
}
int AppendRule(acl_rule& r) {
return Add(r);
}
void DeleteRule(int r) {
RemoveAt(r);
}
int FindRule(int op,DWORD ip) {
for(int i=0;i<GetSize();++i)
if(m_pData[i].IsMatch(op,ip))
return i;
return -1;
}
int FindTarget(int op,DWORD ip) {
int r=FindRule(op,ip);
if(r<0) return -1;
return m_pData[r].target;
}
void SaveProfile(CWinApp* app) {
int s=GetSize();
for(int i=0;i<s;++i)
m_pData[i].SaveProfile(app,i);
app->WriteProfileInt("ACL","rules",s);
}
void LoadProfile(CWinApp* app) {
RemoveAll();
int s=app->GetProfileInt("ACL","rules",0);
for(int i=0;i<s;++i) {
acl_rule r;
r.LoadProfile(app,i);
if(r.IsValid())
Add(r);
}
}
};
class CPumpKINDlg;
class CListenSocket : public CAsyncSocket {
public:
CPumpKINDlg* m_Daddy;
BOOL m_bListen;
CListenSocket()
: m_bListen(FALSE), m_Daddy(0) { }
BOOL SetListen(BOOL b);
virtual void OnReceive(int nErrorCode);
};
typedef CList<tftp*,tftp*> CTFTPList;
class CResolver;
class CXferSocket : public CAsyncSocket {
public:
UINT m__timeOut;
UINT m__blkSize;
tftp::tftpOptions m_Options;
LONG m_xferSize;
UINT m_timeOut;
UINT m_blkSize;
BOOL m_bRetry;
void SetTry(tftp *p=NULL);
tftp* m_Retry;
void OnRetry();
BOOL CheckBadRelativeness(LPCTSTR file);
CString ApplyRootGently(LPCTSTR fn);
CString m_HostName;
virtual void OnResolved();
virtual void OnFailedToResolve();
CResolver *m_wndResolver;
BYTE m_ResolveBuff[MAXGETHOSTSTRUCT];
virtual void Abort();
void ResetTimeout();
enum {
stateNone, stateDeny, stateInit, stateOACK, stateXfer, stateFinish, stateClosing
};
int state;
void Deny(UINT errCode,UINT errID);
void Deny(CFileException* e);
CString ApplyRoot(LPCTSTR fileName);
void TurnSlashes(CString& fn,BOOL bBack=TRUE);
virtual void Destroy(BOOL success=TRUE);
void PostError(CFileException* e);
void PostError(UINT errCode,UINT errID);
void PostTFTP(tftp* p,BOOL retryable=FALSE);
CXferSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN* sin);
CFile m_File;
virtual ULONG GetACK();
CString m_Type;
CString m_FileName;
CXferSocket();
void UpdateList();
void SetPeer(SOCKADDR_IN *sin);
virtual BOOL OnTFTP(tftp* p) = 0;
virtual void OnReceive(int nErrorCode);
- void DoSelect();
+ void DoSelect(BOOL do_select=FALSE);
SOCKADDR_IN m_Peer;
virtual void OnSend(int nErrorCode);
CPumpKINDlg* m_Daddy;
CTFTPList m_Queue;
DECLARE_DYNAMIC(CXferSocket)
};
class CWRQSocket : public CXferSocket {
public:
BOOL m_bResume;
void OnHostKnown();
virtual void OnResolved();
UINT m_LastSlack;
ULONG GetACK();
void DoXfer();
UINT m_ACK;
BOOL SaveAs(CString& fn);
BOOL RenameFile(CString& fn);
BOOL m_Rename;
BOOL ConfirmRequest();
BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL);
CWRQSocket(CPumpKINDlg* daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin);
BOOL OnTFTP(tftp* p);
DECLARE_DYNAMIC(CWRQSocket)
};
class CRRQSocket : public CXferSocket {
public:
+ UINT m_ACKtoClose;
void OnHostKnown();
virtual void OnResolved();
BOOL ConfirmRequest();
WORD m_LastSlack;
UINT m_ACK;
BOOL OnTFTP(tftp* p);
ULONG GetACK(void);
void DoXfer();
CRRQSocket(CPumpKINDlg *daddy,LPCTSTR fileName,LPCTSTR type,SOCKADDR_IN *sin);
BOOL Create(LPCTSTR localFile=NULL,LPCTSTR hostName=NULL);
DECLARE_DYNAMIC(CRRQSocket)
};
typedef CMap<SOCKET,SOCKET,CXferSocket*,CXferSocket*> CTIDMap;
typedef CMap<CTime*,CTime*,CTime*,CTime*> CTimeMap;
/////////////////////////////////////////////////////////////////////////////
// CPumpKINDlg dialog
class CTrayer;
class CRetrier;
class CPumpKINDlg : public CDialog
{
// Construction
public:
void AdjustButton(CWnd& w,CRect& wrc);
void RecalcLayout(int,int);
CSize m_MinSize;
UINT m_bottomGapLog;
UINT m_bottomGapListen;
UINT m_rightGapList;
UINT m_rightGapButtons;
CString m_lastlogerr;
void LogLine(LPCTSTR str);
CString m_LogFile;
BOOL m_bListen;
acl_rules_t m_aclRules;
CString m_bnwRequest;
CString m_bnwSuccess;
CString m_bnwAbort;
CBellsNWhistles m_bnw;
CTrayer *m_Trayer;
CTimeSpan m_RetryTimeOut;
virtual ~CPumpKINDlg();
CRetrier* m_Retrier;
virtual BOOL PreTranslateMessage(MSG* pMsg);
BOOL m_bShown;
BOOL m_bExiting;
void SaveSettings();
void LoadSettings();
void SetupButtons();
BITMAP m_bitmapBack;
CBitmap m_bmpBack;
UINT m_PromptTimeOut;
UINT m_SpeakPort;
void LogLine(UINT msgID);
CTimeMap m_LogTimes;
void LogLineToFile(LPCTSTR str);
void LogLineToScreen(LPCTSTR str);
int m_LogLength;
enum {
subitemFile=0, subitemType, subitemPeer, subitemBytes, subitemTSize
};
int m_iWRQ;
int m_iRRQ;
CImageList m_Images;
CTIDMap m_Xfers;
CTimeSpan m_TFTPTimeOut;
enum {
rrqGiveAll=acl_rule::rrqGrant,
rrqAlwaysConfirm=acl_rule::rrqPrompt,
rrqDenyAll=acl_rule::rrqDeny,
rrqFallback=acl_rule::rrqNone,
rrqGrant=rrqGiveAll, rrqDeny=rrqDenyAll, rrqPrompt=rrqAlwaysConfirm
};
enum {
wrqTakeAll=acl_rule::wrqGrant,
wrqConfirmIfExists=acl_rule::wrqPromptIfExists,
wrqAlwaysConfirm=acl_rule::wrqPrompt,
wrqDenyAll=acl_rule::wrqDeny,
wrqFallback=acl_rule::wrqNone,
wrqGrant=wrqTakeAll,wrqDeny=wrqDenyAll, wrqPrompt=wrqAlwaysConfirm
};
UINT m_RRQMode;
UINT m_WRQMode;
BOOL m_bTFTPSubdirs;
CString m_TFTPRoot;
UINT m_ListenPort;
UINT m_BlockSize;
CListenSocket m_Listener;
CPumpKINDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CPumpKINDlg)
enum { IDD = IDD_PUMPKIN_DIALOG };
CButton m_HelpCtl;
CButton m_PutCtl;
CButton m_GetCtl;
CButton m_ExitCtl;
CButton m_ListenCtl;
CButton m_AbortCtl;
CButton m_OptionsCtl;
CListBox m_Log;
CListCtrl m_List;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CPumpKINDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
CToolTipCtrl m_tooltip;
HICON m_hIcon;
// Generated message map functions
//{{AFX_MSG(CPumpKINDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnDestroy();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnOptions();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnExit();
afx_msg void OnPut();
afx_msg void OnGet();
afx_msg void OnDeleteallitemsConnections(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDeleteitemConnections(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnInsertitemConnections(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnItemchangedConnections(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnAbort();
afx_msg void OnClose();
afx_msg void OnTrayShowpumpkinwindow();
afx_msg void OnTrayListen();
afx_msg void OnTrayExit();
afx_msg void OnTrayAboutpumpkin();
afx_msg void OnTrayFetchfile();
afx_msg void OnTrayHelp();
afx_msg void OnTrayOptions();
afx_msg void OnTraySendfile();
afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
afx_msg void OnSelchangeLog();
afx_msg void OnTrayOpenfilesfolder();
afx_msg void OnDropFiles(HDROP hDropInfo);
virtual void OnCancel();
afx_msg void OnHelp();
afx_msg void OnListening();
afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
afx_msg void OnSize(UINT nType, int cx, int cy);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
diff --git a/pumpkin.mak b/pumpkin.mak
index a22a6fa..bf9e895 100644
--- a/pumpkin.mak
+++ b/pumpkin.mak
@@ -1,1685 +1,1583 @@
# Microsoft Developer Studio Generated NMAKE File, Format Version 4.20
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
!IF "$(CFG)" == ""
CFG=Install - Win32 Debug
!MESSAGE No configuration specified. Defaulting to Install - Win32 Debug.
!ENDIF
!IF "$(CFG)" != "PumpKIN - Win32 Release" && "$(CFG)" !=\
"PumpKIN - Win32 Debug" && "$(CFG)" != "PumpKIN - Win32 Static" && "$(CFG)" !=\
"Install - Win32 Debug" && "$(CFG)" != "Install - Win32 Pure" && "$(CFG)" !=\
"Install - Win32 Static" && "$(CFG)" != "Install - Win32 Canned"
!MESSAGE Invalid configuration "$(CFG)" specified.
!MESSAGE You can specify a configuration when running NMAKE on this makefile
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "pumpkin.mak" CFG="Install - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "PumpKIN - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "PumpKIN - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "PumpKIN - Win32 Static" (based on "Win32 (x86) Application")
!MESSAGE "Install - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE "Install - Win32 Pure" (based on "Win32 (x86) Application")
!MESSAGE "Install - Win32 Static" (based on "Win32 (x86) Application")
!MESSAGE "Install - Win32 Canned" (based on "Win32 (x86) Application")
!MESSAGE
!ERROR An invalid configuration is specified.
!ENDIF
!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF
################################################################################
# Begin Project
# PROP Target_Last_Scanned "PumpKIN - Win32 Debug"
CPP=cl.exe
RSC=rc.exe
MTL=mktyplib.exe
!IF "$(CFG)" == "PumpKIN - Win32 Release"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
OUTDIR=.\Release
INTDIR=.\Release
# Begin Custom Macros
OutDir=.\Release
TargetName=pumpkin
# End Custom Macros
ALL : "$(OUTDIR)\pumpkin.exe" "$(OUTDIR)\pumpkin.ex_" "$(OUTDIR)\pumpkin.hlp"\
"$(OUTDIR)\pumpkin.cnt" "$(OUTDIR)\pumpkin.hl_" "$(OUTDIR)\pumpkin.cn_"
CLEAN :
-@erase "$(INTDIR)\ACLTargetCombo.obj"
-@erase "$(INTDIR)\ConfirmRRQDlg.obj"
-@erase "$(INTDIR)\ConfirmWRQDlg.obj"
-@erase "$(INTDIR)\PropsACL.obj"
-@erase "$(INTDIR)\PropsNetwork.obj"
-@erase "$(INTDIR)\PropsServer.obj"
-@erase "$(INTDIR)\PropsSounds.obj"
-@erase "$(INTDIR)\pumpkin.cn_"
-@erase "$(INTDIR)\pumpkin.cnt"
-@erase "$(INTDIR)\pumpkin.hl_"
-@erase "$(INTDIR)\pumpkin.hlp"
-@erase "$(INTDIR)\PumpKIN.obj"
-@erase "$(INTDIR)\pumpkin.pch"
-@erase "$(INTDIR)\pumpkin.res"
-@erase "$(INTDIR)\PumpKINDlg.obj"
-@erase "$(INTDIR)\RequestDlg.obj"
-@erase "$(INTDIR)\Resolver.obj"
-@erase "$(INTDIR)\Retrier.obj"
-@erase "$(INTDIR)\StdAfx.obj"
-@erase "$(INTDIR)\Trayer.obj"
-@erase "$(OUTDIR)\pumpkin.ex_"
-@erase "$(OUTDIR)\pumpkin.exe"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
# ADD CPP /nologo /Zp1 /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
CPP_PROJ=/nologo /Zp1 /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
"_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/pumpkin.pch" /Yu"stdafx.h" /Fo"$(INTDIR)/"\
/c
CPP_OBJS=.\Release/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /win32
MTL_PROJ=/nologo /D "NDEBUG" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/pumpkin.res" /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/pumpkin.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 /nologo /subsystem:windows /machine:I386
LINK32_FLAGS=/nologo /subsystem:windows /incremental:no\
/pdb:"$(OUTDIR)/pumpkin.pdb" /machine:I386 /out:"$(OUTDIR)/pumpkin.exe"
LINK32_OBJS= \
"$(INTDIR)\ACLTargetCombo.obj" \
"$(INTDIR)\ConfirmRRQDlg.obj" \
"$(INTDIR)\ConfirmWRQDlg.obj" \
"$(INTDIR)\PropsACL.obj" \
"$(INTDIR)\PropsNetwork.obj" \
"$(INTDIR)\PropsServer.obj" \
"$(INTDIR)\PropsSounds.obj" \
"$(INTDIR)\PumpKIN.obj" \
"$(INTDIR)\pumpkin.res" \
"$(INTDIR)\PumpKINDlg.obj" \
"$(INTDIR)\RequestDlg.obj" \
"$(INTDIR)\Resolver.obj" \
"$(INTDIR)\Retrier.obj" \
"$(INTDIR)\StdAfx.obj" \
"$(INTDIR)\Trayer.obj"
"$(OUTDIR)\pumpkin.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
# Begin Custom Build
OutDir=.\Release
TargetName=pumpkin
InputPath=.\Release\pumpkin.exe
SOURCE=$(InputPath)
"$(OutDir)\$(TargetName).ex_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
compress $(OutDir)\$(TargetName).exe $(OutDir)\$(TargetName).ex_
# End Custom Build
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Target_Dir ""
OUTDIR=.\Debug
INTDIR=.\Debug
# Begin Custom Macros
OutDir=.\Debug
TargetName=pumpkin
# End Custom Macros
ALL : "$(OUTDIR)\pumpkin.exe" "$(OUTDIR)\pumpkin.bsc" "$(OUTDIR)\pumpkin.ex_"\
"$(OUTDIR)\pumpkin.hlp" "$(OUTDIR)\pumpkin.cnt" "$(OUTDIR)\pumpkin.hl_"\
"$(OUTDIR)\pumpkin.cn_"
CLEAN :
-@erase "$(INTDIR)\ACLTargetCombo.obj"
-@erase "$(INTDIR)\ACLTargetCombo.sbr"
-@erase "$(INTDIR)\ConfirmRRQDlg.obj"
-@erase "$(INTDIR)\ConfirmRRQDlg.sbr"
-@erase "$(INTDIR)\ConfirmWRQDlg.obj"
-@erase "$(INTDIR)\ConfirmWRQDlg.sbr"
-@erase "$(INTDIR)\PropsACL.obj"
-@erase "$(INTDIR)\PropsACL.sbr"
-@erase "$(INTDIR)\PropsNetwork.obj"
-@erase "$(INTDIR)\PropsNetwork.sbr"
-@erase "$(INTDIR)\PropsServer.obj"
-@erase "$(INTDIR)\PropsServer.sbr"
-@erase "$(INTDIR)\PropsSounds.obj"
-@erase "$(INTDIR)\PropsSounds.sbr"
-@erase "$(INTDIR)\pumpkin.cn_"
-@erase "$(INTDIR)\pumpkin.cnt"
-@erase "$(INTDIR)\pumpkin.hl_"
-@erase "$(INTDIR)\pumpkin.hlp"
-@erase "$(INTDIR)\PumpKIN.obj"
-@erase "$(INTDIR)\pumpkin.pch"
-@erase "$(INTDIR)\pumpkin.res"
-@erase "$(INTDIR)\PumpKIN.sbr"
-@erase "$(INTDIR)\PumpKINDlg.obj"
-@erase "$(INTDIR)\PumpKINDlg.sbr"
-@erase "$(INTDIR)\RequestDlg.obj"
-@erase "$(INTDIR)\RequestDlg.sbr"
-@erase "$(INTDIR)\Resolver.obj"
-@erase "$(INTDIR)\Resolver.sbr"
-@erase "$(INTDIR)\Retrier.obj"
-@erase "$(INTDIR)\Retrier.sbr"
-@erase "$(INTDIR)\StdAfx.obj"
-@erase "$(INTDIR)\StdAfx.sbr"
-@erase "$(INTDIR)\Trayer.obj"
-@erase "$(INTDIR)\Trayer.sbr"
-@erase "$(INTDIR)\vc40.idb"
-@erase "$(INTDIR)\vc40.pdb"
-@erase "$(OUTDIR)\pumpkin.bsc"
-@erase "$(OUTDIR)\pumpkin.ex_"
-@erase "$(OUTDIR)\pumpkin.exe"
-@erase "$(OUTDIR)\pumpkin.ilk"
-@erase "$(OUTDIR)\pumpkin.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
# ADD CPP /nologo /Zp1 /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR /Yu"stdafx.h" /c
CPP_PROJ=/nologo /Zp1 /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D\
"_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/pumpkin.pch"\
/Yu"stdafx.h" /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
CPP_OBJS=.\Debug/
CPP_SBRS=.\Debug/
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /win32
MTL_PROJ=/nologo /D "_DEBUG" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/pumpkin.res" /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/pumpkin.bsc"
BSC32_SBRS= \
"$(INTDIR)\ACLTargetCombo.sbr" \
"$(INTDIR)\ConfirmRRQDlg.sbr" \
"$(INTDIR)\ConfirmWRQDlg.sbr" \
"$(INTDIR)\PropsACL.sbr" \
"$(INTDIR)\PropsNetwork.sbr" \
"$(INTDIR)\PropsServer.sbr" \
"$(INTDIR)\PropsSounds.sbr" \
"$(INTDIR)\PumpKIN.sbr" \
"$(INTDIR)\PumpKINDlg.sbr" \
"$(INTDIR)\RequestDlg.sbr" \
"$(INTDIR)\Resolver.sbr" \
"$(INTDIR)\Retrier.sbr" \
"$(INTDIR)\StdAfx.sbr" \
"$(INTDIR)\Trayer.sbr"
"$(OUTDIR)\pumpkin.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386
# ADD LINK32 /nologo /subsystem:windows /debug /machine:I386
LINK32_FLAGS=/nologo /subsystem:windows /incremental:yes\
/pdb:"$(OUTDIR)/pumpkin.pdb" /debug /machine:I386 /out:"$(OUTDIR)/pumpkin.exe"
LINK32_OBJS= \
"$(INTDIR)\ACLTargetCombo.obj" \
"$(INTDIR)\ConfirmRRQDlg.obj" \
"$(INTDIR)\ConfirmWRQDlg.obj" \
"$(INTDIR)\PropsACL.obj" \
"$(INTDIR)\PropsNetwork.obj" \
"$(INTDIR)\PropsServer.obj" \
"$(INTDIR)\PropsSounds.obj" \
"$(INTDIR)\PumpKIN.obj" \
"$(INTDIR)\pumpkin.res" \
"$(INTDIR)\PumpKINDlg.obj" \
"$(INTDIR)\RequestDlg.obj" \
"$(INTDIR)\Resolver.obj" \
"$(INTDIR)\Retrier.obj" \
"$(INTDIR)\StdAfx.obj" \
"$(INTDIR)\Trayer.obj"
"$(OUTDIR)\pumpkin.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
# Begin Custom Build
OutDir=.\Debug
TargetName=pumpkin
InputPath=.\Debug\pumpkin.exe
SOURCE=$(InputPath)
"$(OutDir)\$(TargetName).ex_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
compress $(OutDir)\$(TargetName).exe $(OutDir)\$(TargetName).ex_
# End Custom Build
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "PumpKIN_"
# PROP BASE Intermediate_Dir "PumpKIN_"
# PROP BASE Target_Dir ""
# PROP Use_MFC 5
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Releast"
# PROP Intermediate_Dir "Releast"
# PROP Target_Dir ""
OUTDIR=.\Releast
INTDIR=.\Releast
# Begin Custom Macros
OutDir=.\Releast
TargetName=pumpkin
# End Custom Macros
ALL : "$(OUTDIR)\pumpkin.exe" "$(OUTDIR)\pumpkin.ex_" "$(OUTDIR)\pumpkin.hlp"\
"$(OUTDIR)\pumpkin.cnt" "$(OUTDIR)\pumpkin.hl_" "$(OUTDIR)\pumpkin.cn_"
CLEAN :
-@erase "$(INTDIR)\ACLTargetCombo.obj"
-@erase "$(INTDIR)\ConfirmRRQDlg.obj"
-@erase "$(INTDIR)\ConfirmWRQDlg.obj"
-@erase "$(INTDIR)\PropsACL.obj"
-@erase "$(INTDIR)\PropsNetwork.obj"
-@erase "$(INTDIR)\PropsServer.obj"
-@erase "$(INTDIR)\PropsSounds.obj"
-@erase "$(INTDIR)\pumpkin.cn_"
-@erase "$(INTDIR)\pumpkin.cnt"
-@erase "$(INTDIR)\pumpkin.hl_"
-@erase "$(INTDIR)\pumpkin.hlp"
-@erase "$(INTDIR)\PumpKIN.obj"
-@erase "$(INTDIR)\pumpkin.pch"
-@erase "$(INTDIR)\pumpkin.res"
-@erase "$(INTDIR)\PumpKINDlg.obj"
-@erase "$(INTDIR)\RequestDlg.obj"
-@erase "$(INTDIR)\Resolver.obj"
-@erase "$(INTDIR)\Retrier.obj"
-@erase "$(INTDIR)\StdAfx.obj"
-@erase "$(INTDIR)\Trayer.obj"
-@erase "$(OUTDIR)\pumpkin.ex_"
-@erase "$(OUTDIR)\pumpkin.exe"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /Zp1 /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /Yu"stdafx.h" /c
# ADD CPP /nologo /Zp1 /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /Yu"stdafx.h" /c
CPP_PROJ=/nologo /Zp1 /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
"_MBCS" /Fp"$(INTDIR)/pumpkin.pch" /Yu"stdafx.h" /Fo"$(INTDIR)/" /c
CPP_OBJS=.\Releast/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /win32
MTL_PROJ=/nologo /D "NDEBUG" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/pumpkin.res" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/pumpkin.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 /nologo /subsystem:windows /machine:I386
LINK32_FLAGS=/nologo /subsystem:windows /incremental:no\
/pdb:"$(OUTDIR)/pumpkin.pdb" /machine:I386 /out:"$(OUTDIR)/pumpkin.exe"
LINK32_OBJS= \
"$(INTDIR)\ACLTargetCombo.obj" \
"$(INTDIR)\ConfirmRRQDlg.obj" \
"$(INTDIR)\ConfirmWRQDlg.obj" \
"$(INTDIR)\PropsACL.obj" \
"$(INTDIR)\PropsNetwork.obj" \
"$(INTDIR)\PropsServer.obj" \
"$(INTDIR)\PropsSounds.obj" \
"$(INTDIR)\PumpKIN.obj" \
"$(INTDIR)\pumpkin.res" \
"$(INTDIR)\PumpKINDlg.obj" \
"$(INTDIR)\RequestDlg.obj" \
"$(INTDIR)\Resolver.obj" \
"$(INTDIR)\Retrier.obj" \
"$(INTDIR)\StdAfx.obj" \
"$(INTDIR)\Trayer.obj"
"$(OUTDIR)\pumpkin.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
# Begin Custom Build
OutDir=.\Releast
TargetName=pumpkin
InputPath=.\Releast\pumpkin.exe
SOURCE=$(InputPath)
"$(OutDir)\$(TargetName).ex_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
compress $(OutDir)\$(TargetName).exe $(OutDir)\$(TargetName).ex_
# End Custom Build
!ELSEIF "$(CFG)" == "Install - Win32 Debug"
# PROP BASE Use_MFC 2
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Install\Debug"
# PROP BASE Intermediate_Dir "Install\Debug"
# PROP BASE Target_Dir "Install"
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Install\Debug"
# PROP Intermediate_Dir "Install\Debug"
# PROP Target_Dir "Install"
OUTDIR=.\Install\Debug
INTDIR=.\Install\Debug
ALL : "$(OUTDIR)\Install.exe"
CLEAN :
-@erase "$(INTDIR)\install.obj"
-@erase "$(INTDIR)\Install.res"
-@erase "$(INTDIR)\vc40.idb"
-@erase "$(INTDIR)\vc40.pdb"
-@erase "$(OUTDIR)\Install.exe"
-@erase "$(OUTDIR)\Install.ilk"
-@erase "$(OUTDIR)\Install.pdb"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX /c
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /c
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\
/D "_MBCS" /Fp"$(INTDIR)/Install.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c
CPP_OBJS=.\Install\Debug/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "_DEBUG" /win32
# ADD MTL /nologo /D "_DEBUG" /win32
MTL_PROJ=/nologo /D "_DEBUG" /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "_DEBUG"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Install.res" /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/Install.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /debug /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib version.lib /nologo /subsystem:windows /debug /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib version.lib /nologo /subsystem:windows /incremental:yes\
/pdb:"$(OUTDIR)/Install.pdb" /debug /machine:I386 /out:"$(OUTDIR)/Install.exe"
LINK32_OBJS= \
"$(INTDIR)\install.obj" \
"$(INTDIR)\Install.res"
"$(OUTDIR)\Install.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "Install - Win32 Pure"
# PROP BASE Use_MFC 2
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Install\Pure"
# PROP BASE Intermediate_Dir "Install\Pure"
# PROP BASE Target_Dir "Install"
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Install\Pure"
# PROP Intermediate_Dir "Install\Pure"
# PROP Target_Dir "Install"
OUTDIR=.\Install\Pure
INTDIR=.\Install\Pure
ALL : "$(OUTDIR)\Install.exe" "$(OUTDIR)\Install.bsc"
CLEAN :
-@erase "$(INTDIR)\install.obj"
-@erase "$(INTDIR)\Install.res"
-@erase "$(INTDIR)\install.sbr"
-@erase "$(OUTDIR)\Install.bsc"
-@erase "$(OUTDIR)\Install.exe"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /c
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
"_MBCS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/Install.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\Install\Pure/
CPP_SBRS=.\Install\Pure/
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /win32
MTL_PROJ=/nologo /D "NDEBUG" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Install.res" /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/Install.bsc"
BSC32_SBRS= \
"$(INTDIR)\install.sbr"
"$(OUTDIR)\Install.bsc" : "$(OUTDIR)" $(BSC32_SBRS)
$(BSC32) @<<
$(BSC32_FLAGS) $(BSC32_SBRS)
<<
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib version.lib /nologo /subsystem:windows /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib version.lib /nologo /subsystem:windows /incremental:no\
/pdb:"$(OUTDIR)/Install.pdb" /machine:I386 /out:"$(OUTDIR)/Install.exe"
LINK32_OBJS= \
"$(INTDIR)\install.obj" \
"$(INTDIR)\Install.res"
"$(OUTDIR)\Install.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "Install - Win32 Static"
# PROP BASE Use_MFC 2
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Install\Static"
# PROP BASE Intermediate_Dir "Install\Static"
# PROP BASE Target_Dir "Install"
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Install\Static"
# PROP Intermediate_Dir "Install\Static"
# PROP Target_Dir "Install"
OUTDIR=.\Install\Static
INTDIR=.\Install\Static
ALL : "$(OUTDIR)\Install.exe"
CLEAN :
-@erase "$(INTDIR)\install.obj"
-@erase "$(INTDIR)\Install.res"
-@erase "$(OUTDIR)\Install.exe"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "STATI_K" /YX /c
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
"_MBCS" /D "STATI_K" /Fp"$(INTDIR)/Install.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\Install\Static/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /win32
MTL_PROJ=/nologo /D "NDEBUG" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG" /d "STATI_K"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Install.res" /d "NDEBUG" /d "STATI_K"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/Install.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib version.lib /nologo /subsystem:windows /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib version.lib /nologo /subsystem:windows /incremental:no\
/pdb:"$(OUTDIR)/Install.pdb" /machine:I386 /out:"$(OUTDIR)/Install.exe"
LINK32_OBJS= \
"$(INTDIR)\install.obj" \
"$(INTDIR)\Install.res"
"$(OUTDIR)\Install.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ELSEIF "$(CFG)" == "Install - Win32 Canned"
# PROP BASE Use_MFC 2
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Install\Canned"
# PROP BASE Intermediate_Dir "Install\Canned"
# PROP BASE Target_Dir "Install"
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Install\Canned"
# PROP Intermediate_Dir "Install\Canned"
# PROP Target_Dir "Install"
OUTDIR=.\Install\Canned
INTDIR=.\Install\Canned
ALL : "$(OUTDIR)\Install.exe"
CLEAN :
-@erase "$(INTDIR)\install.obj"
-@erase "$(INTDIR)\Install.res"
-@erase "$(OUTDIR)\Install.exe"
"$(OUTDIR)" :
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /YX /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "K_ANNED" /YX /c
CPP_PROJ=/nologo /ML /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
"_MBCS" /D "K_ANNED" /Fp"$(INTDIR)/Install.pch" /YX /Fo"$(INTDIR)/" /c
CPP_OBJS=.\Install\Canned/
CPP_SBRS=.\.
# ADD BASE MTL /nologo /D "NDEBUG" /win32
# ADD MTL /nologo /D "NDEBUG" /win32
MTL_PROJ=/nologo /D "NDEBUG" /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x409 /d "NDEBUG" /d "K_ANNED"
RSC_PROJ=/l 0x409 /fo"$(INTDIR)/Install.res" /d "NDEBUG" /d "K_ANNED"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
BSC32_FLAGS=/nologo /o"$(OUTDIR)/Install.bsc"
BSC32_SBRS= \
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib version.lib /nologo /subsystem:windows /machine:I386
LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib\
odbccp32.lib version.lib /nologo /subsystem:windows /incremental:no\
/pdb:"$(OUTDIR)/Install.pdb" /machine:I386 /out:"$(OUTDIR)/Install.exe"
LINK32_OBJS= \
"$(INTDIR)\install.obj" \
"$(INTDIR)\Install.res"
"$(OUTDIR)\Install.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
$(LINK32) @<<
$(LINK32_FLAGS) $(LINK32_OBJS)
<<
!ENDIF
.c{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_OBJS)}.obj:
$(CPP) $(CPP_PROJ) $<
.c{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cpp{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
.cxx{$(CPP_SBRS)}.sbr:
$(CPP) $(CPP_PROJ) $<
################################################################################
# Begin Target
# Name "PumpKIN - Win32 Release"
# Name "PumpKIN - Win32 Debug"
# Name "PumpKIN - Win32 Static"
!IF "$(CFG)" == "PumpKIN - Win32 Release"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
!ENDIF
################################################################################
# Begin Source File
SOURCE=.\PumpKIN.cpp
-
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
DEP_CPP_PUMPK=\
".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+
"$(INTDIR)\PumpKIN.obj" : $(SOURCE) $(DEP_CPP_PUMPK) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
-DEP_CPP_PUMPK=\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\PumpKIN.obj" : $(SOURCE) $(DEP_CPP_PUMPK) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\PumpKIN.sbr" : $(SOURCE) $(DEP_CPP_PUMPK) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
-DEP_CPP_PUMPK=\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\PumpKIN.obj" : $(SOURCE) $(DEP_CPP_PUMPK) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\PumpKINDlg.cpp
+
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
DEP_CPP_PUMPKI=\
".\ACLTargetCombo.h"\
".\ConfirmRRQDlg.h"\
".\ConfirmWRQDlg.h"\
".\PropsACL.h"\
".\PropsNetwork.h"\
".\PropsServer.h"\
".\PropsSounds.h"\
".\pumpkin.h"\
".\PumpKINDlg.h"\
".\RequestDlg.h"\
".\Resolver.h"\
".\Retrier.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
".\Trayer.h"\
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
-
"$(INTDIR)\PumpKINDlg.obj" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
+DEP_CPP_PUMPKI=\
+ ".\ACLTargetCombo.h"\
+ ".\ConfirmRRQDlg.h"\
+ ".\ConfirmWRQDlg.h"\
+ ".\PropsACL.h"\
+ ".\PropsNetwork.h"\
+ ".\PropsServer.h"\
+ ".\PropsSounds.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\RequestDlg.h"\
+ ".\Resolver.h"\
+ ".\Retrier.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+ ".\Trayer.h"\
+
+NODEP_CPP_PUMPKI=\
+ ".\DoSelect"\
+
"$(INTDIR)\PumpKINDlg.obj" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\PumpKINDlg.sbr" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
+DEP_CPP_PUMPKI=\
+ ".\ACLTargetCombo.h"\
+ ".\ConfirmRRQDlg.h"\
+ ".\ConfirmWRQDlg.h"\
+ ".\PropsACL.h"\
+ ".\PropsNetwork.h"\
+ ".\PropsServer.h"\
+ ".\PropsSounds.h"\
+ ".\pumpkin.h"\
+ ".\PumpKINDlg.h"\
+ ".\RequestDlg.h"\
+ ".\Resolver.h"\
+ ".\Retrier.h"\
+ ".\shared-code\BellsNWhistles.h"\
+ ".\shared-code\kHelpers.h"\
+ ".\stdafx.h"\
+ ".\Trayer.h"\
+
"$(INTDIR)\PumpKINDlg.obj" : $(SOURCE) $(DEP_CPP_PUMPKI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\StdAfx.cpp
DEP_CPP_STDAF=\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
!IF "$(CFG)" == "PumpKIN - Win32 Release"
# ADD CPP /Yc"stdafx.h"
BuildCmds= \
$(CPP) /nologo /Zp1 /MD /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
"_AFXDLL" /D "_MBCS" /Fp"$(INTDIR)/pumpkin.pch" /Yc"stdafx.h" /Fo"$(INTDIR)/"\
/c $(SOURCE) \
"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
$(BuildCmds)
"$(INTDIR)\pumpkin.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
$(BuildCmds)
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
# ADD CPP /Yc"stdafx.h"
BuildCmds= \
$(CPP) /nologo /Zp1 /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D\
"_WINDOWS" /D "_AFXDLL" /D "_MBCS" /FR"$(INTDIR)/" /Fp"$(INTDIR)/pumpkin.pch"\
/Yc"stdafx.h" /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c $(SOURCE) \
"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
$(BuildCmds)
"$(INTDIR)\StdAfx.sbr" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
$(BuildCmds)
"$(INTDIR)\pumpkin.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
$(BuildCmds)
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
# ADD BASE CPP /Yc"stdafx.h"
# ADD CPP /Yc"stdafx.h"
BuildCmds= \
$(CPP) /nologo /Zp1 /MT /W3 /GX /O1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D\
"_MBCS" /Fp"$(INTDIR)/pumpkin.pch" /Yc"stdafx.h" /Fo"$(INTDIR)/" /c $(SOURCE) \
"$(INTDIR)\StdAfx.obj" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
$(BuildCmds)
"$(INTDIR)\pumpkin.pch" : $(SOURCE) $(DEP_CPP_STDAF) "$(INTDIR)"
$(BuildCmds)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\pumpkin.rc
DEP_RSC_PUMPKIN=\
".\res\down.ico"\
".\res\failed.wav"\
".\res\finished.wav"\
".\res\PumpKIN.ico"\
".\res\pumpkin.rc2"\
".\res\remove.ico"\
".\res\ring.wav"\
".\res\rrq.ico"\
".\res\up.ico"\
".\res\wrq.ico"\
".\shared-data\browse-icon.ico"\
".\shared-data\klever-background.bmp"\
".\shared-data\play-icon.ico"\
!IF "$(CFG)" == "PumpKIN - Win32 Release"
"$(INTDIR)\pumpkin.res" : $(SOURCE) $(DEP_RSC_PUMPKIN) "$(INTDIR)"
$(RSC) $(RSC_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
"$(INTDIR)\pumpkin.res" : $(SOURCE) $(DEP_RSC_PUMPKIN) "$(INTDIR)"
$(RSC) $(RSC_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
"$(INTDIR)\pumpkin.res" : $(SOURCE) $(DEP_RSC_PUMPKIN) "$(INTDIR)"
$(RSC) $(RSC_PROJ) $(SOURCE)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\help\pumpkin.hpj
!IF "$(CFG)" == "PumpKIN - Win32 Release"
# Begin Custom Build - Making help files...
OutDir=.\Release
ProjDir=.
TargetName=pumpkin
InputPath=.\help\pumpkin.hpj
BuildCmds= \
"$(ProjDir)\makehelp.bat" \
compress $(OutDir)\$(TargetName).hlp $(OutDir)\$(TargetName).hl_ \
compress $(OutDir)\$(TargetName).cnt $(OutDir)\$(TargetName).cn_ \
"$(OutDir)\$(TargetName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(OutDir)\$(TargetName).cnt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(OutDir)\$(TargetName).hl_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(OutDir)\$(TargetName).cn_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
# Begin Custom Build - Making help files...
OutDir=.\Debug
ProjDir=.
TargetName=pumpkin
InputPath=.\help\pumpkin.hpj
BuildCmds= \
"$(ProjDir)\makehelp.bat" \
compress $(OutDir)\$(TargetName).hlp $(OutDir)\$(TargetName).hl_ \
compress $(OutDir)\$(TargetName).cnt $(OutDir)\$(TargetName).cn_ \
"$(OutDir)\$(TargetName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(OutDir)\$(TargetName).cnt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(OutDir)\$(TargetName).hl_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(OutDir)\$(TargetName).cn_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
# Begin Custom Build - Making help files...
OutDir=.\Releast
ProjDir=.
TargetName=pumpkin
InputPath=.\help\pumpkin.hpj
BuildCmds= \
"$(ProjDir)\makehelp.bat" \
compress $(OutDir)\$(TargetName).hlp $(OutDir)\$(TargetName).hl_ \
compress $(OutDir)\$(TargetName).cnt $(OutDir)\$(TargetName).cn_ \
"$(OutDir)\$(TargetName).hlp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(OutDir)\$(TargetName).cnt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(OutDir)\$(TargetName).hl_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
"$(OutDir)\$(TargetName).cn_" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
$(BuildCmds)
# End Custom Build
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\PropsServer.cpp
-
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
DEP_CPP_PROPS=\
".\PropsServer.h"\
".\pumpkin.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+
"$(INTDIR)\PropsServer.obj" : $(SOURCE) $(DEP_CPP_PROPS) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
-DEP_CPP_PROPS=\
- ".\PropsServer.h"\
- ".\pumpkin.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\PropsServer.obj" : $(SOURCE) $(DEP_CPP_PROPS) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\PropsServer.sbr" : $(SOURCE) $(DEP_CPP_PROPS) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
-DEP_CPP_PROPS=\
- ".\PropsServer.h"\
- ".\pumpkin.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\PropsServer.obj" : $(SOURCE) $(DEP_CPP_PROPS) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\PropsNetwork.cpp
DEP_CPP_PROPSN=\
".\PropsNetwork.h"\
".\pumpkin.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
!IF "$(CFG)" == "PumpKIN - Win32 Release"
"$(INTDIR)\PropsNetwork.obj" : $(SOURCE) $(DEP_CPP_PROPSN) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
"$(INTDIR)\PropsNetwork.obj" : $(SOURCE) $(DEP_CPP_PROPSN) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\PropsNetwork.sbr" : $(SOURCE) $(DEP_CPP_PROPSN) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
"$(INTDIR)\PropsNetwork.obj" : $(SOURCE) $(DEP_CPP_PROPSN) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\ConfirmRRQDlg.cpp
-
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
DEP_CPP_CONFI=\
".\ConfirmRRQDlg.h"\
".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+
"$(INTDIR)\ConfirmRRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
-DEP_CPP_CONFI=\
- ".\ConfirmRRQDlg.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\ConfirmRRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\ConfirmRRQDlg.sbr" : $(SOURCE) $(DEP_CPP_CONFI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
-DEP_CPP_CONFI=\
- ".\ConfirmRRQDlg.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\ConfirmRRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\ConfirmWRQDlg.cpp
-
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
DEP_CPP_CONFIR=\
".\ConfirmWRQDlg.h"\
".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+
"$(INTDIR)\ConfirmWRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFIR) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
-DEP_CPP_CONFIR=\
- ".\ConfirmWRQDlg.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\ConfirmWRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFIR) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\ConfirmWRQDlg.sbr" : $(SOURCE) $(DEP_CPP_CONFIR) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
-DEP_CPP_CONFIR=\
- ".\ConfirmWRQDlg.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\ConfirmWRQDlg.obj" : $(SOURCE) $(DEP_CPP_CONFIR) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\RequestDlg.cpp
DEP_CPP_REQUE=\
".\pumpkin.h"\
".\RequestDlg.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
!IF "$(CFG)" == "PumpKIN - Win32 Release"
"$(INTDIR)\RequestDlg.obj" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
"$(INTDIR)\RequestDlg.obj" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\RequestDlg.sbr" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
"$(INTDIR)\RequestDlg.obj" : $(SOURCE) $(DEP_CPP_REQUE) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\Resolver.cpp
-
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
DEP_CPP_RESOL=\
".\pumpkin.h"\
".\PumpKINDlg.h"\
".\Resolver.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+
"$(INTDIR)\Resolver.obj" : $(SOURCE) $(DEP_CPP_RESOL) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
-DEP_CPP_RESOL=\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\Resolver.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\Resolver.obj" : $(SOURCE) $(DEP_CPP_RESOL) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\Resolver.sbr" : $(SOURCE) $(DEP_CPP_RESOL) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
-DEP_CPP_RESOL=\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\Resolver.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\Resolver.obj" : $(SOURCE) $(DEP_CPP_RESOL) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\Retrier.cpp
-
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
DEP_CPP_RETRI=\
".\pumpkin.h"\
".\PumpKINDlg.h"\
".\Retrier.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+
"$(INTDIR)\Retrier.obj" : $(SOURCE) $(DEP_CPP_RETRI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
-DEP_CPP_RETRI=\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\Retrier.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\Retrier.obj" : $(SOURCE) $(DEP_CPP_RETRI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\Retrier.sbr" : $(SOURCE) $(DEP_CPP_RETRI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
-DEP_CPP_RETRI=\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\Retrier.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\Retrier.obj" : $(SOURCE) $(DEP_CPP_RETRI) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\Trayer.cpp
-
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
DEP_CPP_TRAYE=\
".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
".\Trayer.h"\
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+
"$(INTDIR)\Trayer.obj" : $(SOURCE) $(DEP_CPP_TRAYE) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
-DEP_CPP_TRAYE=\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
- ".\Trayer.h"\
-
"$(INTDIR)\Trayer.obj" : $(SOURCE) $(DEP_CPP_TRAYE) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\Trayer.sbr" : $(SOURCE) $(DEP_CPP_TRAYE) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
-DEP_CPP_TRAYE=\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
- ".\Trayer.h"\
-
"$(INTDIR)\Trayer.obj" : $(SOURCE) $(DEP_CPP_TRAYE) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\help\pumpkin.cnt
!IF "$(CFG)" == "PumpKIN - Win32 Release"
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
# PROP Exclude_From_Build 1
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
# PROP Exclude_From_Build 1
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\PropsSounds.cpp
-
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
DEP_CPP_PROPSS=\
".\PropsSounds.h"\
".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+
"$(INTDIR)\PropsSounds.obj" : $(SOURCE) $(DEP_CPP_PROPSS) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
-DEP_CPP_PROPSS=\
- ".\PropsSounds.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\PropsSounds.obj" : $(SOURCE) $(DEP_CPP_PROPSS) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\PropsSounds.sbr" : $(SOURCE) $(DEP_CPP_PROPSS) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
-DEP_CPP_PROPSS=\
- ".\PropsSounds.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\PropsSounds.obj" : $(SOURCE) $(DEP_CPP_PROPSS) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\PropsACL.cpp
DEP_CPP_PROPSA=\
".\ACLTargetCombo.h"\
".\PropsACL.h"\
".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
!IF "$(CFG)" == "PumpKIN - Win32 Release"
"$(INTDIR)\PropsACL.obj" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
"$(INTDIR)\PropsACL.obj" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\PropsACL.sbr" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
"$(INTDIR)\PropsACL.obj" : $(SOURCE) $(DEP_CPP_PROPSA) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\ACLTargetCombo.cpp
-
-!IF "$(CFG)" == "PumpKIN - Win32 Release"
-
DEP_CPP_ACLTA=\
".\ACLTargetCombo.h"\
".\pumpkin.h"\
".\PumpKINDlg.h"\
".\shared-code\BellsNWhistles.h"\
".\shared-code\kHelpers.h"\
".\stdafx.h"\
+!IF "$(CFG)" == "PumpKIN - Win32 Release"
+
+
"$(INTDIR)\ACLTargetCombo.obj" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Debug"
-DEP_CPP_ACLTA=\
- ".\ACLTargetCombo.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\ACLTargetCombo.obj" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
"$(INTDIR)\ACLTargetCombo.sbr" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ELSEIF "$(CFG)" == "PumpKIN - Win32 Static"
-DEP_CPP_ACLTA=\
- ".\ACLTargetCombo.h"\
- ".\pumpkin.h"\
- ".\PumpKINDlg.h"\
- ".\shared-code\BellsNWhistles.h"\
- ".\shared-code\kHelpers.h"\
- ".\stdafx.h"\
-
"$(INTDIR)\ACLTargetCombo.obj" : $(SOURCE) $(DEP_CPP_ACLTA) "$(INTDIR)"\
"$(INTDIR)\pumpkin.pch"
!ENDIF
# End Source File
# End Target
################################################################################
# Begin Target
# Name "Install - Win32 Debug"
# Name "Install - Win32 Pure"
# Name "Install - Win32 Static"
# Name "Install - Win32 Canned"
!IF "$(CFG)" == "Install - Win32 Debug"
!ELSEIF "$(CFG)" == "Install - Win32 Pure"
!ELSEIF "$(CFG)" == "Install - Win32 Static"
!ELSEIF "$(CFG)" == "Install - Win32 Canned"
!ENDIF
################################################################################
# Begin Source File
SOURCE=.\Install\Install.rc
DEP_RSC_INSTA=\
".\Install\Custom.rch"\
".\shared-data\install-icon.ico"\
!IF "$(CFG)" == "Install - Win32 Debug"
"$(INTDIR)\Install.res" : $(SOURCE) $(DEP_RSC_INSTA) "$(INTDIR)"
$(RSC) /l 0x409 /fo"$(INTDIR)/Install.res" /i "Install" /d "_DEBUG"\
$(SOURCE)
!ELSEIF "$(CFG)" == "Install - Win32 Pure"
"$(INTDIR)\Install.res" : $(SOURCE) $(DEP_RSC_INSTA) "$(INTDIR)"
$(RSC) /l 0x409 /fo"$(INTDIR)/Install.res" /i "Install" /d "NDEBUG"\
$(SOURCE)
!ELSEIF "$(CFG)" == "Install - Win32 Static"
"$(INTDIR)\Install.res" : $(SOURCE) $(DEP_RSC_INSTA) "$(INTDIR)"
$(RSC) /l 0x409 /fo"$(INTDIR)/Install.res" /i "Install" /d "NDEBUG" /d\
"STATI_K" $(SOURCE)
!ELSEIF "$(CFG)" == "Install - Win32 Canned"
"$(INTDIR)\Install.res" : $(SOURCE) $(DEP_RSC_INSTA) "$(INTDIR)"
$(RSC) /l 0x409 /fo"$(INTDIR)/Install.res" /i "Install" /d "NDEBUG" /d\
"K_ANNED" $(SOURCE)
!ENDIF
# End Source File
################################################################################
# Begin Source File
SOURCE=.\Install\install.cpp
DEP_CPP_INSTAL=\
".\shared-code\install.h"\
!IF "$(CFG)" == "Install - Win32 Debug"
"$(INTDIR)\install.obj" : $(SOURCE) $(DEP_CPP_INSTAL) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "Install - Win32 Pure"
BuildCmds= \
$(CPP) $(CPP_PROJ) $(SOURCE) \
"$(INTDIR)\install.obj" : $(SOURCE) $(DEP_CPP_INSTAL) "$(INTDIR)"
$(BuildCmds)
"$(INTDIR)\install.sbr" : $(SOURCE) $(DEP_CPP_INSTAL) "$(INTDIR)"
$(BuildCmds)
!ELSEIF "$(CFG)" == "Install - Win32 Static"
"$(INTDIR)\install.obj" : $(SOURCE) $(DEP_CPP_INSTAL) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ELSEIF "$(CFG)" == "Install - Win32 Canned"
"$(INTDIR)\install.obj" : $(SOURCE) $(DEP_CPP_INSTAL) "$(INTDIR)"
$(CPP) $(CPP_PROJ) $(SOURCE)
!ENDIF
# End Source File
# End Target
# End Project
################################################################################
################################################################################
# Section PumpKIN : {4FD78B34-1FD7-11D0-A9FB-444553540000}
# 2:11:CPumpKINDlg:1
# 2:11:CRequestDlg:1
# End Section
################################################################################