diff options
author | Karl Berry <karl@freefriends.org> | 2009-12-10 23:59:37 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2009-12-10 23:59:37 +0000 |
commit | a7f522b53649f0c836c40c76904e78e3ca2010bb (patch) | |
tree | f6a217bf5e48b4f7d3136e38da5ff8a9cd71ada1 | |
parent | c3fdfb314d8b7780daa5b967bf843fae5f80d283 (diff) |
use unsigned for hash fn
git-svn-id: svn://tug.org/texlive/trunk@16345 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/dvipsk/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/protos.h | 2 | ||||
-rw-r--r-- | Build/source/texk/dvipsk/resident.c | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index c90a23808c4..57e0a35be00 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -1,3 +1,9 @@ +2009-12-11 Alexander Cherepanov <cherepan@mccme.ru> + + * protos.h (hash): change decl. + * resident.c (hash): return and use unsigned instead of int. + tlsec mail, 05 Dec 2009 19:09:56. + 2009-09-26 Karl Berry <karl@tug.org> * config/config.ps (unknown): move to before nopaper; else diff --git a/Build/source/texk/dvipsk/protos.h b/Build/source/texk/dvipsk/protos.h index f96e88a3ef7..b36b4d1e221 100644 --- a/Build/source/texk/dvipsk/protos.h +++ b/Build/source/texk/dvipsk/protos.h @@ -250,7 +250,7 @@ extern char *makecopy(unsigned char *what, long len, unsigned char *p); extern void repack(struct tcd *cp); /* prototypes for functions from resident.c */ -extern int hash(char *s); +extern unsigned int hash(char *s); extern void revpslists(void); extern void cleanres(void); extern struct resfont *lookup(char *name); diff --git a/Build/source/texk/dvipsk/resident.c b/Build/source/texk/dvipsk/resident.c index 7522fd84164..b1d575e8b6f 100644 --- a/Build/source/texk/dvipsk/resident.c +++ b/Build/source/texk/dvipsk/resident.c @@ -37,10 +37,10 @@ struct header_list *ps_fonts_used ; /* * Our hash routine. */ -int +unsigned int hash(char *s) { - int h = 12 ; + unsigned h = 12 ; while (*s != 0) h = (h + h + *s++) % RESHASHPRIME ; |