summaryrefslogtreecommitdiff
path: root/babl/babl-db.h
diff options
context:
space:
mode:
authorØyvind Kolås <ok@src.gnome.org>2005-08-24 15:09:55 +0000
committerØyvind Kolås <ok@src.gnome.org>2005-08-24 15:09:55 +0000
commitbee3d8eb125b26b497f7001e2d23e34aebd36752 (patch)
treea3bb4da0e6aed19e0ba4bd4675f45c43e13b684e /babl/babl-db.h
parent965d0e1a5ed2a9f042fac36c55136cc566fdcab9 (diff)
s/PixelFormat/Format/g
Diffstat (limited to 'babl/babl-db.h')
-rw-r--r--babl/babl-db.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/babl/babl-db.h b/babl/babl-db.h
index f0b4abe..270634d 100644
--- a/babl/babl-db.h
+++ b/babl/babl-db.h
@@ -38,6 +38,15 @@
#define DB_INCREMENT_SIZE 16
#endif
+static inline int hash (char *str)
+{
+ int ret = 0;
+ int i = 1;
+
+ while (*str)
+ ret = (ret + ( i++ * (*str ++ & 31 ))) % 199;
+ return ret;
+}
/* file scope variables, for this .c file's database */
static int db_size = 0;