00001 00009 /* 00010 * Copyright (c) 1997 Greg Poma 00011 * All rights reserved. 00012 * 00013 * Redistribution and use in source and binary forms, with or without 00014 * modification, are permitted provided that the following conditions 00015 * are met: 00016 * 1. Redistributions of source code must retain the above copyright 00017 * notice, this list of conditions and the following disclaimer. 00018 * 2. Redistributions in binary form must reproduce the above copyright 00019 * notice, this list of conditions and the following disclaimer in the 00020 * documentation and/or other materials provided with the distribution. 00021 * 3. Neither the name of the authors nor the names of its contributors 00022 * may be used to endorse or promote products derived from this software 00023 * without specific prior written permission. 00024 * 00025 * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND 00026 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00027 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00028 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE 00029 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 00030 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 00031 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00032 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00033 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 00034 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 00035 * SUCH DAMAGE. 00036 */ 00037 #include "queue.h" 00038 00043 #if defined(__GNUC__) 00044 #if defined(__cplusplus) 00045 #define ARGUNUSED(arg) arg 00046 #else 00047 #define ARGUNUSED(arg) arg __attribute__ ((unused)) 00048 #endif 00049 #else /* not __GNUC__ */ 00050 #define ARGUNUSED(arg) arg 00051 #endif 00052 00054 #define ADD_MEMO_BOX(who) do { \ 00055 (who)->memos = (MemoBox *)oalloc(sizeof(MemoBox)); \ 00056 (who)->memos->max = MS_DEF_RCV_MAX; \ 00057 LIST_INIT(&(who)->memos->mb_memos); \ 00058 } while(0) 00059