Sync-to-go: update copyright for 2015
[s-roff.git] / src / lib-bib / common.cpp
blob524f37f98025aa014c3c601ecf515057d800fd2d
1 /*@
2 * Copyright (c) 2014 - 2015 Steffen (Daode) Nurpmeso <sdaoden@users.sf.net>.
4 * Copyright (C) 1989 - 1992 Free Software Foundation, Inc.
5 * Written by James Clark (jjc@jclark.com)
7 * This file is part of groff.
9 * This is free software; you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License as published by the Free
11 * Software Foundation; either version 2, or (at your option) any later
12 * version.
14 * This is distributed in the hope that it will be useful, but WITHOUT ANY
15 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 * for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with groff; see the file COPYING. If not, write to the Free Software
21 * Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA.
24 unsigned hash(const char *s, int len) /* FIXME use Torek's hash?! -> libroff */
26 unsigned h = 0;
27 while (--len >= 0)
28 h = *s++ + 65587*h;
29 return h;
32 // s-it2-mod