ClamAV is an open source (GPLv2) anti-virus toolkit.
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
/*
|
|
|
|
* Copyright (C) 2002 Nigel Horne <njh@bandsman.co.uk>
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if HAVE_CONFIG_H
|
|
|
|
#include "clamav-config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#ifndef CL_DEBUG
|
|
|
|
#define NDEBUG /* map CLAMAV debug onto standard */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
#include "strrcpy.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Like strcpy, but return the END of the destination, allowing a quicker
|
|
|
|
* means of adding to the end of a string than strcat
|
|
|
|
*/
|
|
|
|
char *
|
|
|
|
strrcpy(char *dest, const char *source)
|
|
|
|
{
|
|
|
|
/* Pre assertions */
|
|
|
|
assert(dest != NULL);
|
|
|
|
assert(source != NULL);
|
|
|
|
assert(dest != source);
|
|
|
|
|
|
|
|
/* tk: parentheses */
|
|
|
|
while((*dest++ = *source++))
|
|
|
|
;
|
|
|
|
return(--dest);
|
|
|
|
}
|