Files
xen/tools/memshr/bidir-namedefs.h
T
Ian Campbell 443701ef0c Replace FSF street address with canonical URL
As recommended in http://www.gnu.org/licenses/gpl-howto.en.html.

This is the result of:
$ git grep -El Mass\|Temple\|Franklin | xargs ./fsf.pl

Where fsf.pl is:
    #!/usr/bin/perl -w -pi.bak -0777
    my $repl = 'If not, see <http://www.gnu.org/licenses/>.';
    my $br = qr/(?:\s*\n\s*(?:[\*\#]|\/\/|\.\\" )?\s*|\s+)/;

    my $inwt = qr/[Ii]f${br}not,${br}write${br}(?:to${br})?the${br}Free${br}Software${br}Foundation,(?:${br}Inc\.,)?/;

    my $mass = qr/675${br}Mass${br}Ave,?${br}Cambridge,?${br}MA${br}02139,?${br}USA,?\.?/;
    my $franklin = qr/51${br}Franklin${br}St(?:reet)?(?:,${br}| - )Fifth${br}Floor,?${br}Boston,?${br}MA,?${br}02110-1301,?${br}USA,?\.?/;
    my $temple = qr/59${br}Temple${br}Place(?:,${br}| - )Suite${br}330,?${br}Boston,?${br}MA,?${br}021110?-1307,?${br}USA,?\.?/;

    s|$inwt$br$mass|$repl|m;
    s|$inwt$br$franklin|$repl|m;
    s|$inwt$br$temple|$repl|m;

The only remaining mentions of these addresses are in COPYING files which I
haven't touched.

Some of the changed files are imports from elsewhere, however
filtering them out is tricky, I think it is tolerable to have these
files be modified here and then perhaps reverted on the next sync,
since it's only 1-2 lines and obvious what is going on.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
2015-07-29 11:14:07 +01:00

80 lines
3.8 KiB
C

/******************************************************************************
*
* Copyright (c) 2009 Citrix Systems, Inc. (Grzegorz Milos)
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#include "memshr-priv.h"
/* Macros used to assemble the names */
#define BIDIR_NAME_ONE_INTERNAL(prefix, name) \
prefix ## _ ## name
#define BIDIR_NAME_TWO_INTERNAL(prefix, name1, name2) \
prefix ## _ ## name1 ## _ ## name2
#define BIDIR_NAME_ONE(prefix, name) \
BIDIR_NAME_ONE_INTERNAL(prefix, name)
#define BIDIR_NAME_TWO(prefix, name1, name2) \
BIDIR_NAME_TWO_INTERNAL(prefix, name1, name2)
#define INTERNAL_NAME_ONE(name) BIDIR_NAME_ONE(BIDIR_NAME_PREFIX, name)
#define INTERNAL_NAME_TWO(name1, name2) \
BIDIR_NAME_TWO(BIDIR_NAME_PREFIX, name1, name2)
/* Function/type names */
#define __k_t BIDIR_KEY_T
#define __v_t BIDIR_VALUE_T
#define __hash INTERNAL_NAME_ONE(hash)
#define __shm_hash_init INTERNAL_NAME_ONE(shm_hash_init)
#define __shm_hash_get INTERNAL_NAME_ONE(shm_hash_get)
#define __hash_init INTERNAL_NAME_ONE(hash_init)
#define __key_lookup INTERNAL_NAME_TWO(BIDIR_KEY, lookup)
#define __value_lookup INTERNAL_NAME_TWO(BIDIR_VALUE, lookup)
#define __insert INTERNAL_NAME_ONE(insert)
#define __key_remove INTERNAL_NAME_TWO(BIDIR_KEY, remove)
#define __value_remove INTERNAL_NAME_TWO(BIDIR_VALUE, remove)
#define __hash_destroy INTERNAL_NAME_ONE(hash_destroy)
#define __hash_iterator INTERNAL_NAME_ONE(hash_iterator)
#define __key_hash INTERNAL_NAME_TWO(BIDIR_KEY, hash)
#define __key_cmp INTERNAL_NAME_TWO(BIDIR_KEY, cmp)
#define __value_hash INTERNAL_NAME_TWO(BIDIR_VALUE, hash)
#define __value_cmp INTERNAL_NAME_TWO(BIDIR_VALUE, cmp)
#define __hash_sizes INTERNAL_NAME_ONE(hash_sizes)
/* Final function exports */
struct __hash* __shm_hash_init(unsigned long shm_baddr, unsigned long shm_size);
struct __hash* __shm_hash_get(unsigned long shm_baddr);
struct __hash *__hash_init (struct __hash *h, uint32_t min_size);
int __key_lookup (struct __hash *h, __k_t k, __v_t *vp);
int __value_lookup(struct __hash *h, __v_t v, __k_t *kp);
int __insert (struct __hash *h, __k_t k, __v_t v);
int __key_remove (struct __hash *h, __k_t k, __v_t *vp);
int __value_remove(struct __hash *h, __v_t v, __k_t *kp);
int __hash_destroy(struct __hash *h,
void (*entry_consumer)(__k_t k, __v_t v, void *p),
void *d);
int __hash_iterator(struct __hash *h,
int (*entry_consumer)(__k_t k, __v_t v, void *p),
void *d);
void __hash_sizes(struct __hash *h,
uint32_t *nr_ent,
uint32_t *max_nr_ent,
uint32_t *tab_size,
uint32_t *max_load,
uint32_t *min_load);