p2crc
上传用户:upcnvip
上传日期:2007-01-06
资源大小:474k
文件大小:1k
源码类别:

编译器/解释器

开发平台:

C/C++

  1. # Configuration options for translating the p2c examples.
  2. Language HP # All programs are in HP Pascal dialect
  3. VarFiles 0 # This helps basic.text's listtokens procedure work
  4. UseEnum 0 # Not necessary except to keep Sun's pitpicking
  5. # compiler happy.
  6. # These kludges will get basic.c to compile without extra runtime support:
  7. # External procedures:
  8. FuncMacro hpm_new(p,n) = (*p = Malloc(n))
  9. FuncMacro hpm_dispose(p,n) = Free(*p)
  10. FuncMacro misc_getioerrmsg(s,io) = sprintf(s, "I/O Error %d", (int)io)
  11. FuncMacro misc_printerror(er,io) = printf("Error %d/%d!n", (int)er, (int)io)
  12. FuncMacro gotoxy(a,b) = 0
  13. # Functions imported from asm:
  14. FuncMacro asm_iand(a,b) = (a & b)
  15. FuncMacro asm_ior(a,b) = (a | b)
  16. # Functions in basic.text; may as well do these, too:
  17. FuncMacro ixor(a,b) = (a ^ b)
  18. FuncMacro inot(a) = (~a)