mirror of
https://github.com/onyx-and-iris/vmrcli.git
synced 2024-11-15 17:40:56 +00:00
remove unnecessary args in log_trace calls
ensure we shift a char after copying next command from input buffer
This commit is contained in:
parent
3c46b3d9f3
commit
161b1061c4
@ -92,13 +92,13 @@ bool is_pdirty(T_VBVMR_INTERFACE *vmr)
|
|||||||
|
|
||||||
long get_parameter_float(T_VBVMR_INTERFACE *vmr, char *param, float *f)
|
long get_parameter_float(T_VBVMR_INTERFACE *vmr, char *param, float *f)
|
||||||
{
|
{
|
||||||
log_trace("VBVMR_GetParameterFloat(%s, <float> *f)", param, f);
|
log_trace("VBVMR_GetParameterFloat(%s, <float> *f)", param);
|
||||||
return vmr->VBVMR_GetParameterFloat(param, f);
|
return vmr->VBVMR_GetParameterFloat(param, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
long get_parameter_string(T_VBVMR_INTERFACE *vmr, char *param, unsigned short *s)
|
long get_parameter_string(T_VBVMR_INTERFACE *vmr, char *param, unsigned short *s)
|
||||||
{
|
{
|
||||||
log_trace("VBVMR_GetParameterStringW(%s, <unsigned short> *s)", param, s);
|
log_trace("VBVMR_GetParameterStringW(%s, <unsigned short> *s)", param);
|
||||||
return vmr->VBVMR_GetParameterStringW(param, s);
|
return vmr->VBVMR_GetParameterStringW(param, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -171,9 +171,8 @@ int init_voicemeeter(T_VBVMR_INTERFACE *vmr, int kind)
|
|||||||
|
|
||||||
void interactive(T_VBVMR_INTERFACE *vmr)
|
void interactive(T_VBVMR_INTERFACE *vmr)
|
||||||
{
|
{
|
||||||
char input[MAX_LINE];
|
char input[MAX_LINE], command[MAX_LINE];
|
||||||
char *p = input;
|
char *p = input;
|
||||||
char command[MAX_LINE];
|
|
||||||
int i;
|
int i;
|
||||||
size_t len;
|
size_t len;
|
||||||
|
|
||||||
@ -199,14 +198,15 @@ void interactive(T_VBVMR_INTERFACE *vmr)
|
|||||||
while (!isspace(*p))
|
while (!isspace(*p))
|
||||||
command[i++] = *p++;
|
command[i++] = *p++;
|
||||||
command[i] = '\0';
|
command[i] = '\0';
|
||||||
|
p++; /* shift to next char */
|
||||||
|
|
||||||
if (command[0] != '\0')
|
if (command[0] != '\0')
|
||||||
parse_command(vmr, command);
|
parse_command(vmr, command);
|
||||||
memset(command, '\0', sizeof(command));
|
memset(command, '\0', MAX_LINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
p = input; /* reset pointer */
|
p = input; /* reset pointer */
|
||||||
memset(input, '\0', sizeof(input)); /* reset input buffer */
|
memset(input, '\0', MAX_LINE); /* reset input buffer */
|
||||||
printf(">> ");
|
printf(">> ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user