Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
88cad537
Commit
88cad537
authored
Apr 26, 2000
by
Michael Graff
Browse files
fix problem with alpha
parent
f6cdcafa
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/dns/gen.c
View file @
88cad537
...
...
@@ -15,7 +15,7 @@
* SOFTWARE.
*/
/* $Id: gen.c,v 1.4
0
2000/04/2
5 21:10:33
explorer Exp $ */
/* $Id: gen.c,v 1.4
1
2000/04/2
6 17:27:01
explorer Exp $ */
#include
<config.h>
...
...
@@ -429,8 +429,12 @@ HASH(char *string)
unsigned
char
a
,
b
;
n
=
strlen
(
string
);
a
=
tolower
(
string
[
0
]);
b
=
tolower
(
string
[
n
-
1
]);
if
(
n
==
0
)
{
fprintf
(
stderr
,
"n == 0?
\n
"
);
exit
(
1
);
}
a
=
tolower
((
unsigned
char
)
string
[
0
]);
b
=
tolower
((
unsigned
char
)
string
[
n
-
1
]);
return
((
a
+
n
)
*
b
)
%
256
;
}
...
...
@@ -650,6 +654,8 @@ main(int argc, char **argv) {
*/
for
(
j
=
i
;
j
<=
255
;
j
++
)
{
ttn2
=
&
typenames
[
j
];
if
(
ttn
->
sorted
!=
0
)
continue
;
if
(
hash
==
HASH
(
ttn2
->
typename
))
{
printf
(
"
\t\t\t
if (strcasecmp(
\"
%s
\"
, (_typename)) == 0) {
\\\n
"
"
\t\t\t\t
if ((typeattr[%u].flags & DNS_RDATATYPEATTR_RESERVED) != 0)
\\\n
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment