* mdocml: Removed `.' entry from -man hashtable.
@ 2010-05-15 22:49 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2010-05-15 22:49 UTC (permalink / raw)
To: source
Log Message:
-----------
Removed `.' entry from -man hashtable.
Modified Files:
--------------
mdocml:
man_hash.c
Revision Data
-------------
Index: man_hash.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/man_hash.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -Lman_hash.c -Lman_hash.c -u -p -r1.19 -r1.20
--- man_hash.c
+++ man_hash.c
@@ -31,9 +31,7 @@
#define HASH_DEPTH 6
#define HASH_ROW(x) do { \
- if ('.' == (x)) \
- (x) = 26; \
- else if (isupper((u_char)(x))) \
+ if (isupper((u_char)(x))) \
(x) -= 65; \
else \
(x) -= 97; \
@@ -47,7 +45,7 @@
* macro (the integer value of the enum stored as a char to save a bit
* of space).
*/
-static u_char table[27 * HASH_DEPTH];
+static u_char table[26 * HASH_DEPTH];
/*
* XXX - this hash has global scope, so if intended for use as a library
@@ -66,7 +64,7 @@ man_hash_init(void)
for (i = 0; i < (int)MAN_MAX; i++) {
x = man_macronames[i][0];
- assert(isalpha((u_char)x) || '.' == x);
+ assert(isalpha((u_char)x));
HASH_ROW(x);
@@ -89,7 +87,7 @@ man_hash_find(const char *tmp)
if ('\0' == (x = tmp[0]))
return(MAN_MAX);
- if ( ! (isalpha((u_char)x) || '.' == x))
+ if ( ! (isalpha((u_char)x)))
return(MAN_MAX);
HASH_ROW(x);
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-15 22:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-15 22:49 mdocml: Removed `.' entry from -man hashtable kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).