ClamAV的VS2005工程源码


ClamAV的VS2005工程源码,可以直接编译,不过有个打包工程无法通过。 http://blog.csdn.net/betabin/article/details/7452650博文会介绍下。
资源截图
代码片段和文件信息
/*
 *  Copyright (C) 2006 Sensory Networks Inc.
 *       (C) 2007 Tomasz Kojm 
 *       Written by Tomasz Kojm
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 2 as
 *  published by the Free Software Foundation.
 *
 *  This program is distributed in the hope that it will be useful
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not write to the Free Software
 *  Foundation Inc. 51 Franklin Street Fifth Floor Boston
 *  MA 02110-1301 USA.
 */

#if HAVE_CONFIG_H
#include “clamav-config.h“
#endif

#include 
#include 
#include 
#include 
#include 
#ifdef HAVE_UNISTD_H
#include 
#endif
#include 

#include “shared/misc.h“
#include “libclamav/clamav.h“

#include “cfgparser.h“
#define _GNU_SOURCE
#include “getopt.h“

static void printopt(const struct cfgoption *opt const struct cfgstruct *cpt int nondef)
{

    if(!cpt->enabled && opt->numarg == -1) {
if(!nondef || (opt->numarg != cpt->numarg))
    printf(“%s not set
“ opt->name);
return;
    }

    switch(opt->argtype) {
case OPT_STR:
case OPT_FULLSTR:
case OPT_QUOTESTR:
    if(!nondef || !opt->strarg || strcmp(opt->strarg cpt->strarg))
printf(“%s = “%s“
“ opt->name cpt->strarg);
    break;
case OPT_NUM:
case OPT_COMPSIZE:
    if(!nondef || (opt->numarg != cpt->numarg))
printf(“%s = %u
“ opt->name cpt->numarg);
    break;
case OPT_BOOL:
    if(!nondef || (opt->numarg != cpt->numarg))
printf(“%s = %s
“ opt->name cpt->enabled ? “yes“ : “no“);
    break;
default:
    printf(“%s: UNKNOWN ARGUMENT TYPE
“ opt->name);
    }
}

static void printcfg(const char *cfgfile int nondef)
{
const struct cfgoption *opt;
const struct cfgstruct *cpt;
struct cfgstruct *cfg;
int i;
unsigned short cfgowner = 0;


    if(!(cfg = getcfg(cfgfile 1))) {
printf(“Can‘t parse %s
“ cfgfile);
return;
    }

    /* pre loop to detect merged config */
    for(i = 0; ; i++) {
opt = &cfg_options[i];

if(!opt->name)
    break;

cpt = cfgopt(cfg opt->name);

if((cpt->numarg != opt->numarg) || (cpt->strarg && opt->strarg && strcmp(cpt->strarg opt->strarg))) {
    if((opt->owner & OPT_CLAMD) && !(opt->owner & OPT_FRESHCLAM))
cfgowner |= OPT_CLAMD;
    else if((opt->owner & OPT_FRESHCLAM) && !(opt->owner & OPT_CLAMD))
cfgowner |= OPT_FRESHCLAM;
}
    }

    if((cfgowner & OPT_CLAMD) && (cfgowner & OPT_FRESHCLAM)) { /* merged cfg */
printf(“%s: clamd and freshclam directives
“ cfgfile);
printf(“------------------------------
“);

printf(“
[common]
“);
for(i = 0; ; i++) {
    opt = &cfg_options[i];
    if(!opt->name)
break;
    if((opt->owner & 

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        5031  2007-07-14 13:38  sharedshared.vcproj
     文件        2685  2007-04-18 13:55  shared
etwork.c
     文件        1285  2006-07-26 14:20  sharedReadMe.txt
     文件        1319  2007-04-18 13:55  sharedmisc.h
     文件        1358  2006-07-26 14:20  sharedstdafx.h
     文件         293  2006-07-26 14:20  sharedstdafx.cpp
     文件         896  2007-04-18 13:55  sharedcdiff.h
     文件        2036  2007-04-18 13:55  sharedcfgparser.h
     文件        6432  2007-04-18 13:55  sharedgetopt.h
     文件        8688  2007-10-22 17:08  sharedsha256.c
     文件        6127  2007-04-18 13:55  sharedoptions.c
     文件        1506  2007-04-18 13:55  sharedoptions.h
     文件        1542  2007-10-08 13:32  sharedoutput.h
     文件        1383  2007-10-30 14:34  sharedshared.vcproj.NJH.Nigel Horne.user
     文件        1614  2007-10-22 17:08  sharedsha256.h
     文件        5856  2007-10-07 12:48  sharedmisc.c
     文件       30062  2007-04-18 13:55  sharedgetopt.c
     文件        1038  2007-04-18 13:55  shared
etwork.h
     文件       23156  2007-10-22 17:08  sharedcdiff.c
     文件       15827  2007-10-08 13:32  sharedcfgparser.c
     文件        8212  2007-10-08 14:47  sharedoutput.c
     目录           0  2007-10-22 17:08  shared
     文件    39914496  2007-10-30 14:34  clamav.ncb
     文件       10415  2007-10-24 17:47  clamav.sln
     文件     7834789  2006-08-11 21:01  libclamav.ncb
     文件        6131  2007-09-27 17:49  clamconfclamconf.vcproj
     文件        1312  2006-08-04 13:04  clamconfReadMe.txt
     文件         376  2006-08-04 13:04  clamconfstdafx.h
     文件         295  2006-08-04 13:04  clamconfstdafx.cpp
     文件         172  2006-08-04 13:04  clamconfclamconf.cpp
     文件        1409  2007-10-30 14:34  clamconfclamconf.vcproj.NJH.Nigel Horne.user
............此处省略485个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)