1
0
mirror of https://gittea.dev/nova/th.git synced 2025-10-22 02:40:15 -04:00

removal of rand() in sort_rand

This commit is contained in:
nova
2025-10-05 00:57:18 +02:00
parent e979209de3
commit f0ad6295f7
3 changed files with 27 additions and 10 deletions

8
main.c
View File

@@ -21,7 +21,7 @@ unsigned int settings;
unsigned int file_modifiers;
unsigned int status = (STATUS_RUN_BACKEND | STATUS_UPDATE_SCREEN_MASK | STATUS_RELOAD_DIRECTORY);
char *start_path;
time_t seed;
time_t *seed;
WINDOW *win_t;
WINDOW *win_b;
@@ -102,7 +102,6 @@ int main(){
if (dt - t >= SETTINGS_RELOAD_DIR_DELTA) {
time(&t);
status |= (STATUS_RUN_BACKEND | STATUS_RELOAD_DIRECTORY);
srand(seed);
}
#endif
@@ -209,6 +208,9 @@ void init() {
char *start_path = getcwd(NULL, 0);
setenv("START_PATH", start_path, 0);
free(start_path);
seed = time(NULL);
seed = malloc(sizeof(time_t));
*seed = time(NULL);
printf("%ld", (time_t)&seed);
}