• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GLIB - Library of useful routines for C programming
2  * Copyright (C) 2006-2019 Free Software Foundation, Inc.
3  *
4  * This file is not part of the GNU gettext program, but is used with
5  * GNU gettext.
6  *
7  * The original copyright notice is as follows:
8  */
9 
10 /* GLIB - Library of useful routines for C programming
11  * Copyright (C) 1995-1997  Peter Mattis, Spencer Kimball and Josh MacDonald
12  *
13  * This library is free software; you can redistribute it and/or
14  * modify it under the terms of the GNU Lesser General Public
15  * License as published by the Free Software Foundation; either
16  * version 2 of the License, or (at your option) any later version.
17  *
18  * This library is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21  * Lesser General Public License for more details.
22  *
23  * You should have received a copy of the GNU Lesser General Public
24  * License along with this library; if not, write to the
25  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
26  * Boston, MA 02111-1307, USA.
27  */
28 
29 /*
30  * Modified by the GLib Team and others 1997-2000.  See the AUTHORS
31  * file for a list of people on the GLib Team.  See the ChangeLog
32  * files for a list of changes.  These files are distributed with
33  * GLib at ftp://ftp.gtk.org/pub/gtk/.
34  */
35 
36 /*
37  * Modified by Bruno Haible for use as a gnulib module.
38  */
39 
40 #ifndef __G_PRIMES_H__
41 #define __G_PRIMES_H__
42 
43 #include <glib/gtypes.h>
44 
45 G_BEGIN_DECLS
46 
47 /* Prime numbers.
48  */
49 
50 /* This function returns prime numbers spaced by approximately 1.5-2.0
51  * and is for use in resizing data structures which prefer
52  * prime-valued sizes.	The closest spaced prime function returns the
53  * next largest prime, or the highest it knows about which is about
54  * MAXINT/4.
55  */
56 guint	   g_spaced_primes_closest (guint num) G_GNUC_CONST;
57 
58 G_END_DECLS
59 
60 #endif /* __G_PRIMES_H__ */
61