Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Oleksii Turkot
CrystFEL
Commits
1f0da065
Commit
1f0da065
authored
Nov 14, 2010
by
Thomas White
Browse files
pattern_sim: Make random numbers really random
parent
49004f0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pattern_sim.c
View file @
1f0da065
...
...
@@ -273,6 +273,16 @@ int main(int argc, char *argv[])
}
/* FIXME: Make this optional */
if
(
1
)
{
FILE
*
fh
;
unsigned
int
seed
;
fh
=
fopen
(
"/dev/urandom"
,
"r"
);
fread
(
&
seed
,
sizeof
(
seed
),
1
,
fh
);
fclose
(
fh
);
srand
(
seed
);
}
if
(
filename
==
NULL
)
{
filename
=
strdup
(
"molecule.pdb"
);
}
...
...
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