home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / c / boss03.zip / BOSS.HST next >
Text File  |  1991-01-14  |  34KB  |  720 lines

  1. /*
  2. ** WINDOWS - Simple but Elegant Window Functions 
  3. **           (Datalight, Lattice, CI86, Microsoft, Borland
  4. **            Zortech, Mix PowerC, Manx AZTEC C, WATCOM)
  5. **
  6. ** Copyright (c) 1984 - 1991 - Philip A. Mongelluzzo
  7. ** All rights reserved.
  8. **
  9. ** Revision History in reverse order:
  10. **
  11. **  The following changes were incorporated in the 01/07/91 release:
  12. **
  13. **  12.26.90 -  wn_hlinit was allocating more memory than was needed.
  14. **              (wn_help.c)                             (V6.01)
  15. **
  16. **              TopSpeed "C" support added.
  17. **              (windows.h, windows.fnt)
  18. **
  19. **              wn_gulong was short 1 byte on the mask it passes 
  20. **              to wn_input.c.  Thanks to the TopSpeed Compiler for
  21. **              finding this.
  22. **
  23. **              Moved v_getchm() to "wn_mouse.c" to eliminate including
  24. **              ANY mouse code from applications that do not call
  25. **              any of the mouse functions.  v_getchm() was previously
  26. **              located in "wn_bios.c".
  27. **
  28. **              Microsoft 6.00A certification.
  29. **
  30. **  12.14.90 -  wn_close was not setting wn->shadow to FALSE when
  31. **              closing shadowed windows.  This was causing wn_activate
  32. **              to do potentially foolish things.       (V6.00)        
  33. **
  34. **  (11.01.90)  ** [Limited distribution release]
  35. **
  36. **  09.14.90 -  Watcom 8.0 Support                      (V5.22)
  37. **
  38. **  08.25.90 -  Added v_getchm() - get character or mouse press.
  39. **              (wn_mouse, wn_bios, windows.c, 
  40. **              windows.ext)                            (V5.21)
  41. **
  42. **  07.25.90 -  Zortech 2.10 Support.                   (V5.20)
  43. **
  44. **  07.23.90 -  Mix Power C 2.00 Support.               (V5.19)
  45. **
  46. **  07.18.90 -  Turbo C++ Support.  Created TCVLIB.ASM to get around
  47. **              Borland's oversight with regard to "CONST".
  48. **              (wn_print.c, tcvlib.asm)                (V5.18)
  49. **
  50. **  The following changes were incorporated in the 07.01.90 release:
  51. **
  52. **  06.16.90 -  Cosmetic and misc changes: (BOSSDEMO.C,
  53. **              MAKELIB.BAT (LC6), include memory model directives
  54. **              for Lattice 6.XX batch files).           
  55. **              Thanks again to Bill Hinkle.            (V5.17)
  56. **
  57. **              QuickC 2.5 Support.                            
  58. **
  59. **              MSC 6.0 Support.  Changed "windows.h" to CAST
  60. **              NULL as an int.
  61. **              (windows.h)                                    
  62. **
  63. **  04.04.90 -  wn_help was taught to use wn_putsa to enforce user
  64. **              specified help screen attributes.  Tip of the hat
  65. **              to Chris Madsen.
  66. **              (wn_help.c)                             (V5.16)
  67. **
  68. **  03.23.90 -  Added "wns_escape". This is set to TRUE by wn_input
  69. **              whenever ESCAPE has terimated the input.  ESCAPE
  70. **              now terminates input for all input field types.
  71. **              (wn_gbool, wn_gdate, wn_double, wn_gfloat, wn_gphone)
  72. **              (wn_gtime, wn_guint, wn_gulong, wn_gint)
  73. **              Thanks Dexter!!                         (V5.15)
  74. **
  75. **  03.12.90 -  Due to popular request, wn_open now range checks
  76. **              the window parameters to make sure that the window
  77. **              will actually fit on the screen.  NULL is returned
  78. **              if not.  This will prevent some cockpit "bad handle"
  79. **              error exits.
  80. **              (wn_open.c)                             (V5.14)
  81. **
  82. **  03.08.90 -  Added wn_hlinit, wn_help, wn_popup, and wn_qpopup.
  83. **              These functions are close clones to the old sample
  84. **              code provided in help.c and popup.c.  HELP.C and
  85. **              POPUP.C will no longer be distributed.
  86. **              (wn_help.c, wn_popup.c, windows.h)
  87. **              (genindex.c)                            (V5.13)
  88. **
  89. **  03.07.90 -  Placed all "externals" in "windows.ext".  This is
  90. **              being done to ease the burden of making changes
  91. **              to both global and external data.  This will also
  92. **              keep all the constants in one place.
  93. **              (windows.c, windows.h, windows.ext)     (V5.12)
  94. **
  95. **  03.06.90 -  HELP Key is now user definable.  The global wns_hkey
  96. **              has been added and defaults to F1.  This global
  97. **              can be set directly of via the wn_shkey() function.
  98. **              (windows.c, wn_init.c)                  (V5.11)
  99. **
  100. **  03.04.90 -  Added wn_stitle (Supertitle).  wn_stitle provides
  101. **              (top, bottom) (centered, left, right) titles!
  102. **              wn_stitle.c                             (V5.10)
  103. **
  104. **  03.03.90 -  Added wn_gatext - get ascii (ANY ascii text).
  105. **              Now you can input graphics characters!
  106. **              Tnx to Werner Schonber for the suggestion.
  107. **              wn_gtext.c                              (V5.09)
  108. **
  109. **  03.01.90 -  Fine tuned overlap detection to improve performance.
  110. **              wn_activ.c                              (V5.08)
  111. **
  112. **  02.25.90 -  Shadow window support. wn_activ.c, wn_close.c,
  113. **              wn_move.c, windows.h, windows.c, wn_open.c 
  114. **                                                      (V5.07) 
  115. **
  116. **  02.24.90 -  Eliminated most of the assembler functions.  This
  117. **              was done to provide better support for the HUGE
  118. **              memory model.
  119. **              (c:{wn_bios, wn_mouse, wn_sup}, *.asm)  (V5.06)
  120. **
  121. **  02.04.90 -  Linked exploding windows to time of day clock.
  122. **              Added wns_gticks() in wn_open.c.
  123. **              nap() in BOSSDEMO now uses wns_gticks.
  124. **              (wn_open.c)                             (V5.05)
  125. **
  126. **  02.03.90 -  wn_sdelspc was not handling requests to delete 
  127. **              trailing and leading spaces from strings that were
  128. **              only spaces!  Tnx es a tip-o-de-hat to Pat Elam,
  129. **              M. G. F. Gilliland, M.D., and Harold Jackson.
  130. **              (wn_string.c)                           (V5.04)
  131. **
  132. **  01.28.90 -  wns_movscr was not allowing for 132 column or
  133. **              wider screens.  It was taught how to allocate memory 
  134. **              for user defined physical screen sizes.  Thanks to the
  135. **              folks at Atomic Energy of Canada LTD. 
  136. **              (wn_sup.c)                              (V5.03)
  137. **
  138. **           -  v_cls() in "wn_bios" was taught about wni_mxrows 
  139. **              and wni_mxcols. 
  140. **              (wn_bios.c)                             (V5.02)
  141. **
  142. **  01.20.90 -  Pulldown code in BOSSDEMO would not work if called
  143. **              twice.  The problem was traced to the "winopn" member
  144. **              of the static structure mainbar.  Setting "mainbar.winopn"
  145. **              to FALSE before "wn_close(mainbar.wpsave)" in "pddemo()"
  146. **              solves the potential problem.  Thanks to Russ Brown for
  147. **              reporting the problem. 
  148. **              (bossdemo.c)                            (V5.01)
  149. **
  150. **              Version conversion table:
  151. **              
  152. **                   Base Release    Base Version
  153. **                      ??.??.86        1.00
  154. **                      ??.??.87        2.00
  155. **                      ??.??.88        3.00
  156. **                      ??.??.89        4.00
  157. **                      ??.??.90        5.00        
  158. **
  159. **  The following changes were incorporated in the 02.15.90 release:
  160. **                         AKA Version 5.00
  161. **
  162. **  01.10.90 -  WCVLIB.ASM created.  This file contains the assembly 
  163. **              language routines for WATCOM 7.0.  Previous versions of
  164. **              WATCOM should use MSVLIB.ASM.  
  165. **
  166. **  01.05.89 -  Physical windows wider than 80 columns were not 
  167. **              working correctly.  Thanks to all who reported this
  168. **              problem. (wn_actic.c, wn_sup.c, windows.c, wn_init.c).
  169. **              The constant "4096" was not removed in wn_savres. It
  170. **              does not impact the physical sceen size logic but does 
  171. **              allow the code of those who have "tinkered" with video 
  172. **              pages to continue to work.
  173. **
  174. **  12.22.89 -  Re-assembled all assembly language routines to insure
  175. **              that wni_mxcols, wni_mxrows, and wni_mxneed were being
  176. **              used correctly.
  177. **
  178. **  11.30.89 -  ZORTECH 2.0 Support.  Please note that ZORLIB version
  179. **              2.0 can not create a usable LWIN.LIB.  Microsoft's LIB
  180. **              works fine and should be used.  ZORTECH has been notified
  181. **              of the problem.
  182. **
  183. **  11.24.89 -  jeesh... One line exploding windows exploded again!
  184. **              This time we got the gremlin!! Tnx to Michael Canfield
  185. **              for suppling the test case.
  186. **
  187. **  (11.15.89)  ** [Limited distribution release]
  188. **
  189. **  10.28.89 -  Modified wn_title to insure ALL compiliers process
  190. **              hex values that are imbedded into the title properly.
  191. **              (e.g. "Hello \xcd There!")
  192. **              Thanks to Don Wahl for pointing out the discrepancy.
  193. **
  194. **  10.25.89 -  It would appear that the PC/PC_CLONE BIOS can not deal 
  195. **              with scrolling single line windows.  wn_insrow() was taught 
  196. **              to erase single line windows and avoid using the 
  197. **              BIOS for this special case.  This problem does not exist
  198. **              on AT or PC/2 class machines.  Thanks to Harold Jackson
  199. **              for reporting the problem.
  200. **
  201. **  10.24.89 -  Eliminated a potential multiple cursor problem with
  202. **              the mouse cursor when a window is being saved/restored
  203. **              with an active mouse.  Tip of the hat to Steve Thatcher
  204. **              of Attachmate.
  205. **
  206. **  10.20.89 -  Corrected a bug in wn_open to allow 1 line exploding 
  207. **              windows to function properly.  Thanks to John F. La Fleur 
  208. **              for reporting the problem.
  209. **
  210. **              wn_puts was not handling borderless windows properly.
  211. **              Thanks to Tim Keane for reporting the problem.
  212. **
  213. **              Lattice Version 6.0 Support
  214. **
  215. **  09.27.89 -  Logic was added to wn_input to insure that user supplied
  216. **              non null editing buffers are the same lenth as their masks!
  217. **              This logic will prevent garbage from appearing when 
  218. **              wn_input is called to peform data entry with a prefilled
  219. **              value in the user buffer (ubuff).
  220. **
  221. **  09.05.89 -  The forms package now treats the ESCcape
  222. **              like most common applications do.  That is to say that it 
  223. **              causes the current operation to cease.  Current 
  224. **              Window BOSS users please note that this feature can
  225. **              be disabled by removing the code in wn_frmget that contains
  226. **              "ESC.001" as part of the comments.
  227. **
  228. **  09.05.89 -  Added 1st character sensitivity to the sample popup menu
  229. **              code. ** NOTE ** -> For menu's that have different 1st
  230. **              character picks.  
  231. **              
  232. **  (08.25.89)  ** [Limited distribution release]
  233. **
  234. **  08.23.89 -  Exploding window opens were failing on SOME 
  235. **              adapters.  Even size exploding windows were
  236. **              failing. Corrected!
  237. **              Thanks to Richard Allen for his assistance.
  238. **
  239. **  The following changes were incorporated in the 07.01.89 release:
  240. **
  241. **  06.17.89 -  Lattice 3.41!! ... The version release race is on!
  242. **
  243. **  05.29.89 -  Mix Power C 1.30 Support.  
  244. **
  245. **  05.25.89 -  Added wn_gutext and wn_gltext.  Get upper case only
  246. **              and lower case only text functions.  Thanks to
  247. **              Charlie Munao for the suggestion.  Improved code 6/6/89.
  248. **
  249. **  05.23.89 -  wn_frmcls now sets the form pointer to the form being
  250. **              closed to NFRM and the individual field pointers to
  251. **              NFLD. This should help those who attempt to dectect
  252. **              if a form/field is active.        
  253. **
  254. **  05.10.89 -  wn_close now sets the window pointer to the window 
  255. **              being closed to WNLPTR.  This should help those who
  256. **              attempt to detect if a window is open.
  257. **
  258. **           -  Moved definition of FAR MEMORY marcos from "wn_sup.c"
  259. **              and "wn_activ.c" to "windows.h".
  260. **
  261. **  05.06.89 -  By popular request... WN_FRMGET now displays both the
  262. **              field prompt and data entry mask for all fields prior
  263. **              to accepting input for the 1st field.  Accomplished by
  264. **              introducing "wni_frmflg" which is used/tested by
  265. **              all the data entry functions, wn_input, and wn_frmget.
  266. **
  267. **  05.05.89 -  Exploding window logic was tweeked to provide smoother
  268. **              explosions.  
  269. **
  270. **  05.04.89 -  Incorporated support for user defined PHYSICAL screen
  271. **              size.  New globals: wni_mxrows, wni_mxcols, wni_mxneed.
  272. **              Globals are defined in "windows.c" and are referenced in
  273. **              "windows.h".  The globals are max rows, max cols, and max
  274. **              memory required to save a *complete* screen image (rows *
  275. **              col * 2).  A new version of wn_init, wn_psinit has be
  276. **              provided to properly set the globals.  Refer to the manual
  277. **              for a complete discussion.  The defaults are 25, 80, and 
  278. **              4000.  Usefull for applications and/or systems that run
  279. **              in 43 line EGA or 50 line VGA mode.  Since The BOSS
  280. **              assumes the screen size to be fixed, wn_psinit must be
  281. **              called before ANY windows are opened.
  282. **
  283. **  04.30.89 -  v_kstat now returns TRUE rather than (-1). This conforms
  284. **              to the constant in "windows.h".  Thanks to Clive Basson
  285. **              at Infostat!
  286. **
  287. **           -  wns_dput (internal routine) was modified to call
  288. **              wns_savres for all writes.  This will improve
  289. **              normal screen output (speed) in most cases.
  290. **
  291. **           -  wns_drow (internal routine) now calls wns_savres 
  292. **              for all writes. This will improve normal screen 
  293. **              output (speed) in most cases.
  294. **
  295. **           -  wn_title now calls wn_dput to write title for 
  296. **              faster title writes.
  297. **
  298. **  04.15.89 -  wn_gulong corrected to use common "%lu" .vs. "%U"
  299. **
  300. **  04.05.89 -  Watcom 7.0 Support.  Tip of the hat to the folks at
  301. **              the Watcom Compiler factory... Once again, they proved
  302. **              that you can release a MAJOR upgrade without breaking
  303. **              anybody's hard work (code).
  304. **
  305. **  04.04.89 -  Lattice 3.4X support. (LC3) Tip of the hat to
  306. **              William Hinkle & Jon Martin (UNISYS) for thier comments,
  307. **              suggestions and support.
  308. **
  309. **           -  Float/Double promotion & demotion caused wn_gfloat 
  310. **              trouble.  Resolved with #if LC3 in wn_gfloat. (LC3)
  311. **
  312. **           -  windows.h was modified to eliminate warnings 
  313. **              about undefined control blocks and include
  314. **              stdlib.h for proper memory allocation
  315. **              prototypes. (LC3)
  316. **
  317. **           -  Fixed LCP.BAT, APMODEL.BAT, and ADMODE.BAT (LC3)
  318. **
  319. **           -  Eliminated *true* unreferenced variables. (LC3)
  320. **
  321. **  03.11.89 -  Quick C Version 2.0 support. 
  322. **
  323. **  03.10.89 -  wn_frmopn/cls was tweeked to be a bit smarter about
  324. **              memory allocation & deallocation.  Tip of the hat
  325. **              to Barry Roomberg & Peter Spreadborough.  This 
  326. **              solves the *very* random "NULL POINTER" message
  327. **              on exit. 
  328. **
  329. **  The following changes were incorporated in the 02.01.89 release:
  330. **
  331. **  02.01.89 -  Mouse support, get double, get unsigned long,
  332. **              get password, left justify string, right justify string
  333. **              center string, delete leading and/or trailing blanks.
  334. **              Files: wn_mouse.c, wn_string.c, wn_gpword.c
  335. **              Files: wn_gdouble.c, wn_gulong.c
  336. **
  337. **  12.26.88 -  wn_restore was modified to allow for those who like to
  338. **              diddle with a "wn_save"d screen image.  This also 
  339. **              corrected a potential problem with restoring saved 
  340. **              images.  Thanks to Mike Blaszczak for reporting the
  341. **              conflict.
  342. **
  343. **  08.01.88 -  added #if __TURBOC__ to windows.c
  344. **
  345. **  The following changes were incorporated in the 08.15.88 release:
  346. **
  347. **  07.24.88 -  wn_puts() was not fixing up color attributes on mono
  348. **              systems - corrected.
  349. **
  350. **  07.10.88 -  AZTEC "C" support.  Thanks to Dexter McCloud for his
  351. **              assistance.
  352. **
  353. **           -  help() has been modified to be compatiable with
  354. **              AZTEC.  Please take note as format of the ".hlp" file
  355. **              has changed. Refer to Intelc.hlp for examples.
  356. **
  357. **  07.03.88 -  WATCOM "C" support.
  358. **
  359. **           -  smartened up wn_frmopn() & wn_frmcls() to avoid
  360. **              possible NULL Pointer Assignments.
  361. **
  362. **           -  cleaned up pointer conversion warnings in wn_activate,
  363. **              wn_close, wn_open, wn_restore, wn_save. defined
  364. **              WNLPTR in windows.h.
  365. **            
  366. **           -  eliminated various warning messages during compilation,
  367. **              Lattice still complains for no valid reason on a few
  368. **              modules.
  369. **
  370. **           -  wns_alloc now use runtime routines allocating memory
  371. **              in the large model, dos routines in small code models.        
  372. **
  373. **           -  wns_alloc allocates and immediately frees all available 
  374. **              memory in the small data memory models before allocating far 
  375. **              memory. This eliminates memory mgmt clashes for some
  376. **              compilers.  
  377. **
  378. **           -  eliminated the need for "peek.c"
  379. **
  380. **  06.29.88 -  Corrected wn_activate to always fixup the cursor
  381. **              display for the activated window.  Thanks to
  382. **              John P. Toscano for reporting the problem.
  383. **
  384. **  06.12.88 -  Functions in wn_activate & wn_sup that call _vidblt
  385. **              and xferdata were taught how to deal with variable
  386. **              offsets from wns_alloc.  
  387. **
  388. **  The following changes were incorporated in the 06.01.88 release:
  389. **
  390. **  06.01.88 -  Incoporated data entry routines!
  391. **
  392. **              Smartened up wn_puts on border detection.
  393. **
  394. **  05.14.88 -  Added: wn_putc  (window put character)
  395. **                     wn_putca (window put character & attribute)
  396. **              Both can be found in the WN_PUTS.C file.          
  397. **
  398. **  05.10.88 -  wn_dmode was now properly sets PAINT & FLASH modes for
  399. **              EGA video adapters - Thanks to Mike Gross from
  400. **              West Germany
  401. **
  402. **  The following changes were incorporated in the 05.06.88 release:
  403. **
  404. **  05.06.88  - Support for MIX Power C added. - Tip of the hat to
  405. **              Bob Lewis for his assistance.
  406. **
  407. **  04.27.88  - The declaration of _stklen was removed from BOSSDEMO.C,
  408. **              this will keep Turbo C happy.
  409. **
  410. **  03.22.88  - wn_activate ability to detect window overlap and
  411. **              handle borderless windows was improved.
  412. **
  413. **  03.22.88  - popup was taught how to handle text on the 0th line.
  414. **
  415. **  03.19.88  - v_spage was loading BH instead of AL. Thanks to
  416. **              Ross Schaach (TRAX, Corp.)
  417. **
  418. **  02.10.88  - wn_gets was modified to insure that charcters being
  419. **              echoed stay within the window borders.  Thanks to
  420. **              Dave McCracken for the suggestion.
  421. **
  422. **  01.14.88  - static declarations of filbuf and showpage were removed
  423. **              in help.c
  424. **
  425. **  The following changes were incorporated in the 11.20.87 release:
  426. **
  427. **  11.13.87  - Microsoft Ver 5.0 & Quick C Support
  428. **
  429. **  09.21.87 - wn_activate was occasionally incorrectly determining
  430. **             window overlap.  Thanks to the folks at Datalight
  431. **             and Marden Marshall for reporting the problem and supplying
  432. **             test cases.
  433. **
  434. **  09.17.87 - wn_init() and wn_exit() were modified to work around
  435. **             Turbo C's inability to handing allocating far memory
  436. **             in the large model.
  437. **
  438. **  09.07.87 - wns_push(), wns_pop(), wn_activate(), wn_move(),
  439. **             wns_image(), and wns_blt() were modified to use a table
  440. **             of global segments, offsets, and pointers.
  441. **             This was done to support the wn_init() and wn_exit()
  442. **             functions.  
  443. **
  444. **             wn_init() and wn_exit() added.  wn_init() must be the
  445. **             first window fucntion called and it must only be called
  446. **             once.  It works in conjucntion with wn_exit() to insure
  447. **             that the screen image on application entry is restored
  448. **             to the "T" on application exit.  wn_exit() must be the 
  449. **             last window function called.  One can not be used without
  450. **             the other.  Both should be used but are neither are
  451. **             required.
  452. **
  453. **  09.05.87 - wn_delrow was calling v_locate with args reversed
  454. **             causing the wrong section of the screen to be cleared
  455. **             on single line borderless windows.  Thanks to Paul
  456. **             Stephenson of Rockwell International for reporting both
  457. **             the problem and the cure.
  458. **
  459. **  09.03.87 - All assembler routines in DLVLIB.ASM now save/restore
  460. **             the SI & DI registers.  Datalight 3.10 and later 
  461. **             specific. The -w and -p command line parameters must
  462. **             be used when compiling The Window BOSS source code
  463. **             under Datalight 3.10 and later.
  464. **
  465. **  The following changes were incorporated in the 08.22.87 release:
  466. **
  467. **  08.10.87 - Added wns_dmode() to set the display mode.  
  468. **             wns_dmode(PAINT) sets the window display mode to paint
  469. **             style, wn_dmode(FLASH) sets the display mode to 
  470. **             flash style.  This function eliminates the need to set
  471. **             wn_sbit and wns_mtflg to produce the desired effects.
  472. **
  473. **  07.17.87 - wn_puts() & wn_putsa() perform simple range checking to
  474. **             insure that the string being displayed is/stays within
  475. **             the target window.
  476. **
  477. **  06.22.87 - Let's "C" specific code removed. Support will continue
  478. **             for previous versions but Mark William's products will
  479. **             not be supported in this or future releases.  This
  480. **             action is being as the result of compiler limitations.
  481. **
  482. **  06.17.87 - wn_activate now does INSTANT screen updates. Ditto
  483. **             for wn_move.  wn_mtype() returns 1 for EGA.  
  484. **             BLAZING screen updates on EGAs.
  485. **
  486. **  06.07.87 - wns_wtext() was incorrectely computing the offset for
  487. **             windows with wn_wrap enabled!
  488. **
  489. **  The following changes were incorporated in the 06.04.87 release:
  490. **
  491. **  06.03.87  - Support for BORLAND Turbo C!!
  492. **
  493. **  The following changes were incorporated in the 05.12.87 release:
  494. **
  495. **  05.12.87  - wns_text was incorrectly compensating for single line
  496. **              borderless windows (Attachmate follow up).
  497. **
  498. **  05.04.87  - EXPLODING windows are now supported!! Simply add 800 to
  499. **              the video page when calling wn_open()!
  500. **
  501. **            - Calls of the form wn_insrow(wn,0) and wn_delrow(wn,0) 
  502. **              caused the border to be klobbered.  wn_insrow() and
  503. **              wn_delrow() were taught about borders.
  504. **
  505. **  03.31.87  - wn_printf [wns_wtext()] was incorrectly displaying graphics 
  506. **              characters. Thanks to Mark MacGee for reporting the problem.
  507. **
  508. **  03.23.87  - Attachmate reported that wn_gets was doing funny things
  509. **              on single line bordered windows on PCs and PC clones but
  510. **              was fine on ATs and AT clones!  It would appear that the
  511. **              PC/PC_CLONE BIOS can not deal with scrolling single line
  512. **              windows.  wn_delrow() was taught to erase single line
  513. **              windows and avoid using the BIOS for this special case.
  514. **
  515. **  03.19.87  - Argh!! Datalight elected to use M_I86 as a predefined
  516. **              equate.  References to M_I86 were changed to 
  517. **              MSCV3 | MSCV4. (Datalight 3.XX)
  518. **
  519. **  The following changes were incorporated in the 03.15.87 release:
  520. **
  521. **  03.01.87  - wn_activate was incorrectly computing the coordinates of
  522. **              unbordered windows.  Thanks to Peter Fletcher for reporting
  523. **              the problem and supplying a solution.
  524. **
  525. **  01.22.87  - wn_dborder() was using the wrong attribute (wn-style,
  526. **              instead of wn->bstyle). Thanks to Peter Partch for
  527. **              reporting the problem and supplying a solution.
  528. **
  529. **  01.06.87  - wn_activate was not walking through the current linked 
  530. **              list of windows. In rare cases this would cause two
  531. **              windows to be considered non-overlapping when in fact
  532. **              they were.  Thanks to Robert Klotz for reporting the
  533. **              problem.
  534. **
  535. **  The following changes were incorporated in the 01.01.87 release:
  536. **
  537. **  12.19.86  - Removed a needless call to wn_err(wn,"wn_printf") in
  538. **              wn_title().
  539. **
  540. **  12.16.86  - Improved centering logic for window titles.
  541. **              Thanks to Steve Liberty for suggesting the change.
  542. **
  543. **  12.14.86  - Incorporated compiler specific equates in windows.h.
  544. **
  545. **  12.13.86  - wns_mtype() returns 0 for mode 3, 2 for mode 0 or 2,
  546. **              and 7 for mode 7. (Internal Use - This change allowed
  547. **              for the prevention of blue on black characters when
  548. **              the video mode is 2 and a color monitor is in use.
  549. **              (wns_fixc & wns_mtype).
  550. **
  551. **            - BASIC support for Mark Williams "Lets C".
  552. **
  553. **            - Tightend free() checks in wn_activate, wn_close, and
  554. **              wn_restore.
  555. **
  556. **  12.12.86  - wn_puts() was not adding the original physical cursor
  557. **              location to the logical cursor location. 
  558. **              Thanks to Marek Glowacki for reporting the problem.
  559. **
  560. **  12.10.86  - Allow v_locate() to position the cursor slightly off
  561. **              the screen.  Previous limit was (24,79) current limit
  562. **              is (25,80) which is just beyond the edge of the screen.
  563. **              This was done to insure that hidden cursors remain out
  564. **              of view.
  565. **
  566. **            - Improved cursor handling when wn_dmaflg = FALSE.
  567. **
  568. **  12.09.86  - Taught wn_activate to honor cursor position of window
  569. **              being activated. This will insure the cursor is always
  570. **              in the right logical and physical position. 
  571. **              More cosmetic enhancement than logic error correction.
  572. **
  573. **  The following changes were incorporated in the 12.01.86 release:
  574. **
  575. **  11.28.86  - Reverse video attribute was not being set correctly
  576. **              on MGAs - corrected.
  577. **
  578. **  11.19.86  - wn_dborder was incorrectly computing the row offset.
  579. **              Thanks to Steve Thatcher for reporting the problem.
  580. **              
  581. **  11.16.86  - Added ".smeth" member to window control block. This 
  582. **              member defines the scrolling method to be used in
  583. **              the window. It can be set to BIOS or DMAS, the default
  584. **              is DMAS.  
  585. **
  586. **            - All routines that reference wn_activate will return
  587. **              NULL if the window could not be activated.  This is 
  588. **              usually due to a lack of free memory.
  589. **
  590. **  The following changes were incorporated in the 11.14.86 release:
  591. **
  592. **  11.13.86  - Closing windows in random order when exiting "sometimes"
  593. **              produced null pointer assignment error messages or 
  594. **              incorrect screen images - corrected.
  595. **
  596. **            - wn_natrib() was not storing the newly defined window
  597. **              attribute in the window control block - corrected.
  598. **
  599. **  11.09.86  - Support for Datalight C added.
  600. **
  601. **  11.02.86  - v_border() added.  Allows color of border area to be
  602. **              set on CGAs with color monitors.
  603. **
  604. **  11.01.86  - wn_fixcsr was not adding the original physical cursor
  605. **              location to the logical cursor location. 
  606. **              Thanks to Bill Harts for reporting the problem.
  607. **
  608. **            - wn_puts was computing the virtual cursor location
  609. **              incorrectly. Thanks to Eric Lundstrom!
  610. **
  611. **            - Logic to dectect null strings was incorporated into
  612. **              _vidblt.  This will prevent 64k worth of trash from
  613. **              being blitted to the video ram.
  614. **
  615. **  10.30.86  - All references to MSC in "windows.h" were changed
  616. **              to M_I86.  This forces "windows.fns" to be included
  617. **              under Microsoft C.  This change was also applied to
  618. **              "windows.c".
  619. **
  620. **  10.26.86  - Full float, long, etc. support for wn_printf in
  621. **              all Lattice versions.  Microsoft 3.XX is the only
  622. **              one in the dark ages.
  623. **
  624. **  10.23.86  - Tip of the hat to Russ Thackson for the improved
  625. **              overlaping window detection technique incorporated
  626. **              in wn_activate().
  627. **
  628. **  The following changes were incorporated in the 10.22.86 release:
  629. **
  630. **  10.22.86  - wn_activate() was causing unnecessary window 
  631. **              thrashing on non-overlapping windows. Corrected.
  632. **
  633. **  The following changes were incorporated in the 10.10.86 release:
  634. **
  635. **  09.27.86  - Tiled windows are now supported! wn_activate() added.
  636. **
  637. **            - wn_gets() was not calling wns_err - corrected.  This
  638. **              was not a bug, just continued support for wild pointer
  639. **              checks.
  640. **
  641. **  09.25.86  - New logic for vidblt(). Fast mode now works on color
  642. **              without causing snow or flicker!!  Video updates now 
  643. **              occur at the fastest possible speed!  The effect of
  644. **              wn_sbit now conforms exactly to the description in the
  645. **              manual.
  646. **
  647. **            - wn_printf (CI86) now has full float support. Thanks
  648. **              to Rob Sullivan for reporting the CI86 problem. Lattice
  649. **              and MSC Version 3.0 are the only hold outs for full
  650. **              wn_print support.  MSC Version 3.0 support will never
  651. **              be incorporated. If you are using MSC Version 3.00 
  652. **              you will have to upgrade to Version 4.XX.  The price
  653. **              of the update is well worth it. Version 4.00 is a
  654. **              work of art! Lattice support will be delayed until
  655. **              Lattice gets around to supporting vsprintf() as
  656. **              defined by the evolving ANSI standard.
  657. **
  658. **  09.17.86  - seperate modules to decrease memory overhead.
  659. **
  660. **            - link list support (wn_open,wn_close,WINDOWPTR struct)
  661. **              This is the ground work for tiled window support.
  662. **
  663. **  09.02.86  - use registers in wns_savres() for speed (MSC).
  664. **
  665. **  The following changes were incorporated in the 08.30.86 release:
  666. **
  667. **  08.28.86  - wn_gets was delclared as (char *) but returning
  668. **              (void).  Corrected to return (char *).
  669. **
  670. **  08.27.86  - wns_wtext() was not correctly handling borderless
  671. **              windows. Corrected.
  672. **
  673. **            - wn_printf() was not correctly handing cases such as:
  674. **              wn_printf(wn,"%s %d %f %d\n", "text", 2, 2.2, 5);
  675. **              The window boss now supports a complete implementation
  676. **              of printf formatting under Microsoft C Version 4.00.
  677. **              All other compilers and versions support an INTEGER only
  678. **              wn_printf.  This will be corrected in a future release.
  679. **
  680. **  08.16.86  - Added wn_gets(). Get string in window with validation.
  681. **
  682. **  The following chages were incorporated in the 06.02.86 release.
  683. **
  684. **  06.02.86  - v_smode was using bh instead of ah. Corrected.
  685. **              Thanks to Rob Rainwater!!
  686. **
  687. **  05.26.86  - Added wn_natrib. Set new window attribute NOW!
  688. **
  689. **  05.25.86  - Corrected a potential problem with a couple of the routies
  690. **              in MSVLIB.ASM. Registers SI & DI were being used but not
  691. **              being saved. This "may" cause spurious probles with "C"
  692. **              programs that use register variables.  Microsoft C 3.0 only.
  693. **
  694. **            - wn_titla was not calling wns_fixc. Corrected.
  695. **
  696. **  05.24.86  - Added wn_titla. write window title with attributes.
  697. **
  698. **  05.10.86  - wn_putsa was not calling wns_fixc.  This caused problems
  699. **              when CGA was in mode bw80 but putsa was called with a
  700. **              valid color atrib.
  701. **
  702. **  The following changes were incororated in the 05.08.86 release.
  703. **
  704. **  05.07.86  - Additions for Microsoft "C" version 3.0
  705. **
  706. **  05.05.86  - wn_printf fix for lattice version 3.0.
  707. **
  708. **  04.25.86  - Added support for handling backspace, delete, & BELL
  709. **              characters correctly (wns_wtext).
  710. **
  711. **              Incorporated v_wtty in vlib.asm.
  712. **
  713. **  Initial Release..
  714. **
  715. **  01.24.86  - Initial release with a bit of a false start thanks to
  716. **              Microsoft's Lib.
  717. **
  718. */
  719.  
  720.