home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s038 / 10.ddi / 1021.LIF / AEDIT.MAC < prev    next >
Encoding:
Text File  |  1992-07-02  |  5.6 KB  |  143 lines

  1. SM4,4,74;
  2. SAn;SIy;
  3. snn;            \* tabs *\
  4. SV12;
  5. SCn;
  6. SBy;
  7. ST4;
  8. M \BR\TB\MM;     \* allows space to scroll options in addition to tab *\
  9.  
  10.                                                 \* Upper/Lower macros *\
  11. ML\BReu2l\NL\CR\XN8eLU11\BR\MM;  \* lower char *\
  12. MU\BRel2u\NL\CR\XN8eLU11\BR\MM;  \* upper char *\
  13. MLW\BRe+W\NL/el12\NLe+W\BR\MM;   \* lower word *\
  14. MUW\BRe+W\NL/eu12\NLe+W\BR\MM;   \* upper word *\
  15. MU2L\BRCn8=(n9=lowch)<>curch\NL\MM;
  16. ML2U\BRCn8=(n9=upch )<>curch\NL\MM;
  17. MLU11\BR\CLsrax\XN9\BR\MM;
  18. ML12\BRCn7=iswhte|eof\NL\XN7f~\RB\BRl\MM;
  19. MU12\BRCn7=iswhte|eof\NL\XN7f~\RB\BRu\MM;
  20.  
  21. M\017\BR0f~\RB\BR/e\0171\NL/e\0172\NL\MM;     \* Word right macros ^W *\
  22. M\0171\BRcn9=iswhte\NL\XN9f\BR\CR\MM;
  23. M\0172\BRcn9=!isdel\NL\XN9f\BR\CR\MM;
  24.  
  25. M\00B\BR0f~\RB\BR\CL/e\0111\NL/e\0112\NL\CR\MM;\* Word left macros ^K *\
  26. M\0112\BRcn9=iswhte\NL\XN9f\BR\CL\MM;
  27. M\0111\BRcn9=!isdel\NL\XN9f\BR\CL\MM;
  28.  
  29. M]\BRsl+3\NL\MM;                       \* Horizontal Scrolling Macros *\
  30. M[\BRsl-3\NL\MM;
  31. M}\BRsl+30\NL\MM;
  32. M{\BRsl-30\NL\MM;
  33. M,\BRsl0\NL\MM;
  34. M.\BRsl+1\NL\MM;
  35.  
  36.                                                  \* skip white spaces *\
  37. M+W\BR/e+W1\BR\MM;
  38. M+w1\BRcn9=!iswhte\NL\XN9f~\RB\BR\CR\MM;
  39.  
  40.                                              \* skip non white spaces *\
  41. M+N\BR/e+N1\BR\MM;
  42. M+n1\BRcn9=iswhte\NL\XN9f~\RB\BR\CR\MM;
  43.  
  44.                                                        \* skip blanks *\
  45. M+B\BR/e+B1\BR\MM;
  46. M+b1\BRcn9=!(curch==20H)\NL\XN9f~\RB\BR\CR\MM;
  47.  
  48.                                             \* back skip white spaces *\
  49. M-W\BR/e-W1\BR\MM;
  50. M-w1\BRcn9=!iswhte\NL\XN9f~\RB\BR\CL\MM;
  51.  
  52.                                         \* back skip non white spaces *\
  53. M-N\BR/e-N1\BR\MM;
  54. M-n1\BRcn9=iswhte\NL\XN9f~\RB\BR\CL\MM;
  55.  
  56.                                                   \* back skip blanks *\
  57. M-B\BR/e-B1\BR\MM;
  58. M-b1\BRcn9=!(curch==20H)\NL\XN9f~\RB\BR\CL\MM;
  59.  
  60.                               \* put the date into the text (7/28/87) *\
  61. MDATE\BRi\BRCN1=date\NLsrdi\XN1\CL\CL/\CL\CL\CL/\CR\CR\CR\CR\CR\BR\MM
  62. M++\BRF \BR-\BRB-\BRF\BRBN\XAN1=1+\XSB\BRSRDX\XN1\BR-\BRF\BR\MM
  63.  
  64.                             \* Dates Macro - American (July 28, 1987) *\
  65. MDD\BRsrdcn9=date\\100\NLcn8=(date/100)\\100\NLcn7=date/10000\NLe~\XN7\NL
  66. i \XN8, 19\XN9\BR\MM;
  67.  
  68.                               \* Dates Macro - European (28-Jul-1987) *\
  69. MDT\BRsrdcn9=date\\100\NLcn8=(date/100)\\100+100\NLcn7=date/10000\NL
  70. i\XN8\BR2\CL\RBtd2\CRi-\BRe~\XN7\NLdjd6\CRdi-19\XN9\BR\MM;
  71.  
  72.                                                      \* Months Macros *\
  73. M~1\BRiJanuary\BR\MM;
  74. M~2\BRiFebruary\BR\MM;
  75. M~3\BRiMarch\BR\MM;
  76. M~4\BRiApril\BR\MM;
  77. M~5\BRiMay\BR\MM;
  78. M~6\BRiJune\BR\MM;
  79. M~7\BRiJuly\BR\MM;
  80. M~8\BRiAugust\BR\MM;
  81. M~9\BRiSeptember\BR\MM;
  82. M~10\BRiOctober\BR\MM;
  83. M~11\BRiNovember\BR\MM;
  84. M~12\BRiDecember\BR\MM;
  85.  
  86. M\002\BRG\NL\MM;
  87.  
  88.                                                 \* center a text line *\
  89. MCNTR\BRjp0\NLe+b\NL\XXjp254\NLi \BR\CLe-b\NL\CR\XAcn9=(rmargn+1+lmargn-col)/2
  90. \NLcn9=-n9*(n9>0)\NLjp0\NLi \BRb\CLb\XF\XN9g\NL\NL\MM;
  91.  
  92.                                         \* convert all tabs to blanks *\
  93. MDETAB\BRsknsny/eDE1\NL\MM;
  94. Mde1\BRf\TB\BR\RBi\TB\BR\MM;
  95.  
  96.                                         \* convert all blanks to tabs *\
  97. MENTAB\BR/een1\NL\MM
  98. MEN1\BRf \BR\CLcn7=!(n8=(n9=nxttab)==0)\BRjp\XN9\BR\XN8\CD\XN7\CL
  99. cn9=(curch==20h)\NL\XN9een2\BR\MM
  100. MEN2\BRtdE-B\NL\CRdjd\CRdi\XH09\BR\MM
  101.  
  102.                                        \* display current line number *\
  103. MSHL\BRtaeflf\NLjacn9=cntfnd+1\NLcs9="current line: \XN9"\NLcs9\NL\MM;
  104. Mflf\BRskn/-\XH0a\BR\MM;
  105. MSFL\BRtajeeflf\NLjacn9=cntfnd+1\NLcs9="file size (lines): \XN9"\NLcs9\NL\MM;
  106. MSFC\BRtajecn9=curpos\NLjacs9="file size (bytes): \XN9"\NLcs9\NL\MM;
  107.  
  108.                                           \* display current position *\
  109. MSHP\BRcn9=col\NLcs9="current position: \XN9"\NLcs9\NL\MM;
  110.  
  111.                                        \* insert line numbers in file *\
  112. MNUM\BRcn9=10000\NL\BRjs/enm1\NLenm2\NL\MM             \* main driver *\
  113. MNM1\BRcn9=n9+1\NLi\XN9: \BR\CL\CH\XF\CD\MM            \* insert next *\
  114. MNM2\BRtdjecn8=(curpos-tagd)>6\NL\XN8f~\RB\BR\XZ\MM  \* fix last line *\
  115.  
  116. M\080\BR\CU\CH\EM;                      \* PgUp - function as page up *\
  117. M\082\BR\CD\CH\EM;                    \* PgDn - function as page down *\
  118. M\081\BR\BRcn9=!(curch==0Dh)\NL\XN9eend\NL\MM; \* End-function as end *\
  119. Mend\BR\CR\CH\EM;
  120. M\083\BR\BRi\EM;                         \* Ins  - function as insert *\
  121.  
  122.                                                \* Function key macros *\
  123. M\090\BRqu\BR\MM;                              \* update file :  (F1) *\
  124. M\091\BRqe\MM;                             \* update and exit :  (F2) *\
  125. M\092\BRqi\EM;                          \* initialize to file :  (F3) *\
  126. M\093\BRqa\MM;                          \* abort edit session :  (F4) *\
  127. M\094\BRf\BR\MM;                       \* find next occurance :  (F5) *\
  128. M\095\BR-\BR\MM;                       \* find prev occurance :  (F6) *\
  129. M\096\BR!dir/p\MM;                           \* get directory :  (F7) *\
  130. M\097\BR\BRx\EM;                             \* exchange mode :  (F8) *\
  131. M\098\BRjs\MM;                      \* function as jump start :  (F9) *\
  132. M\099\BRje\MM;                        \* function as jump end : (F10) *\
  133.  
  134. MD\BR- \BRBF \BRA\CLD\MM;                            \* delete a word *\
  135.  
  136. MC\BRsanscnsnnst4\BRsm0,0,74\BR\MM;
  137.  
  138. M\004\BRiDonald Waugaman\BR\MM;             \* enters my name (^D) *\
  139.  
  140.     \* Places a #pragma noalign("struct_name") above a structure definition *\
  141. MPS\BRi\NL#pragma noalign (\BRfstruct\NL\RB\BR\CRbf\NL\BR
  142. b\CU\CLg \RB\NL\CD\RBi)\BR\MM;
  143.