$treeview $search $mathjax $extrastylesheet
librsync
2.3.0
$projectbrief
|
$projectbrief
|
$searchbox |
00001 /*= -*- c-basic-offset: 4; indent-tabs-mode: nil; -*- 00002 * 00003 * librsync -- library for network deltas 00004 * 00005 * Copyright (C) 1999, 2000, 2001 by Martin Pool <mbp@sourcefrog.net> 00006 * Copyright (C) 1999 by Andrew Tridgell <tridge@samba.org> 00007 * 00008 * This program is free software; you can redistribute it and/or 00009 * modify it under the terms of the GNU Lesser General Public License 00010 * as published by the Free Software Foundation; either version 2.1 of 00011 * the License, or (at your option) any later version. 00012 * 00013 * This program is distributed in the hope that it will be useful, but 00014 * WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 * Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public 00019 * License along with this program; if not, write to the Free Software 00020 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00021 */ 00022 00023 void *rs_alloc(size_t size, char const *name); 00024 void *rs_realloc(void *ptr, size_t size, char const *name); 00025 void *rs_alloc_struct0(size_t size, char const *name); 00026 00027 void rs_bzero(void *buf, size_t size); 00028 00029 int rs_long_ln2(rs_long_t v); 00030 int rs_long_sqrt(rs_long_t v); 00031 00032 /** Allocate and zero-fill an instance of TYPE. */ 00033 #define rs_alloc_struct(type) \ 00034 ((type *) rs_alloc_struct0(sizeof(type), #type)) 00035 00036 #ifdef __GNUC__ 00037 # define UNUSED(x) x __attribute__((unused)) 00038 #elif defined(__LCLINT__) || defined(S_SPLINT_S) 00039 # define UNUSED(x) /*@unused@*/ x 00040 #else /* !__GNUC__ && !__LCLINT__ */ 00041 # define UNUSED(x) x 00042 #endif /* !__GNUC__ && !__LCLINT__ */