mirror of
https://github.com/onyx-and-iris/vmrcli.git
synced 2025-04-19 20:43:49 +01:00
Compare commits
No commits in common. "9388844acb6aeb33efcbc00354d7fd5d6c791f1d" and "7c46f30e62dcef74b1ceb3049cf1f3f17f0e934c" have entirely different histories.
9388844acb
...
7c46f30e62
@ -10,8 +10,6 @@
|
||||
|
||||
#include "VoicemeeterRemote.h"
|
||||
|
||||
#define IS_64_BIT sizeof(void *) == 8
|
||||
|
||||
PT_VMR create_interface();
|
||||
|
||||
#endif /* __IVMR_H__ */
|
@ -81,7 +81,7 @@ static long initialize_dll_interfaces(PT_VMR vmr)
|
||||
return -100;
|
||||
}
|
||||
// use right dll according to O/S type
|
||||
if (IS_64_BIT)
|
||||
if (sizeof(void *) == 8)
|
||||
strncat(dll_fullpath, DLL64_NAME, DLL_FULLPATH_SZ - strlen(DLL64_NAME) - 1);
|
||||
else
|
||||
strncat(dll_fullpath, DLL32_NAME, DLL_FULLPATH_SZ - strlen(DLL32_NAME) - 1);
|
||||
|
@ -118,7 +118,7 @@ void log_set_quiet(bool enable)
|
||||
|
||||
int log_add_callback(log_LogFn fn, void *udata, int level)
|
||||
{
|
||||
for (int i = 0; i < MAX_CALLBACKS; ++i)
|
||||
for (int i = 0; i < MAX_CALLBACKS; i++)
|
||||
{
|
||||
if (!L.callbacks[i].fn)
|
||||
{
|
||||
@ -163,7 +163,7 @@ void log_log(int level, const char *file, int line, const char *fmt, ...)
|
||||
va_end(ev.ap);
|
||||
}
|
||||
|
||||
for (int i = 0; i < MAX_CALLBACKS && L.callbacks[i].fn; ++i)
|
||||
for (int i = 0; i < MAX_CALLBACKS && L.callbacks[i].fn; i++)
|
||||
{
|
||||
Callback *cb = &L.callbacks[i];
|
||||
if (level >= cb->level)
|
||||
|
@ -92,7 +92,7 @@ bool is_comment(char *s)
|
||||
*/
|
||||
struct quickcommand *command_in_quickcommands(const char *command_key, const struct quickcommand *quickcommands, int n)
|
||||
{
|
||||
for (int i = 0; i < n; ++i)
|
||||
for (int i = 0; i < n; i++)
|
||||
{
|
||||
if (strcmp(command_key, quickcommands[i].name) == 0)
|
||||
{
|
||||
|
13
src/vmrcli.c
13
src/vmrcli.c
@ -191,7 +191,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = optind; i < argc; ++i)
|
||||
for (int i = optind; i < argc; i++)
|
||||
{
|
||||
parse_input(vmr, argv[i]);
|
||||
}
|
||||
@ -240,11 +240,11 @@ static void usage()
|
||||
static enum kind set_kind(char *kval)
|
||||
{
|
||||
if (strcmp(kval, "basic") == 0)
|
||||
return IS_64_BIT ? BASICX64 : BASIC;
|
||||
return sizeof(void *) == 8 ? BASICX64 : BASIC;
|
||||
else if (strcmp(kval, "banana") == 0)
|
||||
return IS_64_BIT ? BANANAX64 : BANANA;
|
||||
return sizeof(void *) == 8 ? BANANAX64 : BANANA;
|
||||
else if (strcmp(kval, "potato") == 0)
|
||||
return IS_64_BIT ? POTATOX64 : POTATO;
|
||||
return sizeof(void *) == 8 ? POTATOX64 : POTATO;
|
||||
else
|
||||
return UNKNOWN;
|
||||
}
|
||||
@ -266,11 +266,12 @@ static void interactive(PT_VMR vmr, bool with_prompt)
|
||||
printf(">> ");
|
||||
while (fgets(input, MAX_LINE, stdin) != NULL)
|
||||
{
|
||||
input[(len = strcspn(input, "\n"))] = 0;
|
||||
if (len == 1 && toupper(input[0]) == 'Q')
|
||||
input[strcspn(input, "\n")] = 0;
|
||||
if ((len = strlen(input)) == 1 && toupper(input[0]) == 'Q')
|
||||
break;
|
||||
|
||||
parse_input(vmr, input);
|
||||
memset(input, 0, len); /* reset input buffer */
|
||||
|
||||
if (with_prompt)
|
||||
printf(">> ");
|
||||
|
Loading…
x
Reference in New Issue
Block a user