get some single source instruction formats right and handle empty paths

properly
This commit is contained in:
Bill Currie 2003-08-05 17:27:47 +00:00
parent ada828bdc9
commit cbc6c40d33
2 changed files with 12 additions and 1 deletions

View file

@ -148,7 +148,7 @@ PR_Load_Source_File (progs_t *pr, const char *fname)
int len;
len = strlen (*dir) + strlen (fname) + 2;
path = Hunk_TempAlloc (len);
sprintf (path, "%s/%s", *dir, fname);
sprintf (path, "%s%s%s", *dir, **dir ? "/" : "", fname);
f->text = pr->load_file (pr, path);
}
if (!f->text) {

View file

@ -572,26 +572,32 @@ opcode_t pr_opcodes[] = {
{"!", "not.f", OP_NOT_F, false,
ev_float, ev_void, ev_integer,
PROG_ID_VERSION,
"%Ga, %gc",
},
{"!", "not.v", OP_NOT_V, false,
ev_vector, ev_void, ev_integer,
PROG_ID_VERSION,
"%Ga, %gc",
},
{"!", "not.s", OP_NOT_S, false,
ev_string, ev_void, ev_integer,
PROG_ID_VERSION,
"%Ga, %gc",
},
{"!", "not.ent", OP_NOT_ENT, false,
ev_entity, ev_void, ev_integer,
PROG_ID_VERSION,
"%Ga, %gc",
},
{"!", "not.fnc", OP_NOT_FNC, false,
ev_func, ev_void, ev_integer,
PROG_ID_VERSION,
"%Ga, %gc",
},
{"!", "not.p", OP_NOT_P, false,
ev_pointer, ev_void, ev_integer,
PROG_VERSION,
"%Ga, %gc",
},
{"<IF>", "if", OP_IF, false,
@ -828,6 +834,7 @@ opcode_t pr_opcodes[] = {
{"!", "not.i", OP_NOT_I, false,
ev_integer, ev_void, ev_integer,
PROG_VERSION,
"%Ga, %gc",
},
{"==", "eq.i", OP_EQ_I, false,
ev_integer, ev_integer, ev_integer,
@ -849,6 +856,7 @@ opcode_t pr_opcodes[] = {
{"!", "not.u", OP_NOT_U, false,
ev_uinteger, ev_void, ev_integer,
PROG_VERSION,
"%Ga, %gc",
},
{"==", "eq.u", OP_EQ_U, false,
ev_uinteger, ev_uinteger, ev_integer,
@ -883,6 +891,7 @@ opcode_t pr_opcodes[] = {
{"~", "bitnot.f", OP_BITNOT_F, false,
ev_float, ev_void, ev_float,
PROG_VERSION,
"%Ga, %gc",
},
{"^", "bitxor.i", OP_BITXOR_I, false,
ev_integer, ev_integer, ev_integer,
@ -891,6 +900,7 @@ opcode_t pr_opcodes[] = {
{"~", "bitnot.i", OP_BITNOT_I, false,
ev_integer, ev_void, ev_integer,
PROG_VERSION,
"%Ga, %gc",
},
{"^", "bitxor.u", OP_BITXOR_U, false,
ev_uinteger, ev_uinteger, ev_uinteger,
@ -899,6 +909,7 @@ opcode_t pr_opcodes[] = {
{"~", "bitnot.u", OP_BITNOT_U, false,
ev_uinteger, ev_void, ev_uinteger,
PROG_VERSION,
"%Ga, %gc",
},
{">=", "ge.p", OP_GE_P, false,