Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- *** amforth-shell.py.orig 2025-12-30 11:19:04.875143287 +1100
- --- amforth-shell.py 2025-12-30 11:29:30.213850147 +1100
- ***************
- *** 1242,1259 ****
- atexit.register(readline.write_history_file, histfn)
- def _update_words(self):
- # get all words that are available in the search order
- self.send_line("base @ decimal dp u. base !")
- dp = self.read_response()
- if dp[-3:] != " ok":
- ! return # Something went wrong, just silently ignore
- dp = int(dp[:-3])
- if self._amforth_dp != dp:
- self._amforth_dp = dp
- self.send_line("words")
- words = self.read_response()
- if words[-3:] != " ok":
- ! return # Something went wrong, just silently ignore
- self._amforth_words = words.split(" ") + self.interact_directives
- def _update_stack(self):
- --- 1242,1262 ----
- atexit.register(readline.write_history_file, histfn)
- def _update_words(self):
- + self.progress_callback("Information", None, "getting words")
- # get all words that are available in the search order
- self.send_line("base @ decimal dp u. base !")
- dp = self.read_response()
- if dp[-3:] != " ok":
- ! self.progress_callback("Error", None, "setting base")
- ! return
- dp = int(dp[:-3])
- if self._amforth_dp != dp:
- self._amforth_dp = dp
- self.send_line("words")
- words = self.read_response()
- if words[-3:] != " ok":
- ! self.progress_callback("Error", None, "reading words")
- ! return
- self._amforth_words = words.split(" ") + self.interact_directives
- def _update_stack(self):
- ***************
- *** 1261,1267 ****
- self.send_line(".s")
- words=self.read_response()
- if words[-3:] != " ok":
- ! return # Something went wrong, just silently ignore
- self._amforth_stack=words[:-3]
- def _update_cpu(self):
- --- 1264,1271 ----
- self.send_line(".s")
- words=self.read_response()
- if words[-3:] != " ok":
- ! self.progress_callback("Error", None, "getting stack")
- ! return
- self._amforth_stack=words[:-3]
- def _update_cpu(self):
- ***************
- *** 1269,1275 ****
- self.send_line("s\" cpu\" environment search-wordlist drop execute itype")
- words = self.read_response()
- if words[-3:] != " ok":
- ! return # Something went wrong, just silently ignore
- mcudef = words[:-3].lower()
- self._amforth_regs = {}
- if mcudef.startswith("msp"):
- --- 1273,1280 ----
- self.send_line("s\" cpu\" environment search-wordlist drop execute itype")
- words = self.read_response()
- if words[-3:] != " ok":
- ! self.progress_callback("Error", None, "update CPU")
- ! return
- mcudef = words[:-3].lower()
- self._amforth_regs = {}
- if mcudef.startswith("msp"):
- ***************
- *** 1347,1356 ****
- "#timeout", "#timeout-next"]:
- self._rl_matches = []
- else:
- ! self._rl_matches = [w + " " for w in self._amforth_words+self._amforth_regs.keys()
- if not text or w.startswith(text)]
- else:
- ! self._rl_matches = [w + " " for w in self._amforth_words+self._amforth_regs.keys()
- if not text or w.startswith(text)]
- if self._rl_matches:
- return self._rl_matches[0]
- --- 1352,1363 ----
- "#timeout", "#timeout-next"]:
- self._rl_matches = []
- else:
- ! self._rl_matches = [w + " " for w in self._amforth_words+
- ! list(self._amforth_regs.keys())
- if not text or w.startswith(text)]
- else:
- ! self._rl_matches = [w + " " for w in self._amforth_words+
- ! list(self._amforth_regs.keys())
- if not text or w.startswith(text)]
- if self._rl_matches:
- return self._rl_matches[0]
Advertisement
Add Comment
Please, Sign In to add comment