/*
- * Copyright (C) 2012
+ * Copyright (C) 2012, 2013
* Wolfgang Bumiller
* Dale Weiler
*
st.function = func;
if (prog->xflags & VMXF_TRACE) {
- vec_push(prog->function_stack, prog_getstring(prog, func->name));
+ const char *str = prog_getstring(prog, func->name);
+ vec_push(prog->function_stack, str);
}
#ifdef QCVM_BACKUP_STRATEGY_CALLER_VARS
--argc;
++argv;
- if (argc < 3) {
+ if (argc < 2) {
usage();
exit(1);
}
}
else
{
+ printf("unknown parameter: %s\n", argv[1]);
usage();
exit(1);
}
}
- if (argc > 2) {
- usage();
- exit(1);
- }
- if (argc > 1) {
- if (progsfile) {
- printf("only 1 program file may be specified\n");
- usage();
- exit(1);
- }
+ if (argc == 2 && !progsfile) {
progsfile = argv[1];
--argc;
++argv;
}
if (!progsfile) {
+ printf("must specify a program to execute\n");
usage();
exit(1);
}