X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=adt%2Fxmalloc.h;h=0d6cd3bc51b93112b9b0b9e70083c9fa7532fcde;hb=233d880ea357941a13b98e35caf9afd720619224;hp=5cb4f3900899914a878715eefa95de8a7fb6375d;hpb=ffaec83406ffaee8b981b2b80114bc2e2eab5f0e;p=cparser diff --git a/adt/xmalloc.h b/adt/xmalloc.h index 5cb4f39..0d6cd3b 100644 --- a/adt/xmalloc.h +++ b/adt/xmalloc.h @@ -1,49 +1 @@ -/* - * This file is part of cparser. - * Copyright (C) 2007-2008 Matthias Braun - * - * 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., 59 Temple Place - Suite 330, Boston, MA - * 02111-1307, USA. - */ - -/** - * @file - * @brief More comfortable allocations. - * @author Markus Armbruster - * @data 1999 by getting from fiasco - * @version $Id$ - * Copyright: (c) 1995, 1996 Markus Armbruster - * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE. - */ -#ifndef _XMALLOC_H_ -#define _XMALLOC_H_ - -#include -#include "config.h" - -__attribute__((malloc)) -void *xmalloc(size_t size); - -__attribute__((malloc)) -void *xcalloc(size_t num, size_t size); - -void *xrealloc(void *ptr, size_t size); - -__attribute__((malloc)) -char *xstrdup(const char *str); - -#define xfree(ptr) free(ptr) - -#endif +#include