/* * Photo Image Print System * Copyright (C) 2002 EPSON KOWA Corporation. * Copyright (C) SEIKO EPSON CORPORATION 2002. * * 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. * * As a special exception, EPSON KOWA Corporation gives permission to * link the code of this program with libraries which are covered by * the EPSON KOWA PUBLIC LICENCE and distribute their linked * combinations. You must obey the GNU General Public License in all * respects for all of the code used other than the libraries which * are covered by EPSON KOWA PUBLIC LICENCE. */ #ifdef HAVE_CONFIG_H #include #endif #ifndef MEM_H #define MEM_H #include "def.h" /* 成功ならアドレスを返し,失敗ならメッセージを出力して終了する */ #define mem_new(type, num) \ ((type *) mem_malloc (sizeof (type) * (num), 1)) #define mem_new0(type, num) \ ((type *) mem_calloc ((num), sizeof (type), 1)) #define mem_renew(type, pointer, num) \ ((type *) mem_realloc (pointer, sizeof (type) * (num), 1)) /* * bool値 true クリティカル * false 通常動作 */ BEGIN_C void * mem_malloc (unsigned int, bool_t); void * mem_calloc (unsigned int, unsigned int, bool_t); void * mem_realloc (void *, unsigned int, bool_t); void mem_free (void *); END_C #endif /* MEM_H */