File:  [Research Unix] / researchv9 / cmd / emacs / macros / debug
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:59 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv9-SUN3_old, researchv9-SUN3, HEAD
researchv9-SUN3(old)

display_killstack -- display contents of killstack

Warren Montgomery, Version 3.5

This package contains misc macros for help in debugging/general
programming.

  display_killstack displays the current contents of
the kill stack in a temp buffer.  The bottom two items of the kill
stack will be lost through this.  Typing ^Z returns you to where you
left off.  This macro can be used in debugging other macros to
give you a chance to see the state of the world in the middle
of the macro

�	initialize count
B<killstack
		goto scratch file
��-	empty it
^�%	while more stuff in kill stack to float to top
	
	Kill stack item number: �PNUMB
	
	%extract item and swap
	�11~	increment item counter
	��B%
PNUMB  -- print a number

Warren Montgomery, Version 3.5
This macro converts its argument to decimal and inserts it in the buffer.

|�
	�2~1011~060�� <10, print
	� 14~10�PNUMB
11~06015~10��
�
TO_DECIMAL  	Converts a number on the kill stack to a decimal return value

Warren Montgomery (EMACS 4.0)

 This macro takes the item on the top of the kill stack, converts
 it to an integer, and returns the value as its result.

- �0	Initialize answer to zeero
^�	While More to convert
�11~13~1012~�0Process next digit
-		Delete it and go back to the end
�-

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.