1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 07:08:19 +00:00

Get rid of data. global variable in wordlist.c

This commit is contained in:
jsteube 2016-09-28 22:52:42 +02:00
parent de5d0349c6
commit ee30055401
3 changed files with 11 additions and 32 deletions

View File

@ -6,6 +6,9 @@
#ifndef _WORDLIST_H
#define _WORDLIST_H
#include <time.h>
#include <inttypes.h>
uint convert_from_hex (char *line_buf, const uint line_len, const user_options_t *user_options);
void load_segment (wl_data_t *wl_data, FILE *fd);

View File

@ -7,7 +7,7 @@
#include "types.h"
#include "memory.h"
#include "logging.h"
#include "data.h"
#include "hwmon.h"
hc_thread_mutex_t mux_hwmon;
@ -666,7 +666,7 @@ int hm_get_throttle_with_device_id (const hwmon_ctx_t *hwmon_ctx, const opencl_c
return -1;
}
int hm_set_fanspeed_with_device_id_adl (hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed, const int fanpolicy)
int hm_set_fanspeed_with_device_id_adl (const hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed, const int fanpolicy)
{
if (hwmon_ctx->hm_device[device_id].fan_set_supported == true)
{
@ -724,7 +724,7 @@ int hm_set_fanspeed_with_device_id_adl (hwmon_ctx_t *hwmon_ctx, const uint devic
return -1;
}
int hm_set_fanspeed_with_device_id_nvapi (hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed, const int fanpolicy)
int hm_set_fanspeed_with_device_id_nvapi (const hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed, const int fanpolicy)
{
if (hwmon_ctx->hm_device[device_id].fan_set_supported == true)
{
@ -757,7 +757,7 @@ int hm_set_fanspeed_with_device_id_nvapi (hwmon_ctx_t *hwmon_ctx, const uint dev
return -1;
}
int hm_set_fanspeed_with_device_id_xnvctrl (hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed)
int hm_set_fanspeed_with_device_id_xnvctrl (const hwmon_ctx_t *hwmon_ctx, const uint device_id, const int fanspeed)
{
if (hwmon_ctx->hm_device[device_id].fan_set_supported == true)
{

View File

@ -5,38 +5,14 @@
#include "common.h"
#include "types.h"
#include "interface.h"
#include "timer.h"
#include "memory.h"
#include "convert.h"
#include "logging.h"
#include "logfile.h"
#include "ext_OpenCL.h"
#include "ext_ADL.h"
#include "ext_nvapi.h"
#include "ext_nvml.h"
#include "ext_xnvctrl.h"
#include "tuningdb.h"
#include "thread.h"
#include "opencl.h"
#include "hwmon.h"
#include "restore.h"
#include "hash_management.h"
#include "locking.h"
#include "rp_cpu.h"
#include "rp_kernel_on_cpu.h"
#include "shared.h"
#include "convert.h"
#include "dictstat.h"
#include "mpsp.h"
#include "outfile.h"
#include "potfile.h"
#include "debugfile.h"
#include "loopback.h"
#include "data.h"
#include "thread.h"
#include "rp_cpu.h"
#include "wordlist.h"
extern hc_global_data_t data;
uint convert_from_hex (char *line_buf, const uint line_len, const user_options_t *user_options)
{
if (line_len & 1) return (line_len); // not in hex
@ -443,7 +419,7 @@ void wl_data_init (wl_data_t *wl_data, const user_options_t *user_options, const
wl_data->func = get_next_word_uc;
}
if (hashconfig->hash_type == HASH_TYPE_LM) // yes that's fine that way
if (hashconfig->hash_mode == 3000) // yes that's fine that way
{
wl_data->func = get_next_word_lm;
}