heasm66 / mdlzork

Different versions of original mainframe Zork reconstructed and patched to run under Confusion.
15 stars 6 forks source link

Convert tab to spaces #43

Closed heasm66 closed 1 year ago

heasm66 commented 1 year ago

As reported in issue #41, on ITS the tab stops are every eight column. This can't be guaranteed on all platforms, for example on Linux it's configurable. Siurce needs to have all tabs converted to spaces to conform to appearance in ITS.

heasm66 commented 1 year ago

I redefined the tab-setting in Notepad++ to 8 and wow, the source code got much more readable!

<DEFINE MACHINE-FUNCTION ("AUX" (DUMMY ,DUMMY) (MACH <SFIND-OBJ "MACHI">))
   #DECL ((MACH) OBJECT (DUMMY) <VECTOR [REST STRING]>)
   <COND
    (<==? ,HERE <SFIND-ROOM "MACHI">>
     <COND
      (<VERB? "OPEN">
       <COND (<TRNN .MACH ,OPENBIT>
              <TELL <PICK-ONE .DUMMY>>)
             (<TELL "The lid opens.">
              <TRO .MACH ,OPENBIT>)>)
      (<VERB? "CLOSE">
       <COND (<TRNN .MACH ,OPENBIT>
              <TELL "The lid closes.">
              <TRZ .MACH ,OPENBIT>
              T)
             (<TELL <PICK-ONE .DUMMY>>)>)>)>>

Gonna need to do this (and then convert TAB to space) on every file.