home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tvos200.zip / TVISION / PATCH.DIF < prev    next >
Text File  |  1995-04-25  |  211KB  |  8,258 lines

  1. Only in .: _DEFS.H
  2. diff --context ..\tvo/Buffers.h ./BUFFERS.H
  3. *** ../tvo/Buffers.h    Fri Jun 17 01:00:00 1994
  4. --- ./BUFFERS.H    Tue Apr 25 22:08:54 1995
  5. ***************
  6. *** 13,18 ****
  7. --- 13,20 ----
  8.    *      All Rights Reserved.
  9.    *
  10.    */
  11. + #if !defined(_NO_MEMMGR_)
  12.   
  13.   #pragma option -Vo-
  14.   #if defined( __BCOPT__ ) && !defined (__FLAT__)
  15. ***************
  16. *** 44,50 ****
  17.       static Boolean freeHead();
  18.   
  19.       friend class TVMemMgr;
  20. !     friend void *operator new( size_t );
  21.       friend void * allocBlock( size_t );
  22.   
  23.   };
  24. --- 46,52 ----
  25.       static Boolean freeHead();
  26.   
  27.       friend class TVMemMgr;
  28. !     friend void * operator new( size_t );
  29.       friend void * allocBlock( size_t );
  30.   
  31.   };
  32. ***************
  33. *** 79,81 ****
  34. --- 81,84 ----
  35.   #endif
  36.   
  37.   
  38. + #endif
  39. diff --context ..\tvo/Colorsel.cpp ./COLORSEL.CPP
  40. *** ../tvo/Colorsel.cpp    Fri Jun 17 01:00:00 1994
  41. --- ./COLORSEL.CPP    Tue Apr 25 22:08:46 1995
  42. ***************
  43. *** 524,530 ****
  44.       if (g)
  45.           return g->index;
  46.       else
  47. !         return NULL;
  48.   }
  49.   
  50.   TColorGroup* TColorGroupList::getGroup(uchar groupNum)
  51. --- 524,530 ----
  52.       if (g)
  53.           return g->index;
  54.       else
  55. !         return 0;
  56.   }
  57.   
  58.   TColorGroup* TColorGroupList::getGroup(uchar groupNum)
  59. diff --context ..\tvo/Config.h ./CONFIG.H
  60. *** ../tvo/Config.h    Fri Jun 17 01:00:00 1994
  61. --- ./CONFIG.H    Tue Apr 25 22:08:54 1995
  62. ***************
  63. *** 21,26 ****
  64. --- 21,29 ----
  65.   #include <limits.h>
  66.   #endif  // __LIMITS_H
  67.   
  68. + //  #define _NO_TEXTVIEW_   1
  69. + //  #define _NO_MEMMGR_     1
  70.   const eventQSize = 16;
  71.   const maxCollectionSize = (int)(( (long) UINT_MAX - 16)/sizeof( void * ));
  72.   
  73. diff --context ..\tvo/Dialogs.h ./DIALOGS.H
  74. *** ../tvo/Dialogs.h    Fri Jun 17 01:00:00 1994
  75. --- ./DIALOGS.H    Tue Apr 25 22:08:56 1995
  76. ***************
  77. *** 751,756 ****
  78. --- 751,758 ----
  79.   #if defined( Uses_TParamText ) && !defined( __TParamText )
  80.   #define __TParamText
  81.   
  82. + #include    <stdarg.h>
  83.   class _FAR TRect;
  84.   
  85.   class TParamText : public TStaticText
  86. ***************
  87. *** 760,767 ****
  88. --- 762,778 ----
  89.       TParamText( const TRect& bounds );
  90.       ~TParamText();
  91.   
  92.       virtual void getText( char *str );
  93. + #if 0
  94. +     //** JAL: This cannot be supported: ... in virtual functions is not allowed.
  95.       virtual void setText( char *fmt, ... );
  96. + #else
  97. +     void            setText(char* fmt, ...);
  98. +     virtual void    setArgText(char* fmt, va_list args);
  99. + #endif
  100.       virtual int getTextLen();
  101.   
  102.   protected:
  103. diff --context ..\tvo/Drawbuf.h ./DRAWBUF.H
  104. *** ../tvo/Drawbuf.h    Fri Jun 17 01:00:00 1994
  105. --- ./DRAWBUF.H    Tue Apr 25 22:08:56 1995
  106. ***************
  107. *** 36,41 ****
  108. --- 36,42 ----
  109.       void moveCStr( ushort indent, const char _FAR *str, ushort attrs );
  110.       void moveBuf( ushort indent, const void _FAR *source,
  111.                     ushort attr, ushort count );
  112. +     void cpyBytes(ushort ix, const void far* src, int len, ushort attr);
  113.   
  114.       void putAttribute( ushort indent, ushort attr );
  115.       void putChar( ushort indent, ushort c );
  116. diff --context ..\tvo/Drivers.cpp ./DRIVERS.CPP
  117. *** ../tvo/Drivers.cpp    Fri Jun 17 01:00:00 1994
  118. --- ./DRIVERS.CPP    Tue Apr 25 22:08:46 1995
  119. ***************
  120. *** 314,317 ****
  121. --- 314,335 ----
  122.                   *(uchar *)dest++ = *str++;
  123.   #endif
  124.   }
  125. + /*
  126. +  *  JAL: cpyBytes() copies a length-determined string to the buffer, thereby
  127. +  *  setting the attribute to a constant value.
  128. +  */
  129. + void TDrawBuffer::cpyBytes(ushort index, const void far* src, int len, ushort attr)
  130. + {
  131. +     ushort  w, *p, *ep;
  132. +     uchar   *s, *es;
  133. +     p   = (ushort *)data + index;
  134. +     ep  = p + len;
  135. +     s   = (uchar *) src;
  136. +     w   = (ushort)attr << 8;
  137. +     while(p < ep)
  138. +         *p++ = *s++ | w;
  139. + }
  140.   #pragma warn .asc
  141. diff --context ..\tvo/Editors.h ./EDITORS.H
  142. *** ../tvo/Editors.h    Fri Jun 17 01:00:00 1994
  143. --- ./EDITORS.H    Tue Apr 25 22:08:56 1995
  144. ***************
  145. *** 14,22 ****
  146.    *
  147.    */
  148.   
  149. ! #if !defined( __DIR_H )
  150. ! #include <dir.h>
  151. ! #endif  // __DIR_H
  152.   
  153.   #if !defined( __STRING_H )
  154.   #include <string.h>
  155. --- 14,22 ----
  156.    *
  157.    */
  158.   
  159. ! //#if !defined( __DIR_H )
  160. ! //#include <dir.h>
  161. ! //#endif  // __DIR_H
  162.   
  163.   #if !defined( __STRING_H )
  164.   #include <string.h>
  165. ***************
  166. *** 163,168 ****
  167. --- 163,172 ----
  168.   #if defined( Uses_TEditor ) && !defined( __TEditor )
  169.   #define __TEditor
  170.   
  171. + #ifndef __os2asm_h
  172. + #include    <tvision/os2asm.h>
  173. + #endif
  174.   class _FAR TRect;
  175.   class _FAR TScrollBar;
  176.   class _FAR TIndicator;
  177. ***************
  178. *** 180,187 ****
  179.   
  180.       virtual void shutDown();
  181.   
  182. !     char bufChar( ushort );
  183. !     ushort bufPtr( ushort );
  184.       virtual void changeBounds( const TRect& );
  185.       virtual void convertEvent( TEvent& );
  186.       Boolean cursorVisible();
  187. --- 184,201 ----
  188.   
  189.       virtual void shutDown();
  190.   
  191. !     //** Assembler implementations,
  192. !     char    bufChar( ushort );
  193. !     ushort  bufPtr( ushort );
  194. !     void    formatLine(void *, ushort, int, ushort );
  195. !     ushort  lineEnd( ushort );
  196. !     ushort  lineStart( ushort );
  197. !     ushort  nextChar( ushort );
  198. !     ushort  prevChar( ushort );
  199.       virtual void changeBounds( const TRect& );
  200.       virtual void convertEvent( TEvent& );
  201.       Boolean cursorVisible();
  202. ***************
  203. *** 214,234 ****
  204.       void doUpdate();
  205.       void doSearchReplace();
  206.       void drawLines( int, int, ushort );
  207. -     void formatLine(void *, ushort, int, ushort );
  208.       void find();
  209.       ushort getMousePtr( TPoint );
  210.       Boolean hasSelection();
  211.       void hideSelect();
  212.       Boolean isClipboard();
  213. -     ushort lineEnd( ushort );
  214.       ushort lineMove( ushort, int );
  215. -     ushort lineStart( ushort );
  216.       void lock();
  217.       void newLine();
  218. -     ushort nextChar( ushort );
  219.       ushort nextLine( ushort );
  220.       ushort nextWord( ushort );
  221. -     ushort prevChar( ushort );
  222.       ushort prevLine( ushort );
  223.       ushort prevWord( ushort );
  224.       void replace();
  225. --- 228,243 ----
  226. ***************
  227. *** 291,296 ****
  228. --- 300,340 ----
  229.   
  230.   };
  231.   
  232. + #ifdef  __FLAT__
  233. + /*
  234. +  *  Call assembler-versions of members..
  235. +  */
  236. + inline char TEditor::bufChar( ushort v)
  237. + {   return asmBufChar(this, v);
  238. + }
  239. + inline ushort TEditor::bufPtr( ushort v)
  240. + {   return asmBufPtr(this, v);
  241. + }
  242. + inline void TEditor::formatLine(void *p, ushort v1, int i, ushort v2)
  243. + {   asmFormatLine(this, p, v1, i, v2);
  244. + }
  245. + inline ushort TEditor::lineEnd( ushort v)
  246. + {   return asmLineEnd(this, v);
  247. + }
  248. + inline ushort TEditor::lineStart(ushort v)
  249. + {   return asmLineStart(this, v);
  250. + }
  251. + inline ushort TEditor::nextChar( ushort v)
  252. + {   return asmNextChar(this, v);
  253. + }
  254. + inline ushort TEditor::prevChar( ushort v)
  255. + {   return asmPrevChar(this, v);
  256. + }
  257. + #endif
  258.   inline ipstream& operator >> ( ipstream& is, TEditor& cl )
  259.       { return is >> (TStreamable&)cl; }
  260.   inline ipstream& operator >> ( ipstream& is, TEditor*& cl )
  261. ***************
  262. *** 360,368 ****
  263.   #if defined( Uses_TFileEditor ) && !defined( __TFileEditor )
  264.   #define __TFileEditor
  265.   
  266. ! #if !defined( __DIR_H )
  267. ! #include <Dir.h>
  268. ! #endif  // __DIR_H
  269.   
  270.   class _FAR TRect;
  271.   class _FAR TScrollBar;
  272. --- 404,412 ----
  273.   #if defined( Uses_TFileEditor ) && !defined( __TFileEditor )
  274.   #define __TFileEditor
  275.   
  276. ! //#if !defined( __DIR_H )
  277. ! //#include <Dir.h>
  278. ! //#endif  // __DIR_H
  279.   
  280.   class _FAR TRect;
  281.   class _FAR TScrollBar;
  282. ***************
  283. *** 374,380 ****
  284.   
  285.   public:
  286.   
  287. !     char fileName[MAXPATH];
  288.       TFileEditor( const TRect&,
  289.                    TScrollBar *,
  290.                    TScrollBar *,
  291. --- 418,424 ----
  292.   
  293.   public:
  294.   
  295. !     char fileName[OS_MAXPATH];
  296.       TFileEditor( const TRect&,
  297.                    TScrollBar *,
  298.                    TScrollBar *,
  299. diff --context ..\tvo/Edits.asm ./Edits.asm
  300. *** ../tvo/Edits.asm    Fri Jun 17 01:00:00 1994
  301. --- ./Edits.asm    Wed Apr 19 11:46:24 1995
  302. ***************
  303. *** 1,507 ****
  304.   ;/*------------------------------------------------------------*/
  305. ! ;/* filename -       edits.asm                                 */
  306. ! ;/*                                                            */
  307. ! ;/* function(s)                                                */
  308. ! ;/*                  TEditor member functions                  */
  309.   ;/*------------------------------------------------------------*/
  310.   
  311.   ;
  312. ! ;       Turbo Vision - Version 2.0
  313. ! ; 
  314. ! ;       Copyright (c) 1994 by Borland International
  315. ! ;       All Rights Reserved.
  316. ! ; 
  317.   
  318. -         PUBLIC  @TEditor@bufChar$qus
  319. -         PUBLIC  @TEditor@bufPtr$qus
  320.   IFNDEF __FLAT__
  321. !         PUBLIC  @TEditor@formatLine$qnvusius
  322.   ELSE
  323. !         PUBLIC  @TEditor@formatLine$qpvusius
  324.   ENDIF
  325. -         PUBLIC  @TEditor@lineEnd$qus
  326. -         PUBLIC  @TEditor@lineStart$qus
  327. -         PUBLIC  @TEditor@nextChar$qus
  328. -         PUBLIC  @TEditor@prevChar$qus
  329. -         PUBLIC  _scan, _iScan, _countLines
  330.   
  331. !         INCLUDE TV.INC
  332.   
  333.   CODESEG
  334.   
  335. ! ;char TEditor::bufChar( ushort P )
  336. ! @TEditor@bufChar$qus PROC
  337.   
  338. -         ARG     thisPtr :PTR, P : WORD
  339. - IFNDEF __FLAT__
  340. -         USES    DI
  341. -         LES     DI, [thisPtr]
  342. -         MOV     BX, [P]
  343. -         CMP     BX, ES:[DI+TEditorCurPtr]
  344. -         JB    @@1
  345. -         ADD     BX, ES:[DI+TEditorGapLen]
  346. - @@1:    LES     DI, ES:[DI+TEditorBuffer]
  347. -         MOV     AL, ES:[DI+BX]
  348. -         RET
  349.   ELSE
  350. !         USES    EDI, EBX
  351.   
  352. !         MOV     EDI, [thisPtr]
  353. !         MOVZX   EBX, [P]
  354. !         CMP     BX, [EDI+TEditorCurPtr]
  355. !         JB    @@1
  356. !         ADD     BX, [EDI+TEditorGapLen]
  357. ! @@1:    MOV     EDI, [EDI+TEditorBuffer]
  358. !         MOV     AL, [EDI+EBX]
  359. !         RET
  360. ! ENDIF
  361.   @TEditor@bufChar$qus ENDP
  362.   
  363. - ;function TEditor.bufPtr(P: Word): Word; assembler;
  364.   
  365. ! @TEditor@bufPtr$qus PROC
  366. !         ARG     thisPtr : PTR, P : WORD
  367. ! IFNDEF __FLAT__
  368. !         USES    DI
  369.   
  370. -         LES     DI, [thisPtr]
  371. -         MOV     AX, [P]
  372. -         CMP     AX, ES:[DI+TEditorCurPtr]
  373. -         JB    @@1
  374. -         ADD     AX, ES:[DI+TEditorGapLen]
  375. - @@1:    RET
  376.   ELSE
  377. -         USES    EBX
  378.   
  379. !         MOV     EBX, [thisPtr]
  380. !         MOV     AX, [P]
  381. !         CMP     AX, [EBX+TEditorCurPtr]
  382. !         JB    @@1
  383. !         ADD     AX, [EBX+TEditorGapLen]
  384. ! @@1:    RET
  385. ! ENDIF
  386.   
  387. ! ENDP @TEditor@bufPtr$qus
  388.   
  389.   ;void TEditor::formatLine( void *DrawBuf,
  390. ! ;                          ushort LinePtr,
  391. ! ;                          int Width,
  392. ! ;                          ushort Colors
  393. ! ;                        )
  394. ! IFNDEF __FLAT__
  395. ! @TEditor@formatLine$qnvusius PROC
  396.   ELSE
  397. ! @TEditor@formatLine$qpvusius PROC
  398.   ENDIF
  399. -         ARG     thisPtr:PTR, DrawBuf:PTR, LinePtr:ARGINT, \
  400. -                         W:ARGINT, Colors:ARGINT
  401. - IFNDEF __FLAT__
  402. -         USES    DS, SI, DI
  403.   
  404. -         LDS     BX, [thisPtr]
  405. -         LES     DI, [DrawBuf]
  406. -         MOV     SI, [LinePtr]
  407. -         XOR     DX, DX
  408. -         CLD
  409. -         MOV     AH, BYTE PTR [Colors]
  410. -         MOV     CX, DS:[BX+TEditorSelStart]
  411. -         CALL  @@10
  412. -         MOV     AH, BYTE PTR [Colors+1]
  413. -         MOV     CX, DS:[BX+TEditorCurPtr]
  414. -         CALL  @@10
  415. -         ADD     SI, DS:[BX+TEditorGapLen]
  416. -         MOV     CX, DS:[BX+TEditorSelEnd]
  417. -         ADD     CX, DS:[BX+TEditorGapLen]
  418. -         CALL  @@10
  419. -         MOV     AH, BYTE PTR [Colors]
  420. -         MOV     CX, DS:[BX+TEditorBufSize]
  421. -         CALL  @@10
  422. -         JMP   @@31
  423. - @@10:   SUB     CX, SI
  424. -         JA    @@11
  425. -         RETN
  426. - @@11:   LDS     BX, DS:[BX+TEditorBuffer]
  427. -         ADD     SI, BX
  428. -         MOV     BX, [W]
  429. - @@12:   LODSB
  430. -         CMP     AL, ' '
  431. -         JB    @@20
  432. - @@13:   STOSW
  433. -         INC     DX
  434. - @@14:   CMP     DX, BX
  435. -         JAE   @@30
  436. -         LOOP  @@12
  437. -         LDS     BX, [thisPtr]
  438. -         SUB     SI, WORD PTR DS:[BX+TEditorBuffer]
  439. -         RETN
  440. - @@20:   CMP     AL, 0DH
  441. -         JE    @@30
  442. -         CMP     AL, 09H
  443. -         JNE   @@13
  444. -         MOV     AL, ' '
  445. - @@21:   STOSW
  446. -         INC     DX
  447. -         TEST    DL, 7
  448. -         JNE   @@21
  449. -         JMP   @@14
  450. - @@30:   POP     CX
  451. - @@31:   MOV     AL, ' '
  452. -         MOV     CX, [W]
  453. -         SUB     CX, DX
  454. -         JBE   @@32
  455. -         REP     STOSW
  456. - @@32:   RET
  457. - ELSE        ;;;;;;;;;;;;;;;;;;;;;;;;;;;; 32-bit ;;;;;;;;;;;;;;;;;;;;;;;;;;;
  458. -         USES    ESI, EDI, EBX
  459. -         MOV     EBX, DWORD PTR [thisPtr]
  460. -         MOV     EDI, DWORD PTR [DrawBuf]
  461. -         MOV     ESI, [LinePtr]
  462. -         XOR     EDX, EDX
  463. -         CLD
  464. -         MOV     AH, BYTE PTR [Colors]
  465. -         MOVZX   ECX, WORD PTR [EBX+TEditorSelStart]
  466. -         CALL  @@10
  467. -         MOV     AH, BYTE PTR [Colors+1]
  468. -         MOVZX   ECX, WORD PTR [EBX+TEditorCurPtr]
  469. -         CALL  @@10
  470. -         MOVZX   ECX, WORD PTR [EBX+TEditorGapLen]
  471. -         ADD     ESI, ECX
  472. -         MOVZX   ECX, WORD PTR [EBX+TEditorSelEnd]
  473. -         ADD     CX, [EBX+TEditorGapLen]
  474. -         CALL  @@10
  475. -         MOV     AH, BYTE PTR [Colors]
  476. -         MOVZX   ECX, WORD PTR [EBX+TEditorBufSize]
  477. -         CALL  @@10
  478. -         JMP   @@31
  479. - @@10:   SUB     ECX, ESI
  480. -         JA    @@11
  481. -         RETN
  482. - @@11:   MOV     EBX, [EBX+TEditorBuffer]
  483. -         ADD     ESI, EBX
  484. -         MOV     EBX, [W]
  485. - @@12:   LODSB
  486. -         CMP     AL, ' '
  487. -         JB    @@20
  488. - @@13:   STOSW
  489. -         INC     DX
  490. - @@14:   CMP     DX, BX
  491. -         JAE   @@30
  492. -         LOOP  @@12
  493. -         MOV     EBX, [thisPtr]
  494. -         SUB     ESI, [EBX+TEditorBuffer]
  495. -         RETN
  496. - @@20:   CMP     AL, 0DH
  497. -         JE    @@30
  498. -         CMP     AL, 09H
  499. -         JNE   @@13
  500. -         MOV     AL, ' '
  501. - @@21:   STOSW
  502. -         INC     DX
  503. -         TEST    DL, 7
  504. -         JNE   @@21
  505. -         JMP   @@14
  506. - @@30:   POP     ECX
  507. - @@31:   MOV     AL, ' '
  508. -         MOVZX   ECX, WORD PTR [W]
  509. -         SUB     CX, DX
  510. -         JBE   @@32
  511. -         REP     STOSW
  512. - @@32:   RET
  513. - ENDIF
  514.   
  515. ! IFNDEF __FLAT__
  516. ! ENDP @TEditor@formatLine$qnvusius
  517. ! ELSE
  518. ! ENDP @TEditor@formatLine$qpvusius
  519. ! ENDIF
  520.   
  521. ! ;function TEditor.lineEnd(P: Word): Word; assembler;
  522.   @TEditor@lineEnd$qus PROC
  523.   
  524. !         ARG     thisPtr: PTR, P:WORD
  525. ! IFNDEF __FLAT__
  526. !         USES    DS, SI, DI
  527. !         LDS     SI, [thisPtr]
  528. !         LES     BX, DS:[SI+TEditorBuffer]
  529. !         MOV     DI, [P]
  530. !         MOV     AL, 0DH
  531. !         CLD
  532. !         MOV     CX, DS:[SI+TEditorCurPtr]
  533. !         SUB     CX, DI
  534. !         JBE   @@1
  535. !         ADD     DI, BX
  536. !         REPNE   SCASB
  537. !         JE    @@2
  538. !         MOV     DI, DS:[SI+TEditorCurPtr]
  539. ! @@1:    MOV     CX, DS:[SI+TEditorBufLen]
  540. !         SUB     CX, DI
  541. !         JCXZ  @@4
  542. !         ADD     BX, DS:[SI+TEditorGapLen]
  543. !         ADD     DI, BX
  544. !         REPNE   SCASB
  545. !         JNE   @@3
  546. ! @@2:    DEC     DI
  547. ! @@3:    SUB     DI, BX
  548. ! @@4:    MOV     AX, DI
  549. !         RET
  550. ! ELSE        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;32-bit;;;;;;;;;;;;;;;;;;;;;;;;;;
  551. !         USES    ESI, EDI, EBX
  552. !         MOV     ESI, DWORD PTR [thisPtr]
  553. !         MOV     EBX, [ESI+TEditorBuffer]
  554. !         MOVZX   EDI, WORD PTR [P]
  555. !         MOV     AL, 0DH
  556. !         CLD
  557. !         MOV     CX, [ESI+TEditorCurPtr]
  558. !         SUB     CX, DI
  559. !         JBE   @@1
  560. !         ADD     EDI, EBX
  561. !         REPNE   SCASB
  562. !         JE    @@2
  563. !         MOVZX   EDI, WORD PTR [ESI+TEditorCurPtr]
  564. ! @@1:    MOV     CX, [ESI+TEditorBufLen]
  565. !         SUB     CX, DI
  566. !         JCXZ  @@4
  567. !         MOVZX   EDX, WORD PTR [ESI+TEditorGapLen]
  568. !         ADD     EBX, EDX
  569. !         ADD     EDI, EBX
  570. !         REPNE   SCASB
  571. !         JNE   @@3
  572. ! @@2:    DEC     EDI
  573. ! @@3:    SUB     EDI, EBX
  574. ! @@4:    MOV     EAX, EDI
  575. !         RET
  576.   
  577. ! ENDIF
  578.   @TEditor@lineEnd$qus ENDP
  579.   
  580. - ;function TEditor.lineStart(P: Word): Word; assembler;
  581. - @TEditor@lineStart$qus PROC
  582.   
  583. !         ARG     thisPtr :  PTR, P : WORD
  584. ! IFNDEF __FLAT__
  585. !         USES    DS, SI, DI
  586.   
  587. -         LDS     SI, [thisPtr]
  588. -         LES     BX, DS:[SI+TEditorBuffer]
  589. -         MOV     DI, [P]
  590. -         MOV     AL, 0DH
  591. -         STD
  592. -         MOV     CX, DI
  593. -         SUB     CX, DS:[SI+TEditorCurPtr]
  594. -         JBE   @@1
  595. -         ADD     BX, DS:[SI+TEditorGapLen]
  596. -         ADD     DI, BX
  597. -         DEC     DI
  598. -         REPNE   SCASB
  599. -         JE    @@2
  600. -         SUB     BX, DS:[SI+TEditorGapLen]
  601. -         MOV     DI, DS:[SI+TEditorCurPtr]
  602. - @@1:    MOV     CX, DI
  603. -         JCXZ  @@4
  604. -         ADD     DI, BX
  605. -         DEC     DI
  606. -         REPNE   SCASB
  607. -         JNE   @@3
  608. - @@2:    INC     DI
  609. -         INC     DI
  610. -         SUB     DI, BX
  611. -         CMP     DI, DS:[SI+TEditorCurPtr]
  612. -         JE    @@4
  613. -         CMP     DI, DS:[SI+TEditorBufLen]
  614. -         JE    @@4
  615. -         CMP     BYTE PTR ES:[BX+DI], 0AH
  616. -         JNE   @@4
  617. -         INC     DI
  618. -         JMP   @@4
  619. - @@3:    XOR     DI, DI
  620. - @@4:    MOV     AX, DI
  621. -         CLD
  622. -         RET
  623.   ELSE
  624. -         USES    ESI, EDI, EBX
  625.   
  626. !         MOV     ESI, [thisPtr]
  627. !         MOV     EBX, [ESI+TEditorBuffer]
  628. !         MOVZX   EDI, WORD PTR [P]
  629. !         MOV     AL, 0DH
  630. !         STD
  631. !         MOV     ECX, EDI
  632. !         MOVZX   EDX, WORD PTR [ESI+TEditorCurPtr]
  633. !         SUB     ECX, EDX
  634. !         JBE   @@1
  635. !         MOVZX   EDX, WORD PTR [ESI+TEditorGapLen]
  636. !         ADD     EBX, EDX
  637. !         ADD     EDI, EBX
  638. !         DEC     EDI
  639. !         REPNE   SCASB
  640. !         JE    @@2
  641. !         MOVZX   EDX, WORD PTR [ESI+TEditorGapLen]
  642. !         SUB     EBX, EDX
  643. !         MOVZX   EDI, WORD PTR [ESI+TEditorCurPtr]
  644. ! @@1:    MOV     ECX, EDI
  645. !         JECXZ @@4
  646. !         ADD     EDI, EBX
  647. !         DEC     EDI
  648. !         REPNE   SCASB
  649. !         JNE   @@3
  650. ! @@2:    INC     EDI
  651. !         INC     EDI
  652. !         SUB     EDI, EBX
  653. !         CMP     EDI, [ESI+TEditorCurPtr]
  654. !         JE    @@4
  655. !         CMP     EDI, [ESI+TEditorBufLen]
  656. !         JE      @@4
  657. !         CMP     BYTE PTR [EBX+EDI], 0AH
  658. !         JNE   @@4
  659. !         INC     EDI
  660. !         JMP   @@4
  661. ! @@3:    XOR     EDI, EDI
  662. ! @@4:    MOV     EAX, EDI
  663. !         CLD
  664. !         RET
  665. ! ENDIF
  666. ! @TEditor@lineStart$qus ENDP
  667.   
  668. ! ;function TEditor.nextChar(P: Word): Word; assembler;
  669. ! @TEditor@nextChar$qus PROC
  670.   
  671. !         ARG     thisPtr : PTR, P : WORD
  672.   
  673. ! IFNDEF __FLAT__
  674. !         USES    DS, SI, DI
  675.   
  676. -         LDS     SI, [thisPtr]
  677. -         MOV     DI, [P]
  678. -         CMP     DI, DS:[SI+TEditorBufLen]
  679. -         JE    @@2
  680. -         INC     DI
  681. -         CMP     DI, DS:[SI+TEditorBufLen]
  682. -         JE    @@2
  683. -         LES     BX, DS:[SI+TEditorBuffer]
  684. -         CMP     DI, DS:[SI+TEditorCurPtr]
  685. -         JB    @@1
  686. -         ADD     BX, DS:[SI+TEditorGapLen]
  687. - @@1:    CMP     WORD PTR ES:[BX+DI-1], 0A0DH
  688. -         JNE   @@2
  689. -         INC     DI
  690. - @@2:    MOV     AX, DI
  691. -         RET
  692.   ELSE
  693. -         USES    ESI, EDI, EBX
  694.   
  695. !         MOV     ESI, [thisPtr]
  696. !         MOVZX   EDI, [P]
  697. !         CMP     DI, [ESI+TEditorBufLen]
  698. !         JE    @@2
  699. !         INC     DI
  700. !         CMP     DI, [ESI+TEditorBufLen]
  701. !         JE    @@2
  702. !         MOV     EBX, [ESI+TEditorBuffer]
  703. !         CMP     DI, [ESI+TEditorCurPtr]
  704. !         JB    @@1
  705. !         MOVZX   EDX, WORD PTR [ESI+TEditorGapLen]
  706. !         ADD     EBX, EDX
  707. ! @@1:    CMP     WORD PTR [EBX+EDI-1], 0A0DH
  708. !         JNE   @@2
  709. !         INC     DI
  710. ! @@2:    MOV     AX, DI
  711. !         RET
  712. ! ENDIF
  713.   
  714.   @TEditor@nextChar$qus ENDP
  715.   
  716.   ;function TEditor.prevChar(P: Word): Word; assembler;
  717. ! @TEditor@prevChar$qus PROC
  718.   
  719. !         ARG     thisPtr :  PTR, P : WORD
  720. ! IFNDEF __FLAT__
  721. !         USES    DS, SI, DI
  722.   
  723. !         LDS     SI, [thisPtr]
  724. !         MOV     DI, [P]
  725. !         OR      DI, DI
  726. !         JE    @@2
  727. !         DEC     DI
  728. !         JE    @@2
  729. !         LES     BX, DS:[SI+TEditorBuffer]
  730. !         CMP     DI, DS:[SI+TEditorCurPtr]
  731. !         JB    @@1
  732. !         ADD     BX, DS:[SI+TEditorGapLen]
  733. ! @@1:    CMP     WORD PTR ES:[BX+DI-1], 0A0DH
  734. !         JNE   @@2
  735. !         DEC     DI
  736. ! @@2:    MOV     AX, DI
  737. !         RET
  738. ! ELSE        ;;;;;;;;;;;;;;;;;;;;;;;;;;;; 32-bit ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  739. !         USES   ESI, EDI, EBX
  740. !         MOV     ESI, DWORD PTR [thisPtr]
  741. !         MOVZX   EDI, [P]
  742. !         OR      EDI, EDI
  743. !         JE    @@2
  744. !         DEC     EDI
  745. !         JE    @@2
  746. !         MOV     EBX, [ESI+TEditorBuffer]
  747. !         MOVZX   EDX, WORD PTR [ESI+TEditorCurPtr]
  748. !         CMP     EDI, EDX
  749. !         JB    @@1
  750. !         MOVZX   EDX, WORD PTR [ESI+TEditorGapLen]
  751. !         ADD     EBX, EDX
  752. ! @@1:    CMP     WORD PTR [EBX+EDI-1], 0A0DH
  753. !         JNE   @@2
  754. !         DEC     EDI
  755. ! @@2:    MOV     EAX, EDI
  756. !         RET
  757. ! ENDIF
  758.   @TEditor@prevChar$qus ENDP
  759.   
  760.   
  761.   ;-----------------------------------------------------------------------------
  762.   
  763.   _countLines PROC C
  764.   
  765. !         ARG buf:PTR, count:ARGINT
  766.   
  767.   IFNDEF __FLAT__
  768. !         USES DI, SI
  769.   
  770. !         LES     DI, buf
  771. !         MOV     CX, count
  772. !         XOR     DX, DX
  773. !         MOV     AL, 0Dh
  774. !         CLD
  775.   @@1:
  776. !         JCXZ  @@2
  777. !         REPNE   SCASB
  778. !         JNE   @@2
  779. !         INC     DX
  780. !         JMP   @@1
  781.   @@2:
  782. !         MOV     AX, DX
  783. !         RET
  784.   ELSE
  785. !         USES    EDI, ESI
  786.   
  787. !         MOV     EDI, DWORD PTR [buf]
  788. !         MOV     ECX, count
  789. !         XOR     EDX, EDX
  790. !         MOV     AL, 0Dh
  791. !         CLD
  792.   @@1:
  793. !         JECXZ @@2
  794. !         REPNE   SCASB
  795. !         JNE   @@2
  796. !         INC     EDX
  797. !         JMP   @@1
  798.   @@2:
  799. !         MOV   EAX, EDX
  800. !         RET
  801.   ENDIF
  802.   
  803.   ENDP
  804. --- 1,550 ----
  805.   ;/*------------------------------------------------------------*/
  806. ! ;/* filename -         edits.asm                                   */
  807. ! ;/*                                                            */
  808. ! ;/* function(s)                                                */
  809. ! ;/*                  TEditor member functions                   */
  810.   ;/*------------------------------------------------------------*/
  811.   
  812.   ;
  813. ! ;        Turbo Vision - Version 2.0
  814. ! ;
  815. ! ;        Copyright (c) 1994 by Borland International
  816. ! ;        All Rights Reserved.
  817. ! ;
  818.   
  819.   IFNDEF __FLAT__
  820. !         PUBLIC    @TEditor@bufChar$qus
  821. !         PUBLIC    @TEditor@bufPtr$qus
  822. !         PUBLIC    @TEditor@formatLine$qnvusius
  823. !         PUBLIC    @TEditor@lineEnd$qus
  824. !         PUBLIC    @TEditor@lineStart$qus
  825. !         PUBLIC    @TEditor@nextChar$qus
  826. !         PUBLIC    @TEditor@prevChar$qus
  827. !         PUBLIC    _scan, _iScan, _countLines
  828.   ELSE
  829. !     ;-- Flat model stuff: C prototypes to prevent trouble with mangling etc.
  830. !     public    _asmFormatLine
  831. !     public    _asmLineEnd
  832. !     public    _asmLineStart
  833. !     public    _asmNextChar
  834. !     public    _asmPrevChar
  835. !     public    _asmBufChar
  836. !     public    _asmBufPtr
  837. !     public    _scan, _iScan, _countLines
  838.   ENDIF
  839.   
  840. !         INCLUDE TV.INC
  841.   
  842.   CODESEG
  843.   
  844. ! ; -----------------------------------------------------------------------------
  845. ! ; char TEditor::bufChar( ushort P )
  846. ! ; -----------------------------------------------------------------------------
  847. ! IFDEF __FLAT__
  848. ! _asmBufChar PROC
  849. !         ARG     thisPtr :PTR, P : WORD
  850. !         USES    EDI, EBX
  851. !         MOV     EDI, [thisPtr]
  852. !         MOVZX    EBX, [P]
  853. !         CMP     BX, [EDI+TEditorCurPtr]
  854. !         JB      @@1
  855. !         ADD     BX, [EDI+TEditorGapLen]
  856. ! @@1:    MOV     EDI, [EDI+TEditorBuffer]
  857. !         MOV     AL, [EDI+EBX]
  858. !         RET
  859. ! _asmBufChar ENDP
  860.   
  861.   ELSE
  862. ! @TEditor@bufChar$qus PROC
  863. !         ARG     thisPtr :PTR, P : WORD
  864. !         USES    DI
  865.   
  866. !         LES     DI, [thisPtr]
  867. !         MOV     BX, [P]
  868. !         CMP     BX, ES:[DI+TEditorCurPtr]
  869. !         JB      @@1
  870. !         ADD     BX, ES:[DI+TEditorGapLen]
  871. ! @@1:    LES     DI, ES:[DI+TEditorBuffer]
  872. !         MOV     AL, ES:[DI+BX]
  873. !         RET
  874.   @TEditor@bufChar$qus ENDP
  875. + ENDIF
  876.   
  877.   
  878. ! ; -----------------------------------------------------------------------------
  879. ! ; function TEditor.bufPtr(P: Word): Word; assembler;
  880. ! ; -----------------------------------------------------------------------------
  881. ! IFDEF    __FLAT__
  882. ! _asmBufPtr    PROC
  883. !         ARG     thisPtr : PTR, P : WORD
  884. !         USES    EBX
  885. !         MOV     EBX, [thisPtr]
  886. !         MOV     AX, [P]
  887. !         CMP     AX, [EBX+TEditorCurPtr]
  888. !         JB      @@1
  889. !         ADD     AX, [EBX+TEditorGapLen]
  890. ! @@1:    RET
  891. ! _asmBufPtr    ENDP
  892.   
  893.   ELSE
  894.   
  895. ! @TEditor@bufPtr$qus PROC
  896. !         ARG     thisPtr : PTR, P : WORD
  897. !         USES    DI
  898.   
  899. !         LES     DI, [thisPtr]
  900. !         MOV     AX, [P]
  901. !         CMP     AX, ES:[DI+TEditorCurPtr]
  902. !         JB      @@1
  903. !         ADD     AX, ES:[DI+TEditorGapLen]
  904. ! @@1:    RET
  905. ! @TEditor@bufPtr$qus ENDP
  906. ! ENDIF
  907.   
  908. + ; -----------------------------------------------------------------------------
  909.   ;void TEditor::formatLine( void *DrawBuf,
  910. ! ;                           ushort LinePtr,
  911. ! ;                           int Width,
  912. ! ;                           ushort Colors)
  913. ! ; -----------------------------------------------------------------------------
  914. ! ;
  915. ! IFDEF __FLAT__
  916. ! _asmFormatLine    PROC
  917. !         ARG     thisPtr:PTR, DrawBuf:PTR, LinePtr:ARGINT, W:ARGINT, Colors:ARGINT
  918. !         USES    ESI, EDI, EBX
  919. !         MOV     EBX, DWORD PTR [thisPtr]
  920. !         MOV     EDI, DWORD PTR [DrawBuf]
  921. !         MOV     ESI, [LinePtr]
  922. !         XOR     EDX, EDX
  923. !         CLD
  924. !         MOV     AH, BYTE PTR [Colors]
  925. !         MOVZX    ECX, WORD PTR [EBX+TEditorSelStart]
  926. !         CALL  @@10
  927. !         MOV     AH, BYTE PTR [Colors+1]
  928. !         MOVZX    ECX, WORD PTR [EBX+TEditorCurPtr]
  929. !         CALL  @@10
  930. !         MOVZX    ECX, WORD PTR [EBX+TEditorGapLen]
  931. !         ADD     ESI, ECX
  932. !         MOVZX    ECX, WORD PTR [EBX+TEditorSelEnd]
  933. !         ADD     CX, [EBX+TEditorGapLen]
  934. !         CALL  @@10
  935. !         MOV     AH, BYTE PTR [Colors]
  936. !         MOVZX    ECX, WORD PTR [EBX+TEditorBufSize]
  937. !         CALL  @@10
  938. !         JMP   @@31
  939. ! @@10:    SUB     ECX, ESI
  940. !         JA      @@11
  941. !         RETN
  942. ! @@11:    MOV     EBX, [EBX+TEditorBuffer]
  943. !         ADD     ESI, EBX
  944. !         MOV     EBX, [W]
  945. ! @@12:    LODSB
  946. !         CMP     AL, ' '
  947. !         JB      @@20
  948. ! @@13:    STOSW
  949. !         INC     DX
  950. ! @@14:    CMP     DX, BX
  951. !         JAE   @@30
  952. !         LOOP  @@12
  953. !         MOV     EBX, [thisPtr]
  954. !         SUB     ESI, [EBX+TEditorBuffer]
  955. !         RETN
  956. ! @@20:    CMP     AL, 0DH
  957. !         JE      @@30
  958. !         CMP     AL, 09H
  959. !         JNE   @@13
  960. !         MOV     AL, ' '
  961. ! @@21:    STOSW
  962. !         INC     DX
  963. !         TEST    DL, 7
  964. !         JNE   @@21
  965. !         JMP   @@14
  966. ! @@30:    POP     ECX
  967. ! @@31:    MOV     AL, ' '
  968. !         MOVZX    ECX, WORD PTR [W]
  969. !         SUB     CX, DX
  970. !         JBE   @@32
  971. !         REP     STOSW
  972. ! @@32:    RET
  973. ! _asmFormatLine    ENDP
  974.   ELSE
  975. ! @TEditor@formatLine$qnvusius PROC
  976. !         ARG     thisPtr:PTR, DrawBuf:PTR, LinePtr:ARGINT, \
  977. !                         W:ARGINT, Colors:ARGINT
  978. !         USES    DS, SI, DI
  979. !         LDS     BX, [thisPtr]
  980. !         LES     DI, [DrawBuf]
  981. !         MOV     SI, [LinePtr]
  982. !         XOR     DX, DX
  983. !         CLD
  984. !         MOV     AH, BYTE PTR [Colors]
  985. !         MOV     CX, DS:[BX+TEditorSelStart]
  986. !         CALL  @@10
  987. !         MOV     AH, BYTE PTR [Colors+1]
  988. !         MOV     CX, DS:[BX+TEditorCurPtr]
  989. !         CALL  @@10
  990. !         ADD     SI, DS:[BX+TEditorGapLen]
  991. !         MOV     CX, DS:[BX+TEditorSelEnd]
  992. !         ADD     CX, DS:[BX+TEditorGapLen]
  993. !         CALL  @@10
  994. !         MOV     AH, BYTE PTR [Colors]
  995. !         MOV     CX, DS:[BX+TEditorBufSize]
  996. !         CALL  @@10
  997. !         JMP   @@31
  998. ! @@10:    SUB     CX, SI
  999. !         JA      @@11
  1000. !         RETN
  1001. ! @@11:    LDS     BX, DS:[BX+TEditorBuffer]
  1002. !         ADD     SI, BX
  1003. !         MOV     BX, [W]
  1004. ! @@12:    LODSB
  1005. !         CMP     AL, ' '
  1006. !         JB      @@20
  1007. ! @@13:    STOSW
  1008. !         INC     DX
  1009. ! @@14:    CMP     DX, BX
  1010. !         JAE   @@30
  1011. !         LOOP  @@12
  1012. !         LDS     BX, [thisPtr]
  1013. !         SUB     SI, WORD PTR DS:[BX+TEditorBuffer]
  1014. !         RETN
  1015. ! @@20:    CMP     AL, 0DH
  1016. !         JE      @@30
  1017. !         CMP     AL, 09H
  1018. !         JNE   @@13
  1019. !         MOV     AL, ' '
  1020. ! @@21:    STOSW
  1021. !         INC     DX
  1022. !         TEST    DL, 7
  1023. !         JNE   @@21
  1024. !         JMP   @@14
  1025. ! @@30:    POP     CX
  1026. ! @@31:    MOV     AL, ' '
  1027. !         MOV     CX, [W]
  1028. !         SUB     CX, DX
  1029. !         JBE   @@32
  1030. !         REP     STOSW
  1031. ! @@32:    RET
  1032. ! ENDP @TEditor@formatLine$qnvusius
  1033.   ENDIF
  1034.   
  1035.   
  1036. ! ; -----------------------------------------------------------------------------
  1037. ! ; function TEditor.lineEnd(P: Word): Word; assembler;
  1038. ! ; -----------------------------------------------------------------------------
  1039. ! IFDEF    __FLAT__
  1040. ! _asmLineEnd PROC
  1041. !         ARG     thisPtr: PTR, P:WORD
  1042. !         USES    ESI, EDI, EBX
  1043. !         MOV     ESI, DWORD PTR [thisPtr]
  1044. !         MOV     EBX, [ESI+TEditorBuffer]
  1045. !         MOVZX    EDI, WORD PTR [P]
  1046. !         MOV     AL, 0DH
  1047. !         CLD
  1048. !         MOV     CX, [ESI+TEditorCurPtr]
  1049. !         SUB     CX, DI
  1050. !         JBE   @@1
  1051. !         ADD     EDI, EBX
  1052. !         REPNE    SCASB
  1053. !         JE      @@2
  1054. !         MOVZX    EDI, WORD PTR [ESI+TEditorCurPtr]
  1055. ! @@1:    MOV     CX, [ESI+TEditorBufLen]
  1056. !         SUB     CX, DI
  1057. !         JCXZ  @@4
  1058. !         MOVZX    EDX, WORD PTR [ESI+TEditorGapLen]
  1059. !         ADD     EBX, EDX
  1060. !         ADD     EDI, EBX
  1061. !         REPNE    SCASB
  1062. !         JNE   @@3
  1063. ! @@2:    DEC     EDI
  1064. ! @@3:    SUB     EDI, EBX
  1065. ! @@4:    MOV     EAX, EDI
  1066. !         RET
  1067. ! _asmLineEnd ENDP
  1068.   
  1069. ! ELSE
  1070.   @TEditor@lineEnd$qus PROC
  1071.   
  1072. !         ARG     thisPtr: PTR, P:WORD
  1073. !         USES    DS, SI, DI
  1074.   
  1075. !         LDS     SI, [thisPtr]
  1076. !         LES     BX, DS:[SI+TEditorBuffer]
  1077. !         MOV     DI, [P]
  1078. !         MOV     AL, 0DH
  1079. !         CLD
  1080. !         MOV     CX, DS:[SI+TEditorCurPtr]
  1081. !         SUB     CX, DI
  1082. !         JBE   @@1
  1083. !         ADD     DI, BX
  1084. !         REPNE    SCASB
  1085. !         JE      @@2
  1086. !         MOV     DI, DS:[SI+TEditorCurPtr]
  1087. ! @@1:    MOV     CX, DS:[SI+TEditorBufLen]
  1088. !         SUB     CX, DI
  1089. !         JCXZ  @@4
  1090. !         ADD     BX, DS:[SI+TEditorGapLen]
  1091. !         ADD     DI, BX
  1092. !         REPNE    SCASB
  1093. !         JNE   @@3
  1094. ! @@2:    DEC     DI
  1095. ! @@3:    SUB     DI, BX
  1096. ! @@4:    MOV     AX, DI
  1097. !         RET
  1098.   @TEditor@lineEnd$qus ENDP
  1099. + ENDIF
  1100.   
  1101.   
  1102. ! ; -----------------------------------------------------------------------------
  1103. ! ; function TEditor.lineStart(P: Word): Word; assembler;
  1104. ! ; -----------------------------------------------------------------------------
  1105. ! IFDEF    __FLAT__
  1106. ! _asmLineStart    PROC
  1107. !         ARG     thisPtr :  PTR, P : WORD
  1108. !         USES    ESI, EDI, EBX
  1109. !         MOV     ESI, [thisPtr]
  1110. !         MOV     EBX, [ESI+TEditorBuffer]
  1111. !         MOVZX    EDI, WORD PTR [P]
  1112. !         MOV     AL, 0DH
  1113. !         STD
  1114. !         MOV     ECX, EDI
  1115. !         MOVZX    EDX, WORD PTR [ESI+TEditorCurPtr]
  1116. !         SUB     ECX, EDX
  1117. !         JBE   @@1
  1118. !         MOVZX    EDX, WORD PTR [ESI+TEditorGapLen]
  1119. !         ADD     EBX, EDX
  1120. !         ADD     EDI, EBX
  1121. !         DEC     EDI
  1122. !         REPNE    SCASB
  1123. !         JE      @@2
  1124. !         MOVZX    EDX, WORD PTR [ESI+TEditorGapLen]
  1125. !         SUB     EBX, EDX
  1126. !         MOVZX    EDI, WORD PTR [ESI+TEditorCurPtr]
  1127. ! @@1:    MOV     ECX, EDI
  1128. !         JECXZ @@4
  1129. !         ADD     EDI, EBX
  1130. !         DEC     EDI
  1131. !         REPNE    SCASB
  1132. !         JNE   @@3
  1133. ! @@2:    INC     EDI
  1134. !         INC     EDI
  1135. !         SUB     EDI, EBX
  1136. !         CMP     EDI, [ESI+TEditorCurPtr]
  1137. !         JE      @@4
  1138. !         CMP     EDI, [ESI+TEditorBufLen]
  1139. !         JE        @@4
  1140. !         CMP     BYTE PTR [EBX+EDI], 0AH
  1141. !         JNE   @@4
  1142. !         INC     EDI
  1143. !         JMP   @@4
  1144. ! @@3:    XOR     EDI, EDI
  1145. ! @@4:    MOV     EAX, EDI
  1146. !         CLD
  1147. !         RET
  1148. ! _asmLineStart    ENDP
  1149.   
  1150.   ELSE
  1151.   
  1152. ! @TEditor@lineStart$qus PROC
  1153.   
  1154. !         ARG     thisPtr :  PTR, P : WORD
  1155. !         USES    DS, SI, DI
  1156.   
  1157. !         LDS     SI, [thisPtr]
  1158. !         LES     BX, DS:[SI+TEditorBuffer]
  1159. !         MOV     DI, [P]
  1160. !         MOV     AL, 0DH
  1161. !         STD
  1162. !         MOV     CX, DI
  1163. !         SUB     CX, DS:[SI+TEditorCurPtr]
  1164. !         JBE   @@1
  1165. !         ADD     BX, DS:[SI+TEditorGapLen]
  1166. !         ADD     DI, BX
  1167. !         DEC     DI
  1168. !         REPNE    SCASB
  1169. !         JE      @@2
  1170. !         SUB     BX, DS:[SI+TEditorGapLen]
  1171. !         MOV     DI, DS:[SI+TEditorCurPtr]
  1172. ! @@1:    MOV     CX, DI
  1173. !         JCXZ  @@4
  1174. !         ADD     DI, BX
  1175. !         DEC     DI
  1176. !         REPNE    SCASB
  1177. !         JNE   @@3
  1178. ! @@2:    INC     DI
  1179. !         INC     DI
  1180. !         SUB     DI, BX
  1181. !         CMP     DI, DS:[SI+TEditorCurPtr]
  1182. !         JE      @@4
  1183. !         CMP     DI, DS:[SI+TEditorBufLen]
  1184. !         JE      @@4
  1185. !         CMP     BYTE PTR ES:[BX+DI], 0AH
  1186. !         JNE   @@4
  1187. !         INC     DI
  1188. !         JMP   @@4
  1189. ! @@3:    XOR     DI, DI
  1190. ! @@4:    MOV     AX, DI
  1191. !         CLD
  1192. !         RET
  1193. ! @TEditor@lineStart$qus ENDP
  1194. ! ENDIF
  1195.   
  1196. ! ; -----------------------------------------------------------------------------
  1197. ! ; function TEditor.nextChar(P: Word): Word; assembler;
  1198. ! ; -----------------------------------------------------------------------------
  1199. ! IFDEF    __FLAT__
  1200. ! _asmNextChar    PROC
  1201. !         ARG     thisPtr : PTR, P : WORD
  1202. !         USES    ESI, EDI, EBX
  1203. !         MOV     ESI, [thisPtr]
  1204. !         MOVZX    EDI, [P]
  1205. !         CMP     DI, [ESI+TEditorBufLen]
  1206. !         JE      @@2
  1207. !         INC     DI
  1208. !         CMP     DI, [ESI+TEditorBufLen]
  1209. !         JE      @@2
  1210. !         MOV     EBX, [ESI+TEditorBuffer]
  1211. !         CMP     DI, [ESI+TEditorCurPtr]
  1212. !         JB      @@1
  1213. !         MOVZX    EDX, WORD PTR [ESI+TEditorGapLen]
  1214. !         ADD     EBX, EDX
  1215. ! @@1:    CMP     WORD PTR [EBX+EDI-1], 0A0DH
  1216. !         JNE   @@2
  1217. !         INC     DI
  1218. ! @@2:    MOV     AX, DI
  1219. !         RET
  1220. ! _asmNextChar    ENDP
  1221.   
  1222.   ELSE
  1223.   
  1224. ! @TEditor@nextChar$qus PROC
  1225. !         ARG     thisPtr : PTR, P : WORD
  1226. !         USES    DS, SI, DI
  1227.   
  1228. +         LDS     SI, [thisPtr]
  1229. +         MOV     DI, [P]
  1230. +         CMP     DI, DS:[SI+TEditorBufLen]
  1231. +         JE      @@2
  1232. +         INC     DI
  1233. +         CMP     DI, DS:[SI+TEditorBufLen]
  1234. +         JE      @@2
  1235. +         LES     BX, DS:[SI+TEditorBuffer]
  1236. +         CMP     DI, DS:[SI+TEditorCurPtr]
  1237. +         JB      @@1
  1238. +         ADD     BX, DS:[SI+TEditorGapLen]
  1239. + @@1:    CMP     WORD PTR ES:[BX+DI-1], 0A0DH
  1240. +         JNE   @@2
  1241. +         INC     DI
  1242. + @@2:    MOV     AX, DI
  1243. +         RET
  1244.   @TEditor@nextChar$qus ENDP
  1245. + ENDIF
  1246.   
  1247. + ; -----------------------------------------------------------------------------
  1248.   ;function TEditor.prevChar(P: Word): Word; assembler;
  1249. ! ; -----------------------------------------------------------------------------
  1250. ! IFDEF    __FLAT__
  1251. ! _asmPrevChar    PROC
  1252. !         ARG     thisPtr :  PTR, P : WORD
  1253. !         USES   ESI, EDI, EBX
  1254. !         MOV     ESI, DWORD PTR [thisPtr]
  1255. !         MOVZX    EDI, [P]
  1256. !         OR        EDI, EDI
  1257. !         JE      @@2
  1258. !         DEC     EDI
  1259. !         JE      @@2
  1260. !         MOV     EBX, [ESI+TEditorBuffer]
  1261. !         MOVZX    EDX, WORD PTR [ESI+TEditorCurPtr]
  1262. !         CMP     EDI, EDX
  1263. !         JB      @@1
  1264. !         MOVZX    EDX, WORD PTR [ESI+TEditorGapLen]
  1265. !         ADD     EBX, EDX
  1266. ! @@1:    CMP     WORD PTR [EBX+EDI-1], 0A0DH
  1267. !         JNE   @@2
  1268. !         DEC     EDI
  1269. ! @@2:    MOV     EAX, EDI
  1270. !         RET
  1271. ! _asmPrevChar    ENDP
  1272.   
  1273. ! ELSE
  1274.   
  1275. ! @TEditor@prevChar$qus PROC
  1276. !         ARG     thisPtr :  PTR, P : WORD
  1277. !         USES    DS, SI, DI
  1278. !         LDS     SI, [thisPtr]
  1279. !         MOV     DI, [P]
  1280. !         OR        DI, DI
  1281. !         JE      @@2
  1282. !         DEC     DI
  1283. !         JE      @@2
  1284. !         LES     BX, DS:[SI+TEditorBuffer]
  1285. !         CMP     DI, DS:[SI+TEditorCurPtr]
  1286. !         JB      @@1
  1287. !         ADD     BX, DS:[SI+TEditorGapLen]
  1288. ! @@1:    CMP     WORD PTR ES:[BX+DI-1], 0A0DH
  1289. !         JNE   @@2
  1290. !         DEC     DI
  1291. ! @@2:    MOV     AX, DI
  1292. !         RET
  1293.   @TEditor@prevChar$qus ENDP
  1294. + ENDIF
  1295.   
  1296.   
  1297.   ;-----------------------------------------------------------------------------
  1298.   
  1299.   _countLines PROC C
  1300.   
  1301. !         ARG buf:PTR, count:ARGINT
  1302.   
  1303.   IFNDEF __FLAT__
  1304. !         USES DI, SI
  1305.   
  1306. !         LES     DI, buf
  1307. !         MOV     CX, count
  1308. !         XOR     DX, DX
  1309. !         MOV     AL, 0Dh
  1310. !         CLD
  1311.   @@1:
  1312. !         JCXZ  @@2
  1313. !         REPNE    SCASB
  1314. !         JNE   @@2
  1315. !         INC     DX
  1316. !         JMP   @@1
  1317.   @@2:
  1318. !         MOV     AX, DX
  1319. !         RET
  1320.   ELSE
  1321. !         USES    EDI, ESI
  1322.   
  1323. !         MOV     EDI, DWORD PTR [buf]
  1324. !         MOV     ECX, count
  1325. !         XOR     EDX, EDX
  1326. !         MOV     AL, 0Dh
  1327. !         CLD
  1328.   @@1:
  1329. !         JECXZ @@2
  1330. !         REPNE    SCASB
  1331. !         JNE   @@2
  1332. !         INC     EDX
  1333. !         JMP   @@1
  1334.   @@2:
  1335. !         MOV   EAX, EDX
  1336. !         RET
  1337.   ENDIF
  1338.   
  1339.   ENDP
  1340. ***************
  1341. *** 509,825 ****
  1342.   
  1343.   
  1344.   _scan PROC C
  1345. !         ARG block:PTR, bsize:ARGINT, pstr:PTR
  1346. !         LOCAL len:ARGINT
  1347.   
  1348.   IFNDEF __FLAT__
  1349. !         USES SI, DI
  1350.   
  1351. !         LES     DI, pstr
  1352. !         MOV     BX, DI
  1353. !         MOV     CX, DI
  1354. !         NOT     CX
  1355. !         XOR     AL, AL
  1356. !         CLD
  1357. !         REPNE   SCASB
  1358. !         SUB     DI, BX
  1359. !         DEC     DI
  1360. !         MOV     len, DI
  1361. !         PUSH    DS
  1362. !         LES     DI, block
  1363. !         LDS     SI, pstr
  1364. !         MOV     CX, bsize
  1365. !         JCXZ  @@3
  1366. !         CLD
  1367. !         MOV     AX, len
  1368. !         CMP     AX, 1
  1369. !         JB    @@5
  1370. !         JA    @@1
  1371. !         LODSB           ;; searching for a single character
  1372. !         REPNE   SCASB
  1373. !         JNE   @@3
  1374. !         JMP   @@5
  1375.   @@1:
  1376. !         MOV     BX, AX
  1377. !         DEC     BX
  1378. !         MOV     DX, CX
  1379. !         SUB     DX, AX
  1380. !         JB    @@3
  1381. !         LODSB
  1382. !         INC     DX
  1383. !         INC     DX
  1384.   @@2:
  1385. !         DEC     DX
  1386. !         MOV     CX, DX
  1387. !         REPNE   SCASB
  1388. !         JNE   @@3
  1389. !         MOV     DX, CX
  1390. !         MOV     CX, BX
  1391. !         REP     CMPSB
  1392. !         JE    @@4
  1393. !         SUB     CX, BX
  1394. !         ADD     SI, CX
  1395. !         ADD     DI, CX
  1396. !         INC     DI
  1397. !         OR      DX, DX
  1398. !         JNE   @@2
  1399.   @@3:
  1400. !         XOR     AX, AX
  1401. !         JMP   @@6
  1402.   @@4:
  1403. !         SUB     DI, BX
  1404.   @@5:
  1405. !         MOV     AX, DI
  1406. !         SUB     AX, WORD PTR block
  1407.   @@6:
  1408. !         DEC     AX
  1409. !         POP     DS
  1410.   
  1411. !         RET
  1412. ! ELSE                                ; 32-bit version
  1413. !         USES ESI, EDI, EBX
  1414. !         MOV     EDI, DWORD PTR [pstr]
  1415. !         MOV     EBX, EDI
  1416. !         MOV     ECX, EDI
  1417. !         NOT     ECX
  1418. !         XOR     AL, AL
  1419. !         CLD
  1420. !         REPNE   SCASB
  1421. !         SUB     EDI, EBX
  1422. !         DEC     EDI
  1423. !         MOV     len, EDI
  1424. !         MOV     EDI, DWORD PTR [block]
  1425. !         MOV     ESI, DWORD PTR [pstr]
  1426. !         MOV     ECX, bsize
  1427. !         JECXZ @@3
  1428. !         CLD
  1429. !         MOV     EAX, len
  1430. !         CMP     EAX, 1
  1431. !         JB    @@5
  1432. !         JA    @@1
  1433. !         LODSB           ;; searching for a single character
  1434. !         REPNE   SCASB
  1435. !         JNE   @@3
  1436. !         JMP   @@5
  1437.   @@1:
  1438. !         MOV     EBX, EAX
  1439. !         DEC     EBX
  1440. !         MOV     EDX, ECX
  1441. !         SUB     EDX, EAX
  1442. !         JB    @@3
  1443. !         LODSB
  1444. !         INC     EDX
  1445. !         INC     EDX
  1446.   @@2:
  1447. !         DEC     EDX
  1448. !         MOV     ECX, EDX
  1449. !         REPNE   SCASB
  1450. !         JNE   @@3
  1451. !         MOV     EDX, ECX
  1452. !         MOV     ECX, EBX
  1453. !         REP     CMPSB
  1454. !         JE    @@4
  1455. !         SUB     ECX, EBX
  1456. !         ADD     ESI, ECX
  1457. !         ADD     EDI, ECX
  1458. !         INC     EDI
  1459. !         OR      EDX, EDX
  1460. !         JNE   @@2
  1461.   @@3:
  1462. !         XOR     EAX, EAX
  1463. !         JMP   @@6
  1464.   @@4:
  1465. !         SUB     EDI, EBX
  1466.   @@5:
  1467. !         MOV     EAX, EDI
  1468. !         SUB     EAX, DWORD PTR [block]
  1469.   @@6:
  1470. !         DEC     EAX
  1471. !         RET
  1472.   ENDIF
  1473.   ENDP
  1474.   
  1475.   _iScan PROC C
  1476. !         ARG block:PTR, bsize:ARGINT, pstr:PTR
  1477. !         LOCAL len:ARGINT, s:BYTE:256
  1478.   
  1479.   IFNDEF __FLAT__
  1480. !         USES SI, DI
  1481.   
  1482. !         LES     DI, pstr
  1483. !         MOV     BX, DI
  1484. !         MOV     CX, DI
  1485. !         NOT     CX
  1486. !         XOR     AL, AL
  1487. !         CLD
  1488. !         REPNE   SCASB
  1489. !         SUB     DI, BX
  1490. !         DEC     DI
  1491. !         MOV     len, DI
  1492. !         PUSH    DS
  1493. !         MOV     AX, SS
  1494. !         MOV     ES, AX
  1495. !         LEA     DI, s
  1496. !         LDS     SI, pstr
  1497. !         MOV     AX, len;
  1498. !         MOV     CX, AX
  1499. !         MOV     BX, AX
  1500. !         JCXZ  @@9
  1501.   @@1:
  1502. !         LODSB
  1503. !         CMP     AL, 'a'
  1504. !         JB    @@2
  1505. !         CMP     AL, 'z'
  1506. !         JA    @@2
  1507. !         SUB     AL, 20h
  1508.   @@2:
  1509. !         STOSB
  1510. !         LOOP  @@1
  1511. !         SUB     DI, BX
  1512. !         LDS     SI, block
  1513. !         MOV     CX, bsize
  1514. !         JCXZ  @@8
  1515. !         CLD
  1516. !         SUB     CX, BX
  1517. !         JB    @@8
  1518. !         INC     CX
  1519.   @@4:
  1520. !         MOV     AH, ES:[DI]
  1521. !         AND     AH, 0DFh
  1522.   @@5:
  1523. !         LODSB
  1524. !         AND     AL, 0DFh
  1525. !         CMP     AL, AH
  1526. !         LOOPNE @@5
  1527. !         JNE   @@8
  1528. !         DEC     SI
  1529. !         MOV     DX, CX
  1530. !         MOV     CX, BX
  1531.   @@6:
  1532. !         REPE    CMPSB
  1533. !         JE    @@10
  1534. !         MOV     AL, DS:[SI-1]
  1535. !         CMP     AL, 'a'
  1536. !         JB    @@7
  1537. !         CMP     AL, 'z'
  1538. !         JA    @@7
  1539. !         SUB     AL, 20h
  1540.   @@7:
  1541. !         CMP     AL, ES:[DI-1]
  1542. !         JE    @@6
  1543. !         SUB     CX, BX
  1544. !         ADD     SI, CX
  1545. !         ADD     DI, CX
  1546. !         INC     SI
  1547. !         MOV     CX, DX
  1548. !         OR      CX, DX
  1549. !         JNE   @@4
  1550.   @@8:
  1551. !         XOR     AX, AX
  1552. !         JMP   @@11
  1553.   @@9:
  1554. !         MOV     AX, 1
  1555. !         JMP   @@11
  1556.   @@10:
  1557. !         SUB     SI, BX
  1558. !         MOV     AX, SI
  1559. !         SUB     AX, WORD PTR block
  1560. !         INC     AX
  1561.   @@11:
  1562. !         DEC     AX
  1563. !         POP     DS
  1564. !         RET
  1565. ! ELSE                ; 32-bit version
  1566. !         USES ESI, EDI, EBX
  1567. !         MOV     EDI, DWORD PTR [pstr]
  1568. !         MOV     EBX, EDI
  1569. !         MOV     ECX, EDI
  1570. !         NOT     ECX
  1571. !         XOR     AL, AL
  1572. !         CLD
  1573. !         REPNE   SCASB
  1574. !         SUB     EDI, EBX
  1575. !         DEC     EDI
  1576. !         MOV     len, EDI
  1577. !         LEA     EDI, s
  1578. !         MOV     ESI, DWORD PTR [pstr]
  1579. !         MOV     EAX, len;
  1580. !         MOV     ECX, EAX
  1581. !         MOV     EBX, EAX
  1582. !         JECXZ @@9
  1583.   @@1:
  1584. !         LODSB
  1585. !         CMP     AL, 'a'
  1586. !         JB    @@2
  1587. !         CMP     AL, 'z'
  1588. !         JA    @@2
  1589. !         SUB     AL, 20h
  1590.   @@2:
  1591. !         STOSB
  1592. !         LOOP @@1
  1593. !         SUB     EDI, EBX
  1594. !         MOV     ESI, DWORD PTR [block]
  1595. !         MOV     ECX, bsize
  1596. !         JECXZ @@8
  1597. !         CLD
  1598. !         SUB     ECX, EBX
  1599. !         JB    @@8
  1600. !         INC     ECX
  1601.   @@4:
  1602. !         MOV     AH, ES:[EDI]
  1603. !         AND     AH, 0DFh
  1604.   @@5:
  1605. !         LODSB
  1606. !         AND     AL, 0DFh
  1607. !         CMP     AL, AH
  1608. !         LOOPNE @@5
  1609. !         JNE   @@8
  1610. !         DEC     ESI
  1611. !         MOV     EDX, ECX
  1612. !         MOV     ECX, EBX
  1613.   @@6:
  1614. !         REPE    CMPSB
  1615. !         JE    @@10
  1616. !         MOV     AL, DS:[ESI-1]
  1617. !         CMP     AL, 'a'
  1618. !         JB    @@7
  1619. !         CMP     AL, 'z'
  1620. !         JA    @@7
  1621. !         SUB     AL, 20h
  1622.   @@7:
  1623. !         CMP     AL, ES:[EDI-1]
  1624. !         JE    @@6
  1625. !         SUB     ECX, EBX
  1626. !         ADD     ESI, ECX
  1627. !         ADD     EDI, ECX
  1628. !         INC     ESI
  1629. !         MOV     ECX, EDX
  1630. !         OR      ECX, ECX
  1631. !         JNE   @@4
  1632.   @@8:
  1633. !         XOR     EAX, EAX
  1634. !         JMP   @@11
  1635.   @@9:
  1636. !         MOV     EAX, 1
  1637. !         JMP   @@11
  1638.   @@10:
  1639. !         SUB     ESI, EBX
  1640. !         MOV     EAX, ESI
  1641. !         SUB     EAX, DWORD PTR [block]
  1642. !         INC     EAX
  1643.   @@11:
  1644. !         DEC     AX
  1645. !         RET
  1646.   ENDIF
  1647.   ENDP
  1648.   
  1649. !         END
  1650.   
  1651. --- 552,868 ----
  1652.   
  1653.   
  1654.   _scan PROC C
  1655. !         ARG block:PTR, bsize:ARGINT, pstr:PTR
  1656. !         LOCAL len:ARGINT
  1657.   
  1658.   IFNDEF __FLAT__
  1659. !         USES SI, DI
  1660.   
  1661. !         LES     DI, pstr
  1662. !         MOV     BX, DI
  1663. !         MOV     CX, DI
  1664. !         NOT     CX
  1665. !         XOR     AL, AL
  1666. !         CLD
  1667. !         REPNE    SCASB
  1668. !         SUB     DI, BX
  1669. !         DEC     DI
  1670. !         MOV     len, DI
  1671. !         PUSH    DS
  1672. !         LES     DI, block
  1673. !         LDS     SI, pstr
  1674. !         MOV     CX, bsize
  1675. !         JCXZ  @@3
  1676. !         CLD
  1677. !         MOV     AX, len
  1678. !         CMP     AX, 1
  1679. !         JB      @@5
  1680. !         JA      @@1
  1681. !         LODSB            ;; searching for a single character
  1682. !         REPNE    SCASB
  1683. !         JNE   @@3
  1684. !         JMP   @@5
  1685.   @@1:
  1686. !         MOV     BX, AX
  1687. !         DEC     BX
  1688. !         MOV     DX, CX
  1689. !         SUB     DX, AX
  1690. !         JB      @@3
  1691. !         LODSB
  1692. !         INC     DX
  1693. !         INC     DX
  1694.   @@2:
  1695. !         DEC     DX
  1696. !         MOV     CX, DX
  1697. !         REPNE    SCASB
  1698. !         JNE   @@3
  1699. !         MOV     DX, CX
  1700. !         MOV     CX, BX
  1701. !         REP     CMPSB
  1702. !         JE      @@4
  1703. !         SUB     CX, BX
  1704. !         ADD     SI, CX
  1705. !         ADD     DI, CX
  1706. !         INC     DI
  1707. !         OR        DX, DX
  1708. !         JNE   @@2
  1709.   @@3:
  1710. !         XOR     AX, AX
  1711. !         JMP   @@6
  1712.   @@4:
  1713. !         SUB     DI, BX
  1714.   @@5:
  1715. !         MOV     AX, DI
  1716. !         SUB     AX, WORD PTR block
  1717.   @@6:
  1718. !         DEC     AX
  1719. !         POP     DS
  1720.   
  1721. !         RET
  1722. ! ELSE                                ; 32-bit version
  1723. !         USES ESI, EDI, EBX
  1724. !         MOV     EDI, DWORD PTR [pstr]
  1725. !         MOV     EBX, EDI
  1726. !         MOV     ECX, EDI
  1727. !         NOT     ECX
  1728. !         XOR     AL, AL
  1729. !         CLD
  1730. !         REPNE    SCASB
  1731. !         SUB     EDI, EBX
  1732. !         DEC     EDI
  1733. !         MOV     len, EDI
  1734. !         MOV     EDI, DWORD PTR [block]
  1735. !         MOV     ESI, DWORD PTR [pstr]
  1736. !         MOV     ECX, bsize
  1737. !         JECXZ @@3
  1738. !         CLD
  1739. !         MOV     EAX, len
  1740. !         CMP     EAX, 1
  1741. !         JB      @@5
  1742. !         JA      @@1
  1743. !         LODSB            ;; searching for a single character
  1744. !         REPNE    SCASB
  1745. !         JNE   @@3
  1746. !         JMP   @@5
  1747.   @@1:
  1748. !         MOV     EBX, EAX
  1749. !         DEC     EBX
  1750. !         MOV     EDX, ECX
  1751. !         SUB     EDX, EAX
  1752. !         JB      @@3
  1753. !         LODSB
  1754. !         INC     EDX
  1755. !         INC     EDX
  1756.   @@2:
  1757. !         DEC     EDX
  1758. !         MOV     ECX, EDX
  1759. !         REPNE    SCASB
  1760. !         JNE   @@3
  1761. !         MOV     EDX, ECX
  1762. !         MOV     ECX, EBX
  1763. !         REP     CMPSB
  1764. !         JE      @@4
  1765. !         SUB     ECX, EBX
  1766. !         ADD     ESI, ECX
  1767. !         ADD     EDI, ECX
  1768. !         INC     EDI
  1769. !         OR        EDX, EDX
  1770. !         JNE   @@2
  1771.   @@3:
  1772. !         XOR     EAX, EAX
  1773. !         JMP   @@6
  1774.   @@4:
  1775. !         SUB     EDI, EBX
  1776.   @@5:
  1777. !         MOV     EAX, EDI
  1778. !         SUB     EAX, DWORD PTR [block]
  1779.   @@6:
  1780. !         DEC     EAX
  1781. !         RET
  1782.   ENDIF
  1783.   ENDP
  1784.   
  1785.   _iScan PROC C
  1786. !         ARG block:PTR, bsize:ARGINT, pstr:PTR
  1787. !         LOCAL len:ARGINT, s:BYTE:256
  1788.   
  1789.   IFNDEF __FLAT__
  1790. !         USES SI, DI
  1791.   
  1792. !         LES     DI, pstr
  1793. !         MOV     BX, DI
  1794. !         MOV     CX, DI
  1795. !         NOT     CX
  1796. !         XOR     AL, AL
  1797. !         CLD
  1798. !         REPNE    SCASB
  1799. !         SUB     DI, BX
  1800. !         DEC     DI
  1801. !         MOV     len, DI
  1802. !         PUSH    DS
  1803. !         MOV     AX, SS
  1804. !         MOV     ES, AX
  1805. !         LEA     DI, s
  1806. !         LDS     SI, pstr
  1807. !         MOV     AX, len;
  1808. !         MOV     CX, AX
  1809. !         MOV     BX, AX
  1810. !         JCXZ  @@9
  1811.   @@1:
  1812. !         LODSB
  1813. !         CMP     AL, 'a'
  1814. !         JB      @@2
  1815. !         CMP     AL, 'z'
  1816. !         JA      @@2
  1817. !         SUB     AL, 20h
  1818.   @@2:
  1819. !         STOSB
  1820. !         LOOP  @@1
  1821. !         SUB     DI, BX
  1822. !         LDS     SI, block
  1823. !         MOV     CX, bsize
  1824. !         JCXZ  @@8
  1825. !         CLD
  1826. !         SUB     CX, BX
  1827. !         JB      @@8
  1828. !         INC     CX
  1829.   @@4:
  1830. !         MOV     AH, ES:[DI]
  1831. !         AND     AH, 0DFh
  1832.   @@5:
  1833. !         LODSB
  1834. !         AND     AL, 0DFh
  1835. !         CMP     AL, AH
  1836. !         LOOPNE @@5
  1837. !         JNE   @@8
  1838. !         DEC     SI
  1839. !         MOV     DX, CX
  1840. !         MOV     CX, BX
  1841.   @@6:
  1842. !         REPE    CMPSB
  1843. !         JE      @@10
  1844. !         MOV     AL, DS:[SI-1]
  1845. !         CMP     AL, 'a'
  1846. !         JB      @@7
  1847. !         CMP     AL, 'z'
  1848. !         JA      @@7
  1849. !         SUB     AL, 20h
  1850.   @@7:
  1851. !         CMP     AL, ES:[DI-1]
  1852. !         JE      @@6
  1853. !         SUB     CX, BX
  1854. !         ADD     SI, CX
  1855. !         ADD     DI, CX
  1856. !         INC     SI
  1857. !         MOV     CX, DX
  1858. !         OR        CX, DX
  1859. !         JNE   @@4
  1860.   @@8:
  1861. !         XOR     AX, AX
  1862. !         JMP   @@11
  1863.   @@9:
  1864. !         MOV     AX, 1
  1865. !         JMP   @@11
  1866.   @@10:
  1867. !         SUB     SI, BX
  1868. !         MOV     AX, SI
  1869. !         SUB     AX, WORD PTR block
  1870. !         INC     AX
  1871.   @@11:
  1872. !         DEC     AX
  1873. !         POP     DS
  1874. !         RET
  1875. ! ELSE                ; 32-bit version
  1876. !         USES ESI, EDI, EBX
  1877. !         MOV     EDI, DWORD PTR [pstr]
  1878. !         MOV     EBX, EDI
  1879. !         MOV     ECX, EDI
  1880. !         NOT     ECX
  1881. !         XOR     AL, AL
  1882. !         CLD
  1883. !         REPNE    SCASB
  1884. !         SUB     EDI, EBX
  1885. !         DEC     EDI
  1886. !         MOV     len, EDI
  1887. !         LEA     EDI, s
  1888. !         MOV     ESI, DWORD PTR [pstr]
  1889. !         MOV     EAX, len;
  1890. !         MOV     ECX, EAX
  1891. !         MOV     EBX, EAX
  1892. !         JECXZ @@9
  1893.   @@1:
  1894. !         LODSB
  1895. !         CMP     AL, 'a'
  1896. !         JB      @@2
  1897. !         CMP     AL, 'z'
  1898. !         JA      @@2
  1899. !         SUB     AL, 20h
  1900.   @@2:
  1901. !         STOSB
  1902. !         LOOP @@1
  1903. !         SUB     EDI, EBX
  1904. !         MOV     ESI, DWORD PTR [block]
  1905. !         MOV     ECX, bsize
  1906. !         JECXZ @@8
  1907. !         CLD
  1908. !         SUB     ECX, EBX
  1909. !         JB      @@8
  1910. !         INC     ECX
  1911.   @@4:
  1912. !         MOV     AH, ES:[EDI]
  1913. !         AND     AH, 0DFh
  1914.   @@5:
  1915. !         LODSB
  1916. !         AND     AL, 0DFh
  1917. !         CMP     AL, AH
  1918. !         LOOPNE @@5
  1919. !         JNE   @@8
  1920. !         DEC     ESI
  1921. !         MOV     EDX, ECX
  1922. !         MOV     ECX, EBX
  1923.   @@6:
  1924. !         REPE    CMPSB
  1925. !         JE      @@10
  1926. !         MOV     AL, DS:[ESI-1]
  1927. !         CMP     AL, 'a'
  1928. !         JB      @@7
  1929. !         CMP     AL, 'z'
  1930. !         JA      @@7
  1931. !         SUB     AL, 20h
  1932.   @@7:
  1933. !         CMP     AL, ES:[EDI-1]
  1934. !         JE      @@6
  1935. !         SUB     ECX, EBX
  1936. !         ADD     ESI, ECX
  1937. !         ADD     EDI, ECX
  1938. !         INC     ESI
  1939. !         MOV     ECX, EDX
  1940. !         OR        ECX, ECX
  1941. !         JNE   @@4
  1942.   @@8:
  1943. !         XOR     EAX, EAX
  1944. !         JMP   @@11
  1945.   @@9:
  1946. !         MOV     EAX, 1
  1947. !         JMP   @@11
  1948.   @@10:
  1949. !         SUB     ESI, EBX
  1950. !         MOV     EAX, ESI
  1951. !         SUB     EAX, DWORD PTR [block]
  1952. !         INC     EAX
  1953.   @@11:
  1954. !         DEC     AX
  1955. !         RET
  1956.   ENDIF
  1957.   ENDP
  1958.   
  1959. !         END
  1960.   
  1961. diff --context ..\tvo/Framelin.asm ./Framelin.asm
  1962. *** ../tvo/Framelin.asm    Fri Jun 17 01:00:00 1994
  1963. --- ./Framelin.asm    Wed Apr 19 11:46:24 1995
  1964. ***************
  1965. *** 1,214 ****
  1966.   ;/*------------------------------------------------------------*/
  1967. ! ;/* filename -  framelin.asm                                   */
  1968. ! ;/*                                                            */
  1969. ! ;/* function(s)                                                */
  1970. ! ;/*             TFrame frameLine member function               */
  1971.   ;/*------------------------------------------------------------*/
  1972.   
  1973.   ;
  1974. ! ;       Turbo Vision - Version 2.0
  1975. ! ; 
  1976. ! ;       Copyright (c) 1994 by Borland International
  1977. ! ;       All Rights Reserved.
  1978. ! ; 
  1979.   
  1980.   ifndef __FLAT__
  1981. !         PUBLIC  @TFrame@frameLine$qm11TDrawBufferssuc
  1982.   else
  1983. !         PUBLIC  @TFrame@frameLine$qr11TDrawBufferssuc
  1984.   endif
  1985. !         EXTRN   @TFrame@initFrame : BYTE
  1986. !         EXTRN   @TFrame@frameChars : BYTE
  1987. !         INCLUDE TV.INC
  1988.   
  1989. !         MaxViewWidth   equ   132
  1990.   
  1991.   DATASEG
  1992.   
  1993. ! FrameMask   DB   MaxViewWidth dup(?)
  1994.   
  1995.   CODESEG
  1996.   
  1997.   ifndef __FLAT__
  1998.   @TFrame@frameLine$qm11TDrawBufferssuc PROC
  1999.   else
  2000. ! @TFrame@frameLine$qr11TDrawBufferssuc PROC
  2001.   endif
  2002. !         ARG   thisPtr:PTR, FrameBuf:PTR, Y:ARGINT, N:ARGINT, Color:BYTE
  2003.   
  2004.   ifndef __FLAT__
  2005. !         USES    SI,DI
  2006.   
  2007. !         LES     BX, [thisPtr]
  2008. !         MOV     DX, ES:[BX+TFrameSizeX]
  2009. !         MOV     CX, DX
  2010. !         DEC     CX
  2011. !         DEC     CX
  2012. !         MOV     SI, OFFSET @TFrame@initFrame
  2013. !         ADD     SI, [N]
  2014. !         LEA     DI, [FrameMask]
  2015. !         PUSH    DS
  2016. !         POP     ES
  2017. !         CLD
  2018. !         MOVSB
  2019. !         LODSB
  2020. !         REP     STOSB
  2021. !         MOVSB
  2022. !         LES     BX, [thisPtr]
  2023. !         LES     BX, ES:[BX+TFrameOwner]
  2024. !         LES     BX, ES:[BX+TGroupLast]
  2025. !         DEC     DX
  2026. ! @@1:    LES     BX, ES:[BX+TViewNext]
  2027. !         CMP     BX, WORD PTR [ thisPtr]
  2028. !         JNE   @@2
  2029. !         MOV     AX, ES
  2030. !         CMP     AX, WORD PTR [ thisPtr+2]
  2031. !         JE    @@10
  2032. ! @@2:    TEST    WORD PTR ES:[BX+TViewOptions], ofFramed
  2033. !         JE    @@1
  2034. !         TEST    WORD PTR ES:[BX+TViewState], sfVisible
  2035. !         JE    @@1
  2036. !         MOV     AX, [Y]
  2037. !         SUB     AX, ES:[BX+TViewOriginY]
  2038. !         JL    @@3
  2039. !         CMP     AX, ES:[BX+TViewSizeY]
  2040. !         JG    @@1
  2041. !         MOV     AX, 0005H
  2042. !         JL    @@4
  2043. !         MOV     AX, 0A03H
  2044. !         JMP   @@4
  2045. ! @@3:    INC     AX
  2046. !         JNE   @@1
  2047. !         MOV     AX, 0A06H
  2048. ! @@4:    MOV     SI, ES:[BX+TViewOriginX]
  2049. !         MOV     DI, ES:[BX+TViewSizeX]
  2050. !         ADD     DI, SI
  2051. !         CMP     SI, 1
  2052. !         JG    @@5
  2053. !         MOV     SI, 1
  2054. ! @@5:    CMP     DI, DX
  2055. !         JL    @@6
  2056. !         MOV     DI, DX
  2057. ! @@6:    CMP     SI, DI
  2058. !         JGE   @@1
  2059. !         OR      [BYTE PTR FrameMask+SI-1], AL
  2060. !         XOR     AL, AH
  2061. !         OR      [BYTE PTR FrameMask+DI], AL
  2062. !         OR      AH, AH
  2063. !         JE    @@1
  2064. !         MOV     CX, DI
  2065. !         SUB     CX, SI
  2066. ! @@8:    OR      [BYTE PTR FrameMask+SI], AH
  2067. !         INC     SI
  2068. !         LOOP  @@8
  2069. !         JMP   @@1
  2070. ! @@10:   INC     DX
  2071. !         MOV     AH, [Color]
  2072. !         MOV     BX, OFFSET @TFrame@frameChars
  2073. !         MOV     CX, DX
  2074. !         LEA     SI, [FrameMask]
  2075. !         LES     DI, [FrameBuf]
  2076. !         ADD     DI, TDrawBufferData
  2077. ! @@11:   LODSB
  2078. !         XLAT
  2079. !         STOSW
  2080. !         LOOP    @@11
  2081. !         RET
  2082. ! else    ;;;;;;;;;;;;;;;;;;;;;;;;;; 32-bit version ;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2083. !         USES    ESI,EDI,EBX
  2084. !         XOR     EAX, EAX
  2085. !         MOV     WORD PTR [Y+2], AX
  2086. !         MOV     WORD PTR [N+2], AX
  2087. !         MOV     EBX, DWORD PTR [thisPtr]
  2088. !         MOV     EDX, [EBX+TFrameSizeX]
  2089. !         MOV     ECX, EDX
  2090. !         DEC     ECX
  2091. !         DEC     ECX
  2092. !         MOV     ESI, OFFSET @TFrame@initFrame
  2093. !         ADD     ESI, [N]
  2094. !         LEA     EDI, [FrameMask]
  2095. !         CLD
  2096. !         MOVSB
  2097. !         LODSB
  2098. !         MOV     AH, AL
  2099. !         MOV     EBX, EAX
  2100. !         SHL     EAX, 16
  2101. !         MOV     AX, BX
  2102. !         MOV     EBX, ECX
  2103. !         SHR     ECX, 2
  2104. !         REP     STOSD
  2105. !         MOV     ECX, EBX
  2106. !         AND     ECX, 03H
  2107. !         REP STOSB
  2108. !         MOVSB
  2109. !         MOV     EBX, DWORD PTR [thisPtr]
  2110. !         MOV     EBX, [EBX+TFrameOwner]
  2111. !         MOV     EBX, [EBX+TGroupLast]
  2112. !         DEC     EDX
  2113. ! @@1:    MOV     EBX, [EBX+TViewNext]
  2114. !         CMP     EBX, DWORD PTR [thisPtr]
  2115. !         JE    @@10
  2116. ! @@2:    TEST    WORD PTR [EBX+TViewOptions], ofFramed
  2117. !         JE    @@1
  2118. !         TEST    WORD PTR [EBX+TViewState], sfVisible
  2119. !         JE    @@1
  2120. !         MOV     EAX, [Y]
  2121. !         SUB     EAX, [EBX+TViewOriginY]
  2122. !         JL    @@3
  2123. !         CMP     EAX, [EBX+TViewSizeY]
  2124. !         JG    @@1
  2125. !         MOV     EAX, 0005H
  2126. !         JL    @@4
  2127. !         MOV     EAX, 0A03H
  2128. !         JMP   @@4
  2129. ! @@3:    INC     EAX
  2130. !         JNE   @@1
  2131. !         MOV     EAX, 0A06H
  2132. ! @@4:    MOV     ESI, [EBX+TViewOriginX]
  2133. !         MOV     EDI, [EBX+TViewSizeX]
  2134. !         ADD     EDI, ESI
  2135. !         CMP     ESI, 1
  2136. !         JG    @@5
  2137. !         MOV     ESI, 1
  2138. ! @@5:    CMP     EDI, EDX
  2139. !         JL    @@6
  2140. !         MOV     EDI, EDX
  2141. ! @@6:    CMP     ESI, EDI
  2142. !         JGE   @@1
  2143. !         OR      [BYTE PTR FrameMask+ESI-1], AL
  2144. !         XOR     AL,AH
  2145. !         OR      [BYTE PTR FrameMask+EDI], AL
  2146. !         OR      AH,AH
  2147. !         JE    @@1
  2148. !         MOV     ECX, EDI
  2149. !         SUB     ECX, ESI
  2150. ! @@8:    OR      [BYTE PTR FrameMask+ESI], AH
  2151. !         INC     ESI
  2152. !         LOOP  @@8
  2153. !         JMP   @@1
  2154. ! @@10:   INC     EDX
  2155. !         MOV     AH, [Color]
  2156. !         MOV     EBX, OFFSET @TFrame@frameChars
  2157. !         MOV     ECX, EDX
  2158. !         LEA     ESI, [FrameMask]
  2159. !         MOV     EDI, DWORD PTR [FrameBuf]
  2160. !         ADD     EDI, TDrawBufferData
  2161. ! @@11:   LODSB
  2162. !         XLAT
  2163. !         STOSW
  2164. !         LOOP  @@11
  2165. !         RET
  2166.   endif
  2167.   ifndef __FLAT__
  2168.   @TFrame@frameLine$qm11TDrawBufferssuc ENDP
  2169.   else
  2170. ! @TFrame@frameLine$qr11TDrawBufferssuc ENDP
  2171.   endif
  2172.   
  2173.   END
  2174. --- 1,217 ----
  2175.   ;/*------------------------------------------------------------*/
  2176. ! ;/* filename -    framelin.asm                                   */
  2177. ! ;/*                                                            */
  2178. ! ;/* function(s)                                                */
  2179. ! ;/*             TFrame frameLine member function               */
  2180.   ;/*------------------------------------------------------------*/
  2181.   
  2182.   ;
  2183. ! ;        Turbo Vision - Version 2.0
  2184. ! ;
  2185. ! ;        Copyright (c) 1994 by Borland International
  2186. ! ;        All Rights Reserved.
  2187. ! ;
  2188.   
  2189.   ifndef __FLAT__
  2190. !         PUBLIC    @TFrame@frameLine$qm11TDrawBufferssuc
  2191. !         EXTRN    @TFrame@initFrame : BYTE
  2192. !         EXTRN    @TFrame@frameChars : BYTE
  2193.   else
  2194. !         ; --- Flat model entrypoint (C-callable)
  2195. !         public    _asmFrameLine
  2196. !         extrn    _asmInitFrame : byte    ; from TVTEXT1
  2197. !         extrn    _asmFrameChars: byte    ; from TVTEXT1
  2198.   endif
  2199. !         INCLUDE TV.INC
  2200.   
  2201. !         MaxViewWidth   equ     132
  2202.   
  2203.   DATASEG
  2204.   
  2205. ! FrameMask    DB     MaxViewWidth dup(?)
  2206.   
  2207.   CODESEG
  2208.   
  2209.   ifndef __FLAT__
  2210.   @TFrame@frameLine$qm11TDrawBufferssuc PROC
  2211.   else
  2212. ! _asmFrameLine PROC
  2213.   endif
  2214. !         ARG   thisPtr:PTR, FrameBuf:PTR, Y:ARGINT, N:ARGINT, Color:BYTE
  2215.   
  2216.   ifndef __FLAT__
  2217. !         USES    SI,DI
  2218.   
  2219. !         LES     BX, [thisPtr]
  2220. !         MOV     DX, ES:[BX+TFrameSizeX]
  2221. !         MOV     CX, DX
  2222. !         DEC     CX
  2223. !         DEC     CX
  2224. !         MOV     SI, OFFSET @TFrame@initFrame
  2225. !         ADD     SI, [N]
  2226. !         LEA     DI, [FrameMask]
  2227. !         PUSH    DS
  2228. !         POP     ES
  2229. !         CLD
  2230. !         MOVSB
  2231. !         LODSB
  2232. !         REP     STOSB
  2233. !         MOVSB
  2234. !         LES     BX, [thisPtr]
  2235. !         LES     BX, ES:[BX+TFrameOwner]
  2236. !         LES     BX, ES:[BX+TGroupLast]
  2237. !         DEC     DX
  2238. ! @@1:    LES     BX, ES:[BX+TViewNext]
  2239. !         CMP     BX, WORD PTR [ thisPtr]
  2240. !         JNE   @@2
  2241. !         MOV     AX, ES
  2242. !         CMP     AX, WORD PTR [ thisPtr+2]
  2243. !         JE      @@10
  2244. ! @@2:    TEST    WORD PTR ES:[BX+TViewOptions], ofFramed
  2245. !         JE      @@1
  2246. !         TEST    WORD PTR ES:[BX+TViewState], sfVisible
  2247. !         JE      @@1
  2248. !         MOV     AX, [Y]
  2249. !         SUB     AX, ES:[BX+TViewOriginY]
  2250. !         JL      @@3
  2251. !         CMP     AX, ES:[BX+TViewSizeY]
  2252. !         JG      @@1
  2253. !         MOV     AX, 0005H
  2254. !         JL      @@4
  2255. !         MOV     AX, 0A03H
  2256. !         JMP   @@4
  2257. ! @@3:    INC     AX
  2258. !         JNE   @@1
  2259. !         MOV     AX, 0A06H
  2260. ! @@4:    MOV     SI, ES:[BX+TViewOriginX]
  2261. !         MOV     DI, ES:[BX+TViewSizeX]
  2262. !         ADD     DI, SI
  2263. !         CMP     SI, 1
  2264. !         JG      @@5
  2265. !         MOV     SI, 1
  2266. ! @@5:    CMP     DI, DX
  2267. !         JL      @@6
  2268. !         MOV     DI, DX
  2269. ! @@6:    CMP     SI, DI
  2270. !         JGE   @@1
  2271. !         OR        [BYTE PTR FrameMask+SI-1], AL
  2272. !         XOR     AL, AH
  2273. !         OR        [BYTE PTR FrameMask+DI], AL
  2274. !         OR        AH, AH
  2275. !         JE      @@1
  2276. !         MOV     CX, DI
  2277. !         SUB     CX, SI
  2278. ! @@8:    OR        [BYTE PTR FrameMask+SI], AH
  2279. !         INC     SI
  2280. !         LOOP  @@8
  2281. !         JMP   @@1
  2282. ! @@10:    INC     DX
  2283. !         MOV     AH, [Color]
  2284. !         MOV     BX, OFFSET @TFrame@frameChars
  2285. !         MOV     CX, DX
  2286. !         LEA     SI, [FrameMask]
  2287. !         LES     DI, [FrameBuf]
  2288. !         ADD     DI, TDrawBufferData
  2289. ! @@11:    LODSB
  2290. !         XLAT
  2291. !         STOSW
  2292. !         LOOP    @@11
  2293. !         RET
  2294. ! else    ;;;;;;;;;;;;;;;;;;;;;;;;;; 32-bit version ;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2295. !         USES    ESI,EDI,EBX
  2296. !         XOR     EAX, EAX
  2297. !         MOV     WORD PTR [Y+2], AX
  2298. !         MOV     WORD PTR [N+2], AX
  2299. !         MOV     EBX, DWORD PTR [thisPtr]
  2300. !         MOV     EDX, [EBX+TFrameSizeX]
  2301. !         MOV     ECX, EDX
  2302. !         DEC     ECX
  2303. !         DEC     ECX
  2304. !         MOV     ESI, OFFSET _asmInitFrame
  2305. !         ADD     ESI, [N]
  2306. !         LEA     EDI, [FrameMask]
  2307. !         CLD
  2308. !         MOVSB
  2309. !         LODSB
  2310. !         MOV     AH, AL
  2311. !         MOV     EBX, EAX
  2312. !         SHL     EAX, 16
  2313. !         MOV     AX, BX
  2314. !         MOV     EBX, ECX
  2315. !         SHR     ECX, 2
  2316. !         REP     STOSD
  2317. !         MOV     ECX, EBX
  2318. !         AND     ECX, 03H
  2319. !         REP STOSB
  2320. !         MOVSB
  2321. !         MOV     EBX, DWORD PTR [thisPtr]
  2322. !         MOV     EBX, [EBX+TFrameOwner]
  2323. !         MOV     EBX, [EBX+TGroupLast]
  2324. !         DEC     EDX
  2325. ! @@1:    MOV     EBX, [EBX+TViewNext]
  2326. !         CMP     EBX, DWORD PTR [thisPtr]
  2327. !         JE      @@10
  2328. ! @@2:    TEST    WORD PTR [EBX+TViewOptions], ofFramed
  2329. !         JE      @@1
  2330. !         TEST    WORD PTR [EBX+TViewState], sfVisible
  2331. !         JE      @@1
  2332. !         MOV     EAX, [Y]
  2333. !         SUB     EAX, [EBX+TViewOriginY]
  2334. !         JL      @@3
  2335. !         CMP     EAX, [EBX+TViewSizeY]
  2336. !         JG      @@1
  2337. !         MOV     EAX, 0005H
  2338. !         JL      @@4
  2339. !         MOV     EAX, 0A03H
  2340. !         JMP   @@4
  2341. ! @@3:    INC     EAX
  2342. !         JNE   @@1
  2343. !         MOV     EAX, 0A06H
  2344. ! @@4:    MOV     ESI, [EBX+TViewOriginX]
  2345. !         MOV     EDI, [EBX+TViewSizeX]
  2346. !         ADD     EDI, ESI
  2347. !         CMP     ESI, 1
  2348. !         JG      @@5
  2349. !         MOV     ESI, 1
  2350. ! @@5:    CMP     EDI, EDX
  2351. !         JL      @@6
  2352. !         MOV     EDI, EDX
  2353. ! @@6:    CMP     ESI, EDI
  2354. !         JGE   @@1
  2355. !         OR        [BYTE PTR FrameMask+ESI-1], AL
  2356. !         XOR     AL,AH
  2357. !         OR        [BYTE PTR FrameMask+EDI], AL
  2358. !         OR        AH,AH
  2359. !         JE      @@1
  2360. !         MOV     ECX, EDI
  2361. !         SUB     ECX, ESI
  2362. ! @@8:    OR        [BYTE PTR FrameMask+ESI], AH
  2363. !         INC     ESI
  2364. !         LOOP  @@8
  2365. !         JMP   @@1
  2366. ! @@10:    INC     EDX
  2367. !         MOV     AH, [Color]
  2368. !         MOV     EBX, OFFSET _asmFrameChars
  2369. !         MOV     ECX, EDX
  2370. !         LEA     ESI, [FrameMask]
  2371. !         MOV     EDI, DWORD PTR [FrameBuf]
  2372. !         ADD     EDI, TDrawBufferData
  2373. ! @@11:    LODSB
  2374. !         XLAT
  2375. !         STOSW
  2376. !         LOOP  @@11
  2377. !         RET
  2378.   endif
  2379.   ifndef __FLAT__
  2380.   @TFrame@frameLine$qm11TDrawBufferssuc ENDP
  2381.   else
  2382. ! _asmFrameLine ENDP
  2383.   endif
  2384.   
  2385.   END
  2386. diff --context ..\tvo/Geninc.cpp ./GENINC.CPP
  2387. *** ../tvo/Geninc.cpp    Fri Jun 17 01:00:00 1994
  2388. --- ./GENINC.CPP    Tue Apr 25 22:08:46 1995
  2389. ***************
  2390. *** 43,48 ****
  2391. --- 43,51 ----
  2392.   
  2393.   #define gen( n, c, o ) generate( #n, offsetof( c, o ) )
  2394.   
  2395. + #undef  offsetof
  2396. + #define offsetof(typ,id) (size_t)&(((typ*)0)->id)
  2397.   void generate( const char *name, size_t offset )
  2398.   {
  2399.     cout << setw( 19 ) << setiosflags( ios::left )
  2400. Only in .: HARDDOS.CPP
  2401. Only in .: HARDNT.CPP
  2402. Only in .: HARDOS2.CPP
  2403. diff --context ..\tvo/Hardware.h ./HARDWARE.H
  2404. *** ../tvo/Hardware.h    Fri Jun 17 01:00:00 1994
  2405. --- ./HARDWARE.H    Tue Apr 25 22:08:56 1995
  2406. ***************
  2407. *** 22,32 ****
  2408.   #define __THardwareInfo
  2409.   
  2410.   #if defined( __FLAT__ )
  2411. ! #if !defined( __WINDOWS_H )
  2412. ! #include <windows.h>
  2413. ! #endif
  2414.   #else
  2415.   
  2416.   #if !defined( MAKELONG )
  2417. --- 22,36 ----
  2418.   #define __THardwareInfo
  2419.   
  2420.   #if defined( __FLAT__ )
  2421. ! # if defined(__OS2__)
  2422. ! #   include <tvision/tvosdef.h>
  2423. ! # elif defined(__NT__)
  2424. ! #  if !defined( __WINDOWS_H )
  2425. ! #   include <windows.h>
  2426. ! #  endif
  2427. ! # else
  2428. ! #  error    "Non-supported OS"
  2429. ! # endif
  2430.   #else
  2431.   
  2432.   #if !defined( MAKELONG )
  2433. ***************
  2434. *** 41,134 ****
  2435.   
  2436.   class THardwareInfo
  2437.   {
  2438.   public:
  2439.       THardwareInfo();
  2440. !     static ulong getTickCount();
  2441. ! #if defined( __FLAT__ )
  2442. !     enum ConsoleType { cnInput = 0, cnOutput = 1 };
  2443.       enum PlatformType { plDPMI32 = 1, plWinNT = 2, plOS2 = 4 };
  2444.   
  2445.       static PlatformType getPlatform();
  2446.   
  2447. ! // Caret functions.
  2448. !     static void setCaretSize( ushort size );
  2449. !     static ushort getCaretSize();
  2450. !     static void setCaretPosition( ushort x, ushort y );
  2451. !     static BOOL isCaretVisible();
  2452.   
  2453. ! // Screen functions.
  2454.   
  2455. -     static ushort getScreenRows();
  2456. -     static ushort getScreenCols();
  2457. -     static ushort getScreenMode();
  2458. -     static void setScreenMode( ushort mode );
  2459. -     static void clearScreen( ushort w, ushort h );
  2460. -     static void screenWrite( ushort x, ushort y, ushort *buf, DWORD len );
  2461. -     static ushort *allocateScreenBuffer();
  2462. -     static void freeScreenBuffer( ushort *buffer );
  2463.   
  2464. ! // Mouse functions.
  2465.   
  2466. !     static DWORD getButtonCount();
  2467. !     static void cursorOn();
  2468. !     static void cursorOff();
  2469.   
  2470. ! // Event functions.
  2471.   
  2472. !     static BOOL getMouseEvent( MouseEventType& event );
  2473. !     static BOOL getKeyEvent( TEvent& event );
  2474. !     static void clearPendingEvent();
  2475.   
  2476.   // System functions.
  2477. !     static BOOL setCtrlBrkHandler( BOOL install );
  2478. !     static BOOL setCritErrorHandler( BOOL install );
  2479.   
  2480.   private:
  2481.   
  2482. !     static BOOL __stdcall ctrlBreakHandler( DWORD dwCtrlType );
  2483. !     static BOOL insertState;
  2484. !     static PlatformType platform;
  2485. !     static HANDLE consoleHandle[2];
  2486. !     static DWORD consoleMode;
  2487. !     static DWORD pendingEvent;
  2488. !     static INPUT_RECORD irBuffer;
  2489.       static CONSOLE_CURSOR_INFO crInfo;
  2490.       static CONSOLE_SCREEN_BUFFER_INFO sbInfo;
  2491.   
  2492.   #else
  2493.   
  2494. !     static ushort *getColorAddr( ushort offset = 0 );
  2495. !     static ushort *getMonoAddr( ushort offset = 0 );
  2496. !     static uchar getShiftState();
  2497. !     static uchar getBiosScreenRows();
  2498. !     static uchar getBiosVideoInfo();
  2499. !     static void setBiosVideoInfo( uchar info );
  2500. !     static ushort getBiosEquipmentFlag();
  2501. !     static ushort huge getBiosEquipmentFlag(int);   // Non-inline version.
  2502. !     static void setBiosEquipmentFlag( ushort flag );
  2503. !     static Boolean getDPMIFlag();
  2504.   
  2505.   private:
  2506.   
  2507. !     static ushort huge getBiosSelector();   // For SYSINT.ASM.
  2508. !     static Boolean dpmiFlag;
  2509. !     static ushort colorSel;
  2510. !     static ushort monoSel;
  2511. !     static ushort biosSel;
  2512.   
  2513.   #endif
  2514.   };
  2515.   
  2516.   #if defined( __FLAT__ )
  2517.   
  2518.   inline THardwareInfo::PlatformType THardwareInfo::getPlatform()
  2519. --- 45,167 ----
  2520.   
  2521.   class THardwareInfo
  2522.   {
  2523.   public:
  2524.       THardwareInfo();
  2525. !     static ulong        getTickCount();
  2526.       enum PlatformType { plDPMI32 = 1, plWinNT = 2, plOS2 = 4 };
  2527.   
  2528. +     /*
  2529. +      *  Shared stuff for OS/2 and NT...
  2530. +      */
  2531. + #if defined(__FLAT__)
  2532.       static PlatformType getPlatform();
  2533.   
  2534. !     //** Caret (hardware cursor) functions.
  2535. !     static void         setCaretSize( ushort size );
  2536. !     static ushort       getCaretSize();
  2537. !     static void         setCaretPosition( ushort x, ushort y );
  2538. !     static BOOL         isCaretVisible();
  2539. !     //** Screen functions..
  2540. !     static ushort       getScreenRows();
  2541. !     static ushort       getScreenCols();
  2542. !     static ushort       getScreenMode();
  2543. !     static void         setScreenMode( ushort mode );
  2544. !     static void         clearScreen( ushort w, ushort h );
  2545. !     static void         screenWrite( ushort x, ushort y, ushort *buf, unsigned len );
  2546. !     //** Mouse stuff,
  2547. !     static ulong        getButtonCount();
  2548. !     static void         cursorOn();
  2549. !     static void         cursorOff();
  2550. !     //** Event stuff,
  2551. !     static Boolean      getMouseEvent( MouseEventType& event ); // Silly.
  2552. !     static Boolean      getKeyEvent( TEvent& event );
  2553. !     static void         clearPendingEvent();
  2554.   
  2555. ! private:
  2556. !     static Boolean          insertState;
  2557. !     static PlatformType     platform;
  2558.   
  2559.   
  2560. !     /*
  2561. !      *  NT only stuff..
  2562. !      */
  2563. ! # if defined(__NT__)
  2564.   
  2565. ! public:
  2566. !     enum ConsoleType { cnInput = 0, cnOutput = 1 };
  2567.   
  2568. ! // Caret functions.
  2569.   
  2570. ! // Screen functions.
  2571. !     static ushort   *allocateScreenBuffer();
  2572. !     static void     freeScreenBuffer( ushort *buffer );
  2573.   
  2574.   // System functions.
  2575. !     static BOOL     setCtrlBrkHandler( BOOL install );
  2576. !     static BOOL     setCritErrorHandler( BOOL install );
  2577.   
  2578.   private:
  2579. +     static BOOL __stdcall ctrlBreakHandler( ulong dwCtrlType );
  2580.   
  2581. !     static HANDLE           consoleHandle[2];
  2582. !     static DWORD            consoleMode;
  2583. !     static DWORD            pendingEvent;
  2584. !     static INPUT_RECORD     irBuffer;
  2585.       static CONSOLE_CURSOR_INFO crInfo;
  2586.       static CONSOLE_SCREEN_BUFFER_INFO sbInfo;
  2587.   
  2588. +     /*
  2589. +      *  OS/2 only stuff...
  2590. +      */
  2591. + # elif defined(__OS2__)
  2592. + # else
  2593. + #   error   "Non-supported OS"
  2594. + # endif
  2595. +     /*
  2596. +      *  MS/DOS and DOS EXTENDER interface (Stupid, stupid).
  2597. +      */
  2598.   #else
  2599.   
  2600. !     static ushort       *getColorAddr( ushort offset = 0 );
  2601. !     static ushort       *getMonoAddr( ushort offset = 0 );
  2602. !     static uchar        getShiftState();
  2603. !     static uchar        getBiosScreenRows();
  2604. !     static uchar        getBiosVideoInfo();
  2605. !     static void         setBiosVideoInfo( uchar info );
  2606. !     static ushort       getBiosEquipmentFlag();
  2607. !     static ushort huge  getBiosEquipmentFlag(int);   // Non-inline version.
  2608. !     static void         setBiosEquipmentFlag( ushort flag );
  2609. !     static Boolean      getDPMIFlag();
  2610.   
  2611.   private:
  2612. +     static ushort huge  getBiosSelector();   // For SYSINT.ASM.
  2613.   
  2614. !     static Boolean      dpmiFlag;
  2615. !     static ushort       colorSel;
  2616. !     static ushort       monoSel;
  2617. !     static ushort       biosSel;
  2618.   
  2619.   #endif
  2620.   };
  2621.   
  2622. + /****************************************************************************/
  2623. + /*                                                                          */
  2624. + /*  CODING: Inline functions...                                             */
  2625. + /*                                                                          */
  2626. + /****************************************************************************/
  2627. + /*
  2628. +  *  Inlines: shared for all __FLAT__s..
  2629. +  */
  2630.   #if defined( __FLAT__ )
  2631.   
  2632.   inline THardwareInfo::PlatformType THardwareInfo::getPlatform()
  2633. ***************
  2634. *** 136,141 ****
  2635. --- 169,198 ----
  2636.       return platform;
  2637.   }
  2638.   
  2639. + # if defined(__NT__)
  2640.   // Caret functions.
  2641.   
  2642.   inline ushort THardwareInfo::getCaretSize()
  2643. ***************
  2644. *** 230,235 ****
  2645. --- 287,308 ----
  2646.   {
  2647.       return TRUE;        // Handled by NT or DPMI32..
  2648.   }
  2649. + /*
  2650. +  *  Inlines: OS/2 only functions..
  2651. +  */
  2652. + # elif defined(__OS2__)
  2653. + inline void THardwareInfo::clearPendingEvent()
  2654. + {
  2655. + }
  2656. + # else
  2657. + #   error   "Bad OS"
  2658. + # endif
  2659.   
  2660.   
  2661.   #else
  2662. diff --context ..\tvo/Hardwrvr.cpp ./HARDWRVR.CPP
  2663. *** ../tvo/Hardwrvr.cpp    Fri Jun 17 01:00:00 1994
  2664. --- ./HARDWRVR.CPP    Tue Apr 25 22:08:46 1995
  2665. ***************
  2666. *** 20,293 ****
  2667.   #define Uses_TSystemError
  2668.   #include <tvision\tv.h>
  2669.   
  2670. - #if defined( __FLAT__ )
  2671.   
  2672. - BOOL THardwareInfo::insertState = True;
  2673. - THardwareInfo::PlatformType THardwareInfo::platform = THardwareInfo::plDPMI32;
  2674. - HANDLE THardwareInfo::consoleHandle[2];
  2675. - DWORD THardwareInfo::consoleMode;
  2676. - DWORD THardwareInfo::pendingEvent;
  2677. - INPUT_RECORD THardwareInfo::irBuffer;
  2678. - CONSOLE_CURSOR_INFO THardwareInfo::crInfo;
  2679. - CONSOLE_SCREEN_BUFFER_INFO THardwareInfo::sbInfo;
  2680.   
  2681. - static ushort ShiftCvt[89] = {
  2682. -          0,      0,      0,      0,      0,      0,      0,      0,
  2683. -          0,      0,      0,      0,      0,      0,      0,      0,
  2684. -          0,      0,      0,      0,      0,      0,      0,      0,
  2685. -          0,      0,      0,      0,      0,      0,      0,      0,
  2686. -          0,      0,      0,      0,      0,      0,      0,      0,
  2687. -          0,      0,      0,      0,      0,      0,      0,      0,
  2688. -          0,      0,      0,      0,      0,      0,      0,      0,
  2689. -          0,      0,      0, 0x5400, 0x5500, 0x5600, 0x5700, 0x5800,
  2690. -     0x5900, 0x5A00, 0x5B00, 0x5C00, 0x5D00,      0,      0,      0,
  2691. -          0,      0,      0,      0,      0,      0,      0,      0,
  2692. -          0,      0, 0x0500, 0x0700,      0,      0,      0, 0x8700,
  2693. -     0x8800
  2694. - };
  2695. - static ushort CtrlCvt[89] = {
  2696. -          0,      0,      0,      0,      0,      0,      0,      0,
  2697. -          0,      0,      0,      0,      0,      0,      0,      0,
  2698. -     0x0011, 0x0017, 0x0005, 0x0012, 0x0014, 0x0019, 0x0015, 0x0009,
  2699. -     0x000F, 0x0010,      0,      0,      0,      0, 0x0001, 0x0013,
  2700. -     0x0004, 0x0006, 0x0007, 0x0008, 0x000A, 0x000B, 0x000C,      0,
  2701. -          0,      0,      0,      0, 0x001A, 0x0018, 0x0003, 0x0016,
  2702. -     0x0002, 0x000E, 0x000D,      0,      0,      0,      0,      0,
  2703. -          0,      0,      0, 0x5E00, 0x5F00, 0x6000, 0x6100, 0x6200,
  2704. -     0x6300, 0x6400, 0x6500, 0x6600, 0x6700,      0,      0, 0x7700,
  2705. -          0, 0x8400,      0, 0x7300,      0, 0x7400,      0, 0x7500,
  2706. -          0, 0x7600, 0x0400, 0x0600,      0,      0,      0, 0x8900,
  2707. -     0x8A00
  2708. - };
  2709. - static ushort AltCvt[89] = {
  2710. -          0,      0, 0x7800, 0x7900, 0x7A00, 0x7B00, 0x7C00, 0x7D00,
  2711. -     0x7E00, 0x7F00, 0x8000, 0x8100, 0x8200, 0x8300, 0x0800,      0,
  2712. -     0x1000, 0x1100, 0x1200, 0x1300, 0x1400, 0x1500, 0x1600, 0x1700,
  2713. -     0x1800, 0x1900,      0,      0,      0,      0, 0x1E00, 0x1F00,
  2714. -     0x2000, 0x2100, 0x2200, 0x2300, 0x2400, 0x2500, 0x2600,      0,
  2715. -          0,      0,      0,      0, 0x2C00, 0x2D00, 0x2E00, 0x2F00,
  2716. -     0x3000, 0x3100, 0x3200,      0,      0,      0,      0,      0,
  2717. -          0, 0x0200,      0, 0x6800, 0x6900, 0x6A00, 0x6B00, 0x6C00,
  2718. -     0x6D00, 0x6E00, 0x6F00, 0x7000, 0x7100,      0,      0,      0,
  2719. -          0,      0,      0,      0,      0,      0,      0,      0,
  2720. -          0,      0,      0,      0,      0,      0,      0, 0x8B00,
  2721. -     0x8C00
  2722. - };
  2723. - #else
  2724. - Boolean THardwareInfo::dpmiFlag;
  2725. - ushort THardwareInfo::colorSel;
  2726. - ushort THardwareInfo::monoSel;
  2727. - ushort THardwareInfo::biosSel;
  2728. - #endif
  2729. - #if defined( __FLAT__ )
  2730. - #define INT10   { __emit__( 0xCD ); __emit__( 0x10 ); }
  2731. - // Constructor for 16-bit version is in HARDWARE.ASM
  2732. - THardwareInfo::THardwareInfo()
  2733. - {
  2734. -     HMODULE mod;
  2735. -     if( (mod = GetModuleHandle( "KERNEL32" )) != 0 &&
  2736. -          GetProcAddress( mod, "Borland32" ) != 0
  2737. -       )
  2738. -         platform = plDPMI32;
  2739. -     else
  2740. -         platform = plWinNT;
  2741. -     consoleHandle[cnInput] = GetStdHandle( STD_INPUT_HANDLE );
  2742. -     consoleHandle[cnOutput] = GetStdHandle( STD_OUTPUT_HANDLE );
  2743. -     GetConsoleMode( consoleHandle[cnInput], &consoleMode );
  2744. -     GetConsoleCursorInfo( consoleHandle[cnOutput], &crInfo );
  2745. -     GetConsoleScreenBufferInfo( consoleHandle[cnOutput], &sbInfo );
  2746. - }
  2747. - ushort THardwareInfo::getScreenMode()
  2748. - {
  2749. -     ushort mode;
  2750. -     if( platform != plDPMI32 )      // B/W, mono not supported if running on
  2751. -         mode = TDisplay::smCO80;    //   NT.  Would have to use the registry.
  2752. -     else
  2753. -         {
  2754. -         _AH = 0x0F;
  2755. -         INT10;                      // Emit CD, 10.  Supported by DPMI server.
  2756. -         mode = _AL;
  2757. -         }
  2758. -     if( getScreenRows() > 25 )
  2759. -         mode |= TDisplay::smFont8x8;
  2760. -     return mode;
  2761. - }
  2762. - void THardwareInfo::setScreenMode( ushort mode )
  2763. - {
  2764. -     COORD newSize = { 80, 25 };
  2765. -     SMALL_RECT rect = { 0, 0, 79, 24 };
  2766. -     if( mode & TDisplay::smFont8x8 )
  2767. -         {
  2768. -         newSize.Y = 50;
  2769. -         rect.Bottom = 49;
  2770. -         }
  2771. -     if( platform != plDPMI32 )
  2772. -         {
  2773. -         COORD maxSize = GetLargestConsoleWindowSize( consoleHandle[cnOutput] );
  2774. -         if( newSize.Y > maxSize.Y )
  2775. -             {
  2776. -             newSize.Y = maxSize.Y;
  2777. -             rect.Bottom = newSize.Y-1;
  2778. -             }
  2779. -         }
  2780. -     if( mode & TDisplay::smFont8x8 )
  2781. -         {
  2782. -         SetConsoleScreenBufferSize( consoleHandle[cnOutput], newSize );
  2783. -         SetConsoleWindowInfo( consoleHandle[cnOutput], True, &rect );
  2784. -         }
  2785. -     else
  2786. -         {
  2787. -         SetConsoleWindowInfo( consoleHandle[cnOutput], True, &rect );
  2788. -         SetConsoleScreenBufferSize( consoleHandle[cnOutput], newSize );
  2789. -         }
  2790. -     GetConsoleScreenBufferInfo( consoleHandle[cnOutput], &sbInfo );
  2791. - }
  2792. - void THardwareInfo::setCaretPosition( ushort x, ushort y )
  2793. - {
  2794. -     COORD coord = { x, y };
  2795. -     SetConsoleCursorPosition( consoleHandle[cnOutput], coord );
  2796. - }
  2797. - void THardwareInfo::setCaretSize( ushort size )
  2798. - {
  2799. -     if( size == 0 )
  2800. -     {
  2801. -         crInfo.bVisible = False;
  2802. -         crInfo.dwSize = 1;
  2803. -     }
  2804. -     else
  2805. -     {
  2806. -         crInfo.bVisible = True;
  2807. -         crInfo.dwSize = size;
  2808. -     }
  2809. -     SetConsoleCursorInfo( consoleHandle[cnOutput], &crInfo );
  2810. - }
  2811. - void THardwareInfo::screenWrite( ushort x, ushort y, ushort *buf, DWORD len )
  2812. - {
  2813. -     COORD size = {len,1};
  2814. -     COORD from = {0,0};
  2815. -     SMALL_RECT to = {x,y,x+len,y+1};
  2816. -     WriteConsoleOutput( consoleHandle[cnOutput], (CHAR_INFO *) buf, size, from, &to);
  2817. - }
  2818. - // Event functions.
  2819. - BOOL THardwareInfo::getMouseEvent( MouseEventType& event )
  2820. - {
  2821. -     if( !pendingEvent )
  2822. -         {
  2823. -         GetNumberOfConsoleInputEvents( consoleHandle[cnInput], &pendingEvent );
  2824. -         if( pendingEvent )
  2825. -             ReadConsoleInput( consoleHandle[cnInput], &irBuffer, 1, &pendingEvent );
  2826. -         }
  2827. -     if( pendingEvent && irBuffer.EventType == MOUSE_EVENT)
  2828. -         {
  2829. -         event.where.x = irBuffer.Event.MouseEvent.dwMousePosition.X;
  2830. -         event.where.y = irBuffer.Event.MouseEvent.dwMousePosition.Y;
  2831. -         event.buttons = irBuffer.Event.MouseEvent.dwButtonState;
  2832. -         event.eventFlags = irBuffer.Event.MouseEvent.dwEventFlags;
  2833. -         event.controlKeyState = irBuffer.Event.MouseEvent.dwControlKeyState;
  2834. -         pendingEvent = 0;
  2835. -         return True;
  2836. -         }
  2837. -     return False;
  2838. - }
  2839. - BOOL THardwareInfo::getKeyEvent( TEvent& event )
  2840. - {
  2841. -     if( !pendingEvent )
  2842. -         {
  2843. -         GetNumberOfConsoleInputEvents( consoleHandle[cnInput], &pendingEvent );
  2844. -         if( pendingEvent )
  2845. -             ReadConsoleInput( consoleHandle[cnInput], &irBuffer, 1, &pendingEvent );
  2846. -         }
  2847. -     if( pendingEvent )
  2848. -         {
  2849. -         if( irBuffer.EventType == KEY_EVENT && irBuffer.Event.KeyEvent.bKeyDown )
  2850. -             {
  2851. -             event.what = evKeyDown;
  2852. -             event.keyDown.charScan.scanCode = irBuffer.Event.KeyEvent.wVirtualScanCode;
  2853. -             event.keyDown.charScan.charCode = irBuffer.Event.KeyEvent.uChar.AsciiChar;
  2854. -             event.keyDown.controlKeyState = irBuffer.Event.KeyEvent.dwControlKeyState;
  2855. -             /* Convert NT style virtual scan codes to PC BIOS codes.
  2856. -              */
  2857. -             if( (event.keyDown.controlKeyState & (kbShift | kbAltShift | kbCtrlShift)) != 0 )
  2858. -                 {
  2859. -                 uchar index = irBuffer.Event.KeyEvent.wVirtualScanCode;
  2860. -                 if ((event.keyDown.controlKeyState & kbShift) && ShiftCvt[index] != 0)
  2861. -                     event.keyDown.keyCode = ShiftCvt[index];
  2862. -                 else if ((event.keyDown.controlKeyState & kbCtrlShift) && CtrlCvt[index] != 0)
  2863. -                     event.keyDown.keyCode = CtrlCvt[index];
  2864. -                 else if ((event.keyDown.controlKeyState & kbAltShift) && AltCvt[index] != 0)
  2865. -                     event.keyDown.keyCode = AltCvt[index];
  2866. -                 }
  2867. -             /* Set/Reset insert flag.
  2868. -              */
  2869. -             if( event.keyDown.keyCode == kbIns )
  2870. -                 insertState = !insertState;
  2871. -             if( insertState )
  2872. -                 event.keyDown.controlKeyState |= kbInsState;
  2873. -             pendingEvent = 0;
  2874. -             return True;
  2875. -             }
  2876. -         // Ignore all events except mouse events.  Pending mouse events will
  2877. -         // be read on the next polling loop.
  2878. -         else if( irBuffer.EventType != MOUSE_EVENT )
  2879. -             pendingEvent = 0;
  2880. -         }
  2881. -     return False;
  2882. - }
  2883. - BOOL __stdcall THardwareInfo::ctrlBreakHandler( DWORD dwCtrlType )
  2884. - {
  2885. -     if( dwCtrlType == CTRL_C_EVENT || dwCtrlType == CTRL_BREAK_EVENT )
  2886. -         {
  2887. -         TSystemError::ctrlBreakHit = True;
  2888. -         return TRUE;
  2889. -         }
  2890. -     else
  2891. -         return FALSE; // Don't handle 'CLOSE', 'LOGOFF' or 'SHUTDOWN' events.
  2892. - }
  2893. - ulong THardwareInfo::getTickCount()
  2894. - {
  2895. -     // To change units from ms to clock ticks.
  2896. -     //   X ms * 1s/1000ms * 18.2ticks/s = X/55 ticks, roughly.
  2897. -     return GetTickCount() / 55;
  2898. - }
  2899. - #endif  // __FLAT__
  2900. --- 20,24 ----
  2901. diff --context ..\tvo/Helpbase.cpp ./HELPBASE.CPP
  2902. *** ../tvo/Helpbase.cpp    Fri Jun 17 01:00:00 1994
  2903. --- ./HELPBASE.CPP    Tue Apr 25 22:08:46 1995
  2904. ***************
  2905. *** 159,165 ****
  2906.       if (crossRefs != 0)
  2907.          {
  2908.          crossRefPtr = (TCrossRef *)crossRefs;
  2909. !        delete [numRefs] crossRefPtr;
  2910.          }
  2911.   }
  2912.   
  2913. --- 159,165 ----
  2914.       if (crossRefs != 0)
  2915.          {
  2916.          crossRefPtr = (TCrossRef *)crossRefs;
  2917. !        delete [] crossRefPtr;
  2918.          }
  2919.   }
  2920.   
  2921. ***************
  2922. *** 173,179 ****
  2923.           {
  2924.           crossRefPtr = crossRefs;
  2925.           memmove(p, crossRefPtr, numRefs * sizeof(TCrossRef));
  2926. !         delete [numRefs] crossRefPtr;
  2927.           }
  2928.       crossRefs = p;
  2929.       crossRefPtr = crossRefs + numRefs;
  2930. --- 173,179 ----
  2931.           {
  2932.           crossRefPtr = crossRefs;
  2933.           memmove(p, crossRefPtr, numRefs * sizeof(TCrossRef));
  2934. !         delete [] crossRefPtr;
  2935.           }
  2936.       crossRefs = p;
  2937.       crossRefPtr = crossRefs + numRefs;
  2938. ***************
  2939. *** 333,339 ****
  2940.           else
  2941.               memmove(p, crossRefPtr, i * sizeof(TCrossRef));
  2942.   
  2943. !         delete [numRefs] crossRefPtr;
  2944.           }
  2945.       crossRefs = p;
  2946.       numRefs = i;
  2947. --- 333,339 ----
  2948.           else
  2949.               memmove(p, crossRefPtr, i * sizeof(TCrossRef));
  2950.   
  2951. !         delete [] crossRefPtr;
  2952.           }
  2953.       crossRefs = p;
  2954.       numRefs = i;
  2955. ***************
  2956. *** 511,517 ****
  2957.   
  2958.   THelpIndex::~THelpIndex()
  2959.   {
  2960. !     delete [size] index;
  2961.   }
  2962.   
  2963.   
  2964. --- 511,517 ----
  2965.   
  2966.   THelpIndex::~THelpIndex()
  2967.   {
  2968. !     delete [] index;
  2969.   }
  2970.   
  2971.   
  2972. ***************
  2973. *** 552,558 ****
  2974.               }
  2975.           if (size > 0)
  2976.               {
  2977. !             delete [size] index;
  2978.               }
  2979.           index = p;
  2980.           size = newSize;
  2981. --- 552,558 ----
  2982.               }
  2983.           if (size > 0)
  2984.               {
  2985. !             delete [] index;
  2986.               }
  2987.           index = p;
  2988.           size = newSize;
  2989. diff --context ..\tvo/Histlist.cpp ./HISTLIST.CPP
  2990. *** ../tvo/Histlist.cpp    Fri Jun 17 01:00:00 1994
  2991. --- ./HISTLIST.CPP    Tue Apr 25 22:08:46 1995
  2992. ***************
  2993. *** 109,119 ****
  2994.   
  2995.   void deleteString()
  2996.   {
  2997. !     size_t len = curRec->len;
  2998.   #if !defined(__FLAT__)
  2999. !     movmem( next( curRec ), curRec, size_t( (char *)lastRec - (char *)curRec ) );
  3000.   #else
  3001. !     memcpy(curRec, next(curRec),    size_t( (char *)lastRec - (char *)curRec ) );
  3002.   #endif
  3003.       lastRec = backup( lastRec, len );
  3004.   }
  3005. --- 109,119 ----
  3006.   
  3007.   void deleteString()
  3008.   {
  3009. !     size_t len = curRec->len;
  3010.   #if !defined(__FLAT__)
  3011. !     movmem( next( curRec ), curRec, size_t( (char *)lastRec - (char *)curRec ) );
  3012.   #else
  3013. !     memcpy(curRec, next(curRec),    size_t( (char *)lastRec - (char *)curRec ) );
  3014.   #endif
  3015.       lastRec = backup( lastRec, len );
  3016.   }
  3017. ***************
  3018. *** 127,135 ****
  3019.           HistRec *dst = historyBlock;
  3020.           HistRec *src = next( historyBlock );
  3021.   #if !defined(__FLAT__)
  3022. !         movmem( src, dst,  size_t( (char *)lastRec - (char *)src ) );
  3023.   #else
  3024. !         memcpy( dst, src,  size_t( (char *)lastRec - (char *)src ) );
  3025.   #endif
  3026.           lastRec = backup( lastRec, firstLen );
  3027.           }
  3028. --- 127,135 ----
  3029.           HistRec *dst = historyBlock;
  3030.           HistRec *src = next( historyBlock );
  3031.   #if !defined(__FLAT__)
  3032. !         movmem( src, dst,  size_t( (char *)lastRec - (char *)src ) );
  3033.   #else
  3034. !         memcpy( dst, src,  size_t( (char *)lastRec - (char *)src ) );
  3035.   #endif
  3036.           lastRec = backup( lastRec, firstLen );
  3037.           }
  3038. Only in ..\tvo: Makefile
  3039. diff --context ..\tvo/Menus.h ./MENUS.H
  3040. *** ../tvo/Menus.h    Fri Jun 17 01:00:00 1994
  3041. --- ./MENUS.H    Tue Apr 25 22:08:56 1995
  3042. ***************
  3043. *** 1,16 ****
  3044.   /* ------------------------------------------------------------------------*/
  3045. ! /*                                                                         */
  3046. ! /*   MENUS.H                                                               */
  3047. ! /*                                                                         */
  3048. ! /*   defines the classes TMenuItem, TMenu, TMenuView, TSubMenu,            */
  3049. ! /*   TMenuBar, TMenuBox, TStatusItem, TStatusDef, and TStatusLine          */
  3050. ! /*                                                                         */
  3051.   /* ------------------------------------------------------------------------*/
  3052.   /*
  3053. !  *      Turbo Vision - Version 2.0
  3054.    *
  3055. !  *      Copyright (c) 1994 by Borland International
  3056. !  *      All Rights Reserved.
  3057.    *
  3058.    */
  3059.   
  3060. --- 1,16 ----
  3061.   /* ------------------------------------------------------------------------*/
  3062. ! /*                                     */
  3063. ! /*   MENUS.H                                   */
  3064. ! /*                                     */
  3065. ! /*   defines the classes TMenuItem, TMenu, TMenuView, TSubMenu,        */
  3066. ! /*   TMenuBar, TMenuBox, TStatusItem, TStatusDef, and TStatusLine      */
  3067. ! /*                                     */
  3068.   /* ------------------------------------------------------------------------*/
  3069.   /*
  3070. !  *  Turbo Vision - Version 2.0
  3071.    *
  3072. !  *  Copyright (c) 1994 by Borland International
  3073. !  *  All Rights Reserved.
  3074.    *
  3075.    */
  3076.   
  3077. ***************
  3078. *** 40,57 ****
  3079.   public:
  3080.   
  3081.       TMenuItem( const char *aName,
  3082. !                ushort aCommand,
  3083. !                ushort aKeyCode,
  3084. !                ushort aHelpCtx = hcNoContext,
  3085. !                char *p = 0,
  3086. !                TMenuItem *aNext = 0
  3087. !              );
  3088.       TMenuItem( const char *aName,
  3089. !                ushort aKeyCode,
  3090. !                TMenu *aSubMenu,
  3091. !                ushort aHelpCtx = hcNoContext,
  3092. !                TMenuItem *aNext = 0
  3093. !              );
  3094.   
  3095.       ~TMenuItem();
  3096.   
  3097. --- 40,57 ----
  3098.   public:
  3099.   
  3100.       TMenuItem( const char *aName,
  3101. !            ushort aCommand,
  3102. !            ushort aKeyCode,
  3103. !            ushort aHelpCtx = hcNoContext,
  3104. !            char *p = 0,
  3105. !            TMenuItem *aNext = 0
  3106. !          );
  3107.       TMenuItem( const char *aName,
  3108. !            ushort aKeyCode,
  3109. !            TMenu *aSubMenu,
  3110. !            ushort aHelpCtx = hcNoContext,
  3111. !            TMenuItem *aNext = 0
  3112. !          );
  3113.   
  3114.       ~TMenuItem();
  3115.   
  3116. ***************
  3117. *** 64,73 ****
  3118.       ushort keyCode;
  3119.       ushort helpCtx;
  3120.       union
  3121. !         {
  3122. !         const char *param;
  3123. !         TMenu *subMenu;
  3124. !         };
  3125.   };
  3126.   
  3127.   inline void TMenuItem::append( TMenuItem *aNext )
  3128. --- 64,73 ----
  3129.       ushort keyCode;
  3130.       ushort helpCtx;
  3131.       union
  3132. !     {
  3133. !     const char *param;
  3134. !     TMenu *subMenu;
  3135. !     };
  3136.   };
  3137.   
  3138.   inline void TMenuItem::append( TMenuItem *aNext )
  3139. ***************
  3140. *** 106,114 ****
  3141.   
  3142.       TMenu() : items(0), deflt(0) {};
  3143.       TMenu( TMenuItem& itemList )
  3144. !         { items = &itemList; deflt = &itemList; }
  3145.       TMenu( TMenuItem& itemList, TMenuItem& TheDefault )
  3146. !         { items = &itemList; deflt = &TheDefault; }
  3147.       ~TMenu();
  3148.   
  3149.       TMenuItem *items;
  3150. --- 106,114 ----
  3151.   
  3152.       TMenu() : items(0), deflt(0) {};
  3153.       TMenu( TMenuItem& itemList )
  3154. !     { items = &itemList; deflt = &itemList; }
  3155.       TMenu( TMenuItem& itemList, TMenuItem& TheDefault )
  3156. !     { items = &itemList; deflt = &TheDefault; }
  3157.       ~TMenu();
  3158.   
  3159.       TMenuItem *items;
  3160. ***************
  3161. *** 119,133 ****
  3162.   #endif  // Uses_TMenu
  3163.   
  3164.   /* ---------------------------------------------------------------------- */
  3165. ! /*      class TMenuView                                                   */
  3166. ! /*                                                                        */
  3167. ! /*      Palette layout                                                    */
  3168. ! /*        1 = Normal text                                                 */
  3169. ! /*        2 = Disabled text                                               */
  3170. ! /*        3 = Shortcut text                                               */
  3171. ! /*        4 = Normal selection                                            */
  3172. ! /*        5 = Disabled selection                                          */
  3173. ! /*        6 = Shortcut selection                                          */
  3174.   /* ---------------------------------------------------------------------- */
  3175.   
  3176.   #if defined( Uses_TMenuView ) && !defined( __TMenuView )
  3177. --- 119,133 ----
  3178.   #endif  // Uses_TMenu
  3179.   
  3180.   /* ---------------------------------------------------------------------- */
  3181. ! /*  class TMenuView                           */
  3182. ! /*                                    */
  3183. ! /*  Palette layout                            */
  3184. ! /*    1 = Normal text                         */
  3185. ! /*    2 = Disabled text                       */
  3186. ! /*    3 = Shortcut text                       */
  3187. ! /*    4 = Normal selection                        */
  3188. ! /*    5 = Disabled selection                      */
  3189. ! /*    6 = Shortcut selection                      */
  3190.   /* ---------------------------------------------------------------------- */
  3191.   
  3192.   #if defined( Uses_TMenuView ) && !defined( __TMenuView )
  3193. ***************
  3194. *** 154,162 ****
  3195.       virtual void handleEvent( TEvent& event );
  3196.       TMenuItem *hotKey( ushort keyCode );
  3197.       TMenuView *newSubView( const TRect& bounds,
  3198. !                            TMenu *aMenu,
  3199. !                            TMenuView *aParentMenu
  3200. !                          );
  3201.   
  3202.   protected:
  3203.   
  3204. --- 154,162 ----
  3205.       virtual void handleEvent( TEvent& event );
  3206.       TMenuItem *hotKey( ushort keyCode );
  3207.       TMenuView *newSubView( const TRect& bounds,
  3208. !                TMenu *aMenu,
  3209. !                TMenuView *aParentMenu
  3210. !              );
  3211.   
  3212.   protected:
  3213.   
  3214. ***************
  3215. *** 180,186 ****
  3216.   private:
  3217.   
  3218.       virtual const char *streamableName() const
  3219. !         { return name; }
  3220.       static void writeMenu( opstream&, TMenu * );
  3221.       static TMenu *readMenu( ipstream& );
  3222.   
  3223. --- 180,186 ----
  3224.   private:
  3225.   
  3226.       virtual const char *streamableName() const
  3227. !     { return name; }
  3228.       static void writeMenu( opstream&, TMenu * );
  3229.       static TMenu *readMenu( ipstream& );
  3230.   
  3231. ***************
  3232. *** 208,216 ****
  3233.       { return os << (TStreamable *)cl; }
  3234.   
  3235.   inline TMenuView::TMenuView( const TRect& bounds,
  3236. !                              TMenu *aMenu,
  3237. !                              TMenuView *aParent
  3238. !                            ) :
  3239.       TView(bounds), current( 0 ), menu( aMenu ), parentMenu( aParent )
  3240.   {
  3241.        eventMask |= evBroadcast;
  3242. --- 208,216 ----
  3243.       { return os << (TStreamable *)cl; }
  3244.   
  3245.   inline TMenuView::TMenuView( const TRect& bounds,
  3246. !                  TMenu *aMenu,
  3247. !                  TMenuView *aParent
  3248. !                ) :
  3249.       TView(bounds), current( 0 ), menu( aMenu ), parentMenu( aParent )
  3250.   {
  3251.        eventMask |= evBroadcast;
  3252. ***************
  3253. *** 225,239 ****
  3254.   #endif  // Uses_TMenuView
  3255.   
  3256.   /* ---------------------------------------------------------------------- */
  3257. ! /*      class TMenuBar                                                    */
  3258. ! /*                                                                        */
  3259. ! /*      Palette layout                                                    */
  3260. ! /*        1 = Normal text                                                 */
  3261. ! /*        2 = Disabled text                                               */
  3262. ! /*        3 = Shortcut text                                               */
  3263. ! /*        4 = Normal selection                                            */
  3264. ! /*        5 = Disabled selection                                          */
  3265. ! /*        6 = Shortcut selection                                          */
  3266.   /* ---------------------------------------------------------------------- */
  3267.   
  3268.   #if defined( Uses_TMenuBar ) && !defined( __TMenuBar )
  3269. --- 225,239 ----
  3270.   #endif  // Uses_TMenuView
  3271.   
  3272.   /* ---------------------------------------------------------------------- */
  3273. ! /*  class TMenuBar                            */
  3274. ! /*                                    */
  3275. ! /*  Palette layout                            */
  3276. ! /*    1 = Normal text                         */
  3277. ! /*    2 = Disabled text                       */
  3278. ! /*    3 = Shortcut text                       */
  3279. ! /*    4 = Normal selection                        */
  3280. ! /*    5 = Disabled selection                      */
  3281. ! /*    6 = Shortcut selection                      */
  3282.   /* ---------------------------------------------------------------------- */
  3283.   
  3284.   #if defined( Uses_TMenuBar ) && !defined( __TMenuBar )
  3285. ***************
  3286. *** 257,263 ****
  3287.   private:
  3288.   
  3289.       virtual const char *streamableName() const
  3290. !         { return name; }
  3291.   
  3292.   protected:
  3293.   
  3294. --- 257,263 ----
  3295.   private:
  3296.   
  3297.       virtual const char *streamableName() const
  3298. !     { return name; }
  3299.   
  3300.   protected:
  3301.   
  3302. ***************
  3303. *** 283,297 ****
  3304.   #endif  // Uses_TMenuBar
  3305.   
  3306.   /* ---------------------------------------------------------------------- */
  3307. ! /*      class TMenuBox                                                    */
  3308. ! /*                                                                        */
  3309. ! /*      Palette layout                                                    */
  3310. ! /*        1 = Normal text                                                 */
  3311. ! /*        2 = Disabled text                                               */
  3312. ! /*        3 = Shortcut text                                               */
  3313. ! /*        4 = Normal selection                                            */
  3314. ! /*        5 = Disabled selection                                          */
  3315. ! /*        6 = Shortcut selection                                          */
  3316.   /* ---------------------------------------------------------------------- */
  3317.   
  3318.   #if defined( Uses_TMenuBox ) && !defined( __TMenuBox )
  3319. --- 283,297 ----
  3320.   #endif  // Uses_TMenuBar
  3321.   
  3322.   /* ---------------------------------------------------------------------- */
  3323. ! /*  class TMenuBox                            */
  3324. ! /*                                    */
  3325. ! /*  Palette layout                            */
  3326. ! /*    1 = Normal text                         */
  3327. ! /*    2 = Disabled text                       */
  3328. ! /*    3 = Shortcut text                       */
  3329. ! /*    4 = Normal selection                        */
  3330. ! /*    5 = Disabled selection                      */
  3331. ! /*    6 = Shortcut selection                      */
  3332.   /* ---------------------------------------------------------------------- */
  3333.   
  3334.   #if defined( Uses_TMenuBox ) && !defined( __TMenuBox )
  3335. ***************
  3336. *** 319,325 ****
  3337.   
  3338.       static const char * _NEAR frameChars;
  3339.       virtual const char *streamableName() const
  3340. !         { return name; }
  3341.   
  3342.   protected:
  3343.   
  3344. --- 319,325 ----
  3345.   
  3346.       static const char * _NEAR frameChars;
  3347.       virtual const char *streamableName() const
  3348. !     { return name; }
  3349.   
  3350.   protected:
  3351.   
  3352. ***************
  3353. *** 350,370 ****
  3354.   #define __TMenuPopup
  3355.   
  3356.   /* ---------------------------------------------------------------------- */
  3357. ! /*      class TMenuPopup                                                  */
  3358. ! /*                                                                        */
  3359. ! /*      Palette layout                                                    */
  3360. ! /*        1 = Normal text                                                 */
  3361. ! /*        2 = Disabled text                                               */
  3362. ! /*        3 = Shortcut text                                               */
  3363. ! /*        4 = Normal selection                                            */
  3364. ! /*        5 = Disabled selection                                          */
  3365. ! /*        6 = Shortcut selection                                          */
  3366.   /* ---------------------------------------------------------------------- */
  3367.   
  3368.   class TMenuPopup : TMenuBox
  3369.   {
  3370.       TMenuPopup(TRect&, TMenu*);
  3371.       virtual void handleEvent(TEvent&);
  3372.   };
  3373.   
  3374.   
  3375. --- 350,375 ----
  3376.   #define __TMenuPopup
  3377.   
  3378.   /* ---------------------------------------------------------------------- */
  3379. ! /*  class TMenuPopup                          */
  3380. ! /*                                    */
  3381. ! /*  Palette layout                            */
  3382. ! /*    1 = Normal text                         */
  3383. ! /*    2 = Disabled text                       */
  3384. ! /*    3 = Shortcut text                       */
  3385. ! /*    4 = Normal selection                        */
  3386. ! /*    5 = Disabled selection                      */
  3387. ! /*    6 = Shortcut selection                      */
  3388.   /* ---------------------------------------------------------------------- */
  3389.   
  3390.   class TMenuPopup : TMenuBox
  3391.   {
  3392.       TMenuPopup(TRect&, TMenu*);
  3393.       virtual void handleEvent(TEvent&);
  3394. +     //** JAL: Seems to be forgotten?
  3395. + public:
  3396. +     static const char * const _NEAR name;
  3397. +     static TStreamable *build();
  3398.   };
  3399.   
  3400.   
  3401. ***************
  3402. *** 382,391 ****
  3403.   public:
  3404.   
  3405.       TStatusItem( const char *aText,
  3406. !                  ushort key,
  3407. !                  ushort cmd,
  3408. !                  TStatusItem *aNext = 0
  3409. !                 );
  3410.       ~TStatusItem();
  3411.   
  3412.       TStatusItem *next;
  3413. --- 387,396 ----
  3414.   public:
  3415.   
  3416.       TStatusItem( const char *aText,
  3417. !          ushort key,
  3418. !          ushort cmd,
  3419. !          TStatusItem *aNext = 0
  3420. !         );
  3421.       ~TStatusItem();
  3422.   
  3423.       TStatusItem *next;
  3424. ***************
  3425. *** 396,405 ****
  3426.   };
  3427.   
  3428.   inline TStatusItem::TStatusItem( const char *aText,
  3429. !                                  ushort key,
  3430. !                                  ushort cmd,
  3431. !                                  TStatusItem *aNext
  3432. !                                 ) :
  3433.       text( newStr(aText) ), keyCode( key ), command( cmd ), next( aNext )
  3434.   {
  3435.   }
  3436. --- 401,410 ----
  3437.   };
  3438.   
  3439.   inline TStatusItem::TStatusItem( const char *aText,
  3440. !                  ushort key,
  3441. !                  ushort cmd,
  3442. !                  TStatusItem *aNext
  3443. !                 ) :
  3444.       text( newStr(aText) ), keyCode( key ), command( cmd ), next( aNext )
  3445.   {
  3446.   }
  3447. ***************
  3448. *** 420,429 ****
  3449.   public:
  3450.   
  3451.       TStatusDef( ushort aMin,
  3452. !                 ushort aMax,
  3453. !                 TStatusItem *someItems = 0,
  3454. !                 TStatusDef *aNext = 0
  3455. !               );
  3456.   
  3457.       TStatusDef *next;
  3458.       ushort min;
  3459. --- 425,434 ----
  3460.   public:
  3461.   
  3462.       TStatusDef( ushort aMin,
  3463. !         ushort aMax,
  3464. !         TStatusItem *someItems = 0,
  3465. !         TStatusDef *aNext = 0
  3466. !           );
  3467.   
  3468.       TStatusDef *next;
  3469.       ushort min;
  3470. ***************
  3471. *** 432,441 ****
  3472.   };
  3473.   
  3474.   inline TStatusDef::TStatusDef( ushort aMin,
  3475. !                                ushort aMax,
  3476. !                                TStatusItem *someItems,
  3477. !                                TStatusDef *aNext
  3478. !                              ) :
  3479.       min( aMin ), max( aMax ), items( someItems ), next( aNext )
  3480.   {
  3481.   }
  3482. --- 437,446 ----
  3483.   };
  3484.   
  3485.   inline TStatusDef::TStatusDef( ushort aMin,
  3486. !                    ushort aMax,
  3487. !                    TStatusItem *someItems,
  3488. !                    TStatusDef *aNext
  3489. !                  ) :
  3490.       min( aMin ), max( aMax ), items( someItems ), next( aNext )
  3491.   {
  3492.   }
  3493. ***************
  3494. *** 443,457 ****
  3495.   #endif  // Uses_TStatusDef
  3496.   
  3497.   /* ---------------------------------------------------------------------- */
  3498. ! /*      class TStatusLine                                                 */
  3499. ! /*                                                                        */
  3500. ! /*      Palette layout                                                    */
  3501. ! /*        1 = Normal text                                                 */
  3502. ! /*        2 = Disabled text                                               */
  3503. ! /*        3 = Shortcut text                                               */
  3504. ! /*        4 = Normal selection                                            */
  3505. ! /*        5 = Disabled selection                                          */
  3506. ! /*        6 = Shortcut selection                                          */
  3507.   /* ---------------------------------------------------------------------- */
  3508.   
  3509.   #if defined( Uses_TStatusLine ) && !defined( __TStatusLine )
  3510. --- 448,462 ----
  3511.   #endif  // Uses_TStatusDef
  3512.   
  3513.   /* ---------------------------------------------------------------------- */
  3514. ! /*  class TStatusLine                         */
  3515. ! /*                                    */
  3516. ! /*  Palette layout                            */
  3517. ! /*    1 = Normal text                         */
  3518. ! /*    2 = Disabled text                       */
  3519. ! /*    3 = Shortcut text                       */
  3520. ! /*    4 = Normal selection                        */
  3521. ! /*    5 = Disabled selection                      */
  3522. ! /*    6 = Shortcut selection                      */
  3523.   /* ---------------------------------------------------------------------- */
  3524.   
  3525.   #if defined( Uses_TStatusLine ) && !defined( __TStatusLine )
  3526. ***************
  3527. *** 490,496 ****
  3528.       static const char * _NEAR hintSeparator;
  3529.   
  3530.       virtual const char *streamableName() const
  3531. !         { return name; }
  3532.   
  3533.       static void writeItems( opstream&, TStatusItem * );
  3534.       static void writeDefs( opstream&, TStatusDef * );
  3535. --- 495,501 ----
  3536.       static const char * _NEAR hintSeparator;
  3537.   
  3538.       virtual const char *streamableName() const
  3539. !     { return name; }
  3540.   
  3541.       static void writeItems( opstream&, TStatusItem * );
  3542.       static void writeDefs( opstream&, TStatusDef * );
  3543. diff --context ..\tvo/Misc.cpp ./MISC.CPP
  3544. *** ../tvo/Misc.cpp    Fri Jun 17 01:00:00 1994
  3545. --- ./MISC.CPP    Tue Apr 25 22:08:46 1995
  3546. ***************
  3547. *** 34,41 ****
  3548. --- 34,53 ----
  3549.           return 0;
  3550.   }
  3551.   
  3552. + #if !defined(_NO_MEMMGR_)
  3553.   Boolean lowMemory()
  3554.   {
  3555.       return Boolean(TVMemMgr::safetyPoolExhausted());
  3556.   }
  3557. + #else
  3558. + Boolean lowMemory()
  3559. + {
  3560. +     return False;
  3561. + }
  3562. + #endif
  3563.   
  3564. diff --context ..\tvo/New.cpp ./NEW.CPP
  3565. *** ../tvo/New.cpp    Fri Jun 17 01:00:00 1994
  3566. --- ./NEW.CPP    Tue Apr 25 22:08:46 1995
  3567. ***************
  3568. *** 8,13 ****
  3569. --- 8,15 ----
  3570.    *      All Rights Reserved.
  3571.    *
  3572.    */
  3573. + #if !defined(_NO_MEMMGR_)
  3574.   
  3575.   #define NDEBUG
  3576.   #include <assert.h>
  3577. ***************
  3578. *** 16,25 ****
  3579.   #include <Mem.h>
  3580.   #endif  // __MEM_H
  3581.   
  3582. - #if !defined( __ALLOC_H )
  3583.   
  3584. ! #include <Alloc.h>
  3585. ! #endif  // __ALLOC_H
  3586.   
  3587.   #if !defined( __STDLIB_H )
  3588.   #include <StdLib.h>
  3589. --- 18,29 ----
  3590.   #include <Mem.h>
  3591.   #endif  // __MEM_H
  3592.   
  3593.   
  3594. ! #if !defined( __MALLOC_H )
  3595. ! #include <mAlloc.h>
  3596. ! #endif  // __MALLOC_H
  3597.   
  3598.   #if !defined( __STDLIB_H )
  3599.   #include <StdLib.h>
  3600. ***************
  3601. *** 199,201 ****
  3602. --- 203,207 ----
  3603.   {
  3604.      deleteBlock(blk);
  3605.   }
  3606. + #endif
  3607. Only in .: OS2ASM.H
  3608. Only in .: OS2STUFF.CPP
  3609. Only in .: OS2STUFF.H
  3610. diff --context ..\tvo/Sdesktop.cpp ./SDESKTOP.CPP
  3611. *** ../tvo/Sdesktop.cpp    Fri Jun 17 01:00:00 1994
  3612. --- ./SDESKTOP.CPP    Tue Apr 25 22:08:48 1995
  3613. ***************
  3614. *** 15,21 ****
  3615.   #define Uses_TDeskTop
  3616.   #define Uses_TStreamableClass
  3617.   #include <tvision\tv.h>
  3618. ! __link( RBackGround )
  3619.   
  3620.   TStreamableClass RDeskTop( TDeskTop::name,
  3621.                              TDeskTop::build,
  3622. --- 15,21 ----
  3623.   #define Uses_TDeskTop
  3624.   #define Uses_TStreamableClass
  3625.   #include <tvision\tv.h>
  3626. ! __link( RBackground )
  3627.   
  3628.   TStreamableClass RDeskTop( TDeskTop::name,
  3629.                              TDeskTop::build,
  3630. diff --context ..\tvo/Stddlg.cpp ./STDDLG.CPP
  3631. *** ../tvo/Stddlg.cpp    Fri Jun 17 01:00:00 1994
  3632. --- ./STDDLG.CPP    Tue Apr 25 22:08:50 1995
  3633. ***************
  3634. *** 32,40 ****
  3635.   #include <dos.h>
  3636.   #endif  // __DOS_H
  3637.   
  3638. ! #if !defined( __DIR_H )
  3639. ! #include <Dir.h>
  3640. ! #endif  // __DIR_H
  3641.   
  3642.   #if !defined( __ERRNO_H )
  3643.   #include <Errno.h>
  3644. --- 32,40 ----
  3645.   #include <dos.h>
  3646.   #endif  // __DOS_H
  3647.   
  3648. ! //#if !defined( __DIR_H )
  3649. ! //#include <Dir.h>
  3650. ! //#endif  // __DIR_H
  3651.   
  3652.   #if !defined( __ERRNO_H )
  3653.   #include <Errno.h>
  3654. ***************
  3655. *** 64,70 ****
  3656. --- 64,74 ----
  3657.   #include <Limits.h>
  3658.   #endif  // __LIMITS_H
  3659.   
  3660.   #if __STDC__
  3661. + // This is *S*T*U*P*I*D*!
  3662. + #if 0
  3663.   extern "C"
  3664.   {
  3665.   char _FAR * _CType _FARFUNC ltoa(long __value, char _FAR *__string, int );
  3666. ***************
  3667. *** 74,79 ****
  3668. --- 78,85 ----
  3669.   };
  3670.   #endif
  3671.   
  3672. + #endif
  3673.   void fexpand( char * );
  3674.   
  3675.   #define cpInfoPane "\x1E"
  3676. ***************
  3677. *** 122,131 ****
  3678.   
  3679.   void TSortedListBox::handleEvent(TEvent& event)
  3680.   {
  3681. !     char curString[256], newString[256];
  3682. !     void* k;
  3683. !     int value;
  3684. !     short oldPos, oldValue;
  3685.   
  3686.       oldValue = focused;
  3687.       TListBox::handleEvent( event );
  3688. --- 128,137 ----
  3689.   
  3690.   void TSortedListBox::handleEvent(TEvent& event)
  3691.   {
  3692. !     char    curString[256], newString[256];
  3693. !     void*   k;
  3694. !     int     value;
  3695. !     short   oldPos, oldValue;
  3696.   
  3697.       oldValue = focused;
  3698.       TListBox::handleEvent( event );
  3699. ***************
  3700. *** 170,176 ****
  3701.                   curString[searchPos+1] = EOS;
  3702.                   }
  3703.               k = getKey(curString);
  3704. !             list()->search( k, (ccIndex) value );
  3705.               if( value < range )
  3706.                   {
  3707.                   getText( newString, (short) value, 255 );
  3708. --- 176,186 ----
  3709.                   curString[searchPos+1] = EOS;
  3710.                   }
  3711.               k = getKey(curString);
  3712. !             ccIndex     cix;                //JAL: Can't pass reference to cast.
  3713. !             list()->search( k, cix);        //JAL: so use tv.
  3714. !             value   = cix;
  3715.               if( value < range )
  3716.                   {
  3717.                   getText( newString, (short) value, 255 );
  3718. ***************
  3719. *** 220,226 ****
  3720.       TDrawBuffer b;
  3721.       ushort  color;
  3722.       ftime *time;
  3723. !     char path[MAXPATH];
  3724.   
  3725.       strcpy( path, ((TFileDialog *)owner)->directory );
  3726.       strcat( path, ((TFileDialog *)owner)->wildCard );
  3727. --- 230,236 ----
  3728.       TDrawBuffer b;
  3729.       ushort  color;
  3730.       ftime *time;
  3731. !     char path[OS_MAXPATH];
  3732.   
  3733.       strcpy( path, ((TFileDialog *)owner)->directory );
  3734.       strcat( path, ((TFileDialog *)owner)->wildCard );
  3735. ***************
  3736. *** 315,320 ****
  3737. --- 325,335 ----
  3738.   TStreamable *TFileInfoPane::build()
  3739.   {
  3740.       return new TFileInfoPane( streamableInit );
  3741. + }
  3742. + TStreamable *TSortedListBox::build()
  3743. + {
  3744. +     return new TSortedListBox( streamableInit );
  3745.   }
  3746.   
  3747.   #endif
  3748. diff --context ..\tvo/Stddlg.h ./STDDLG.H
  3749. *** ../tvo/Stddlg.h    Fri Jun 17 01:00:00 1994
  3750. --- ./STDDLG.H    Tue Apr 25 22:08:56 1995
  3751. ***************
  3752. *** 47,62 ****
  3753.   #if defined( Uses_TSearchRec ) && !defined( __TSearchRec )
  3754.   #define __TSearchRec
  3755.   
  3756. ! #if !defined( __DIR_H )
  3757. ! #include <Dir.h>
  3758. ! #endif  // __DIR_H
  3759.   
  3760.   struct TSearchRec
  3761.   {
  3762.       uchar attr;
  3763.       long time;
  3764.       long size;
  3765. !     char name[MAXFILE+MAXEXT-1];
  3766.   };
  3767.   
  3768.   #endif  // Uses_TSearchRec
  3769. --- 47,62 ----
  3770.   #if defined( Uses_TSearchRec ) && !defined( __TSearchRec )
  3771.   #define __TSearchRec
  3772.   
  3773. ! //#if !defined( __DIR_H )
  3774. ! //#include <Dir.h>
  3775. ! //#endif  // __DIR_H
  3776.   
  3777.   struct TSearchRec
  3778.   {
  3779.       uchar attr;
  3780.       long time;
  3781.       long size;
  3782. !     char name[OS_MAXFILE+OS_MAXEXT-1];
  3783.   };
  3784.   
  3785.   #endif  // Uses_TSearchRec
  3786. ***************
  3787. *** 386,394 ****
  3788.                                      // WildCard by using SetData or store
  3789.                                      // the dialog on a stream.
  3790.   
  3791. ! #if !defined( __DIR_H )
  3792. ! #include <Dir.h>
  3793. ! #endif  // __DIR_H
  3794.   
  3795.   class _FAR TEvent;
  3796.   class _FAR TFileInputLine;
  3797. --- 386,394 ----
  3798.                                      // WildCard by using SetData or store
  3799.                                      // the dialog on a stream.
  3800.   
  3801. ! //#if !defined( __DIR_H )
  3802. ! //#include <Dir.h>
  3803. ! //#endif  // __DIR_H
  3804.   
  3805.   class _FAR TEvent;
  3806.   class _FAR TFileInputLine;
  3807. ***************
  3808. *** 412,418 ****
  3809.   
  3810.       TFileInputLine *fileName;
  3811.       TFileList *fileList;
  3812. !     char wildCard[MAXPATH];
  3813.       const char *directory;
  3814.   
  3815.   private:
  3816. --- 412,418 ----
  3817.   
  3818.       TFileInputLine *fileName;
  3819.       TFileList *fileList;
  3820. !     char wildCard[OS_MAXPATH];
  3821.       const char *directory;
  3822.   
  3823.   private:
  3824. ***************
  3825. *** 573,581 ****
  3826.   #if defined( Uses_TDirListBox ) && !defined( __TDirListBox )
  3827.   #define __TDirListBox
  3828.   
  3829. ! #if !defined( __DIR_H )
  3830. ! #include <Dir.h>
  3831. ! #endif  // __DIR_H
  3832.   
  3833.   class _FAR TRect;
  3834.   class _FAR TScrollBar;
  3835. --- 573,581 ----
  3836.   #if defined( Uses_TDirListBox ) && !defined( __TDirListBox )
  3837.   #define __TDirListBox
  3838.   
  3839. ! //#if !defined( __DIR_H )
  3840. ! //#include <Dir.h>
  3841. ! //#endif  // __DIR_H
  3842.   
  3843.   class _FAR TRect;
  3844.   class _FAR TScrollBar;
  3845. ***************
  3846. *** 604,610 ****
  3847.       void showDrives( TDirCollection * );
  3848.       void showDirs( TDirCollection * );
  3849.   
  3850. !     char dir[MAXPATH];
  3851.       ushort cur;
  3852.   
  3853.       static const char * _NEAR pathDir;
  3854. --- 604,610 ----
  3855.       void showDrives( TDirCollection * );
  3856.       void showDirs( TDirCollection * );
  3857.   
  3858. !     char dir[OS_MAXPATH];
  3859.       ushort cur;
  3860.   
  3861.       static const char * _NEAR pathDir;
  3862. diff --context ..\tvo/Syserr.cpp ./SYSERR.CPP
  3863. *** ../tvo/Syserr.cpp    Fri Jun 17 01:00:00 1994
  3864. --- ./SYSERR.CPP    Tue Apr 25 22:08:50 1995
  3865. ***************
  3866. *** 90,104 ****
  3867.   }
  3868.   
  3869.   #if defined( __FLAT__ )             // 16-bit version is in SYSINT.ASM
  3870. ! void TSystemError::resume()
  3871. ! {
  3872. !     THardwareInfo::setCtrlBrkHandler( TRUE );
  3873. ! }
  3874. ! void TSystemError::suspend()
  3875. ! {
  3876. !     THardwareInfo::setCtrlBrkHandler( FALSE );
  3877. ! }
  3878.   #endif
  3879.   
  3880.   #if !defined( __FLAT__ )
  3881. --- 90,117 ----
  3882.   }
  3883.   
  3884.   #if defined( __FLAT__ )             // 16-bit version is in SYSINT.ASM
  3885. ! # if defined(__NT__)
  3886. !     void TSystemError::resume()
  3887. !     {
  3888. !         THardwareInfo::setCtrlBrkHandler( TRUE );
  3889. !     }
  3890. !     void TSystemError::suspend()
  3891. !     {
  3892. !         THardwareInfo::setCtrlBrkHandler( FALSE );
  3893. !     }
  3894. ! # elif defined(__OS2__)
  3895. !     void TSystemError::resume()
  3896. !     {
  3897. ! //        THardwareInfo::setCtrlBrkHandler( TRUE );
  3898. !     }
  3899. !     void TSystemError::suspend()
  3900. !     {
  3901. ! //        THardwareInfo::setCtrlBrkHandler( FALSE );
  3902. !     }
  3903. ! # endif
  3904.   #endif
  3905.   
  3906.   #if !defined( __FLAT__ )
  3907. ***************
  3908. *** 174,178 ****
  3909. --- 187,236 ----
  3910.           TSystemError::inIDE = True;
  3911.       oldHandler();
  3912.   }
  3913. + #ifdef  __OS2__
  3914. + /****************************************************************************/
  3915. + /*                                                                          */
  3916. + /*  CODING: TSystemError functions for OS/2 (from sysint.asm)...            */
  3917. + /*                                                                          */
  3918. + /****************************************************************************/
  3919. + /*
  3920. +  *  swapStatusLine() swaps the last line on the screen with the contents of the
  3921. +  *  draw buffer passed.
  3922. +  */
  3923. + void TSystemError::swapStatusLine( TDrawBuffer far &b )
  3924. + {
  3925. +     ushort  tmp[maxViewWidth+2];
  3926. +     ushort  cb;
  3927. +     cb  = TScreen::screenWidth * 2;     // Size of line, in bytes,
  3928. + //    n   = cb;
  3929. +     VioReadCellStr((PSZ)tmp, &cb, TScreen::screenHeight-1, 0, 0);
  3930. +     VioWrtCellStr((PSZ)b.data, cb, TScreen::screenHeight-1, 0, 0);
  3931. +     memcpy(b.data, tmp, cb);            // Copy original contents to buffer,
  3932. + }
  3933. + /*
  3934. +  *  resume() initializes the exception handling system so that it accepts
  3935. +  *  traps (original CTRL-BRK and Critical Error).
  3936. +  */
  3937. + void TSystemError::resume()
  3938. + {
  3939. + }
  3940. + /*
  3941. +  *  suspend() reestablishes normal exception handling.
  3942. +  */
  3943. + void TSystemError::suspend()
  3944. + {
  3945. + }
  3946. + #endif
  3947.   
  3948.   #endif
  3949. diff --context ..\tvo/System.h ./SYSTEM.H
  3950. *** ../tvo/System.h    Fri Jun 17 01:00:00 1994
  3951. --- ./SYSTEM.H    Tue Apr 25 22:08:56 1995
  3952. ***************
  3953. *** 50,60 ****
  3954.   const meMouseMoved = 0x01;
  3955.   const meDoubleClick = 0x02;
  3956.   #else
  3957. ! #if !defined( __WINDOWS_H )
  3958. ! #include <windows.h>
  3959.   #endif
  3960. - const meMouseMoved = MOUSE_MOVED;       // NT values from WINDOWS.H
  3961. - const meDoubleClick = DOUBLE_CLICK;
  3962.   #endif
  3963.   
  3964.   #endif  // __EVENT_CODES
  3965. --- 50,68 ----
  3966.   const meMouseMoved = 0x01;
  3967.   const meDoubleClick = 0x02;
  3968.   #else
  3969. ! # if defined(__OS2__)
  3970. !     const meMouseMoved = 0x01;       // NT values from WINDOWS.H
  3971. !     const meDoubleClick = 0x02;
  3972. ! # elif defined(__NT__)
  3973. ! #   if !defined( __WINDOWS_H )
  3974. ! #   include <windows.h>
  3975. !     const meMouseMoved = MOUSE_MOVED;       // NT values from WINDOWS.H
  3976. !     const meDoubleClick = DOUBLE_CLICK;
  3977. ! # else
  3978. ! #   error   "Unsupported operating system"
  3979. ! # endif
  3980.   #endif
  3981.   #endif
  3982.   
  3983.   #endif  // __EVENT_CODES
  3984. diff --context ..\tvo/Tchdrdlg.cpp ./TCHDRDLG.CPP
  3985. *** ../tvo/Tchdrdlg.cpp    Fri Jun 17 01:00:00 1994
  3986. --- ./TCHDRDLG.CPP    Tue Apr 25 22:08:50 1995
  3987. ***************
  3988. *** 31,42 ****
  3989.   
  3990.   #if !defined( __CTYPE_H )
  3991.   #include <Ctype.h>
  3992. ! #endif    // __CTYPE_H
  3993.   
  3994.   #if !defined( __STRING_H )
  3995.   #include <String.h>
  3996.   #endif  // __STRING_H
  3997.   
  3998.   TChDirDialog::TChDirDialog( ushort opts, ushort histId ) :
  3999.       TDialog( TRect( 16, 2, 64, 20 ), changeDirTitle ),
  4000.       TWindowInit( &TChDirDialog::initFrame )
  4001. --- 31,46 ----
  4002.   
  4003.   #if !defined( __CTYPE_H )
  4004.   #include <Ctype.h>
  4005. ! #endif  // __CTYPE_H
  4006.   
  4007.   #if !defined( __STRING_H )
  4008.   #include <String.h>
  4009.   #endif  // __STRING_H
  4010.   
  4011. + #if !defined( __DIRECT_H )
  4012. + #   include <direct.h>
  4013. + #endif
  4014.   TChDirDialog::TChDirDialog( ushort opts, ushort histId ) :
  4015.       TDialog( TRect( 16, 2, 64, 20 ), changeDirTitle ),
  4016.       TWindowInit( &TChDirDialog::initFrame )
  4017. ***************
  4018. *** 91,97 ****
  4019.           {
  4020.           case evCommand:
  4021.               {
  4022. !             char curDir[MAXPATH];
  4023.               switch( event.message.command )
  4024.                   {
  4025.                   case cmRevert:
  4026. --- 95,101 ----
  4027.           {
  4028.           case evCommand:
  4029.               {
  4030. !             char curDir[OS_MAXPATH];
  4031.               switch( event.message.command )
  4032.                   {
  4033.                   case cmRevert:
  4034. ***************
  4035. *** 137,143 ****
  4036.   {
  4037.       if( dirList != 0 )
  4038.           {
  4039. !         char curDir[MAXPATH];
  4040.           getCurDir( curDir );
  4041.           dirList->newDirectory( curDir );
  4042.           if( dirInput != 0 )
  4043. --- 141,147 ----
  4044.   {
  4045.       if( dirList != 0 )
  4046.           {
  4047. !         char curDir[OS_MAXPATH];
  4048.           getCurDir( curDir );
  4049.           dirList->newDirectory( curDir );
  4050.           if( dirInput != 0 )
  4051. ***************
  4052. *** 163,169 ****
  4053.       if( command != cmOK )
  4054.           return True;
  4055.   
  4056. !     char path[MAXPATH];
  4057.       strcpy( path, dirInput->data );
  4058.       fexpand( path );
  4059.   
  4060. --- 167,173 ----
  4061.       if( command != cmOK )
  4062.           return True;
  4063.   
  4064. !     char path[OS_MAXPATH];
  4065.       strcpy( path, dirInput->data );
  4066.       fexpand( path );
  4067.   
  4068. diff --context ..\tvo/Tcluster.cpp ./TCLUSTER.CPP
  4069. *** ../tvo/Tcluster.cpp    Fri Jun 17 01:00:00 1994
  4070. --- ./TCLUSTER.CPP    Tue Apr 25 22:08:50 1995
  4071. ***************
  4072. *** 71,134 ****
  4073.   
  4074.   ushort  TCluster::dataSize()
  4075.   {
  4076. !      // value is now a long, but for compatibility with earlier TV,
  4077. !      // return size of short; TMultiCheckBoxes returns sizeof(long).
  4078.   
  4079.       return sizeof(short);
  4080.   }
  4081.   
  4082.   void TCluster::drawBox( const char *icon, char marker)
  4083.   {
  4084. !     char s[3];
  4085. !     s[0]=' '; s[1]=marker; s[2]=0;
  4086. !     drawMultiBox(icon, s);
  4087.   }
  4088.   
  4089.   void TCluster::drawMultiBox( const char *icon, const char* marker)
  4090.   {
  4091. !     TDrawBuffer b;
  4092. !     ushort color;
  4093. !     int i, j, cur;
  4094. !     ushort cNorm = getColor( 0x0301 );
  4095. !     ushort cSel = getColor( 0x0402 );
  4096. !     ushort cDis = getColor( 0x0505 );
  4097. !     for( i = 0; i <= size.y; i++ )
  4098. !     {
  4099. !         b.moveChar(0, ' ',(uchar)cNorm, size.x);
  4100. !         for( j = 0; j <= (strings->getCount()-1)/size.y + 1; j++ )
  4101. !         {
  4102. !             cur = j * size.y + i;
  4103. !             if( cur < strings->getCount() )
  4104. !             {
  4105. !                 int col = column( cur );
  4106. !                 if ( ((col+strlen((const char*)strings->at(cur))+5) <
  4107. !                     (sizeof(b)/sizeof(ushort))) &&  (col < size.x))
  4108. !                 {
  4109. !                     if(!buttonState( cur ))
  4110. !                         color = cDis;
  4111. !                     else if( (cur == sel) && (state & sfSelected) != 0 )
  4112. !                         color = cSel;
  4113. !                     else
  4114. !                         color = cNorm;
  4115. !                     b.moveChar( col, ' ', color, size.x - col );
  4116. !                     b.moveCStr( col, icon, color );
  4117. !                     b.putChar(col+2, marker[multiMark(cur)]);
  4118. !                     b.moveCStr( col+5, (char *)(strings->at(cur)), color );
  4119. !                     if(showMarkers && ((state & sfSelected) != 0) && cur==sel)
  4120. !                     {
  4121. !                         b.putChar( col, specialChars[0] );
  4122. !                         b.putChar( column(cur+size.y)-1, specialChars[1] );
  4123. !                     }
  4124. !                 }
  4125. !             }
  4126. !         }
  4127. !         writeBuf( 0, i, size.x, 1, b );
  4128. !     }
  4129. !     setCursor( column(sel)+2, row(sel) );
  4130.   }
  4131.   
  4132.   void TCluster::getData(void * rec)
  4133. --- 71,134 ----
  4134.   
  4135.   ushort  TCluster::dataSize()
  4136.   {
  4137. !      // value is now a long, but for compatibility with earlier TV,
  4138. !      // return size of short; TMultiCheckBoxes returns sizeof(long).
  4139.   
  4140.       return sizeof(short);
  4141.   }
  4142.   
  4143.   void TCluster::drawBox( const char *icon, char marker)
  4144.   {
  4145. !     char s[3];
  4146. !     s[0]=' '; s[1]=marker; s[2]=0;
  4147. !     drawMultiBox(icon, s);
  4148.   }
  4149.   
  4150.   void TCluster::drawMultiBox( const char *icon, const char* marker)
  4151.   {
  4152. !     TDrawBuffer b;
  4153. !     ushort color;
  4154. !     int i, j, cur;
  4155. !     ushort cNorm = getColor( 0x0301 );
  4156. !     ushort cSel = getColor( 0x0402 );
  4157. !     ushort cDis = getColor( 0x0505 );
  4158. !     for( i = 0; i <= size.y; i++ )
  4159. !     {
  4160. !         b.moveChar(0, ' ',(uchar)cNorm, size.x);
  4161. !         for( j = 0; j <= (strings->getCount()-1)/size.y + 1; j++ )
  4162. !         {
  4163. !             cur = j * size.y + i;
  4164. !             if( cur < strings->getCount() )
  4165. !             {
  4166. !                 int col = column( cur );
  4167. !                 if ( ((col+strlen((const char*)strings->at(cur))+5) <
  4168. !                     (sizeof(b)/sizeof(ushort))) &&  (col < size.x))
  4169. !                 {
  4170. !                     if(!buttonState( cur ))
  4171. !                         color = cDis;
  4172. !                     else if( (cur == sel) && (state & sfSelected) != 0 )
  4173. !                         color = cSel;
  4174. !                     else
  4175. !                         color = cNorm;
  4176. !                     b.moveChar( col, ' ', color, size.x - col );
  4177. !                     b.moveCStr( col, icon, color );
  4178. !                     b.putChar(col+2, marker[multiMark(cur)]);
  4179. !                     b.moveCStr( col+5, (char *)(strings->at(cur)), color );
  4180. !                     if(showMarkers && ((state & sfSelected) != 0) && cur==sel)
  4181. !                     {
  4182. !                         b.putChar( col, specialChars[0] );
  4183. !                         b.putChar( column(cur+size.y)-1, specialChars[1] );
  4184. !                     }
  4185. !                 }
  4186. !             }
  4187. !         }
  4188. !         writeBuf( 0, i, size.x, 1, b );
  4189. !     }
  4190. !     setCursor( column(sel)+2, row(sel) );
  4191.   }
  4192.   
  4193.   void TCluster::getData(void * rec)
  4194. ***************
  4195. *** 155,163 ****
  4196.   {
  4197.     if (i <= strings->getCount())
  4198.     {
  4199. !         sel = s;
  4200. !         movedTo(sel);
  4201. !         drawView();
  4202.     }
  4203.   }
  4204.   
  4205. --- 155,163 ----
  4206.   {
  4207.     if (i <= strings->getCount())
  4208.     {
  4209. !         sel = s;
  4210. !         movedTo(sel);
  4211. !         drawView();
  4212.     }
  4213.   }
  4214.   
  4215. ***************
  4216. *** 165,171 ****
  4217.   {
  4218.       TView::handleEvent(event);
  4219.       if (!(options & ofSelectable))
  4220. !         return;
  4221.       if( event.what == evMouseDown )
  4222.           {
  4223.           TPoint mouse = makeLocal( event.mouse.where );
  4224. --- 165,171 ----
  4225.   {
  4226.       TView::handleEvent(event);
  4227.       if (!(options & ofSelectable))
  4228. !         return;
  4229.       if( event.what == evMouseDown )
  4230.           {
  4231.           TPoint mouse = makeLocal( event.mouse.where );
  4232. ***************
  4233. *** 191,259 ****
  4234.           }
  4235.       else if( event.what == evKeyDown )
  4236.       {
  4237. !     int s = sel;
  4238.           switch (ctrlToArrow(event.keyDown.keyCode))
  4239.               {
  4240.               case kbUp:
  4241.                   if( (state & sfFocused) != 0 )
  4242.                       {
  4243. !             int i = 0;
  4244. !             do {
  4245. !                 i++; s--;
  4246. !                 if (s < 0)
  4247. !                     s = strings->getCount()-1;
  4248. !             } while (!(buttonState(s) || (i > strings->getCount())));
  4249. !             moveSel(i, s);
  4250. !             clearEvent(event);
  4251.                       }
  4252.                   break;
  4253.   
  4254.               case kbDown:
  4255.                   if( (state & sfFocused) != 0 )
  4256.                       {
  4257. !             int i = 0;
  4258. !             do {
  4259. !                 i++; s++;
  4260. !                 if (s >= strings->getCount())
  4261. !                     s = 0;
  4262. !              } while (!(buttonState(s) || (i > strings->getCount())));
  4263. !              moveSel(i, s);
  4264. !              clearEvent(event);
  4265.                        }
  4266.                   break;
  4267.               case kbRight:
  4268.                   if( (state & sfFocused) != 0 )
  4269.                       {
  4270. !             int i = 0;
  4271. !             do {
  4272. !                 i++; s += size.y;
  4273. !                 if (s >= strings->getCount() )
  4274. !                     s = 0;
  4275. !             } while (!(buttonState(s) || (i > strings->getCount())));
  4276.                       clearEvent(event);
  4277.                       }
  4278.                   break;
  4279.               case kbLeft:
  4280.                   if( (state & sfFocused) != 0 )
  4281.                       {
  4282. !                 int i = 0;
  4283. !             do {
  4284. !                 i++;
  4285. !                 if ( s > 0 )
  4286. !                 {
  4287. !                     s -= size.y;
  4288. !                     if ( s < 0 )
  4289. !                     {
  4290. !                         s=((strings->getCount()+size.y-1)/
  4291. !                             size.y)*size.y + s - 1;
  4292. !                         if( s >= strings->getCount() )
  4293. !                             s = strings->getCount()-1;
  4294. !                     }
  4295. !                 }
  4296. !                 else
  4297. !                     s = strings->getCount()-1;
  4298.   
  4299. !             } while (!(buttonState(s) || (i > strings->getCount())));
  4300.   
  4301.                       clearEvent(event);
  4302.                       }
  4303. --- 191,259 ----
  4304.           }
  4305.       else if( event.what == evKeyDown )
  4306.       {
  4307. !     int s = sel;
  4308.           switch (ctrlToArrow(event.keyDown.keyCode))
  4309.               {
  4310.               case kbUp:
  4311.                   if( (state & sfFocused) != 0 )
  4312.                       {
  4313. !             int i = 0;
  4314. !             do {
  4315. !                 i++; s--;
  4316. !                 if (s < 0)
  4317. !                     s = strings->getCount()-1;
  4318. !             } while (!(buttonState(s) || (i > strings->getCount())));
  4319. !             moveSel(i, s);
  4320. !             clearEvent(event);
  4321.                       }
  4322.                   break;
  4323.   
  4324.               case kbDown:
  4325.                   if( (state & sfFocused) != 0 )
  4326.                       {
  4327. !             int i = 0;
  4328. !             do {
  4329. !                 i++; s++;
  4330. !                 if (s >= strings->getCount())
  4331. !                     s = 0;
  4332. !              } while (!(buttonState(s) || (i > strings->getCount())));
  4333. !              moveSel(i, s);
  4334. !              clearEvent(event);
  4335.                        }
  4336.                   break;
  4337.               case kbRight:
  4338.                   if( (state & sfFocused) != 0 )
  4339.                       {
  4340. !             int i = 0;
  4341. !             do {
  4342. !                 i++; s += size.y;
  4343. !                 if (s >= strings->getCount() )
  4344. !                     s = 0;
  4345. !             } while (!(buttonState(s) || (i > strings->getCount())));
  4346.                       clearEvent(event);
  4347.                       }
  4348.                   break;
  4349.               case kbLeft:
  4350.                   if( (state & sfFocused) != 0 )
  4351.                       {
  4352. !                 int i = 0;
  4353. !             do {
  4354. !                 i++;
  4355. !                 if ( s > 0 )
  4356. !                 {
  4357. !                     s -= size.y;
  4358. !                     if ( s < 0 )
  4359. !                     {
  4360. !                         s=((strings->getCount()+size.y-1)/
  4361. !                             size.y)*size.y + s - 1;
  4362. !                         if( s >= strings->getCount() )
  4363. !                             s = strings->getCount()-1;
  4364. !                     }
  4365. !                 }
  4366. !                 else
  4367. !                     s = strings->getCount()-1;
  4368.   
  4369. !             } while (!(buttonState(s) || (i > strings->getCount())));
  4370.   
  4371.                       clearEvent(event);
  4372.                       }
  4373. ***************
  4374. *** 271,289 ****
  4375.                           )
  4376.                         )
  4377.                           {
  4378. !                 if (buttonState(i))
  4379. !                 {
  4380. !                     if ( focus())
  4381. !                     {
  4382. !                         sel = i;
  4383. !                         movedTo(sel);
  4384. !                         press(sel);
  4385. !                         drawView();
  4386. !                     }
  4387. !                     clearEvent(event);
  4388. !                 }
  4389. !                 return;
  4390. !             }
  4391.                       }
  4392.                   if( event.keyDown.charScan.charCode == ' ' &&
  4393.                       (state & sfFocused) != 0
  4394. --- 271,289 ----
  4395.                           )
  4396.                         )
  4397.                           {
  4398. !                 if (buttonState(i))
  4399. !                 {
  4400. !                     if ( focus())
  4401. !                     {
  4402. !                         sel = i;
  4403. !                         movedTo(sel);
  4404. !                         press(sel);
  4405. !                         drawView();
  4406. !                     }
  4407. !                     clearEvent(event);
  4408. !                 }
  4409. !                 return;
  4410. !             }
  4411.                       }
  4412.                   if( event.keyDown.charScan.charCode == ' ' &&
  4413.                       (state & sfFocused) != 0
  4414. ***************
  4415. *** 300,319 ****
  4416.   
  4417.   void TCluster::setButtonState(unsigned long aMask, Boolean enable)
  4418.   {
  4419. !     if (!enable)
  4420. !         enableMask &= ~aMask;
  4421. !     else
  4422. !         enableMask |= aMask;
  4423. !     int n = strings->getCount();
  4424. !     if ( n < 32 )
  4425. !     {
  4426. !         unsigned long testMask = (1 << n) - 1;
  4427. !         if ((enableMask & testMask) != 0)
  4428. !             options |= ofSelectable;
  4429. !         else
  4430. !             options &= ~ofSelectable;
  4431. !     }
  4432.   }
  4433.   
  4434.   
  4435. --- 300,319 ----
  4436.   
  4437.   void TCluster::setButtonState(unsigned long aMask, Boolean enable)
  4438.   {
  4439. !     if (!enable)
  4440. !         enableMask &= ~aMask;
  4441. !     else
  4442. !         enableMask |= aMask;
  4443. !     int n = strings->getCount();
  4444. !     if ( n < 32 )
  4445. !     {
  4446. !         unsigned long testMask = (1 << n) - 1;
  4447. !         if ((enableMask & testMask) != 0)
  4448. !             options |= ofSelectable;
  4449. !         else
  4450. !             options &= ~ofSelectable;
  4451. !     }
  4452.   }
  4453.   
  4454.   
  4455. ***************
  4456. *** 337,343 ****
  4457.   
  4458.   uchar TCluster::multiMark( int item )
  4459.   {
  4460. !     return (uchar)(mark(item)==True);
  4461.   }
  4462.   
  4463.   void TCluster::movedTo( int )
  4464. --- 337,343 ----
  4465.   
  4466.   uchar TCluster::multiMark( int item )
  4467.   {
  4468. !     return (uchar)(mark(item)==True);
  4469.   }
  4470.   
  4471.   void TCluster::movedTo( int )
  4472. ***************
  4473. *** 400,448 ****
  4474.   Boolean TCluster::buttonState(int item)
  4475.   {
  4476.   #if !defined(__FLAT__)
  4477. !     ushort maskLo = enableMask & 0xffff;
  4478. !     ushort maskHi = enableMask >> 16;
  4479.   
  4480. ! asm    {
  4481.           XOR     AL,AL
  4482. !     MOV     CX,item
  4483.           CMP     CX,31
  4484.           JA      __3
  4485.           MOV     AX,1
  4486.           XOR     DX,DX
  4487. !     JCXZ    __2
  4488. !     }
  4489.   __1:
  4490. ! asm    {
  4491. !     SHL     AX,1
  4492.           RCL     DX,1
  4493. !     LOOP    __1
  4494. !     }
  4495.   __2:
  4496. ! asm    {
  4497.           AND     AX,maskLo
  4498.           AND     DX,maskHi
  4499. !     OR      AX,DX
  4500. !     JZ      __3
  4501. !     MOV     AL,1
  4502. !     }
  4503.   __3:
  4504. !     return Boolean(_AL);
  4505.   #else
  4506. !     if (item < 32)
  4507. !     {
  4508. !         unsigned long mask = 1;
  4509. !         while (item--)
  4510. !             mask <<= 1;
  4511. !         if (enableMask & mask)
  4512. !             return True;
  4513. !         else
  4514. !             return False;
  4515. !     }
  4516. !     else
  4517. !         return False;
  4518.   #endif
  4519.   }
  4520.   
  4521. --- 400,448 ----
  4522.   Boolean TCluster::buttonState(int item)
  4523.   {
  4524.   #if !defined(__FLAT__)
  4525. !     ushort maskLo = enableMask & 0xffff;
  4526. !     ushort maskHi = enableMask >> 16;
  4527.   
  4528. ! asm {
  4529.           XOR     AL,AL
  4530. !     MOV     CX,item
  4531.           CMP     CX,31
  4532.           JA      __3
  4533.           MOV     AX,1
  4534.           XOR     DX,DX
  4535. !     JCXZ    __2
  4536. !     }
  4537.   __1:
  4538. ! asm {
  4539. !     SHL     AX,1
  4540.           RCL     DX,1
  4541. !     LOOP    __1
  4542. !     }
  4543.   __2:
  4544. ! asm {
  4545.           AND     AX,maskLo
  4546.           AND     DX,maskHi
  4547. !     OR      AX,DX
  4548. !     JZ      __3
  4549. !     MOV     AL,1
  4550. !     }
  4551.   __3:
  4552. !     return Boolean(_AL);
  4553.   #else
  4554. !     if (item < 32)
  4555. !     {
  4556. !         unsigned long mask = 1;
  4557. !         while (item--)
  4558. !             mask <<= 1;
  4559. !         if (enableMask & mask)
  4560. !             return True;
  4561. !         else
  4562. !             return False;
  4563. !     }
  4564. !     else
  4565. !         return False;
  4566.   #endif
  4567.   }
  4568.   
  4569. diff --context ..\tvo/Tcollect.cpp ./TCOLLECT.CPP
  4570. *** ../tvo/Tcollect.cpp    Fri Jun 17 01:00:00 1994
  4571. --- ./TCOLLECT.CPP    Tue Apr 25 22:08:50 1995
  4572. ***************
  4573. *** 26,31 ****
  4574. --- 26,32 ----
  4575.   #include <Mem.h>
  4576.   #endif  // __MEM_H
  4577.   
  4578. + #include    <assert.h>
  4579.   
  4580.   TNSCollection::TNSCollection( ccIndex aLimit, ccIndex aDelta ) :
  4581.       count( 0 ),
  4582. ***************
  4583. *** 37,47 ****
  4584.       setLimit( aLimit );
  4585.   }
  4586.   
  4587.   TNSCollection::TNSCollection() :
  4588.       count( 0 ),
  4589.       items( 0 ),
  4590.       limit( 0 ),
  4591. !     delta( 0 ),
  4592.       shouldDelete( True )
  4593.   {
  4594.   }
  4595. --- 38,60 ----
  4596.       setLimit( aLimit );
  4597.   }
  4598.   
  4599. + #if 0
  4600. + TNSCollection::TNSCollection( short aLimit, short aDelta ) :
  4601. +     count( 0 ),
  4602. +     items( 0 ),
  4603. +     limit( 0 ),
  4604. +     delta( aDelta ),
  4605. +     shouldDelete( True )
  4606. + {
  4607. +     setLimit( aLimit );
  4608. + }
  4609. + #endif
  4610.   TNSCollection::TNSCollection() :
  4611.       count( 0 ),
  4612.       items( 0 ),
  4613.       limit( 0 ),
  4614. !     delta( 5 ),                 // JAL: Prevents TRAPS!
  4615.       shouldDelete( True )
  4616.   {
  4617.   }
  4618. ***************
  4619. *** 89,95 ****
  4620. --- 102,111 ----
  4621.       if( index < 0 )
  4622.           error(1,0);
  4623.       if( count == limit )
  4624. +     {
  4625. +         assert(delta != 0);
  4626.           setLimit(count + delta);
  4627. +     }
  4628.   
  4629.       memmove( &items[index+1], &items[index], (count-index)*sizeof(void *) );
  4630.       count++;
  4631. ***************
  4632. *** 172,177 ****
  4633. --- 188,194 ----
  4634.               return i;
  4635.   
  4636.       error(1,0);
  4637. +     return 0;
  4638.   }
  4639.   #pragma warn .rvl
  4640.   
  4641. ***************
  4642. *** 191,197 ****
  4643.           {
  4644.           if( *curSrc != 0 )
  4645.               *curDst++ = *curSrc;
  4646. !         *curSrc++;
  4647.           }
  4648.   }
  4649.   
  4650. --- 208,214 ----
  4651.           {
  4652.           if( *curSrc != 0 )
  4653.               *curDst++ = *curSrc;
  4654. !             curSrc++;
  4655.           }
  4656.   }
  4657.   
  4658. diff --context ..\tvo/Tdesktop.cpp ./TDESKTOP.CPP
  4659. *** ../tvo/Tdesktop.cpp    Fri Jun 17 01:00:00 1994
  4660. --- ./TDESKTOP.CPP    Tue Apr 25 22:08:50 1995
  4661. ***************
  4662. *** 122,127 ****
  4663. --- 122,131 ----
  4664.       return new TBackground( r, defaultBkgrnd );
  4665.   }
  4666.   
  4667. + #ifndef abs
  4668. + #define abs(x)  ((x) < 0 ? -(x) : (x))
  4669. + #endif
  4670.   short iSqr( short i )
  4671.   {
  4672.       short res1 = 2;
  4673. diff --context ..\tvo/Tdircoll.cpp ./TDIRCOLL.CPP
  4674. *** ../tvo/Tdircoll.cpp    Fri Jun 17 01:00:00 1994
  4675. --- ./TDIRCOLL.CPP    Tue Apr 25 22:08:50 1995
  4676. ***************
  4677. *** 18,35 ****
  4678.   #define Uses_ipstream
  4679.   #include <tvision\tv.h>
  4680.   
  4681. ! #if !defined( __DIR_H )
  4682. ! #include <Dir.h>
  4683. ! #endif  // __DIR_H
  4684.   
  4685.   #if !defined( __STRING_H )
  4686.   #include <String.h>
  4687.   #endif  // __STRING_H
  4688.   
  4689.   #if !defined( __DOS_H )
  4690.   #include <Dos.h>
  4691.   #endif  // __DOS_H
  4692.   
  4693.   #pragma warn -asc
  4694.   
  4695.   Boolean driveValid( char drive )
  4696. --- 18,43 ----
  4697.   #define Uses_ipstream
  4698.   #include <tvision\tv.h>
  4699.   
  4700. ! //#if !defined( __DIR_H )
  4701. ! //#include <Dir.h>
  4702. ! //#endif  // __DIR_H
  4703.   
  4704.   #if !defined( __STRING_H )
  4705.   #include <String.h>
  4706.   #endif  // __STRING_H
  4707.   
  4708. + #if !defined( __CTYPE_H )
  4709. + #include <ctype.h>
  4710. + #endif  // __STRING_H
  4711.   #if !defined( __DOS_H )
  4712.   #include <Dos.h>
  4713.   #endif  // __DOS_H
  4714.   
  4715. + #ifdef  __BORLANDC__
  4716. + #include    <dir.h>
  4717. + #endif
  4718.   #pragma warn -asc
  4719.   
  4720.   Boolean driveValid( char drive )
  4721. ***************
  4722. *** 55,63 ****
  4723. --- 63,80 ----
  4724.   I       XCHG    AX, CX      // Put the return value into AX
  4725.       return Boolean(_AX);
  4726.   #else
  4727. + # if defined(__NT__)
  4728.       drive = (char) toupper( drive );
  4729.       DWORD mask = 0x01 << (drive - 'A');
  4730.       return (Boolean) (GetLogicalDrives() & mask);
  4731. + # elif defined(__OS2__)
  4732. +     char    tmp[OS_MAXPATH+1];
  4733. +     return Boolean( getcurdir(toupper(drive)-'A'+1, tmp) == 0 );
  4734. + # else
  4735. + #   error "Non-supported OS"
  4736. + # endif
  4737.   #endif
  4738.   }
  4739.   
  4740. ***************
  4741. *** 72,78 ****
  4742.   
  4743.   Boolean pathValid( const char *path )
  4744.   {
  4745. !     char expPath[MAXPATH];
  4746.       strcpy( expPath, path );
  4747.       fexpand( expPath );
  4748.       int len = strlen(expPath);
  4749. --- 89,95 ----
  4750.   
  4751.   Boolean pathValid( const char *path )
  4752.   {
  4753. !     char expPath[OS_MAXPATH];
  4754.       strcpy( expPath, path );
  4755.       fexpand( expPath );
  4756.       int len = strlen(expPath);
  4757. ***************
  4758. *** 89,98 ****
  4759.   {
  4760.       static const char * const illegalChars = ";,=+<>|\"[] \\";
  4761.   
  4762. !     char path[MAXPATH];
  4763. !     char dir[MAXDIR];
  4764. !     char name[MAXFILE];
  4765. !     char ext[MAXEXT];
  4766.   
  4767.       fnsplit( fileName, path, dir, name, ext );
  4768.       strcat( path, dir );
  4769. --- 106,115 ----
  4770.   {
  4771.       static const char * const illegalChars = ";,=+<>|\"[] \\";
  4772.   
  4773. !     char path[OS_MAXPATH];
  4774. !     char dir[OS_MAXDIR];
  4775. !     char name[OS_MAXFILE];
  4776. !     char ext[OS_MAXEXT];
  4777.   
  4778.       fnsplit( fileName, path, dir, name, ext );
  4779.       strcat( path, dir );
  4780. diff --context ..\tvo/Tdirlist.cpp ./TDIRLIST.CPP
  4781. *** ../tvo/Tdirlist.cpp    Fri Jun 17 01:00:00 1994
  4782. --- ./TDIRLIST.CPP    Tue Apr 25 22:08:50 1995
  4783. ***************
  4784. *** 24,32 ****
  4785.   #include <String.h>
  4786.   #endif  // __STRING_H
  4787.   
  4788. ! #if !defined( __DIR_H )
  4789.   #include <Dir.h>
  4790. ! #endif  // __DIR_H
  4791.   
  4792.   #if !defined( __DOS_H )
  4793.   #include <Dos.h>
  4794. --- 24,32 ----
  4795.   #include <String.h>
  4796.   #endif  // __STRING_H
  4797.   
  4798. ! #ifdef __BORLANDC__
  4799.   #include <Dir.h>
  4800. ! #endif
  4801.   
  4802.   #if !defined( __DOS_H )
  4803.   #include <Dos.h>
  4804. ***************
  4805. *** 123,131 ****
  4806.       const indentSize = 2;
  4807.       int indent = indentSize;
  4808.   
  4809. !     char buf[MAXPATH+MAXFILE+MAXEXT];
  4810.       memset( buf, ' ', sizeof( buf ) );
  4811. !     char *name = buf + sizeof(buf) - (MAXFILE+MAXEXT);
  4812.   
  4813.       char *org = name - strlen(pathDir);
  4814.       strcpy( org, pathDir );
  4815. --- 123,131 ----
  4816.       const indentSize = 2;
  4817.       int indent = indentSize;
  4818.   
  4819. !     char buf[OS_MAXPATH+OS_MAXFILE+OS_MAXEXT];
  4820.       memset( buf, ' ', sizeof( buf ) );
  4821. !     char *name = buf + sizeof(buf) - (OS_MAXFILE+OS_MAXEXT);
  4822.   
  4823.       char *org = name - strlen(pathDir);
  4824.       strcpy( org, pathDir );
  4825. ***************
  4826. *** 153,159 ****
  4827.       cur = dirs->getCount() - 1;
  4828.   
  4829.       end = strrchr( dir, '\\' );
  4830. !     char path[MAXPATH];
  4831.       strncpy( path, dir, size_t(end-dir+1) );
  4832.       end = path + unsigned(end-dir)+1;
  4833.       strcpy( end, "*.*" );
  4834. --- 153,159 ----
  4835.       cur = dirs->getCount() - 1;
  4836.   
  4837.       end = strrchr( dir, '\\' );
  4838. !     char path[OS_MAXPATH];
  4839.       strncpy( path, dir, size_t(end-dir+1) );
  4840.       end = path + unsigned(end-dir)+1;
  4841.       strcpy( end, "*.*" );
  4842. diff --context ..\tvo/Teditor2.cpp ./TEDITOR2.CPP
  4843. *** ../tvo/Teditor2.cpp    Fri Jun 17 01:00:00 1994
  4844. --- ./TEDITOR2.CPP    Tue Apr 25 22:08:50 1995
  4845. ***************
  4846. *** 35,46 ****
  4847. --- 35,52 ----
  4848.   #include <Dos.h>
  4849.   #endif  // __DOS_H
  4850.   
  4851. + #if 0
  4852. + /*
  4853. +  *  This is stupid, again.
  4854. +  */
  4855.   extern "C" {
  4856.   int countLines( void *buf, uint count );
  4857.   ushort scan( const void *block, ushort size, const char *str );
  4858.   ushort iScan( const void *block, ushort size, const char *str );
  4859.   };
  4860.   
  4861. + #endif
  4862.   inline int isWordChar( int ch )
  4863.   {
  4864.       return isalnum(ch) || ch == '_';
  4865. ***************
  4866. *** 93,99 ****
  4867.           if( newSize > 0xFFE0l || setBufSize(ushort(newSize)) == False )
  4868.               {
  4869.               editorDialog( edOutOfMemory );
  4870. !         selEnd = selStart;
  4871.               return False;
  4872.               }
  4873.   
  4874. --- 99,105 ----
  4875.           if( newSize > 0xFFE0l || setBufSize(ushort(newSize)) == False )
  4876.               {
  4877.               editorDialog( edOutOfMemory );
  4878. !         selEnd = selStart;
  4879.               return False;
  4880.               }
  4881.   
  4882. diff --context ..\tvo/Tevent.cpp ./TEVENT.CPP
  4883. *** ../tvo/Tevent.cpp    Fri Jun 17 01:00:00 1994
  4884. --- ./TEVENT.CPP    Tue Apr 25 22:08:52 1995
  4885. ***************
  4886. *** 285,287 ****
  4887. --- 285,288 ----
  4888.       return;
  4889.   #endif
  4890.   }
  4891. diff --context ..\tvo/Textview.cpp ./TEXTVIEW.CPP
  4892. *** ../tvo/Textview.cpp    Fri Jun 17 01:00:00 1994
  4893. --- ./TEXTVIEW.CPP    Tue Apr 25 22:08:52 1995
  4894. ***************
  4895. *** 11,16 ****
  4896. --- 11,18 ----
  4897.    *      All Rights Reserved.
  4898.    *
  4899.    */
  4900. + #if !defined(_NO_TEXTVIEW_)
  4901.   
  4902.   #define Uses_TTextDevice
  4903.   #define Uses_TTerminal
  4904. ***************
  4905. *** 195,197 ****
  4906. --- 197,202 ----
  4907.   {
  4908.       ios::init( tt );
  4909.   }
  4910. + #endif  // _NO_TEXTVIEW_
  4911. diff --context ..\tvo/Textview.h ./TEXTVIEW.H
  4912. *** ../tvo/Textview.h    Fri Jun 17 01:00:00 1994
  4913. --- ./TEXTVIEW.H    Tue Apr 25 22:08:56 1995
  4914. ***************
  4915. *** 12,17 ****
  4916. --- 12,19 ----
  4917.    *      All Rights Reserved.
  4918.    *
  4919.    */
  4920. + #if !defined(_NO_TEXTVIEW_)
  4921.   
  4922.   #pragma option -Vo-
  4923.   #if defined( __BCOPT__ ) && !defined (__FLAT__)
  4924. ***************
  4925. *** 30,35 ****
  4926. --- 32,38 ----
  4927.   class _FAR TRect;
  4928.   class _FAR TScrollBar;
  4929.   
  4930.   class TTextDevice : public TScroller, public streambuf
  4931.   {
  4932.   
  4933. ***************
  4934. *** 40,46 ****
  4935.                    TScrollBar *aVScrollBar
  4936.                  );
  4937.   
  4938. !     virtual int do_sputn( const char *s, int count ) = 0;
  4939.       virtual int overflow( int = EOF );
  4940.   
  4941.   };
  4942. --- 43,49 ----
  4943.                    TScrollBar *aVScrollBar
  4944.                  );
  4945.   
  4946. !     virtual int do_sputn( const char _FAR *s, int count ) = 0;
  4947.       virtual int overflow( int = EOF );
  4948.   
  4949.   };
  4950. ***************
  4951. *** 50,58 ****
  4952. --- 53,66 ----
  4953.   #if defined( Uses_TTerminal ) && !defined( __TTerminal )
  4954.   #define __TTerminal
  4955.   
  4956. + #ifndef __os2asm_h
  4957. + #   include <tvision/os2asm.h>
  4958. + #endif
  4959.   class _FAR TRect;
  4960.   class _FAR TScrollBar;
  4961.   
  4962.   class TTerminal: public TTextDevice
  4963.   {
  4964.   
  4965. ***************
  4966. *** 85,90 ****
  4967. --- 93,105 ----
  4968.       void bufDec(ushort& val);
  4969.   };
  4970.   
  4971. + #ifdef __FLAT__
  4972. + inline ushort TTerminal::prevLines(ushort pos, ushort ct)
  4973. + {   return asmPrevLines(this, pos, ct);
  4974. + }
  4975. + #endif
  4976.   #endif  // Uses_TTerminal
  4977.   
  4978.   #if defined( Uses_otstream ) && !defined( __otstream )
  4979. ***************
  4980. *** 113,115 ****
  4981. --- 128,132 ----
  4982.   #if defined( __BCOPT__ ) && !defined (__FLAT__)
  4983.   #pragma option -po.
  4984.   #endif
  4985. + #endif  // _NO_TEXTVIEW_
  4986. diff --context ..\tvo/Tfildlg.cpp ./TFILDLG.CPP
  4987. *** ../tvo/Tfildlg.cpp    Fri Jun 17 01:00:00 1994
  4988. --- ./TFILDLG.CPP    Tue Apr 25 22:08:52 1995
  4989. ***************
  4990. *** 27,35 ****
  4991.   #define Uses_ipstream
  4992.   #include <tvision\tv.h>
  4993.   
  4994. ! #if !defined( __DIR_H )
  4995.   #include <Dir.h>
  4996. ! #endif  // __DIR_H
  4997.   
  4998.   #if !defined( __ERRNO_H )
  4999.   #include <Errno.h>
  5000. --- 27,35 ----
  5001.   #define Uses_ipstream
  5002.   #include <tvision\tv.h>
  5003.   
  5004. ! #ifdef  __BORLANDC__
  5005.   #include <Dir.h>
  5006. ! #endif
  5007.   
  5008.   #if !defined( __ERRNO_H )
  5009.   #include <Errno.h>
  5010. ***************
  5011. *** 185,197 ****
  5012.   
  5013.   void TFileDialog::getFileName( char *s )
  5014.   {
  5015. ! char buf[2*MAXPATH];
  5016. ! char drive[MAXDRIVE];
  5017. ! char path[MAXDIR];
  5018. ! char name[MAXFILE];
  5019. ! char ext[MAXEXT];
  5020. ! char TName[MAXFILE];
  5021. ! char TExt[MAXEXT];
  5022.   
  5023.       trim( buf, fileName->data );
  5024.       if( relativePath( buf ) == True )
  5025. --- 185,197 ----
  5026.   
  5027.   void TFileDialog::getFileName( char *s )
  5028.   {
  5029. ! char buf[2*OS_MAXPATH];
  5030. ! char drive[OS_MAXDRIVE];
  5031. ! char path[OS_MAXDIR];
  5032. ! char name[OS_MAXFILE];
  5033. ! char ext[OS_MAXEXT];
  5034. ! char TName[OS_MAXFILE];
  5035. ! char TExt[OS_MAXEXT];
  5036.   
  5037.       trim( buf, fileName->data );
  5038.       if( relativePath( buf ) == True )
  5039. ***************
  5040. *** 250,256 ****
  5041.   
  5042.   void TFileDialog::readDirectory()
  5043.   {
  5044. !     char curDir[MAXPATH];
  5045.       getCurDir( curDir );
  5046.       if( directory )
  5047.           delete (char *)directory;
  5048. --- 250,256 ----
  5049.   
  5050.   void TFileDialog::readDirectory()
  5051.   {
  5052. !     char curDir[OS_MAXPATH];
  5053.       getCurDir( curDir );
  5054.       if( directory )
  5055.           delete (char *)directory;
  5056. ***************
  5057. *** 287,297 ****
  5058.   
  5059.   Boolean TFileDialog::valid(ushort command)
  5060.   {
  5061. ! char fName[MAXPATH];
  5062. ! char drive[MAXDRIVE];
  5063. ! char dir[MAXDIR];
  5064. ! char name[MAXFILE];
  5065. ! char ext[MAXEXT];
  5066.   
  5067.       if( command == 0 )
  5068.           return True;
  5069. --- 287,297 ----
  5070.   
  5071.   Boolean TFileDialog::valid(ushort command)
  5072.   {
  5073. ! char fName[OS_MAXPATH];
  5074. ! char drive[OS_MAXDRIVE];
  5075. ! char dir[OS_MAXDIR];
  5076. ! char name[OS_MAXFILE];
  5077. ! char ext[OS_MAXEXT];
  5078.   
  5079.       if( command == 0 )
  5080.           return True;
  5081. ***************
  5082. *** 305,311 ****
  5083.               if( isWild( fName ) )
  5084.                   {
  5085.                   fnsplit( fName, drive, dir, name, ext );
  5086. !                 char path[MAXPATH];
  5087.                   strcpy( path, drive );
  5088.                   strcat( path, dir );
  5089.                   if( checkDirectory( path ) )
  5090. --- 305,311 ----
  5091.               if( isWild( fName ) )
  5092.                   {
  5093.                   fnsplit( fName, drive, dir, name, ext );
  5094. !                 char path[OS_MAXPATH];
  5095.                   strcpy( path, drive );
  5096.                   strcat( path, dir );
  5097.                   if( checkDirectory( path ) )
  5098. diff --context ..\tvo/Tfiledtr.cpp ./TFILEDTR.CPP
  5099. *** ../tvo/Tfiledtr.cpp    Fri Jun 17 01:00:00 1994
  5100. --- ./TFILEDTR.CPP    Tue Apr 25 22:08:52 1995
  5101. ***************
  5102. *** 41,48 ****
  5103.   #include <stdio.h>
  5104.   #endif  // __STDIO_H
  5105.   
  5106. ! #if !defined( __STDLIB_H )
  5107. ! #include <alloc.h>
  5108.   #endif
  5109.   
  5110.   inline ushort min( ushort u1, ushort u2 )
  5111. --- 41,52 ----
  5112.   #include <stdio.h>
  5113.   #endif  // __STDIO_H
  5114.   
  5115. ! #if !defined( __MALLOC_H )
  5116. ! #include <malloc.h>
  5117. ! #endif
  5118. ! #ifdef  __BORLANDC__
  5119. ! #   include <dir.h>
  5120.   #endif
  5121.   
  5122.   inline ushort min( ushort u1, ushort u2 )
  5123. ***************
  5124. *** 179,193 ****
  5125.   
  5126.   Boolean TFileEditor::saveFile()
  5127.   {
  5128. !     char drive[MAXDRIVE];
  5129. !     char dir[MAXDIR];
  5130. !     char file[MAXFILE];
  5131. !     char ext[MAXEXT];
  5132.   
  5133.       if( (editorFlags & efBackupFiles) != 0 )
  5134.           {
  5135.           fnsplit( fileName, drive, dir, file, ext );
  5136. !         char backupName[MAXPATH];
  5137.           fnmerge( backupName, drive, dir, file, backupExt );
  5138.           unlink( backupName );
  5139.           rename( fileName, backupName );
  5140. --- 183,197 ----
  5141.   
  5142.   Boolean TFileEditor::saveFile()
  5143.   {
  5144. !     char drive[OS_MAXDRIVE];
  5145. !     char dir[OS_MAXDIR];
  5146. !     char file[OS_MAXFILE];
  5147. !     char ext[OS_MAXEXT];
  5148.   
  5149.       if( (editorFlags & efBackupFiles) != 0 )
  5150.           {
  5151.           fnsplit( fileName, drive, dir, file, ext );
  5152. !         char backupName[OS_MAXPATH];
  5153.           fnmerge( backupName, drive, dir, file, backupExt );
  5154.           unlink( backupName );
  5155.           rename( fileName, backupName );
  5156. ***************
  5157. *** 222,228 ****
  5158.   Boolean TFileEditor::setBufSize( ushort newSize )
  5159.   {
  5160.       if( newSize == 0)
  5161. !         newSize = 0x1000;
  5162.       else if( newSize > 0xF000 )
  5163.           newSize = 0xFFE0;
  5164.       else
  5165. --- 226,232 ----
  5166.   Boolean TFileEditor::setBufSize( ushort newSize )
  5167.   {
  5168.       if( newSize == 0)
  5169. !         newSize = 0x1000;
  5170.       else if( newSize > 0xF000 )
  5171.           newSize = 0xFFE0;
  5172.       else
  5173. diff --context ..\tvo/Tfillist.cpp ./TFILLIST.CPP
  5174. *** ../tvo/Tfillist.cpp    Fri Jun 17 01:00:00 1994
  5175. --- ./TFILLIST.CPP    Tue Apr 25 22:08:52 1995
  5176. ***************
  5177. *** 22,28 ****
  5178.   #define Uses_TKeys
  5179.   #include <tvision\tv.h>
  5180.   
  5181. ! #if !defined( __DIR_H )
  5182.   #include <Dir.h>
  5183.   #endif  // __DIR_H
  5184.   
  5185. --- 22,28 ----
  5186.   #define Uses_TKeys
  5187.   #include <tvision\tv.h>
  5188.   
  5189. ! #ifdef  __BORLANDC__
  5190.   #include <Dir.h>
  5191.   #endif  // __DIR_H
  5192.   
  5193. ***************
  5194. *** 55,64 ****
  5195. --- 55,70 ----
  5196.   #endif  // __STRING_H
  5197.   
  5198.   void fexpand( char * );
  5199. + #if 0
  5200. + //**    This is EXCEEDINGLY *S*T*U*P*I*D*!!!
  5201.   #ifdef __FLAT__
  5202.   extern "C" char _FAR * _CType _FARFUNC strupr(char _FAR *__s);
  5203.   #endif
  5204.   
  5205. + #endif
  5206.   
  5207.   TFileList::TFileList( const TRect& bounds,
  5208.                         TScrollBar *aScrollBar) :
  5209. ***************
  5210. *** 122,128 ****
  5211.   
  5212.   void TFileList::readDirectory( const char *dir, const char *wildCard )
  5213.   {
  5214. !     char path[MAXPATH];
  5215.       strcpy( path, dir );
  5216.       strcat( path, wildCard );
  5217.       readDirectory( path );
  5218. --- 128,134 ----
  5219.   
  5220.   void TFileList::readDirectory( const char *dir, const char *wildCard )
  5221.   {
  5222. !     char path[OS_MAXPATH];
  5223.       strcpy( path, dir );
  5224.       strcat( path, wildCard );
  5225.       readDirectory( path );
  5226. ***************
  5227. *** 145,166 ****
  5228.   void *DirSearchRec::operator new( size_t sz )
  5229.   {
  5230.       void *temp = ::operator new( sz );
  5231.       if( TVMemMgr::safetyPoolExhausted() )
  5232.           {
  5233.           delete temp;
  5234.           temp = 0;
  5235.           }
  5236.       return temp;
  5237.   }
  5238.   
  5239.   void TFileList::readDirectory( const char *aWildCard )
  5240.   {
  5241.       ffblk s;
  5242. !     char path[MAXPATH];
  5243. !     char drive[MAXDRIVE];
  5244. !     char dir[MAXDIR];
  5245. !     char file[MAXFILE];
  5246. !     char ext[MAXEXT];
  5247.       const unsigned findAttr = FA_RDONLY | FA_ARCH;
  5248.       memset(&s, 0, sizeof(s));
  5249.       strcpy( path, aWildCard );
  5250. --- 151,176 ----
  5251.   void *DirSearchRec::operator new( size_t sz )
  5252.   {
  5253.       void *temp = ::operator new( sz );
  5254. + #if !defined(_NO_MEMMGR_)
  5255.       if( TVMemMgr::safetyPoolExhausted() )
  5256.           {
  5257.           delete temp;
  5258.           temp = 0;
  5259.           }
  5260. + #endif
  5261.       return temp;
  5262.   }
  5263.   
  5264.   void TFileList::readDirectory( const char *aWildCard )
  5265.   {
  5266.       ffblk s;
  5267. !     char path[OS_MAXPATH];
  5268. !     char drive[OS_MAXDRIVE];
  5269. !     char dir[OS_MAXDIR];
  5270. !     char file[OS_MAXFILE];
  5271. !     char ext[OS_MAXEXT];
  5272.       const unsigned findAttr = FA_RDONLY | FA_ARCH;
  5273.       memset(&s, 0, sizeof(s));
  5274.       strcpy( path, aWildCard );
  5275. ***************
  5276. *** 274,284 ****
  5277.   
  5278.   void fexpand( char *rpath )
  5279.   {
  5280. !     char path[MAXPATH];
  5281. !     char drive[MAXDRIVE];
  5282. !     char dir[MAXDIR];
  5283. !     char file[MAXFILE];
  5284. !     char ext[MAXEXT];
  5285.   
  5286.       int flags = fnsplit( rpath, drive, dir, file, ext );
  5287.       if( (flags & DRIVE) == 0 )
  5288. --- 284,294 ----
  5289.   
  5290.   void fexpand( char *rpath )
  5291.   {
  5292. !     char path[OS_MAXPATH];
  5293. !     char drive[OS_MAXDRIVE];
  5294. !     char dir[OS_MAXDIR];
  5295. !     char file[OS_MAXFILE];
  5296. !     char ext[OS_MAXEXT];
  5297.   
  5298.       int flags = fnsplit( rpath, drive, dir, file, ext );
  5299.       if( (flags & DRIVE) == 0 )
  5300. ***************
  5301. *** 290,296 ****
  5302.       drive[0] = toupper(drive[0]);
  5303.       if( (flags & DIRECTORY) == 0 || (dir[0] != '\\' && dir[0] != '/') )
  5304.           {
  5305. !         char curdir[MAXDIR];
  5306.           getcurdir( drive[0] - 'A' + 1, curdir );
  5307.           strcat( curdir, dir );
  5308.           if( *curdir != '\\' && *curdir != '/' )
  5309. --- 300,306 ----
  5310.       drive[0] = toupper(drive[0]);
  5311.       if( (flags & DIRECTORY) == 0 || (dir[0] != '\\' && dir[0] != '/') )
  5312.           {
  5313. !         char curdir[OS_MAXDIR];
  5314.           getcurdir( drive[0] - 'A' + 1, curdir );
  5315.           strcat( curdir, dir );
  5316.           if( *curdir != '\\' && *curdir != '/' )
  5317. diff --context ..\tvo/Tgroup.cpp ./TGROUP.CPP
  5318. *** ../tvo/Tgroup.cpp    Fri Jun 17 01:00:00 1994
  5319. --- ./TGROUP.CPP    Tue Apr 25 22:08:52 1995
  5320. ***************
  5321. *** 20,25 ****
  5322. --- 20,26 ----
  5323.   #define Uses_ipstream
  5324.   #define Uses_TVMemMgr
  5325.   #include <tvision\tv.h>
  5326. + #include    <stdlib.h>
  5327.   
  5328.   TView *TheTopView = 0;
  5329.   TGroup* ownerGroup = 0;
  5330. ***************
  5331. *** 279,285 ****
  5332. --- 280,290 ----
  5333.   {
  5334.       if( (options & ofBuffered) != 0 && buffer != 0 )
  5335.           {
  5336. + #if defined(_NO_MEMMGR_)
  5337. +         free(buffer);
  5338. + #else
  5339.           TVMemMgr::freeDiscardable( buffer );
  5340. + #endif
  5341.           buffer = 0;
  5342.           }
  5343.   }
  5344. ***************
  5345. *** 288,294 ****
  5346.   {
  5347.       if( (state & sfExposed) != 0 )
  5348.           if( (options & ofBuffered) != 0 && (buffer == 0 ))
  5349. !             TVMemMgr::allocateDiscardable( (void *)buffer, size.x * size.y * sizeof(ushort) );
  5350.   }
  5351.   
  5352.   void TGroup::getData(void *rec)
  5353. --- 293,303 ----
  5354.   {
  5355.       if( (state & sfExposed) != 0 )
  5356.           if( (options & ofBuffered) != 0 && (buffer == 0 ))
  5357. ! #if defined(_NO_MEMMGR_)
  5358. !             buffer = (ushort *) malloc(size.x * size.y * sizeof(ushort));
  5359. ! #else
  5360. !             TVMemMgr::allocateDiscardable( (void *&)buffer, size.x * size.y * sizeof(ushort) );
  5361. ! #endif
  5362.   }
  5363.   
  5364.   void TGroup::getData(void *rec)
  5365. ***************
  5366. *** 574,579 ****
  5367. --- 583,630 ----
  5368.           h = TView::getHelpCtx();
  5369.       return h;
  5370.   }
  5371. + #ifdef  __OS2__
  5372. + /*
  5373. +  *  removeView() removes the view spec'd from the circular LL in the group. The
  5374. +  *  last ptr points to the last element inserted; because it's circular the
  5375. +  *  1st element is the next one!!
  5376. +  *  $$NI$$: This sbr contains two situations where an assert is needed.
  5377. +  */
  5378. + void TGroup::removeView(TView *p)
  5379. + {
  5380. +     TView   *curr;
  5381. +     if(last == NULL) return;            // No members in GROUP list (bad call??)
  5382. +     /**** Search the LL till we meet (p) in the next ptr of a member. ****/
  5383. +     curr= last;
  5384. +     while(curr->next != p)              // Loop till current node PTS to node to delete,
  5385. +     {
  5386. +         curr    = curr->next;           // Move to next item in list.
  5387. +         if(curr == last)                // LAST node encountered AGAIN??
  5388. +             return;                     // Exit-> Not in list!! (Bad Call)
  5389. +     }
  5390. +     /*
  5391. +      *  Remove from list. If this is the only node in the list we set last to
  5392. +      *  NULL. This IS the only node if the previous node (curr) is the same as
  5393. +      *  the node to delete (p).
  5394. +      */
  5395. +     if(p == curr)
  5396. +         last = NULL;                    // Delete-> no more nodes now!!
  5397. +     else
  5398. +     {
  5399. +         curr->next = p->next;           // Remove p from chain,
  5400. +         if(last == p) last = curr;      // If this WAS the last the new last is BEFORE it.
  5401. +     }
  5402. + }
  5403. + #endif
  5404.   
  5405.   #if !defined(NO_STREAMABLE)
  5406.   
  5407. diff --context ..\tvo/Thistory.cpp ./THISTORY.CPP
  5408. *** ../tvo/Thistory.cpp    Fri Jun 17 01:00:00 1994
  5409. --- ./THISTORY.CPP    Tue Apr 25 22:08:52 1995
  5410. ***************
  5411. *** 82,92 ****
  5412.         )
  5413.           {
  5414.           if (!link->focus())
  5415. !     {
  5416. !         clearEvent(event);
  5417. !         return;
  5418. !     }
  5419. !     recordHistory(link->data);
  5420.           r = link->getBounds();
  5421.           r.a.x--;
  5422.           r.b.x++;
  5423. --- 82,92 ----
  5424.         )
  5425.           {
  5426.           if (!link->focus())
  5427. !     {
  5428. !         clearEvent(event);
  5429. !         return;
  5430. !     }
  5431. !     recordHistory(link->data);
  5432.           r = link->getBounds();
  5433.           r.a.x--;
  5434.           r.b.x++;
  5435. ***************
  5436. *** 129,135 ****
  5437.   
  5438.   void THistory::recordHistory(const char* s)
  5439.   {
  5440. !     historyAdd(historyId, s);
  5441.   }
  5442.   
  5443.   #if !defined(NO_STREAMABLE)
  5444. --- 129,135 ----
  5445.   
  5446.   void THistory::recordHistory(const char* s)
  5447.   {
  5448. !     historyAdd(historyId, s);
  5449.   }
  5450.   
  5451.   #if !defined(NO_STREAMABLE)
  5452. diff --context ..\tvo/Thstview.cpp ./THSTVIEW.CPP
  5453. *** ../tvo/Thstview.cpp    Fri Jun 17 01:00:00 1994
  5454. --- ./THSTVIEW.CPP    Tue Apr 25 22:08:52 1995
  5455. ***************
  5456. *** 53,64 ****
  5457.   
  5458.   void THistoryViewer::getText( char *dest, short item, short maxChars )
  5459.   {
  5460. !     const char *str = historyStr( historyId, item );
  5461. !     if( str != 0 )
  5462. !         {
  5463. !         strncpy( dest, str, maxChars );
  5464. !         dest[maxChars] = '\0';
  5465. !         }
  5466.       else
  5467.           *dest = EOS;
  5468.   }
  5469. --- 53,64 ----
  5470.   
  5471.   void THistoryViewer::getText( char *dest, short item, short maxChars )
  5472.   {
  5473. !     const char *str = historyStr( historyId, item );
  5474. !     if( str != 0 )
  5475. !         {
  5476. !         strncpy( dest, str, maxChars );
  5477. !         dest[maxChars] = '\0';
  5478. !         }
  5479.       else
  5480.           *dest = EOS;
  5481.   }
  5482. diff --context ..\tvo/Tindictr.cpp ./TINDICTR.CPP
  5483. *** ../tvo/Tindictr.cpp    Fri Jun 17 01:00:00 1994
  5484. --- ./TINDICTR.CPP    Tue Apr 25 22:08:52 1995
  5485. ***************
  5486. *** 22,28 ****
  5487.   
  5488.   #if !defined( __STRSTREA_H )
  5489.   #include <strstrea.h>
  5490. ! #endif    // __STRSTREA_H
  5491.   
  5492.   #define cpIndicator "\x02\x03"
  5493.   
  5494. --- 22,28 ----
  5495.   
  5496.   #if !defined( __STRSTREA_H )
  5497.   #include <strstrea.h>
  5498. ! #endif  // __STRSTREA_H
  5499.   
  5500.   #define cpIndicator "\x02\x03"
  5501.   
  5502. diff --context ..\tvo/Tinputli.cpp ./TINPUTLI.CPP
  5503. *** ../tvo/Tinputli.cpp    Fri Jun 17 01:00:00 1994
  5504. --- ./TINPUTLI.CPP    Tue Apr 25 22:08:52 1995
  5505. ***************
  5506. *** 438,444 ****
  5507.       oldData = new char[maxLen + 1];
  5508.       is.readString(data, maxLen+1);
  5509.       state |= sfCursorVis;
  5510. !     is >> (void*)validator;
  5511.       options |= ofSelectable | ofFirstClick;
  5512.       return this;
  5513.   }
  5514. --- 438,444 ----
  5515.       oldData = new char[maxLen + 1];
  5516.       is.readString(data, maxLen+1);
  5517.       state |= sfCursorVis;
  5518. !     is >> (void* &)validator;
  5519.       options |= ofSelectable | ofFirstClick;
  5520.       return this;
  5521.   }
  5522. diff --context ..\tvo/Tkeys.h ./TKEYS.H
  5523. *** ../tvo/Tkeys.h    Fri Jun 17 01:00:00 1994
  5524. --- ./TKEYS.H    Tue Apr 25 22:08:56 1995
  5525. ***************
  5526. *** 16,24 ****
  5527.   #if !defined( __TKEYS_H )
  5528.   #define __TKEYS_H
  5529.   
  5530. - #if defined( __FLAT__ ) && !defined( __WINDOWS_H )
  5531. - #include <windows.h>
  5532. - #endif
  5533.   
  5534.   const ushort
  5535.   
  5536. --- 16,21 ----
  5537. ***************
  5538. *** 97,103 ****
  5539.   //   there for source compatibility with the 32-bit version which does
  5540.   //   support this.
  5541.   
  5542. ! #if !defined( __FLAT__ )
  5543.       kbLeftShift   = 0x0001,
  5544.       kbRightShift  = 0x0002,
  5545.       kbShift       = kbLeftShift | kbRightShift,
  5546. --- 94,100 ----
  5547.   //   there for source compatibility with the 32-bit version which does
  5548.   //   support this.
  5549.   
  5550. ! # if !defined( __FLAT__ )
  5551.       kbLeftShift   = 0x0001,
  5552.       kbRightShift  = 0x0002,
  5553.       kbShift       = kbLeftShift | kbRightShift,
  5554. ***************
  5555. *** 111,117 ****
  5556.       kbNumState    = 0x0020,
  5557.       kbCapsState   = 0x0040,
  5558.       kbInsState    = 0x0080;
  5559. ! #else
  5560.       kbLeftShift   = SHIFT_PRESSED,
  5561.       kbRightShift  = SHIFT_PRESSED,
  5562.       kbShift       = kbLeftShift | kbRightShift,
  5563. --- 108,115 ----
  5564.       kbNumState    = 0x0020,
  5565.       kbCapsState   = 0x0040,
  5566.       kbInsState    = 0x0080;
  5567. ! #elif defined(__NT__)
  5568.       kbLeftShift   = SHIFT_PRESSED,
  5569.       kbRightShift  = SHIFT_PRESSED,
  5570.       kbShift       = kbLeftShift | kbRightShift,
  5571. ***************
  5572. *** 126,131 ****
  5573.       kbCapsState   = CAPSLOCK_ON,
  5574.       kbEnhanced    = ENHANCED_KEY,
  5575.       kbInsState    = 0x200;  // Ensure this doesn't overlap above values
  5576. ! #endif
  5577.   
  5578.   #endif  // __TKEYS_H
  5579. --- 124,147 ----
  5580.       kbCapsState   = CAPSLOCK_ON,
  5581.       kbEnhanced    = ENHANCED_KEY,
  5582.       kbInsState    = 0x200;  // Ensure this doesn't overlap above values
  5583. ! # elif defined(__OS2__)
  5584. !     kbLeftShift   = KBDSTF_LEFTSHIFT,
  5585. !     kbRightShift  = KBDSTF_RIGHTSHIFT,
  5586. !     kbShift       = kbLeftShift | kbRightShift,
  5587. !     kbLeftCtrl    = KBDSTF_LEFTCONTROL,
  5588. !     kbRightCtrl   = KBDSTF_RIGHTCONTROL,
  5589. !     kbCtrlShift   = kbLeftCtrl | kbRightCtrl,
  5590. !     kbLeftAlt     = KBDSTF_LEFTALT,
  5591. !     kbRightAlt    = KBDSTF_RIGHTALT,
  5592. !     kbAltShift    = kbLeftAlt | kbRightAlt,
  5593. !     kbScrollState = KBDSTF_SCROLLLOCK_ON,
  5594. !     kbNumState    = KBDSTF_NUMLOCK_ON,
  5595. !     kbCapsState   = KBDSTF_CAPSLOCK_ON,
  5596. !     kbInsState    = KBDSTF_INSERT_ON;
  5597. ! # else
  5598. ! #   error   "Non-supported OS"
  5599. ! # endif
  5600.   
  5601.   #endif  // __TKEYS_H
  5602. diff --context ..\tvo/Tlabel.cpp ./TLABEL.CPP
  5603. *** ../tvo/Tlabel.cpp    Fri Jun 17 01:00:00 1994
  5604. --- ./TLABEL.CPP    Tue Apr 25 22:08:52 1995
  5605. ***************
  5606. *** 75,90 ****
  5607.   
  5608.   void TLabel::focusLink(TEvent& event)
  5609.   {
  5610. !     if (link && (link->options & ofSelectable))
  5611. !         link->focus();
  5612. !     clearEvent(event);
  5613.   }
  5614.   
  5615.   void TLabel::handleEvent( TEvent& event )
  5616.   {
  5617.       TStaticText::handleEvent(event);
  5618.       if( event.what == evMouseDown )
  5619. !         focusLink(event);
  5620.   
  5621.       else if( event.what == evKeyDown )
  5622.           {
  5623. --- 75,90 ----
  5624.   
  5625.   void TLabel::focusLink(TEvent& event)
  5626.   {
  5627. !     if (link && (link->options & ofSelectable))
  5628. !         link->focus();
  5629. !     clearEvent(event);
  5630.   }
  5631.   
  5632.   void TLabel::handleEvent( TEvent& event )
  5633.   {
  5634.       TStaticText::handleEvent(event);
  5635.       if( event.what == evMouseDown )
  5636. !         focusLink(event);
  5637.   
  5638.       else if( event.what == evKeyDown )
  5639.           {
  5640. ***************
  5641. *** 93,99 ****
  5642.                   ( c != 0 && owner->phase == TGroup::phPostProcess &&
  5643.                   toupper(event.keyDown.charScan.charCode) ==  c )
  5644.             )
  5645. !         focusLink(event);
  5646.           }
  5647.       else if( event.what == evBroadcast && link &&
  5648.               ( event.message.command == cmReceivedFocus ||
  5649. --- 93,99 ----
  5650.                   ( c != 0 && owner->phase == TGroup::phPostProcess &&
  5651.                   toupper(event.keyDown.charScan.charCode) ==  c )
  5652.             )
  5653. !         focusLink(event);
  5654.           }
  5655.       else if( event.what == evBroadcast && link &&
  5656.               ( event.message.command == cmReceivedFocus ||
  5657. diff --context ..\tvo/Tlistbox.cpp ./TLISTBOX.CPP
  5658. *** ../tvo/Tlistbox.cpp    Fri Jun 17 01:00:00 1994
  5659. --- ./TLISTBOX.CPP    Tue Apr 25 22:08:52 1995
  5660. ***************
  5661. *** 51,61 ****
  5662.   
  5663.   void TListBox::getText( char *dest, short item, short maxChars )
  5664.   {
  5665. !     if (items != 0 )
  5666. !         {
  5667. !         strncpy( dest, (const char *)(items->at(item)), maxChars );
  5668. !         dest[maxChars] = '\0';
  5669. !         }
  5670.       else
  5671.           *dest = EOS;
  5672.   }
  5673. --- 51,61 ----
  5674.   
  5675.   void TListBox::getText( char *dest, short item, short maxChars )
  5676.   {
  5677. !     if (items != 0 )
  5678. !         {
  5679. !         strncpy( dest, (const char *)(items->at(item)), maxChars );
  5680. !         dest[maxChars] = '\0';
  5681. !         }
  5682.       else
  5683.           *dest = EOS;
  5684.   }
  5685. diff --context ..\tvo/Tmouse.cpp ./TMOUSE.CPP
  5686. *** ../tvo/Tmouse.cpp    Fri Jun 17 01:00:00 1994
  5687. --- ./TMOUSE.CPP    Tue Apr 25 22:08:52 1995
  5688. ***************
  5689. *** 27,32 ****
  5690. --- 27,36 ----
  5691.   uchar _NEAR THWMouse::buttonCount = 0;
  5692.   Boolean _NEAR THWMouse::handlerInstalled = False;
  5693.   
  5694. + #ifdef  __FLAT__
  5695. + Boolean _NEAR THWMouse::noMouse;
  5696. + #endif
  5697.   THWMouse::THWMouse()
  5698.   {
  5699.       resume();
  5700. diff --context ..\tvo/Tobjstrm.cpp ./TOBJSTRM.CPP
  5701. *** ../tvo/Tobjstrm.cpp    Fri Jun 17 01:00:00 1994
  5702. --- ./TOBJSTRM.CPP    Tue Apr 25 22:08:52 1995
  5703. ***************
  5704. *** 73,84 ****
  5705. --- 73,96 ----
  5706.   #include <Assert.h>
  5707.   #endif  // __ASSERT_H
  5708.   
  5709. + #if !defined( __IOSTREAM_H )
  5710. + #   include <iostream.h>
  5711. + #endif
  5712.   #ifdef __FLAT__
  5713.   #define _HUGE
  5714.   #else
  5715.   #define _HUGE huge
  5716.   #endif
  5717.   
  5718. + #ifdef  __BORLANDC__
  5719. + #   define  IOS_HARDFAIL    ios::hardfail
  5720. + #else
  5721. + #   define  IOS_HARDFAIL    0
  5722. + #endif
  5723.   const uchar nullStringLen = UCHAR_MAX;
  5724.   
  5725.   TStreamableClass::TStreamableClass( const char *n, BUILDER b, int d ) :
  5726. ***************
  5727. *** 221,232 ****
  5728.   
  5729.   int pstream::fail() const
  5730.   {
  5731. !     return state & (ios::failbit | ios::badbit | ios::hardfail);
  5732.   }
  5733.   
  5734.   int pstream::bad() const
  5735.   {
  5736. !     return state & (ios::badbit | ios::hardfail);
  5737.   }
  5738.   
  5739.   int pstream::good() const
  5740. --- 233,244 ----
  5741.   
  5742.   int pstream::fail() const
  5743.   {
  5744. !     return state & (ios::failbit | ios::badbit | IOS_HARDFAIL);
  5745.   }
  5746.   
  5747.   int pstream::bad() const
  5748.   {
  5749. !     return state & (ios::badbit | IOS_HARDFAIL);
  5750.   }
  5751.   
  5752.   int pstream::good() const
  5753. ***************
  5754. *** 236,242 ****
  5755.   
  5756.   void pstream::clear( int i )
  5757.   {
  5758. !     state = (i & 0xFF) | (state & ios::hardfail);
  5759.   }
  5760.   
  5761.   void pstream::registerType( TStreamableClass *ts )
  5762. --- 248,254 ----
  5763.   
  5764.   void pstream::clear( int i )
  5765.   {
  5766. !     state = (i & 0xFF) | (state & IOS_HARDFAIL);
  5767.   }
  5768.   
  5769.   void pstream::registerType( TStreamableClass *ts )
  5770. ***************
  5771. *** 307,313 ****
  5772.       return *this;
  5773.   }
  5774.   
  5775. ! ipstream& ipstream::seekg( streamoff off, seek_dir dir )
  5776.   {
  5777.       objs.removeAll();
  5778.       bp->seekoff( off, dir );
  5779. --- 319,325 ----
  5780.       return *this;
  5781.   }
  5782.   
  5783. ! ipstream& ipstream::seekg( streamoff off, ios::seek_dir dir )
  5784.   {
  5785.       objs.removeAll();
  5786.       bp->seekoff( off, dir );
  5787. ***************
  5788. *** 543,549 ****
  5789.       return *this;
  5790.   }
  5791.   
  5792. ! opstream& opstream::seekp( streamoff pos, seek_dir dir )
  5793.   {
  5794.       objs->removeAll();
  5795.       bp->seekoff( pos, dir );
  5796. --- 555,561 ----
  5797.       return *this;
  5798.   }
  5799.   
  5800. ! opstream& opstream::seekp( streamoff pos, ios::seek_dir dir )
  5801.   {
  5802.       objs->removeAll();
  5803.       bp->seekoff( pos, dir );
  5804. diff --context ..\tvo/Tobjstrm.h ./TOBJSTRM.H
  5805. *** ../tvo/Tobjstrm.h    Fri Jun 17 01:00:00 1994
  5806. --- ./TOBJSTRM.H    Tue Apr 25 22:08:56 1995
  5807. ***************
  5808. *** 34,39 ****
  5809. --- 34,43 ----
  5810.   #define _FAR
  5811.   #endif
  5812.   
  5813. + #ifndef _TV_CDECL
  5814. + #   define  _TV_CDECL
  5815. + #endif
  5816.   #pragma option -Vo-
  5817.   #if defined( __BCOPT__ ) && !defined (__FLAT__)
  5818.   #pragma option -po-
  5819. ***************
  5820. *** 41,46 ****
  5821. --- 45,52 ----
  5822.   
  5823.   #if !defined( __fLink_def )
  5824.   #define __fLink_def
  5825. + class TStreamableClass;
  5826.   struct fLink
  5827.   {
  5828.       fLink _NEAR *f;
  5829. ***************
  5830. *** 102,110 ****
  5831.   class TStreamableClass
  5832.   {
  5833.   
  5834. !     friend TStreamableTypes;
  5835. !     friend opstream;
  5836. !     friend ipstream;
  5837.   
  5838.   public:
  5839.   
  5840. --- 108,116 ----
  5841.   class TStreamableClass
  5842.   {
  5843.   
  5844. !     friend class TStreamableTypes;
  5845. !     friend class opstream;
  5846. !     friend class ipstream;
  5847.   
  5848.   public:
  5849.   
  5850. ***************
  5851. *** 174,180 ****
  5852.   class TPWrittenObjects : public TNSSortedCollection
  5853.   {
  5854.   
  5855. !     friend opstream;
  5856.   
  5857.   public:
  5858.   
  5859. --- 180,186 ----
  5860.   class TPWrittenObjects : public TNSSortedCollection
  5861.   {
  5862.   
  5863. !     friend class opstream;
  5864.   
  5865.   public:
  5866.   
  5867. ***************
  5868. *** 206,212 ****
  5869.   class TPWObj
  5870.   {
  5871.   
  5872. !     friend TPWrittenObjects;
  5873.   
  5874.   private:
  5875.   
  5876. --- 212,218 ----
  5877.   class TPWObj
  5878.   {
  5879.   
  5880. !     friend class TPWrittenObjects;
  5881.   
  5882.   private:
  5883.   
  5884. ***************
  5885. *** 237,243 ****
  5886.   class TPReadObjects : public TNSCollection
  5887.   {
  5888.   
  5889. !     friend ipstream;
  5890.   
  5891.   public:
  5892.   
  5893. --- 243,249 ----
  5894.   class TPReadObjects : public TNSCollection
  5895.   {
  5896.   
  5897. !     friend class ipstream;
  5898.   
  5899.   public:
  5900.   
  5901. ***************
  5902. *** 282,323 ****
  5903.   class pstream
  5904.   {
  5905.   
  5906. !     friend TStreamableTypes;
  5907.   
  5908.   public:
  5909.   
  5910.       enum StreamableError { peNotRegistered, peInvalidType };
  5911.       enum PointerTypes { ptNull, ptIndexed, ptObject };
  5912.   
  5913. !     _Cdecl pstream( streambuf _FAR * );
  5914. !     virtual _Cdecl ~pstream();
  5915.   
  5916. !     int _Cdecl rdstate() const;
  5917. !     int _Cdecl eof() const;
  5918. !     int _Cdecl fail() const;
  5919. !     int _Cdecl bad() const;
  5920. !     int _Cdecl good() const;
  5921. !     void _Cdecl clear( int = 0 );
  5922. !     _Cdecl operator void *() const;
  5923. !     int _Cdecl operator ! () const;
  5924.   
  5925. !     streambuf _FAR * _Cdecl rdbuf() const;
  5926.   
  5927.       static void initTypes();
  5928.   
  5929. !     void _Cdecl error( StreamableError );
  5930. !     void _Cdecl error( StreamableError, const TStreamable& );
  5931.       static void registerType( TStreamableClass *ts );
  5932.   
  5933.   protected:
  5934.   
  5935. !     _Cdecl pstream();
  5936.   
  5937.       streambuf _FAR *bp;
  5938.       int state;
  5939.   
  5940. !     void _Cdecl init( streambuf _FAR * );
  5941. !     void _Cdecl setstate( int );
  5942.   
  5943.       static TStreamableTypes * _NEAR types;
  5944.   
  5945. --- 288,329 ----
  5946.   class pstream
  5947.   {
  5948.   
  5949. !     friend class TStreamableTypes;
  5950.   
  5951.   public:
  5952.   
  5953.       enum StreamableError { peNotRegistered, peInvalidType };
  5954.       enum PointerTypes { ptNull, ptIndexed, ptObject };
  5955.   
  5956. !     _TV_CDECL pstream( streambuf _FAR * );
  5957. !     virtual _TV_CDECL ~pstream();
  5958.   
  5959. !     int _TV_CDECL rdstate() const;
  5960. !     int _TV_CDECL eof() const;
  5961. !     int _TV_CDECL fail() const;
  5962. !     int _TV_CDECL bad() const;
  5963. !     int _TV_CDECL good() const;
  5964. !     void _TV_CDECL clear( int = 0 );
  5965. !     _TV_CDECL operator void *() const;
  5966. !     int _TV_CDECL operator ! () const;
  5967.   
  5968. !     streambuf _FAR * _TV_CDECL rdbuf() const;
  5969.   
  5970.       static void initTypes();
  5971.   
  5972. !     void _TV_CDECL error( StreamableError );
  5973. !     void _TV_CDECL error( StreamableError, const TStreamable& );
  5974.       static void registerType( TStreamableClass *ts );
  5975.   
  5976.   protected:
  5977.   
  5978. !     _TV_CDECL pstream();
  5979.   
  5980.       streambuf _FAR *bp;
  5981.       int state;
  5982.   
  5983. !     void _TV_CDECL init( streambuf _FAR * );
  5984. !     void _TV_CDECL setstate( int );
  5985.   
  5986.       static TStreamableTypes * _NEAR types;
  5987.   
  5988. ***************
  5989. *** 352,397 ****
  5990.   
  5991.   public:
  5992.   
  5993. !     _Cdecl ipstream( streambuf _FAR * );
  5994. !     _Cdecl ~ipstream();
  5995.   
  5996. !     streampos _Cdecl tellg();
  5997. !     ipstream& _Cdecl seekg( streampos );
  5998. !     ipstream& _Cdecl seekg( streamoff, ios::seek_dir );
  5999. !     uchar _Cdecl readByte();
  6000. !     void _Cdecl readBytes( void _FAR *, size_t );
  6001. !     ushort _Cdecl readWord();
  6002. !     char _FAR * _Cdecl readString();
  6003. !     char _FAR * _Cdecl readString( char _FAR *, unsigned );
  6004. !     friend ipstream& _Cdecl operator >> ( ipstream&, char& );
  6005. !     friend ipstream& _Cdecl operator >> ( ipstream&, signed char& );
  6006. !     friend ipstream& _Cdecl operator >> ( ipstream&, unsigned char& );
  6007. !     friend ipstream& _Cdecl operator >> ( ipstream&, signed short& );
  6008. !     friend ipstream& _Cdecl operator >> ( ipstream&, unsigned short& );
  6009. !     friend ipstream& _Cdecl operator >> ( ipstream&, signed int& );
  6010. !     friend ipstream& _Cdecl operator >> ( ipstream&, unsigned int& );
  6011. !     friend ipstream& _Cdecl operator >> ( ipstream&, signed long& );
  6012. !     friend ipstream& _Cdecl operator >> ( ipstream&, unsigned long& );
  6013. !     friend ipstream& _Cdecl operator >> ( ipstream&, float& );
  6014. !     friend ipstream& _Cdecl operator >> ( ipstream&, double& );
  6015. !     friend ipstream& _Cdecl operator >> ( ipstream&, long double& );
  6016.   
  6017. !     friend ipstream& _Cdecl operator >> ( ipstream&, TStreamable& );
  6018. !     friend ipstream& _Cdecl operator >> ( ipstream&, void _FAR *& );
  6019.   
  6020.   protected:
  6021.   
  6022. !     _Cdecl ipstream();
  6023.   
  6024. !     const TStreamableClass _FAR * _Cdecl readPrefix();
  6025. !     void _FAR * _Cdecl readData( const TStreamableClass _FAR *,
  6026.                                           TStreamable _FAR * );
  6027. !     void _Cdecl readSuffix();
  6028.   
  6029. !     const void _FAR * _Cdecl find( P_id_type );
  6030. !     void _Cdecl registerObject( const void _FAR *adr );
  6031.   
  6032.   private:
  6033.   
  6034. --- 358,403 ----
  6035.   
  6036.   public:
  6037.   
  6038. !     _TV_CDECL ipstream( streambuf _FAR * );
  6039. !     _TV_CDECL ~ipstream();
  6040.   
  6041. !     streampos _TV_CDECL tellg();
  6042. !     ipstream& _TV_CDECL seekg( streampos );
  6043. !     ipstream& _TV_CDECL seekg( streamoff, ios::seek_dir );
  6044. !     uchar _TV_CDECL readByte();
  6045. !     void _TV_CDECL readBytes( void _FAR *, size_t );
  6046. !     ushort _TV_CDECL readWord();
  6047. !     char _FAR * _TV_CDECL readString();
  6048. !     char _FAR * _TV_CDECL readString( char _FAR *, unsigned );
  6049. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, char& );
  6050. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, signed char& );
  6051. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, unsigned char& );
  6052. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, signed short& );
  6053. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, unsigned short& );
  6054. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, signed int& );
  6055. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, unsigned int& );
  6056. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, signed long& );
  6057. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, unsigned long& );
  6058. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, float& );
  6059. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, double& );
  6060. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, long double& );
  6061.   
  6062. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, TStreamable& );
  6063. !     friend ipstream& _TV_CDECL operator >> ( ipstream&, void _FAR *& );
  6064.   
  6065.   protected:
  6066.   
  6067. !     _TV_CDECL ipstream();
  6068.   
  6069. !     const TStreamableClass _FAR * _TV_CDECL readPrefix();
  6070. !     void _FAR * _TV_CDECL readData( const TStreamableClass _FAR *,
  6071.                                           TStreamable _FAR * );
  6072. !     void _TV_CDECL readSuffix();
  6073.   
  6074. !     const void _FAR * _TV_CDECL find( P_id_type );
  6075. !     void _TV_CDECL registerObject( const void _FAR *adr );
  6076.   
  6077.   private:
  6078.   
  6079. ***************
  6080. *** 429,473 ****
  6081.   
  6082.   public:
  6083.   
  6084. !     _Cdecl opstream( streambuf _FAR * );
  6085. !     _Cdecl ~opstream();
  6086.   
  6087. !     streampos _Cdecl tellp();
  6088. !     opstream& _Cdecl seekp( streampos );
  6089. !     opstream& _Cdecl seekp( streamoff, ios::seek_dir );
  6090. !     opstream& _Cdecl flush();
  6091. !     void _Cdecl writeByte( uchar );
  6092. !     void _Cdecl writeBytes( const void _FAR *, size_t );
  6093. !     void _Cdecl writeWord( ushort );
  6094. !     void _Cdecl writeString( const char _FAR * );
  6095. !     friend opstream& _Cdecl operator << ( opstream&, char );
  6096. !     friend opstream& _Cdecl operator << ( opstream&, signed char );
  6097. !     friend opstream& _Cdecl operator << ( opstream&, unsigned char );
  6098. !     friend opstream& _Cdecl operator << ( opstream&, signed short );
  6099. !     friend opstream& _Cdecl operator << ( opstream&, unsigned short );
  6100. !     friend opstream& _Cdecl operator << ( opstream&, signed int );
  6101. !     friend opstream& _Cdecl operator << ( opstream&, unsigned int );
  6102. !     friend opstream& _Cdecl operator << ( opstream&, signed long );
  6103. !     friend opstream& _Cdecl operator << ( opstream&, unsigned long );
  6104. !     friend opstream& _Cdecl operator << ( opstream&, float );
  6105. !     friend opstream& _Cdecl operator << ( opstream&, double );
  6106. !     friend opstream& _Cdecl operator << ( opstream&, long double );
  6107.   
  6108. !     friend opstream& _Cdecl operator << ( opstream&, TStreamable& );
  6109. !     friend opstream& _Cdecl operator << ( opstream&, TStreamable _FAR * );
  6110.   
  6111.   protected:
  6112.   
  6113. !     _Cdecl opstream();
  6114.   
  6115. !     void _Cdecl writePrefix( const TStreamable& );
  6116. !     void _Cdecl writeData( TStreamable& );
  6117. !     void _Cdecl writeSuffix( const TStreamable& );
  6118.   
  6119. !     P_id_type _Cdecl find( const void _FAR *adr );
  6120. !     void _Cdecl registerObject( const void _FAR *adr );
  6121.   
  6122.   private:
  6123.   
  6124. --- 435,479 ----
  6125.   
  6126.   public:
  6127.   
  6128. !     _TV_CDECL opstream( streambuf _FAR * );
  6129. !     _TV_CDECL ~opstream();
  6130.   
  6131. !     streampos _TV_CDECL tellp();
  6132. !     opstream& _TV_CDECL seekp( streampos );
  6133. !     opstream& _TV_CDECL seekp( streamoff, ios::seek_dir );
  6134. !     opstream& _TV_CDECL flush();
  6135. !     void _TV_CDECL writeByte( uchar );
  6136. !     void _TV_CDECL writeBytes( const void _FAR *, size_t );
  6137. !     void _TV_CDECL writeWord( ushort );
  6138. !     void _TV_CDECL writeString( const char _FAR * );
  6139. !     friend opstream& _TV_CDECL operator << ( opstream&, char );
  6140. !     friend opstream& _TV_CDECL operator << ( opstream&, signed char );
  6141. !     friend opstream& _TV_CDECL operator << ( opstream&, unsigned char );
  6142. !     friend opstream& _TV_CDECL operator << ( opstream&, signed short );
  6143. !     friend opstream& _TV_CDECL operator << ( opstream&, unsigned short );
  6144. !     friend opstream& _TV_CDECL operator << ( opstream&, signed int );
  6145. !     friend opstream& _TV_CDECL operator << ( opstream&, unsigned int );
  6146. !     friend opstream& _TV_CDECL operator << ( opstream&, signed long );
  6147. !     friend opstream& _TV_CDECL operator << ( opstream&, unsigned long );
  6148. !     friend opstream& _TV_CDECL operator << ( opstream&, float );
  6149. !     friend opstream& _TV_CDECL operator << ( opstream&, double );
  6150. !     friend opstream& _TV_CDECL operator << ( opstream&, long double );
  6151.   
  6152. !     friend opstream& _TV_CDECL operator << ( opstream&, TStreamable& );
  6153. !     friend opstream& _TV_CDECL operator << ( opstream&, TStreamable _FAR * );
  6154.   
  6155.   protected:
  6156.   
  6157. !     _TV_CDECL opstream();
  6158.   
  6159. !     void _TV_CDECL writePrefix( const TStreamable& );
  6160. !     void _TV_CDECL writeData( TStreamable& );
  6161. !     void _TV_CDECL writeSuffix( const TStreamable& );
  6162.   
  6163. !     P_id_type _TV_CDECL find( const void _FAR *adr );
  6164. !     void _TV_CDECL registerObject( const void _FAR *adr );
  6165.   
  6166.   private:
  6167.   
  6168. ***************
  6169. *** 502,513 ****
  6170.   
  6171.   public:
  6172.   
  6173. !     _Cdecl iopstream( streambuf _FAR * );
  6174. !     _Cdecl ~iopstream();
  6175.   
  6176.   protected:
  6177.   
  6178. !     _Cdecl iopstream();
  6179.   
  6180.   };
  6181.   
  6182. --- 508,519 ----
  6183.   
  6184.   public:
  6185.   
  6186. !     _TV_CDECL iopstream( streambuf _FAR * );
  6187. !     _TV_CDECL ~iopstream();
  6188.   
  6189.   protected:
  6190.   
  6191. !     _TV_CDECL iopstream();
  6192.   
  6193.   };
  6194.   
  6195. ***************
  6196. *** 538,554 ****
  6197.   
  6198.   public:
  6199.   
  6200. !     _Cdecl fpbase();
  6201. !     _Cdecl fpbase( const char _FAR *, int, int = filebuf::openprot );
  6202. !     _Cdecl fpbase( int );
  6203. !     _Cdecl fpbase( int, char _FAR *, int );
  6204. !     _Cdecl ~fpbase();
  6205. !     void _Cdecl open( const char _FAR *, int, int = filebuf::openprot );
  6206. !     void _Cdecl attach( int );
  6207. !     void _Cdecl close();
  6208. !     void _Cdecl setbuf( char _FAR *, int );
  6209. !     filebuf _FAR * _Cdecl rdbuf();
  6210.   
  6211.   private:
  6212.   
  6213. --- 544,560 ----
  6214.   
  6215.   public:
  6216.   
  6217. !     _TV_CDECL fpbase();
  6218. !     _TV_CDECL fpbase( const char _FAR *, int, int = filebuf::openprot );
  6219. !     _TV_CDECL fpbase( int );
  6220. !     _TV_CDECL fpbase( int, char _FAR *, int );
  6221. !     _TV_CDECL ~fpbase();
  6222. !     void _TV_CDECL open( const char _FAR *, int, int = filebuf::openprot );
  6223. !     void _TV_CDECL attach( int );
  6224. !     void _TV_CDECL close();
  6225. !     void _TV_CDECL setbuf( char _FAR *, int );
  6226. !     filebuf _FAR * _TV_CDECL rdbuf();
  6227.   
  6228.   private:
  6229.   
  6230. ***************
  6231. *** 583,599 ****
  6232.   
  6233.   public:
  6234.   
  6235. !     _Cdecl ifpstream();
  6236. !     _Cdecl ifpstream( const char _FAR *,
  6237.                         int = ios::in,
  6238.                         int = filebuf::openprot
  6239.                       );
  6240. !     _Cdecl ifpstream( int );
  6241. !     _Cdecl ifpstream( int, char _FAR *, int );
  6242. !     _Cdecl ~ifpstream();
  6243.   
  6244. !     filebuf _FAR * _Cdecl rdbuf();
  6245. !     void _Cdecl open( const char _FAR *,
  6246.                         int = ios::in,
  6247.                         int = filebuf::openprot
  6248.                       );
  6249. --- 589,605 ----
  6250.   
  6251.   public:
  6252.   
  6253. !     _TV_CDECL ifpstream();
  6254. !     _TV_CDECL ifpstream( const char _FAR *,
  6255.                         int = ios::in,
  6256.                         int = filebuf::openprot
  6257.                       );
  6258. !     _TV_CDECL ifpstream( int );
  6259. !     _TV_CDECL ifpstream( int, char _FAR *, int );
  6260. !     _TV_CDECL ~ifpstream();
  6261.   
  6262. !     filebuf _FAR * _TV_CDECL rdbuf();
  6263. !     void _TV_CDECL open( const char _FAR *,
  6264.                         int = ios::in,
  6265.                         int = filebuf::openprot
  6266.                       );
  6267. ***************
  6268. *** 628,644 ****
  6269.   
  6270.   public:
  6271.   
  6272. !     _Cdecl ofpstream();
  6273. !     _Cdecl ofpstream( const char _FAR *,
  6274.                         int = ios::out,
  6275.                         int = filebuf::openprot
  6276.                       );
  6277. !     _Cdecl ofpstream( int );
  6278. !     _Cdecl ofpstream( int, char _FAR *, int );
  6279. !     _Cdecl ~ofpstream();
  6280.   
  6281. !     filebuf _FAR * _Cdecl rdbuf();
  6282. !     void _Cdecl open( const char _FAR *,
  6283.                         int = ios::out,
  6284.                         int = filebuf::openprot
  6285.                       );
  6286. --- 634,650 ----
  6287.   
  6288.   public:
  6289.   
  6290. !     _TV_CDECL ofpstream();
  6291. !     _TV_CDECL ofpstream( const char _FAR *,
  6292.                         int = ios::out,
  6293.                         int = filebuf::openprot
  6294.                       );
  6295. !     _TV_CDECL ofpstream( int );
  6296. !     _TV_CDECL ofpstream( int, char _FAR *, int );
  6297. !     _TV_CDECL ~ofpstream();
  6298.   
  6299. !     filebuf _FAR * _TV_CDECL rdbuf();
  6300. !     void _TV_CDECL open( const char _FAR *,
  6301.                         int = ios::out,
  6302.                         int = filebuf::openprot
  6303.                       );
  6304. ***************
  6305. *** 673,686 ****
  6306.   
  6307.   public:
  6308.   
  6309. !     _Cdecl fpstream();
  6310. !     _Cdecl fpstream( const char _FAR *, int, int = filebuf::openprot );
  6311. !     _Cdecl fpstream( int );
  6312. !     _Cdecl fpstream( int, char _FAR *, int );
  6313. !     _Cdecl ~fpstream();
  6314.   
  6315. !     filebuf _FAR * _Cdecl rdbuf();
  6316. !     void _Cdecl open( const char _FAR *, int, int = filebuf::openprot );
  6317.   
  6318.   };
  6319.   
  6320. --- 679,692 ----
  6321.   
  6322.   public:
  6323.   
  6324. !     _TV_CDECL fpstream();
  6325. !     _TV_CDECL fpstream( const char _FAR *, int, int = filebuf::openprot );
  6326. !     _TV_CDECL fpstream( int );
  6327. !     _TV_CDECL fpstream( int, char _FAR *, int );
  6328. !     _TV_CDECL ~fpstream();
  6329.   
  6330. !     filebuf _FAR * _TV_CDECL rdbuf();
  6331. !     void _TV_CDECL open( const char _FAR *, int, int = filebuf::openprot );
  6332.   
  6333.   };
  6334.   
  6335. diff --context ..\tvo/Tparamte.cpp ./TPARAMTE.CPP
  6336. *** ../tvo/Tparamte.cpp    Fri Jun 17 01:00:00 1994
  6337. --- ./TPARAMTE.CPP    Tue Apr 25 22:08:54 1995
  6338. ***************
  6339. *** 52,67 ****
  6340. --- 52,98 ----
  6341.       return (str != 0) ? strlen( str ) : 0;
  6342.   }
  6343.   
  6344. + #if 0
  6345. + void TParamText::setText( char *fmt, ... )
  6346. + {
  6347. +     va_list ap;
  6348. +     va_start( ap, fmt );
  6349. +     vsprintf( str, fmt, ap );
  6350. +     va_end( ap );
  6351. +     drawView();
  6352. + }
  6353. + #else
  6354.   void TParamText::setText( char *fmt, ... )
  6355.   {
  6356.       va_list ap;
  6357.   
  6358.       va_start( ap, fmt );
  6359. +     setArgText(fmt, ap);
  6360. +     va_end(ap);
  6361.       vsprintf( str, fmt, ap );
  6362.       va_end( ap );
  6363.   
  6364.       drawView();
  6365.   }
  6366. + void TParamText::setArgText(char* fmt, va_list args)
  6367. + {
  6368. +     vsprintf(str, fmt, args);
  6369. +     drawView();
  6370. + }
  6371. + #endif
  6372.   
  6373.   #if !defined(NO_STREAMABLE)
  6374.   
  6375. diff --context ..\tvo/Tprogram.cpp ./TPROGRAM.CPP
  6376. *** ../tvo/Tprogram.cpp    Fri Jun 17 01:00:00 1994
  6377. --- ./TPROGRAM.CPP    Tue Apr 25 22:08:54 1995
  6378. ***************
  6379. *** 59,65 ****
  6380. --- 59,69 ----
  6381.       application = this;
  6382.       initScreen();
  6383.       state = sfVisible | sfSelected | sfFocused | sfModal | sfExposed;
  6384. + #ifdef  __OS2__
  6385. +     options = ofPhysical;
  6386. + #else
  6387.       options = 0;
  6388. + #endif
  6389.       buffer = TScreen::screenBuffer;
  6390.   
  6391.       if( createDeskTop != 0 &&
  6392. ***************
  6393. *** 313,317 ****
  6394. --- 317,322 ----
  6395.       return p;
  6396.   }
  6397.   
  6398. + #pragma dump_object_model   TProgram;
  6399.   
  6400.   
  6401. diff --context ..\tvo/Tresfile.cpp ./TRESFILE.CPP
  6402. *** ../tvo/Tresfile.cpp    Fri Jun 17 01:00:00 1994
  6403. --- ./TRESFILE.CPP    Tue Apr 25 22:08:54 1995
  6404. ***************
  6405. *** 119,125 ****
  6406.   
  6407.   void TResourceFile::remove( const char *key )
  6408.   {
  6409. !     int i;
  6410.   
  6411.       if (index->search( (char *)key, i))
  6412.           {
  6413. --- 119,126 ----
  6414.   
  6415.   void TResourceFile::remove( const char *key )
  6416.   {
  6417. ! //    int i;
  6418. !     ccIndex i;
  6419.   
  6420.       if (index->search( (char *)key, i))
  6421.           {
  6422. ***************
  6423. *** 148,154 ****
  6424.   
  6425.   void *TResourceFile::get( const char *key)
  6426.   {
  6427. !     int i;
  6428.       void *p;
  6429.   
  6430.       if (! index->search((char *)key, i))
  6431. --- 149,155 ----
  6432.   
  6433.   void *TResourceFile::get( const char *key)
  6434.   {
  6435. !     ccIndex i;
  6436.       void *p;
  6437.   
  6438.       if (! index->search((char *)key, i))
  6439. ***************
  6440. *** 165,171 ****
  6441.   
  6442.   void TResourceFile::put(TStreamable *item, const char *key)
  6443.   {
  6444. !     int i;
  6445.       TResourceItem  *p;
  6446.   
  6447.       if (index->search( (char *)key, i))
  6448. --- 166,172 ----
  6449.   
  6450.   void TResourceFile::put(TStreamable *item, const char *key)
  6451.   {
  6452. !     ccIndex i;
  6453.       TResourceItem  *p;
  6454.   
  6455.       if (index->search( (char *)key, i))
  6456. ***************
  6457. *** 187,218 ****
  6458.   
  6459.   void copyStream( fpstream* dest, fpstream* src, long n)
  6460.   {
  6461. !     const xferSize=256;
  6462.   
  6463. !     char *xferBuf = new char[xferSize];
  6464. !     size_t thisMove;
  6465.   
  6466. !     while (n > 0)
  6467. !     {
  6468. !         if (n > xferSize)
  6469. !             thisMove = xferSize;
  6470. !         else
  6471. !             thisMove = (int)n;
  6472. !         src->readBytes(xferBuf, thisMove);
  6473. !         dest->writeBytes(xferBuf, thisMove);
  6474. !         n -= thisMove;
  6475. !     }
  6476.   
  6477. !     delete xferBuf;
  6478.   }
  6479.   
  6480.   struct SwitchInfo
  6481.   {
  6482. !     fpstream* sourceStream;
  6483. !     fpstream* destStream;
  6484. !     long oldBasePos;
  6485. !     long newBasePos;
  6486.   };
  6487.   
  6488.   void doCopyResource(void* item, void* arg)
  6489. --- 188,219 ----
  6490.   
  6491.   void copyStream( fpstream* dest, fpstream* src, long n)
  6492.   {
  6493. !     const xferSize=256;
  6494.   
  6495. !     char *xferBuf = new char[xferSize];
  6496. !     size_t thisMove;
  6497.   
  6498. !     while (n > 0)
  6499. !     {
  6500. !         if (n > xferSize)
  6501. !             thisMove = xferSize;
  6502. !         else
  6503. !             thisMove = (int)n;
  6504. !         src->readBytes(xferBuf, thisMove);
  6505. !         dest->writeBytes(xferBuf, thisMove);
  6506. !         n -= thisMove;
  6507. !     }
  6508.   
  6509. !     delete xferBuf;
  6510.   }
  6511.   
  6512.   struct SwitchInfo
  6513.   {
  6514. !     fpstream* sourceStream;
  6515. !     fpstream* destStream;
  6516. !     long oldBasePos;
  6517. !     long newBasePos;
  6518.   };
  6519.   
  6520.   void doCopyResource(void* item, void* arg)
  6521. ***************
  6522. *** 234,241 ****
  6523.   
  6524.     if (pack)
  6525.     {
  6526. !        args.sourceStream = stream;
  6527. !      args.destStream = aStream;
  6528.       aStream->seekp( args.newBasePos + sizeof(long)*3);
  6529.       index->forEach(doCopyResource, &args);
  6530.       indexPos = aStream->tellp() - args.newBasePos;
  6531. --- 235,242 ----
  6532.   
  6533.     if (pack)
  6534.     {
  6535. !      args.sourceStream = stream;
  6536. !      args.destStream = aStream;
  6537.       aStream->seekp( args.newBasePos + sizeof(long)*3);
  6538.       index->forEach(doCopyResource, &args);
  6539.       indexPos = aStream->tellp() - args.newBasePos;
  6540. ***************
  6541. *** 243,249 ****
  6542.     else
  6543.     {
  6544.       stream->seekg(basePos);
  6545. !      copyStream(aStream, stream, indexPos);
  6546.     }
  6547.   
  6548.     modified = True;
  6549. --- 244,250 ----
  6550.     else
  6551.     {
  6552.       stream->seekg(basePos);
  6553. !      copyStream(aStream, stream, indexPos);
  6554.     }
  6555.   
  6556.     modified = True;
  6557. diff --context ..\tvo/Tscreen.cpp ./TSCREEN.CPP
  6558. *** ../tvo/Tscreen.cpp    Fri Jun 17 01:00:00 1994
  6559. --- ./TSCREEN.CPP    Tue Apr 25 22:08:54 1995
  6560. ***************
  6561. *** 222,231 ****
  6562.       startupMode = getCrtMode();
  6563.       startupCursor = getCursorType();
  6564.   
  6565. ! #if defined(__FLAT__)
  6566.       screenBuffer = THardwareInfo::allocateScreenBuffer();
  6567.   #endif
  6568.       setCrtData();
  6569.   }
  6570.   
  6571. --- 222,230 ----
  6572.       startupMode = getCrtMode();
  6573.       startupCursor = getCursorType();
  6574.   
  6575. ! #if defined(__FLAT__) && defined(__NT__)
  6576.       screenBuffer = THardwareInfo::allocateScreenBuffer();
  6577.   #endif
  6578.       setCrtData();
  6579.   }
  6580.   
  6581. ***************
  6582. *** 241,247 ****
  6583.   TScreen::~TScreen()
  6584.   {
  6585.       suspend();
  6586. ! #if defined( __FLAT__ )
  6587.       THardwareInfo::freeScreenBuffer( screenBuffer );
  6588.   #endif
  6589.   }
  6590. --- 240,246 ----
  6591.   TScreen::~TScreen()
  6592.   {
  6593.       suspend();
  6594. ! #if defined( __FLAT__ ) && defined(__NT__)
  6595.       THardwareInfo::freeScreenBuffer( screenBuffer );
  6596.   #endif
  6597.   }
  6598. ***************
  6599. *** 268,277 ****
  6600. --- 267,283 ----
  6601.       if( (mode & 0xFF) == smMono )       // Strip smFont8x8 if necessary.
  6602.           return smMono;
  6603.   
  6604. +     uchar v = uchar(mode);
  6605. +     if(v != smCO80 && v != smBW80)
  6606. +         mode = (mode & 0xff00) | smCO80;
  6607. +     return mode;
  6608. + #if 0                                   // JAL: Idiots!
  6609.       _AX = mode;
  6610.       if( _AL != smCO80 && _AL != smBW80 )
  6611.           _AL = smCO80;
  6612.       return _AX;
  6613. + #endif
  6614.   }
  6615.   
  6616.   void TScreen::setCrtData()
  6617. diff --context ..\tvo/Tstrlist.cpp ./TSTRLIST.CPP
  6618. *** ../tvo/Tstrlist.cpp    Fri Jun 17 01:00:00 1994
  6619. --- ./TSTRLIST.CPP    Tue Apr 25 22:08:54 1995
  6620. ***************
  6621. *** 49,55 ****
  6622.   TStrListMaker::~TStrListMaker()
  6623.   {
  6624.       delete strings;
  6625. !     delete [indexSize] index;
  6626.   }
  6627.   
  6628.   #pragma warn .dsz
  6629. --- 49,55 ----
  6630.   TStrListMaker::~TStrListMaker()
  6631.   {
  6632.       delete strings;
  6633. !     delete [] index;
  6634.   }
  6635.   
  6636.   #pragma warn .dsz
  6637. ***************
  6638. *** 93,99 ****
  6639.   
  6640.   TStringList::~TStringList()
  6641.   {
  6642. !     delete [indexSize] index;
  6643.   }
  6644.   
  6645.   #pragma warn .dsz
  6646. --- 93,99 ----
  6647.   
  6648.   TStringList::~TStringList()
  6649.   {
  6650. !     delete [] index;
  6651.   }
  6652.   
  6653.   #pragma warn .dsz
  6654. diff --context ..\tvo/Ttprvlns.asm ./Ttprvlns.asm
  6655. *** ../tvo/Ttprvlns.asm    Fri Jun 17 01:00:00 1994
  6656. --- ./Ttprvlns.asm    Wed Apr 19 11:46:24 1995
  6657. ***************
  6658. *** 1,156 ****
  6659.   ;/*------------------------------------------------------------*/
  6660. ! ;/* filename -       ttprvlns.asm                              */
  6661. ! ;/*                                                            */
  6662. ! ;/* function(s)                                                */
  6663. ! ;/*                  TTerminal prevLines member function       */
  6664.   ;/*------------------------------------------------------------*/
  6665.   
  6666.   ;
  6667. ! ;       Turbo Vision - Version 2.0
  6668. ! ; 
  6669. ! ;       Copyright (c) 1994 by Borland International
  6670. ! ;       All Rights Reserved.
  6671. ! ; 
  6672.   
  6673. !     PUBLIC  @TTerminal@prevLines$qusus
  6674. !     INCLUDE TV.INC
  6675.   
  6676. !     CODESEG
  6677.   
  6678. ! DecDI    PROC
  6679.   ifndef __FLAT__
  6680. !         CMP     DI,WORD PTR [SI+TTerminalBuffer]
  6681. !         JA      short @@1
  6682. !         ADD     DI,WORD PTR [SI+TTerminalBufSize]
  6683. ! @@1:    DEC     DI
  6684.   else
  6685. !         CMP     EDI,[ESI+TTerminalBuffer]
  6686. !         JA      short @@1
  6687. !         ADD     EDI,[ESI+TTerminalBufSize]
  6688. ! @@1:    DEC     EDI
  6689.   endif
  6690. !         RET
  6691.   ENDP
  6692.   
  6693.   
  6694. ! IncDI    PROC
  6695.   ifndef __FLAT__
  6696. !         INC     DI
  6697. !         MOV     AX,WORD PTR [SI+TTerminalBuffer]
  6698. !         ADD     AX,[SI+TTerminalBufSize]
  6699. !         CMP     DI,AX
  6700. !         JB      short @@1
  6701. !         MOV     DI,WORD PTR [SI+TTerminalBuffer]
  6702.   @@1:
  6703. !         RET
  6704.   else
  6705. !         INC     EDI
  6706. !         MOV     EAX,[ESI+TTerminalBuffer]
  6707. !         ADD     EAX,[ESI+TTerminalBufSize]
  6708. !         CMP     EDI,EAX
  6709. !         JB      short @@1
  6710. !         MOV     EDI,[ESI+TTerminalBuffer]
  6711.   @@1:
  6712. !         RET
  6713.   endif
  6714.   ENDP
  6715.   
  6716.   
  6717.   @TTerminal@prevLines$qusus PROC
  6718. !         ARG     thisPtr :PTR, Pos : WORD, Lines : WORD
  6719. ! LineSeparator   EQU 10
  6720.   
  6721.   ifndef __FLAT__
  6722. !         USES    DS,SI,DI
  6723.   
  6724. !         LDS     SI,[thisPtr]
  6725. !         LES     DI,[SI+TTerminalBuffer]
  6726. !         ADD     DI,[Pos]
  6727. ! @@1:    MOV     CX,[Lines]
  6728. !         JCXZ    @@6
  6729. !         MOV     AX,[SI+TTerminalQueBack]
  6730. !         ADD     AX,WORD PTR [SI+TTerminalBuffer]
  6731. !         CMP     DI,AX
  6732. !         JE      @@7
  6733. !         CALL    DecDI
  6734. ! @@2:    MOV     AX,[SI+TTerminalQueBack]
  6735. !         ADD     AX,WORD PTR [SI+TTerminalBuffer]
  6736. !         CMP     DI,AX
  6737. !         JA      @@3
  6738. !         MOV     CX,DI
  6739. !         SUB     CX,WORD PTR [SI+TTerminalBuffer]
  6740. !         JMP     @@4
  6741. ! @@3:    MOV     CX,DI
  6742. !         SUB     CX,AX
  6743. ! @@4:    MOV     AL,LineSeparator
  6744. !         INC     CX
  6745. !         STD
  6746. !         REPNE   SCASB
  6747. !         JE      @@5
  6748. !         MOV     AX,DI
  6749. !         SUB     AX,WORD PTR [SI+TTerminalBuffer]
  6750. !         INC     AX
  6751. !         CMP     AX,[SI+TTerminalQueBack]
  6752. !         JE      @@8
  6753. !         MOV     DI,WORD PTR [SI+TTerminalBuffer]
  6754. !         ADD     DI,WORD PTR [SI+TTerminalBufSize]
  6755. !         DEC     DI
  6756. !         JMP     @@2
  6757. ! @@5:    DEC     [Lines]
  6758. !         JNZ     @@2
  6759. ! @@6:    CALL    IncDI
  6760. !         CALL    IncDI
  6761. !         MOV     AX,DI
  6762. ! @@7:    SUB     AX,WORD PTR [SI+TTerminalBuffer]
  6763.   @@8:
  6764. !         CLD
  6765. !         RET
  6766.   else
  6767. !         USES    ESI,EDI
  6768.   
  6769. !         MOV     ESI, DWORD PTR [thisPtr]
  6770. !         MOV     EDI,[ESI+TTerminalBuffer]
  6771. !         ADD     DI,[Pos]
  6772. ! @@1:    XOR     ECX,ECX
  6773. !         MOV     CX,[Lines]
  6774. !         JECXZ   short @@6
  6775. !         MOV     EAX,[ESI+TTerminalQueBack]
  6776. !         ADD     EAX,[ESI+TTerminalBuffer]
  6777. !         CMP     EDI,EAX
  6778. !         JE      short @@7
  6779. !         CALL    DecDI
  6780. ! @@2:    MOV     EAX,[ESI+TTerminalQueBack]
  6781. !         ADD     EAX,[ESI+TTerminalBuffer]
  6782. !         CMP     EDI,EAX
  6783. !         JA      short @@3
  6784. !         MOV     ECX,EDI
  6785. !         SUB     ECX,[ESI+TTerminalBuffer]
  6786. !         JMP     short @@4
  6787. ! @@3:    MOV     ECX,EDI
  6788. !         SUB     ECX,EAX
  6789. ! @@4:    MOV     AL,LineSeparator
  6790. !         INC     ECX
  6791. !         STD
  6792. !         REPNE   SCASB
  6793. !         JE      short @@5
  6794. !         MOV     EAX,EDI
  6795. !         SUB     EAX,[ESI+TTerminalBuffer]
  6796. !         INC     EAX
  6797. !         CMP     EAX,[ESI+TTerminalQueBack]
  6798. !         JE      @@8
  6799. !         MOV     EDI,[ESI+TTerminalBuffer]
  6800. !         ADD     EDI,[ESI+TTerminalBufSize]
  6801. !         DEC     EDI
  6802. !         JMP     @@2
  6803. ! @@5:    DEC     [Lines]
  6804. !         JNZ     @@2
  6805. ! @@6:    CALL    IncDI
  6806. !         CALL    IncDI
  6807. !         MOV     EAX,EDI
  6808. ! @@7:    SUB     EAX,[ESI+TTerminalBuffer]
  6809.   @@8:
  6810. !         CLD
  6811. !         RET
  6812.   endif
  6813. !         ENDP
  6814. !         END
  6815. --- 1,164 ----
  6816.   ;/*------------------------------------------------------------*/
  6817. ! ;/* filename -         ttprvlns.asm                               */
  6818. ! ;/*                                                            */
  6819. ! ;/* function(s)                                                */
  6820. ! ;/*                  TTerminal prevLines member function       */
  6821.   ;/*------------------------------------------------------------*/
  6822.   
  6823.   ;
  6824. ! ;        Turbo Vision - Version 2.0
  6825. ! ;
  6826. ! ;        Copyright (c) 1994 by Borland International
  6827. ! ;        All Rights Reserved.
  6828. ! ;
  6829.   
  6830. ! IFNDEF     __FLAT__
  6831. !     PUBLIC    @TTerminal@prevLines$qusus
  6832. ! ELSE
  6833. !     PUBLIC    _asmPrevLines
  6834. ! ENDIF
  6835. !     INCLUDE TV.INC
  6836.   
  6837. !     CODESEG
  6838.   
  6839. ! DecDI     PROC
  6840.   ifndef __FLAT__
  6841. !         CMP     DI,WORD PTR [SI+TTerminalBuffer]
  6842. !         JA        short @@1
  6843. !         ADD     DI,WORD PTR [SI+TTerminalBufSize]
  6844. ! @@1:    DEC     DI
  6845.   else
  6846. !         CMP     EDI,[ESI+TTerminalBuffer]
  6847. !         JA        short @@1
  6848. !         ADD     EDI,[ESI+TTerminalBufSize]
  6849. ! @@1:    DEC     EDI
  6850.   endif
  6851. !         RET
  6852.   ENDP
  6853.   
  6854.   
  6855. ! IncDI     PROC
  6856.   ifndef __FLAT__
  6857. !         INC     DI
  6858. !         MOV     AX,WORD PTR [SI+TTerminalBuffer]
  6859. !         ADD     AX,[SI+TTerminalBufSize]
  6860. !         CMP     DI,AX
  6861. !         JB        short @@1
  6862. !         MOV     DI,WORD PTR [SI+TTerminalBuffer]
  6863.   @@1:
  6864. !         RET
  6865.   else
  6866. !         INC     EDI
  6867. !         MOV     EAX,[ESI+TTerminalBuffer]
  6868. !         ADD     EAX,[ESI+TTerminalBufSize]
  6869. !         CMP     EDI,EAX
  6870. !         JB        short @@1
  6871. !         MOV     EDI,[ESI+TTerminalBuffer]
  6872.   @@1:
  6873. !         RET
  6874.   endif
  6875.   ENDP
  6876.   
  6877.   
  6878. + IFDEF    __FLAT__
  6879. + _asmPrevLines    PROC
  6880. + ELSE
  6881.   @TTerminal@prevLines$qusus PROC
  6882. ! ENDIF
  6883. !         ARG     thisPtr :PTR, Pos : WORD, Lines : WORD
  6884. ! LineSeparator    EQU 10
  6885.   
  6886.   ifndef __FLAT__
  6887. !         USES    DS,SI,DI
  6888.   
  6889. !         LDS     SI,[thisPtr]
  6890. !         LES     DI,[SI+TTerminalBuffer]
  6891. !         ADD     DI,[Pos]
  6892. ! @@1:    MOV     CX,[Lines]
  6893. !         JCXZ    @@6
  6894. !         MOV     AX,[SI+TTerminalQueBack]
  6895. !         ADD     AX,WORD PTR [SI+TTerminalBuffer]
  6896. !         CMP     DI,AX
  6897. !         JE        @@7
  6898. !         CALL    DecDI
  6899. ! @@2:    MOV     AX,[SI+TTerminalQueBack]
  6900. !         ADD     AX,WORD PTR [SI+TTerminalBuffer]
  6901. !         CMP     DI,AX
  6902. !         JA        @@3
  6903. !         MOV     CX,DI
  6904. !         SUB     CX,WORD PTR [SI+TTerminalBuffer]
  6905. !         JMP     @@4
  6906. ! @@3:    MOV     CX,DI
  6907. !         SUB     CX,AX
  6908. ! @@4:    MOV     AL,LineSeparator
  6909. !         INC     CX
  6910. !         STD
  6911. !         REPNE    SCASB
  6912. !         JE        @@5
  6913. !         MOV     AX,DI
  6914. !         SUB     AX,WORD PTR [SI+TTerminalBuffer]
  6915. !         INC     AX
  6916. !         CMP     AX,[SI+TTerminalQueBack]
  6917. !         JE        @@8
  6918. !         MOV     DI,WORD PTR [SI+TTerminalBuffer]
  6919. !         ADD     DI,WORD PTR [SI+TTerminalBufSize]
  6920. !         DEC     DI
  6921. !         JMP     @@2
  6922. ! @@5:    DEC     [Lines]
  6923. !         JNZ     @@2
  6924. ! @@6:    CALL    IncDI
  6925. !         CALL    IncDI
  6926. !         MOV     AX,DI
  6927. ! @@7:    SUB     AX,WORD PTR [SI+TTerminalBuffer]
  6928.   @@8:
  6929. !         CLD
  6930. !         RET
  6931.   else
  6932. !         USES    ESI,EDI
  6933.   
  6934. !         MOV     ESI, DWORD PTR [thisPtr]
  6935. !         MOV     EDI,[ESI+TTerminalBuffer]
  6936. !         ADD     DI,[Pos]
  6937. ! @@1:    XOR     ECX,ECX
  6938. !         MOV     CX,[Lines]
  6939. !         JECXZ    short @@6
  6940. !         MOV     EAX,[ESI+TTerminalQueBack]
  6941. !         ADD     EAX,[ESI+TTerminalBuffer]
  6942. !         CMP     EDI,EAX
  6943. !         JE        short @@7
  6944. !         CALL    DecDI
  6945. ! @@2:    MOV     EAX,[ESI+TTerminalQueBack]
  6946. !         ADD     EAX,[ESI+TTerminalBuffer]
  6947. !         CMP     EDI,EAX
  6948. !         JA        short @@3
  6949. !         MOV     ECX,EDI
  6950. !         SUB     ECX,[ESI+TTerminalBuffer]
  6951. !         JMP     short @@4
  6952. ! @@3:    MOV     ECX,EDI
  6953. !         SUB     ECX,EAX
  6954. ! @@4:    MOV     AL,LineSeparator
  6955. !         INC     ECX
  6956. !         STD
  6957. !         REPNE    SCASB
  6958. !         JE        short @@5
  6959. !         MOV     EAX,EDI
  6960. !         SUB     EAX,[ESI+TTerminalBuffer]
  6961. !         INC     EAX
  6962. !         CMP     EAX,[ESI+TTerminalQueBack]
  6963. !         JE        @@8
  6964. !         MOV     EDI,[ESI+TTerminalBuffer]
  6965. !         ADD     EDI,[ESI+TTerminalBufSize]
  6966. !         DEC     EDI
  6967. !         JMP     @@2
  6968. ! @@5:    DEC     [Lines]
  6969. !         JNZ     @@2
  6970. ! @@6:    CALL    IncDI
  6971. !         CALL    IncDI
  6972. !         MOV     EAX,EDI
  6973. ! @@7:    SUB     EAX,[ESI+TTerminalBuffer]
  6974.   @@8:
  6975. !         CLD
  6976. !         RET
  6977.   endif
  6978. !         ENDP
  6979. !         END
  6980. diff --context ..\tvo/Ttypes.h ./TTYPES.H
  6981. *** ../tvo/Ttypes.h    Fri Jun 17 01:00:00 1994
  6982. --- ./TTYPES.H    Tue Apr 25 22:08:56 1995
  6983. ***************
  6984. *** 20,35 ****
  6985.   #define _NEAR near
  6986.   #endif
  6987.   
  6988. ! #include <_defs.h>
  6989.   
  6990.   #define I   asm
  6991.   
  6992. ! enum Boolean { False, True };
  6993.   
  6994. - typedef unsigned short ushort;
  6995. - typedef unsigned char uchar;
  6996. - typedef unsigned int uint;
  6997. - typedef unsigned long ulong;
  6998.   
  6999.   const char EOS = '\0';
  7000.   
  7001. --- 20,44 ----
  7002.   #define _NEAR near
  7003.   #endif
  7004.   
  7005. ! #include <tvision/_defs.h>
  7006.   
  7007.   #define I   asm
  7008.   
  7009. ! #ifndef __boolean_defined
  7010. ! #   define __boolean_defined
  7011. !     enum Boolean { False, True };
  7012. ! #endif
  7013. ! #ifndef __ltypes_defined
  7014. ! #   define __ltypes_defined
  7015. !     typedef unsigned short  ushort;
  7016. !     typedef unsigned short  uword;
  7017. !     typedef unsigned char   uchar;
  7018. !     typedef unsigned char   ubyte;
  7019. !     typedef unsigned int    uint;
  7020. !     typedef unsigned long   ulong;
  7021. ! #endif
  7022.   
  7023.   
  7024.   const char EOS = '\0';
  7025.   
  7026. ***************
  7027. *** 40,46 ****
  7028. --- 49,61 ----
  7029.   class _FAR TStreamable;
  7030.   class _FAR TStreamableTypes;
  7031.   
  7032. + #ifdef __ORIGINAL__
  7033.   typedef int ccIndex;
  7034. + #else
  7035. + typedef short   ccIndex;
  7036. + #endif
  7037.   typedef Boolean (*ccTestFunc)( void *, void * );
  7038.   typedef void (*ccAppFunc)( void *, void * );
  7039.   
  7040. diff --context ..\tvo/Tv.h ./TV.H
  7041. *** ../tvo/Tv.h    Fri Jun 17 01:00:00 1994
  7042. --- ./TV.H    Tue Apr 25 22:08:56 1995
  7043. ***************
  7044. *** 32,37 ****
  7045. --- 32,50 ----
  7046.   #endif
  7047.   #endif
  7048.   
  7049. + //** Compiler portability..
  7050. + #ifdef __OS2__
  7051. + # if ! defined(__cpl_compiler_h)
  7052. + #   include <cpl/compiler.h>
  7053. + # endif
  7054. + # if ! defined(__cpl_osdefs_h)
  7055. + #   include <cpl/osdefs.h>
  7056. + # endif
  7057. + #endif
  7058.   #if defined( _RTLDLL )
  7059.   #error TV must use the RTL in static form only
  7060.   #endif
  7061. ***************
  7062. *** 611,616 ****
  7063. --- 624,633 ----
  7064.   
  7065.   #if defined( __INC_HARDWARE_H )
  7066.   #include <tvision\hardware.h>
  7067. + #endif
  7068. + #if defined( __INC_OSDEF_H ) || defined(__INC_TKEYS_H)
  7069. + #   include <tvision/tvosdef.h>
  7070.   #endif
  7071.   
  7072.   #if defined( __INC_TKEYS_H )
  7073. diff --context ..\tvo/Tvexposd.asm ./Tvexposd.asm
  7074. *** ../tvo/Tvexposd.asm    Fri Jun 17 01:00:00 1994
  7075. --- ./Tvexposd.asm    Wed Apr 19 11:46:24 1995
  7076. ***************
  7077. *** 1,268 ****
  7078.   ;/*------------------------------------------------------------*/
  7079. ! ;/* filename -       tvexposd.asm                              */
  7080. ! ;/*                                                            */
  7081. ! ;/* function(s)                                                */
  7082. ! ;/*                  TView exposed member function             */
  7083.   ;/*------------------------------------------------------------*/
  7084.   
  7085.   ;
  7086. ! ;       Turbo Vision - Version 2.0
  7087. ! ; 
  7088. ! ;       Copyright (c) 1994 by Borland International
  7089. ! ;       All Rights Reserved.
  7090. ! ; 
  7091.   
  7092. !         PUBLIC  @TView@exposed$qv
  7093. !         INCLUDE TV.INC
  7094.   
  7095.   ifndef __FLAT__
  7096.   Fptr   STRUC
  7097. !         offs    DW      ?
  7098. !         segm    DW      ?
  7099.   Fptr   ENDS
  7100.   else
  7101.   Fptr   STRUC
  7102. !         offs    DD      ?
  7103.   Fptr   ENDS
  7104.   endif
  7105.   
  7106.   CODESEG
  7107.   
  7108. ! @TView@exposed$qv PROC
  7109. !         ARG     thisPtr : DWORD
  7110. !         LOCAL   Target  : Fptr
  7111.   
  7112. ! ifndef __FLAT__
  7113. !         USES    SI,DI
  7114. !         XOR     AX,AX
  7115. !         LES     DI, [thisPtr]
  7116. !         TEST    WORD PTR ES:[DI+TViewState],sfExposed
  7117. !         JE    @@2
  7118. !         CMP     AX,ES:[DI+TViewSizeX]
  7119. !         JGE   @@2
  7120. !         CMP     AX,ES:[DI+TViewSizeY]
  7121. !         JGE   @@2
  7122.   @@1:
  7123. !         XOR     BX,BX
  7124. !         MOV     CX,ES:[DI+TViewSizeX]
  7125. !         PUSH    AX
  7126. !         CALL  @@11
  7127. !         POP     AX
  7128. !         JNC   @@3
  7129. !         LES     DI,[thisPtr]
  7130. !         INC     AX
  7131. !         CMP     AX,ES:[DI+TViewSizeY]
  7132. !         JL    @@1
  7133.   @@2:
  7134. !         MOV     AL,0
  7135. !         JMP   @@30
  7136.   @@3:
  7137. !         MOV     AL,1
  7138. !         JMP   @@30
  7139.   @@8:
  7140. !         STC
  7141.   @@9:
  7142. !         RETN
  7143.   @@10:
  7144. !         LES     DI,DWORD PTR ES:[DI+TViewOwner]
  7145. !         CMP     WORD PTR ES:[DI+TGroupBuffer+2],0
  7146. !         JNE   @@9
  7147. ! @@11:   MOV     [Target.offs],DI
  7148. !         MOV     [Target.segm],ES
  7149. !         ADD     AX,ES:[DI+TViewOriginY]
  7150. !         MOV     SI,ES:[DI+TViewOriginX]
  7151. !         ADD     BX,SI
  7152. !         ADD     CX,SI
  7153. !         LES     DI,ES:[DI+TViewOwner]
  7154. !         MOV     SI,ES
  7155. !         OR      SI,DI
  7156. !         JE    @@9
  7157. !         CMP     AX,ES:[DI+TGroupClipAY]
  7158. !         JL    @@8
  7159. !         CMP     AX,ES:[DI+TGroupClipBY]
  7160. !         JGE   @@8
  7161. !         CMP     BX,ES:[DI+TGroupClipAX]
  7162. !         JGE   @@12
  7163. !         MOV     BX,ES:[DI+TGroupClipAX]
  7164.   @@12:
  7165. !         CMP     CX,ES:[DI+TGroupClipBX]
  7166. !         JLE   @@13
  7167. !         MOV     CX,ES:[DI+TGroupClipBX]
  7168.   @@13:
  7169. !         CMP     BX,CX
  7170. !         JGE   @@8
  7171. !         LES     DI,ES:[DI+TGroupLast]
  7172.   @@20:
  7173. !         LES     DI,ES:[DI+TViewNext]
  7174. !         CMP     DI,[Target.offs]
  7175. !         JNE   @@21
  7176. !         MOV     SI,ES
  7177. !         CMP     SI,[Target.segm]
  7178. !         JE    @@10
  7179.   @@21:
  7180. !         TEST    WORD PTR ES:[DI+TViewState],sfVisible
  7181. !         JE    @@20
  7182. !         MOV     SI,ES:[DI+TViewOriginY]
  7183. !         CMP     AX,SI
  7184. !         JL    @@20
  7185. !         ADD     SI,ES:[DI+TViewSizeY]
  7186. !         CMP     AX,SI
  7187. !         JGE   @@20
  7188. !         MOV     SI,ES:[DI+TViewOriginX]
  7189. !         CMP     BX,SI
  7190. !         JL    @@22
  7191. !         ADD     SI,ES:[DI+TViewSizeX]
  7192. !         CMP     BX,SI
  7193. !         JGE   @@20
  7194. !         MOV     BX,SI
  7195. !         CMP     BX,CX
  7196. !         JL    @@20
  7197. !         STC
  7198. !         RETN
  7199.   @@22:
  7200. !         CMP     CX,SI
  7201. !         JLE   @@20
  7202. !         ADD     SI,ES:[DI+TViewSizeX]
  7203. !         CMP     CX,SI
  7204. !         JG    @@23
  7205. !         MOV     CX,ES:[DI+TViewOriginX]
  7206. !         JMP   @@20
  7207.   @@23:
  7208. !         PUSH    [Target.segm]
  7209. !         PUSH    [Target.offs]
  7210. !         PUSH    ES
  7211. !         PUSH    DI
  7212. !         PUSH    SI
  7213. !         PUSH    CX
  7214. !         PUSH    AX
  7215. !         MOV     CX,ES:[DI+TViewOriginX]
  7216. !         CALL  @@20
  7217. !         POP     AX
  7218. !         POP     CX
  7219. !         POP     BX
  7220. !         POP     DI
  7221. !         POP     ES
  7222. !         POP     [Target.offs]
  7223. !         POP     [Target.segm]
  7224. !         JC    @@20
  7225. !         RETN
  7226.   @@30:
  7227. !         RET
  7228.   
  7229. ! else        ;;;;;;;;;;;;;;;;;;;;;;;;; 32-bit version ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  7230.   
  7231. !         USES    ESI, EDI, EBX
  7232.   
  7233. !         MOV     EDI, DWORD PTR [thisPtr]
  7234. !         TEST    WORD PTR [EDI+TViewState], sfExposed
  7235. !         JZ    @@2
  7236. !         XOR     EAX, EAX
  7237. !         CMP     AX, [EDI+TViewSizeX]
  7238. !         JGE   @@2
  7239. !         CMP     AX, [EDI+TViewSizeY]
  7240. !         JGE   @@2
  7241.   @@1:
  7242. !         XOR     EBX, EBX
  7243. !         MOV     CX, [EDI+TViewSizeX]
  7244. !         PUSH    EAX
  7245. !         CALL  @@11
  7246. !         POP     EAX
  7247. !         JNC   @@3
  7248. !         MOV     EDI, [thisPtr]
  7249. !         INC     EAX
  7250. !         CMP     AX, [EDI+TViewSizeY]
  7251. !         JL    @@1
  7252.   @@2:
  7253. !         XOR     EAX, EAX
  7254. !         JMP   @@30
  7255.   @@3:
  7256. !         MOV     EAX, 1
  7257. !         JMP   @@30
  7258.   @@8:
  7259. !         STC
  7260.   @@9:
  7261. !         LocalRet
  7262.   @@10:
  7263. !         MOV     EDI,DWORD PTR [EDI+TViewOwner]
  7264. !         CMP     DWORD PTR [EDI+TGroupBuffer], 0
  7265. !         JNE   @@9
  7266. !         CMP     WORD PTR [EDI+TGroupBuffer+4], 0
  7267. !         JNE   @@9
  7268. ! @@11:
  7269. !         MOV     [Target.offs], EDI
  7270. !         ADD     AX, [EDI+TViewOriginY]
  7271. !         MOV     SI, [EDI+TViewOriginX]
  7272. !         ADD     BX, SI
  7273. !         ADD     CX, SI
  7274. !         MOV     EDI, [EDI+TViewOwner]
  7275. !         OR      EDI, EDI
  7276. !         JZ    @@9
  7277. !         CMP     AX, [EDI+TGroupClipAY]
  7278. !         JL    @@8
  7279. !         CMP     AX, [EDI+TGroupClipBY]
  7280. !         JGE   @@8
  7281. !         CMP     BX, [EDI+TGroupClipAX]
  7282. !         JGE   @@12
  7283. !         MOV     BX, [EDI+TGroupClipAX]
  7284.   @@12:
  7285. !         CMP     CX, [EDI+TGroupClipBX]
  7286. !         JLE   @@13
  7287. !         MOV     CX, [EDI+TGroupClipBX]
  7288.   @@13:
  7289. !         CMP     BX, CX
  7290. !         JGE   @@8
  7291. !         MOV     EDI, [EDI+TGroupLast]
  7292.   @@20:
  7293. !         MOV     EDI, [EDI+TViewNext]
  7294. !         CMP     EDI, [Target.offs]
  7295. !         JE    @@10
  7296.   @@21:
  7297. !         TEST    WORD PTR [EDI+TViewState], sfVisible
  7298. !         JE    @@20
  7299. !         MOV     SI, [EDI+TViewOriginY]
  7300. !         CMP     AX, SI
  7301. !         JL    @@20
  7302. !         ADD     SI, [EDI+TViewSizeY]
  7303. !         CMP     AX, SI
  7304. !         JGE   @@20
  7305. !         MOV     SI, [EDI+TViewOriginX]
  7306. !         CMP     BX, SI
  7307. !         JL    @@22
  7308. !         ADD     SI, [EDI+TViewSizeX]
  7309. !         CMP     BX, SI
  7310. !         JGE   @@20
  7311. !         MOV     BX, SI
  7312. !         CMP     BX, CX
  7313. !         JL    @@20
  7314. !         STC
  7315. !         LocalRet
  7316.   @@22:
  7317. !         CMP     CX, SI
  7318. !         JLE   @@20
  7319. !         ADD     SI, [EDI+TViewSizeX]
  7320. !         CMP     CX, SI
  7321. !         JG    @@23
  7322. !         MOV     CX, [EDI+TViewOriginX]
  7323. !         JMP   @@20
  7324.   @@23:
  7325. !         PUSH    [Target.offs]
  7326. !         PUSH    EDI
  7327. !         PUSH    ESI
  7328. !         PUSH    ECX
  7329. !         PUSH    EAX
  7330. !         MOV     CX,[EDI+TViewOriginX]
  7331. !         CALL  @@20
  7332. !         POP     EAX
  7333. !         POP     ECX
  7334. !         POP     EBX
  7335. !         POP     EDI
  7336. !         POP     [Target.offs]
  7337. !         JC    @@20
  7338. !         LocalRet
  7339.   @@30:
  7340. !         RET
  7341. ! endif
  7342.   ENDP
  7343.   
  7344.   END
  7345. --- 1,280 ----
  7346.   ;/*------------------------------------------------------------*/
  7347. ! ;/* filename -         tvexposd.asm                               */
  7348. ! ;/*                                                            */
  7349. ! ;/* function(s)                                                */
  7350. ! ;/*                  TView exposed member function               */
  7351.   ;/*------------------------------------------------------------*/
  7352.   
  7353.   ;
  7354. ! ;        Turbo Vision - Version 2.0
  7355. ! ;
  7356. ! ;        Copyright (c) 1994 by Borland International
  7357. ! ;        All Rights Reserved.
  7358. ! ;
  7359.   
  7360. ! IFDEF    __FLAT__
  7361. !     public    _asmExposed
  7362. ! ELSE
  7363. !     PUBLIC    @TView@exposed$qv
  7364. ! ENDIF
  7365. !         INCLUDE TV.INC
  7366.   
  7367.   ifndef __FLAT__
  7368.   Fptr   STRUC
  7369. !         offs    DW        ?
  7370. !         segm    DW        ?
  7371.   Fptr   ENDS
  7372.   else
  7373.   Fptr   STRUC
  7374. !         offs    DD        ?
  7375.   Fptr   ENDS
  7376.   endif
  7377.   
  7378.   CODESEG
  7379.   
  7380. ! IFDEF    __FLAT__
  7381. ! _asmExposed PROC
  7382. !         ARG     thisPtr : DWORD
  7383. !         LOCAL    Target    : Fptr
  7384. !         USES    ESI, EDI, EBX
  7385.   
  7386. !         MOV     EDI, DWORD PTR [thisPtr]
  7387. !         TEST    WORD PTR [EDI+TViewState], sfExposed
  7388. !         JZ      @@2
  7389. !         XOR     EAX, EAX
  7390. !         CMP     AX, [EDI+TViewSizeX]
  7391. !         JGE   @@2
  7392. !         CMP     AX, [EDI+TViewSizeY]
  7393. !         JGE   @@2
  7394.   @@1:
  7395. !         XOR     EBX, EBX
  7396. !         MOV     CX, [EDI+TViewSizeX]
  7397. !         PUSH    EAX
  7398. !         CALL  @@11
  7399. !         POP     EAX
  7400. !         JNC   @@3
  7401. !         MOV     EDI, [thisPtr]
  7402. !         INC     EAX
  7403. !         CMP     AX, [EDI+TViewSizeY]
  7404. !         JL      @@1
  7405.   @@2:
  7406. !         XOR     EAX, EAX
  7407. !         JMP   @@30
  7408.   @@3:
  7409. !         MOV     EAX, 1
  7410. !         JMP   @@30
  7411.   @@8:
  7412. !         STC
  7413.   @@9:
  7414. !         LocalRet
  7415.   @@10:
  7416. !         MOV     EDI,DWORD PTR [EDI+TViewOwner]
  7417. !         CMP     DWORD PTR [EDI+TGroupBuffer], 0
  7418. !         JNE   @@9
  7419. !         CMP     WORD PTR [EDI+TGroupBuffer+4], 0
  7420. !         JNE   @@9
  7421. ! @@11:
  7422. !         MOV     [Target.offs], EDI
  7423. !         ADD     AX, [EDI+TViewOriginY]
  7424. !         MOV     SI, [EDI+TViewOriginX]
  7425. !         ADD     BX, SI
  7426. !         ADD     CX, SI
  7427. !         MOV     EDI, [EDI+TViewOwner]
  7428. !         OR        EDI, EDI
  7429. !         JZ      @@9
  7430. !         CMP     AX, [EDI+TGroupClipAY]
  7431. !         JL      @@8
  7432. !         CMP     AX, [EDI+TGroupClipBY]
  7433. !         JGE   @@8
  7434. !         CMP     BX, [EDI+TGroupClipAX]
  7435. !         JGE   @@12
  7436. !         MOV     BX, [EDI+TGroupClipAX]
  7437.   @@12:
  7438. !         CMP     CX, [EDI+TGroupClipBX]
  7439. !         JLE   @@13
  7440. !         MOV     CX, [EDI+TGroupClipBX]
  7441.   @@13:
  7442. !         CMP     BX, CX
  7443. !         JGE   @@8
  7444. !         MOV     EDI, [EDI+TGroupLast]
  7445.   @@20:
  7446. !         MOV     EDI, [EDI+TViewNext]
  7447. !         CMP     EDI, [Target.offs]
  7448. !         JE      @@10
  7449.   @@21:
  7450. !         TEST    WORD PTR [EDI+TViewState], sfVisible
  7451. !         JE      @@20
  7452. !         MOV     SI, [EDI+TViewOriginY]
  7453. !         CMP     AX, SI
  7454. !         JL      @@20
  7455. !         ADD     SI, [EDI+TViewSizeY]
  7456. !         CMP     AX, SI
  7457. !         JGE   @@20
  7458. !         MOV     SI, [EDI+TViewOriginX]
  7459. !         CMP     BX, SI
  7460. !         JL      @@22
  7461. !         ADD     SI, [EDI+TViewSizeX]
  7462. !         CMP     BX, SI
  7463. !         JGE   @@20
  7464. !         MOV     BX, SI
  7465. !         CMP     BX, CX
  7466. !         JL      @@20
  7467. !         STC
  7468. !         LocalRet
  7469.   @@22:
  7470. !         CMP     CX, SI
  7471. !         JLE   @@20
  7472. !         ADD     SI, [EDI+TViewSizeX]
  7473. !         CMP     CX, SI
  7474. !         JG      @@23
  7475. !         MOV     CX, [EDI+TViewOriginX]
  7476. !         JMP   @@20
  7477.   @@23:
  7478. !         PUSH    [Target.offs]
  7479. !         PUSH    EDI
  7480. !         PUSH    ESI
  7481. !         PUSH    ECX
  7482. !         PUSH    EAX
  7483. !         MOV     CX,[EDI+TViewOriginX]
  7484. !         CALL  @@20
  7485. !         POP     EAX
  7486. !         POP     ECX
  7487. !         POP     EBX
  7488. !         POP     EDI
  7489. !         POP     [Target.offs]
  7490. !         JC      @@20
  7491. !         LocalRet
  7492.   @@30:
  7493. !         RET
  7494.   
  7495. ! _asmExposed ENDP
  7496.   
  7497. ! ELSE
  7498.   
  7499. ! @TView@exposed$qv PROC
  7500. !         ARG     thisPtr : DWORD
  7501. !         LOCAL    Target    : Fptr
  7502. !         USES    SI,DI
  7503. !         XOR     AX,AX
  7504. !         LES     DI, [thisPtr]
  7505. !         TEST    WORD PTR ES:[DI+TViewState],sfExposed
  7506. !         JE      @@2
  7507. !         CMP     AX,ES:[DI+TViewSizeX]
  7508. !         JGE   @@2
  7509. !         CMP     AX,ES:[DI+TViewSizeY]
  7510. !         JGE   @@2
  7511.   @@1:
  7512. !         XOR     BX,BX
  7513. !         MOV     CX,ES:[DI+TViewSizeX]
  7514. !         PUSH    AX
  7515. !         CALL  @@11
  7516. !         POP     AX
  7517. !         JNC   @@3
  7518. !         LES     DI,[thisPtr]
  7519. !         INC     AX
  7520. !         CMP     AX,ES:[DI+TViewSizeY]
  7521. !         JL      @@1
  7522.   @@2:
  7523. !         MOV     AL,0
  7524. !         JMP   @@30
  7525.   @@3:
  7526. !         MOV     AL,1
  7527. !         JMP   @@30
  7528.   @@8:
  7529. !         STC
  7530.   @@9:
  7531. !         RETN
  7532.   @@10:
  7533. !         LES     DI,DWORD PTR ES:[DI+TViewOwner]
  7534. !         CMP     WORD PTR ES:[DI+TGroupBuffer+2],0
  7535. !         JNE   @@9
  7536. ! @@11:    MOV     [Target.offs],DI
  7537. !         MOV     [Target.segm],ES
  7538. !         ADD     AX,ES:[DI+TViewOriginY]
  7539. !         MOV     SI,ES:[DI+TViewOriginX]
  7540. !         ADD     BX,SI
  7541. !         ADD     CX,SI
  7542. !         LES     DI,ES:[DI+TViewOwner]
  7543. !         MOV     SI,ES
  7544. !         OR        SI,DI
  7545. !         JE      @@9
  7546. !         CMP     AX,ES:[DI+TGroupClipAY]
  7547. !         JL      @@8
  7548. !         CMP     AX,ES:[DI+TGroupClipBY]
  7549. !         JGE   @@8
  7550. !         CMP     BX,ES:[DI+TGroupClipAX]
  7551. !         JGE   @@12
  7552. !         MOV     BX,ES:[DI+TGroupClipAX]
  7553.   @@12:
  7554. !         CMP     CX,ES:[DI+TGroupClipBX]
  7555. !         JLE   @@13
  7556. !         MOV     CX,ES:[DI+TGroupClipBX]
  7557.   @@13:
  7558. !         CMP     BX,CX
  7559. !         JGE   @@8
  7560. !         LES     DI,ES:[DI+TGroupLast]
  7561.   @@20:
  7562. !         LES     DI,ES:[DI+TViewNext]
  7563. !         CMP     DI,[Target.offs]
  7564. !         JNE   @@21
  7565. !         MOV     SI,ES
  7566. !         CMP     SI,[Target.segm]
  7567. !         JE      @@10
  7568.   @@21:
  7569. !         TEST    WORD PTR ES:[DI+TViewState],sfVisible
  7570. !         JE      @@20
  7571. !         MOV     SI,ES:[DI+TViewOriginY]
  7572. !         CMP     AX,SI
  7573. !         JL      @@20
  7574. !         ADD     SI,ES:[DI+TViewSizeY]
  7575. !         CMP     AX,SI
  7576. !         JGE   @@20
  7577. !         MOV     SI,ES:[DI+TViewOriginX]
  7578. !         CMP     BX,SI
  7579. !         JL      @@22
  7580. !         ADD     SI,ES:[DI+TViewSizeX]
  7581. !         CMP     BX,SI
  7582. !         JGE   @@20
  7583. !         MOV     BX,SI
  7584. !         CMP     BX,CX
  7585. !         JL      @@20
  7586. !         STC
  7587. !         RETN
  7588.   @@22:
  7589. !         CMP     CX,SI
  7590. !         JLE   @@20
  7591. !         ADD     SI,ES:[DI+TViewSizeX]
  7592. !         CMP     CX,SI
  7593. !         JG      @@23
  7594. !         MOV     CX,ES:[DI+TViewOriginX]
  7595. !         JMP   @@20
  7596.   @@23:
  7597. !         PUSH    [Target.segm]
  7598. !         PUSH    [Target.offs]
  7599. !         PUSH    ES
  7600. !         PUSH    DI
  7601. !         PUSH    SI
  7602. !         PUSH    CX
  7603. !         PUSH    AX
  7604. !         MOV     CX,ES:[DI+TViewOriginX]
  7605. !         CALL  @@20
  7606. !         POP     AX
  7607. !         POP     CX
  7608. !         POP     BX
  7609. !         POP     DI
  7610. !         POP     ES
  7611. !         POP     [Target.offs]
  7612. !         POP     [Target.segm]
  7613. !         JC      @@20
  7614. !         RETN
  7615.   @@30:
  7616. !         RET
  7617.   ENDP
  7618. + ENDIF
  7619.   
  7620.   END
  7621. diff --context ..\tvo/Tview.cpp ./TVIEW.CPP
  7622. *** ../tvo/Tview.cpp    Fri Jun 17 01:00:00 1994
  7623. --- ./TVIEW.CPP    Tue Apr 25 22:08:54 1995
  7624. ***************
  7625. *** 639,645 ****
  7626.   void TView::select()
  7627.   {
  7628.       if( ! (options & ofSelectable))
  7629. !     return;
  7630.       if( (options & ofTopSelect) != 0 )
  7631.           makeFirst();
  7632.       else if( owner != 0 )
  7633. --- 639,645 ----
  7634.   void TView::select()
  7635.   {
  7636.       if( ! (options & ofSelectable))
  7637. !     return;
  7638.       if( (options & ofTopSelect) != 0 )
  7639.           makeFirst();
  7640.       else if( owner != 0 )
  7641. ***************
  7642. *** 654,663 ****
  7643.   
  7644.   void TView::setCmdState(TCommandSet& commands, Boolean enable)
  7645.   {
  7646. !     if (enable)
  7647. !         enableCommands(commands);
  7648. !     else
  7649. !         disableCommands(commands);
  7650.   }
  7651.   
  7652.   void TView::setCommands( TCommandSet& commands )
  7653. --- 654,663 ----
  7654.   
  7655.   void TView::setCmdState(TCommandSet& commands, Boolean enable)
  7656.   {
  7657. !     if (enable)
  7658. !         enableCommands(commands);
  7659. !     else
  7660. !         disableCommands(commands);
  7661.   }
  7662.   
  7663.   void TView::setCommands( TCommandSet& commands )
  7664. diff --context ..\tvo/Tvobjs.h ./TVOBJS.H
  7665. *** ../tvo/Tvobjs.h    Fri Jun 17 01:00:00 1994
  7666. --- ./TVOBJS.H    Tue Apr 25 22:08:56 1995
  7667. ***************
  7668. *** 62,67 ****
  7669. --- 62,68 ----
  7670.   public:
  7671.   
  7672.       TNSCollection( ccIndex aLimit, ccIndex aDelta );
  7673. +     TNSCollection( short aLimit, short aDelta );
  7674.       ~TNSCollection();
  7675.   
  7676.       virtual void shutDown();
  7677. Only in .: TVOS2.CPP
  7678. Only in .: TVOSDEF.H
  7679. diff --context ..\tvo/Tvtext1.cpp ./TVTEXT1.CPP
  7680. *** ../tvo/Tvtext1.cpp    Fri Jun 17 01:00:00 1994
  7681. --- ./TVTEXT1.CPP    Tue Apr 25 22:08:54 1995
  7682. ***************
  7683. *** 32,44 ****
  7684.   
  7685.   static unsigned getCodePage()
  7686.   {
  7687.   #if !defined(__FLAT__)
  7688.       //  get version number, in the form of a normal number
  7689.       unsigned ver = (_version >> 8) | (_version << 8);
  7690.       if( ver < 0x30C )
  7691.           return 437; // United States code page, for all versions before 3.3
  7692.   
  7693. ! #if defined( __FLAT__ )
  7694.       Regs r; r.rDS.w.wl = r.rES.w.wl = -1;
  7695.   #endif
  7696.   
  7697. --- 32,45 ----
  7698.   
  7699.   static unsigned getCodePage()
  7700.   {
  7701. + #if 0
  7702.   #if !defined(__FLAT__)
  7703.       //  get version number, in the form of a normal number
  7704.       unsigned ver = (_version >> 8) | (_version << 8);
  7705.       if( ver < 0x30C )
  7706.           return 437; // United States code page, for all versions before 3.3
  7707.   
  7708. ! #if defined( __FLAT__ )                     // ?? This sucks?? see above if?
  7709.       Regs r; r.rDS.w.wl = r.rES.w.wl = -1;
  7710.   #endif
  7711.   
  7712. ***************
  7713. *** 47,52 ****
  7714. --- 48,88 ----
  7715.   
  7716.   #endif
  7717.       return _BX;
  7718. + #else
  7719. +     /*
  7720. +      *  New code. The old code sucks.
  7721. +      */
  7722. + #if defined(__FLAT__)
  7723. + # if defined(__NT__)
  7724. +     return 437;
  7725. + # elif defined(__OS2__)
  7726. +     return 437;
  7727. + #  if 0
  7728. +     //** Needs checking first.
  7729. +     uword   buf[40];
  7730. +     uword   len;
  7731. +     if(DosGetCp(sizeof(buf), buf, &len) != 0) return 437;
  7732. +     return buf[0];
  7733. + #  endif
  7734. + # else
  7735. + #   error   "Non-supported OS"
  7736. + # endif     // __NT__, __OS2__
  7737. + #else       // NOT __FLAT__
  7738. +     //** DOS: get version number, in the form of a normal number
  7739. +     unsigned ver = (_version >> 8) | (_version << 8);
  7740. +     if( ver < 0x30C )
  7741. +         return 437; // United States code page, for all versions before 3.3
  7742. +     _AX = 0x6601;   // get code page
  7743. +     _genInt( 0x21 );
  7744. +     return _BX;
  7745. + #endif
  7746. + #endif
  7747.   }
  7748.   
  7749.   void TDisplay::updateIntlChars()
  7750. ***************
  7751. *** 69,74 ****
  7752. --- 105,127 ----
  7753.   
  7754.   char _NEAR TFrame::frameChars[33] =
  7755.       "   └ │┌├ ┘─┴┐┤┬┼   ╚ ║╔╟ ╝═╧╗╢╤ "; // for UnitedStates code page
  7756. + #ifdef  __FLAT__
  7757. + extern "C"
  7758. + {
  7759. +     char asmInitFrame[19] =
  7760. +       "\x06\x0A\x0C\x05\x00\x05\x03\x0A\x09\x16\x1A\x1C\x15\x00\x15\x13\x1A\x19";
  7761. +     char asmFrameChars[33] =
  7762. +         "   └ │┌├ ┘─┴┐┤┬┼   ╚ ║╔╟ ╝═╧╗╢╤ "; // for UnitedStates code page
  7763. + };
  7764. + #endif
  7765.   
  7766.   const char * _NEAR TFrame::closeIcon = "[~\xFE~]";
  7767.   const char * _NEAR TFrame::zoomIcon = "[~\x18~]";
  7768. diff --context ..\tvo/Tvtext2.cpp ./TVTEXT2.CPP
  7769. *** ../tvo/Tvtext2.cpp    Fri Jun 17 01:00:00 1994
  7770. --- ./TVTEXT2.CPP    Tue Apr 25 22:08:54 1995
  7771. ***************
  7772. *** 82,96 ****
  7773.   
  7774.   char getCtrlChar(ushort keyCode)
  7775.   {
  7776. !     if ( (lo(keyCode)!= 0) && (lo(keyCode) <= ('Z'-'A'+1)))
  7777. !         return lo(keyCode) + 'A' - 1;
  7778. !     else
  7779. !         return 0;
  7780.   }
  7781.   
  7782.   ushort getCtrlCode(uchar ch)
  7783.   {
  7784. !     return getAltCode(ch)|(((('a'<=ch)&&(ch<='z'))?(ch&~0x20):ch)-'A'+1);
  7785.   
  7786.   }
  7787.   
  7788. --- 82,96 ----
  7789.   
  7790.   char getCtrlChar(ushort keyCode)
  7791.   {
  7792. !     if ( (lo(keyCode)!= 0) && (lo(keyCode) <= ('Z'-'A'+1)))
  7793. !         return lo(keyCode) + 'A' - 1;
  7794. !     else
  7795. !         return 0;
  7796.   }
  7797.   
  7798.   ushort getCtrlCode(uchar ch)
  7799.   {
  7800. !     return getAltCode(ch)|(((('a'<=ch)&&(ch<='z'))?(ch&~0x20):ch)-'A'+1);
  7801.   
  7802.   }
  7803.   
  7804. Only in .: Tvwrit32.asm
  7805. Only in .: Tvwrit32.inc
  7806. diff --context ..\tvo/Twindow.cpp ./TWINDOW.CPP
  7807. *** ../tvo/Twindow.cpp    Fri Jun 17 01:00:00 1994
  7808. --- ./TWINDOW.CPP    Tue Apr 25 22:08:54 1995
  7809. ***************
  7810. *** 47,53 ****
  7811.       TWindowInit( &TWindow::initFrame )
  7812.   {
  7813.       state |= sfShadow;
  7814. !     options |= ofSelectable | ofTopSelect;
  7815.       growMode = gfGrowAll | gfGrowRel;
  7816.   
  7817.       if( createFrame != 0 &&
  7818. --- 47,53 ----
  7819.       TWindowInit( &TWindow::initFrame )
  7820.   {
  7821.       state |= sfShadow;
  7822. !     options |= ofSelectable | ofTopSelect | ofFirstClick;
  7823.       growMode = gfGrowAll | gfGrowRel;
  7824.   
  7825.       if( createFrame != 0 &&
  7826. ***************
  7827. *** 119,125 ****
  7828.                       ( event.message.infoPtr == 0 || event.message.infoPtr == this )
  7829.                     )
  7830.                       {
  7831. !             clearEvent(event);
  7832.                       if( (state & sfModal) == 0 )
  7833.                           close();
  7834.                       else
  7835. --- 119,125 ----
  7836.                       ( event.message.infoPtr == 0 || event.message.infoPtr == this )
  7837.                     )
  7838.                       {
  7839. !             clearEvent(event);
  7840.                       if( (state & sfModal) == 0 )
  7841.                           close();
  7842.                       else
  7843. diff --context ..\tvo/Views.h ./VIEWS.H
  7844. *** ../tvo/Views.h    Fri Jun 17 01:00:00 1994
  7845. --- ./VIEWS.H    Tue Apr 25 22:08:58 1995
  7846. ***************
  7847. *** 86,91 ****
  7848. --- 86,96 ----
  7849.       ofCentered      = 0x300,
  7850.       ofValidate      = 0x400,
  7851.   
  7852. + #ifdef  __OS2__
  7853. +     ofPhysical      = 0x8000,       // T if view is PHYSICAL screen!
  7854. + #endif
  7855.   // TView GrowMode masks
  7856.   
  7857.       gfGrowLoX       = 0x01,
  7858. ***************
  7859. *** 299,304 ****
  7860. --- 304,313 ----
  7861.   #if defined( Uses_TView ) && !defined( __TView )
  7862.   #define __TView
  7863.   
  7864. + #ifndef __os2asm_h
  7865. + #   include <tvision/os2asm.h>
  7866. + #endif
  7867.   struct write_args
  7868.   {
  7869.       void _FAR *self;
  7870. ***************
  7871. *** 410,422 ****
  7872.       void putInFrontOf( TView *Target );
  7873.       TView *TopView();
  7874.   
  7875. !     void writeBuf(  short x, short y, short w, short h, const void _FAR* b );
  7876.       void writeBuf(  short x, short y, short w, short h, const TDrawBuffer& b );
  7877.       void writeChar( short x, short y, char c, uchar color, short count );
  7878.       void writeLine( short x, short y, short w, short h, const TDrawBuffer& b );
  7879.       void writeLine( short x, short y, short w, short h, const void _FAR *b );
  7880.       void writeStr( short x, short y, const char *str, uchar color );
  7881.   
  7882.       TPoint size;
  7883.       ushort options;
  7884.       ushort eventMask;
  7885. --- 419,433 ----
  7886.       void putInFrontOf( TView *Target );
  7887.       TView *TopView();
  7888.   
  7889. !     void writeBuf(  short x, short y, short w, short h, const void _FAR * b );
  7890.       void writeBuf(  short x, short y, short w, short h, const TDrawBuffer& b );
  7891.       void writeChar( short x, short y, char c, uchar color, short count );
  7892.       void writeLine( short x, short y, short w, short h, const TDrawBuffer& b );
  7893.       void writeLine( short x, short y, short w, short h, const void _FAR *b );
  7894.       void writeStr( short x, short y, const char *str, uchar color );
  7895.   
  7896. +     void writeView(short x, short y, short count, ushort *buf);
  7897.       TPoint size;
  7898.       ushort options;
  7899.       ushort eventMask;
  7900. ***************
  7901. *** 468,473 ****
  7902. --- 479,490 ----
  7903.   
  7904.   };
  7905.   
  7906. + #ifdef  __FLAT__
  7907. + inline Boolean TView::exposed()
  7908. + {   return asmExposed(this);
  7909. + }
  7910. + #endif
  7911.   inline ipstream& operator >> ( ipstream& is, TView& cl )
  7912.       { return is >> (TStreamable&)cl; }
  7913.   inline ipstream& operator >> ( ipstream& is, TView*& cl )
  7914. ***************
  7915. *** 506,511 ****
  7916. --- 523,532 ----
  7917.   #if defined( Uses_TFrame ) && !defined( __TFrame )
  7918.   #define __TFrame
  7919.   
  7920. + #ifndef __os2asm_h
  7921. + #include    <tvision/os2asm.h>
  7922. + #endif
  7923.   class _FAR TRect;
  7924.   class _FAR TEvent;
  7925.   class _FAR TDrawBuffer;
  7926. ***************
  7927. *** 548,553 ****
  7928. --- 569,580 ----
  7929.       static TStreamable *build();
  7930.   
  7931.   };
  7932. + #ifdef  __FLAT__
  7933. + inline void TFrame::frameLine(TDrawBuffer& frameBuf, short y, short n, uchar color )
  7934. + {   asmFrameLine(this, frameBuf, y, n, color);
  7935. + }
  7936. + #endif
  7937.   
  7938.   inline ipstream& operator >> ( ipstream& is, TFrame& cl )
  7939.       { return is >> (TStreamable&)cl; }
  7940.