mirror of
https://github.com/ksherlock/merlin-utils.git
synced 2025-01-02 05:29:45 +00:00
add PFX command.
This commit is contained in:
parent
b6e397b959
commit
f3e04aa7d4
21
link.cpp
21
link.cpp
@ -604,6 +604,16 @@ static std::string basename(const std::string &str) {
|
|||||||
return str.substr(0, ix);
|
return str.substr(0, ix);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* fixup GS/OS strings. */
|
||||||
|
static void fix_path(std::string &s) {
|
||||||
|
for (char &c : s)
|
||||||
|
if (c == ':') c = '/';
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
SEG name -> undocumented? command to set the OMF segment name (linker 3 only)
|
||||||
|
|
||||||
|
*/
|
||||||
void evaluate(label_t label, opcode_t opcode, const char *cursor) {
|
void evaluate(label_t label, opcode_t opcode, const char *cursor) {
|
||||||
|
|
||||||
// todo - should move operand parsing to here.
|
// todo - should move operand parsing to here.
|
||||||
@ -674,6 +684,17 @@ void evaluate(label_t label, opcode_t opcode, const char *cursor) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case OP_PFX: {
|
||||||
|
|
||||||
|
std::string path = path_operand(cursor);
|
||||||
|
fix_path(path);
|
||||||
|
|
||||||
|
int ok = chdir(path.c_str());
|
||||||
|
if (ok < 0)
|
||||||
|
warn("PFX %s", path.c_str());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
case OP_TYP:
|
case OP_TYP:
|
||||||
ftype = number_operand(cursor, file_types, OP_REQUIRED | OP_INSENSITIVE);
|
ftype = number_operand(cursor, file_types, OP_REQUIRED | OP_INSENSITIVE);
|
||||||
|
Loading…
Reference in New Issue
Block a user