home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / gnu / djgpp / contrib / bcc2grx / tp2bcc / p2c / tp2bcc.p2c < prev   
Encoding:
Text File  |  1993-04-07  |  3.3 KB  |  107 lines

  1. #
  2. # This p2c resource file contains all definitions needed to
  3. # convert Turbo-Pascal graphics to Borland C++ graphics.
  4. #
  5. # Copyright (C) 1993  Hartmut Schirmer
  6. #
  7. # It may be usefull with djgpp/libgrx/bccgrx too
  8. #
  9. # You might change the folowing definitions so they fit your system
  10. #
  11.  
  12. Language        TURBO     # All programs are in HP Pascal dialect
  13. Integer16       2         # use native int
  14. AnsiC           1         # generate clean ANSI-C
  15. UnsignedChar    2         # use native char
  16. IncludeFrom     graph     <p2c/tp2bcc.h>
  17. ImportFrom      graph     ./p2c/graph.imp
  18.  
  19. # use Turbo comaptible random number generator form bcc2grx
  20. RandIntName     RANDOM_TP   # TP compatible random number generator
  21. RandRealName    RANDOM_R_TP
  22. RandomizeName   RANDZE_TP   # randomize()
  23.  
  24. # some famous CRT routines
  25. FuncMacro KeyPressed() = kbhit()
  26. FuncMacro ReadKey() = getch()
  27. FuncMacro Delay(ms) = delay((unsigned)(ms))
  28.  
  29. # GRAPH routines returning strings
  30. FuncMacro GetModeName(res,mode) = getmodename(mode)
  31. FuncMacro GetDriverName(res) = getdrivername()
  32. FuncMacro GraphErrorMsg(res,err) = grapherrormsg(err)
  33.  
  34. # Naming differences between TURBO-Pascal and Borlamd-C
  35. NameOf AndPut=AND_PUT
  36. NameOf BkSlashFill=BKSLASH_FILL
  37. NameOf BoldFont=BOLD_FONT
  38. NameOf BottomText=BOTTOM_TEXT
  39. NameOf CenterLn=CENTER_LINE
  40. NameOf CenterText=CENTER_TEXT
  41. NameOf CloseDotFill=CLOSE_DOT_FILL
  42. NameOf ComplexFont=COMPLEX_FONT
  43. NameOf CopyPut=COPY_PUT
  44. NameOf CurrentDriver=CURRENT_DRIVER
  45. NameOf DashedLn=DASHED_LINE
  46. NameOf DefaultFont=DEFAULT_FONT
  47. NameOf DottedLn=DOTTED_LINE
  48. NameOf EmptyFill=EMPTY_FILL
  49. NameOf EuropeanFont=EUROPEAN_FONT
  50. NameOf GothicFont=GOTHIC_FONT
  51. NameOf HatchFill=HATCH_FILL
  52. NameOf HorizDir=HORIZ_DIR
  53. NameOf InterleaveFill=INTERLEAVE_FILL
  54. NameOf LeftText=LEFT_TEXT
  55. NameOf LineFill=LINE_FILL
  56. NameOf LtBkSlashFill=LTBKSLASH_FILL
  57. NameOf LtSlashFill=LFSLASH_FILL
  58. NameOf MaxColors=MAXCOLORS
  59. NameOf NormalPut=COPY_PUT
  60. NameOf NormWidth=NORM_WIDTH
  61. NameOf NotPut=NOT_PUT
  62. NameOf OrPut=OR_PUT
  63. NameOf RightText=RIGHT_TEXT
  64. NameOf SansSerifFont=SANS_SERIF_FONT
  65. NameOf ScriptFont=SCRIPT_FONT
  66. NameOf SimplexFont=SIMPLEX_FONT
  67. NameOf SlashFill=SLASH_FILL
  68. NameOf SmallFont=SMALL_FONT
  69. NameOf SolidFill=SOLID_FILL
  70. NameOf SolidLn=SOLID_LINE
  71. NameOf ThickWidth=THICK_WIDTH
  72. NameOf TopOff=FALSE
  73. NameOf TopOn=TRUE
  74. NameOf TopText=TOP_TEXT
  75. NameOf TriplexFont=TRIPLEX_FONT
  76. NameOf TriplexScrFont=TRIPLEX_SCR_FONT
  77. NameOf UserBitLn=USERBIT_LINE
  78. NameOf UserCharSize=USER_CHAR_SIZE
  79. NameOf UserFill=USER_FILL
  80. NameOf VertDir=VERT_DIR
  81. NameOf WideDotFill=WIDE_DOT_FILL
  82. NameOf XHatchFill=XHATCH_FILL
  83. NameOf XORPut=XOR_PUT
  84. NameOf EGABLACK=EGA_BLACK
  85. NameOf EGABLUE=EGA_BLUE
  86. NameOf EGAGREEN=EGA_GREEN
  87. NameOf EGACYAN=EGA_CYAN
  88. NameOf EGARED=EGA_RED
  89. NameOf EGAMAGENTA=EGA_MAGENTA
  90. NameOf EGABROWN=EGA_BROWN
  91. NameOf EGALIGHTGRAY=EGA_LIGHTGRAY
  92. NameOf EGADARKGRAY=EGA_DARKGRAY
  93. NameOf EGALIGHTBLUE=EGA_LIGHTBLUE
  94. NameOf EGALIGHTGREEN=EGA_LIGHTGREEN
  95. NameOf EGALIGHTCYAN=EGA_LIGHTCYAN
  96. NameOf EGALIGHTRED=EGA_LIGHTRED
  97. NameOf EGALIGHTMAGENTA=EGA_LIGHTMAGENTA
  98. NameOf EGAYELLOW=EGA_YELLOW
  99. NameOf EGAWHITE=EGA_WHITE
  100.  
  101. # record translations
  102. FieldMacro LineSettingsType.Pattern  =(LineSettingsType.upattern)
  103. FieldMacro ViewPortType.x1  =(ViewPortType.left)
  104. FieldMacro ViewPortType.y1  =(ViewPortType.top)
  105. FieldMacro ViewPortType.x2  =(ViewPortType.right)
  106. FieldMacro ViewPortType.y2  =(ViewPortType.bottom)
  107.