replace all time_t/__time64_t with hc_time_t and all related functions

This commit is contained in:
philsmd
2017-08-16 19:43:41 +02:00
parent 21e9c63d46
commit e33e828bc6
16 changed files with 94 additions and 101 deletions

View File

@@ -62,8 +62,8 @@ void hc_string_trim_leading (char *s);
size_t hc_fread (void *ptr, size_t size, size_t nmemb, FILE *stream);
void hc_fwrite (const void *ptr, size_t size, size_t nmemb, FILE *stream);
void hc_time (hc_time_t *t);
struct tm *hc_gmtime (hc_time_t *t);
char *hc_ctime (hc_time_t *t, char *buf, MAYBE_UNUSED size_t buf_size);
hc_time_t hc_time (hc_time_t *t);
struct tm *hc_gmtime (const hc_time_t *t, MAYBE_UNUSED struct tm *result);
char *hc_ctime (const hc_time_t *t, char *buf, MAYBE_UNUSED const size_t buf_size);
#endif // _SHARED_H

View File

@@ -22,7 +22,7 @@
#endif // _WIN
void welcome_screen (hashcat_ctx_t *hashcat_ctx, const char *version_tag);
void goodbye_screen (hashcat_ctx_t *hashcat_ctx, const time_t proc_start, const time_t proc_stop);
void goodbye_screen (hashcat_ctx_t *hashcat_ctx, const hc_time_t proc_start, const hc_time_t proc_stop);
int setup_console (void);

View File

@@ -760,9 +760,9 @@ typedef struct hash
typedef struct outfile_data
{
char *file_name;
off_t seek;
time_t ctime;
char *file_name;
off_t seek;
hc_time_t ctime;
} outfile_data_t;
@@ -889,8 +889,8 @@ typedef struct bs_word
typedef struct cpt
{
u32 cracked;
time_t timestamp;
u32 cracked;
hc_time_t timestamp;
} cpt_t;
@@ -1694,10 +1694,10 @@ typedef struct cpt_ctx
{
bool enabled;
cpt_t *cpt_buf;
int cpt_pos;
time_t cpt_start;
u64 cpt_total;
cpt_t *cpt_buf;
int cpt_pos;
hc_time_t cpt_start;
u64 cpt_total;
} cpt_ctx_t;
@@ -1839,8 +1839,8 @@ typedef struct status_ctx
* timer
*/
time_t runtime_start;
time_t runtime_stop;
hc_time_t runtime_start;
hc_time_t runtime_stop;
hc_timer_t timer_running; // timer on current dict
hc_timer_t timer_paused; // timer on current dict
@@ -1880,7 +1880,7 @@ typedef struct cache_generate
u64 cnt;
u64 cnt2;
time_t runtime;
hc_time_t runtime;
} cache_generate_t;