⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tmpltxtchunk.cpp

📁 基于Perl的HTTP协议GUI测试程序
💻 CPP
字号:
/***************************************************************************
                          tmpltxtchunk.cpp  -  description
                             -------------------
    begin                : Mon Jun 25 2001
    copyright            : (C) 2001 by pelle
    email                : pelle@localhost.localdomain
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include "tmpltxtchunk.h"
#include <string.h>
#include <stdio.h>

CTmplTxtChunk::CTmplTxtChunk(const char* pos, long len)
{
    m_Pos = pos;
    m_Len = len;
}

CTmplTxtChunk::~CTmplTxtChunk()
{
}

/** Verifies this chunk by comparing against the text given by pos */
int CTmplTxtChunk::Verify(const char*& pos, const char* parm)
{
    if(strncmp(m_Pos, pos, m_Len) != 0)
    {
        // mismatch return false
        return 0;
    }
    else
    {
        // everything ok, update pos
        pos += m_Len;
        return 1;
    }
}
/** dump the text chunk */
void CTmplTxtChunk::Dump()
{
    printf("TEXT: pos 0x%08x, len %ld\n[", m_Pos, m_Len);
    fwrite(m_Pos, m_Len, 1, stdout);
    printf("]\n");
    CTmplChunk::Dump();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -