home *** CD-ROM | disk | FTP | other *** search
- #
- # This p2c resource file contains all definitions needed to
- # convert Turbo-Pascal graphics to Borland C++ graphics.
- #
- # Copyright (C) 1993 Hartmut Schirmer
- #
- # It may be usefull with djgpp/libgrx/bccgrx too
- #
- # You might change the folowing definitions so they fit your system
- #
-
- Language TURBO # All programs are in HP Pascal dialect
- Integer16 2 # use native int
- AnsiC 1 # generate clean ANSI-C
- UnsignedChar 2 # use native char
- IncludeFrom graph <p2c/tp2bcc.h>
- ImportFrom graph ./p2c/graph.imp
-
- # use Turbo comaptible random number generator form bcc2grx
- RandIntName RANDOM_TP # TP compatible random number generator
- RandRealName RANDOM_R_TP
- RandomizeName RANDZE_TP # randomize()
-
- # some famous CRT routines
- FuncMacro KeyPressed() = kbhit()
- FuncMacro ReadKey() = getch()
- FuncMacro Delay(ms) = delay((unsigned)(ms))
-
- # GRAPH routines returning strings
- FuncMacro GetModeName(res,mode) = getmodename(mode)
- FuncMacro GetDriverName(res) = getdrivername()
- FuncMacro GraphErrorMsg(res,err) = grapherrormsg(err)
-
- # Naming differences between TURBO-Pascal and Borlamd-C
- NameOf AndPut=AND_PUT
- NameOf BkSlashFill=BKSLASH_FILL
- NameOf BoldFont=BOLD_FONT
- NameOf BottomText=BOTTOM_TEXT
- NameOf CenterLn=CENTER_LINE
- NameOf CenterText=CENTER_TEXT
- NameOf CloseDotFill=CLOSE_DOT_FILL
- NameOf ComplexFont=COMPLEX_FONT
- NameOf CopyPut=COPY_PUT
- NameOf CurrentDriver=CURRENT_DRIVER
- NameOf DashedLn=DASHED_LINE
- NameOf DefaultFont=DEFAULT_FONT
- NameOf DottedLn=DOTTED_LINE
- NameOf EmptyFill=EMPTY_FILL
- NameOf EuropeanFont=EUROPEAN_FONT
- NameOf GothicFont=GOTHIC_FONT
- NameOf HatchFill=HATCH_FILL
- NameOf HorizDir=HORIZ_DIR
- NameOf InterleaveFill=INTERLEAVE_FILL
- NameOf LeftText=LEFT_TEXT
- NameOf LineFill=LINE_FILL
- NameOf LtBkSlashFill=LTBKSLASH_FILL
- NameOf LtSlashFill=LFSLASH_FILL
- NameOf MaxColors=MAXCOLORS
- NameOf NormalPut=COPY_PUT
- NameOf NormWidth=NORM_WIDTH
- NameOf NotPut=NOT_PUT
- NameOf OrPut=OR_PUT
- NameOf RightText=RIGHT_TEXT
- NameOf SansSerifFont=SANS_SERIF_FONT
- NameOf ScriptFont=SCRIPT_FONT
- NameOf SimplexFont=SIMPLEX_FONT
- NameOf SlashFill=SLASH_FILL
- NameOf SmallFont=SMALL_FONT
- NameOf SolidFill=SOLID_FILL
- NameOf SolidLn=SOLID_LINE
- NameOf ThickWidth=THICK_WIDTH
- NameOf TopOff=FALSE
- NameOf TopOn=TRUE
- NameOf TopText=TOP_TEXT
- NameOf TriplexFont=TRIPLEX_FONT
- NameOf TriplexScrFont=TRIPLEX_SCR_FONT
- NameOf UserBitLn=USERBIT_LINE
- NameOf UserCharSize=USER_CHAR_SIZE
- NameOf UserFill=USER_FILL
- NameOf VertDir=VERT_DIR
- NameOf WideDotFill=WIDE_DOT_FILL
- NameOf XHatchFill=XHATCH_FILL
- NameOf XORPut=XOR_PUT
- NameOf EGABLACK=EGA_BLACK
- NameOf EGABLUE=EGA_BLUE
- NameOf EGAGREEN=EGA_GREEN
- NameOf EGACYAN=EGA_CYAN
- NameOf EGARED=EGA_RED
- NameOf EGAMAGENTA=EGA_MAGENTA
- NameOf EGABROWN=EGA_BROWN
- NameOf EGALIGHTGRAY=EGA_LIGHTGRAY
- NameOf EGADARKGRAY=EGA_DARKGRAY
- NameOf EGALIGHTBLUE=EGA_LIGHTBLUE
- NameOf EGALIGHTGREEN=EGA_LIGHTGREEN
- NameOf EGALIGHTCYAN=EGA_LIGHTCYAN
- NameOf EGALIGHTRED=EGA_LIGHTRED
- NameOf EGALIGHTMAGENTA=EGA_LIGHTMAGENTA
- NameOf EGAYELLOW=EGA_YELLOW
- NameOf EGAWHITE=EGA_WHITE
-
- # record translations
- FieldMacro LineSettingsType.Pattern =(LineSettingsType.upattern)
- FieldMacro ViewPortType.x1 =(ViewPortType.left)
- FieldMacro ViewPortType.y1 =(ViewPortType.top)
- FieldMacro ViewPortType.x2 =(ViewPortType.right)
- FieldMacro ViewPortType.y2 =(ViewPortType.bottom)
-