mirror of
https://github.com/hashcat/hashcat.git
synced 2024-11-13 19:28:56 +00:00
28 lines
432 B
C
28 lines
432 B
C
|
/**
|
||
|
* Author......: See docs/credits.txt
|
||
|
* License.....: MIT
|
||
|
*/
|
||
|
|
||
|
#include "common.h"
|
||
|
#include "types.h"
|
||
|
#include "ext_hiprtc.h"
|
||
|
|
||
|
int hiprtc_make_options_array_from_string (char *string, char **options)
|
||
|
{
|
||
|
char *saveptr = NULL;
|
||
|
|
||
|
char *next = strtok_r (string, " ", &saveptr);
|
||
|
|
||
|
int cnt = 0;
|
||
|
|
||
|
do
|
||
|
{
|
||
|
options[cnt] = next;
|
||
|
|
||
|
cnt++;
|
||
|
|
||
|
} while ((next = strtok_r ((char *) NULL, " ", &saveptr)) != NULL);
|
||
|
|
||
|
return cnt;
|
||
|
}
|