home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / cpm / amethyst / sepmotu.mss < prev    next >
Text File  |  1984-01-16  |  6KB  |  147 lines

  1. heading(State of the Unicorn Address)
  2. Again, curtesy of Mark of the Unicorn, here is the state of affairs
  3. with Mince/Scribble.
  4.  
  5. Begin(Verbatim)
  6. flushright(8/18/81)
  7. Dear Barry,
  8.  
  9. Time for the next monthly update on the state of the world around
  10. here. A little late this time but then I was on vacation.
  11.  
  12. There are only a few problems this month.
  13.  
  14. Mince 2.6 and possibly older versions as well
  15. have a terrible problem involving page mode used in combination with
  16. two window mode. When you are in two window mode, and there are two
  17. different buffers, one in each windowm and at least one of them is in
  18. page mode, and you switch windows either two or three times without
  19. using other change buffer commands, THEN mince crashes completely.
  20.  
  21. There is a simple short term solution, don't use two window mode at
  22. the same time as page mode. This problem  will be fixed in versions
  23. distributed after today. People who wish to make use of this feature
  24. may make the following patch.
  25.  
  26. In the function MSwpWind in the file COMM3.C, between the opening '{'
  27. display[int     cnt;]this will
  28. leave the first few lines of the function looking like:
  29. format[
  30. MSwpWind()               /* Switch which window we are in */
  31. {
  32.         int cnt;
  33.  
  34.         if (divide>=TMaxRow()-2) return;
  35.         tmp=altstart;          /* switch alt and cur screen start */
  36.  
  37. After making this change, recompile and link Mince.
  38.  
  39. Crayon Version 1.2: Version 1.2 of Crayon does not deal correctly with
  40. devices having a special printer code of one, i.e. plain or special
  41. printers. THe problem appears as page numbers in the wrong column,
  42. incorrect overprinting, and various other horizontal alignment
  43. problems.
  44.  
  45. An accurate description of the problem is that when Crayon goes to
  46. print a character that is both below and to the right of the previous
  47. character printed  it fails to move sufficiently to the right. This
  48. missalignment is corrected on the next line.
  49.  
  50. This problem will be fixed in Crayon 1.3 and is in fact fixed in some
  51. of the Crayon 1.2's. The best way around this is not to have a plain
  52. printer. There is a code patch as follows. Change the function
  53. VPrtMove in the file DRIVER.C so that the bottom several lines read as
  54. follows, and then recompile and link Crayon. NOTE that this only
  55. applies to Crayon 1.2.
  56. begin(format)
  57.      if (dev.formfeed)
  58.           while (delv > (vpos % pagev)) {
  59.                OPutChar (FF);
  60.                delv -= pagev - (vpos -delv) % pagev;
  61.                }
  62.      while ((delv -= linev) >= 0){
  63.           OPutCmd (&dev.donewline);
  64.           delh=hpos;               /* This is the patch */
  65.           }
  66.      while ((delh -= spaceh) >= 0) OPutChar (' ');
  67.      drvhpos = hpos;
  68.      drvvpos = vpos % pagev;
  69.      }
  70.      
  71.      
  72. FLAG
  73. VInfo (what)                    /* ask about printer */
  74. end(format)
  75.  
  76. Those are all of the bugs for this month. There is one question that I
  77. would like to answer that everyone keeps asking. There are in fact
  78. several ways for people to get more global space in Mince for use with
  79. personal extensions.
  80.  
  81. First a little background. We use the -e option in the C compiler to
  82. save space in the resulting programs, this forces the global address
  83. to appear at the specified address regardless of the size of the code.
  84. L2 and CLINK both get this address, along with the size of the global
  85. data area from the first .CRL file linked.  Mince does dynamic storage
  86. allocation in the region between the global data and the stack, thus
  87. the size of the global data area must be accurate. Further there is
  88. more global data than there might appear to be, MINCE.CRL is compiled
  89. with a different version of MINCE.GBL than is distributed, and has
  90. extra global data for the buffer abstraction.
  91.  
  92. The simplest way to add storage is to have this storage be in the form
  93. of string constants, the compiler allocates string constants in such a
  94. way that you can write over them so long as you don't exceed their
  95. allocated length. This is a fair although uncomfortable programming
  96. practice in all of the compilers I know of (BDS-C UNIX V6 and V7,
  97. ONYX UNIX, Whitesmiths) support it. This can be done as follows:
  98. create a function such as:
  99. begin(format)
  100. Storage()
  101. {
  102.      return("This returns a string of exactly fifty characters     ");
  103.      }
  104. end(format) 
  105. this function can now be used in another place to get a pointer to use
  106. for storage as in:
  107. begin(format)
  108. Munge(arg)          /* Store Arg in Storage */
  109.      char *arg;
  110. {
  111.      if (strlen(arg) > 50) Error ("String too long");
  112.      else strcpy(Storage(),arg);
  113.      Echo("String now is: ");
  114.      TNLPrnt(Storage());
  115.      }
  116. end(format)
  117.  
  118. Another way to get extra storage is to create some room between the
  119. end of the code and the start of he global data area by elimination of
  120. some code or use of the L*.CRL files. The routines can simply KNOW
  121. that this space is there and use it. This can get tricky to maintain
  122. since the end of the code is likely to change every time you work on
  123. the program. One good thing to do is to have your routine check the
  124. location of the end of the code with the BDS-C function codend().
  125.  
  126. The final way to get more storage is  little known feature of L2. L2,
  127. unlike CLINK, does nort require that the first function linked to be
  128. the main function. Thus you can compile bindings with extra global
  129. definitions and link bindings and then mince. The trick is that you
  130. have to leave extra space (more than 1000 and less than 1100 bytes,
  131. 1100 works) for the globals that you can not see. The only way to know
  132. this number exactly is to put a function in mince that prints the
  133. address of the last visible global and also the value returned by the
  134. BDS-C function that gives the address o the end of the global area.
  135.  
  136. The long awaited Scribble update is starting this week. The update
  137. will include Mince 2.6 and Scribble 1.3 with a complete and in fact
  138. brand new Scribble manual. It is going to take us close to a month to
  139. get everything sent out due to disk and manual copying times.
  140.  
  141. closing(Take Care
  142.  
  143. Jason T. Linhart)
  144.  
  145. End(Verbatim)
  146.