TVision

 view release on metacpan or  search on metacpan

tvision.git/README.md  view on Meta::CPAN


* Non-printable characters in the range `0x00` to `0xFF` are interpreted as characters in the active codepage. For instance, `0x7F` is displayed as `⌂` and `0xF0` as `≡` if using CP437. As an exception, `0x00` is always displayed as a regular spa...
* Character sequences which are not valid UTF-8 are interpreted as sequences of characters in the current codepage, as in the case above.
* Valid UTF-8 sequences with a display width other than one are taken care of in a special way, see below.

For example, the string `"â•”[\xFE]â•—"` may be displayed as `â•”[â– ]â•—`. This means that box-drawing characters can be mixed with UTF-8 in general, which is useful for backward compatibility. If you rely on this behaviour, though, you may get unex...

One of the issues of Unicode support is the existence of [double-width](https://convertcase.net/vaporwave-wide-text-generator/) characters and [combining](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) characters. This conflicts with Turb...

* Double-width characters can be drawn anywhere on the screen and nothing bad happens if they overlap partially with other characters.
* Zero-width characters overlay the previous character. For example, the sequence `में` consists of the single-width character `म` and the combining characters `े` and `ं`. In this case, three Unicode codepoints are fit into the same cell...

    The `ZERO WIDTH JOINER` (`U+200D`) is always omitted, as it complicates things too much. For example, it can turn a string like `"👩👦"` (4 columns wide) into `"👩‍👦"` (2 columns wide). Not all terminal emulators respect the ZWJ, so, i...
* No notable graphical glitches will occur as long as your terminal emulator respects character widths as measured by `wcwidth`.

Here is an example of such characters in the [Turbo](https://github.com/magiblot/turbo) text editor:
![Wide character display](https://user-images.githubusercontent.com/20713561/103179253-51344980-488a-11eb-9a29-79b9acb1b4b9.png)

### Unicode-aware API functions

The usual way of writing to the screen is by using `TDrawBuffer`. A few methods have been added and others have changed their meaning:

tvision.git/examples/tvdemo/makefile  view on Meta::CPAN

#
#  Turbo Vision  -  Version 2.0
#
#  TVDEMO Makefile
#
#  One of the following symbols may be defined to build an app in a
#  target other than real mode (the default).
#
#     OVERLAY -  build an overlayed DOS app
#
#     DOS16  -  build a 16 bit DPMI app
#
#     DOS32  -  build a 32 bit DPMI app
#
#
#  The following additional symbols may also be defined:
#
#     DEBUG   -  include debugging information in the app
#

tvision.git/examples/tvdemo/makefile  view on Meta::CPAN

!ifdef DEBUG                   # set appropriate flags for debugging
CCDEBUGFLAG = -v
LINKDEBUGFLAG = /v
DEBUGSUFFIX = d
!endif

!ifdef TVDEBUG                 # this suffix is added to Turbo Vision
TVSUFFIX = d                   # library name, ie TV.LIB becomes TVD.LIB
!endif

!ifdef OVERLAY                 # set overlay flags
CCOVYFLAGS  = -Y -Vs
LINKOVY_ON  = /o+
LINKOVY_OFF = /o-
!endif

!if $d(BGI)                    # set BGI library
BGILIB = graphics.lib
!if $d(DOS16)
BGILIB = bgi16.lib
!endif

tvision.git/examples/tvdemo/makefile  view on Meta::CPAN

CC         = $(BCROOT)\BIN\bcc +$(CFGFILE)
TLINK      = $(BCROOT)\BIN\tlink
STARTUP    = c0l.obj
USERLIBS   = tv$(TVSUFFIX).lib
STDLIBS    = $(BGILIB) emu.lib mathl.lib cl.lib
CCFLAGS    = -ml $(CCDEBUGFLAG) $(CCOVYFLAGS)
LINKFLAGS  = $(LINKDEBUGFLAG)
OBJDIR     = objs16$(DEBUGSUFFIX)

#
# overlayed application options
#

!ifdef OVERLAY
USERLIBS   = tvo$(TVSUFFIX).lib
STDLIBS    = tvno$(TVSUFFIX).lib overlay.lib emu.lib mathl.lib cl.lib
!endif

#
# 16 bit protected mode application options
#

!ifdef DOS16
CFGFILE    = $(SOURCE).C16
CC         = $(BCROOT)\BIN\bcc +$(CFGFILE)
TLINK      = $(BCROOT)\BIN\tlink

tvision.git/examples/tvdemo/makefile  view on Meta::CPAN

$(OBJDIR)\gadgets.obj +
$(OBJDIR)\mousedlg.obj +
$(OBJDIR)\puzzle.obj +
$(OBJDIR)\tvdemo1.obj +
$(OBJDIR)\tvdemo2.obj +
$(OBJDIR)\tvdemo3.obj +
$(OBJDIR)\evntview.obj +
$(OBJDIR)\backgrnd.obj
$(SOURCE)                       # exe name
$(SOURCE)                       # mapfile
$(LINKOVY_ON) $(USERLIBS) +     # overlayable libraries
$(LINKOVY_OFF) $(STDLIBS)       # non-overlayable libraries
|

dirs:
  IF NOT EXIST $(OBJDIR) MD $(OBJDIR)

#
# source file depends on the cfg file, which is created
# whenever the makefile is modified
#

tvision.git/examples/tvdir/makefile  view on Meta::CPAN

#
#  Turbo Vision  -  Version 2.0
#
#  TVDIR Makefile
#
#  One of the following symbols may be defined to build an app in a
#  target other than real mode (the default).
#
#     OVERLAY -  build an overlayed DOS app
#
#     DOS16  -  build a 16 bit DPMI app
#
#     DOS32  -  build a 32 bit DPMI app
#
#     DEBUG   -  include debugging information in the app
#
#     TVDEBUG -  use the debugging version of the Turbo Vision
#                library.  This assumes that you have built
#                the debugging version of the Turbo Vision library

tvision.git/examples/tvdir/makefile  view on Meta::CPAN

!ifdef DEBUG                   # set appropriate flags for debugging
CCDEBUGFLAG = -v
LINKDEBUGFLAG = /v
DEBUGSUFFIX = d
!endif

!ifdef TVDEBUG                 # this suffix is added to Turbo Vision
TVSUFFIX = d                   # library name, ie TV.LIB becomes TVD.LIB
!endif

!ifdef OVERLAY                 # set overlay flags
CCOVYFLAGS  = -Y -Vs
LINKOVY_ON  = /o+
LINKOVY_OFF = /o-
!endif

!if $d(BGI)                    # set BGI library
BGILIB = graphics.lib
!if $d(DOS16)
BGILIB = bgi16.lib
!endif

tvision.git/examples/tvdir/makefile  view on Meta::CPAN

CC         = $(BCROOT)\BIN\bcc +$(CFGFILE)
TLINK      = $(BCROOT)\BIN\tlink
STARTUP    = c0l.obj
USERLIBS   = tv$(TVSUFFIX).lib
STDLIBS    = $(BGILIB) emu.lib mathl.lib cl.lib
CCFLAGS    = -ml $(CCDEBUGFLAG) $(CCOVYFLAGS)
LINKFLAGS  = $(LINKDEBUGFLAG)
OBJDIR     = objs16$(DEBUGSUFFIX)

#
# overlayed application options
#

!ifdef OVERLAY
USERLIBS   = tvo$(TVSUFFIX).lib
STDLIBS    = tvno$(TVSUFFIX).lib overlay.lib emu.lib mathl.lib cl.lib
!endif

#
# 16 bit protected mode application options
#

!ifdef DOS16
CFGFILE    = $(SOURCE).C16
CC         = $(BCROOT)\BIN\bcc +$(CFGFILE)
TLINK      = $(BCROOT)\BIN\tlink

tvision.git/examples/tvdir/makefile  view on Meta::CPAN

# link the exe
#

$(SOURCE).exe: dirs $(CFGFILE) $(OBJDIR)\$(SOURCE).obj
  $(TLINK) @&&|
$(LINKFLAGS)/L$(LIBPATH) +      # linker options
$(STARTUP) +                    # startup code
$(OBJDIR)\$(SOURCE).obj         # user object files
$(SOURCE)                       # exe name
$(SOURCE)                       # mapfile
$(LINKOVY_ON) $(USERLIBS) +     # overlayable libraries
$(LINKOVY_OFF) $(STDLIBS)       # non-overlayable libraries
|

#
# the following rules ensure that the appropriate OBJS
# directory exists.
#

dirs:
  IF NOT EXIST $(OBJDIR) MD $(OBJDIR)

tvision.git/examples/tvedit/makefile  view on Meta::CPAN

#
#  Turbo Vision  -  Version 2.0
#
#  TVEDIT Makefile
#
#  One of the following symbols may be defined to build an app in a
#  target other than real mode (the default).
#
#     OVERLAY -  build an overlayed DOS app
#
#     DOS16  -  build a 16 bit DPMI app
#
#     DOS32  -  build a 32 bit DPMI app
#
#
#  The following additional symbols may also be defined:
#
#     DEBUG   -  include debugging information in the app
#

tvision.git/examples/tvedit/makefile  view on Meta::CPAN

!ifdef DEBUG                   # set appropriate flags for debugging
CCDEBUGFLAG = -v
LINKDEBUGFLAG = /v
DEBUGSUFFIX = d
!endif

!ifdef TVDEBUG                 # this suffix is added to Turbo Vision
TVSUFFIX = d                   # library name, ie TV.LIB becomes TVD.LIB
!endif

!ifdef OVERLAY                 # set overlay flags
CCOVYFLAGS  = -Y -Vs
LINKOVY_ON  = /o+
LINKOVY_OFF = /o-
!endif

!if $d(BGI)                    # set BGI library
BGILIB = graphics.lib
!if $d(DOS16)
BGILIB = bgi16.lib
!endif

tvision.git/examples/tvedit/makefile  view on Meta::CPAN

CC         = $(BCROOT)\BIN\bcc +$(CFGFILE)
TLINK      = $(BCROOT)\BIN\tlink
STARTUP    = c0l.obj
USERLIBS   = tv$(TVSUFFIX).lib
STDLIBS    = $(BGILIB) emu.lib mathl.lib cl.lib
CCFLAGS    = -ml $(CCDEBUGFLAG) $(CCOVYFLAGS)
LINKFLAGS  = $(LINKDEBUGFLAG)
OBJDIR     = objs16$(DEBUGSUFFIX)

#
# overlayed application options
#

!ifdef OVERLAY
USERLIBS   = tvo$(TVSUFFIX).lib
STDLIBS    = tvno$(TVSUFFIX).lib overlay.lib emu.lib mathl.lib cl.lib
!endif

#
# 16 bit protected mode application options
#

!ifdef DOS16
CFGFILE    = $(SOURCE).C16
CC         = $(BCROOT)\BIN\bcc +$(CFGFILE)
TLINK      = $(BCROOT)\BIN\tlink

tvision.git/examples/tvedit/makefile  view on Meta::CPAN


$(SOURCE).exe: dirs $(CFGFILE) $(OBJDIR)\tvedit1.obj $(OBJDIR)\tvedit2.obj $(OBJDIR)\tvedit3.obj
  $(TLINK) @&&|
$(LINKFLAGS)/L$(LIBPATH) +      # linker options
$(STARTUP) +                    # startup code
$(OBJDIR)\tvedit1.obj +         # user object files
$(OBJDIR)\tvedit2.obj +
$(OBJDIR)\tvedit3.obj
$(SOURCE)                       # exe name
$(SOURCE)                       # mapfile
$(LINKOVY_ON) $(USERLIBS) +     # overlayable libraries
$(LINKOVY_OFF) $(STDLIBS)       # non-overlayable libraries
|

dirs:
  IF NOT EXIST $(OBJDIR) MD $(OBJDIR)

#
# source file depends on the cfg file, which is created
# whenever the makefile is modified
#

tvision.git/examples/tvforms/makefile  view on Meta::CPAN

#
#  Turbo Vision  -  Version 2.0
#
#  TVFORMS Makefile
#
#  One of the following symbols may be defined to build an app in a
#  target other than real mode (the default).
#
#     OVERLAY -  build an overlayed DOS app
#
#     DOS16  -  build a 16 bit DPMI app
#
#     DOS32  -  build a 32 bit DPMI app
#
#
#  The following additional symbols may also be defined:
#
#     DEBUG   -  include debugging information in the app
#

tvision.git/examples/tvforms/makefile  view on Meta::CPAN

!ifdef DEBUG                   # set appropriate flags for debugging
CCDEBUGFLAG = -v
LINKDEBUGFLAG = /v
DEBUGSUFFIX = d
!endif

!ifdef TVDEBUG                 # this suffix is added to Turbo Vision
TVSUFFIX = d                   # library name, ie TV.LIB becomes TVD.LIB
!endif

!ifdef OVERLAY                 # set overlay flags
CCOVYFLAGS  = -Y -Vs
LINKOVY_ON  = /o+
LINKOVY_OFF = /o-
!endif

#
# default options produce a real mode application
#

CFGFILE    = $(SOURCE).CFG
CC         = bcc +$(CFGFILE)
TLINK      = tlink
STARTUP    = c0l.obj
USERLIBS   = tv$(TVSUFFIX).lib
STDLIBS    = $(BGILIB) emu.lib mathl.lib cl.lib
CCFLAGS    = -ml $(CCDEBUGFLAG) $(CCOVYFLAGS)
LINKFLAGS  = $(LINKDEBUGFLAG)
OBJDIR     = objs16$(DEBUGSUFFIX)

#
# overlayed application options
#

!ifdef OVERLAY
USERLIBS   = tvo$(TVSUFFIX).lib
STDLIBS    = tvno$(TVSUFFIX).lib overlay.lib emu.lib mathl.lib cl.lib
!endif

#
# 16 bit protected mode application options
#

!ifdef DOS16
CFGFILE    = $(SOURCE).C16
CC         = bcc +$(CFGFILE)
TLINK      = tlink

tvision.git/examples/tvforms/makefile  view on Meta::CPAN

  $(TLINK) @&&|
$(LINKFLAGS)/L$(LIBPATH) +      # linker options
$(STARTUP) +                    # startup code
$(OBJDIR)\tvforms.obj +         # user object files
$(OBJDIR)\listdlg.obj +
$(OBJDIR)\forms.obj +
$(OBJDIR)\fields.obj +
$(OBJDIR)\datacoll.obj
$(SOURCE)                       # exe name
$(SOURCE)                       # mapfile
$(LINKOVY_ON) $(USERLIBS) +     # overlayable libraries
$(LINKOVY_OFF) $(STDLIBS)       # non-overlayable libraries
|

dirs:
  IF NOT EXIST $(OBJDIR) MD $(OBJDIR)

#
# source file depends on the cfg file, which is created
# whenever the makefile is modified
#

tvision.git/examples/tvhc/makefile  view on Meta::CPAN

!ifdef DEBUG                   # set appropriate flags for debugging
CCDEBUGFLAG = -v
LINKDEBUGFLAG = /v
DEBUGSUFFIX = d
!endif

!ifdef TVDEBUG                 # this suffix is added to Turbo Vision
TVSUFFIX = d                   # library name, ie TV.LIB becomes TVD.LIB
!endif

!ifdef OVERLAY                 # set overlay flags
CCOVYFLAGS  = -Y -Vs
LINKOVY_ON  = /o+
LINKOVY_OFF = /o-
!endif

!if $d(BGI)                    # set BGI library
BGILIB = graphics.lib
!if $d(DOS16)
BGILIB = bgi16.lib
!endif

tvision.git/examples/tvhc/makefile  view on Meta::CPAN

CC         = $(BCROOT)\BIN\bcc +$(CFGFILE)
TLINK      = $(BCROOT)\BIN\tlink
STARTUP    = c0l.obj
USERLIBS   = tv$(TVSUFFIX).lib
STDLIBS    = $(BGILIB) emu.lib mathl.lib cl.lib
CCFLAGS    = -ml $(CCDEBUGFLAG) $(CCOVYFLAGS)
LINKFLAGS  = $(LINKDEBUGFLAG)
OBJDIR     = objs16$(DEBUGSUFFIX)

#
# overlayed application options
#

!ifdef OVERLAY
USERLIBS   = tvo$(TVSUFFIX).lib
STDLIBS    = tvno$(TVSUFFIX).lib overlay.lib emu.lib mathl.lib cl.lib
!endif

#
# 16 bit protected mode application options
#

!ifdef DOS16
CFGFILE    = $(SOURCE).C16
CC         = $(BCROOT)\BIN\bcc +$(CFGFILE)
TLINK      = $(BCROOT)\BIN\tlink

tvision.git/examples/tvhc/makefile  view on Meta::CPAN

# link the exe
#

$(SOURCE).exe: dirs $(CFGFILE) $(OBJDIR)\$(SOURCE).obj
  $(TLINK) @&&|
$(LINKFLAGS)/L$(LIBPATH) +      # linker options
$(STARTUP) +                    # startup code
$(OBJDIR)\$(SOURCE).obj         # user object files
$(SOURCE)                       # exe name
$(SOURCE)                       # mapfile
$(LINKOVY_ON)$(USERLIBS) +      # overlayable libraries
$(LINKOVY_OFF)$(STDLIBS)        # non-overlayable libraries
|

#
# the following rule ensures that the appropriate OBJS
# directory exists.
#

dirs:
  IF NOT EXIST $(OBJDIR) MD $(OBJDIR)

tvision.git/source/tvision/makefile  view on Meta::CPAN

#
#   Borland C++ - (C) Copyright 1991, 1994 by Borland International
#   Makefile for building Turbo Vision 2.0
#

#
# Flags for makefile:
#
#     -DOVERLAY      Build an overlayable version of TV.LIB.
#
#     -DDOS32        Build the 32-bit version - TV32.LIB.
#
#     -DDEBUG        Turbo Vision library with full debug info.
#
#     -DNOTASM       If you didn't purchase Turbo Assembler 4.0.
#
#     -DALIGNMENT=2  Word (=2) or dword (=4) aligned library.
#     -DALIGNMENT=4
#

tvision.git/source/tvision/makefile  view on Meta::CPAN

ADEBUGFLAG =
!endif

!if $d(OVERLAY)
!if !$d(DOS32)
CCOVYFLAGS = -Y -Vs
AOVYFLAGS  = /o
OBJDIR     = $(SRCDIR)\OBJSOVY
LIBNAME    = TVO.LIB
!else
!error Cannot use overlays with 32-bit version.
!endif
!endif

.path.obj = $(OBJDIR)

!if $d(ALIGNMENT)
ALIGNFLAG = -a$(ALIGNMENT)
!else
ALIGNFLAG =
!endif



( run in 2.094 seconds using v1.01-cache-2.11-cpan-49f99fa48dc )