File: p2crc

package info (click to toggle)
p2c 1.21alpha2-1
  • links: PTS
  • area: main
  • in suites: potato, woody
  • size: 1,996 kB
  • ctags: 3,399
  • sloc: ansic: 38,617; pascal: 2,499; makefile: 213; perl: 101
file content (29 lines) | stat: -rw-r--r-- 910 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

# Configuration options for translating the p2c examples.


Language	HP	# All programs are in HP Pascal dialect

VarFiles	0	# This helps basic.p's listtokens procedure work

UseEnum		0	# Not necessary except to keep Sun's pitpicking
			# compiler happy.


# These kludges will get basic.c to compile without extra runtime support:
# External procedures:
FuncMacro	hpm_new(p,n) = (*p = Malloc(n))
FuncMacro	hpm_dispose(p,n) = Free(*p)
#FuncMacro	hpm_new(p,n) = (*p = new char[n])
#FuncMacro	hpm_dispose(p,n) = (delete [] *p)
FuncMacro	misc_getioerrmsg(s,io) = sprintf(s, "I/O Error %d", (int)io)
FuncMacro	misc_printerror(er,io) = printf("Error %d/%d!\n", (int)er, (int)io)
FuncMacro	gotoxy(a,b) = (a,b)
# Functions imported from asm:
FuncMacro	asm_iand(a,b) = (a & b)
FuncMacro	asm_ior(a,b) = (a | b)
# Functions in basic.p; may as well do these, too:
FuncMacro	ixor(a,b) = (a ^ b)
FuncMacro	inot(a) = (~a)