chiark
/
gitweb
/
~ian
/
sgt-puzzles.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix borders on the HTML menu bar.
[sgt-puzzles.git]
/
random.c
diff --git
a/random.c
b/random.c
index 4fcdda5502b2d9b01182650b0cd222e1c1715e39..fb54560c9570c12f19ca38c2f24a30188e230fc0 100644
(file)
--- a/
random.c
+++ b/
random.c
@@
-107,7
+107,7
@@
void SHA_Init(SHA_State * s)
s->lenhi = s->lenlo = 0;
}
s->lenhi = s->lenlo = 0;
}
-void SHA_Bytes(SHA_State * s, void *p, int len)
+void SHA_Bytes(SHA_State * s,
const
void *p, int len)
{
unsigned char *q = (unsigned char *) p;
uint32 wordblock[16];
{
unsigned char *q = (unsigned char *) p;
uint32 wordblock[16];
@@
-188,7
+188,7
@@
void SHA_Final(SHA_State * s, unsigned char *output)
}
}
}
}
-void SHA_Simple(void *p, int len, unsigned char *output)
+void SHA_Simple(
const
void *p, int len, unsigned char *output)
{
SHA_State s;
{
SHA_State s;
@@
-207,7
+207,7
@@
struct random_state {
int pos;
};
int pos;
};
-random_state *random_
init(
char *seed, int len)
+random_state *random_
new(const
char *seed, int len)
{
random_state *state;
{
random_state *state;
@@
-304,7
+304,7
@@
char *random_state_encode(random_state *state)
return dupstr(retbuf);
}
return dupstr(retbuf);
}
-random_state *random_state_decode(char *input)
+random_state *random_state_decode(c
onst c
har *input)
{
random_state *state;
int pos, byte, digits;
{
random_state *state;
int pos, byte, digits;