Skip to content

Commit

Permalink
dos.library fixes (@bebbo #151)
Browse files Browse the repository at this point in the history
  • Loading branch information
cnvogelg committed Mar 4, 2021
1 parent 168cee9 commit 66b4b8d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions amitools/vamos/lib/DosLibrary.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def SetFileDate(self, ctx):
self.get_current_dir(ctx), name, searchMulti=True
)
if sys_path == None:
log_file.info("file not found: '%s' -> '%s'" % (ami_path, sys_path))
log_dos.info("file not found: '%s' -> '%s'" % (ami_path, sys_path))
self.setioerr(ctx, ERROR_OBJECT_NOT_FOUND)
return self.DOSFALSE
else:
Expand All @@ -279,7 +279,7 @@ def GetProgramName(self, ctx):
n = len(prog_name)
# return error if name is too long, but copy buffer size
if n > max_len - 1:
self.setioerr(ctx, ERROR_LINE_TOOL_LONG)
self.setioerr(ctx, ERROR_LINE_TOO_LONG)
ret = self.DOSFALSE
prog_name = prog_name[0:max_len]
else:
Expand Down Expand Up @@ -411,6 +411,7 @@ def SetVar(self, ctx):
size = ctx.cpu.r_reg(REG_D3)
flags = ctx.cpu.r_reg(REG_D4)
name = ctx.mem.r_cstr(name_ptr)
vtype = flags & 0xff
if buff_ptr == 0:
if not flags & self.GVF_GLOBAL_ONLY:
node = self.find_var(ctx, name, vtype)
Expand Down Expand Up @@ -767,6 +768,7 @@ def VFWritef(self, ctx):
out = ""
pos = 0
state = ""
val = 0
while pos < len(fmt):
ch = fmt[pos].upper()
pos = pos + 1
Expand Down Expand Up @@ -1258,10 +1260,10 @@ def parsePattern(self, ctx, ignore_case=False):
return 0

def ParsePattern(self, ctx):
return self.ParsePattern(ctx)
return self.parsePattern(ctx, False)

def ParsePatternNoCase(self, ctx):
return self.ParsePattern(ctx, ignore_case=True)
return self.parsePattern(ctx, True)

def matchPattern(self, ctx, ignore_case=False):
pat_ptr = ctx.cpu.r_reg(REG_D1)
Expand Down

0 comments on commit 66b4b8d

Please sign in to comment.