Full Code of roundsheep/rpp for AI

master 45fe569af4ad cached
336 files
1.3 MB
765.7k tokens
947 symbols
1 requests
Download .txt
Showing preview only (1,442K chars total). Download the full file or copy to clipboard to get everything.
Repository: roundsheep/rpp
Branch: master
Commit: 45fe569af4ad
Files: 336
Total size: 1.3 MB

Directory structure:
gitextract_hzk6_p1w/

├── README.md
├── bin/
│   ├── build.bat
│   ├── build_run.bat
│   ├── check_all.bat
│   ├── compile_speed.bat
│   ├── example/
│   │   ├── 1.h
│   │   ├── 10_1.h
│   │   ├── 10_2.h
│   │   ├── 10_3.h
│   │   ├── 11_1.h
│   │   ├── 11_2.h
│   │   ├── 11_3.h
│   │   ├── 11_4.h
│   │   ├── 11_5.h
│   │   ├── 11_6.h
│   │   ├── 11_7.h
│   │   ├── 12.h
│   │   ├── 13.h
│   │   ├── 14_1.h
│   │   ├── 14_2.h
│   │   ├── 16_1.h
│   │   ├── 16_2.h
│   │   ├── 16_3.h
│   │   ├── 16_4.h
│   │   ├── 17_1.h
│   │   ├── 17_2.h
│   │   ├── 18_1.h
│   │   ├── 18_2.h
│   │   ├── 19_1.h
│   │   ├── 19_2.h
│   │   ├── 2.h
│   │   ├── 20.h
│   │   ├── 21_1.h
│   │   ├── 21_2.h
│   │   ├── 22_1.h
│   │   ├── 22_2.h
│   │   ├── 23_1.h
│   │   ├── 23_2.h
│   │   ├── 23_3.h
│   │   ├── 24.h
│   │   ├── 25_1.h
│   │   ├── 25_2.h
│   │   ├── 25_3.h
│   │   ├── 26_1.h
│   │   ├── 26_2.h
│   │   ├── 27.h
│   │   ├── 28.h
│   │   ├── 29.h
│   │   ├── 3.h
│   │   ├── 30_1.h
│   │   ├── 30_2.h
│   │   ├── 31.h
│   │   ├── 32_1.h
│   │   ├── 32_2.h
│   │   ├── 32_3.h
│   │   ├── 33_1.h
│   │   ├── 33_2.h
│   │   ├── 34_1.h
│   │   ├── 34_2.h
│   │   ├── 35.h
│   │   ├── 36_1.h
│   │   ├── 36_10.h
│   │   ├── 36_2.h
│   │   ├── 36_3.h
│   │   ├── 36_4.h
│   │   ├── 36_5.h
│   │   ├── 36_6.h
│   │   ├── 36_7.h
│   │   ├── 36_8.h
│   │   ├── 36_9.h
│   │   ├── 40_1.h
│   │   ├── 40_2.h
│   │   ├── 40_3.h
│   │   ├── 40_4.h
│   │   ├── 40_5.h
│   │   ├── 42.h
│   │   ├── 44.h
│   │   ├── 4_1.h
│   │   ├── 4_2.h
│   │   ├── 50.h
│   │   ├── 51.h
│   │   ├── 52.h
│   │   ├── 53.h
│   │   ├── 54.h
│   │   ├── 55.h
│   │   ├── 56.h
│   │   ├── 57.h
│   │   ├── 5_1.h
│   │   ├── 5_2.h
│   │   ├── 6.h
│   │   ├── 7.h
│   │   ├── 8.h
│   │   ├── 9.h
│   │   ├── answer/
│   │   │   ├── 1.txt
│   │   │   ├── 10_1.txt
│   │   │   ├── 10_2.txt
│   │   │   ├── 10_3.txt
│   │   │   ├── 11_1.txt
│   │   │   ├── 11_2.txt
│   │   │   ├── 11_3.txt
│   │   │   ├── 11_4.txt
│   │   │   ├── 11_5.txt
│   │   │   ├── 11_6.txt
│   │   │   ├── 11_7.txt
│   │   │   ├── 12.txt
│   │   │   ├── 13.txt
│   │   │   ├── 14_1.txt
│   │   │   ├── 17_1.txt
│   │   │   ├── 17_2.txt
│   │   │   ├── 18_1.txt
│   │   │   ├── 18_2.txt
│   │   │   ├── 19_1.txt
│   │   │   ├── 19_2.txt
│   │   │   ├── 2.txt
│   │   │   ├── 20.txt
│   │   │   ├── 21_1.txt
│   │   │   ├── 21_2.txt
│   │   │   ├── 22_1.txt
│   │   │   ├── 23_1.txt
│   │   │   ├── 23_2.txt
│   │   │   ├── 23_3.txt
│   │   │   ├── 24.txt
│   │   │   ├── 25_1.txt
│   │   │   ├── 25_2.txt
│   │   │   ├── 25_3.txt
│   │   │   ├── 26_1.txt
│   │   │   ├── 26_2.txt
│   │   │   ├── 27.txt
│   │   │   ├── 28.txt
│   │   │   ├── 29.txt
│   │   │   ├── 3.txt
│   │   │   ├── 30_1.txt
│   │   │   ├── 30_2.txt
│   │   │   ├── 31.txt
│   │   │   ├── 32_1.txt
│   │   │   ├── 32_2.txt
│   │   │   ├── 32_3.txt
│   │   │   ├── 33_1.txt
│   │   │   ├── 33_2.txt
│   │   │   ├── 34_1.txt
│   │   │   ├── 34_2.txt
│   │   │   ├── 35.txt
│   │   │   ├── 36_1.txt
│   │   │   ├── 36_10.txt
│   │   │   ├── 36_2.txt
│   │   │   ├── 36_3.txt
│   │   │   ├── 36_4.txt
│   │   │   ├── 36_5.txt
│   │   │   ├── 36_6.txt
│   │   │   ├── 36_7.txt
│   │   │   ├── 42.txt
│   │   │   ├── 44.txt
│   │   │   ├── 4_1.txt
│   │   │   ├── 4_2.txt
│   │   │   ├── 50.txt
│   │   │   ├── 51.txt
│   │   │   ├── 52.txt
│   │   │   ├── 53.txt
│   │   │   ├── 54.txt
│   │   │   ├── 55.txt
│   │   │   ├── 56.txt
│   │   │   ├── 57.txt
│   │   │   ├── 5_1.txt
│   │   │   ├── 5_2.txt
│   │   │   ├── 6.txt
│   │   │   ├── 7.txt
│   │   │   ├── 8.txt
│   │   │   └── 9.txt
│   │   ├── asm_opt.h
│   │   ├── bf.h
│   │   ├── check.h
│   │   ├── code.h
│   │   ├── compile_speed.h
│   │   ├── count.h
│   │   ├── find.h
│   │   ├── http.h
│   │   ├── line_check.h
│   │   ├── lisp.h
│   │   ├── run.h
│   │   ├── snake.h
│   │   ├── speed_test.h
│   │   ├── time.h
│   │   └── win.h
│   ├── gl/
│   │   ├── 1.h
│   │   ├── 2.h
│   │   ├── 3.h
│   │   ├── frame.h
│   │   ├── gl.h
│   │   ├── line.h
│   │   └── sphere.h
│   ├── ide/
│   │   ├── License.txt
│   │   ├── SciTE.properties
│   │   ├── SciTEGlobal.properties
│   │   ├── asm.properties
│   │   ├── cpp.properties
│   │   ├── lisp.properties
│   │   ├── luaCOPYRIGHT
│   │   ├── modules.api
│   │   ├── python.properties
│   │   └── scite.1
│   ├── launch_ide.bat
│   ├── line_check.bat
│   ├── nasm/
│   │   ├── bin.bat
│   │   ├── bin.h
│   │   ├── cell.h
│   │   ├── dec.inc
│   │   ├── grldr
│   │   ├── menu.lst
│   │   └── windemos.inc
│   ├── open_cmd.bat
│   ├── rcheck.bat
│   ├── rinf/
│   │   ├── conf.txt
│   │   ├── key.txt
│   │   ├── match.txt
│   │   ├── optr.txt
│   │   └── optr2.txt
│   ├── rjit.bat
│   ├── rjit_win.bat
│   ├── rpack.bat
│   ├── rpack_win.bat
│   ├── rsrc/
│   │   ├── basic.h
│   │   ├── carray.h
│   │   ├── char.h
│   │   ├── chs.h
│   │   ├── double.h
│   │   ├── double_j.h
│   │   ├── double_n.h
│   │   ├── eval.h
│   │   ├── float.h
│   │   ├── func.h
│   │   ├── int.h
│   │   ├── int8.h
│   │   ├── int8_j.h
│   │   ├── int8_n.h
│   │   ├── math.h
│   │   ├── new.h
│   │   ├── ralgo.h
│   │   ├── rbuf.h
│   │   ├── rbufm.h
│   │   ├── rcc.h
│   │   ├── rcode.h
│   │   ├── rcode_n.h
│   │   ├── rdic.h
│   │   ├── rdir.h
│   │   ├── rf.h
│   │   ├── rf_g.h
│   │   ├── rf_j.h
│   │   ├── rf_n.h
│   │   ├── rff.h
│   │   ├── rff_j.h
│   │   ├── rff_n.h
│   │   ├── rfile.h
│   │   ├── rfs.h
│   │   ├── rfs_j.h
│   │   ├── rfs_n.h
│   │   ├── rhash.h
│   │   ├── rlist.h
│   │   ├── rmutex.h
│   │   ├── rmutex_j.h
│   │   ├── rmutex_n.h
│   │   ├── rp.h
│   │   ├── rpp.h
│   │   ├── rset.h
│   │   ├── rsock.h
│   │   ├── rstr.h
│   │   ├── rstrw.h
│   │   ├── short.h
│   │   ├── uint.h
│   │   ├── ushort.h
│   │   ├── var.h
│   │   └── varf.h
│   └── run.bat
├── del.bat
├── proj/
│   ├── rpp.sln
│   ├── rpp.vcxproj
│   ├── rpp.vcxproj.filters
│   └── rpp_win/
│       ├── rpp_win.sln
│       ├── rpp_win.vcxproj
│       └── rpp_win.vcxproj.filters
├── rlib/
│   ├── gbk.txt
│   ├── ralgo.h
│   ├── rbase.h
│   ├── rbuf.h
│   ├── rclass.h
│   ├── rcode.h
│   ├── rdb.h
│   ├── rdic.h
│   ├── rdir.h
│   ├── rf.h
│   ├── rfile.h
│   ├── rhash.h
│   ├── rindex.h
│   ├── rlist.h
│   ├── rmutex.h
│   ├── rset.h
│   ├── rsock.h
│   ├── rstr.h
│   ├── rstrw.h
│   └── rthread.h
├── rpp/
│   ├── rpp.cpp
│   ├── rpp_def.h
│   ├── rpp_win.cpp
│   ├── talloc.h
│   ├── tanalyse.h
│   ├── tconf.h
│   ├── tsh.h
│   ├── tstruct.h
│   ├── tvm.h
│   ├── tvm_struct.h
│   ├── zadd.h
│   ├── zasm.h
│   ├── zautof.h
│   ├── zbin.h
│   ├── zclass.h
│   ├── zcontrol.h
│   ├── zctl.h
│   ├── zexp.h
│   ├── zfind.h
│   ├── zftl.h
│   ├── zjit.h
│   ├── zjitb.h
│   ├── zjitf.h
│   ├── zjiti.h
│   ├── zlambda.h
│   ├── zmac.h
│   ├── zmain.h
│   ├── zmatch.h
│   ├── zmemb.h
│   ├── znasm.h
│   ├── zopt.h
│   ├── zpre.h
│   ├── zread.h
│   ├── zsent.h
│   ├── zsrep.h
│   └── zsuper.h
└── update.txt

================================================
FILE CONTENTS
================================================

================================================
FILE: bin/build.bat
================================================
@echo off
rpp.exe example\run.h %1 -build

================================================
FILE: bin/build_run.bat
================================================
@echo off
rem cd /d %~dp0
rpp.exe example\run.h %1

================================================
FILE: bin/check_all.bat
================================================
rjit example\check.h

================================================
FILE: bin/compile_speed.bat
================================================
rpp example\compile_speed.h
pause

================================================
FILE: bin/example/11_4.h
================================================

void main()
{
	putsl(XC_SY_DEFAULT)	
	putsl(test())
	putsl(test2())
}

mac test() 123

mac test2()
{
	234
}

mac XC_SY_DEFAULT 
{
	(1+
	 2+
	 3)
}

================================================
FILE: bin/example/11_5.h
================================================

void main()
{
	B 1 2
	C 1 [2 *3]
	C 1 [2*3*4]
	D 1 [2 3]
	
	v=array<int>[7,8,9]
	v.join('').printl
	
	v=E(1,2,3)
	v.join('').printl
	
	v=E(1,2,3,4)
	v.join('').printl
}

mac$ B _word _word
{
	rf.printl($0##$1)
}

mac$ C _word [ _mword ]
{
	putsl($0+$1)
}

mac$ D _word [ _mword ]
{
	putsl($0+$1=>0+$1=>1)
}

mac$ E ( _mword )
{
	array<int>[$0]
}

================================================
FILE: bin/example/11_6.h
================================================

void main()
{	
	==> 2 3 <==
	
	┏━━━━━┓
	┃ 1     2  ┃
	┃ 3     4  ┃  
	┗━━━━━┛	
}

mac$ ==> _word _word <==
{
	putsl(rstr($0)+rstr($1))
}

mac$ ┏━━━━━┓┃ _word _word ┃ ┃ _word _word ┃┗━━━━━┛
{
	putsl(rstr($0)+'--'+rstr($1)+'--'+rstr($2)+'--'+rstr($3))
}


================================================
FILE: bin/example/11_7.h
================================================
/*
对比宏和模板函数
注意宏是无格式的,因此花括号和分号不可省略
*/

void main()
{
	putsl fb<int>(1,2)
	putsl fb<double>(0.5,0.6)

	putsl fa_int(1,2)
	putsl fa_double(0.5,0.6)	
}

T fb<T>(T a,T b)
{
	return a+b;
}

fa int
fa double

define$ fa _word
{
	$0 fa_##$0($0 a,$0 b)
	{
		return a+b;
	}	
}

================================================
FILE: bin/example/17_1.h
================================================
/*
闭包
*/

void main()
{
	int a=2
	void[lambda(){puts a}]
}

================================================
FILE: bin/example/17_2.h
================================================
/*
匿名函数
*/

void main()
{
	p=lambda(int a,int b){
		putsl a+b
	}
	
	void[p,1,2]
	
	p=lambda(int,int a,int b){
		return a+b
	}
	
	putsl int[p,1,2]
}

================================================
FILE: bin/example/22_2.h
================================================
main
{
	stdcall["MessageBoxA",0,"abc","123",0]
	stdcall["MessageBoxW",0,utf16c("abc"),utf16c("123"),0]
	@MessageBoxA(0,"aaa","bbb",0)
	
#ifdef _JIT
	void[rf.find_dll("MessageBoxA"),0,"111","222",0]
#endif
}

================================================
FILE: bin/example/28.h
================================================
/*
全局变量定义的时候不能使用类型推断
*/


int g_a=2
rbuf<char> g_b(3)

main
{
	putsl g_a
	b=g_b
	b.count.printl
}

================================================
FILE: bin/example/34_2.h
================================================
//嵌套类和嵌套命名空间

namespace A
{
}

class A.B
{
	int m_b
	
	A.B()
	{
		putsl('constructor')
	}

	static void func()
	{
		putsl('func')
	}
}

namespace A.B.C
{
	void func()
	{
		putsl('func')
	}
}

void main()
{
	A.B b
	b.m_b=3
	putsl(b.m_b)
	A.B.func()
	A.B.C.func()
}

================================================
FILE: bin/example/36_6.h
================================================
import rdic.h

main
{
	rdic<int> a
	a['abc']=3
	a['121213']=4
	a['1']=1
	for i=1 to 1000
		a[i.torstr]=i
	a['121213'].printl
}

================================================
FILE: bin/example/36_7.h
================================================
/*
read self
*/

import "rfile.h"

main
{
	rfile file("example/36_7.h")
	file.read_all.sub(3).print
	//auto close file in destructor
}

================================================
FILE: bin/example/42.h
================================================
/*
RPP不支持重载小括号,
但是可以重载中括号实现C++的函数对象(仿函数)
*/

void main()
{
	A<int,int> a=lambda(int,int n){return n*n}
	puts a[3]
}

class A<T1,T2>
{
	void* m_func
	
	=(void* p)
	{
		m_func=p
	}
	
	T1 [](T2 n)
	{
		return T1[m_func,n]
	}
}

================================================
FILE: bin/example/44.h
================================================
/*
惰性求值的方式实现短路求值
RPP是同时支持call_by_name和call_by_need和call_by_value的语言
该示例只能以JIT模式运行
*/

import eval.h

void main()
{
	int* p=null

	//不能用 p!=null&&*p==2 因为 && 是非惰性的
	if and(p!=null,*p==2)
		putsl('and')
	
	rbuf<int> v

	//不能用 v.empty||v[0]!=5 因为 || 是非惰性的
	if or(v.empty,v[0]!=5)
		putsl('or')
	
	//and和or是惰性的,可以带多个参数
	if and(2>1,p==null,v.empty,3!=4)
		putsl('true')

	if and(and(2>1),3!=4)
		putsl('true')

	a=1
	b=2
	c=3

	putsl and(and(a,b),c)
	putsl or(or(a,b),c)

	a=0
	b=1
	c=0

	putsl and(and(a,b),c)
	putsl or(or(a,b),c)
	putsl or(and(a,b),c)
	putsl and(or(a,b),c)
}

================================================
FILE: bin/example/50.h
================================================

main
{
	test1
	test2
	test3
	test4
	test5
	test6
}

//浮点测试
test1
{
	putsl 0.2+0.3
	putsl 0.2*0.3
	putsl 0.2/0.3
	putsl 0.2-0.3
	putsl 0.2<0.3
	putsl 0.2>0.3
	a=99.2*20
	putsl a
	putsl(-2)
}

//逻辑运算测试
test2
{
	putsl 0&&0
	putsl 1&&0
	putsl 0&&1
	putsl 1&&1
	putsl 0||0
	putsl 1||0
	putsl 0||1
	putsl 1||1
}

//自动类型转换测试
test3
{
	uint a=1
	int c=5
	putsl a+sizeof(int)!=c
}

//64位运算测试
test4
{
	int8 a=9
	int8 b=3
	putsl a/b
	putsl a*b
	putsl a%b
	putsl a-b
	putsl a<b
	putsl a>b
}

test5
{
	if (2)==2
		putsl('ok',,,)
}

test6
{
	putsl ORM[1,2]
	putsl ORM[1,2,4,8]
	putsl ORM[1]
}

================================================
FILE: bin/example/51.h
================================================
/*
仅用位运算实现加减乘除,面试专用
*/

main
{
	fadd(1,2).printl
	fadd(19,29999).printl

	fsub(-1,3).printl
	fsub(19,2345).printl

	fmul(99,98).printl
	fmul(-29,235).printl

	fdiv(99,98).printl
	fdiv(9,3).printl
	fdiv(-9,3).printl
	fdiv(8,3).printl
}

int fadd(int x,int y)
{
	for
		a=AND(x,y)
		b=XOR(x,y)
		x=SHL(a,1)
		y=b
		ifn a
			break
	return b
}

int fneg(int x)
{
	return fadd(NOT(x),1)
}

int fsub(int x,int y)
{
	return fadd(x,fneg(y))
}

int fmul(int x,int y)
{
	m=1
	z=0
	if x<0
		x=fneg(x)
		y=fneg(y)
	for x>=m&&y
		if AND(x,m)
			z=fadd(y,z)
		y=SHL(y,1)
		m=SHL(m,1)
	return z
}

int fdiv(int x,int y)
{
	c=0
	sign=0
	if x<0
		x=fneg(x)
		sign=XOR(sign,1)
	if y<0
		y=fneg(y)
		sign=XOR(sign,1)
	if y
		for x>=y
			x=fsub(x,y)
			c=fadd(c,1)
	if sign
		c=fneg(c)
	return c
}

================================================
FILE: bin/example/52.h
================================================
/*
全排列的非递归实现,支持去掉重复
*/

void main()
{
	rbuf<int> v
	#v.push(1,2,3,4)
	for
		v.join('').printl
		ifn next_permutation<int>(v)
			break
}

bool next_permutation<T>(rbuf<T>& v)
{
	if v.count<=1
		return false
	next=v.count-1
	for
		temp=next
		next--
		if v[next]<v[temp]
			mid=v.count-1
			for !(v[next]<v[mid])
				mid--
			r_swap<T>(v[next],v[mid])
			r_reverse<T>(v,temp)
			return true
		if next==0
			r_reverse<T>(v,0)
			return false
}

================================================
FILE: bin/example/53.h
================================================
/*
KMP算法
*/

void main()
{
	putsl(find('abc123','c1'))
	putsl(find('abc123','c2'))
}

int find(rstr s,rstr p)
{
	next=get_next(p)
	i=0
	j=0
	for i<s.count&&j<p.count
		if j==-1||s[i]==p[j]
			i++
			j++
		else
			j=next[j]
	if j==p.count
		return i-j
	return -1
}

rbuf<int> get_next(rstr p)
{
	rbuf<int> next(p.count)
	next[0]=-1
	k=-1
	j=0
	for j<p.count-1
		if k==-1||p[j]==p[k]
			j++
			k++
			if p[j]!=p[k]
				next[j]=k
			else
				next[j]=next[k]
		else
			k=next[k]
	return next
}

================================================
FILE: bin/example/54.h
================================================
/*
50行代码实现正则引擎,参考《代码之美》,可以轻松解决95%的正则问题

c 匹配任意的字母c 
.(句点) 匹配任意的单个字符 
^ 匹配输入字符串的开头 
$ 匹配输入字符串的结尾 
* 匹配前一个字符的零个或者多个出现
*/

main
{
	putsl match('.*txt','2343txt')
	putsl match('t.t','2343txt')
}

bool match(rstr reg,rstr text)
{
	if reg.get(0)==`^
		return match_here(reg.sub(1),text)
	for
		if match_here(reg,text)
			return true
		if text.empty
			return false
		text=text.sub(1)
}

bool match_here(rstr reg,rstr text)
{
	if reg.empty
		return true
	if reg.get(1)==`*
		return match_star(reg.get(0),reg.sub(2),text)
	if reg.get(0)==`$&&reg.sub(1).empty
		return text.empty
	if !text.empty&&(reg.get(0)==`.||reg.get(0)==text.get(0))
		return match_here(reg.sub(1),text.sub(1))
	return false
}

bool match_star(char c,rstr reg,rstr text)
{
	for
		if match_here(reg,text)
			return true
		ifn !text.empty&&(text.get(0)==c||c==`.)
			return false
		text=text.sub(1)
}

================================================
FILE: bin/example/55.h
================================================
/*
栈排序与栈颠倒
*/

void main()
{
	rbuf<int> stack
	#stack.push(3,4,1,9,10,2)
	print(stack)
	func(stack)
	print(stack)
	reverse(stack)
	print(stack)
	sort(stack)
	print(stack)
}

void print(rbuf<int>& stack)
{
	for i=0 to stack.count-1
		putsl(stack[i])
	putsl
}

void sort(rbuf<int>& stack)
{
	if stack.empty
		return
	a=stack.pop
	if stack.empty
		stack.push(a)
		return
	sort(stack)
	b=stack.pop
	if a<b
		stack.push(a)
		sort(stack)
		stack.push(b)
	else
		stack.push(b)
		sort(stack)
		stack.push(a)
}

void func(rbuf<int>& stack)
{
	if stack.count<=1
		return
	a=stack.pop
	func(stack)
	b=stack.pop
	if a<b
		stack.push(a)
		func(stack)
		stack.push(b)
	else
		stack.push(b)
		stack.push(a)
}

void reverse(rbuf<int>& stack)
{
	if stack.count<=1
		return
	a=stack.pop
	reverse(stack)
	b=stack.pop
	reverse(stack)
	stack.push(a)
	reverse(stack)
	stack.push(b)
}

================================================
FILE: bin/example/56.h
================================================
/*
组合遍历
*/

main
{
	n=7
	sum=0
	for i=0;i<n;i++
		for j=i+1;j<n;j++
			for k=j+1;k<n;k++
				sum++
	putsl(sum)

	putsl(A(3,6))
	putsl(A(6,6))
	putsl(C(3,7))
}

int A(int a,int b)
{
	temp=1
	for i=0;i<a;i++
		temp*=b-i
	return temp
}

int C(int a,int b)
{
	return A(a,b)/A(a,a)
} 

================================================
FILE: bin/example/57.h
================================================
/*
4个线程并行计算1个数组的5个元素
*/

void main()
{
	v=array<int>[1,2,3,4,5]
	v.join(' ').printl
	v.parallel(4,lambda(int& a){
		a*=3
	})
	v.join(' ').printl
}

================================================
FILE: bin/example/answer/1.txt
================================================
3

================================================
FILE: bin/example/answer/10_1.txt
================================================
553628800553628800

================================================
FILE: bin/example/answer/10_2.txt
================================================
259

================================================
FILE: bin/example/answer/10_3.txt
================================================
1
rp<char>
47

================================================
FILE: bin/example/answer/11_1.txt
================================================
9
5
55
3628800


================================================
FILE: bin/example/answer/11_2.txt
================================================
1
abc
98
3


================================================
FILE: bin/example/answer/11_3.txt
================================================
1
abc
2
5
20
100


================================================
FILE: bin/example/answer/11_4.txt
================================================
6
123
234


================================================
FILE: bin/example/answer/11_5.txt
================================================
12
7
25
6
789
123
1234


================================================
FILE: bin/example/answer/11_6.txt
================================================
23
1--2--3--4


================================================
FILE: bin/example/answer/11_7.txt
================================================
3
1.100000
3
1.100000


================================================
FILE: bin/example/answer/12.txt
================================================
3
3
3
3


================================================
FILE: bin/example/answer/13.txt
================================================
33333

================================================
FILE: bin/example/answer/14_1.txt
================================================
123
123
2
3
99
98
test
main
C
5


================================================
FILE: bin/example/answer/17_1.txt
================================================
2

================================================
FILE: bin/example/answer/17_2.txt
================================================
3
3


================================================
FILE: bin/example/answer/18_1.txt
================================================
12

================================================
FILE: bin/example/answer/18_2.txt
================================================
12

================================================
FILE: bin/example/answer/19_1.txt
================================================
3
6
103
10
16


================================================
FILE: bin/example/answer/19_2.txt
================================================
3
5


================================================
FILE: bin/example/answer/2.txt
================================================
3

================================================
FILE: bin/example/answer/20.txt
================================================
43

================================================
FILE: bin/example/answer/21_1.txt
================================================
02

================================================
FILE: bin/example/answer/21_2.txt
================================================
2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222

================================================
FILE: bin/example/answer/22_1.txt
================================================
3
3
0
1
-1
3


================================================
FILE: bin/example/answer/23_1.txt
================================================
uint
uint
uint
rstr
int
97
255


================================================
FILE: bin/example/answer/23_2.txt
================================================
2

================================================
FILE: bin/example/answer/23_3.txt
================================================
int
int
0


================================================
FILE: bin/example/answer/24.txt
================================================
411c12

================================================
FILE: bin/example/answer/25_1.txt
================================================
0000011111222223333344444

================================================
FILE: bin/example/answer/25_2.txt
================================================
000011112222000011112222000011112222000011112222000011112222

================================================
FILE: bin/example/answer/25_3.txt
================================================
000011112222000011112222000011112222000011112222000011112222

================================================
FILE: bin/example/answer/26_1.txt
================================================
func int
func char


================================================
FILE: bin/example/answer/26_2.txt
================================================
22

================================================
FILE: bin/example/answer/27.txt
================================================
2253344

================================================
FILE: bin/example/answer/28.txt
================================================
2
3


================================================
FILE: bin/example/answer/29.txt
================================================
23

================================================
FILE: bin/example/answer/3.txt
================================================
3

================================================
FILE: bin/example/answer/30_1.txt
================================================
i>=10
1
0


================================================
FILE: bin/example/answer/30_2.txt
================================================
3

================================================
FILE: bin/example/answer/31.txt
================================================
123
123
abc'123
abc'123
97
97
97
100000000
100000000
10
10
10
0.500000


================================================
FILE: bin/example/answer/32_1.txt
================================================
pass 1
pass 1
pass 1
pass 1
pass 1
pass 2
other
pass 2
pass 2
pass 2
other
other
default
default
default


================================================
FILE: bin/example/answer/32_2.txt
================================================
123456789123456789123456789123456789

================================================
FILE: bin/example/answer/32_3.txt
================================================
a less than b
a less than b
0123456789

================================================
FILE: bin/example/answer/33_1.txt
================================================
23

================================================
FILE: bin/example/answer/33_2.txt
================================================
34

================================================
FILE: bin/example/answer/34_1.txt
================================================
2224

================================================
FILE: bin/example/answer/34_2.txt
================================================
constructor
constructor
3
func
func


================================================
FILE: bin/example/answer/35.txt
================================================
3
2
1


================================================
FILE: bin/example/answer/36_1.txt
================================================
3
2
4
3
2
4


================================================
FILE: bin/example/answer/36_10.txt
================================================
protected code

================================================
FILE: bin/example/answer/36_2.txt
================================================
1
2
3
1
3

1
3


================================================
FILE: bin/example/answer/36_3.txt
================================================
4


================================================
FILE: bin/example/answer/36_4.txt
================================================
321
1343
fj242i
12

12
1343
321
fj242i

12
2


================================================
FILE: bin/example/answer/36_5.txt
================================================
3
6
123


================================================
FILE: bin/example/answer/36_6.txt
================================================
4


================================================
FILE: bin/example/answer/36_7.txt
================================================
/*

read self

*/



import "rfile.h"



main

{

	rfile file("example/36_7.h")

	file.read_all.sub(3).print

	//auto close file in destructor

}

================================================
FILE: bin/example/answer/42.txt
================================================
9

================================================
FILE: bin/example/answer/44.txt
================================================
or
true
true
1
1
0
1
0
0


================================================
FILE: bin/example/answer/4_1.txt
================================================
3

================================================
FILE: bin/example/answer/4_2.txt
================================================
3
3
0
4


================================================
FILE: bin/example/answer/50.txt
================================================
0.500000
0.060000
0.666667
-0.100000
1
0
1984.000000
-2
0
0
0
1
0
1
1
1
0
3
27
0
6
0
1
ok
3
15
1


================================================
FILE: bin/example/answer/51.txt
================================================
3
30018
-4
-2326
9702
-6815
1
3
-3
2


================================================
FILE: bin/example/answer/52.txt
================================================
1234
1243
1324
1342
1423
1432
2134
2143
2314
2341
2413
2431
3124
3142
3214
3241
3412
3421
4123
4132
4213
4231
4312
4321


================================================
FILE: bin/example/answer/53.txt
================================================
2
-1


================================================
FILE: bin/example/answer/54.txt
================================================
1
1


================================================
FILE: bin/example/answer/55.txt
================================================
3
4
1
9
10
2

1
2
3
4
9
10

10
9
4
3
2
1

1
2
3
4
9
10



================================================
FILE: bin/example/answer/56.txt
================================================
35
120
720
35


================================================
FILE: bin/example/answer/57.txt
================================================
1 2 3 4 5
3 6 9 12 15


================================================
FILE: bin/example/answer/5_1.txt
================================================
454545

================================================
FILE: bin/example/answer/5_2.txt
================================================
true232323233

================================================
FILE: bin/example/answer/6.txt
================================================
1abc
123abc
123abc


================================================
FILE: bin/example/answer/7.txt
================================================
-2-2-222

================================================
FILE: bin/example/answer/8.txt
================================================
3eax is not zero

================================================
FILE: bin/example/answer/9.txt
================================================
cab132
123abc


================================================
FILE: bin/example/asm_opt.h
================================================
/*
汇编优化工具
使汇编代码更具可读性,并提高汇编速度
优化15000行大约需要30秒
*/

import rfile.h

main
{
	//name=getsl
	name='http.asm'
	s=rfile.read_all_n(name)

	s=s.replace('\n','\r\n')
	s=s.replace('dword esp','esp')
	s=s.replace('dword ebp','ebp')
	s=s.replace('dword edi','edi')
	s=s.replace('dword esi','esi')
	s=s.replace('dword ebx','ebx')
	s=s.replace(',ecx',', ecx')
	s=s.replace('ebx,0','ebx , 0')
	s=s.replace('ecx,[','ecx , [')
	s=s.replace('mov dword [ edi ] , esi','mov [ edi ] , esi')
	s=opt_sym(s)
	s=line_del(s)
	s=opt_jmp(s)
	s=line_del(s)
	s=opt_two(s)
	s=line_del(s)
	s=sym_replace(s)
	s=line_del(s)

	rfile.write_all_n(name,s)	
}

rstr line_del(rstr& s)
{
	return s.replace('\r\n\r\n\r\n','\r\n\r\n')
}

//符号替换
rstr sym_replace(rstr s)
{
	rbuf<rstr> arr
	r_split_e<rstr>(s,'\r\n',arr)
	rstr ret
	for i in arr
		temp=arr[i]
		if temp.get_top==`:&&is_symbol(temp.sub(0,temp.count-1))
			ret+=sym_trans(temp.sub(0,temp.count-1))+':'
			ret+='\r\n'
			continue
		if (temp.sub(0,5)=='	jmp '||
			temp.sub(0,6)=='	call '||
			temp.sub(0,5)=='	jnz '||
			temp.sub(0,4)=='	jg '||
			temp.sub(0,4)=='	jl '||
			temp.sub(0,5)=='	jae '||
			temp.sub(0,4)=='	jz ')
			index=temp.find(' ')
			symbol=temp.sub(index+1)
			if is_symbol(symbol)
				ret+=temp.sub(0,index+1)+sym_trans(symbol)
				ret+='\r\n'
				continue
		ret+=temp
		ret+='\r\n'
	return ret
}

rstr sym_trans(rstr s)
{
	rstr ret
	for i in s
		two=s.sub(i,i+2)
		if two=='28'||two=='29'//()
			i++
			ret+='_'
		elif two=='2E'||two=='2C'||two=='5F'//.,_
			i++
			ret+='_'
		elif two=='26'
			i++
			ret+='q'
		elif two=='7E'
			i++
			ret+='d'
		elif two=='7C'
			i++
			ret+='h'
		elif two=='5B'
			i++
			ret+='i'
		elif two=='5D'
			i++
			ret+='j'
		elif two=='3D'//=
			i++
			ret+='a'
		elif two=='2B'
			i++
			ret+='b'
		elif two=='2D'//-
			i++
			ret+='s'
		elif two=='2A'//*
			i++
			ret+='t'
		elif two=='2F'
			i++
			ret+='f'
		elif two=='25'
			i++
			ret+='e'
		elif two=='21'//!
			i++
			ret+='o'
		elif two=='3E'//>
			i++
			ret+='x'
		elif two=='3C'//<
			i++
			ret+='y'
		else
			ret+=s[i]
	return seq_replace(ret)
}

rstr seq_replace(rstr s)
{
	//s=s.replace('__','_')
	//s=s.replace('__','_')
	//s=s.replace('__','_')
	if s.get_top==`_
		s.pop
	if s.get_top==`_
		s.pop
	return s
}

//无引用符号删除
rstr opt_sym(rstr s)
{
	rbuf<rstr> arr
	r_split_e<rstr>(s,'\r\n',arr)
	rstr ret
	for i in arr
		temp=arr[i]
		full=temp.sub(0,temp.count-1)
		if temp.get_top==`:&&is_symbol(full)
			symbol=get_symbol(full)
			ifn symbol.empty
				if get_count(arr,i,symbol,full)==1
					continue
		ret+=temp
		ret+='\r\n'
	return ret
}

//jmp后接一个跳转符号
rstr opt_jmp(rstr s)
{
	rbuf<rstr> arr
	r_split_e<rstr>(s,'\r\n',arr)
	rstr ret
	for i in arr
		temp=arr[i]
		a=arr.get(i+1)
		full=a.sub(0,a.count-1)
		if temp.sub(0,5)=='	jmp '&&temp.sub(5)==full&&a.get_top==`:
			symbol=get_symbol(full)
			ifn symbol.empty
				if get_count(arr,i,symbol,full)==2
					i++
					continue
				else
					continue
		ret+=temp
		ret+='\r\n'
	return ret
}

//连续2个jmp,后一个jmp不可能被执行
rstr opt_two(rstr s)
{
	rbuf<rstr> arr
	r_split_e<rstr>(s,'\r\n',arr)
	rstr ret
	for i in arr
		temp=arr[i]
		a=arr.get(i+1)
		if temp.sub(0,5)=='	jmp '&&a.sub(0,5)=='	jmp '
			ret+=temp
			ret+='\r\n'
			i++
			continue
		ret+=temp
		ret+='\r\n'
	return ret
}

int get_count(rbuf<rstr>& arr,int i,rstr& symbol,rstr& full)
{
	for j=i-1;j>=0;j--
		if arr[j].sub(0,arr[j].count-1)==symbol&&`:==arr[j].get_top
			break
	for k=i+1;k<arr.count;k++
		if arr[k].empty
			break
	return find_count(arr,j,k,full)
}

rstr get_symbol(rstr s)
{
	for i=s.count-1;i>=0;i--
		if s[i]==`_&&s.sub(i+1).is_number
			return s.sub(0,i)
	return ''
}

int find_count(rbuf<rstr>& arr,int left,int right,rstr& symbol)
{
	count=0
	for i=left;i<=right;i++
		count+=find_count(arr[i],symbol)
	return count
}

int find_count(rstr src,rstr dst)
{
	count=0
	for i in src
		if src.sub(i,i+dst.count)==dst
			count++
	return count	
}

bool is_symbol(rstr s)
{
	for i in s
		ifn is_symbol(s[i])
			return false
	return true
}

bool is_symbol(char ch)
{
	return ch>=`A&&ch<=`Z||ch>=`a&&ch<=`z||ch>=`0&&ch<=`9||ch==`_
}


================================================
FILE: bin/example/bf.h
================================================
/*
BF解释器增强版,支持32位运算
这个语言并不像看上去那么简单,下面是一个BF版的Hello World:
++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.
>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.
*/

void main()
{
	code=getsl
	rbuf<int> data(30000)
	rf.memset(data.begin,0,data.size)
	pd=0
	for pc=0;pc<code.count;pc++
		switch code[pc]
		case `>
			pd++
		case `<
			pd--
		case `+
			data[pd]++
		case `-
			data[pd]--
		case `.
			puts(rstr.format('%c',data[pd]))
		case `,
			data[pd]=rf.getch
		case `[
			ifn data[pd]
				pc=find< ++ >(pc,code,`[,`])
				continue//这里也可用continued
		case `]
			if data[pd]
				pc=find< -- >(pc,code,`],`[)
				continue
}

int find<T>(int pc,rstr& code,int left,int right)
{
	count=0
	for i=pc;;i T
		if code[i]==left
			count++
		elif code[i]==right
			count--
		if count==0
			return i
}

================================================
FILE: bin/example/check.h
================================================
/*
分别以解释方式和编译方式运行example下所有例子,
并与标准答案进行对比,以此来检验编译器的正确性。
*/

import rdir.h
import rfile.h

int g_sta_ok
int g_total

main
{
	use_paral=rf.get_param.get_top=='-paral'
	g_sta_ok=1
	start=rf.tick
	g_total=0
	v=rdir.get_file_bfs('./example/')
	rbuf<rstr> vname
	for i in v
		name=rdir.get_name(v[i])
		suffix=rdir.get_suffix(name)
		if suffix!='h'
			continue
		a=name.sub(0,name.count-2)
		if is_ignore(a)
			continue
		vname.push(a)
	rbuf<int> vtime
	num=4
	time=rf.tick
	
	if use_paral
		vname.parallel(num,lambda(rstr& b){
			check_interpret(b)
		})
	else
		for i in vname
			check_interpret(vname[i])
			
	vtime.push(rf.tick-time)
	time=rf.tick
	
	if use_paral
		vname.parallel(num,lambda(rstr& b){
			check_jit(b)
		})
	else
		for i in vname
			check_jit(vname[i])
	
	vtime.push(rf.tick-time)
	time=rf.tick
	
	if use_paral
		vname.parallel(num,lambda(rstr& b){
			check_pack(b)
		})
	else
		for i in vname
			check_pack(vname[i])
	
	vtime.push(rf.tick-time)
	time=rf.tick
	
	if use_paral
		vname.parallel(num,lambda(rstr& b){
			check_exe(b)
		})
	else
		for i in vname
			check_exe(vname[i])
	
	vtime.push(rf.tick-time)

	putsl
	for i in vtime
		putsl 'time'+i+': '+vtime[i]
	putsl
	putsl('total: '+g_total)
	putsl('time: '+(rf.tick-start))
	putsl('state: '+r_cond<rstr>(g_sta_ok,'ok','error'))
	rf.getch
}

bool is_ignore(rstr a)
{
	ifn a.sub(0,1).is_number
		return true
	if a=='14_2'||a=='22_2'||a=='36_8'||a=='36_9'
		return true
	if a.sub(0,3)=='16_'
		return true
	if a.sub(0,3)=='40_'
		return true
	return false
}

check_interpret(rstr a)
{
	if a=='21_2'||a=='44'||a=='14_1'
		return
	rf.cmd('rpp example/'+a+'.h > example/answer/'+a+'_tmp.txt')
	check_interpret('example/answer/'+a+'_tmp.txt',
		'example/answer/'+a+'.txt')
}

check_jit(rstr a)
{
	rf.cmd('rjit example\\'+a+'.h > example/answer/'+a+'_tmp.txt')
	check_jit('example/answer/'+a+'_tmp.txt','example/answer/'+a+'.txt')
}

check_pack(rstr a)
{
	rf.cmd('rpack example\\'+a+'.h')
	rf.cmd('example\\'+a+'.exe > example/answer/'+a+'_tmp.txt')
	check_pack('example/answer/'+a+'_tmp.txt','example/answer/'+a+'.txt')
	rfile.remove('example\\'+a+'.exe')
}

check_exe(rstr a)
{
	if a=='13'||a=='22_1'||a=='44'||a=='14_1'
			return
	rf.cmd('run example\\'+a+'.h > example/answer/'+a+'_tmp.txt')
	check_exe('example/answer/'+a+'_tmp.txt','example/answer/'+a+'.txt')
}

check_interpret(rstr a,rstr b)
{
	//不严谨,应该使用互斥体
	g_total++
	cont=rfile.read_all_n(a);
	if cont.count>0&&cont==rfile.read_all_n(b)
		puts('ok ')
	else
		puts('* * * error ')
		g_sta_ok=0
	putsl('interpret '+a.sub(15)+' vs '+b.sub(15))
	ifn rfile.remove(a)
		putsl('* * * error ')
		g_sta_ok=0
}

check_jit(rstr a,rstr b)
{
	g_total++
	cont=rfile.read_all_n(a);
	if cont.count>0&&cont==rfile.read_all_n(b)
		puts('ok ')
	else
		puts('* * * error ')
		g_sta_ok=0
	putsl('jit '+a.sub(15)+' vs '+b.sub(15))
	ifn rfile.remove(a)
		putsl('* * * error ')
		g_sta_ok=0
}

check_pack(rstr a,rstr b)
{
	g_total++
	cont=rfile.read_all_n(a);
	if cont.count>0&&cont==rfile.read_all_n(b)
		puts('ok ')
	else
		puts('* * * error ')
		g_sta_ok=0
	putsl('pack '+a.sub(15)+' vs '+b.sub(15))
	ifn rfile.remove(a)
		putsl('* * * error ')
		g_sta_ok=0
}

check_exe(rstr a,rstr b)
{
	g_total++
	cont=rfile.read_all_n(a)
	cont=cont.sub(cont.find('\x73\x0d\x0a')+3)//去掉golink打印的信息
	if cont.count>0&&cont==rfile.read_all_n(b)
		puts('ok ')
	else
		puts('* * * error ')
		g_sta_ok=0
	putsl('exe '+a.sub(15)+' vs '+b.sub(15))
	ifn rfile.remove(a)
		putsl('* * * error ')
		g_sta_ok=0
}

================================================
FILE: bin/example/code.h
================================================
/*
检查当前目录下文本文件的编码类型
*/

import "rdir.h"

main
{
	v=rdir.get_file_bfs('./')
	for i in v
	{
		if v[i].get_top==`/
			continue
		rfile file(v[i])
		rbuf<char> buf(3)
		ifn(file.read(3,buf.begin))
			break
		s=v[i]+' '
		if(buf[0]==0xff&&buf[1]==0xfe)
			s+='utf16'
		elif(buf[0]==0xef&&buf[1]==0xbb&&buf[2]==0xbf)
			s+='utf8'
		else
			s+='gbk'
		s.printl
	}
}

================================================
FILE: bin/example/compile_speed.h
================================================
//1.h amd 3.45GHZ cost time 3600ms ,new version 2800ms 1.89 2609ms fix2 2516ms 2094ms
//36_2.h cost time 5375ms (1.83 4985ms),new version 4438ms 1.89 4156ms 3375ms
main
{
	start=rf.tick
	for i=1 to 10
		//rf.cmd("rpp example\\36_2.h")
		rf.cmd("rpp example\\1.h")
	putsl
	putsl(rf.tick-start)
}

================================================
FILE: bin/example/count.h
================================================
/*
统计当前目录下代码行数
如果使用utf16统计更准确
*/

import rdir.h
import rfile.h

int g_sum=0

count_line(rstr name)
{
	s=rfile.read_all_n(name)
	sum=1
	for i=0;i<s.count;i++
		if s[i]==0xa
			sum++
	g_sum+=sum
	puts(name+': '+sum+' lines\n')
}

main
{
	path='./'
#ifdef _RVM
	if rf.get_param.count==3
		path=rf.get_param.top
#endif
		
	v=rdir.get_file_bfs(path)
	for i in v
		name=v[i]
		if name.sub(name.count-2)=='.h'
			count_line(name)
		elif name.sub(name.count-4)=='.cpp'
			count_line(name)
	puts('total: '+g_sum)
}

================================================
FILE: bin/example/find.h
================================================
/*
文件搜索工具
*/

import rfile.h
import rdir.h

void main()
{
	dir=\\./
	arr=array<rstr>['cpp','h']
	str='s_ret'
	//todo utf16转换
	v=rdir.get_file_bfs(dir)
	for i in v
		name=rdir.get_name(v[i])
		suffix=rdir.get_suffix(name)
		if(v[i].get_top()==`/)
			continue
		ifn arr.exist(suffix)
			continue
		s=rfile.read_all_n(v[i])
		if s.find(str)<s.count
			putsl(v[i])
}

================================================
FILE: bin/example/line_check.h
================================================
/*
检查代码每行是否超过92字符
rpp -jit example\line_check.h ../rpp/
*/

import rdir.h
import rfile.h

bool check_line(rstrw s)
{
	count=0
	for i=0;i<s.count;i++
		temp=s.sub(i,i+1).torstr.get(0)
		if rcode.is_utf8_3(temp)||rcode.is_utf8_2(temp)
			count+=2
		elif s[i]==r_char('	').toint
			count+=8
		else
			count++
	if count<=92
		return true
	putsl 'count '+count
	putsl(s.torstr)
	return false
}

bool check_s(rstrw s)
{
	rstrw temp
	for i=0;i<s.count;i++
		if s[i]==10&&s.get(i-1)!=13
			return false//temp+=13.toushort
		if s[i]==13&&s.get(i+1)!=10
			return false
		temp+=s[i]
	v=r_split_e_r<rstrw>(temp,'\r\n')
	for i in v
		ifn check_line(v[i])
			putsl('line '+(i+1))
			return false
	return true
}

bool check_file(rstr name)
{
	rfile file(name)
	rbuf<char> buf(3)
	ifn(file.read(3,buf.begin))
		return false
	ok=false
	if(buf[0]==0xff&&buf[1]==0xfe)
		s=rfile.read_all_n(name).sub(2)
		ok=check_s(rstrw(s.begin,s.count))
	elif(buf[0]==0xef&&buf[1]==0xbb&&buf[2]==0xbf)
		s=rfile.read_all_n(name).sub(3)
		ok=check_s(rstrw(s))
	if ok
		return true
	putsl(name)
	return false
}

void main()
{
	if rf.get_param.count<3
		return
	v=rdir.get_file_bfs(rf.get_param.top)
	for i in v
		name=v[i]
		if name.sub(name.count-2)=='.h'
			ifn check_file(name)
				break
		elif name.sub(name.count-4)=='.cpp'
			ifn check_file(name)
				break
}

================================================
FILE: bin/example/lisp.h
================================================
/*
60行RPP实现的lisp解释器
未处理lambda、上下文等,有待完善
*/

void main()
{
	for
		putsl(eval(getsl))
}

rstr eval(rstr s)
{
	return eval(tokenize(s).split(' '))
}

rstr eval(rbuf<rstr>& v)
{
	if v.get(0)!='('
		return v.get(0)
	next=find(v.sub(2))+2
	switch v.get(1)
	case '+'
		return eval(v.sub(2,next)).toint+eval(v.sub(next,v.count-1)).toint
	case '-'
		return eval(v.sub(2,next)).toint-eval(v.sub(next,v.count-1)).toint
	case '*'
		return eval(v.sub(2,next)).toint*eval(v.sub(next,v.count-1)).toint
	case '/'
		return eval(v.sub(2,next)).toint/eval(v.sub(next,v.count-1)).toint
	return ''
}

int find(rbuf<rstr>& v)
{
	return r_cond(v.get(0)=='(',find_sbk(v)+1,1)
}

int find_sbk(rbuf<rstr>& v)
{
	count=0
	for i in v
		if '('==v[i]
			++count
		if ')'==v[i]
			--count
		if 0==count
			return i
	return v.count
}

rstr tokenize(rstr s)
{
	rstr ret
	for i in s
		if s[i]==`(
			ret+=' ( '
		elif s[i]==`)
			ret+=' ) '
		elif s[i]==0xa||s[i]==0xd||s[i]==9
			ret+=' '
		else
			ret+=s[i]
	return ret
}

================================================
FILE: bin/example/run.h
================================================
/*
编译生成exe并运行
*/

import rfile.h
import rdir.h

main
{
	v=rf.get_param
	if v.count<3
		putsl('invaild param')
		return
	a=v[2]
	if rf.cmd('rpp.exe -win '+a)==0
		putsl('compile error')
		return
	b=rdir.get_real_name(a)
	if rf.cmd('nasm\\nasm.exe -f win32 '+b+'.asm -o '+b+'.obj')==0
		clear(b)
		putsl('asm error')
		return
	cmd='nasm\\GoLink.exe /console /mix /entry _main '
	cmd+=b+'.obj msvcrt.dll ws2_32.dll kernel32.dll user32.dll'
	if rf.cmd(cmd)==0
		clear(b)
		putsl('link error')
		return
	clear(b)
	if v.count==3
		rf.cmd(b+'.exe')
	elif v.count==4&&v.get(3)=='-build'
		;
	elif v.count==4&&v.get(3)=='-del'
		rf.cmd(b+'.exe')
		ifn rfile.remove(rcode.gbk_to_utf8(b)+'.exe')
			;//很可能是由于golink没有关闭EXE导致无法删除
	elif v.count==4&&v.get(3)=='-check'
		ifn rfile.remove(rcode.gbk_to_utf8(b)+'.exe')
			putsl 'delete error'
}

clear(rstr b)
{
	b=rcode.gbk_to_utf8(b)
	rfile.remove(b+'.asm')
	rfile.remove(b+'.obj')
}

================================================
FILE: bin/example/snake.h
================================================
/*
彩色版控制台贪食蛇
该游戏只能以解释模式或JIT模式运行
*/

int g_std_out
rbuf<int> g_arr
int g_next
int g_food

void main()
{
begin:
	init	
	start=rf.tick
	for
		key
		if rf.tick-start<100
			continue
		start=rf.tick
		ifn check
			goto begin
		g_arr.push_front(g_arr[0]+g_next)
		if g_food!=g_arr[0]
			g_arr.pop
		else
			food
		update
}

void update()
{
	for i=0 to 199
		gotoxy(i%10*2,i/10)
		if g_arr.exist(i)
			out("■")
		elif i==g_food
			out("★")
		else
			puts("  ")
}

void init()
{
	rf.srand
	g_std_out=rf.GetStdHandle(-11)
	g_next=10
	g_arr.clear
	g_arr.push(105)
	food

	CONSOLE_CURSOR_INFO cur_info
	cur_info.dwSize=1
	cur_info.bVisible=0
	rf.SetConsoleCursorInfo(g_std_out,&cur_info)
	rf.cmd("mode con cols=20 lines=22")//保留一行留给输入法

	rf.SetConsoleTextAttribute(g_std_out,0x0a)
	gotoxy(0,20)
	puts(" ******************")	
}

void key()
{
	if rf.GetAsyncKeyState(0x26)
		temp=-10
	elif rf.GetAsyncKeyState(0x28)
		temp=10
	elif rf.GetAsyncKeyState(0x25)
		temp=-1
	elif rf.GetAsyncKeyState(0x27)
		temp=1
	else
		return
	if g_arr.count<2||g_arr.get(1)!=g_arr.get(0)+temp
		g_next=temp
}

bool check()
{
	temp=g_arr[0]+g_next
	if temp<0||temp>199||int.abs(temp%10-g_arr[0]%10)>1||g_arr.exist(temp)
		rf.MessageBoxA(0,('over len '+g_arr.count).cstr,"",0)
		return false
	return true
}

void food()
{
	g_food=rf.rand()%200
	if g_arr.exist(g_food)
		food
}

void out(char* s)
{
	puts(rcode.utf8_to_gbk(s))
}

void gotoxy(int x,int y)
{
	COORD pos
	pos.x=x
	pos.y=y
	rf.SetConsoleCursorPosition(g_std_out,*(&pos).to<int*>)
}

struct CONSOLE_CURSOR_INFO
{
	int dwSize
	bool bVisible
}

struct COORD
{
	ushort x
	ushort y
}

================================================
FILE: bin/example/time.h
================================================
main
{
	s=getsl
	start=rf.tick
	rf.cmd(s)
	putsl
	putsl(rf.tick-start)
}

================================================
FILE: bin/gl/1.h
================================================
/*
下面是编译期计算示例,sum是一个宏,计算从0加到N
*/

import rpp.h

void main()
{
	putsl sum(100)//输出5050
	putsl sum(10)//输出55
}

macro void sum(rbuf<tword>& v,int index)
{
	result=0
	param=v.get(index+2).val.toint
	for i=0;i<=param;i++
		result+=i
	v[index].val=result
	for i=1;i<=3;i++
		v[index+i].val.clear
}

================================================
FILE: bin/gl/2.h
================================================
/*
RPP的macro具有和Lisp宏一样强大的表达能力
这种宏可以用写代码对代码进行变换,这就比C语言的宏强大得多
下面是变参宏示例
注意macro只能是全局的
*/

import rpp.h

void main()
{
	putsl sum(98,56)
	putsl sum(1,2,3,4)
	putsl sum(43,534,65,645,54,2)
}

macro void sum(rbuf<tword>& v,int index)
{
	left=index+1
	right=find_symm_sbk(v,left)
	result=0
	for i=index+2;i<right;i+=2
		result+=v[i].val.toint
	for i=index;i<=right;i++
		v[i].val.clear
	v[index].val=result
}

================================================
FILE: bin/gl/3.h
================================================
/*
可以发挥想象力定制奇特的宏,
比如宏可以引用整个函数的单词并进行替换,
也可以定制自己的控制结构
*/

import rpp.h

void main()
{
	5 times putsl('hello');
	sum=0;
	10 times sum+=2;
	putsl sum;
}

macro void times(rbuf<tword>& v,int index)
{
	count=v[index-1].val.toint
	for i=index;i<v.count;i++
		if v[i].val==';'
			break
	end=i
	for i=0;i<count;i++
		v[index].multi+=vword_to_vstr(v.sub(index+1,end+1))
	for i=index-1;i<=end;i++
		v[i].val.clear
}

================================================
FILE: bin/gl/frame.h
================================================

import carray.h

define M3DVector3f carray<float,3>
define M3DVector4f carray<float,4>
define M3DMatrix44f carray<float,16>

class GLFrame
{
	M3DVector3f vOrigin
	M3DVector3f vForward
	M3DVector3f vUp
	
	GLFrame()
	{
		vOrigin[0]=0.0f
		vOrigin[1]=0.0f
		vOrigin[2]=0.0f
		vUp[0]=0.0f
		vUp[1]=1.0f
		vUp[2]=0.0f
		vForward[0]=0.0f
		vForward[1]=0.0f
		vForward[2]=-1.0f
	}
	
	void MoveForward(float fDelta)
	{
		vOrigin[0]+=vForward[0]*fDelta
		vOrigin[1]+=vForward[1]*fDelta
		vOrigin[2]+=vForward[2]*fDelta
	}
	
	void MoveRight(float fDelta)
	{
		M3DVector3f vCross
		m3dCrossProduct(vCross,vUp,vForward)
	
		vOrigin[0]+=vCross[0]*fDelta
		vOrigin[1]+=vCross[1]*fDelta
		vOrigin[2]+=vCross[2]*fDelta
	}
	
	static void m3dGetPlaneEquation(M3DVector4f& planeEq,M3DVector3f& p1,
		M3DVector3f& p2,M3DVector3f& p3)
	{
		M3DVector3f v1
		M3DVector3f v2
		
		v1[0]=p3[0]-p1[0]
		v1[1]=p3[1]-p1[1]
		v1[2]=p3[2]-p1[2]
		
		v2[0]=p2[0]-p1[0]
		v2[1]=p2[1]-p1[1]
		v2[2]=p2[2]-p1[2]
		
		m3dCrossProduct(*(&planeEq).to<M3DVector3f*>,v1,v2)
		m3dNormalizeVector(*(&planeEq).to<M3DVector3f*>)
		planeEq[3]=-(planeEq[0]*p3[0]+planeEq[1]*p3[1]+planeEq[2]*p3[2])
	}
	
	static float m3dGetVectorLengthSquared(M3DVector3f& u)
	{ 
		return(u[0]*u[0])+(u[1]*u[1])+(u[2]*u[2])
	}
	
	static float m3dGetVectorLength(M3DVector3f& u)
	{ 
		return FL(math.sqrt(double(m3dGetVectorLengthSquared(u)))) 
	}
	
	static void m3dNormalizeVector(M3DVector3f& u)
	{ 
		m3dScaleVector3(u,1.0f/m3dGetVectorLength(u)) 
	}
	
	static void m3dScaleVector3(M3DVector3f& v,float scale) 
	{ 
		v[0]*=scale 
		v[1]*=scale 
		v[2]*=scale 
	}
	
	static void m3dCrossProduct(M3DVector3f& result,M3DVector3f& u,M3DVector3f& v)
	{
		result[0]=u[1]*v[2]-v[1]*u[2]
		result[1]=-u[0]*v[2]+v[0]*u[2]
		result[2]=u[0]*v[1]-v[0]*u[1]
	}
	
	void ApplyCameraTransform(bool bRotOnly=false) 
	{
		M3DMatrix44f m
		GetCameraOrientation(m)
		@glMultMatrixf(&m)
		if(!bRotOnly)
		{
			@glTranslatef(-vOrigin[0],-vOrigin[1],-vOrigin[2])
		}
	}
	
	static void m3dMakePlanarShadowMatrix(
		M3DMatrix44f& proj,
		M3DVector4f& planeEq, 
		M3DVector4f& vLightPos)
	{	
		float a=planeEq[0]
		float b=planeEq[1]
		float c=planeEq[2]
		float d=planeEq[3]
	
		float dx=-vLightPos[0]
		float dy=-vLightPos[1]
		float dz=-vLightPos[2]
	
		proj[0]=b*dy+c*dz
		proj[1]=-a*dy
		proj[2]=-a*dz
		proj[3]=0.0
	
		proj[4]=-b*dx
		proj[5]=a*dx+c*dz
		proj[6]=-b*dz
		proj[7]=0.0
	
		proj[8]=-c*dx
		proj[9]=-c*dy
		proj[10]=a*dx+b*dy
		proj[11]=0.0
	
		proj[12]=-d*dx
		proj[13]=-d*dy
		proj[14]=-d*dz
		proj[15]=a*dx+b*dy+c*dz
	}
	
	mac M(row,col) m[col*4+row]
	
	void GetCameraOrientation(M3DMatrix44f& m)
	 {
		M3DVector3f x
		M3DVector3f z

		z[0]=-vForward[0]
		z[1]=-vForward[1]
		z[2]=-vForward[2]

		m3dCrossProduct(x,vUp,z)
		
		M(0,0)=x[0]
		M(0,1)=x[1]
		M(0,2)=x[2]
		M(0,3)=0.0
		M(1,0)=vUp[0]
		M(1,1)=vUp[1]
		M(1,2)=vUp[2]
		M(1,3)=0.0
		M(2,0)=z[0]
		M(2,1)=z[1]
		M(2,2)=z[2]
		M(2,3)=0.0
		M(3,0)=0.0
		M(3,1)=0.0
		M(3,2)=0.0
		M(3,3)=1.0
	 }
}

================================================
FILE: bin/gl/gl.h
================================================

void init_glut()
{
	v=rf.get_param
	num=v.count
	rbuf<char*> argv
	for i=0;i<v.count;i++
		argv.push(v[i].cstr)

	@glutInit(&num,argv.begin)
}

mac FL(a) double(a).tofloat

mac D8(a) 
{
	*(&(a)).to<int*>,*((&(a)).to<int*>+1)
}

mac cd_protect
{
	push ebx;
	push esi;
	push edi;
}

mac cd_ret
{
	pop edi;
	pop esi;
	pop ebx;
	pop ebp;
	retn;
}

mac GL_PI 3.1415926

#define GL_POINTS 0x0000
#define GL_LINES 0x0001
#define GL_MODELVIEW 0x1700
#define GL_PROJECTION 0x1701
#define GLfloat float

#define GL_COLOR_BUFFER_BIT 0x00004000
#define GL_DEPTH_BUFFER_BIT 0x00000100

#define GLUT_KEY_F1 0x0001
#define GLUT_KEY_F2 0x0002
#define GLUT_KEY_F3 0x0003
#define GLUT_KEY_F4 0x0004
#define GLUT_KEY_F5 0x0005
#define GLUT_KEY_F6 0x0006
#define GLUT_KEY_F7 0x0007
#define GLUT_KEY_F8 0x0008
#define GLUT_KEY_F9 0x0009
#define GLUT_KEY_F10 0x000A
#define GLUT_KEY_F11 0x000B
#define GLUT_KEY_F12 0x000C
#define GLUT_KEY_LEFT 0x0064
#define GLUT_KEY_UP 0x0065
#define GLUT_KEY_RIGHT 0x0066
#define GLUT_KEY_DOWN 0x0067
#define GLUT_KEY_PAGE_UP 0x0068
#define GLUT_KEY_PAGE_DOWN 0x0069
#define GLUT_KEY_HOME 0x006A
#define GLUT_KEY_END 0x006B
#define GLUT_KEY_INSERT 0x006C

#define GLUT_LEFT_BUTTON 0x0000
#define GLUT_MIDDLE_BUTTON 0x0001
#define GLUT_RIGHT_BUTTON 0x0002
#define GLUT_DOWN 0x0000
#define GLUT_UP 0x0001
#define GLUT_LEFT 0x0000
#define GLUT_ENTERED 0x0001

#define GLUT_RGB 0x0000
#define GLUT_RGBA 0x0000
#define GLUT_INDEX 0x0001
#define GLUT_SINGLE 0x0000
#define GLUT_DOUBLE 0x0002
#define GLUT_ACCUM 0x0004
#define GLUT_ALPHA 0x0008
#define GLUT_DEPTH 0x0010
#define GLUT_STENCIL 0x0020
#define GLUT_MULTISAMPLE 0x0080
#define GLUT_STEREO 0x0100
#define GLUT_LUMINANCE 0x0200

#define GLUT_MENU_NOT_IN_USE 0x0000
#define GLUT_MENU_IN_USE 0x0001
#define GLUT_NOT_VISIBLE 0x0000
#define GLUT_VISIBLE 0x0001
#define GLUT_HIDDEN 0x0000
#define GLUT_FULLY_RETAINED 0x0001
#define GLUT_PARTIALLY_RETAINED 0x0002
#define GLUT_FULLY_COVERED 0x0003

#define GL_LIGHT0 0x4000
#define GL_LIGHT1 0x4001
#define GL_LIGHT2 0x4002
#define GL_LIGHT3 0x4003
#define GL_LIGHT4 0x4004
#define GL_LIGHT5 0x4005
#define GL_LIGHT6 0x4006
#define GL_LIGHT7 0x4007

#define GL_AMBIENT 0x1200
#define GL_DIFFUSE 0x1201
#define GL_SPECULAR 0x1202
#define GL_POSITION 0x1203
#define GL_SPOT_DIRECTION 0x1204
#define GL_SPOT_EXPONENT 0x1205
#define GL_SPOT_CUTOFF 0x1206
#define GL_CONSTANT_ATTENUATION 0x1207
#define GL_LINEAR_ATTENUATION 0x1208
#define GL_QUADRATIC_ATTENUATION 0x1209

#define GL_DEPTH_TEST 0x0B71
#define GL_LIGHTING 0x0B50

#define GL_FRONT 0x0404
#define GL_BACK 0x0405
#define GL_CCW 0x0901
#define GL_CULL_FACE 0x0B44
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
#define GL_COLOR_MATERIAL 0x0B57
#define GL_AMBIENT_AND_DIFFUSE 0x1602
#define GL_SHININESS 0x1601

================================================
FILE: bin/gl/line.h
================================================
/*
RPP for OpenGL
使用上下左右旋转,代码摘自《OpenGL超级宝典》
该例子只能以JIT模式运行,并且需要最新的显卡驱动
运行命令:rjit gl\line.h
*/

import math.h
import gl.h

double g_x
double g_y

void main()
{
	g_x=0
	g_y=0
	
	void* handle=@LoadLibraryA("gl/freeglut.dll")
	if handle==null
		return
	void[rf.find_dll("set_dll_list")]
	
	init_glut
	@glutInitWindowSize(800,600)
	@glutCreateWindow("line")
	@glutInitDisplayMode(ORM[GLUT_DOUBLE,GLUT_RGBA,GLUT_DEPTH])
	@glutDisplayFunc(&render)
	
	@glutSpecialFunc(lambda(int key,int x,int y){
		cd_protect
		input(key,x,y)
		cd_ret
	})
	@glutReshapeFunc(lambda(int w,int h){
		cd_protect
		change(w,h)
		cd_ret
	})
	
	init()
	
	@glutMainLoop()
	
	@FreeLibrary(handle)
}

cfunc void render()
{
	@glClear(GL_COLOR_BUFFER_BIT)
	@glPushMatrix()
	@glRotatef(FL(g_x),1.0f,0.0f,0.0f)
	@glRotatef(FL(g_y),0.0f,1.0f,0.0f)

	@glBegin(GL_LINES)
	z=0.0
	for angle=0.0;angle<=GL_PI;angle+=GL_PI/20.0
		x=50.0*math.sin(angle)
		y=50.0*math.cos(angle)
		@glVertex3f(FL(x),FL(y),FL(z))
		x=50.0*math.sin(angle+GL_PI)
		y=50.0*math.cos(angle+GL_PI)	
		@glVertex3f(FL(x),FL(y),FL(z))
	@glEnd()
	
	@glPopMatrix()
	@glutSwapBuffers()
}

void input(int key,int x,int y)
{
	switch key
	case GLUT_KEY_UP
		g_x-=5.0
	case GLUT_KEY_DOWN
		g_x+=5.0
	case GLUT_KEY_LEFT
		g_y-=5.0
	case GLUT_KEY_RIGHT
		g_y+=5.0
	@glutPostRedisplay()
}

void change(int w,int h)
{
	range=100.0
	if h==0
		h=1
	@glViewport(0,0,w,h)
	@glMatrixMode(GL_PROJECTION)
	@glLoadIdentity()
	if w<=h
		@glOrtho(D8(-range),D8(range),D8(-range*h/w),
			D8(range*h/w),D8(-range),D8(range))
	else
		@glOrtho(D8(-range*w/h),D8(range*w/h),D8(-range),
			D8(range),D8(-range),D8(range))
	@glMatrixMode(GL_MODELVIEW)
	@glLoadIdentity()
}

void init()
{
	@glClearColor(0.0f,0.0f,0.0f,0.0f)
	@glColor3f(0.0f,1.0f,0.0f)
}

================================================
FILE: bin/gl/sphere.h
================================================
/*
RPP for OpenGL
使用上下左右移动,代码摘自《OpenGL超级宝典》
该例子只能以JIT模式运行,并且需要最新的显卡驱动
运行命令:rjit gl\sphere.h
*/

import math.h
import gl.h
import frame.h

M3DMatrix44f g_shadow_matrix
GLFrame g_camera
double g_y
carray<float,4> g_light_pos
carray<float,4> g_no_light
carray<float,4> g_low_light
carray<float,4> g_bright_light

void main()
{
	g_y=0
	g_light_pos=array<float>[-100.0f, 100.0f, 50.0f, 1.0f]
	g_no_light=array<float>[0.0f, 0.0f, 0.0f, 0.0f]
	g_low_light=array<float>[0.25f, 0.25f, 0.25f, 1.0f]
	g_bright_light=array<float>[1.0f, 1.0f, 1.0f, 1.0f]
	
	void* handle=@LoadLibraryA("gl/freeglut.dll")
	if handle==null
		return
	void[rf.find_dll("set_dll_list")]
	
	init_glut
	@glutInitWindowSize(800,600)
	@glutCreateWindow("sphere")
	@glutInitDisplayMode(ORM[GLUT_DOUBLE,GLUT_RGBA,GLUT_DEPTH])
	@glutDisplayFunc(&render)
	
	@glutSpecialFunc(lambda(int key,int x,int y){
		cd_protect
		input(key,x,y)
		cd_ret
	})
	@glutReshapeFunc(lambda(int w,int h){
		cd_protect
		change(w,h)
		cd_ret
	})
	
	init()
	
	@glutMainLoop()
	
	@FreeLibrary(handle)
}

void draw(int shadow)
{
	if shadow==0
		g_y+=0.3f
	else
		@glColor3f(0.0f,0.0f,0.0f)
	if shadow==0
		@glColor3f(0.0f,1.0f,0.0f)
	@glPushMatrix()
	@glTranslatef(0.0f,0.1f,-2.5f)
	if shadow==0
		@glColor3f(0.0f,0.0f,1.0f)
	
	@glPushMatrix()
	@glRotatef(FL(-g_y*2.0f),0.0f,1.0f,0.0f)
	@glTranslatef(1.0f,0.0f,0.0f)
	@glutWireTorus(D8(0.1),D8(0.1),17,9)
	@glPopMatrix()
	
	if shadow==0
		@glColor3f(0.0f,1.0f,0.0f)
		@glMaterialfv(GL_FRONT,GL_SPECULAR,&g_bright_light)
	@glRotatef(g_y.tofloat,0.0f,1.0f,0.0f)
	@glutWireTorus(D8(0.15),D8(0.35),61,37)
	@glMaterialfv(GL_FRONT,GL_SPECULAR,&g_no_light)
	@glPopMatrix()
}

cfunc void render()
{
	@glClear(ORM[GL_COLOR_BUFFER_BIT,GL_DEPTH_BUFFER_BIT])
	@glPushMatrix()
	g_camera.ApplyCameraTransform()
	
	@glLightfv(GL_LIGHT0,GL_POSITION,&g_light_pos)
	
	@glColor3f(0.60f,0.40f,0.10f)
	
	@glDisable(GL_DEPTH_TEST)
	@glDisable(GL_LIGHTING)
	@glPushMatrix()
	@glMultMatrixf(&g_shadow_matrix)
	
	draw(1)
	
	@glPopMatrix()
	@glEnable(GL_LIGHTING)
	@glEnable(GL_DEPTH_TEST)
	
	draw(0)
	@glPopMatrix()
	@glutSwapBuffers()
	@glutPostRedisplay()
}

void input(int key,int x,int y)
{
	switch key
	case GLUT_KEY_UP
		g_camera.MoveForward(0.1f)
	case GLUT_KEY_DOWN
		g_camera.MoveForward(-0.1f)
	case GLUT_KEY_LEFT
		g_camera.MoveRight(0.1f)
	case GLUT_KEY_RIGHT
		g_camera.MoveRight(-0.1f)
	@glutPostRedisplay()
}

void change(int w,int h)
{
	if h==0
		h=1
	@glViewport(0,0,w,h)
	@glMatrixMode(GL_PROJECTION)
	@glLoadIdentity()
	@gluPerspective(D8(35.0),D8(double(w)/h),D8(1.0f),D8(50.0f))
	@glMatrixMode(GL_MODELVIEW)
	@glLoadIdentity()
}

void init()
{
	M3DVector3f vPoints0=array<float>[0.0f,-0.4f,0.0f]
	M3DVector3f vPoints1=array<float>[10.0f,-0.4f,0.0f]
	M3DVector3f vPoints2=array<float>[5.0f,-0.4f,-5.0f]

	@glClearColor(g_low_light[0],g_low_light[1],g_low_light[2],g_low_light[3])
	
	@glCullFace(GL_BACK)
	@glFrontFace(GL_CCW)
	@glEnable(GL_CULL_FACE)
	@glEnable(GL_DEPTH_TEST)
	
	@glLightModelfv(GL_LIGHT_MODEL_AMBIENT,&g_no_light)
	@glLightfv(GL_LIGHT0,GL_AMBIENT,&g_low_light)
	@glLightfv(GL_LIGHT0,GL_DIFFUSE,&g_bright_light)
	@glLightfv(GL_LIGHT0,GL_SPECULAR,&g_bright_light)
	@glEnable(GL_LIGHTING)
	@glEnable(GL_LIGHT0)

	M3DVector4f vPlaneEquation
	GLFrame.m3dGetPlaneEquation(vPlaneEquation,vPoints0,vPoints1,vPoints2)

	GLFrame.m3dMakePlanarShadowMatrix(g_shadow_matrix,vPlaneEquation,g_light_pos)

	@glEnable(GL_COLOR_MATERIAL)
	@glColorMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE)
	@glMateriali(GL_FRONT,GL_SHININESS,128)
}

================================================
FILE: bin/ide/License.txt
================================================
License for Scintilla and SciTE

Copyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>

All Rights Reserved 

Permission to use, copy, modify, and distribute this software and its 
documentation for any purpose and without fee is hereby granted, 
provided that the above copyright notice appear in all copies and that 
both that copyright notice and this permission notice appear in 
supporting documentation. 

NEIL HODGSON DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS 
SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 
AND FITNESS, IN NO EVENT SHALL NEIL HODGSON BE LIABLE FOR ANY 
SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE 
OR PERFORMANCE OF THIS SOFTWARE. 

================================================
FILE: bin/ide/SciTE.properties
================================================
# SciTE.properties is the per directory local options file and can be used to
# override settings made in SciTEGlobal.properties, SciTEUser.properties and
# SciTEDirectory.properties.
command.build.directory.*.cxx=..\win32
command.build.directory.*.h=..\win32
command.build.*.cxx=nmake -f scite.mak DEBUG=1 QUIET=1
command.build.*.h=nmake -f scite.mak DEBUG=1 QUIET=1
command.go.*.cxx=..\bin\SciTE
command.go.*.h=..\bin\SciTE
command.go.needs.*.cxx=cmd /c cd ..\win32 && nmake -f scite.mak DEBUG=1 QUIET=1


================================================
FILE: bin/ide/SciTEGlobal.properties
================================================
# Global initialisation file for SciTE
# For Linux, place in $prefix/share/scite
# For Windows, place in same directory as SciTE.EXE (or Sc1.EXE)
# Documentation at http://www.scintilla.org/SciTEDoc.html

# Globals

# Window sizes and visibility
if PLAT_WIN
	position.left=0
	position.top=0
if PLAT_GTK
	position.left=5
	position.top=22
position.width=576
position.height=740
#position.maximize=1
#position.tile=1
#full.screen.hides.menu=1
#minimize.to.tray=1
split.vertical=0
#output.horizontal.size=200
#output.vertical.size=60
#output.initial.hide=1
#horizontal.scrollbar=0
#horizontal.scroll.width=10000
#horizontal.scroll.width.tracking=0
#output.horizontal.scrollbar=0
#output.horizontal.scroll.width=10000
#output.horizontal.scroll.width.tracking=0
#output.scroll=0
#error.select.line=1
#end.at.last.line=0
tabbar.visible=1
#tabbar.hide.one=1
#tabbar.multiline=1
#toolbar.visible=1
#toolbar.usestockicons=1
#toolbar.large=1
#menubar.detachable=1
#undo.redo.lazy=1
statusbar.visible=1
#fileselector.width=800
#fileselector.height=600
#fileselector.show.hidden=1
#magnification=-1
#output.magnification=-1

# Sizes and visibility in edit pane
line.margin.visible=1
line.margin.width=4
margin.width=16
#fold.margin.width=16
#fold.margin.colour=#FF0000
#fold.margin.highlight.colour=#0000FF
#blank.margin.left=4
#blank.margin.right=4
buffered.draw=1
#phases.draw=2
if PLAT_WIN
	technology=1
#font.quality=3
if PLAT_MAC
	font.quality=3

# Element styles
#view.eol=1
#control.char.symbol=.
caret.period=500
view.whitespace=0
view.indentation.whitespace=1
view.indentation.guides=1
view.indentation.examine=3
highlight.indentation.guides=1
#caret.fore=#FF0000
#caret.additional.blinks=0
#caret.width=2
#caret.line.back=#FFFED8
#caret.line.back.alpha=63
edge.column=200
edge.mode=0
edge.colour=#C0DCC0
braces.check=1
braces.sloppy=1
#selection.fore=#006000
# DADADA used as background because it yields standard silver C0C0C0
# on low colour displays and a reasonable light grey on higher bit depths
if PLAT_WINNT
	selection.alpha=32
	selection.back=#000000
if PLAT_GTK
	selection.alpha=30
	selection.back=#000000
if PLAT_MAC
	selection.alpha=32
	selection.back=#000000
#selection.additional.fore=#0000A0
#selection.additional.back=#000080
#selection.additional.alpha=20
#selection.rectangular.switch.mouse=1
#selection.multiple=0
#selection.additional.typing=0
#virtual.space=3
#rectangular.selection.modifier=4
#whitespace.fore=#FF0000
#whitespace.back=#FFF0F0
#error.marker.fore=#0000A0
#error.marker.back=#DADAFF
#error.inline=1
bookmark.fore=#BE0000
#bookmark.back=#FFFFA0
#bookmark.alpha=
#find.mark=#0000FF
#find.mark.indicator=style:compositionthick,colour:#FFB700,under
#highlight.current.word=1
#highlight.current.word.by.style=1
#highlight.current.word.colour=#00D040
#highlight.current.word.indicator=style:roundbox,colour:#0080FF,under,outlinealpha:140,fillalpha:80
#indicators.alpha=63
#indicators.under=1

# Scripting
ext.lua.startup.script=$(SciteUserHome)/SciTEStartup.lua
ext.lua.auto.reload=1
#ext.lua.reset=1

# Checking
are.you.sure=1
#are.you.sure.for.build=1
#save.all.for.build=1
#quit.on.close.last=1
#load.on.activate=1
#save.on.deactivate=1
#are.you.sure.on.reload=1
#save.on.timer=20
#reload.preserves.undo=1
#check.if.already.open=1
#temp.files.sync.load=1
default.file.ext=.cxx
#source.default.extensions=.h|.cxx|.bat
#title.full.path=1
#title.show.buffers=1
#pathbar.visible=1
#save.recent=1
#save.session=1
#session.bookmarks=1
#session.folds=1
#save.position=1
#save.find=1
#open.dialog.in.file.directory=1
#strip.trailing.spaces=1
#ensure.final.line.end=1
#ensure.consistent.line.ends=1
#save.deletes.first=1
#save.check.modified.time=1
buffers=40
#buffers.zorder.switching=1
api.*=$(SciteDefaultHome)\modules.api
#locale.properties=locale.de.properties
#translation.missing=***
#read.only=1
#background.open.size=20000
#background.save.size=20000
if PLAT_GTK
	background.save.size=10000000
#max.file.size=1

# Indentation
tabsize=8
indent.size=8
use.tabs=1
indent.auto=1
indent.automatic=1
indent.opening=0
indent.closing=0
#tab.indents=0
#backspace.unindents=0

# Wrapping of long lines
wrap=1
wrap.style=2
cache.layout=3
output.wrap=1
output.cache.layout=3
#wrap.visual.flags=3
#wrap.visual.flags.location=3
#wrap.indent.mode=1
#wrap.visual.startindent=4

# Folding
# enable folding, and show lines below when collapsed.
fold=1
fold.compact=1
fold.flags=16
fold.symbols=1
#fold.highlight=1
#fold.highlight.colour=#00C0C0
#fold.on.open=1
fold.comment=1
fold.preprocessor=1

# Find and Replace
# Internal search always available with recursive capability so use in preference to external tool
find.command=
# findstr is available on recent versions of Windows including 2000
#if PLAT_WIN
#	find.command=findstr /n /s $(find.what) $(find.files)
#find.input=$(find.what)
#if PLAT_GTK
#	find.command=grep --line-number "$(find.what)" $(find.files)
find.files=*.c *.cxx *.h
#find.in.files.close.on.find=0
#find.in.dot=1
#find.in.binary=1
#find.in.directory=
#find.close.on.find=0
#find.replace.matchcase=1
#find.replace.escapes=1
#find.replace.regexp=1
#find.replace.regexp.posix=1
#find.replace.wrap=0
#find.replacewith.focus=0
#find.replace.advanced=1
find.use.strip=1
#find.strip.incremental=1
#find.indicator.incremental=style:compositionthick,colour:#FFB700,under
replace.use.strip=1
#replace.strip.incremental=1
#strip.button.height=24

# Behaviour
#eol.mode=LF
eol.auto=1
clear.before.execute=0
#vc.home.key=1
#wrap.aware.home.end.keys=1
autocompleteword.automatic=1
#autocomplete.choose.single=1
#autocomplete.*.fillups=([
word.chars.d=.$(chars.alpha)$(chars.numeric)_#
autocomplete.*.start.characters=$(word.chars.d)
caret.policy.xslop=1
caret.policy.width=20
caret.policy.xstrict=0
caret.policy.xeven=0
caret.policy.xjumps=0
caret.policy.yslop=1
caret.policy.lines=1
caret.policy.ystrict=1
caret.policy.yeven=1
caret.policy.yjumps=0
#visible.policy.strict=1
#visible.policy.slop=1
#visible.policy.lines=4
#time.commands=1
#caret.sticky=1
#properties.directory.enable=1

# Status Bar
statusbar.number=4
statusbar.text.1=\
li=$(LineNumber) co=$(ColumnNumber) $(OverType) ($(EOLMode)) $(FileAttr)
statusbar.text.2=\
$(BufferLength) chars in $(NbOfLines) lines. Sel: $(SelLength) chars.
statusbar.text.3=\
Now is: Date=$(CurrentDate) Time=$(CurrentTime)
statusbar.text.4=\
$(FileNameExt) : $(FileDate) - $(FileTime) | $(FileAttr)

if PLAT_WIN
	command.scite.help="file://$(SciteDefaultHome)\SciTEDoc.html"
	command.scite.help.subsystem=2
if PLAT_GTK
	command.print.*=a2ps "$(FileNameExt)"
	command.scite.help=xdg-open "file://$(SciteDefaultHome)/SciTEDoc.html"

# Internationalisation
# Japanese input code page 932 and ShiftJIS character set 128
#code.page=932
#character.set=128
# Unicode
code.page=65001
#code.page=936
character.set=132
#command.discover.properties=python /home/user/FileDetect.py "$(FilePath)"
# Required for Unicode to work on GTK+:
#LC_CTYPE=en_US.UTF-8
if PLAT_GTK
	output.code.page=65001
if PLAT_MAC
	output.code.page=65001

# Export
#export.keep.ext=1
export.html.wysiwyg=1
#export.html.tabs=1
#export.html.folding=1
export.html.styleused=1
#export.html.title.fullpath=1
#export.rtf.tabs=1
#export.rtf.font.face=Arial
#export.rtf.font.size=9
#export.rtf.tabsize=8
#export.rtf.wysiwyg=0
#export.tex.title.fullpath=1
# Magnification (added to default screen font size)
export.pdf.magnification=0
# Font: Courier, Helvetica or Times (Courier line-wraps)
export.pdf.font=Helvetica
# Page size (in points): width, height
# E.g. Letter 612,792; A4 595,842; maximum 14400,14400
export.pdf.pagesize=595,842
# Margins (in points): left, right, top, bottom
export.pdf.margins=72,72,72,72
export.xml.collapse.spaces=1
export.xml.collapse.lines=1

# Define values for use in the imported properties files
chars.alpha=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
chars.numeric=0123456789
chars.accented=
# This is a better set for Russian:
#chars.accented=娸

# The open.filter setting is used in the file selector which has a menu of filters to apply
# to the types of files seen when opening.
# There is a limit (possibly 256 characters) to the length of a filter on Windows,
# so not all source extensions can be in this setting.
source.files=*.asm;*.c;*.cc;*.cpp;*.cxx;*.cs;*.h;*.hh;*.hxx;*.hpp;\
*.idl;*.odl;*.rc;*.rc2;*.dlg;*.def;\
*.vb;*.vbs;*.bas;*.frm;*.cls;*.ctl;\
*.java;*.js;*.py;*.pyw;*.pl;*.rb;*.cgi;*.lua;*.conf;\
make*;*.mak;\
*.properties;*.html;*.xml;*.iface;*.bat;*.e;*.m;*.mm;\
*.sh;*.patch

# Each platform has a different idea of the most important filters
if PLAT_WIN
	all.files=All Files (*.*)|*.*|
	top.filters=All Source|$(source.files)|$(all.files)
if PLAT_GTK
	all.files=All Files (*)|*|Hidden Files (.*)|.*|
	top.filters=All Source|$(source.files)|$(all.files)
# As OS X only greys out filtered files, show all as default
if PLAT_MAC
	all.files=All Files (*.*)|*.*|
	top.filters=$(all.files)All Source|$(source.files)|

open.filter=\
$(top.filters)\
$(filter.ada)\
$(filter.conf)\
$(filter.asm)\
$(filter.asn1)\
$(filter.ave)\
$(filter.baan)\
$(filter.bash)\
$(filter.caml)\
$(filter.cmake)\
$(filter.cpp)\
#$(filter.ch)\
$(filter.css)\
$(filter.d)\
$(filter.eiffel)\
$(filter.erlang)\
$(filter.fortran)\
$(filter.gap)\
#$(filter.hs)\
$(filter.idl)\
$(filter.inno)\
$(filter.java)\
$(filter.js)\
$(filter.kix)\
$(filter.lout)\
$(filter.lua)\
$(filter.matlab)\
$(filter.metapost)\
$(filter.mmixal)\
#$(filter.modula3)\
$(filter.nncrontab)\
$(filter.nsis)\
$(filter.opal)\
$(filter.pascal)\
$(filter.perl)\
$(filter.php)\
$(filter.pov)\
$(filter.powershell)\
$(filter.prg)\
$(filter.properties)\
$(filter.ps)\
$(filter.python)\
$(filter.r)\
$(filter.ruby)\
#$(filter.rust)\
$(filter.sql)\
$(filter.specman)\
$(filter.tcl)\
$(filter.tex)\
$(filter.text)\
$(filter.txt2tags)\
$(filter.vb)\
$(filter.web)\
$(filter.yaml)\
$(filter.verilog)\
$(filter.vhdl)

#save.filter=$(open.filter)

# Give symbolic names to the set of fonts used in the standard styles.
if PLAT_WIN
	font.base=font:Verdana,size:13
	font.small=font:Verdana,size:13
	font.comment=font:Georgia,size:10.1
	font.code.comment.box=$(font.comment)
	font.code.comment.line=$(font.comment)
	font.code.comment.doc=$(font.comment)
	font.code.comment.nested=$(font.comment)
	font.text=font:Times New Roman,size:11
	font.text.comment=font:Verdana,size:9
	font.embedded.base=font:Verdana,size:9
	font.embedded.comment=font:Comic Sans MS,size:8
	font.monospace=font:Consolas,size:8.9
	font.vbs=font:Lucida Sans Unicode,size:10
if PLAT_GTK
	font.base=font:Bitstream Vera Sans,size:9
	font.small=font:Bitstream Vera Sans,size:8
	font.comment=font:Bitstream Vera Serif,size:9
	font.code.comment.box=$(font.comment)
	font.code.comment.line=$(font.comment)
	font.code.comment.doc=$(font.comment)
	font.code.comment.nested=$(font.comment)
	font.text=font:Bitstream Charter,size:10
	font.text.comment=font:Serif,size:9
	font.embedded.base=font:Serif,size:9
	font.embedded.comment=font:Serif,size:9
	font.monospace=font:Bitstream Vera Sans Mono,size:9
	font.vbs=font:Bitstream Vera Sans Mono,size:9
if PLAT_MAC
	font.base=font:Verdana,size:12
	font.small=font:Verdana,size:10
	font.comment=font:Georgia,size:13
	font.code.comment.box=$(font.comment)
	font.code.comment.line=$(font.comment)
	font.code.comment.doc=$(font.comment)
	font.code.comment.nested=$(font.comment)
	font.text=font:Times New Roman,size:13
	font.text.comment=font:Verdana,size:11
	font.embedded.base=font:Verdana,size:11
	font.embedded.comment=font:Comic Sans MS,size:10
	font.monospace=font:Courier New,size:12
	font.vbs=font:Lucida Sans Unicode,size:12
font.js=$(font.comment)

# Give symbolic names to the set of colours used in the standard styles.
colour.code.comment.box=fore:#007F00
colour.code.comment.line=fore:#007F00
colour.code.comment.doc=fore:#3F703F
colour.code.comment.nested=fore:#A0C0A0
colour.text.comment=fore:#0000FF,back:#D0F0D0
colour.other.comment=fore:#007F00
colour.embedded.comment=back:#E0EEFF
colour.embedded.js=back:#F0F0FF
colour.notused=back:#FF0000

colour.number=fore:#007F7F
colour.keyword=fore:#00007F
colour.string=fore:#7F007F
colour.char=fore:#7F007F
colour.operator=fore:#000000
colour.preproc=fore:#7F7F00
colour.error=fore:#FFFF00,back:#FF0000

# Global default styles for all languages
# Default
style.*.32=$(font.monospace),size:15
# Line number
style.*.33=back:#C0C0C0,$(font.base)
# Brace highlight
style.*.34=fore:#0000FF,bold
# Brace incomplete highlight
style.*.35=fore:#FF0000,bold
# Control characters
style.*.36=
# Indentation guides
style.*.37=fore:#C0C0C0,back:#FFFFFF

# Printing
#print.colour.mode=1
print.magnification=-1
# Windows-only setup: left, right, top, bottom margins, in local units:
# hundredths of millimeters or thousandths of inches
print.margins=1500,1000,1000,1500
# Header/footer:
print.header.format=$(FileNameExt) -- Printed on $(CurrentDate), $(CurrentTime) -- Page $(CurrentPage)
print.footer.format=$(FilePath) -- File date: $(FileDate) -- File time: $(FileTime)
# Header/footer style
print.header.style=font:Arial,size:12,bold
print.footer.style=font:Arial Narrow,size:10,italics

# Warnings - only works on Windows and needs to be pointed at files on machine
#if PLAT_WIN
#	warning.findwrapped=100,E:\Windows\Media\SFX\Boing.wav
#	warning.notfound=0,Effect.wav
#	warning.wrongfile=0,Glass.wav
#	warning.executeok=0,Fanfare.wav
#	warning.executeko=100,GlassBreak.wav
#	warning.nootherbookmark=100,Boing2.wav

# Define the Lexer menu,
# Each item contains three parts: menu string | file extension | key
# The only keys allowed currently are based on F-keys and alphabetic keys and look like
# [Ctrl+][Shift+][Fn|a] such as F12 or Ctrl+Shift+D.
# A '&' may be placed before a letter to be used as an accelerator. This does not work on GTK+.

keyText=Shift+F11
keyMake=Ctrl+Shift+F11
keyHTML=F12
keyXML=Shift+F12
# On OS X, F11 is used by Expose, F12 by Dashbard
if PLAT_MAC
	os.x.home.end.keys=1
	keyText=Shift+F13
	keyMake=Ctrl+Shift+F13
	keyHTML=Ctrl+Shift+F14
	keyXML=Shift+F14

default.languages=\
Text|txt|$(keyText)|\
&C / C++|c||\
Lisp|lisp||\
Pytho&n|py||

menu.language=$(default.languages)

# User defined key commands
user.shortcuts=\
Ctrl+Shift+V|IDM_PASTEANDDOWN|\
Ctrl+PageUp|IDM_PREVFILE|\
Ctrl+PageDown|IDM_NEXTFILE|

#KeypadPlus|IDM_EXPAND|\
#KeypadMinus|IDM_BLOCK_COMMENT|

#user.context.menu=\
#||\
#Next File|IDM_NEXTFILE|\
#Prev File|IDM_PREVFILE|

# To keep menus short, these .properties files are not loaded by default.
imports.exclude=abaqus asl asn1 au3 avenue avs baan blitzbasic bullant \
cobol cmake csound ecl escript flagship forth freebasic gap haskell inno \
kix latex lot lout metapost mmixal modula3 nimrod nncrontab nsis \
opal oscript powerpro powershell purebasic r rebol rust \
scriptol smalltalk sorcins spice specman \
tacl tal txt2tags verilog vhdl
# Newly removed: ave baan escript lot metapost mmixal
# The set of imports allowed can be set with
#imports.include=ave

# Import all the language specific properties files in this directory
import *



================================================
FILE: bin/ide/asm.properties
================================================
# Define SciTE settings for Assembler files (NASM)
# Originally by Black Horus blackhorus@gmx.net 2002
# Updated by Kein-Hong Man mkh@pl.jaring.my 2003-10
# Updated by Marat Dukhan (mdukhan3.at.gatech.dot.edu) 10/4/2011

# Nasm files
file.patterns.asm=*.asm
#file.patterns.as=*.s
filter.asm=Assembler x86/x64(asm)|$(file.patterns.asm)|
filter.as=Assembler x86/x64(as)|$(file.patterns.as)|

lexer.$(file.patterns.asm)=asm
lexer.$(file.patterns.as)=as


bcd_instruction=aaa aad aam aas daa das
flow_instruction=ja jae jb jbe jc jcxz je jg jge jl jle jmp jna \
	jnae jnb jnbe jnc jne jng jnge jnl jnle jno jnp jns jnz \
	jo jp jpe jpo js jz \
	jcxz jecxz jrcxz \
	loop loope loopne loopz loopnz \
	call ret

alu_instruction=add sub adc sbb neg cmp inc dec \
	and or xor not test \
	shl shr sal sar shld shrd rol ror rcl rcr \
	cbw cwd cwde cdq cdqe cqo \
	bsf bsr bt btc btr bts \
	idiv imul div mul bswap \
	nop

mem_instruction=lea \
	mov movsx movsxd movzx \
	xlatb bound \
	xchg xadd cmpxchg cmpxchg8b cmpxchg16b

stack_instruction=push pop pushad popad pushf popf pushfd popfd pushfq popfq

pred_instruction=seta setae setb setbe setc sete setg setge setl \
	setle setna setnae setnb setnbe setnc setne setng setnge \
	setnl setnle setno setnp setns setnz seto setp setpe setpo \
	sets setz \
	salc

flag_instruction=clc cld stc std cmc lahf sahf

cmov_instruction=cmovo cmovno cmovb cmovc cmovnae cmovae cmovnb \
	cmovnc cmove cmovz cmovne cmovnz cmovbe cmovna cmova \
	cmovnbe cmovs cmovns cmovp cmovpe cmovnp cmovpo cmovl \
	cmovnge cmovge cmovnl cmovle cmovng cmovg cmovnle

prefix_instruction=lock rep repe repz repne repnz

string_instruction=cmpsb cmpsw cmpsq \
	movsb movsw movsq \
	scasb scasw scasd scasq \
	stosb stosw stosd stosq

info_instruction=cpuid rdtsc rdtscp rdpmc xgetbv

lwp_instruction=llwpcb slwpcb lwpval lwpins

ext_instruction=crc32 popcnt lzcnt tzcnt movbe pclmulqdq rdrand

bmi1_instruction=andn bextr blsi blsmk blsr

bmi2_instruction=bzhi mulx pdep pext rorx sarx shlx shrx

tbm_instruction=blcfill blci blcic blcmsk blcs blsfill blsic t1mskc tzmsk

fpu_instruction=f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcom fcomp fcompp fdecstp \
	fdisi fdiv fdivp fdivr fdivrp feni ffree fiadd ficom ficomp fidiv \
	fidivr fild fimul fincstp finit fist fistp fisub fisubr fld fld1 \
	fldcw fldenv fldenvw fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul \
	fmulp fnclex fndisi fneni fninit fnop fnsave fnsavew fnstcw fnstenv \
	fnstenvw fnstsw fpatan fprem fptan frndint frstor frstorw fsave \
	fsavew fscale fsqrt fst fstcw fstenv fstenvw fstp fstsw fsub fsubp \
	fsubr fsubrp ftst fwait fxam fxch fxtract fyl2x fyl2xp1 \
	fsetpm fcos fldenvd fnsaved fnstenvd fprem1 frstord fsaved fsin fsincos \
	fstenvd fucom fucomp fucompp fcomi fcomip fucomi fucomip ffreep \
	fcmovb fcmove fcmovbe fcmovu fcmovnb fcmovne fcmovnbe fcmovnu

mmx_instruction=movd movq \
	paddb paddw paddd paddsb paddsw paddusb paddusw \
	psubb psubw psubd psubsb psubsw psubusb psubusw \
	pand pandn por pxor \
	pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw \
	pmaddwd pmulhw pmullw \
	psllw pslld psllq psrlw psrld psrlq psraw psrad \
	packuswb packsswb packssdw \
	punpcklbw punpcklwd punpckldq punpckhbw punpckhwd punpckhdq \
	emms

mmx2_instruction=pavgb pavgw \
	pextrw pinsrw pmovmskb \
	pmaxsw pmaxub pminsw pminub \
	pmulhuw psadbw pshufw \
	prefetchnta prefetcht0 prefetcht1 prefetcht2 \
	maskmovq movntq sfence

emmx_instruction=paddsiw psubsiw \
	pmulhrw pmachriw pmulhriw \
	pmagw pdistib paveb \
	pmvzb pmvnzb pmvlzb pmvgezb

k3d_instruction=pfacc pfadd pfsub pfsubr pfmul \
	pfcmpeq pfcmpge pfcmpgt \
	pfmax pfmin \
	pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt \
	pi2fd pf2id \
	pavgusb pmulhrw \
	femms

k3d2_instruction=pfnacc pfpnacc pi2fw pf2iw pswapd

k3dgeode_instruction=pfrsqrtv pfrcpv

k3dprefetch_instruction=prefetch prefetchw

sse_instruction=addss addps subss subps \
	mulss mulps divss divps sqrtss sqrtps \
	rcpss rcpps rsqrtss rsqrtps \
	maxss maxps minss minps \
	cmpss comiss ucomiss cmpps \
	cmpeqss cmpltss cmpless cmpunordss cmpneqss cmpnltss cmpnless cmpordss \
	cmpeqps cmpltps cmpleps cmpunordps cmpneqps cmpnltps cmpnleps cmpordps \
	andnps andps orps xorps \
	cvtsi2ss cvtss2si cvttss2si \
	cvtpi2ps cvtps2pi cvttps2pi \
	movss movlps movhps movlhps movhlps movaps movups movntps movmskps \
	shufps unpckhps unpcklps \
	ldmxcsr stmxcsr

sse2_instruction=addpd addsd subpd subsd \
	mulsd mulpd divsd divpd sqrtsd sqrtpd \
	maxsd maxpd minsd minpd \
	cmpsd comisd ucomisd cmppd \
	cmpeqsd cmpltsd cmplesd cmpunordsd cmpneqsd cmpnltsd cmpnlesd cmpordsd \
	cmpeqpd cmpltpd cmplepd cmpunordpd cmpneqpd cmpnltpd cmpnlepd cmpordpd \
	andnpd andpd orpd xorpd \
	cvtsd2ss cvtpd2ps cvtss2sd cvtps2pd \
	cvtdq2ps cvtps2dq cvttps2dq \
	cvtdq2pd cvtpd2dq cvttpd2dq \
	cvtsi2sd cvtsd2si cvttsd2si \
	cvtpi2pd cvtpd2pi cvttpd2pi \
	movsd movlpd movhpd movapd movupd movntpd movmskpd \
	shufpd unpckhpd unpcklpd \
	movnti movdqa movdqu movntdq maskmovdqu \
	movdq2q movq2dq \
	paddq psubq pmuludq \
	pslldq psrldq \
	punpcklqdq punpckhqdq \
	pshufhw pshuflw pshufd \
	lfence mfence

sse3_instruction=addsubps addsubpd \
	haddps haddpd hsubps hsubpd \
	movsldup movshdup movddup \
	lddqu \
	fisttp

ssse3_instruction=psignb psignw psignd \
	pabsb pabsw pabsd \
	palignr pshufb \
	pmulhrsw pmaddubsw \
	phaddw phaddd phaddsw \
	phsubw phsubd phsubsw

sse4a_instruction=extrq insertq \
	movntsd movntss

sse41_instruction=mpsadbw phminposuw \
	pmuldq pmulld \
	dpps dppd \
	blendps blendpd blendvps blendvpd pblendvb pblendw \
	pmaxsb pmaxuw pmaxsd pmaxud pminsb pminuw pminsd pminud \
	roundps roundss roundpd roundsd \
	insertps pinsrb pinsrd pinsrq \
	extractps pextrb pextrd pextrq \
	pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq \
	pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq \
	ptest \
	pcmpeqq \
	packusdw \
	movntdqa

sse42_instruction=pcmpgtq \
	pcmpestri pcmpestrm pcmpistri pcmpistrm

aes_instruction=aesenc aesenclast aesdec aesdeclast aeskeygenassist aesimc

padlock_instruction=xcryptcbc xcryptcfb xcryptctr xcryptecb xcryptofb \
	xsha1 xsha256 montmul xstore


avx_instruction=vaddss vaddps vaddsd vaddpd vsubss vsubps vsubsd vsubpd \
	vaddsubps vaddsubpd \
	vhaddps vhaddpd vhsubps vhsubpd \
	vmulss vmulps vmulsd vmulpd \
	vmaxss vmaxps vmaxsd vmaxpd vminss vminps vminsd vminpd \
	vandps vandpd vandnps vandnpd vorps vorpd vxorps vxorpd \
	vblendps vblendpd vblendvps vblendvpd \
	vcmpss vcomiss vucomiss vcmpsd vcomisd vucomisd vcmpps vcmppd \
	vcmpeqss vcmpltss vcmpless vcmpunordss vcmpneqss vcmpnltss vcmpnless vcmpordss \
	vcmpeq_uqss vcmpngess vcmpngtss vcmpfalsess vcmpneq_oqss vcmpgess vcmpgtss vcmptruess \
	vcmpeq_osss vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss \
	vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss \
	vcmpeqps vcmpltps vcmpleps vcmpunordps vcmpneqps vcmpnltps vcmpnleps vcmpordps \
	vcmpeq_uqps vcmpngeps vcmpngtps vcmpfalseps vcmpneq_oqps vcmpgeps vcmpgtps vcmptrueps \
	vcmpeq_osps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps \
	vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps \
	vcmpeqsd vcmpltsd vcmplesd vcmpunordsd vcmpneqsd vcmpnltsd vcmpnlesd vcmpordsd \
	vcmpeq_uqsd vcmpngesd vcmpngtsd vcmpfalsesd vcmpneq_oqsd vcmpgesd vcmpgtsd vcmptruesd \
	vcmpeq_ossd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd \
	vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd \
	vcmpeqpd vcmpltpd vcmplepd vcmpunordpd vcmpneqpd vcmpnltpd vcmpnlepd vcmpordpd \
	vcmpeq_uqpd vcmpngepd vcmpngtpd vcmpfalsepd vcmpneq_oqpd vcmpgepd vcmpgtpd vcmptruepd \
	vcmpeq_ospd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd \
	vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd \
	vcvtsd2ss vcvtpd2ps vcvtss2sd vcvtps2pd \
	vcvtsi2ss vcvtss2si vcvttss2si \
	vcvtpi2ps vcvtps2pi vcvttps2pi \
	vcvtdq2ps vcvtps2dq vcvttps2dq \
	vcvtdq2pd vcvtpd2dq vcvttpd2dq \
	vcvtsi2sd vcvtsd2si vcvttsd2si \
	vcvtpi2pd vcvtpd2pi vcvttpd2pi \
	vdivss vdivps vdivsd vdivpd vsqrtss vsqrtps vsqrtsd vsqrtpd \
	vdpps vdppd \
	vmaskmovps vmaskmovpd \
	vmovss vmovsd vmovaps vmovapd vmovups vmovupd vmovntps vmovntpd \
	vmovhlps vmovlhps vmovlps vmovlpd vmovhps vmovhpd \
	vmovsldup vmovshdup vmovddup \
	vmovmskps vmovmskpd \
	vroundss vroundps vroundsd vroundpd \
	vrcpss vrcpps vrsqrtss vrsqrtps \
	vunpcklps vunpckhps vunpcklpd vunpckhpd \
	vbroadcastss vbroadcastsd vbroadcastf128 \
	vextractps vinsertps vextractf128 vinsertf128 \
	vshufps vshufpd vpermilps vpermilpd vperm2f128 \
	vtestps vtestpd \
	vpaddb vpaddusb vpaddsb vpaddw vpaddusw vpaddsw vpaddd vpaddq \
	vpsubb vpsubusb vpsubsb vpsubw vpsubusw vpsubsw vpsubd vpsubq \
	vphaddw vphaddsw vphaddd vphsubw vphsubsw vphsubd \
	vpsllw vpslld vpsllq vpsrlw vpsrld vpsrlq vpsraw vpsrad \
	vpand vpandn vpor vpxor \
	vpblendwb vpblendw \
	vpsignb vpsignw vpsignd \
	vpavgb vpavgw \
	vpabsb vpabsw vpabsd \
	vmovd vmovq vmovdqa vmovdqu vlddqu vmovntdq vmovntdqa vmaskmovdqu \
	vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq \
	vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq \
	vpackuswb vpacksswb vpackusdw vpackssdw \
	vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq \
	vpmaddubsw vpmaddwd \
	vpmullw vpmulhuw vpmulhw vpmulhrsw vpmulld vpmuludq vpmuldq \
	vpmaxub vpmaxsb vpmaxuw vpmaxsw vpmaxud vpmaxsd \
	vpminub vpminsb vpminuw vpminsw vpminud vpminsd \
	vpmovmskb vptest \
	vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq \
	vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq \
	vpslldq vpsrldq vpalignr \
	vpshufb vpshuflw vpshufhw vpshufd \
	vpextrb vpextrw vpextrd vpextrq vpinsrb vpinsrw vpinsrd vpinsrq \
	vpsadbw vmpsadbw vphminposuw \
	vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm \
	vpclmulqdq vaesenc vaesenclast vaesdec vaesdeclast vaeskeygenassist vaesimc \
	vldmxcsr vstmxcsr vzeroall vzeroupper

avx2_instruction=vbroadcasti128 vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq \
	vpblendd \
	vpermd vpermq vperm2i128 \
	vextracti128 vinserti128 \
	vpmaskmovd vpmaskmovq \
	vpsllvd vpsllvq vpsravd vpsrlvd vpsrldq \
	vpgatherdd vpgatherqd vgatherdq vgatherqq \
	vpermps vpermpd \
	vgatherdpd vgatherqpd vgatherdps vgatherqps

xop_instruction=vfrczss vfrczps vfrczsd vfrczpd \
	vpermil2ps vperlil2pd \
	vtestps vtestpd \
	vpcomub vpcomb vpcomuw vpcomw vpcomud vpcomd vpcomuq vpcomq \
	vphaddubw vphaddbw vphaddubd vphaddbd vphaddubq vphaddbq \
	vphadduwd vphaddwd vphadduwq vphaddwq vphaddudq vphadddq \
	vphsubbw vphsubwd vphsubdq \
	vpmacsdd vpmacssdd vpmacsdql vpmacssdql vpmacsdqh vpmacssdqh \
	vpmacsww vpmacssww vpmacswd vpmacsswd \
	vpmadcswd vpmadcsswd \
	vpcmov vpperm \
	vprotb vprotw vprotd vprotq \
	vpshab vpshaw vpshad vpshaq \
	vpshlb vpshlw vpshld vpshlq

cvt16_instruction=vcvtph2ps vcvtps2ph

fma4_instruction=vfmaddss vfmaddps vfmaddsd vfmaddpd \
	vfmsubss vfmsubps vfmsubsd vfmsubpd \
	vnfmaddss vnfmaddps vnfmaddsd vnfmaddpd \
	vnfmsubss vnfmsubps vnfmsubsd vnfmsubpd \
	vfmaddsubps vfmaddsubpd vfmsubaddps vfmsubaddpd

fma3_instruction=vfmadd132ss vfmadd213ss vfmadd231ss \
	vfmadd132ps vfmadd213ps vfmadd231ps \
	vfmadd132sd vfmadd213sd vfmadd231sd \
	vfmadd132pd vfmadd213pd vfmadd231pd \
	vfmaddsub132ps vfmaddsub213ps vfmaddsub231ps \
	vfmaddsub132pd vfmaddsub213pd vfmaddsub231pd \
	vfmsubadd132ps vfmsubadd213ps vfmsubadd231ps \
	vfmsubadd132pd vfmsubadd213pd vfmsubadd231pd \
	vfmsub132ss vfmsub213ss vfmsub231ss \
	vfmsub132ps vfmsub213ps vfmsub231ps \
	vfmsub132sd vfmsub213sd vfmsub231sd \
	vfmsub132pd vfmsub213pd vfmsub231pd \
	vfnmadd132ss vfnmadd213ss vfnmadd231ss \
	vfnmadd132ps vfnmadd213ps vfnmadd231ps \
	vfnmadd132sd vfnmadd213sd vfnmadd231sd \
	vfnmadd132pd vfnmadd213pd vfnmadd231pd \
	vfnmsub132ss vfnmsub213ss vfnmsub231ss \
	vfnmsub132ps vfnmsub213ps vfnmsub231ps \
	vfnmsub132sd vfnmsub213sd vfnmsub231sd \
	vfnmsub132pd vfnmsub213pd vfnmsub231pd

register=al ah bl bh cl ch dl dh \
	ax bx cx dx si di bp \
	eax ebx ecx edx esi edi ebx esp \
	st0 st1 st2 st3 st4 st5 st6 st7 \
	mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 \
	xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 \
	ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 \
	fs

register_64=sil dil bpl \
	r8b r9b r10b r11b r12b r13b r14b r15b \
	r8w r9w r10w r11w r12w r13w r14w r15w \
	rax rcx rdx rbx rsp rbp rsi rdi \
	r8 r9 r10 r11 r12 r13 r14 r15 \
	xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 \
	ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 \
	gs

directive_nasm=db dw dd dq dt do dy \
	resb resw resd resq rest reso resy incbin equ times safeseh \
	__utf16__ __utf32__ %+ \
	default cpu float start imagebase osabi \
	..start ..imagebase ..gotpc ..gotoff ..gottpoff ..got ..plt ..sym ..tlsie \
	section segment __sect__ group absolute \
	.bss .comment .data .lbss .ldata .lrodata .rdata .rodata .tbss .tdata .text \
	alloc bss code exec data noalloc nobits noexec nowrite progbits rdata tls write \
	private public common stack overlay class \
	extern global common import export \
	%define %idefine %xdefine %ixdefine %assign %undef %? %?? \
	%defstr %idefstr %deftok %ideftok \
	%strcat %strlen %substr \
	%macro %imacro %rmacro %exitmacro %endmacro %unmacro \
	%if %ifn %elif %elifn %else %endif \
	%ifdef %ifndef %elifdef %elifndef \
	%ifmacro %ifnmacro %elifmacro %elifnmacro \
	%ifctx %ifnctx %elifctx %elifnctx \
	%ifidn %ifnidn %elifidn %elifnidn \
	%ifidni %ifnidni %elifidni %elifnidni \
	%ifid %ifnid %elifid %elifnid \
	%ifnum %ifnnum %elifnum %elifnnum \
	%ifstr %ifnstr %elifstr %elifnstr \
	%iftoken %ifntoken %eliftoken %elifntoken \
	%ifempty %elifempty %ifnempty %elifnempty \
	%ifenv %ifnenv %elifenv %elifnenv \
	%rep %exitrep %endrep \
	%while %exitwhile %endwhile \
	%include %pathsearch %depend %use \
	%push %pop %repl %arg %local %stacksize flat flat64 large small \
	%error %warning %fatal \
	%00 .nolist %rotate %line %! %final %clear \
	struc endstruc istruc at iend \
	align alignb sectalign \
	bits use16 use32 use64 \
	__nasm_major__ __nasm_minor__ __nasm_subminor__ ___nasm_patchlevel__ \
	__nasm_version_id__ __nasm_ver__ \
	__file__ __line__ __pass__ __bits__ __output_format__ \
	__date__ __time__ __date_num__ __time_num__ __posix_time__ \
	__utc_date__ __utc_time__ __utc_date_num__ __utc_time_num__ \
	__float_daz__ __float_round__ __float__ \
	__use_altreg__ altreg \
	__use_smartalign__ smartalign __alignmode__ \
	__use_fp__ __infinity__ __nan__ __qnan__ __snan__ \
	__float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__

directive_operand_nasm=a16 a32 a64 o16 o32 o64 strict \
	byte word dword qword tword oword yword nosplit \
	%0 %1 %2 %3 %4 %5 %6 %7 %8 %9 \
	abs rel \
	$ $$ \
	seg wrt

keywords.$(file.patterns.asm)=$(bcd_instruction) $(flow_instruction) $(alu_instruction) $(mem_instruction) $(stack_instruction) $(pred_instruction) $(flag_instruction) $(cmov_instruction) $(prefix_instruction) $(string_instruction) $(info_instruction) $(lwp_instruction) $(ext_instruction) $(bmi1_instruction) $(bmi2_instruction)
keywords2.$(file.patterns.asm)=$(fpu_instruction)
keywords3.$(file.patterns.asm)=$(register) $(register_64)
keywords4.$(file.patterns.asm)=$(directive_nasm)
keywords5.$(file.patterns.asm)=$(directive_operand_nasm)
keywords6.$(file.patterns.asm)=$(mmx_instruction) $(mmx2_instruction) $(emmx_instruction) $(k3d_instruction) $(k3d2_instruction) $(k3dgeode_instruction) $(k3dprefetch_instruction) $(sse_instruction) $(sse2_instruction) $(sse3_instruction) $(ssse3_instruction) $(sse4a_instruction) $(sse41_instruction) $(sse42_instruction) $(aes_instruction) $(padlock_instruction) $(avx_instruction) $(avx2_instruction) $(xop_instruction) $(cvt16_instruction) $(fma4_instruction) $(fma3_instruction)

keywords.$(file.patterns.as)=$(bcd_instruction) $(flow_instruction) $(alu_instruction) $(mem_instruction) $(stack_instruction) $(pred_instruction) $(flag_instruction) $(cmov_instruction) $(prefix_instruction) $(string_instruction) $(info_instruction) $(lwp_instruction) $(ext_instruction) $(bmi1_instruction) $(bmi2_instruction)
keywords2.$(file.patterns.as)=$(fpu_instruction)
keywords3.$(file.patterns.as)=$(register) $(register_64)
keywords4.$(file.patterns.as)=$(directive_nasm)
keywords5.$(file.patterns.as)=$(directive_operand_nasm)
keywords6.$(file.patterns.as)=$(mmx_instruction) $(mmx2_instruction) $(emmx_instruction) $(k3d_instruction) $(k3d2_instruction) $(k3dgeode_instruction) $(k3dprefetch_instruction) $(sse_instruction) $(sse2_instruction) $(sse3_instruction) $(ssse3_instruction) $(sse4a_instruction) $(sse41_instruction) $(sse42_instruction) $(aes_instruction) $(padlock_instruction) $(avx_instruction) $(avx2_instruction) $(xop_instruction) $(cvt16_instruction) $(fma4_instruction) $(fma3_instruction)

comment.block.asm=;
comment.block.as=#


# Assembler Styles
#style.asm.32=fore:#808080,font:Verdana,size:8
#style.as.32=$(style.asm.32)
# Default
style.asm.0=
style.asm.0=$(style.asm.0)
# Comment
style.asm.1=fore:#adadad
style.as.1=$(style.asm.1)
#$(colour.code.comment.line),font:Comic Sans MS,size:8
# Number
style.asm.2=fore:#ff0000
style.as.2=$(style.asm.2)
# String
style.asm.3=$(colour.string)
style.as.3=$(style.asm.3)
# Operator
style.asm.4=$(colour.operator),bold
style.as.4=$(style.asm.4)
# Identifier
style.asm.5=
style.as.5=$(style.asm.5)
# CPU instruction
style.asm.6=$(colour.keyword),bold
style.as.6=$(style.asm.6)
#fore:#0000ff
# FPU instruction
style.asm.7=fore:#0000ff
style.as.7=$(style.asm.7)
# Register
style.asm.8=fore:#46aa03,bold
style.as.8=$(style.asm.8)
# assembler Directive
style.asm.9=fore:#0000ff
style.as.9=$(style.asm.9)
# assembler Directive Operand
style.asm.10=fore:#0000ff
style.as.10=$(style.asm.10)
# Comment block (GNU as /*...*/ syntax, unimplemented)
style.asm.11=$(colour.code.comment.box),$(font.code.comment.box)
style.as.11=$(style.asm.11)
# Character/String (single quote) (also character prefix in GNU as)
style.asm.12=$(colour.char)
style.as.12=$(style.asm.12)
# End of line where string is not closed
style.asm.13=fore:#000000,back:#E0C0E0,eolfilled
style.as.13=$(style.asm.13)
# Extended instructions
style.asm.14=fore:#B00040
style.as.14=$(style.asm.14)


command.compile.$(file.patterns.asm)=nasm $(FileNameExt)

command.name.0.*.asm=Link
command.0.*.asm=link $(FileName)


statement.indent.$(file.patterns.asm)=9 .if
statement.indent.$(file.patterns.as)=9 .if


================================================
FILE: bin/ide/cpp.properties
================================================
# Define SciTE settings for C++, C, C#, Ch, Java, IDL, JavaScript, Flash (ActionScript 2) files.

# sma files are Small script (C-like)
file.patterns.cpp=*.c;*.cc;*.cpp;*.cxx;*.h;*.hh;*.hpp;*.hxx;*.ipp;*.m;*.mm;*.sma
file.patterns.cplusplus=*.cc;*.cpp;*.cxx
# jad = decompiled class files; pde = Processing.org sketch files
file.patterns.java=*.java;*.jad;*.pde
file.patterns.javafx=*.fx
# pln, inc and t are SilkTest (4Test) files.
file.patterns.test=*.pln;*.inc;*.t
# es = JS dialect of Abobe for SVG
file.patterns.js=*.js;*.es
file.patterns.cs=*.cs
file.patterns.rc=*.rc;*.rc2;*.dlg
file.patterns.idl=*.idl;*.odl
file.patterns.flash=*.as;*.asc;*.jsfl
file.patterns.ch=*.ch;*.chf;*.chs
file.patterns.vala=*.vala
file.patterns.go=*.go
file.patterns.pike=*.pike
file.patterns.c.like=$(file.patterns.cpp);$(file.patterns.cs);$(file.patterns.idl);$(file.patterns.java);$(file.patterns.js);$(file.patterns.flash);$(file.patterns.ch);$(file.patterns.vala);$(file.patterns.pike)

shbang.tcc=cpp
shbang.tinycc=cpp

filter.cpp=C/C++ (c cc cpp cxx cs vala h hh hxx hpp ipp dlg rc rc2 mak)|\
$(file.patterns.cpp);$(file.patterns.cs);$(file.patterns.rc);$(file.patterns.vala);*.mak;make*|
filter.java=Java (java)|*.java|
filter.js=JavaScript (js es)|$(file.patterns.js)|
filter.idl=IDL (idl odl)|$(file.patterns.idl)|
filter.test=SilkTest (pln inc t)|$(file.patterns.test)|
filter.flash=Flash (as asc jsfl)|$(file.patterns.flash)|
filter.ch=Ch (ch chf chs)|$(file.patterns.ch)|
filter.go=Go (go)|$(file.patterns.go)|
filter.pike=Pike (pike)|$(file.patterns.pike)|

lexer.$(file.patterns.java)=cpp
lexer.$(file.patterns.javafx)=cpp
lexer.$(file.patterns.cpp)=cpp
lexer.$(file.patterns.rc)=cpp
lexer.$(file.patterns.idl)=cpp
lexer.$(file.patterns.cs)=cpp
lexer.$(file.patterns.js)=cpp
lexer.$(file.patterns.test)=cpp
lexer.$(file.patterns.flash)=cpp
lexer.$(file.patterns.ch)=cpp
lexer.$(file.patterns.vala)=cpp
lexer.$(file.patterns.go)=cpp
lexer.$(file.patterns.pike)=cpp

keywordclass.cpp=and and_eq asm auto bitand bitor bool break \
case catch char class compl const const_cast constexpr continue \
default delete do double dynamic_cast else enum explicit export extern false float for \
friend goto if inline int long mutable namespace new not not_eq \
operator or or_eq private protected public \
register reinterpret_cast return short signed sizeof static static_cast struct switch \
template this throw true try typedef typeid typename union unsigned using \
virtual void volatile wchar_t while xor xor_eq

directives.objective.c=\
@class @defs @protocol @required @optional @end \
@interface @public @package @protected @private @property \
@implementation @synthesize @dynamic \
@throw @try @catch @finally \
@synchronized @autoreleasepool \
@selector @encode \
@compatibility_alias

# Since Objective C and C++ share the .h extension, allow Objective C directives as keywords
# For stricter display of pure C++, specify keywords.$(file.patterns.cpp)=$(keywordclass.cpp)
keywords.$(file.patterns.cpp)=$(keywordclass.cpp) $(directives.objective.c)

# keywords2 is for highlighting user defined keywords or function calls or similar
#keywords2.$(file.patterns.cpp)=file

# keywords3 is for doc comment keywords, highlighted in style 17
#CPP doxygen
file.patterns.doxygen.langs=$(file.patterns.cpp);$(file.patterns.java)
keywordclass.doxygen=a addindex addtogroup anchor arg attention \
author b brief bug c class code date def defgroup deprecated dontinclude \
e em endcode endhtmlonly endif endlatexonly endlink endverbatim enum example exception \
f$ f[ f] file fn hideinitializer htmlinclude htmlonly \
if image include ingroup internal invariant interface latexonly li line link \
mainpage name namespace nosubgrouping note overload \
p page par param param[in] param[out] \
post pre ref relates remarks return retval \
sa section see showinitializer since skip skipline struct subsection \
test throw throws todo typedef union until \
var verbatim verbinclude version warning weakgroup $ @ \ & < > # { }
keywords3.$(file.patterns.doxygen.langs)=$(keywordclass.doxygen)

# keywords5 is for preprocessor definitions and will cause inactive code
# to be greyed out. This setting is a space separated list of definitions
# where a definition may be of the form NAME=VALUE or simply NAME.
#keywords5.$(file.patterns.cpp)=_MSC_VER SCI_NAMESPACE GTK_MAJOR_VERSION=2

word.chars.cxx=$(chars.alpha)$(chars.numeric)_#
word.characters.$(file.patterns.cpp)=$(word.chars.cxx)
calltip.cpp.word.characters=$(chars.alpha)$(chars.numeric)_
comment.block.cpp=//~
#comment.block.at.line.start.cpp=1
comment.stream.start.cpp=/*
comment.stream.end.cpp=*/
comment.box.start.cpp=/*
comment.box.middle.cpp= *
comment.box.end.cpp= */

# Folding
#fold.cpp.syntax.based=0
#fold.cpp.comment.multiline=0
#fold.cpp.comment.explicit=0
#defaults for fold.cpp.explicit.start=//{ and fold.cpp.explicit.end=//}
#  can be replaced by defining custom strings, e.g. //[ and //]
#fold.cpp.explicit.start=//[
#fold.cpp.explicit.end=//]
#if fold strings are set to something like /*{{{ and /*}}} (Origami/WinF style fold strings), enable
#  fold.cpp.explicit.anywhere, allowing explicit fold points being anywhere, not just in line comments
#fold.cpp.explicit.anywhere=1
#fold.at.else=1

word.characters.$(file.patterns.javafx)=$(word.chars.cxx)$-

file.patterns.c.except.cpp=$(file.patterns.cs);$(file.patterns.idl);*.java;$(file.patterns.flash);$(file.patterns.ch)
statement.indent.$(file.patterns.c.except.cpp)=5 case default do else for if while
statement.indent.$(file.patterns.cpp)=5 case default do else for if private protected public while
statement.end.$(file.patterns.c.like)=10 ;
statement.lookback.$(file.patterns.c.like)=20
block.start.$(file.patterns.c.like)=10 {
block.end.$(file.patterns.c.like)=10 }

#autocomplete.cpp.fillups=(

#styling.within.preprocessor=1
preprocessor.symbol.$(file.patterns.cpp)=#
preprocessor.start.$(file.patterns.cpp)=if ifdef ifndef
preprocessor.middle.$(file.patterns.cpp)=else elif
preprocessor.end.$(file.patterns.cpp)=endif

preprocessor.symbol.$(file.patterns.cs)=#
preprocessor.start.$(file.patterns.cs)=if region
preprocessor.middle.$(file.patterns.cs)=else elif
preprocessor.end.$(file.patterns.cs)=endif endregion

keywordclass.ch=\
auto array bool break case char class complex ComplexInf ComplexNaN \
const continue default delete \
do double else enum export extern float for foreach goto if Inf inline int \
long namespace NaN new NULL private public register restrict return short \
signed sizeof static string_t struct switch this typedef union unsigned \
using void volatile wchar_t while __declspec
keywords.$(file.patterns.ch)=$(keywordclass.ch)
word.chars.ch=$(chars.alpha)$(chars.numeric)_#
word.characters.$(file.patterns.ch)=$(word.chars.cxx)
comment.block.ch=//~
#comment.block.at.line.start.ch=1
comment.stream.start.ch=/*
comment.stream.end.ch=*/
comment.box.start.ch=/*
comment.box.middle.ch= *
comment.box.end.ch= */
preprocessor.symbol.$(file.patterns.ch)=#
preprocessor.start.$(file.patterns.ch)=if ifdef ifndef
preprocessor.middle.$(file.patterns.ch)=else elif
preprocessor.end.$(file.patterns.ch)=endif

keywordclass.cs=abstract as ascending base bool break by byte case catch char checked \
class const continue decimal default delegate descending do double else enum \
equals event explicit extern false finally fixed float for foreach from goto group if \
implicit in int interface internal into is join lock let long namespace new null \
object on operator orderby out override params private protected public \
readonly ref return sbyte sealed select short sizeof stackalloc static \
string struct switch this throw true try typeof uint ulong \
unchecked unsafe ushort using var virtual void volatile where while
keywords.$(file.patterns.cs)=$(keywordclass.cs)
word.characters.$(file.patterns.cs)=$(word.chars.cxx)

keywordclass.go=\
bool byte break case chan complex64 complex128 const continue defer default  \
else  for func go goto fallthrough false float32 float64 if import int interface int8 int16 int32 int64 \
len map nil package range return select string struct switch true type \
uint uintptr uint8 uint16 uint32 uint64  var
keywords.$(file.patterns.go)=$(keywordclass.go)

keywordclass.rc=\
ACCELERATORS ALT AUTO3STATE AUTOCHECKBOX AUTORADIOBUTTON \
BEGIN BITMAP BLOCK BUTTON CAPTION CHARACTERISTICS CHECKBOX CLASS \
COMBOBOX CONTROL CTEXT CURSOR DEFPUSHBUTTON DIALOG DIALOGEX DISCARDABLE \
EDITTEXT END EXSTYLE FONT GROUPBOX ICON LANGUAGE LISTBOX LTEXT \
MENU MENUEX MENUITEM MESSAGETABLE POPUP \
PUSHBUTTON RADIOBUTTON RCDATA RTEXT SCROLLBAR SEPARATOR SHIFT STATE3 \
STRINGTABLE STYLE TEXTINCLUDE VALUE VERSION VERSIONINFO VIRTKEY
keywords.$(file.patterns.rc)=$(keywordclass.rc)

keywordclass.idl=\
aggregatable allocate appobject arrays async async_uuid \
auto_handle \
bindable boolean broadcast byte byte_count \
call_as callback char coclass code comm_status \
const context_handle context_handle_noserialize \
context_handle_serialize control cpp_quote custom \
decode default defaultbind defaultcollelem \
defaultvalue defaultvtable dispinterface displaybind dllname \
double dual \
enable_allocate encode endpoint entry enum error_status_t \
explicit_handle \
fault_status first_is float \
handle_t heap helpcontext helpfile helpstring \
helpstringcontext helpstringdll hidden hyper \
id idempotent ignore iid_as iid_is immediatebind implicit_handle \
import importlib in include in_line int __int64 __int3264 interface \
last_is lcid length_is library licensed local long \
max_is maybe message methods midl_pragma \
midl_user_allocate midl_user_free min_is module ms_union \
ncacn_at_dsp ncacn_dnet_nsp ncacn_http ncacn_ip_tcp \
ncacn_nb_ipx ncacn_nb_nb ncacn_nb_tcp ncacn_np \
ncacn_spx ncacn_vns_spp ncadg_ip_udp ncadg_ipx ncadg_mq \
ncalrpc nocode nonbrowsable noncreatable nonextensible notify \
object odl oleautomation optimize optional out out_of_line \
pipe pointer_default pragma properties propget propput propputref \
ptr public \
range readonly ref represent_as requestedit restricted retval \
shape short signed size_is small source strict_context_handle \
string struct switch switch_is switch_type \
transmit_as typedef \
uidefault union unique unsigned user_marshal usesgetlasterror uuid \
v1_enum vararg version void wchar_t wire_marshal

keywordclass.msidl=handle
keywordclass.xpidl=attribute native noscript scriptable shared wstring inout
keywords.$(file.patterns.idl)=$(keywordclass.idl) $(keywordclass.xpidl)

# http://java.sun.com/docs/books/tutorial/java/nutsandbolts/_keywords.html
keywordclass.java=abstract assert boolean break byte case catch char class \
const continue default do double else enum extends final finally float for \
goto if implements import instanceof int interface long \
native new package private protected public \
return short static strictfp super switch synchronized this throw throws \
transient try var void volatile while
keywords.$(file.patterns.java)=$(keywordclass.java)

keywordclass.javafx=abstract after and as assert at attribute before bind bound break \
catch class continue def delete else exclusive extends false finally for from function \
if import indexof insert instanceof lazy mod new not null \
or override package private protected public-init public public-read \
return reverse sizeof static super then this throw true try typeof \
var while
keywords.$(file.patterns.javafx)=$(keywordclass.javafx)
# Base types and global functions (defined in javafx.lang.Builtins and javafx.lang.FX)
# And now language words deprecated from their keyword status...
keywords2.$(file.patterns.javafx)=Boolean Duration Integer Number Object String Void \
Character Byte Short Long Float Double \
isInitialized isSameObject print println \
first in init into inverse last on postinit replace step trigger tween where with
# I don't know what first and last nor trigger do. Neither lazy or typeof...

keywordclass.javascript=abstract boolean break byte case catch char class \
const continue debugger default delete do double else enum export extends \
final finally float for function goto if implements import in instanceof \
int interface long native new package private protected public \
return short static super switch synchronized this throw throws \
transient try typeof var void volatile while with
keywords.$(file.patterns.js)=$(keywordclass.javascript)

keywordclass.flash=add and break case catch class continue default delete do \
dynamic else eq extends false finally for function ge get gt if implements import in \
instanceof interface intrinsic le lt ne new not null or private public return \
set static super switch this throw true try typeof undefined var void while with

keywordclass2.flash=Array Arguments Accessibility Boolean Button Camera Color \
ContextMenu ContextMenuItem Date Error Function Key LoadVars LocalConnection Math \
Microphone Mouse MovieClip MovieClipLoader NetConnection NetStream Number Object \
PrintJob Selection SharedObject Sound Stage String StyleSheet System TextField \
TextFormat TextSnapshot Video Void XML XMLNode XMLSocket \
_accProps _focusrect _global _highquality _parent _quality _root _soundbuftime \
arguments asfunction call capabilities chr clearInterval duplicateMovieClip \
escape eval fscommand getProperty getTimer getURL getVersion gotoAndPlay gotoAndStop \
ifFrameLoaded Infinity -Infinity int isFinite isNaN length loadMovie loadMovieNum \
loadVariables loadVariablesNum maxscroll mbchr mblength mbord mbsubstring MMExecute \
NaN newline nextFrame nextScene on onClipEvent onUpdate ord parseFloat parseInt play \
prevFrame prevScene print printAsBitmap printAsBitmapNum printNum random removeMovieClip \
scroll set setInterval setProperty startDrag stop stopAllSounds stopDrag substring \
targetPath tellTarget toggleHighQuality trace unescape unloadMovie unLoadMovieNum updateAfterEvent

keywords.$(file.patterns.flash)=$(keywordclass.flash)
keywords2.$(file.patterns.flash)=$(keywordclass2.flash)

keywordclass.vala=if else switch case default break continue return yield for foreach in \
do while try catch finally throw

keywordclass2.vala=namespace interface class struct enum delegate signal errordomain \
construct get set value base const static var dynamic weak unowned virtual abstract \
override public protected private extern throws requires ensures yields out ref lock \
using true false null delete generic new this typeof sizeof as owned int string char bool

keywords.$(file.patterns.vala)=$(keywordclass.vala)
keywords2.$(file.patterns.vala)=$(keywordclass2.vala)

keywordclass.pike=constant enum if do for while else foreach case switch break continue \
return typeof catch class lambda import inherit static void int string float mixed object \
function program array mapping multiset
keywords.$(file.patterns.pike)=$(keywordclass.pike)

# Markers
# keywords6.$(file.patterns.c.like)=FIXME TODO XXX HACK UnresolvedMergeConflict UNDONE

#lexer.cpp.track.preprocessor=1
#lexer.cpp.update.preprocessor=1
#lexer.cpp.hashquoted.strings=1

# C++ styles

# Default
#style.cpp.32=$(font.base)
# White space
style.cpp.0=fore:#808080
# Comment: /* */.
style.cpp.1=$(colour.code.comment.box),$(font.code.comment.box)
# Line Comment: //.
style.cpp.2=$(colour.code.comment.line),$(font.code.comment.line)
# Doc comment: block comments beginning with /** or /*!
style.cpp.3=$(colour.code.comment.doc),$(font.code.comment.doc)
# Number
style.cpp.4=$(colour.number)
# Keyword
style.cpp.5=$(colour.keyword),bold
# Double quoted string
style.cpp.6=$(colour.string)
# Single quoted string
style.cpp.7=$(colour.char)
# UUIDs (only in IDL)
style.cpp.8=fore:#804080
# Preprocessor
style.cpp.9=$(colour.preproc)
# Operators
style.cpp.10=$(colour.operator),bold
# Identifiers
style.cpp.11=
# End of line where string is not closed
style.cpp.12=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled
# Verbatim strings for C#
style.cpp.13=fore:#007F00,$(font.monospace),back:#E0FFE0,eolfilled
# Regular expressions for JavaScript
style.cpp.14=fore:#3F7F3F,$(font.monospace),back:#E0F0FF,eolfilled
# Doc Comment Line: line comments beginning with /// or //!.
style.cpp.15=$(colour.code.comment.doc),$(font.code.comment.doc)
# Keywords2
style.cpp.16=fore:#B00040
# Comment keyword
style.cpp.17=fore:#3060A0,$(font.code.comment.doc)
# Comment keyword error
style.cpp.18=fore:#804020,$(font.code.comment.doc)
# Raw strings for C++0x
style.cpp.20=$(colour.string),back:#FFF3FF,eolfilled
# Triple-quoted strings for Vala
style.cpp.21=$(font.monospace),fore:#007F00,back:#E0FFE0,eolfilled
# Hash-quoted strings for Pike
style.cpp.22=$(font.monospace),fore:#007F00,back:#E7FFD7,eolfilled
# Preprocessor stream comment
style.cpp.23=fore:#659900
# Preprocessor stream doc comment
style.cpp.24=$(colour.code.comment.doc)
# User defined literals
style.cpp.25=fore:#C06000
# Task Marker
style.cpp.26=fore:#BE07FF,$(font.code.comment.line)

# Inactive states are 64 greater than their active counterparts

# White space
style.cpp.64=fore:#C0C0C0
# Comment: /* */.
style.cpp.65=$(style.cpp.1),fore:#90B090
# Line Comment: //.
style.cpp.66=$(style.cpp.2),fore:#90B090
# Doc comment: block comments beginning with /** or /*!
style.cpp.67=$(style.cpp.3),fore:#D0D0D0
# Number
style.cpp.68=$(style.cpp.4),fore:#90B0B0
# Keyword
style.cpp.69=$(style.cpp.5),fore:#9090B0
# Double quoted string
style.cpp.70=$(style.cpp.6),fore:#B090B0
# Single quoted string
style.cpp.71=$(style.cpp.7),fore:#B090B0
# UUIDs (only in IDL)
style.cpp.72=$(style.cpp.8),fore:#C0C0C0
# Preprocessor
style.cpp.73=$(style.cpp.9),fore:#B0B090
# Operators
style.cpp.74=$(style.cpp.10),fore:#B0B0B0
# Identifiers
style.cpp.75=$(style.cpp.11),fore:#B0B0B0
# End of line where string is not closed
style.cpp.76=$(style.cpp.12),fore:#000000
# Verbatim strings for C#
style.cpp.77=$(style.cpp.13),fore:#90B090
# Regular expressions for JavaScript
style.cpp.78=$(style.cpp.14),fore:#7FAF7F
# Doc Comment Line: line comments beginning with /// or //!.
style.cpp.79=$(style.cpp.15),fore:#C0C0C0
# Keywords2
style.cpp.80=$(style.cpp.16),fore:#C0C0C0
# Comment keyword
style.cpp.81=$(style.cpp.17),fore:#C0C0C0
# Comment keyword error
style.cpp.82=$(style.cpp.18),fore:#C0C0C0
# Raw strings for C++0x
style.cpp.84=$(style.cpp.20),fore:#B090B0
# Triple-quoted strings for Vala
style.cpp.85=$(style.cpp.21),fore:#90B090
# Hash-quoted strings for Pike
style.cpp.86=$(style.cpp.22),fore:#90B090
# Preprocessor stream comment
style.cpp.87=$(style.cpp.23),fore:#A0C090
# Preprocessor stream doc comment
style.cpp.88=$(style.cpp.23),fore:#C0C0C0
# User defined literals
style.cpp.89=fore:#D7A090
# Task Marker
style.cpp.90=fore:#C3A1CF,$(font.code.comment.line)

# Braces are only matched in operator style
braces.cpp.style=10

ccopts=-pedantic -Os
cc=g++ $(ccopts) -c $(FileNameExt) -o $(FileName).o
ccc=gcc $(ccopts) -c $(FileNameExt) -o $(FileName).o

make.command=make

command.0.*="$(SciteDefaultHome)\..\rjit.bat" "$(FilePath)"
command.name.0.*=run rpp jit
command.shortcut.0.*=F5
command.save.before.0.*=1

command.1.*="$(SciteDefaultHome)\..\rpp.exe" "$(FilePath)"
command.name.1.*=run rpp interpret
command.shortcut.1.*=F6
command.save.before.1.*=1

command.2.*="$(SciteDefaultHome)\..\rpack.bat" "$(FilePath)"
command.name.2.*=build rpp jit
command.shortcut.2.*=F7
command.save.before.2.*=1

command.3.*="$(SciteDefaultHome)\..\rjit_win.bat" "$(FilePath)"
command.name.3.*=run rpp jit win
command.shortcut.3.*=Ctrl+F5
command.save.before.3.*=1

command.4.*="$(SciteDefaultHome)\..\rpack_win.bat" "$(FilePath)"
command.name.4.*=build rpp jit win
command.shortcut.4.*=Ctrl+F7
command.save.before.4.*=1

================================================
FILE: bin/ide/lisp.properties
================================================
# Define SciTE settings for lisp and Scheme files.

file.patterns.lisp=*.lsp;*.lisp

filter.lisp=LISP (lsp lisp)|$(file.patterns.lisp)|

file.patterns.scheme=*.scm;*.smd;*.ss
filter.scheme=Scheme (scm smd)|$(file.patterns.scheme)|

lexer.$(file.patterns.lisp)=lisp
lexer.$(file.patterns.scheme)=lisp

# lisp build in functions, xlisp dialect
keywords.$(file.patterns.lisp)= not defun + - * / = < > <= >= princ \
eval apply funcall quote identity function complement backquote lambda set setq setf \
defun defmacro gensym make symbol intern symbol name symbol value symbol plist get \
getf putprop remprop hash make array aref car cdr caar cadr cdar cddr caaar caadr cadar \
caddr cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr \
cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr cons list append reverse last nth \
nthcdr member assoc subst sublis nsubst  nsublis remove length list length \
mapc mapcar mapl maplist mapcan mapcon rplaca rplacd nconc delete atom symbolp numberp \
boundp null listp consp minusp zerop plusp evenp oddp eq eql equal cond case and or let l if prog \
prog1 prog2 progn go return do dolist dotimes catch throw error cerror break \
continue errset baktrace evalhook truncate float rem min max abs sin cos tan expt exp sqrt \
random logand logior logxor lognot bignums logeqv lognand lognor \
logorc2 logtest logbitp logcount integer length nil

word.chars.lisp=$(chars.alpha)$(chars.numeric)_-<>.#+@$%^&=*!?
word.characters.$(file.patterns.lisp)=$(word.chars.lisp)

# Scheme functions, R5RS
keywords.$(file.patterns.scheme)= + - * / = < > <= >= => \
abs acos and angle append apply asin assoc assoc assq assv atan \
begin boolean? \
caar cadr call-with-current-continuation call/cc \
call-with-input-file call-with-output-file call-with-values \
car cdr \
caar cadr cdar cddr \
caaar caadr cadar caddr cdaar cdadr cddar cdddr \
caaaar caaadr caadar caaddr cadaar cadadr caddar cadddr \
cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr \
case ceiling char->integer \
char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? \
char-downcase char-lower-case? char-numeric? char-ready? \
char-upcase char-upper-case? char-whitespace? \
char<=? char<? char=? char>=? char>? char? \
close-input-port close-output-port complex? cond cons cos \
current-input-port current-output-port \
define define-syntax delay denominator display do dynamic-wind \
else eof-object? eq? equal? eqv? eval even? exact->inexact exact? \
exp expt \
floor for-each force \
gcd \
if imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment \
lambda lcm length let let* let-syntax letrec letrec-syntax \
list list->string list->vector list-ref list-tail list? load log \
magnitude make-polar make-rectangular make-string make-vector \
map max member memq memv min modulo \
negative? newline not null-environment null? number->string number? numerator \
odd? open-input-file open-output-file or output-port? \
pair? peek-char input-port? output-port? positive? procedure? \
quasiquote quote quotient \
rational? rationalize read read-char real-part real? remainder reverse round \
scheme-report-environment set! set-car! set-cdr! sin sqrt string \
string->list string->number string->symbol string-append \
string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? \
string-copy string-fill! string-length string-ref string-set! \
string<=? string<? string=? string>=? string>? string? \
substring symbol->string symbol? syntax-rules \
transcript-off transcript-on truncate \
unquote unquote-splicing \
values vector vector->list vector-fill! vector-length vector-ref vector-set! vector? \
with-input-from-file with-output-to-file write write-char \
zero?

word.chars.scheme=$(chars.alpha)$(chars.numeric)!$%&*/:<=>?^_~+-.@
word.characters.$(file.patterns.scheme)=$(word.chars.scheme)


comment.block.lisp=;
comment.box.start.lisp=;;
comment.box.middle.lisp=;;
comment.box.end.lisp=;;


# LISP styles

# Default
style.lisp.32=$(font.base)
# White space
style.lisp.0=fore:#808080
# Line Comment
style.lisp.1=$(colour.code.comment.box),$(font.code.comment.box)
# Number
style.lisp.2=$(colour.number)
# Keyword
style.lisp.3=$(colour.keyword),bold
# String
style.lisp.6=$(colour.string)
# Operators
style.lisp.10=$(colour.operator),bold
# Identifiers
style.lisp.9=
# End of line where string is not closed
style.lisp.8=fore:#000000,font:Verdana,size:9,back:#fefecc,eolfilled
# Matched Operators
style.lisp.34=fore:#0000FF,bold
style.lisp.35=fore:#FF0000,bold
# Braces are only matched in operator style
braces.lisp.style=10

#command.go.$(file.patterns.scheme)=c:\tools\pscheme\pscheme.exe /r $(FilePath)
command.go.$(file.patterns.scheme)=c:\tools\gambit\gsi.exe -f $(FilePath)
#command.go.$(file.patterns.scheme)=c:\tools\plt\mzscheme.exe -r $(FilePath)
command.go.subsystem.$(file.patterns.scheme)=0


================================================
FILE: bin/ide/luaCOPYRIGHT
================================================
Lua License
-----------

Lua is licensed under the terms of the MIT license reproduced below.
This means that Lua is free software and can be used for both academic
and commercial purposes at absolutely no cost.

For details and rationale, see http://www.lua.org/license.html .

===============================================================================

Copyright (C) 1994-2008 Lua.org, PUC-Rio.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

===============================================================================

(end of COPYRIGHT)


================================================
FILE: bin/ide/modules.api
================================================
rbool
uchar
ushort
short
true
false
null
elif
else
if
ifn
while
for
default
namespace
friend
class
goto
struct
static
operator
puts
putsl
getsl
findf
switch
case

calle
call
retn
reti

push
pop

jmp
jebxz
jebxnz

halt
nop

lea
mov
mov1
mov8

add
sub
imul
idiv
imod

cesb
cnesb
cgsb
cgesb
clsb
clesb

add8
sub8
imul8
idiv8
imod8
cgsb8
clsb8

_fadd8
_fsub8
_fmul8
_fdiv8
_fcgsb8
_fclsb8

band
bor
bnot
bxor
bshl
bshr
bsar

_udiv
_umod
_ucgsb
_ucgesb
_uclsb
_uclesb

rn

rd1
rd2
rd4
rd8
rdp

esp
ebp
eax
ebx
ecx
edx
esi
edi

void
char
int
uint
int8
double
rp
var
rbuf
rstr
rcs

function

break
continue
continued
return

this
sizeof
main
include
import
endif
ifdef
ifndef
define
enum

to
in

typeof
s_ret
s_off
s_param
s_local
mac

lambda

r_ceil_div
r_cond
cdecl
stdcall
array
_reti
NOT
AND
OR
XOR
SHL
SHR
SAR

r_new
r_new_n
r_delete
r_delete_n
r_swap
r_reverse
r_find_pos
r_split
r_split_e
r_qsort
r_find_pos_b
rbufm
rcode
rdic
rdir
rf
rff
rfs
rstrw
rsock
rset
rmutex
rlist


================================================
FILE: bin/ide/python.properties
================================================
# Define SciTE settings for Python files.

file.patterns.py=*.py;*.pyw
file.patterns.scons=SConstruct;SConscript

shbang.python=py

filter.python=Python (py pyw)|$(file.patterns.py)|

lexer.$(file.patterns.py)=python
lexer.$(file.patterns.scons)=python

keywordclass.python2=and as assert break class continue def del elif \
else except exec finally for from global if import in is lambda not \
or pass print raise return try while with yield

keywordclass.python3=False None True and as assert break class continue \
def del elif else except finally for from global if import in is lambda \
nonlocal not or pass raise return try while with yield

keywordclass.python=$(keywordclass.python2)

# Extra keywords for cython
keywordclass.cython=cdef cimport cpdef

keywords.$(file.patterns.py)=$(keywordclass.python) $(keywordclass.cython)
keywords.$(file.patterns.scons)=$(keywordclass.python)

# If you uncomment the 3 lines below,
# and put some words after "keywordclass2.python=",
# those words will be styled by style.python.14

#keywordclass2.python=
#keywords2.$(file.patterns.py)=$(keywordclass2.python)
#keywords2.$(file.patterns.scons)=$(keywordclass2.python)

#~ statement.indent.$(file.patterns.py)=10 :
statement.indent.$(file.patterns.py)=5 class def elif else except finally \
for if try while with

statement.lookback.$(file.patterns.py)=0
block.start.$(file.patterns.py)=
block.end.$(file.patterns.py)=

view.indentation.examine.*.py=2

tab.timmy.whinge.level=1

#fold.quotes.python=1

comment.block.python=#~

indent.python.colon=1

# Python styles
# White space
style.python.0=fore:#808080
# Comment
style.python.1=fore:#007F00,$(font.comment)
# Number
style.python.2=fore:#007F7F
# String
style.python.3=fore:#7F007F,$(font.monospace)
# Single quoted string
style.python.4=fore:#7F007F,$(font.monospace)
# Keyword
style.python.5=fore:#00007F,bold
# Triple quotes
style.python.6=fore:#7F0000
# Triple double quotes
style.python.7=fore:#7F0000
# Class name definition
style.python.8=fore:#0000FF,bold
# Function or method name definition
style.python.9=fore:#007F7F,bold
# Operators
style.python.10=bold
# Identifiers
style.python.11=
# Comment-blocks
style.python.12=fore:#7F7F7F
# End of line where string is not closed
style.python.13=fore:#000000,$(font.monospace),back:#E0C0E0,eolfilled
# Highlighted identifiers
style.python.14=fore:#407090
# Decorators
style.python.15=fore:#805000
# Matched Operators
style.python.34=fore:#0000FF,bold
style.python.35=fore:#FF0000,bold
# Braces are only matched in operator style
braces.python.style=10

if PLAT_WIN
	command.go.*.py=pythonw -u "$(FileNameExt)"
	command.go.subsystem.*.py=1
	command.go.*.pyw=pythonw -u "$(FileNameExt)"
	command.go.subsystem.*.pyw=1
	command.build.SConscript=scons.bat --up .
	command.build.SConstruct=scons.bat .

if PLAT_GTK
	command.go.*.py=python -u "$(FileNameExt)"
	command.build.SConscript=scons --up .
	command.build.SConstruct=scons .

if PLAT_MAC
	command.go.*.py=python -u "$(FileNameExt)"
	command.build.SConscript=scons --up .
	command.build.SConstruct=scons .

command.name.1.$(file.patterns.py)=Syntax Check
command.1.$(file.patterns.py)=python -c "import py_compile; py_compile.compile(r'$(FilePath)')"


================================================
FILE: bin/ide/scite.1
================================================
.TH SCITE 1 "2001 February 26"
.SH NAME
SciTE \- a programmers text editor
.SH SYNOPSIS
.br
.B SciTE
[file ..]
.SH DESCRIPTION
.B SciTE
is a graphical GTK+ based editor. It has support
for indenting, highlighting, and shortcuts in a myriad
of languages and can be extended by editing object-oriented
configuration files.
.PP
Support is included for Java, C, C++, C#, Shell, Apache.
.SH ON-LINE HELP
Type Alt-H or Click the Help Pulldown menu.
.SH AUTHOR
Most of
.B SciTE
was made by Neil Hodgson, with a lot of help from others.
See Help
.br
.SH BUGS
Probably.


================================================
FILE: bin/launch_ide.bat
================================================
start ide\SciTE.exe

================================================
FILE: bin/line_check.bat
================================================
rpp -jit example\line_check.h ../rpp/
rpp -jit example\line_check.h ../rlib/
rpp -jit example\line_check.h rsrc/
rpp -jit example\line_check.h example/
rpp -jit example\line_check.h gl/
pause

================================================
FILE: bin/nasm/bin.bat
================================================
@echo off
rem cd /d %~dp0
..\rpp.exe bin.h %1

================================================
FILE: bin/nasm/bin.h
================================================

import rfile.h

main
{
	v=rf.get_param
	if v.count<3
		putsl('invaild param')
		return
	a=v[2]
	if rf.cmd('..\\rpp.exe -grub '+a)==0
		putsl('compile error')
		return
	b=a.sub(0,a.count-2)
	if rf.cmd('nasm.exe '+b+'.asm -o '+b+'.bin')==0
		putsl('asm error')
	rfile.remove(rcode.gbk_to_utf8(b)+'.asm')
}

================================================
FILE: bin/nasm/cell.h
================================================
/*
裸机运行细胞自动机(生命游戏)
*/

import rbufm.h

main
{
	rbufm<char> arr(25,80)
	char* p=4194304
	for i=0 to 24
		for j=0 to 79
			arr[i,j]=(*p).toint%7
			p++
	char col=0
	for
		view(arr,col)
		delay
		trans(arr)
}

view(rbufm<char>& arr,char& col)
{
	for i=0 to 24
		for j=0 to 79
			if arr[i,j]==1
				rf.text(i*80+j,`*.tochar)//后面加上col可以变换颜色
			else
				rf.text(i*80+j,` .tochar)
			col++
}

//宏不能省略大括号
mac addc(a,b)
{
	if(a>=0&&a<25&&b>=0&&b<80)
	{
		if(arr[a,b]==1)
		{
			count++;
		}
	}
}

trans(rbufm<char>& arr)
{
	for i=0 to 24
		for j=0 to 79
			count=0
			addc(i-1,j-1)
			addc(i-1,j)
			addc(i-1,j+1)
			addc(i,j-1)
			addc(i,j+1)
			addc(i+1,j-1)
			addc(i+1,j)
			addc(i+1,j+1)
			if count==3
				arr[i,j]=1
			elif count==2
				;
			else
				arr[i,j]=0
}

delay
{
	for i=0 to 400_0000
		;
}

================================================
FILE: bin/nasm/dec.inc
================================================
IMPORT GetCommandLineA
IMPORT GetTickCount
IMPORT Sleep
IMPORT InitializeCriticalSection
IMPORT DeleteCriticalSection
IMPORT EnterCriticalSection
IMPORT LeaveCriticalSection
IMPORT _beginthreadex
IMPORT WaitForSingleObject
IMPORT CloseHandle

IMPORT lstrlenW
IMPORT FindClose
IMPORT FindNextFileW
IMPORT FindFirstFileW

IMPORT WSAStartup
IMPORT WSACleanup
IMPORT socket
IMPORT connect
IMPORT closesocket
IMPORT send
IMPORT recv
IMPORT bind
IMPORT listen
IMPORT accept

IMPORT __iob_func
IMPORT _fseeki64
IMPORT _ftelli64
IMPORT _wremove
IMPORT _wrename
IMPORT _wfopen
IMPORT fopen
IMPORT fclose
IMPORT fread
IMPORT fwrite
IMPORT fseek
IMPORT ftell

IMPORT _time32
IMPORT srand
IMPORT rand
IMPORT exit
IMPORT system
IMPORT malloc
IMPORT free
IMPORT memcpy
IMPORT memset
IMPORT strcpy
IMPORT strlen
IMPORT strcmp
IMPORT sscanf
IMPORT sprintf


================================================
FILE: bin/nasm/menu.lst
================================================

color black/cyan yellow/cyan
timeout 0
default /default

title rpp
root (hd0,0)
kernel (hd0,0)/cell.bin
boot





================================================
FILE: bin/nasm/windemos.inc
================================================
%ifndef __NASMX_DEMOS_INC__
%define __NASMX_DEMOS_INC__

;// nasmx.inc should always be the first file included.
;// If you get the following nasm error:
;//     fatal: unable to open include file 'nasmx.inc'
;// then you need to specify the full directory path to the NASMX
;// include directory using either the NASMENV environment variable or the
;// -I include switch from the command line.
;// For reference see the setpaths.bat file in the NASMX root directory.
;//////////////////////////////////////////////////////////////
;//
;// NASMX Preprocessor
;// Copyright (c) 2005-2013, The NASMX Project
;//
%ifndef __NASMX_INCLUDED__
%define __NASMX_INCLUDED__

;//////////////////////////////////////////////////////////////
;//
;// Check NASM Version
;//
%define __nxerrmsg "NASM v2.09.08 or later required"
%ifdef __NASM_VERSION_ID__
	%if __NASM_VERSION_ID__ < 0x02090800
		%fatal __nxerrmsg
	%endif
%else
	%fatal __nxerrmsg
%endif
%undef __nxerrmsg

;//////////////////////////////////////////////////////////////
;//
;// Set a NASMX Definition
;//
%macro NASMX_DEFINE 1-2
	%if %0 > 1
		%ixdefine __NASMX_%[%1]__ %[2]
	%else
		%ixdefine __NASMX_%[%1]__
	%endif
%endmacro


;//////////////////////////////////////////////////////////////
;//
;// Get a NASMX Definition
;//
%macro NASMX_GET_DEFINE 2
	%ifdef __NASMX_%[%1]__
		%xdefine %[%2] __NASMX_%[%1]__
	%elifdef %2
		%undef %[%2]
	%endif
%endmacro

;//////////////////////////////////////////////////////////////
;//
;// Undefine a NASMX Definition
;//
%macro NASMX_UNDEF 1
	%ifdef __NASMX_%[%1]__
		%undef __NASMX_%[%1]__
	%else
		%warning NASMX Definition %[1] is not defined
	%endif
%endmacro


;//////////////////////////////////////////////////////////////
;//
;// Define NASMX Version
;//
NASMX_DEFINE VERSION,"1.2"
NASMX_DEFINE VERSION_MAJOR, 1
NASMX_DEFINE VERSION_MINOR, 2
NASMX_DEFINE VERSION_REV, 12
NASMX_DEFINE VERSION_ID, 0x0102000C


;//////////////////////////////////////////////////////////////
;//
;// init NASMX context stack
;//
;%push __NASMX_CTX__


;//////////////////////////////////////////////////////////////
;//
;// Set a Context Stack Value
;//
%macro NASMX_SET_CONTEXT_VALUE 2
	%xdefine %$$%1 %2
%endmacro


;//////////////////////////////////////////////////////////////
;//
;// native data sizes
;// Must be defined here due to struc_size!
%ixdefine byte_size    1
%ixdefine word_size    2
%ixdefine dword_size   4
%ixdefine qword_size   8
%ixdefine tword_size  10
%ixdefine oword_size  16
%ixdefine __m64_size   8
%ixdefine __m128_size 16
%ixdefine __m256_size 32
%ixdefine __int64_size   8
%ixdefine __int128_size 16
%ixdefine __nxfloat_size     4
%ixdefine __nxdouble_size    8
%ixdefine __nxfloat32_size   4
%ixdefine __nxfloat64_size   8
%ixdefine __nxfloat80_size  10
%ixdefine __nxfloat128_size 16
;// native register sizes
%idefine al_size  1
%idefine bl_size  1
%idefine cl_size  1
%idefine dl_size  1
%idefine ah_size  1
%idefine bh_size  1
%idefine ch_size  1
%idefine dh_size  1
%idefine ax_size  2
%idefine bx_size  2
%idefine cx_size  2
%idefine dx_size  2
%idefine di_size  2
%idefine si_size  2
%idefine sp_size  2
%idefine bp_size  2
%idefine bpl_size 1
%idefine dil_size 1
%idefine sil_size 1
%idefine spl_size 1
%idefine eax_size 4
%idefine ebx_size 4
%idefine ecx_size 4
%idefine edx_size 4
%idefine edi_size 4
%idefine esi_size 4
%idefine esp_size 4
%idefine ebp_size 4
%idefine rax_size 8
%idefine rbx_size 8
%idefine rcx_size 8
%idefine rdx_size 8
%idefine rdi_size 8
%idefine rsi_size 8
%idefine rsp_size 8
%idefine rbp_size 8
%idefine r8d_size  4
%idefine r9d_size  4
%idefine r10d_size 4
%idefine r11d_size 4
%idefine r12d_size 4
%idefine r13d_size 4
%idefine r14d_size 4
%idefine r15d_size 4
%idefine r8_size  8
%idefine r9_size  8
%idefine r10_size 8
%idefine r11_size 8
%idefine r12_size 8
%idefine r13_size 8
%idefine r14_size 8
%idefine r15_size 8

;// register aliases used to help with portability
%ifidn __BITS__,64
%ixdefine __AX rax
%ixdefine __BX rbx
%ixdefine __CX rcx
%ixdefine __DX rdx
%ixdefine __DI rdi
%ixdefine __SI rsi
%ixdefine __BP rbp
%ixdefine __SP rsp
%else
%ixdefine __AX eax
%ixdefine __BX ebx
%ixdefine __CX ecx
%ixdefine __DX edx
%ixdefine __DI edi
%ixdefine __SI esi
%ixdefine __BP ebp
%ixdefine __SP esp
%endif
;// register names used to help with macros invoke and uses
%ixdefine __nx_reg_eax eax
%ixdefine __nx_reg_ebx ebx
%ixdefine __nx_reg_ecx ecx
%ixdefine __nx_reg_edx edx
%ixdefine __nx_reg_edi edi
%ixdefine __nx_reg_esi esi
%ixdefine __nx_reg_ebp ebp
%ixdefine __nx_reg_esp esp
%ixdefine __nx_reg_rax rax
%ixdefine __nx_reg_rbx rbx
%ixdefine __nx_reg_rcx rcx
%ixdefine __nx_reg_rdx rdx
%ixdefine __nx_reg_rdi rdi
%ixdefine __nx_reg_rsi rsi
%ixdefine __nx_reg_rbp rbp
%ixdefine __nx_reg_rsp rsp
%ixdefine __nx_reg_r8  r8
%ixdefine __nx_reg_r9  r9
%ixdefine __nx_reg_r10 r10
%ixdefine __nx_reg_r11 r11
%ixdefine __nx_reg_r12 r12
%ixdefine __nx_reg_r13 r13
%ixdefine __nx_reg_r14 r14
%ixdefine __nx_reg_r15 r15


;//////////////////////////////////////////////////////////////
;//
;// nasm storage types
;//
%ixdefine byte_reserve   RESB
%ixdefine word_reserve   RESW
%ixdefine dword_reserve  RESD
%ixdefine qword_reserve  RESQ
%ixdefine tword_reserve  REST
%ixdefine oword_reserve  RESO
%ixdefine __m64_reserve  RESQ
%ixdefine __m128_reserve RESO
%ixdefine __int64_reserve  RESQ
%ixdefine __int128_reserve RESO
%ixdefine __nxfloat_reserve    RESD
%ixdefine __nxdouble_reserve   RESQ
%ixdefine __nxfloat32_reserve  RESD
%ixdefine __nxfloat64_reserve  RESQ
%ixdefine __nxfloat80_reserve  RESO
%ixdefine __nxfloat128_reserve RESO

;//////////////////////////////////////////////////////////////
;//
;// nasm storage types
;//
%ixdefine byte_storage   DB
%ixdefine word_storage   DW
%ixdefine dword_storage  DD
%ixdefine qword_storage  DQ
%ixdefine tword_storage  DT
%ixdefine oword_storage  DO
%ixdefine __m64_storage  DQ
%ixdefine __m128_storage DO
%ixdefine __int64_storage  DQ
%ixdefine __int128_storage DO
%ixdefine __nxfloat_storage    DD
%ixdefine __nxdouble_storage   DQ
%ixdefine __nxfloat32_storage  DD
%ixdefine __nxfloat64_storage  DQ
%ixdefine __nxfloat80_storage  DO
%ixdefine __nxfloat128_storage DO

;//////////////////////////////////////////////////////////////
;//
;// nasmx classifcation of types
;//
;// Bits used to contain classification:
;//  0-10 : size of type in bytes
;//    11 : reserved (0)
;// 12-15 : type   ( TODO: struc/union/class )
;//         0 = int type
;//         8 = (bit 15 set if float type, otherwise clear)
;// 
%ixdefine byte_type   0x0001
%ixdefine word_type   0x0002
%ixdefine dword_type  0x0004
%ixdefine qword_type  0x0008
%ixdefine tword_type  0x000A
%ixdefine oword_type  0x0010
%ixdefine __m64_type  0x8008
%ixdefine __m128_type 0x8010
%ixdefine __m256_type 0x8020
%ixdefine __int64_type  0x8008
%ixdefine __int128_type 0x8010
%ixdefine __nxfloat_type    0x8004
%ixdefine __nxdouble_type   0x8008
%ixdefine __nxfloat32_type  0x8004
%ixdefine __nxfloat64_type  0x8008
%ixdefine __nxfloat80_type  0x800A
%ixdefine __nxfloat128_type 0x8010

;// NASMX int types
%ixdefine int8_t     byte
%ixdefine uint8_t    byte
%ixdefine int16_t    word
%ixdefine uint16_t   word
%ixdefine int32_t    dword
%ixdefine uint32_t   dword
%ixdefine long32_t   dword
%ixdefine ulong32_t  dword
%ixdefine int64_t    qword
%ixdefine uint64_t   qword
%ixdefine int80_t    tword
%ixdefine uint80_t   tword
%ixdefine int128_t   oword
%ixdefine uint128_t  oword
%ixdefine long64_t   qword
%ixdefine ulong64_t  qword
%ixdefine long128_t  oword
%ixdefine ulong128_t oword
;// NASMX Unicode Transformation Format types
%ixdefine utf8_t     uint8_t
%ixdefine utf16_t    uint16_t
%ixdefine utf32_t    uint32_t
;// C types
;// The classification of long_t type  must be performed
;// during __OUTPUT_FORMAT__ check as the actual sizes
;// are different among operating systems.
%ixdefine char_t     int8_t
%ixdefine uchar_t    uint8_t
%ixdefine short_t    int16_t
%ixdefine ushort_t   uint16_t
%ixdefine int_t      int32_t
%ixdefine uint_t     uint32_t
;// float types require special handling due to
;// nasm FLOAT directives!
%ixdefine float_t    __nxfloat
%ixdefine double_t   __nxdouble
%ixdefine float32_t  __nxfloat32
%ixdefine float64_t  __nxfloat64
%ixdefine float80_t  __nxfloat80
%ixdefine float128_t __nxfloat128
%idefine __float(v) dword __float32__(v)
%idefine __double(v) qword __float64__(v)

;// Map between native size and token.
;// The define name was chosen as it will
;// be displayed to the user if the macro
;// nx_token_from_size() is called with
;// an illegal value during assembly
%ixdefine __nx_error_token_size_1  byte
%ixdefine __nx_error_token_size_2  word
%ixdefine __nx_error_token_size_4  dword
%ixdefine __nx_error_token_size_8  qword
%ixdefine __nx_error_token_size_10 tword
%ixdefine __nx_error_token_size_16 xmm
%ixdefine __nx_error_token_size_32 xmm

%define typeof(x) ((x %+ _type >> 12) & 0x000F)
%define sizeof(x) x %+ _size
%define reserve(x) x %+ _reserve
%define declare(x) x %+ _storage
%define nx_token_from_size(x) __nx_error_token_size_ %+ x
%idefine is_typeof_float(x) ((x %+ _type >> 15) & 0x0001)

;//////////////////////////////////////////////////////////////
;//
;// NASMX ABI size and pointer types
;//
;//                 Windows     Linux       BSD
;//        type     32   64     32   64     32   64
;// sizeof(int)      4    4      4    4      4    4
;// sizeof(long)     4    4      4    8      4    8
;// sizeof(ptr)      4    8      4    8      4    8
;// sizeof(size_t)   4    8      4    8      4    8
%ixdefine size32_t dword
%ixdefine size64_t qword
%ixdefine size_t size%[__BITS__]_t
%assign __NASMX_ABI_BITS__ sizeof(size_t) * 8
%ifnidn __BITS__,__NASMX_ABI_BITS__
	%fatal unknown size_t: __BITS__
%endif
%ixdefine ptr32_t dword
%ixdefine ptr64_t qword
;// use for 32->64 bit expansion of either int or ptr
%ixdefine ptrdiff_t ptr%[__BITS__]_t
%ixdefine NASMX_PTR ptr%[__BITS__]_t
;// remember: intptr's can be confusing when going
;// from 32-bit to 64-bit as sizeof(ptr) is increased
;// to 8 but sizeof(int) remains 4 potential allowing
;// very large (long) ints when using intptrs as ints.
%ixdefine intptr_t ptrdiff_t
%ixdefine uintptr_t ptrdiff_t

;//////////////////////////////////////////////////////////////
;//
;// Calling Convention Enumerations
;// Used within IMPORT, PROTO, PROC, & INVOKE
;//
;// BIT
;//   0-3: PREFIX - index into decorations (i.e. '_', '@', or '?' )
;//        all bits clear if no prefix
;//   4-7: SUFFIX - index into decorations (i.e. '@', '?', '$' )
;//        all bits clear if no suffix
;//  8-11: CALLCONV - calling convention enum
;//    12: ARGROTATE - rotate direction of args pushed to stack
;//        set if left rotation ( PASCAL = %rotate 1 ), clear if right rotation ( CDECL = %rotate -1)
;//    13: RETPOPSARGS - stack adjustment responsibility
;//        set if callee pops args ( PASCAL/STDCALL ), clear if caller adjusts stack ( CDECL )
;//
;// Notes:
;//    You may create your own calling convention for your operating
;//    system of choice by modifying the flags and macros.  However,
;//    the standard calling conventions should continue to exist to
;//    permit interfacing with system calls ( unless you're writing
;//    an OS with a new ABI/API ;)
;//
%define __NASMX_DECLSPEC_CC_PREFIX_MASK__      0x0007
%define __NASMX_DECLSPEC_CC_SUFFIX_MASK__      0x0070
%define __NASMX_DECLSPEC_CC_ENUM_MASK__        0x0F00
%define __NASMX_DECLSPEC_CC_ARGROTATE_MASK__   0x1000
%define __NASMX_DECLSPEC_CC_RETPOPSARGS_MASK__ 0x2000

;// universal calling conventions
%idefine __NASMX_DECLSPEC_CALLCONV_NAKED__    0
%idefine __NASMX_DECLSPEC_CALLCONV_PASCAL__   0x3100
;// although currently specific to win32, the
;// STDCALL calling convention can be useful
%idefine __NASMX_DECLSPEC_CALLCONV_STDCALL__  0x2321
;// The following 3 calling conventions are highly
;// platform dependent and are defined within the
;// OUTPUT_FORMAT check
;// %idefine __NASMX_DECLSPEC_CALLCONV_CDECL__ 0x????
;// %idefine __NASMX_DECLSPEC_CALLCONV_THISCALL__ 0x????
;// %idefine __NASMX_DECLSPEC_CALLCONV_FASTCALL__ 0x????

;// CALLCONV Enums
;// coincidentally compatible with DotGNU
;// System.Runtime.InteropServices.CallingConvention Enum
%idefine __NASMX_DECLSPEC_CC_ENUM_NAKED__     0
%idefine __NASMX_DECLSPEC_CC_ENUM_PASCAL__    1
%idefine __NASMX_DECLSPEC_CC_ENUM_CDECL__     2
%idefine __NASMX_DECLSPEC_CC_ENUM_STDCALL__   3
%idefine __NASMX_DECLSPEC_CC_ENUM_THISCALL__  4
%idefine __NASMX_DECLSPEC_CC_ENUM_FASTCALL__  5
;// %idefine __NASMX_DECLSPEC_CALLCONV_CC_ENUM_RDFCALL__   6

;// internal CALLCONV macros
%define nx_declspec_cc_prefix(x)       (x & 0x0007)
%define nx_declspec_cc_suffix(x)      ((x >> 4) & 0x0007)
%define nx_declspec_cc_enum(x)        ((x >> 8) & 0x000F)
%define nx_declspec_cc_argrotate(x)   ((x >> 12) & 0x0001)
%define nx_declspec_cc_retpopsargs(x) ((x >> 13) & 0x0001)

;// String containing chars that the prefix/suffix bits index into.
;// If you are adding __thiscall convention for your compiler of
;// choice make sure that the initial suffix char is present in
;// the decorations string.
%define __NASMX_DECLSPEC_CC_DECORATIONS__     '_@?$'
;// The following formatted string is used by the nx_is* functions
%define __NASMX_NUMALPHATOKEN__ '.+-0123456789EeABCDFabcdfGHIJKLMNOPQRSTUVWXYZghijklmnopqrstuvwxyz$@_'

;//////////////////////////////////////////////////////////////
;// internal macro call
;// used by IMPORT, PROC, & INVOKE
;// usage:
;//    nx_callconv_decorate callconv, funcname, suffix
;// examples:
;//    nx_callconv_decorate __NASMX_DECLSPEC_CALLCONV_STDCALL__, WinProc, 16
;//    nx_callconv_decorate __NASMX_DECLSPEC_CALLCONV_CDECL__, printf
;//    nx_callconv_decorate __NASMX_DECLSPEC_CALLCONV_THISCALL__, ClassName.MethodName, 'Z1yi4p8aue'
%macro nx_callconv_decorate 2-3.nolist 0
	%ifnum %1
		%assign %%__pidx nx_declspec_cc_prefix(%1)
		%assign %%__sidx nx_declspec_cc_suffix(%1)
	%else
		%fatal 'CALLCONV undefined:' %1
	%endif
	%ifnum %2
		%fatal 'internal error'
	%endif

	%if %%__pidx > 0
		%substr %%__sig __NASMX_DECLSPEC_CC_DECORATIONS__ %%__pidx
		%ifnum %2
			%fatal 'internal error'
		%elifid %2
			%defstr %%__func %2
		%eliftoken %2
			%defstr %%__func %2
		%else
			%define %%__func %2
		%endif
		%strcat %%__sig %%__sig,%%__func
	%else
		%ifstr %2
			%define %%__func %2
		%else
			%defstr %%__sig %2
		%endif
	%endif
	%if %%__sidx > 0
		%ifnum %3
			%defstr %%__suffix %3
		%elifid %3
			%defstr %%__suffix %3
		%else
			%ifstr %3
				%define %%__suffix %3
			%else
				%defstr %%__suffix %3
			%endif
		%endif
		%substr %%__stok __NASMX_DECLSPEC_CC_DECORATIONS__ %%__sidx
		%strcat %%__sig %%__sig,%%__stok,%%__suffix
	%endif

	%deftok %$__nxtok_decorated_name %%__sig

%endmacro

;//////////////////////////////////////////////////////////////
;//
;// Target Operating System Type definitions
;//
%define __NASMX_DECLSPEC_SYSTYPE_LINUX__   1
%define __NASMX_DECLSPEC_SYSTYPE_MACHOS__  2
%define __NASMX_DECLSPEC_SYSTYPE_BSD__     3
%define __NASMX_DECLSPEC_SYSTYPE_WINDOWS__ 4

;//////////////////////////////////////////////////////////////////
;// Macro to control NASMX default behavior
;// example usage:
;//    NASMX_PRAGMA CALLSTACK, 32 ; Enable callstack optimization
;//    NASMX_PRAGMA CALLSTACK, 0  ; Disable callstack optimization
;//    NASMX_PRAGMA WARNING, DISABLE, ALL
;//    NASMX_PRAGMA WARNING, DISABLE, 8001[, 8002, 8003]
;//    NASMX_PRAGMA WARNING, ENABLE, ALL
;// The macro will eventually allow us to enable/disable
;// warnings generated by the NASMX macro type system
%imacro NASMX_PRAGMA 1-*.nolist
	%ifidni WARNING,%1
		%warning actual pragma warnings currently unimplemented
		%ifidni ENABLE, %2
			;// assert: warnings are enabled if undefined
			%ifidni ALL,%3
				%ifdef __NASMX_PRAGMA_WARNING_8001__
					%undef __NASMX_PRAGMA_WARNING_8001__
				%endif
				%ifdef __NASMX_PRAGMA_WARNING_8002__
					%undef __NASMX_PRAGMA_WARNING_8002__
				%endif
			%else
				%rep %0-2
					%rotate 1
					%ifdef __NASMX_PRAGMA_WARNING_%1__
						%undef __NASMX_PRAGMA_WARNING_%1__
					%endif
				%endrep
			%endif
		%elifidni DISABLE, %2
			;// assert: warnings are disabled if defined
			%ifidni ALL,%3
				%ifndef __NASMX_PRAGMA_WARNING_8001__
					%define __NASMX_PRAGMA_WARNING_8001__
				%endif
				%ifndef __NASMX_PRAGMA_WARNING_8002__
					%define __NASMX_PRAGMA_WARNING_8002__
				%endif
			%else
				%rep %0-2
					%rotate 1
					%ifndef __NASMX_PRAGMA_WARNING_%3__
						%define __NASMX_PRAGMA_WARNING_%3__
					%endif
				%endrep
			%endif
		%else
			%error 'syntax: nasmx_pragma warning, [enable | disable], ...'
		%endif
	%elifidni CALLSTACK, %1
		;// This option is very useful with fastcall
		%ifdef NASMX_ENDPROC
			%error %1 pragma cannot be defined within procedure definition
		%endif
		%ifnum %2
			%assign %%__nx_stack_adjust %2
			%if %%__nx_stack_adjust > 0
				;// assert: turning on call stack feature
				%ifidni __OUTPUT_FORMAT__, win64
					;// assert: Win64 calling convention requires
					;// that the call stack be at least 32
					%if %%__nx_stack_adjust < 32
						%assign %%__nx_stack_adjust 32
					%endif
				%endif
				;// Note: x64 calling convention requires that
				;// the call stack be aligned to 16 bytes.
				;// Use 8 bytes for x86
				%assign %%__nx_align __NASMX_ABI_BITS__ / 4
				%assign %%__off (((%%__nx_stack_adjust + %%__nx_align) / %%__nx_align) * %%__nx_align)
				%assign %%__tmp (%%__nx_stack_adjust + %%__nx_align)
				%if (%%__off != %%__tmp)
					%assign %%__nx_stack_adjust %%__off
				%endif
			%endif
			;// This must be a global define since it is used within the procedure
			;// and during invoke and thus could be hidden by one or more user contexts
			%ifdef __NX_PROLOGUE_CALLSTACK_ADJUST__
				%undef __NX_PROLOGUE_CALLSTACK_ADJUST__
			%endif
			%if %%__nx_stack_adjust > 0
				%xdefine __NX_PROLOGUE_CALLSTACK_ADJUST__ %%__nx_stack_adjust
			%endif
		%else
			%error %1 pragma requires valid byte count
		%endif
	%else
		%error 'unknown nasmx_pragma:' %1
	%endif
%endmacro

;//////////////////////////////////////////////////////////////////
;// Macro to override default ABI behavior (Declare Specialization)
;// example usage:
;//    NASMX_DECLSPEC CALLCONV, PASCAL
;//    NASMX_DECLSPEC CALLCONV, STDCALL, DEFAULT
;//    NASMX_DECLSPEC SYSTYPE, LINUX
;//
;// notes:
;//    Make sure you understand the effects of using this command
;//    before making a global declaration!  Unresolved linker errors
;//    may haunt you!
%imacro NASMX_DECLSPEC 1-8.nolist
	%ifidni %1,CALLCONV
		%if %0 < 2
			%error 'nasmx_declspec syntax'
		%endif
		%ifndef __NASMX_DECLSPEC_CALLCONV_%[%2]__
			%error 'unknown declspec calltype:' %2
		%endif
		%if %0 == 2
			%ixdefine __NASMX_DECLSPEC_CALLCONV_DEFAULT__ __NASMX_DECLSPEC_CALLCONV_%[%2]__
		%else
			%ifdef __NASMX_DECLSPEC_CALLCONV_%[%3]__
				%warning 'declspec redefining' %1 %2 %3
			%endif
			%ixdefine __NASMX_DECLSPEC_CALLCONV_%[%3]__ __NASMX_DECLSPEC_CALLCONV_%[%2]__
		%endif
	%else
		%ifidni %1,SYSTYPE
			%ifndef __NASMX_DECLSPEC_SYSTYPE_%[%2]__
				%error 'unknown declspec systype:' %2
			%endif
			%if %0 == 2
				%ixdefine __NASMX_DECLSPEC_SYSTYPE_DEFAULT__ __NASMX_DECLSPEC_SYSTYPE_%[%2]__
			%else
				%ifdef __NASMX_DECLSPEC_SYSTYPE_%[%3]__
					%warning 'declspec redefining' %1 %2 %3
				%endif
				%ixdefine __NASMX_DECLSPEC_SYSTYPE_%[%3]__ __NASMX_DECLSPEC_SYSTYPE_%[%2]__
			%endif
		%else
			%error 'unknown declspec:' %1
		%endif
	%endif
%endmacro


;//////////////////////////////////////////////////////////////////
;// OUTPUT_FORMAT check
;//
;// All system specific defines are made here
;//
%ifidn	 __OUTPUT_FORMAT__,elf
	%idefine __NASMX_DECLSPEC_CALLCONV_CDECL__    0x0200
	%idefine __NASMX_DECLSPEC_CALLCONV_THISCALL__ 0x0410
	%idefine __NASMX_DECLSPEC_CALLCONV_FASTCALL__ 0x0500
	%define __NASMX_DECLSPEC_FASTCALL_MAXINTREGS__    2
	%define __NASMX_DECLSPEC_FASTCALL_MAXFLOATREGS__  0
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_4__ 'ECXEDX'
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_2__ 'CX DX '
	%ifdef FREEBSD
		NASMX_DECLSPEC SYSTYPE, BSD
	%elifdef NETBSD
		NASMX_DECLSPEC SYSTYPE, BSD
	%elifdef OPENBSD
		NASMX_DECLSPEC SYSTYPE, BSD
	%else
		NASMX_DECLSPEC SYSTYPE, LINUX
	%endif
	NASMX_DECLSPEC CALLCONV, CDECL, DEFAULT
	%idefine long_t long32_t
	%idefine ulong_t ulong32_t
	%idefine wchar_t dword
	%ifdef UNICODE
		%idefine NASMX_TCHAR wchar_t
		%idefine NASMX_TEXT(x) __utf32__(x)
	%else
		%idefine NASMX_TCHAR char_t
		%idefine NASMX_TEXT(x) x
	%endif
%elifidn __OUTPUT_FORMAT__,elf32
	;// gcc does NOT prepend underscores to functions
	;// declared using cdecl
	%idefine __NASMX_DECLSPEC_CALLCONV_CDECL__    0x0200
	%idefine __NASMX_DECLSPEC_CALLCONV_THISCALL__ 0x0410
	%idefine __NASMX_DECLSPEC_CALLCONV_FASTCALL__ 0x0500
	%define __NASMX_DECLSPEC_FASTCALL_MAXINTREGS__    2
	%define __NASMX_DECLSPEC_FASTCALL_MAXFLOATREGS__  0
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_4__ 'ECXEDX'
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_2__ 'CX DX '
	%ifdef FREEBSD
		NASMX_DECLSPEC SYSTYPE, BSD	
	%elifdef NETBSD
		NASMX_DECLSPEC SYSTYPE, BSD	
	%elifdef OPENBSD
		NASMX_DECLSPEC SYSTYPE, BSD	
	%else
		NASMX_DECLSPEC SYSTYPE, LINUX
	%endif
	NASMX_DECLSPEC CALLCONV, CDECL, DEFAULT
	%idefine long_t long32_t
	%idefine ulong_t ulong32_t
	%idefine wchar_t dword
	%ifdef UNICODE
		%idefine NASMX_TCHAR wchar_t
		%idefine NASMX_TEXT(x) __utf32__(x)
	%else
		%idefine NASMX_TCHAR char_t
		%idefine NASMX_TEXT(x) x
	%endif
%elifidn __OUTPUT_FORMAT__,elf64
	%idefine __NASMX_DECLSPEC_CALLCONV_CDECL__    0x0200
	%idefine __NASMX_DECLSPEC_CALLCONV_THISCALL__ 0x0410
	%idefine __NASMX_DECLSPEC_CALLCONV_FASTCALL__ 0x0500
	%define __NASMX_DECLSPEC_FASTCALL_MAXINTREGS__    6
	%define __NASMX_DECLSPEC_FASTCALL_MAXFLOATREGS__  8
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_8__ 'RDIRSIRDXRCXR8 R9 '
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_4__ 'EDIESIEDXECXR8DR9D'
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_2__ 'DI SI DX CX R8WR9W'
	%ifdef FREEBSD
		NASMX_DECLSPEC SYSTYPE, BSD	
	%elifdef NETBSD
		NASMX_DECLSPEC SYSTYPE, BSD	
	%elifdef OPENBSD
		NASMX_DECLSPEC SYSTYPE, BSD	
	%else
		NASMX_DECLSPEC SYSTYPE, LINUX
	%endif
	NASMX_DECLSPEC CALLCONV, FASTCALL, DEFAULT
	%idefine long_t long64_t
	%idefine ulong_t ulong64_t
	%idefine wchar_t dword
	%ifdef UNICODE
		%idefine NASMX_TCHAR wchar_t
		%idefine NASMX_TEXT(x) __utf32__(x)
	%else
		%idefine NASMX_TCHAR char_t
		%idefine NASMX_TEXT(x) x
	%endif
%elifidn __OUTPUT_FORMAT__,macho
	%idefine __NASMX_DECLSPEC_CALLCONV_CDECL__    0x0201
	%idefine __NASMX_DECLSPEC_CALLCONV_THISCALL__ 0x0411
	%idefine __NASMX_DECLSPEC_CALLCONV_FASTCALL__ 0x0501
	%define __NASMX_DECLSPEC_FASTCALL_MAXINTREGS__    0
	%define __NASMX_DECLSPEC_FASTCALL_MAXFLOATREGS__  0
	NASMX_DECLSPEC SYSTYPE, MACHOS
	NASMX_DECLSPEC CALLCONV, CDECL, DEFAULT
	%idefine long_t long32_t
	%idefine ulong_t ulong32_t
	%idefine wchar_t dword
	%ifdef UNICODE
		%idefine NASMX_TCHAR wchar_t
		%idefine NASMX_TEXT(x) __utf32__(x)
	%else
		%idefine NASMX_TCHAR char_t
		%idefine NASMX_TEXT(x) x
	%endif
%elifidn __OUTPUT_FORMAT__,macho32
	%idefine __NASMX_DECLSPEC_CALLCONV_CDECL__    0x0201
	%idefine __NASMX_DECLSPEC_CALLCONV_THISCALL__ 0x0411
	%idefine __NASMX_DECLSPEC_CALLCONV_FASTCALL__ 0x0501
	%define __NASMX_DECLSPEC_FASTCALL_MAXINTREGS__    0
	%define __NASMX_DECLSPEC_FASTCALL_MAXFLOATREGS__  0
	NASMX_DECLSPEC SYSTYPE, MACHOS
	NASMX_DECLSPEC CALLCONV, CDECL, DEFAULT
	%idefine long_t long32_t
	%idefine ulong_t ulong32_t
	%idefine wchar_t dword
	%ifdef UNICODE
		%idefine NASMX_TCHAR wchar_t
		%idefine NASMX_TEXT(x) __utf32__(x)
	%else
		%idefine NASMX_TCHAR char_t
		%idefine NASMX_TEXT(x) x
	%endif
%elifidn __OUTPUT_FORAMT__,macho64
	%idefine __NASMX_DECLSPEC_CALLCONV_CDECL__    0x0201
	%idefine __NASMX_DECLSPEC_CALLCONV_THISCALL__ 0x0411
	%idefine __NASMX_DECLSPEC_CALLCONV_FASTCALL__ 0x0501
	%define __NASMX_DECLSPEC_FASTCALL_MAXINTREGS__    6
	%define __NASMX_DECLSPEC_FASTCALL_MAXFLOATREGS__  8
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_8__ 'RDIRSIRDXRCXR8 R9 '
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_4__ 'EDIESIEDXECXR8dR9d'
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_2__ 'DI SI DX CX R8wR9w'
	NASMX_DECLSPEC SYSTYPE, MACHOS
	NASMX_DECLSPEC CALLCONV, FASTCALL, DEFAULT
	%idefine long_t long64_t
	%idefine ulong_t ulong64_t
	%idefine wchar_t dword
	%ifdef UNICODE
		%idefine NASMX_TCHAR wchar_t
		%idefine NASMX_TEXT(x) __utf32__(x)
	%else
		%idefine NASMX_TCHAR char_t
		%idefine NASMX_TEXT(x) x
	%endif
%elifidn __OUTPUT_FORMAT__,win32
	%idefine __NASMX_DECLSPEC_CALLCONV_CDECL__    0x0201
	%idefine __NASMX_DECLSPEC_CALLCONV_THISCALL__ 0x2423
	%idefine __NASMX_DECLSPEC_CALLCONV_FASTCALL__ 0x2522
	%define __NASMX_DECLSPEC_FASTCALL_MAXINTREGS__    2
	%define __NASMX_DECLSPEC_FASTCALL_MAXFLOATREGS__  0
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_4__ 'ECXEDX'
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_2__ 'CX DX '
	NASMX_DECLSPEC SYSTYPE, WINDOWS
	NASMX_DECLSPEC CALLCONV, STDCALL, DEFAULT
	%idefine long_t long32_t
	%idefine ulong_t ulong32_t
	%idefine wchar_t word
	%ifdef UNICODE
		%idefine NASMX_TCHAR wchar_t
		%idefine NASMX_TEXT(x) __utf16__(x)
	%else
		%idefine NASMX_TCHAR char_t
		%idefine NASMX_TEXT(x) x
	%endif
%elifidn __OUTPUT_FORMAT__,win64
	%idefine __NASMX_DECLSPEC_CALLCONV_CDECL__    0x0201
	%idefine __NASMX_DECLSPEC_CALLCONV_THISCALL__ 0x2423
	%idefine __NASMX_DECLSPEC_CALLCONV_FASTCALL__ 0x0500
	%define __NASMX_DECLSPEC_FASTCALL_MAXINTREGS__    4
	%define __NASMX_DECLSPEC_FASTCALL_MAXFLOATREGS__  4
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_8__ 'RCXRDXR8 R9 '
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_4__ 'ECXEDXR8DR9D'
	%define __NASMX_DECLSPEC_FASTCALL_REGINTARGS_2__ 'CX DX R8WR9W'
	NASMX_DECLSPEC SYSTYPE, WINDOWS
	NASMX_DECLSPEC CALLCONV, FASTCALL, DEFAULT
	%idefine long_t long32_t
	%idefine ulong_t ulong32_t
	%idefine wchar_t word
	%ifdef UNICODE
		%idefine NASMX_TCHAR wchar_t
		%idefine NASMX_TEXT(x) __utf16__(x)
	%else
		%idefine NASMX_TCHAR char_t
		%idefine NASMX_TEXT(x) x
	%endif
%else
	%idefine __NASMX_DECLSPEC_CALLCONV_CDECL__    0x0200
	%idefine __NASMX_DECLSPEC_CALLCONV_THISCALL__ 0x0410
	%idefine __NASMX_DECLSPEC_CALLCONV_FASTCALL__ 0x0500
	%define __NASMX_DECLSPEC_FASTCALL_MAXINTREGS__    0
	%define __NASMX_DECLSPEC_FASTCALL_MAXFLOATREGS__  0
	NASMX_DECLSPEC SYSTYPE, LINUX
	NASMX_DECLSPEC CALLCONV, CDECL, DEFAULT
	%if sizeof(size_t) == 32
		%idefine long_t long32_t
		%idefine ulong_t ulong32_t
	%else
		%idefine long_t long64_t
		%idefine ulong_t ulong64_t
	%endif
	%idefine wchar_t dword
	%ifdef UNICODE
		%idefine NASMX_TCHAR wchar_t
		%idefine NASMX_TEXT(x) __utf32__(x)
	%else
		%idefine NASMX_TCHAR char_t
		%idefine NASMX_TEXT(x) x
	%endif
%endif

;// pull in appropriate syscalls
%if __NASMX_DECLSPEC_SYSTYPE_DEFAULT__ == __NASMX_DECLSPEC_SYSTYPE_BSD__
    %ifdef FREEBSD
	%include 'bsd/syscalls.freebsd.inc'
    %elifdef NETBSD
	%include 'bsd/syscalls.netbsd.inc'
    %elifdef OPENBSD
	%include 'bsd/syscalls.openbsd.inc'
    %endif
%elif __NASMX_DECLSPEC_SYSTYPE_DEFAULT__ == __NASMX_DECLSPEC_SYSTYPE_LINUX__
    %include 'linux/syscall.inc'
%endif


;//////////////////////////////////////////////////////////////
;//
;// NASMX_STRUC
;//
%imacro NASMX_STRUC 0-*.nolist __NX_ROOT, __NX_ROOT, __NX_CTX_STRUC
	%ifnidni %3,__NX_CTX_STRUC
		%ifnidni %3,__NX_CTX_UNION
			%fatal unknown arg: %{3}
		%endif
	%endif
	%ifctx __NX_CTX_STRUC
		%define %%__is_nested 1
	%elifctx __NX_CTX_UNION
		%define %%__is_nested 1
	%else
		%define %%__is_nested 0
	%endif
	%ifidni %1, __NX_ROOT
		%define %%__is_named 0
	%else
		%define %%__is_named 1
	%endif
	%if (%%__is_nested == 0)
		%if (%%__is_named == 0)
			%fatal root structure or union requires name
		%endif
		%push %3
		%xdefine %$__nx_name %1
		%assign %$__nx_size 0
	%else
		%if (%%__is_named == 0)
			%xdefine %%__tname %{$__nx_name}
		%else
			%xdefine %%__tname %{$__nx_name}.%1
		%endif
		;// the following 5 line sequence fails on 2.08.02
		%assign %%__tsize %$__nx_size
		%push %3
		%xdefine %$__nx_name %%__tname
		%assign %$__nx_size %%__tsize
		%if (%%__is_named == 1)
			%{$__nx_name} equ %$__nx_size
		%endif
	%endif
	%assign %$__nx_osize %$__nx_size
	%assign %$__nx_usize 0
	%define %$__nx_isnamed %%__is_named
	%if (%%__is_named == 1)
		%ifidni %3,__NX_CTX_STRUC
			%xdefine %{$__nx_name}_type struc_type
		%elifidni %3,__NX_CTX_UNION
			%xdefine %{$__nx_name}_type union_type
		%else
			%fatal unknown arg: %{3}
		%endif
		%xdefine %{$__nx_name}_reserve byte_reserve
		%xdefine %{$__nx_name}_storage byte_storage
	%endif
%endmacro

%imacro NASMX_UNION 0-*.nolist __NX_ROOT, __NX_ROOT, __NX_CTX_UNION
	NASMX_STRUC %1, __NX_ROOT, __NX_CTX_UNION
%endmacro

%imacro NASMX_ALIGN 1.nolist
	%ifnctx __NX_CTX_STRUC
		%ifnctx __NX_CTX_UNION
			%fatal corrupt context
		%endif
	%endif
	%if (%1 > 0)
		%assign %%__off (((%$__nx_size + %1) / %1) * %1)
		%assign %%__tmp (%$__nx_size + %1)
		%if (%%__off != %%__tmp)
			%assign %$__nx_size %%__off
		%endif
	%endif
%endmacro

;// usage:
;//   NASMX_RESERVE hWnd, NASMX_PTR, 1
%imacro NASMX_RESERVE 2-3.nolist 1
	%ifnctx __NX_CTX_STRUC
		%ifnctx __NX_CTX_UNION
			%fatal corrupt context
		%endif
	%endif
	%ifndef %{2}_size
		%fatal unknown size for %{$__nx_name} %{1}: %{2}
	%endif
	%assign %%__argsize %{2}_size
	%if (%%__argsize < 1)
		%fatal invalid arg size for %{$__nx_name} %{1}: %{2}
	%endif
	%ifndef %{2}_storage
		%fatal unknown storage tag for %{$__nx_name} %{1}
	%endif

	%assign %%__qty %{3}
	%if (%%__qty < 1)
		%fatal invalid arg qty  for %{$__nx_name} %{1}: %{3}
	%endif

	%assign %%__amt (%%__argsize * %%__qty)

	%xdefine %[%{$__nx_name}.%{1}]_size %%__amt
	%xdefine %[%{$__nx_name}.%{1}]_type %[%{2}]_type
	%xdefine %[%{$__nx_name}.%{1}]_reserve %[%{2}]_reserve
	%xdefine %[%{$__nx_name}.%{1}]_storage %[%{2}]_storage
	%[%{$__nx_name}.%{1}] equ %[%{$__nx_size}]

	%ifctx __NX_CTX_UNION
		;// update current union size
		%if (%%__amt > %$__nx_usize)
			%assign %$__nx_usize %%__amt
		%endif
	%else
		;// update running size
		%assign %$__nx_size (%$__nx_size + %%__amt)
	%endif
%endmacro

%imacro NASMX_ENDSTRUC 0.nolist
	%ifnctx __NX_CTX_STRUC
		%ifnctx __NX_CTX_UNION
			%fatal corrupt context
		%endif
	%endif
	%if ((%$__nx_size-%$__nx_osize) > %$__nx_usize)
		%assign %$__nx_usize %$__nx_size-%$__nx_osize
	%endif
	%if (%$__nx_isnamed == 1)
		%{$__nx_name}_size equ %$__nx_usize
	%endif
	%assign %%__usize %$__nx_usize
	%pop
	%ifctx __NX_CTX_STRUC
		%assign %$__nx_size (%$__nx_size + %%__usize)
	%elifctx __NX_CTX_UNION
		%assign %$__nx_size (%$__nx_size + %%__usize)
		%if ((%$__nx_size-%$__nx_osize) > %$__nx_usize)
			%assign %$__nx_usize %$__nx_size-%$__nx_osize
		%endif
		%assign %$__nx_size %$__nx_osize
	%endif
%endmacro

%idefine NASMX_ENDUNION NASMX_ENDSTRUC

%imacro NASMX_ISTRUC 0-*.nolist __NX_ROOT, __NX_ROOT, __NX_CTX_ISTRUC
	%ifnidni %{3},__NX_CTX_ISTRUC
		%ifnidni %{3},__NX_CTX_IUNION
			%fatal unknown arg: %{3}
		%endif
	%endif
	%ifctx __NX_CTX_ISTRUC
		%define %%__is_nested 1
	%elifctx __NX_CTX_IUNION
		%define %%__is_nested 1
	%else
		%define %%__is_nested 0
	%endif
	%ifnidni %{1},__NX_ROOT
		%define %%__is_named 1
	%else
		%define %%__is_named 0
	%endif
	%if (%%__is_nested == 0)
		%if (%%__is_named == 0)
			%fatal root structure or union requires name
		%endif
		%ifidni %2, __NX_ROOT
			%fatal root structure or union requires base type
		%endif
		%push %3
		%xdefine %$__nx_istrucstart %{1}
		%xdefine %$__nx_name %{2}
		%[%$__nx_istrucstart]:
	%else
		%if (%%__is_named == 0)
			%xdefine %%__tname %{$__nx_name}
		%else
			%xdefine %%__tname %{$__nx_name}.%{1}
			%assign %%__off %%__tname
			%assign %%__times %%__off-($-%[%$__nx_istrucstart])
			%if (%%__times > 0)
				times %%__times db 0
			%endif
		%endif
		%push  %3
		%xdefine %$__nx_istrucstart %[%$$__nx_istrucstart]
		%xdefine %$__nx_name %%__tname
	%endif
	%define %$__nx_isnamed %%__is_named
%endmacro

%idefine NASMX_IUNION NASMX_ISTRUC

%imacro NASMX_AT 1-2+.nolist
	%assign %%__ofs %{$__nx_name}.%{1}
	%assign %%__count %%__ofs-($-%$__nx_istrucstart)
	%if (%%__count > 0)
		times %%__count db 0
	%endif
	%{$__nx_name}.%{1}_storage %2
%endmacro

%imacro NASMX_IENDSTRUC 0.nolist
	;// assert: finish up struc if needed
	%if (%$__nx_isnamed == 1)
		%assign %%__times %{$__nx_name}_size-($-%$__nx_istrucstart)
		%if (%%__times > 0)
			times %%__times db 0
		%endif
	%endif
	%pop
%endmacro

%idefine NASMX_IENDUNION NASMX_IENDSTRUC


;//////////////////////////////////////////////////////////////
;// MACRO nx_isalnum
;//
;// Purpose
;//    This macro is designed to return in the current context
;//    stack variable %$__nx_isalnum_bool if the parameter is
;//    alphanumeric.
;//
;// Usage:
;//    nx_isalnum chr
;//    nx_isalnum 'x'
;//
%macro nx_isalnum 1
    %ifstr %1
        %define %%__arg_chr %1
    %else
        %defstr %%__arg_chr %1
    %endif
    %assign %%__count 62
    %assign %%__idx 3
    %assign %$__nx_isalnum_bool 0
    %rep %%__count
        %assign %%__idx %%__idx + 1
        %substr %%__chr __NASMX_NUMALPHATOKEN__ %%__idx, 1
        %ifidn %%__chr, %%__arg_chr
            %assign %$__nx_isalnum_bool %%__idx
            %exitrep
        %endif
    %endrep
%endmacro

;//////////////////////////////////////////////////////////////
;// MACRO nx_ishexchr
;//
;// Purpose
;//    This macro is designed to return in the current context
;//    stack variable %$__nx_ishexnum_bool if the parameter is
;//    hexadecimal.
;//
;// Usage:
;//    nx_ishexchr chr
;//    nx_ishexchr 'f'
;//
%macro nx_ishexchr 1
    %ifstr %1
        %define %%__arg_chr %1
    %else
        %defstr %%__arg_chr %1
    %endif
    %assign %%__count 22
    %assign %%__idx 3
    %assign %$__nx_ishexchr_bool 0
    %rep %%__count
        %assign %%__idx %%__idx + 1
        %substr %%__chr __NASMX_NUMALPHATOKEN__ %%__idx, 1
        %ifidn %%__chr, %%__arg_chr
            %assign %$__nx_ishexchr_bool %%__idx
            %exitrep
        %endif
    %endrep
%endmacro

;//////////////////////////////////////////////////////////////
;// MACRO nx_isfloattok
;//
;// Purpose
;//    This macro is designed to return in the current context
;//    stack variable %$__nx_isfloattok_bool if the parameter is
;//    a float token.
;//
;// Usage:
;//    %define PI 3.14159
;//    nx_isfloattok PI
;//    nx_isfloattok string
;//
%macro nx_isfloattok 1
    %ifstr %1
        %define %%__arg_str %1
    %else
	%defstr %%__arg_str %1
    %endif
    %strlen %%__arg_len %%__arg_str
    %assign %$__nx_isfloattok 0
    %assign %%__found 0
    %assign %%__arg_idx 0
    %rep %%__arg_len
        %assign %%__arg_idx %%__arg_idx + 1
        %substr %%__arg_chr %%__arg_str %%__arg_idx, 1
        %assign %%__found 0
        %assign %%__idx 0
        %rep 15
            %assign %%__idx %%__idx + 1
            %substr %%__chr __NASMX_NUMALPHATOKEN__ %%__idx, 1
            %ifidn %%__chr, %%__arg_chr
              %assign %%__found %%__idx
              %exitrep
        %endif
        %endrep
        %if %%__found == 0
            %exitrep
        %endif
    %endrep
    %assign %$__nx_isfloattok_bool %%__found
%endmacro

;//////////////////////////////////////////////////////////////
;// MACRO nx_ishextok
;//
;// Purpose
;//    This macro is designed to return in the current context
;//    stack variable %$__nx_ishextok_bool if the parameter is
;//    a hex token.  Note that this macro also returns true if
;//    arg is an integer making it rather useful when we need
;//    to move the number to a register
;//
;// Usage:
;//    nx_ishextok token
;//    nx_ishextok 0xFFF0
;//
%macro nx_ishextok 1
    %ifstr %1
        %define %%__arg_str %1
    %else
        %defstr %%__arg_str %1
    %endif
    %strlen %%__arg_len %%__arg_str
    %assign %%__arg_idx 0
    %assign %%__has_x 0
    %rep %%__arg_len
        %assign %%__arg_idx %%__arg_idx + 1
        %substr %%__arg_chr %%__arg_str %%__arg_idx, 1
        %assign %%__found 0
        %ifidni %%__arg_chr, 'x'
            %if %%__has_x == 0
                %if %%__arg_idx < %%__arg_len
                    %assign %%__has_x 1
                    %assign %%__found 1
                %else
                    %exitrep
                %endif
            %else
                %exitrep
            %endif
        %else
            %assign %%__idx 1
            %rep 24
                %assign %%__idx %%__idx + 1
                %substr %%__chr __NASMX_NUMALPHATOKEN__ %%__idx, 1
                %ifidn %%__chr, %%__arg_chr
                    %assign %%__found %%__idx
                    %exitrep
                %endif
            %endrep
        %endif
        %if %%__found == 0
            %exitrep
        %endif
    %endrep
    %assign %$__nx_ishextok_bool %%__found
%endmacro

;//////////////////////////////////////////////////////////////
;// MACRO nx_strtok
;//
;// Purpose
;//    To parse a string and return delimited tokens
;//    Functionality is similar to the C strtok function
;//
;// Usage:                        ; After call:
;//    nx_strtok two tokens, ' '  ; %$__nx_token = two   , %$__nx_token_len = 3
;//    nx_strtok NULL, ' :?;'     ; %$__nx_token = tokens, %$__nx_token_len = 6
;//    nx_strtok NULL, ' :?;'     ; %$__nx_token = ''    , %$__nx_token_len = 0
;//
;// Notes:
;//    The return value is stored on the context stack as
;//    %$__nx_token thus it must only be called within a valid context.
;//    The length is also returned as %$__nx_token_len.  Check this value
;//    for 0 after call this macro before processing the return value.
;//
;//    Call more than once to get the next token in the sequence, if any.
;//    This function must be called at least once with a valid string
;//    or token to parse before passing in NULL (0) in subsequent calls.
;//
;//    Unfortunately, a side effect of using macros is that a comma which
;//    appears in a token actually causes the single token to split into 2
;//    tokens making it impossible to use this macro like:
;//         %define mytoken $32,000
;//         nx_strtok mytoken, ','
%imacro nx_strtok 2.nolist
	%ifnum %1
		%assign %%__nx_null %1
		%if %%__nx_null == 0
			%define %%__arg_str %$__nxtok_next
			%assign %%__arg_len %$__nxtok_len
		%else
			%defstr %%__arg_str %1
			%strlen %%__arg_len %%__arg_str
		%endif
	%else
		%ifstr %1
			%define %%__arg_str %1
		%else
			%defstr %%__arg_str %1
		%endif
		%strlen %%__arg_len %%__arg_str
	%endif

	%if %%__arg_len == 0
		%define %$__nxtok_next ''
		%assign %$__nxtok_len 0
		%define %$__nx_token ''
		%assign %$__nx_token_len 0
	%else
		%ifstr %2
			%define %%__sep_str %2
		%else
			%defstr %%__sep_str %2
		%endif
		%strlen %%__sep_len %%__sep_str

		%assign %$__nx_token_len 0
		%assign %%__arg_idx 1
		%rep %%__arg_len
			%substr %%__arg_chr %%__arg_str %%__arg_idx
			%assign %%__sep_idx 1
			%rep %%__sep_len
				%substr %%__sep_chr %%__sep_str %%__sep_idx
				%ifidn %%__arg_chr, %%__sep_chr
					%assign %$__nx_token_len %%__arg_idx-1
					%exitrep
				%else
					%assign %%__sep_idx 1+%%__sep_idx
				%endif
			%endrep
			%if %$__nx_token_len != 0
				%exitrep
			%else
				%assign %%__arg_idx 1+%%__arg_idx
			%endif
		%endrep
		%if %$__nx_token_len == 0
			%deftok %$__nx_token %%__arg_str
			%assign %$__nx_token_len %%__arg_len
			%define %$__nxtok_next ''
			%assign %$__nxtok_len 0
		%else
			%substr %%__tokstr %%__arg_str 1,%$__nx_token_len
			%deftok %$__nx_token %%__tokstr
			%if %$__nx_token_len < %%__arg_len
				%rep %%__arg_len - %$__nx_token_len
					%substr %%__arg_chr %%__arg_str %%__arg_idx
					%assign %%__nx_found 0
					%assign %%__sep_idx 1
					%rep %%__sep_len
						%substr %%__sep_chr %%__sep_str %%__sep_idx
						%ifidn %%__arg_chr, %%__sep_chr
							%assign %%__nx_found 1
							%exitrep
						%else
							%assign %%__sep_idx 1+%%__sep_idx
						%endif
					%endrep
					%if %%__nx_found == 0
						%exitrep
					%else
						%assign %%__arg_idx 1+%%__arg_idx
					%endif
				%endrep
				%if %%__arg_idx <= %%__arg_len
					%assign %$__nxtok_len %%__arg_len-%%__arg_idx+1
					%substr %$__nxtok_next %%__arg_str %%__arg_idx,%$__nxtok_len
				%else
					%define %$__nxtok_next ''
					%assign %$__nxtok_len 0
				%endif
			%else
				%define %$__nxtok_next ''
				%assign %$__nxtok_len 0
			%endif
		%endif
	%endif

%endmacro


;//////////////////////////////////////////////////////////////
;// MACRO nx_strchr
;//
;// Purpose
;//    This macro is designed to find position of char within string.
;//    It will update the current context stack variable %$__nx_strchr_pos
;//    with the index position of the chr or 0 if chr not found
;// Usage:
;//    nx_strchr string, chr
;//    nx_strchr [wc + hInstance], 'x'
;//
%macro nx_strchr 2
	%ifdef %$__nx_strchr_string
		%undef %$__nx_strchr_string
	%endif
	%ifstr %1
		%xdefine %$__nx_strchr_string %{1}
	%else
		%defstr %$__nx_strchr_string %{1}
	%endif
	%strlen %%__count %[%$__nx_strchr_string]
	%assign %%__idx 0
	%assign %%__found 0
	%rep %%__count
		%assign %%__idx %%__idx + 1
		%substr %%__chr %[%$__nx_strchr_string] %%__idx
		%ifidn %%__chr,%{2}
			%assign %%__found %%__idx
			%exitrep
		%endif
	%endrep
	%assign %$__nx_strchr_pos %%__found
%endmacro


;//////////////////////////////////////////////////////////////
;// MACRO nx_strstr
;//
;// Purpose
;//    This macro is designed to find position of substr within string.
;//    It will update the current context stack variable %$__nx_strstr_pos
;//    with the index position of the substr or 0 if not found
;// Usage:
;//    nx_strstr string, substr
;//    nx_strstr [rpb + hInstance], rbp
;//
%macro nx_strstr 2
	%ifdef %$__nx_strstr_string
		%undef %$__nx_strstr_string
	%endif
	%ifstr %1
		%xdefine %$__nx_strstr_string %{1}
	%else
		%defstr %$__nx_strstr_string %{1}
	%endif
	%ifstr %2
		%xdefine %$__nx_strstr_substring %{2}
	%else
		%defstr %$__nx_strstr_substring %{2}
	%endif
	%strlen %%__count %[%$__nx_strstr_string]
	%substr %%__subchr %[%$__nx_strstr_substring] 1
	%strlen %%__sublen %[%$__nx_strstr_substring]
	%assign %%__idx 0
	%assign %%__found 0
	%rep %%__count
		%assign %%__idx %%__idx + 1
		%if ((%%__count - %%__idx + 1) < %%__sublen)
			%exitrep
		%endif
		%substr %%__chr %[%$__nx_strstr_string] %%__idx
		%ifidni %%__chr,%%__subchr
			%substr %%__tmpstr %$__nx_strstr_string %%__idx, %%__sublen
			%ifidni %%__tmpstr, %$__nx_strstr_substring
				%assign %%__found %%__idx
				%exitrep
			%endif
		%endif
	%endrep
	%assign %$__nx_strstr_pos %%__found
	%undef %$__nx_strstr_string
	%undef %$__nx_strstr_substring
%endmacro


;// small helper macro used to parse __nxsig@@ defines
%macro nx_parse_tokens 1-100.nolist
	%ifdef __nx_token_0
		%undef __nx_token_0
	%endif
	%xdefine __nx_token_0 %0
	%assign %%__ctr 1
	%rep %0
		%ifdef __nx_token_%[%%__ctr]
			%undef __nx_token_%[%%__ctr]
		%endif
		%xdefine __nx_token_%[%%__ctr] %1
		%assign %%__ctr 1 + %%__ctr
		%rotate 1
	%endrep
%endmacro


;//////////////////////////////////////////////////////////////
;// MACRO IMPORT
;//
;// Purpose
;//    To define the signature and required syntax for
;//    an external function
;//
;// usage:
;//    IMPORT printf
;//    IMPORT GetSystemWindowsDirectoryA, 8
;//    IMPORT cdecl, myfunc, ptrdiff_t, dword, float_t
;//
%imacro IMPORT 1-100.nolist
	%push __NX_CTX_IMPORT__

	%assign %$__bytecount 0
	%ifndef __NASMX_DECLSPEC_CALLCONV_%[%1]__
		%assign %$__callconv __NASMX_DECLSPEC_CALLCONV_DEFAULT__
		%define %$__nx_proc %1
		%if %0 > 1
			%ifnum %2
				%ifidn __OUTPUT_FORMAT__,win32
					%assign %$__bytecount %2
				%endif
				%assign %$__repargs 0
			%else
				%assign %$__repargs %0-1
			%endif
		%else
			%assign %%__cc_enum nx_declspec_cc_enum(__NASMX_DECLSPEC_CALLCONV_DEFAULT__)
			%if %%__cc_enum == __NASMX_DECLSPEC_CC_ENUM_STDCALL__
				;// assert: no bytecount in import implies cdecl for win32
				%assign %$__callconv __NASMX_DECLSPEC_CALLCONV_CDECL__
;			%elif %%__cc_enum == __NASMX_DECLSPEC_CC_ENUM_FASTCALL__
;				;// assert: no bytecount in import implies cdecl for win32/win64 fastcall
;				%assign %$__callconv __NASMX_DECLSPEC_CALLCONV_CDECL__
			%endif
			%assign %$__repargs 0
		%endif
	%else
		%if %0 < 2
			%fatal usage: IMPORT [CALLCONV, ] FUNCNAME [,ARG1,ARG2,...]
		%endif
		%assign %$__callconv __NASMX_DECLSPEC_CALLCONV_%[%1]__
		%define %$__nx_proc %2
		%assign %$__repargs %0-2
	%endif

	%ifdef __nx_import_param_list
		%undef __nx_import_param_list
	%endif
	%assign %%__cc_enum nx_declspec_cc_enum(%[%$__callconv])
	%if %%__cc_enum != __NASMX_DECLSPEC_CC_ENUM_NAKED__
		;// assert: calc byte count for sig check
		%rep %$__repargs
			%rotate -1
			%ifnum %1
				%assign %$__bytecount %1
				%exitrep
			%else
				nx_strtok %1, ' '
				%assign %%__param_size sizeof(%$__nx_token)
				%if %%__param_size < sizeof(size_t)
					%assign %%__param_size sizeof(size_t)
				%endif
				%if %%__param_size > (sizeof(size_t) * 2)
					%error %1 exceeds allowable parameter size
				%endif
				%assign %$__bytecount %$__bytecount + %%__param_size
				%xdefine __nx_import_argtype %$__nx_token %+ _type
				%ifndef __nx_import_param_list
					%defstr __nx_import_param_list __nx_import_argtype
				%else
					%defstr __nx_import_argstr __nx_import_argtype
					%strcat __nx_import_param_list __nx_import_argstr,',',__nx_import_param_list
					%undef __nx_import_argstr
				%endif
				%undef __nx_import_argtype
			%endif
		%endrep
	%endif
	nx_callconv_decorate %$__callconv,%$__nx_proc,%$__bytecount
	%ifdef __nxsig@@%[%$__nxtok_decorated_name]
		%warning redefining import symbol %$__nx_proc as %[%$__nxtok_decorated_name]
	%endif

	%ifndef __nx_import_param_list
		%xdefine __nxsig@@%[%$__nxtok_decorated_name] %[%$__callconv],%[%$__bytecount]
	%else
		%deftok __nx_import_params __nx_import_param_list
		%xdefine __nxsig@@%[%$__nxtok_decorated_name] %[%$__callconv],%[%$__bytecount],__nx_import_params
		%undef __nx_import_params
		%undef __nx_import_param_list
	%endif
	%ifnidn %$__nx_proc,%$__nxtok_decorated_name
		%xdefine %[%$__nx_proc] %[%$__nxtok_decorated_name]
	%endif

	%pop
%endmacro


;//////////////////////////////////////////////////////////////
;// MACRO PROTO
;//
;// usage:
;//    PROTO [CALLCONV,] FUNCNAME [,ARGS...]
;//
;// examples:
;// Using default calling convention:
;//    PROTO WndProc, ptrdiff_t, dword, size_t, size_t
;// Specifying a calling convention
;//    PROTO cdecl, myfunc, ptrdiff_t, dword, float_t
;//
;// notes:
;//    This macro must be used when defining procedures
;//    that will be callable from other modules via
;//    the import macro as the function name is made
;//    global here.
;//
%imacro PROTO 1-100.nolist
	%push __NX_CTX_PROTO__
	%ifndef __NASMX_DECLSPEC_CALLCONV_%[%1]__
		%assign %$__callconv __NASMX_DECLSPEC_CALLCONV_DEFAULT__
		%define %$__proc %1
		%assign %$__repcnt %0-1
	%else
		%if %0 < 2
			%fatal usage: PROTO [CALLCONV, ] FUNCNAME [,ARG1,ARG2,...]
		%endif
		%assign %$__callconv __NASMX_DECLSPEC_CALLCONV_%[%1]__
		%define %$__proc %2
		%assign %$__repcnt %0-2
	%endif
	%ifdef __nx_proto_param_list
		%undef __nx_proto_param_list
	%endif
	%assign %$__bytecount 0
	%assign %%__cc_enum nx_declspec_cc_enum(%$__callconv)
	%if %%__cc_enum != __NASMX_DECLSPEC_CC_ENUM_NAKED__
		;// assert: calc byte count for sig check during invoke 
		%rep %$__repcnt
			%rotate -1
			%ifnum %1
				%assign %$__bytecount %1
				%exitrep
			%else
				nx_strtok %1, ' '
				%assign %%__param_size %[%$__nx_token]_size
				%if %%__param_size < sizeof(size_t)
					%assign %%__param_size sizeof(size_t)
				%endif
				%if %%__param_size > (sizeof(size_t) * 2)
					%error %1 exceeds allowable parameter size
				%endif
				%assign %$__bytecount %$__bytecount + %%__param_size
				%xdefine __nx_proto_argtype %$__nx_token %+ _type
				%ifndef __nx_proto_param_list
					%defstr __nx_proto_param_list __nx_proto_argtype
				%else
					%defstr __nx_proto_argstr __nx_proto_argtype
					%strcat __nx_proto_param_list __nx_proto_argstr,',',__nx_proto_param_list
					%undef __nx_proto_argstr
				%endif
				%undef __nx_proto_argtype
			%endif
		%endrep
	%endif

	%ifndef %[%$__proc]
		%ifdef __nxsig@@%[%$__proc]
			%fatal global symbol %[%$__proc] already defined
		%endif
		nx_callconv_decorate %$__callconv,%$__proc,%$__bytecount
		%ifndef __nx_proto_param_list
			%xdefine __nxsig@@%[%$__nxtok_decorated_name] %[%$__callconv],%[%$__bytecount]
		%else
			%deftok __nx_proto_params __nx_proto_param_list
			%xdefine __nxsig@@%[%$__nxtok_decorated_name] %[%$__callconv],%[%$__bytecount],__nx_proto_params
			%undef __nx_proto_params
			%undef __nx_proto_param_list
		%endif
		%ifnidn %$__proc,%$__nxtok_decorated_name
			%xdefine %[%$__proc] %[%$__nxtok_decorated_name]
		%endif
	%endif

	%ifndef __nxsig_declared_%[%$__proc]
		global %[%$__proc]
		%xdefine __nxsig_declared_%[%$__proc] global
	%endif

	%pop
%endmacro


;//////////////////////////////////////////////////////////////
;// MACRO ENTRY
;//
;// usage:
;//    ENTRY progname
;//
;// examples:
;//    ENTRY Demo1
;//
;// notes:
;//    program entry is assumed to be cdecl unless system default
;//    callconv specification is pascal.
;//    When building on Win64 or using pascal callconv you must
;//    change the makefile by removing the leading underscore
;//    from the linker /entry line
%imacro ENTRY 1.nolist
	%assign %%__cc_enum nx_declspec_cc_enum(__NASMX_DECLSPEC_CALLCONV_DEFAULT__)
	%if __NASMX_DECLSPEC_SYSTYPE_DEFAULT__ == __NASMX_DECLSPEC_SYSTYPE_WINDOWS__
		;// main(argc, argv)
		%assign %%__bytecount __NASMX_ABI_BITS__ / 4
	%else
		;// main(argc, argv, envp)
		%assign %%__bytecount (( __NASMX_ABI_BITS__ / 8 ) * 3)
	%endif
	
	%if %%__cc_enum > __NASMX_DECLSPEC_CC_ENUM_PASCAL__
		%assign %%__cc_prefix nx_declspec_cc_prefix(__NASMX_DECLSPEC_CALLCONV_DEFAULT__)
		%if %%__cc_prefix > 0
			%xdefine %[%1] _main
			%xdefine __nxsig@@_main  __NASMX_DECLSPEC_CALLCONV_CDECL__, %%__bytecount
		%else
			%xdefine %[%1] main
			%xdefine __nxsig@@main  __NASMX_DECLSPEC_CALLCONV_DEFAULT__, %%__bytecount
		%endif
	%else
		%xdefine %[%1] main
		%xdefine __nxsig@@main  __NASMX_DECLSPEC_CALLCONV_DEFAULT__, %%__bytecount
	%endif
	%xdefine __nxsig_declared_%[%1] global
	global %[%1]
%endmacro

;////////////////////////////////////////////////////////////////////////
;//
;// Internal macro used by invoke to detect argv addressing mode
;// The context variable %$__nx_argv_mode_indirect will be set to
;// the string index where '[' is found and is also used as a flag
;// indicating retrieve the variable contents, not it's address.
;// The context variable %$__nx_argv_mode_bp will be set to the
;// the string index where the sign ( + or - ) is found and will
;// be used as a flag indicating that argv mode is used.
;// The context variables %$__nx_argv_mode_param_type, %$__nx_argv_mode_param_isfloat,
;// %$__nx_argv_mode_param_size, and %$__nx_argv_mode_param_castsize are set according
;// to the parameter list index supplied as the second argument to this macro.
%xdefine __NX_ARGV_MODE_SIGN_ADD__ 1
%xdefine __NX_ARGV_MODE_SIGN_SUB__ 2
%macro nx_analyze_argv_mode 2
	%ifnum %2
		%ifdef __nx_token_%[%2]
			%assign %$__nx_argv_mode_param_type __nx_token_%[%2]
			%assign %$__nx_argv_mode_param_isfloat ((%$__nx_argv_mode_param_type >> 15) & 0x01)
			%assign %$__nx_argv_mode_param_size %$__nx_argv_mode_param_type & 0x7F
		%else
			%assign %$__nx_argv_mode_param_type sizeof(size_t)
			%assign %$__nx_argv_mode_param_isfloat 0
			%assign %$__nx_argv_mode_param_size sizeof(size_t)
		%endif
	%else
		%fatal internal error - unknown parameter
	%endif

	%assign %$__nx_argv_mode_bp 0
	%assign %$__nx_argv_mode_sign 0
	%assign %$__nx_argv_mode_castsize sizeof(size_t)
	%assign %$__nx_argv_mode_fp_isnum 0
	%assign %$__nx_argv_mode_fp_num 0
	nx_strchr %{1}, '['
	%assign %$__nx_argv_mode_indirect %$__nx_strchr_pos
	%if %$__nx_argv_mode_indirect == 0
		nx_strstr %{1}, __BP
		%if %$__nx_strstr_pos > 0
			;// assert: potentially loading variable address offset from reg bp
			;// quick check to help ensure that bp is a token
			%assign %$__nx_isalnum_bool 0
			%defstr %%__str %[%1]
			%if %$__nx_strstr_pos > 1
				%substr %%__sub %%__str %$__nx_strstr_pos-1, 1
				nx_isalnum %%__sub
			%endif
			%if %$__nx_isalnum_bool == 0
				%strlen %%__len %%__str
				%if %%__len > %$__nx_strchr_pos + 2
					%substr %%__sub %%__str %$__nx_strstr_pos+3, 1
					nx_isalnum %%__sub
				%endif
			%endif
			%if %$__nx_isalnum_bool == 0
				;// we must be given a positive or negative offset in order to 
				;// generate code for local variable addressing
				nx_strchr %{1}, '+'
				%if %$__nx_strchr_pos == 0
					nx_strchr %{1}, '-'
					%if %$__nx_strchr_pos > 0
						%assign %$__nx_argv_mode_sign __NX_ARGV_MODE_SIGN_SUB__
					%endif
				%else
					%assign %$__nx_argv_mode_sign __NX_ARGV_MODE_SIGN_ADD__
				%endif
				%assign %$__nx_argv_mode_bp %$__nx_strchr_pos
			%endif
			%substr %%__off %%__str %$__nx_argv_mode_bp+1, -1
			%deftok %$__nx_argv_mode_bp_offset %%__off
		%elif %$__nx_argv_mode_param_isfloat > 0
			;// assert: check for float type and process
			nx_isfloattok %1
			%if %$__nx_isfloattok_bool != 0
				%assign %$__nx_argv_mode_fp_isnum 1
				%if %$__nx_argv_mode_param_size == 4
					%assign %$__nx_argv_mode_fp_num __float32__(%1)
				%else
					%assign %$__nx_argv_mode_fp_num __float64__(%1)
				%endif
			%else
				nx_strtok %1, ' '
				%ifndef __nx_reg_%[%$__nx_token]
					%iftoken %1
						%fatal expected floating point at arg %1
					%endif
					;// must check for casts which indicate
					;// __float() or __double() may have been used
					%ifdef %[%$__nx_token]_size
						%assign %%__size %[%$__nx_token]_size
						nx_strtok 0, ';'
					%else
						%assign %%__size %$__nx_argv_mode_param_size
						nx_strtok %1, ';'
					%endif
					%if %%__size > %$__nx_argv_mode_param_size
						%warning potential loss of precision from double to float for arg %1
					%endif
					%assign %$__nx_argv_mode_fp_isnum 1
					%assign %$__nx_argv_mode_fp_num %$__nx_token
				%endif
			%endif
		%endif
	%elif %$__nx_argv_mode_indirect > 3
		;// check for cast ( eg: dword[rbp+4] )
		%defstr %%__str %[%1]
		%substr %%__sub %%__str 1, %$__nx_argv_mode_indirect-1
		%deftok %%__tok %%__sub
		%ifdef %[%%__tok]_size
			%assign %$__nx_argv_mode_castsize %[%%__tok]_size
		%endif
	%endif
%endmacro

;//////////////////////////////////////////////////////////////
;// MACRO INVOKE
;//
;// usage:
;//    INVOKE func [, arg1] [,arg2]
;//
;// examples:
;//    invoke malloc, 64
;//
;// notes:
;//    when using bp offsets you should use qualifiers to ensure
;//    they are passed properly, ie: invoke malloc, dword [argv(.x)]
;//
%imacro INVOKE 1-100.nolist
	%ifndef NASMX_ENDPROC
		;// assert: we cannot check for context in case we are in a switch
		;// so we use nasmx_endproc
		%fatal 'invoke must be contained within proc/endproc directives.'
	%endif
	%ifndef __NX_LOCALS_PRESENT__
		;// require locals directive to ensure stack
		;// frame initialized properly prior to invoke.
		%fatal 'missing locals directive'
	%endif

	%push _NX_CTX_INVOKE
	%assign %$args 0
	%assign %$__nx_intargs 0           ;// init int args counter
	%assign %$__nx_floatargs 0         ;// init float args counter

	;// Fix for v1.0rc2: an imported definition may be zero (0)
	;// for CDECL varargs or not properly defined, thus we must
	;// calculate a valid bytecount based upon given parameters
	;// in order to get a proper stack frame built if callstack
	;// not defined.
	%ifdef __nxsig@@%[%1]
		nx_parse_tokens __nxsig@@%[%1]
		%assign %$__nx_callconv __nx_token_1
		%assign %$__nx_protobytecount __nx_token_2
		%ifndef __nxsig_declared_%[%1]
			%ifndef __nxsig_defined_%[%1]
				EXTERN	%[%1]
				%xdefine __nxsig_declared_%[%1] extern
			%endif
		%endif
	%else
		%assign %$__nx_callconv __NASMX_DECLSPEC_CALLCONV_DEFAULT__
		%assign %$__nx_protobytecount 0
	%endif

	%assign %%__repcnt %0 - 1
	%assign %$__nx_bytecount (( __NASMX_ABI_BITS__ / 8 ) * %%__repcnt)
	%if %$__nx_bytecount < %$__nx_protobytecount
		;// assert: possibly due to double param in
		;// 32bit mode or int128 in 64bit mode
		%assign %$__nx_bytecount %$__nx_protobytecount
	%endif

	%assign %%__nx_argrotate nx_declspec_cc_argrotate(%$__nx_callconv)
	%if %%__nx_argrotate > 0
		%assign %$__nx_argrotate 1
	%else
		%assign %$__nx_argrotate -1
	%endif
	%assign %$__nx_retpopsargs nx_declspec_cc_retpopsargs(%$__nx_callconv)
	%assign %%__cc_enum nx_declspec_cc_enum(%$__nx_callconv)
	%xdefine %$__nx_proc %1
	%if %%__cc_enum == __NASMX_DECLSPEC_CC_ENUM_FASTCALL__
		;// for fastcall, whenever CALLSTACK optimization is enabled,
		;// we use the stack built previously during locals/endlocals directive.
		%assign %$__nx_callstack_adjust 0
		%assign %$__nx_invoke_callstack_adjust %$__nx_bytecount
		%ifdef __NX_PROLOGUE_CALLSTACK_ADJUST__
			;// Verify that the CALLSTACK is sufficient for the
			;// number of parameter arguments we have been given.
			%assign %$__nx_callstack_adjust __NX_PROLOGUE_CALLSTACK_ADJUST__
			%if __NASMX_ABI_BITS__ < 64
				%if %$__nx_callstack_adjust < %$__nx_bytecount
					%assign %$__nx_callstack_adjust 0
					%warning insufficient callstack size for procedure %[%$__nx_proc], generating inefficient code...
				%endif
			%else
				%if __NASMX_DECLSPEC_SYSTYPE_DEFAULT__ == __NASMX_DECLSPEC_SYSTYPE_WINDOWS__
					%if %$__nx_callstack_adjust < %$__nx_bytecount
						;// Windows: always requires a stack adjustment
						%assign %$__nx_callstack_adjust 0
						%warning insufficient callstack size for procedure %[%$__nx_proc], generating inefficient code...
					%else
						;// A callstack defined for Win64 must be at least 32 bytes
						%if %$__nx_callstack_adjust < 32
							%assign %$__nx_callstack_adjust 0
							%warning insufficient callstack size for procedure %[%$__nx_proc], generating inefficient code...
						%else
							%assign %$__nx_invoke_callstack_adjust 0
						%endif
					%endif
				%else
					;// Linux: required when register allocation exhausted
					%if %%__repcnt > 6
						%assign %$__nx_invoke_callstack_adjust (( %%__repcnt - 6 ) * ( __NASMX_ABI_BITS__ / 8 ))
						%if %$__nx_invoke_callstack_adjust > %$__nx_callstack_adjust
							%assign %$__nx_callstack_adjust 0
							%warning insufficient callstack size for procedure %[%$__nx_proc], generating inefficient code...
						%else
							%assign %$__nx_invoke_callstack_adjust 0
						%endif
					%else
						%assign %$__nx_invoke_callstack_adjust 0
					%endif
				%endif
			%endif
		%else
			%if __NASMX_DECLSPEC_SYSTYPE_DEFAULT__ != __NASMX_DECLSPEC_SYSTYPE_WINDOWS__
				%if __NASMX_ABI_BITS__ > 32
					;// Make space for x64 args that could possibly get placed onto the stack
					%if %%__repcnt > 6
						;// TODO: Make more efficient by examining param types ( non-trivial ).
						%assign %$__nx_invoke_callstack_adjust (( %%__repcnt - 6 ) * ( __NASMX_ABI_BITS__ / 8 ))
					%else
						%assign %$__nx_invoke_callstack_adjust 0
					%endif
				%endif
			%endif
		%endif

		%assign %$__align 0
		%if %$__nx_invoke_callstack_adjust > 0
			;// assert: callstack not defined or insufficient, build it here
			%if __NASMX_ABI_BITS__ > 32
				%if __NASMX_DECLSPEC_SYSTYPE_DEFAULT__ == __NASMX_DECLSPEC_SYSTYPE_WINDOWS__
					;// Windows requires at least 32 bytes of shadow storage
					%if %$__nx_invoke_callstack_adjust < 32
						%assign %$__nx_invoke_callstack_adjust 32
					%endif
				%endif
			%endif
			;// first determine if an alignment adjustment is needed
			%assign %$__align __NASMX_ABI_BITS__ / 4
			%assign %%__off (((%$__nx_invoke_callstack_adjust + %$__align) / %$__align) * %$__align)
			%assign %%__tmp (%$__nx_invoke_callstack_adjust + %$__align)
			%if (%%__off != %%__tmp)
				;// for fastcalls that retpopsargs we need to account
				;// for the extra space when stack restored later on
				%assign %$__align __NASMX_ABI_BITS__ / 8
				%assign %$__nx_invoke_callstack_adjust %%__off
			%else
				%assign %$__align 0
			%endif
			sub __SP, %$__nx_invoke_callstack_adjust
		%endif

		;// the following variable is used as a flag to catch a very bad logic state
		;// in 64 bit code when using RAX as a paramater since RAX is used to spill
		;// parameters to the stack, potentially causing a very tough bug to find!
		%assign %%__reg_ax_used 0

		%assign %$__param_type_ctr 2    ; arg types follow cconv,bytecount
		%assign %$args 0
		%rep %%__repcnt
			%rotate 1

			;// set up internal vars used to determine if argv address mode used
			%assign %$__param_type_ctr %$__param_type_ctr + 1
			nx_analyze_argv_mode %1, %$__param_type_ctr

			%assign %%__argtostack 1  ;// assume we need to store on stack
			%if %$__nx_argv_mode_param_isfloat == 0
				%if %$__nx_intargs < __NASMX_DECLSPEC_FASTCALL_MAXINTREGS__
					%assign %%__argtostack 0
					%substr %%__regstr __NASMX_DECLSPEC_FASTCALL_REGINTARGS_%[%$__nx_argv_mode_castsize]__ (%$__nx_intargs * 3 + 1), 3
					%deftok %$arg_cur %%__regstr
					%undef %%__regstr
					%ifnum %1
						%if %1 == -1
							or %$arg_cur, %1
						%elif %1 == 0
							xor %$arg_cur, %$arg_cur
						%else
							mov %$arg_cur, %1
						%endif
					%elifstr %1
						jmp %%endstr_%$args
						%%str_%$args: declare(NASMX_TCHAR) NASMX_TEXT(%1), 0
						%%endstr_%$args:
						lea %$arg_cur,[rel %%str_%$args]
					%else
						%if %$__nx_argv_mode_indirect > 0
							mov  %$arg_cur, %1
						%elif %$__nx_argv_mode_bp > 0
							mov  %$arg_cur, __BP
							%if %$__nx_argv_mode_sign == __NX_ARGV_MODE_SIGN_ADD__
								add %$arg_cur, %$__nx_argv_mode_bp_offset
							%elif %$__nx_argv_mode_sign == __NX_ARGV_MODE_SIGN_SUB__
								sub %$arg_cur, %$__nx_argv_mode_bp_offset
							%else
								%fatal Unknown addressing mode for %{1}
							%endif
						%elifnidni %$arg_cur, %1
							;// if register parameter then guard against
							;// invalid register to register moves
							%ifdef __nx_reg_%[%1]
								%if %[%1]_size != __NASMX_ABI_BITS__ / 8
									%fatal %1 cannot be used as parameter for __NASMX_ABI_BITS__ bit mode
								%endif
							%endif
							mov  %$arg_cur, %1
						%endif
					%endif
					%if __NASMX_DECLSPEC_SYSTYPE_DEFAULT__ == __NASMX_DECLSPEC_SYSTYPE_WINDOWS__
						;// Windows fastcall uses one index for param count which
						;// indexes either int or float for purpose of preloading regs
						%assign %$__nx_floatargs 1 + %$__nx_floatargs
						;// TODO: optimize register spill for when required only
						mov [__SP + %$args], %$arg_cur
						;// Unlike Linux/BSD x64 all current 32-bit and 64-bit versions
						;// of Windows increase arg stack offset.
						%assign %$args %$args + sizeof(size_t)
					%else
						;// increase arg stack offset only for 32-bit non-Windows systems.
						%if __NASMX_ABI_BITS__ < 64
							%assign %$args %$args + sizeof(size_t)
						%endif
					%endif
					%assign %$__nx_intargs 1 + %$__nx_intargs
					%undef %$arg_cur
				%endif
			%elif %$__nx_floatargs < __NASMX_DECLSPEC_FASTCALL_MAXFLOATREGS__
				%assign %%__argtostack 0
				%if __NASMX_ABI_BITS__ > 32
					;// assert: use 64-bit registers
					%if __NASMX_DECLSPEC_SYSTYPE_DEFAULT__ == __NASMX_DECLSPEC_SYSTYPE_WINDOWS__
						%if   %$args == 0
							%xdefine %$arg_cur xmm0
						%elif %$args == 8
							%xdefine %$arg_cur xmm1
						%elif %$args == 16
							%xdefine %$arg_cur xmm2
						%elif %$args == 24
							%xdefine %$arg_cur xmm3
						%endif
					%else
						%if   %$__nx_floatargs == 0
							%xdefine %$arg_cur xmm0
						%elif %$__nx_floatargs == 1
							%xdefine %$arg_cur xmm1
						%elif %$__nx_floatargs == 2
							%xdefine %$arg_cur xmm2
						%elif %$__nx_floatargs == 3
							%xdefine %$arg_cur xmm3
						%elif  %$__nx_floatargs == 4
							%xdefine %$arg_cur xmm4
						%elif %$__nx_floatargs == 5
							%xdefine %$arg_cur xmm5
						%elif %$__nx_floatargs == 6
							%xdefine %$arg_cur xmm6
						%elif %$__nx_floatargs == 7
							%xdefine %$arg_cur xmm7
						%endif
					%endif

					%if %$__nx_argv_mode_indirect > 0
						nx_strtok %1, ' '
						%ifdef %[%$__nx_token]_size
							nx_strtok 0, ';'
							movsd %$arg_cur, %$__nx_token
						%else
							movsd %$arg_cur, %1
						%endif
						movsd [__SP + %$args], %$arg_cur
					%elif %$__nx_argv_mode_bp > 0
						nx_strtok %1, ' '
						%ifdef __nx_reg_%[%$__nx_token]
							movsd %$arg_cur, [%1]
						%elifdef %[%$__nx_token]_size
							nx_strtok 0, ';'
							movsd %$arg_cur, [ %[%$__nx_token] ]
						%else
							movsd %$arg_cur, [%1]
						%endif
						movsd [__SP + %$args], %$arg_cur
					%else
						%if %$__nx_argv_mode_fp_isnum != 0
							mov rax, %$__nx_argv_mode_fp_num
							mov qword [__SP + %$args], rax
							%assign %%__reg_ax_used 1
						%else
							mov qword [__SP + %$args], %1
						%endif
						movsd %$arg_cur, [__SP + %$args]
					%endif
				%else
					;// 32-bit fastcall float param
					%if %$__nx_argv_mode_param_size > 4
						;// assert: callee expecting double type which
						;// is always maintained on the stack
						%if %$__nx_argv_mode_fp_isnum != 0
							%assign %%__tmp (%$__nx_argv_mode_fp_num & 0x00000000FFFFFFFF)
							mov dword [__SP + %$args], %%__tmp
							%assign %%__tmp ((%$__nx_argv_mode_fp_num >> 32) & 0x00000000FFFFFFFF)
							mov dword [__SP+%$args+4], %%__tmp
						%else
							fld %1
							fstp qword [esp]
						%endif
						%assign %$args %$args + 8
					%else
						%if   %$args == 0
							%xdefine %$arg_cur ecx
						%elif %$args == 4
							%xdefine %$arg_cur edx
						%else
							%xdefine %$arg_cur __AX
							%assign %%__reg_ax_used 1
						%endif
						%if %$__nx_argv_mode_fp_isnum != 0
							mov %$arg_cur, %$__nx_argv_mode_fp_num
						%else
							mov %$arg_cur, %1
						%endif
						mov [__SP + %$args], %$arg_cur
						%assign %$args %$args + 4
					%endif
				%endif
				%if __NASMX_DECLSPEC_SYSTYPE_DEFAULT__ == __NASMX_DECLSPEC_SYSTYPE_WINDOWS__
					;// Windows fastcall uses one index for either
					;// int or float params for purpose of preloading regs
					%assign %$__nx_intargs 1 + %$__nx_intargs
				%endif
				%assign %$__nx_floatargs 1 + %$__nx_floatargs
				%undef %$arg_cur
			%endif
			%if %%__argtostack != 0
				;// assert: no available registers
				%if %$__nx_argv_mode_param_isfloat == 0
					%ifnum %1
						%if __NASMX_ABI_BITS__ > 32
							%assign %%__reg_ax_used 1
							mov __AX, %{1}
							mov size_t [__SP + %$args], __AX
						%else
							mov size_t [__SP + %$args], %{1}
						%endif
					%elifstr %1
						jmp %%endstr_%$args
						%%str_%$args: declare(NASMX_TCHAR) NASMX_TEXT(%1), 0
						%%endstr_%$args:
						lea __AX,[rel %%str_%$args]
						mov [__SP + %$args], __AX
						%assign %%__reg_ax_used 1
					%else
						%if %$__nx_argv_mode_indirect > 0
							%if %$__nx_argv_mode_castsize < 4
								%xdefine %$arg_cur AX
							%elif %$__nx_argv_mode_castsize < 8
								%xdefine %$arg_cur EAX
							%else
								%xdefine %$arg_cur RAX
							%endif
							%assign %%__reg_ax_used 1
							mov %$arg_cur, %{1}
							mov [__SP + %$args], __AX
							%undef %$arg_cur
						%elif %$__nx_argv_mode_bp > 0
							%assign %%__reg_ax_used 1
							mov  __AX, __BP
							%if %$__nx_argv_mode_sign == __NX_ARGV_MODE_SIGN_ADD__
								add __AX, %$__nx_argv_mode_bp_offset
							%elif %$__nx_argv_mode_sign == __NX_ARGV_MODE_SIGN_SUB__
								sub __AX, %$__nx_argv_mode_bp_offset
							%else
								%fatal Unknown addressing mode for %{1}
							%endif
							mov [__SP + %$args], __AX
						%else
							%ifidni %1, __AX
								%if %%__reg_ax_used > 0
									%warning use of _AX as arg resulted in inconsistent logic state
								%endif
							%endif
							mov size_t [__SP + %$args], %{1}
						%endif
					%endif
				%else
					;// assert: processing float param
					%if %$__nx_argv_mode_indirect > 0
						%if %$__nx_argv_mode_castsize > %$__nx_argv_mode_param_size
							%warning potential loss of precision during conversion of double to float for %[%1]
						%endif
						fld __nx_error_token_size_%[%$__nx_argv_mode_castsize] %1
						fstp __nx_error_token_size_%[%$__nx_argv_mode_param_size] [__SP + %$args]
					%elif %$__nx_argv_mode_bp > 0
						fld __nx_error_token_size_%[%$__nx_argv_mode_param_size] [%1]
						fstp __nx_error_token_size_%[%$__nx_argv_mode_param_size] [__SP + %$args]
					%else
						%if %$__nx_argv_mode_fp_isnum != 0
							;// assert: arg is floating point constant
							%if %$__nx_argv_mode_param_size == 4
								;// assert: callee expecting float type
								mov dword [__SP + %$args], %$__nx_argv_mode_fp_num
							%else
								;// assert: callee expecting double type
								%assign %%__tmp (%$__nx_argv_mode_fp_num & 0x00000000FFFFFFFF)
								mov dword [__SP + %$args], %%__tmp
								%assign %%__tmp ((%$__nx_argv_mode_fp_num >> 32) & 0x00000000FFFFFFFF)
								mov dword [__SP+%$args+4], %%__tmp
							%endif
						%else
							mov __nx_error_token_size_%[%$__nx_argv_mode_param_size] [__SP + %$args], %1
						%endif
					%endif
				%endif
				%if %$__nx_argv_mode_param_size < sizeof(size_t)
					%assign %$args %$args + sizeof(size_t)
				%else
					%assign %$args %$args + %$__nx_argv_mode_param_size
				%endif
			%endif
		%endrep
		;// stack is set up, call the proc
		call	%$__nx_proc
		%if %$__nx_bytecount > 0
			%if %$__nx_callstack_adjust == 0
				%if %$__nx_retpopsargs == 0
					%if %$__nx_invoke_callstack_adjust > 0
						add	__SP, %$__nx_invoke_callstack_adjust
					%endif
				%elif %$__align > 0
					add	__SP, %$__align
				%endif
			%endif
		%endif
	%else
		;// arg types follow cconv,bytecount when defined
		%if %$__nx_argrotate > 0
			%assign %$__param_type_ctr 2    
		%else
			%assign %$__param_type_ctr %0+2
		%endif

		;// the following variable is used as a flag to catch a very bad logic state
		;// when using __AX as a paramater since __AX is used internally to spill certain
		;// parameters to the stack, potentially causing a very tough bug to find!
		%assign %%__reg_ax_used 0

		%rep %%__repcnt
			%rotate %$__nx_argrotate

			;// set up internal vars used to determine if argv address mode used
			%assign %$__param_type_ctr %$__param_type_ctr + %$__nx_argrotate
			nx_analyze_argv_mode %{1}, %$__param_type_ctr

			%if %$__nx_argv_mode_param_isfloat == 0
				%ifstr	%1
					jmp	%%endstr_%$args
					%%str_%$args: declare(NASMX_TCHAR) NASMX_TEXT(%{1}), 0
					%%endstr_%$args:
					push size_t %%str_%$args
				%elifnum %1
					push size_t %1
				%elif %$__nx_argv_mode_indirect > 0
					push size_t %1
				%elif %$__nx_argv_mode_bp > 0
					%assign %%__reg_ax_used 1
					mov  __AX, __BP
					%if %$__nx_argv_mode_sign == __NX_ARGV_MODE_SIGN_ADD__
						add __AX, %$__nx_argv_mode_bp_offset
					%elif %$__nx_argv_mode_sign == __NX_ARGV_MODE_SIGN_SUB__
						sub __AX, %$__nx_argv_mode_bp_offset
					%else
						%fatal Unknown addressing mode for %{1}
					%endif
					push __AX
				%else
					%ifidni %1, __AX
						%if %%__reg_ax_used > 0
							%warning use of _AX as arg resulted in inconsistent logic state
						%endif
					%endif
					push size_t %1
				%endif
				%assign %$args %$args + __BITS__ / 8
			%else
				;// process float param
				%if %$__nx_argv_mode_param_size < sizeof(size_t)
					;// if passing a float in 64-bit mode
					sub __SP, sizeof(size_t)
					%assign %$args %$args + sizeof(size_t)
				%else
					;// may be passing double in 32-bit mode
					sub  __SP, %$__nx_argv_mode_param_size
					%assign %$args %$args + %$__nx_argv_mode_param_size
				%endif
				%if %$__nx_argv_mode_indirect > 0
					%if %$__nx_argv_mode_castsize > %$__nx_argv_mode_param_size
						%warn
Download .txt
gitextract_hzk6_p1w/

├── README.md
├── bin/
│   ├── build.bat
│   ├── build_run.bat
│   ├── check_all.bat
│   ├── compile_speed.bat
│   ├── example/
│   │   ├── 1.h
│   │   ├── 10_1.h
│   │   ├── 10_2.h
│   │   ├── 10_3.h
│   │   ├── 11_1.h
│   │   ├── 11_2.h
│   │   ├── 11_3.h
│   │   ├── 11_4.h
│   │   ├── 11_5.h
│   │   ├── 11_6.h
│   │   ├── 11_7.h
│   │   ├── 12.h
│   │   ├── 13.h
│   │   ├── 14_1.h
│   │   ├── 14_2.h
│   │   ├── 16_1.h
│   │   ├── 16_2.h
│   │   ├── 16_3.h
│   │   ├── 16_4.h
│   │   ├── 17_1.h
│   │   ├── 17_2.h
│   │   ├── 18_1.h
│   │   ├── 18_2.h
│   │   ├── 19_1.h
│   │   ├── 19_2.h
│   │   ├── 2.h
│   │   ├── 20.h
│   │   ├── 21_1.h
│   │   ├── 21_2.h
│   │   ├── 22_1.h
│   │   ├── 22_2.h
│   │   ├── 23_1.h
│   │   ├── 23_2.h
│   │   ├── 23_3.h
│   │   ├── 24.h
│   │   ├── 25_1.h
│   │   ├── 25_2.h
│   │   ├── 25_3.h
│   │   ├── 26_1.h
│   │   ├── 26_2.h
│   │   ├── 27.h
│   │   ├── 28.h
│   │   ├── 29.h
│   │   ├── 3.h
│   │   ├── 30_1.h
│   │   ├── 30_2.h
│   │   ├── 31.h
│   │   ├── 32_1.h
│   │   ├── 32_2.h
│   │   ├── 32_3.h
│   │   ├── 33_1.h
│   │   ├── 33_2.h
│   │   ├── 34_1.h
│   │   ├── 34_2.h
│   │   ├── 35.h
│   │   ├── 36_1.h
│   │   ├── 36_10.h
│   │   ├── 36_2.h
│   │   ├── 36_3.h
│   │   ├── 36_4.h
│   │   ├── 36_5.h
│   │   ├── 36_6.h
│   │   ├── 36_7.h
│   │   ├── 36_8.h
│   │   ├── 36_9.h
│   │   ├── 40_1.h
│   │   ├── 40_2.h
│   │   ├── 40_3.h
│   │   ├── 40_4.h
│   │   ├── 40_5.h
│   │   ├── 42.h
│   │   ├── 44.h
│   │   ├── 4_1.h
│   │   ├── 4_2.h
│   │   ├── 50.h
│   │   ├── 51.h
│   │   ├── 52.h
│   │   ├── 53.h
│   │   ├── 54.h
│   │   ├── 55.h
│   │   ├── 56.h
│   │   ├── 57.h
│   │   ├── 5_1.h
│   │   ├── 5_2.h
│   │   ├── 6.h
│   │   ├── 7.h
│   │   ├── 8.h
│   │   ├── 9.h
│   │   ├── answer/
│   │   │   ├── 1.txt
│   │   │   ├── 10_1.txt
│   │   │   ├── 10_2.txt
│   │   │   ├── 10_3.txt
│   │   │   ├── 11_1.txt
│   │   │   ├── 11_2.txt
│   │   │   ├── 11_3.txt
│   │   │   ├── 11_4.txt
│   │   │   ├── 11_5.txt
│   │   │   ├── 11_6.txt
│   │   │   ├── 11_7.txt
│   │   │   ├── 12.txt
│   │   │   ├── 13.txt
│   │   │   ├── 14_1.txt
│   │   │   ├── 17_1.txt
│   │   │   ├── 17_2.txt
│   │   │   ├── 18_1.txt
│   │   │   ├── 18_2.txt
│   │   │   ├── 19_1.txt
│   │   │   ├── 19_2.txt
│   │   │   ├── 2.txt
│   │   │   ├── 20.txt
│   │   │   ├── 21_1.txt
│   │   │   ├── 21_2.txt
│   │   │   ├── 22_1.txt
│   │   │   ├── 23_1.txt
│   │   │   ├── 23_2.txt
│   │   │   ├── 23_3.txt
│   │   │   ├── 24.txt
│   │   │   ├── 25_1.txt
│   │   │   ├── 25_2.txt
│   │   │   ├── 25_3.txt
│   │   │   ├── 26_1.txt
│   │   │   ├── 26_2.txt
│   │   │   ├── 27.txt
│   │   │   ├── 28.txt
│   │   │   ├── 29.txt
│   │   │   ├── 3.txt
│   │   │   ├── 30_1.txt
│   │   │   ├── 30_2.txt
│   │   │   ├── 31.txt
│   │   │   ├── 32_1.txt
│   │   │   ├── 32_2.txt
│   │   │   ├── 32_3.txt
│   │   │   ├── 33_1.txt
│   │   │   ├── 33_2.txt
│   │   │   ├── 34_1.txt
│   │   │   ├── 34_2.txt
│   │   │   ├── 35.txt
│   │   │   ├── 36_1.txt
│   │   │   ├── 36_10.txt
│   │   │   ├── 36_2.txt
│   │   │   ├── 36_3.txt
│   │   │   ├── 36_4.txt
│   │   │   ├── 36_5.txt
│   │   │   ├── 36_6.txt
│   │   │   ├── 36_7.txt
│   │   │   ├── 42.txt
│   │   │   ├── 44.txt
│   │   │   ├── 4_1.txt
│   │   │   ├── 4_2.txt
│   │   │   ├── 50.txt
│   │   │   ├── 51.txt
│   │   │   ├── 52.txt
│   │   │   ├── 53.txt
│   │   │   ├── 54.txt
│   │   │   ├── 55.txt
│   │   │   ├── 56.txt
│   │   │   ├── 57.txt
│   │   │   ├── 5_1.txt
│   │   │   ├── 5_2.txt
│   │   │   ├── 6.txt
│   │   │   ├── 7.txt
│   │   │   ├── 8.txt
│   │   │   └── 9.txt
│   │   ├── asm_opt.h
│   │   ├── bf.h
│   │   ├── check.h
│   │   ├── code.h
│   │   ├── compile_speed.h
│   │   ├── count.h
│   │   ├── find.h
│   │   ├── http.h
│   │   ├── line_check.h
│   │   ├── lisp.h
│   │   ├── run.h
│   │   ├── snake.h
│   │   ├── speed_test.h
│   │   ├── time.h
│   │   └── win.h
│   ├── gl/
│   │   ├── 1.h
│   │   ├── 2.h
│   │   ├── 3.h
│   │   ├── frame.h
│   │   ├── gl.h
│   │   ├── line.h
│   │   └── sphere.h
│   ├── ide/
│   │   ├── License.txt
│   │   ├── SciTE.properties
│   │   ├── SciTEGlobal.properties
│   │   ├── asm.properties
│   │   ├── cpp.properties
│   │   ├── lisp.properties
│   │   ├── luaCOPYRIGHT
│   │   ├── modules.api
│   │   ├── python.properties
│   │   └── scite.1
│   ├── launch_ide.bat
│   ├── line_check.bat
│   ├── nasm/
│   │   ├── bin.bat
│   │   ├── bin.h
│   │   ├── cell.h
│   │   ├── dec.inc
│   │   ├── grldr
│   │   ├── menu.lst
│   │   └── windemos.inc
│   ├── open_cmd.bat
│   ├── rcheck.bat
│   ├── rinf/
│   │   ├── conf.txt
│   │   ├── key.txt
│   │   ├── match.txt
│   │   ├── optr.txt
│   │   └── optr2.txt
│   ├── rjit.bat
│   ├── rjit_win.bat
│   ├── rpack.bat
│   ├── rpack_win.bat
│   ├── rsrc/
│   │   ├── basic.h
│   │   ├── carray.h
│   │   ├── char.h
│   │   ├── chs.h
│   │   ├── double.h
│   │   ├── double_j.h
│   │   ├── double_n.h
│   │   ├── eval.h
│   │   ├── float.h
│   │   ├── func.h
│   │   ├── int.h
│   │   ├── int8.h
│   │   ├── int8_j.h
│   │   ├── int8_n.h
│   │   ├── math.h
│   │   ├── new.h
│   │   ├── ralgo.h
│   │   ├── rbuf.h
│   │   ├── rbufm.h
│   │   ├── rcc.h
│   │   ├── rcode.h
│   │   ├── rcode_n.h
│   │   ├── rdic.h
│   │   ├── rdir.h
│   │   ├── rf.h
│   │   ├── rf_g.h
│   │   ├── rf_j.h
│   │   ├── rf_n.h
│   │   ├── rff.h
│   │   ├── rff_j.h
│   │   ├── rff_n.h
│   │   ├── rfile.h
│   │   ├── rfs.h
│   │   ├── rfs_j.h
│   │   ├── rfs_n.h
│   │   ├── rhash.h
│   │   ├── rlist.h
│   │   ├── rmutex.h
│   │   ├── rmutex_j.h
│   │   ├── rmutex_n.h
│   │   ├── rp.h
│   │   ├── rpp.h
│   │   ├── rset.h
│   │   ├── rsock.h
│   │   ├── rstr.h
│   │   ├── rstrw.h
│   │   ├── short.h
│   │   ├── uint.h
│   │   ├── ushort.h
│   │   ├── var.h
│   │   └── varf.h
│   └── run.bat
├── del.bat
├── proj/
│   ├── rpp.sln
│   ├── rpp.vcxproj
│   ├── rpp.vcxproj.filters
│   └── rpp_win/
│       ├── rpp_win.sln
│       ├── rpp_win.vcxproj
│       └── rpp_win.vcxproj.filters
├── rlib/
│   ├── gbk.txt
│   ├── ralgo.h
│   ├── rbase.h
│   ├── rbuf.h
│   ├── rclass.h
│   ├── rcode.h
│   ├── rdb.h
│   ├── rdic.h
│   ├── rdir.h
│   ├── rf.h
│   ├── rfile.h
│   ├── rhash.h
│   ├── rindex.h
│   ├── rlist.h
│   ├── rmutex.h
│   ├── rset.h
│   ├── rsock.h
│   ├── rstr.h
│   ├── rstrw.h
│   └── rthread.h
├── rpp/
│   ├── rpp.cpp
│   ├── rpp_def.h
│   ├── rpp_win.cpp
│   ├── talloc.h
│   ├── tanalyse.h
│   ├── tconf.h
│   ├── tsh.h
│   ├── tstruct.h
│   ├── tvm.h
│   ├── tvm_struct.h
│   ├── zadd.h
│   ├── zasm.h
│   ├── zautof.h
│   ├── zbin.h
│   ├── zclass.h
│   ├── zcontrol.h
│   ├── zctl.h
│   ├── zexp.h
│   ├── zfind.h
│   ├── zftl.h
│   ├── zjit.h
│   ├── zjitb.h
│   ├── zjitf.h
│   ├── zjiti.h
│   ├── zlambda.h
│   ├── zmac.h
│   ├── zmain.h
│   ├── zmatch.h
│   ├── zmemb.h
│   ├── znasm.h
│   ├── zopt.h
│   ├── zpre.h
│   ├── zread.h
│   ├── zsent.h
│   ├── zsrep.h
│   └── zsuper.h
└── update.txt
Download .txt
SYMBOL INDEX (947 symbols across 93 files)

FILE: bin/example/11_4.h
  function main (line 2) | void main()

FILE: bin/example/11_5.h
  function mac$ (line 24) | mac$ C _word [ _mword ]
  function mac$ (line 29) | mac$ D _word [ _mword ]

FILE: bin/example/11_6.h
  function mac$ (line 17) | mac$ ┏━━━━━┓┃ _word _word ┃ ┃ _word _word ┃┗━━━━━┛

FILE: bin/example/11_7.h
  function main (line 6) | void main()
  function fa (line 23) | fa _word

FILE: bin/example/17_1.h
  function main (line 5) | void main()

FILE: bin/example/17_2.h
  function main (line 5) | void main()

FILE: bin/example/34_2.h
  function namespace (line 3) | namespace A
  function class (line 7) | class A.B
  function namespace (line 22) | namespace A.B.C
  function main (line 30) | void main()

FILE: bin/example/36_6.h
  function import (line 1) | import rdic.h

FILE: bin/example/42.h
  function main (line 6) | void main()

FILE: bin/example/44.h
  function main (line 9) | void main()

FILE: bin/example/51.h
  function fneg (line 34) | int fneg(int x)
  function fsub (line 39) | int fsub(int x,int y)

FILE: bin/example/52.h
  function main (line 5) | void main()

FILE: bin/example/53.h
  function main (line 5) | void main()
  function find (line 11) | int find(rstr s,rstr p)

FILE: bin/example/54.h
  function match (line 17) | bool match(rstr reg,rstr text)
  function match_here (line 29) | bool match_here(rstr reg,rstr text)
  function match_star (line 42) | bool match_star(char c,rstr reg,rstr text)

FILE: bin/example/55.h
  function main (line 5) | void main()

FILE: bin/example/56.h
  function A (line 20) | int A(int a,int b)
  function C (line 28) | int C(int a,int b)

FILE: bin/example/57.h
  function main (line 5) | void main()

FILE: bin/example/asm_opt.h
  function import (line 7) | import rfile.h
  function rstr (line 37) | rstr line_del(rstr& s)
  function rstr (line 43) | rstr sym_replace(rstr s)
  function rstr (line 162) | rstr opt_jmp(rstr s)
  function rstr (line 185) | rstr opt_two(rstr s)
  function rstr (line 214) | rstr get_symbol(rstr s)
  function find_count (line 222) | int find_count(rbuf<rstr>& arr,int left,int right,rstr& symbol)
  function find_count (line 230) | int find_count(rstr src,rstr dst)
  function is_symbol (line 239) | bool is_symbol(rstr s)
  function is_symbol (line 247) | bool is_symbol(char ch)

FILE: bin/example/find.h
  function main (line 8) | void main()

FILE: bin/example/line_check.h
  function check_line (line 9) | bool check_line(rstrw s)
  function check_s (line 27) | bool check_s(rstrw s)

FILE: bin/example/lisp.h
  function main (line 6) | void main()
  function rstr (line 12) | rstr eval(rstr s)
  function rstr (line 17) | rstr eval(rbuf<rstr>& v)

FILE: bin/example/snake.h
  function main (line 11) | void main()
  function update (line 31) | void update()
  function init (line 43) | void init()
  function key (line 63) | void key()
  function check (line 79) | bool check()
  function out (line 95) | void out(char* s)

FILE: bin/gl/1.h
  function main (line 7) | void main()

FILE: bin/gl/2.h
  function main (line 10) | void main()

FILE: bin/gl/3.h
  function main (line 9) | void main()

FILE: bin/gl/frame.h
  function MoveRight (line 34) | void MoveRight(float fDelta)
  function m3dGetVectorLength (line 68) | static float m3dGetVectorLength(M3DVector3f& u)
  function m3dNormalizeVector (line 73) | static void m3dNormalizeVector(M3DVector3f& u)
  function m3dScaleVector3 (line 78) | static void m3dScaleVector3(M3DVector3f& v,float scale)
  function m3dCrossProduct (line 85) | static void m3dCrossProduct(M3DVector3f& result,M3DVector3f& u,M3DVector...
  function m3dMakePlanarShadowMatrix (line 103) | static void m3dMakePlanarShadowMatrix(
  function GetCameraOrientation (line 140) | void GetCameraOrientation(M3DMatrix44f& m)

FILE: bin/gl/gl.h
  function mac (line 20) | mac cd_protect
  function mac (line 27) | mac cd_ret

FILE: bin/gl/line.h
  function main (line 14) | void main()

FILE: bin/nasm/bin.h
  function import (line 2) | import rfile.h

FILE: bin/nasm/cell.h
  function import (line 5) | import rbufm.h

FILE: bin/rsrc/carray.h
  function num (line 15) | int num)
  function count (line 32) | int count()
  function T (line 37) | T* begin()

FILE: bin/rsrc/eval.h
  function evalue (line 4) | bool evalue(rstr s)
  function eval_in (line 14) | bool eval_in(char* s,tfunc* ptfi,int vebp)
  function eval_vstr (line 24) | bool eval_vstr(rbuf<rstr>* vstr,tfunc* ptfi,int vebp)
  function define (line 34) | define get_up_func get_up_func_in(ebp,sizeof(s_local))
  function tfunc (line 43) | tfunc* get_cur_func()
  function tfunc (line 49) | tfunc* get_cur_func_in(int pasm)

FILE: bin/rsrc/int8_n.h
  function operator (line 328) | operator neg(int8 a)
  function empty (line 338) | bool empty()

FILE: bin/rsrc/math.h
  function namespace (line 2) | namespace math

FILE: bin/rsrc/rcc.h
  function class (line 1) | class xpoint
  function set_effect_volume (line 9) | enum
  function rstr (line 152) | rstr get_key(rstr name)
  function calle (line 161) | calle c_cc_set_key
  function calle (line 172) | calle c_cc_add_cache
  function rand (line 180) | int rand(int n)
  function xpoint (line 258) | xpoint get_size(void* sprite)
  function xpoint (line 318) | xpoint get_pos(void* node)
  function rect_hit (line 379) | bool rect_hit(double a,double b,double c,double d)

FILE: bin/rsrc/rdic.h
  function rbool (line 25) | rbool exist(const rstr& key)

FILE: bin/rsrc/rstr.h
  function class (line 1) | class rstr
  function toint (line 82) | int toint()
  function uint (line 89) | uint touint()
  function int8 (line 96) | int8 toint8()
  function todouble (line 103) | double todouble()
  function rstr (line 110) | rstr torstr()
  function rstrw (line 115) | rstrw torstrw()
  function operator (line 162) | void operator+=(rstr& a)
  function set (line 193) | void set(char* p)
  function push (line 201) | void push(char ch)
  function pop (line 206) | char pop()
  function count (line 211) | int count()
  function size (line 216) | int size()
  function wchar (line 229) | wchar* cstrw()
  function empty (line 249) | bool empty()
  function clear (line 254) | void clear()
  function pos (line 264) | int pos(char* p)
  function rstr (line 269) | rstr sub(int begin,int end=count)
  function erase (line 276) | bool erase(int begin,int end)
  function erase (line 281) | bool erase(int i)
  function insert (line 286) | bool insert(int pos,rstr& a)
  function get (line 291) | char get(int i)
  function get_top (line 296) | char get_top()
  function get_bottom (line 306) | char get_bottom()
  function is_number (line 316) | bool is_number()
  function rstr (line 338) | rstr replace(rstr src,rstr dst)
  function reverse (line 355) | void reverse()
  function print (line 360) | void print()
  function printl (line 365) | void printl()
  function rstr (line 370) | static rstr format(rstr f,int a)

FILE: bin/rsrc/rstrw.h
  function rstrw (line 4) | struct rstrw
  function rstr (line 41) | rstr torstr()
  function ushort (line 46) | ushort* cstrw()
  function operator (line 80) | void operator+=(const rstrw& a)
  function operator (line 85) | void operator+=(ushort ch)
  function ushort (line 113) | ushort* set_count(int count)
  function ushort (line 119) | ushort* set_size(int size)
  function set (line 124) | void set(const ushort* p)
  function push (line 132) | void push(ushort ch)
  function push_front (line 137) | void push_front(ushort ch)
  function ushort (line 142) | ushort pop()
  function ushort (line 147) | ushort pop_front()
  function ushort (line 162) | ushort* begin() const
  function ushort (line 167) | ushort* end() const
  function clear (line 177) | void clear()
  function ushort (line 182) | static ushort* next(ushort* p)
  function ushort (line 187) | static ushort* prev(ushort* p)
  function ushort (line 192) | ushort* pos(int num) const
  function pos (line 197) | int pos(ushort* p) const
  function rstrw (line 202) | rstrw sub(int begin) const
  function rstrw (line 207) | rstrw sub(int begin,int end) const
  function rbool (line 214) | rbool erase(int begin,int end)
  function rbool (line 219) | rbool erase(int i)
  function rbool (line 224) | rbool insert(int pos,const rstrw& a)
  function ushort (line 229) | ushort get(int i) const
  function ushort (line 237) | ushort get_top() const
  function find_last (line 262) | int find_last(ushort ch)

FILE: bin/rsrc/short.h
  function rstr (line 44) | rstr torstr()

FILE: bin/rsrc/varf.h
  function namespace (line 2) | namespace varf

FILE: rlib/rbase.h
  type __int64 (line 20) | typedef __int64 int64;
  type uint64 (line 21) | typedef unsigned __int64 uint64;
  type int64 (line 23) | typedef long long int64;
  type uint64 (line 24) | typedef unsigned long long uint64;
  type int64 (line 27) | typedef int64 int8;
  type uint (line 32) | typedef unsigned int uint;
  type ushort (line 36) | typedef unsigned short ushort;
  type uchar (line 40) | typedef unsigned char uchar;
  type rbool (line 44) | typedef int rbool;
  type wchar_t (line 49) | typedef wchar_t wchar;
  type ushort (line 51) | typedef ushort wchar;

FILE: rlib/rbuf.h
  function move (line 62) | void move(rbuf<T>& a)
  function operator (line 120) | void operator+=(const rbuf<T>& a)
  function operator (line 134) | void operator+=(rbuf<T>&& a)
  function operator (line 148) | void operator+=(const T& a)
  function operator (line 153) | void operator+=(T&& a)
  function init (line 184) | void init()
  function T (line 191) | static T* next(void* p)
  function T (line 196) | static T* prev(void* p)
  function T (line 211) | T* pos(int num) const
  function pos (line 216) | int pos(void* p) const
  function T (line 221) | T* begin() const
  function T (line 226) | T* end() const
  function T (line 231) | T* rbegin() const
  function T (line 243) | T* rend() const
  function clear (line 260) | void clear()
  function extend_num (line 265) | static int extend_num(int num)
  function push (line 271) | void push(const T& a)
  function push (line 281) | void push(T&& a)
  function push_move (line 291) | void push_move(T& a)
  function T (line 296) | T pop()
  function T (line 304) | T pop_front()
  function push_front (line 312) | void push_front(const T& a)
  function rbool (line 345) | rbool erase(int num)
  function rbool (line 359) | rbool erase(int begin,int end)
  function rbool (line 373) | rbool insert(int pos,const T& a)
  function rbool (line 392) | rbool insert(int pos,const rbuf<T>& a)
  function T (line 414) | T* v_new(int num)
  function v_delete (line 419) | void v_delete()
  function alloc (line 426) | void alloc(int num)
  function alloc_not_change (line 442) | void alloc_not_change(int num)
  function realloc (line 457) | void realloc(int num)
  function realloc_not_change (line 473) | void realloc_not_change(int num)
  function realloc_not_change_in (line 488) | void realloc_not_change_in(int num)
  function realloc_n (line 502) | void realloc_n(int num)
  function realloc_n_not_change (line 520) | void realloc_n_not_change(int num)
  function free (line 537) | void free()
  function copy (line 547) | void copy(const rbuf<T>& a)
  function T (line 560) | T get(int i) const
  function rbool (line 597) | rbool exist(const T& a)
  function find_last (line 621) | int find_last(const T& a) const

FILE: rlib/rclass.h
  function if (line 13) | struct rclass//本类用于初始化环境,只能实例化一次(单例模式)
  function new_fail_handle (line 44) | static void new_fail_handle()

FILE: rlib/rcode.h
  type rcode (line 7) | struct rcode
  function rstr (line 15) | static rstr gbk_to_utf16(rstr s)
  function rstr (line 34) | static rstr gbk_to_utf16(const rstr& s)
  function rstr (line 69) | static rstr utf8_to_gbk(const rstr& s)
  function rstr (line 74) | static rstr utf8_to_utf16(const rstr& s)
  function rstr (line 117) | static rstr utf16_to_gbk(rstr s)
  function rstr (line 136) | static rstr utf16_to_gbk(const rstr& s)
  function rstr (line 163) | static rstr utf16_to_utf8(const rstr& s)
  function rstr (line 194) | static rstr to_utf16_txt(const rstr& s)
  function rstr (line 210) | static rstr add_utf8_head(const rstr& s)
  function rstr (line 220) | static rstr to_utf8_txt(const rstr& s)
  function rstr (line 237) | static rstr to_gbk_txt(const rstr& s)
  function rbool (line 250) | static rbool is_utf16_txt(const rstr& s)
  function rbool (line 257) | static rbool is_utf8_txt(const rstr& s)
  function rbool (line 265) | static rbool is_utf16_big_txt(const rstr& s)
  function rbool (line 272) | static rbool is_utf32_txt(const rstr& s)
  function rbool (line 294) | static rbool is_utf8_3(uchar ch)
  function rbool (line 299) | static rbool is_utf8_2(uchar ch)
  function rbool (line 305) | static rbool is_chs(ushort w)
  function rbool (line 311) | static rbool is_chs_first(uchar ch)
  function ushort (line 317) | static ushort unicode(int index)
  function ushort (line 322) | static ushort gbk(int index)
  function gbk_to_utf8_c (line 339) | static int gbk_to_utf8_c(uchar* src,uchar* dst)
  function gbk_to_utf16_c (line 350) | static int gbk_to_utf16_c(uchar* src,uchar* dst)
  function utf8_to_gbk_c (line 362) | static int utf8_to_gbk_c(uchar* src,uchar* dst)
  function utf8_to_utf16_c (line 373) | static int utf8_to_utf16_c(uchar* src,uchar* dst)
  function utf16_to_gbk_c (line 385) | static int utf16_to_gbk_c(uchar* src,uchar* dst)
  function utf16_to_utf8_c (line 406) | static int utf16_to_utf8_c(uchar* src,uchar* dst)

FILE: rlib/rdb.h
  function rbool (line 33) | rbool close()
  function count (line 89) | int count()
  function rstr (line 94) | rstr operator[](int i)
  function rbool (line 102) | rbool read(int i,rstr& data)
  function rbool (line 128) | rbool write(int i,const rstr& data)
  function rbool (line 153) | rbool write_new(const rstr& data)
  function rbool (line 182) | rbool extend()
  function find (line 206) | int find(rstr s)
  function TA (line 214) | TA get_data_off()
  function get_index_off (line 219) | static int get_index_off(int i)

FILE: rlib/rdic.h
  function clear (line 23) | void clear()
  function T (line 28) | T* begin() const
  function T (line 33) | T* end() const
  function T (line 38) | T* next(T* p) const
  function rstr (line 43) | rstr get_key(T* p)
  function rbool (line 58) | rbool exist(const rstr& key) const
  function T (line 65) | T* find(const rstr& key) const
  function insert (line 72) | void insert(const rstr& key,const T& val)

FILE: rlib/rdir.h
  type rdir_item (line 20) | struct rdir_item
  function get_suffix (line 40) | struct rdir
  function rstrw (line 57) | static rstrw get_prev_dir(rstrw path)
  function rstrw (line 69) | static rstrw get_name(const rstrw& path)
  function rstrw (line 80) | static rstrw get_exe_name()
  function rstrw (line 88) | static rstrw get_exe_dir()
  function rstrw (line 106) | static rstrw get_cur_dir()
  function rstrw (line 127) | static rstrw dir_std(rstrw s)
  function rbuf (line 139) | static rbuf<rdir_item> get_file_bfs(rstrw path)

FILE: rlib/rf.h
  function printl (line 33) | static void printl(rstr s=rstr())
  function print (line 38) | static void print(rstr s=rstr())
  function print (line 43) | static void print(const char* s)
  function tick (line 48) | static int tick()
  function sleep (line 57) | static void sleep(int milliseconds)
  function getch (line 73) | static int getch()
  function round (line 90) | static int round(double a){
  function srand (line 99) | static void srand()
  function rand (line 104) | static int rand()
  function uchar (line 109) | static uchar get_bitmap(uchar bitmap[],int block)
  function set_bitmap (line 117) | static void set_bitmap(uchar bitmap[],int block)
  function rbool (line 122) | static rbool execmd(const char* p)
  function rbool (line 128) | static rbool execmd_r(const char* cmd,rstr& result)

FILE: rlib/rfile.h
  function rfile (line 15) | struct rfile
  function rbool (line 34) | rbool close()
  function rbool (line 92) | rbool read(int off,int len,void* buf)
  function rbool (line 97) | rbool read(int8 off,int len,void* buf)
  function rbool (line 107) | rbool read(int len,void* buf)
  function rstr (line 117) | rstr read_all()
  function rstr (line 129) | static rstr read_all_n(const rstrw& name)
  function rstr (line 142) | rstr read_line()
  function rstrw (line 165) | rstrw read_line_w()
  function rbool (line 187) | rbool write(int off,int len,const void* buf)
  function rbool (line 192) | rbool write(int8 off,int len,const void* buf)
  function rbool (line 202) | rbool write(int len,const void* buf)
  function rbool (line 211) | rbool write(rstr s)
  function rbool (line 216) | rbool write_line(rstr s)
  function rbool (line 221) | rbool write_line_w(rstrw s)
  function rbool (line 226) | static rbool write_all_n(const rstrw& name,const rstr& cont)
  function size (line 236) | int size()
  function int8 (line 241) | int8 size8()
  function get_off (line 254) | int get_off()
  function int8 (line 259) | int8 get_off8()
  function rbool (line 268) | rbool set_off(int off)
  function rbool (line 273) | rbool set_off8(int8 off)
  function rbool (line 278) | static rbool exist(rstrw name)
  function int8 (line 309) | static int8 ftell8(FILE* fp)
  function fseek8 (line 318) | static int fseek8(FILE* fp,int8 off,int start)
  function FILE (line 327) | static FILE* fopen_w(wchar* name,wchar* mode)
  function rbool (line 337) | static rbool remove(rstrw name)
  function rbool (line 346) | static rbool rename(rstrw oldname,rstrw newname)
  function get_exe_size (line 356) | static int get_exe_size(char* name)
  function int8 (line 379) | static int8 get_update_time(rstrw path)
  function int8 (line 409) | static int8 get_size8(rstrw name)

FILE: rlib/rhash.h
  function init (line 43) | void init()
  function clear (line 52) | void clear()
  function rbool (line 72) | rbool exist(const rstr& name)
  function T (line 77) | T* find(const rstr& name)
  function insert_c (line 91) | void insert_c(T& a,rstr name=rstr())
  function insert (line 98) | void insert(T& a,rstr name=rstr())
  function rbool (line 112) | rbool erase(rstr name=rstr())
  function T (line 134) | T* begin()
  function T (line 142) | T* rend()
  function T (line 156) | T* next(T* cur)
  function get_addr (line 168) | static int get_addr(const rstr& name)
  function bkdr_hash32 (line 173) | static int bkdr_hash32(void* data,int len)
  function ushort (line 184) | static ushort bkdr_hash16(void* data,int len)

FILE: rlib/rindex.h
  function search (line 38) | static void search(rstrw name,rstr s)
  function rbool (line 52) | static rbool check(rstrw name)
  function rbool (line 64) | static rbool build(rstrw filename,rstrw path)

FILE: rlib/rlist.h
  function push_front (line 101) | void push_front(const T& a)
  function T (line 120) | T pop_front()
  function insert (line 139) | void insert(T* pos,const T& a)
  function insert (line 167) | void insert(int pos,const T& a)
  function erase (line 172) | void erase(T* pos)
  function erase (line 199) | void erase(int pos)
  function T (line 204) | T* index(int n)
  function T (line 224) | T* begin()
  function T (line 229) | T* end()
  function T (line 234) | T* next(void* p)
  function T (line 239) | T* prev(void* p)

FILE: rlib/rmutex.h
  function rmutex (line 10) | struct rmutex
  function enter (line 34) | void enter()
  function leave (line 43) | void leave()
  function rmutex_t (line 54) | struct rmutex_t

FILE: rlib/rset.h
  function copy_x (line 56) | void copy_x(const rset_i<T>* xnil,rset_i<T>* x)
  function init (line 67) | void init()
  function clear (line 78) | void clear()
  function clear_x (line 84) | void clear_x(rset_i<T>* x)
  function left_rotate (line 105) | void left_rotate(rset_i<T>* x)
  function right_rotate (line 135) | void right_rotate(rset_i<T>* x)
  function insert_fixup (line 166) | void insert_fixup(rset_i<T>* z)
  function insert_p (line 219) | void insert_p(rset_i<T>* z)
  function insert (line 254) | void insert(const T& a)
  function insert_c (line 262) | void insert_c(const T& a)
  function erase_fixup (line 281) | void erase_fixup(rset_i<T>* x)
  function transplant (line 352) | void transplant(rset_i<T>* u,rset_i<T>* v)
  function erase_p (line 369) | void erase_p(rset_i<T>* z)
  function erase (line 410) | void erase(const T& a)
  function exist (line 421) | bool exist(const T& a) const
  function T (line 492) | T* find(const T& a) const
  function T (line 502) | T* next(void* p) const
  function T (line 512) | T* prev(void* p) const
  function T (line 522) | T* begin() const
  function T (line 532) | static T* end()
  function T (line 537) | T* index(int n) const

FILE: rlib/rsock.h
  type UINT_PTR (line 7) | typedef UINT_PTR rsocket;
  type rsocket (line 17) | typedef int rsocket;
  function rsock (line 27) | struct rsock//only use TCP
  function rbool (line 61) | rbool socket()
  function rbool (line 71) | rbool connect(const char* hostname,int port)
  function rbool (line 166) | rbool close()
  function rbool (line 178) | static rbool close(rsocket socket)
  function send (line 188) | int send(int size,const void* data)//failed will return -1
  function recv (line 202) | int recv(int size,void* data)
  function send_all (line 216) | int send_all(int size,const void* data)
  function rbool (line 235) | rbool bind(int port)
  function rbool (line 248) | rbool listen()
  function rbool (line 258) | rbool accept(rsocket* socket,char* clientip=null,int* port=null)
  function rbool (line 278) | rbool listen_direct(int port)
  function rbool (line 283) | rbool connect_direct(const char* hostname,int port)
  function rbool (line 288) | rbool sends(rstr s)
  function rstr (line 297) | rstr recvs()
  function s_socket (line 328) | static int s_socket(int af,int type,int protocol)
  function s_connect (line 333) | static int s_connect(int s,void* name,int namelen)
  function s_close (line 338) | static int s_close(int s)
  function s_send (line 347) | static int s_send(int s,void* data,int size,int flags)
  function s_recv (line 352) | static int s_recv(int s,void* data,int size,int flags)
  function s_bind (line 357) | static int s_bind(int s,void* addr,int namelen)
  function s_listen (line 362) | static int s_listen(int s,int backlog)
  function s_accept (line 367) | static int s_accept(int s,void* addr,int* addrlen)

FILE: rlib/rstr.h
  function rstr (line 12) | struct rstr
  function toint (line 91) | int toint()
  function uint (line 98) | uint touint()
  function todouble (line 105) | double todouble()
  function int8 (line 112) | int8 toint8()
  function rstr (line 123) | rstr torstr()
  function uchar (line 128) | uchar* cstr()
  function ushort (line 140) | ushort* cstrw()
  function wchar (line 149) | wchar* cstrw_t()
  function operator (line 208) | void operator+=(const rstr& a)
  function operator (line 213) | void operator+=(rstr&& a)
  function operator (line 218) | void operator+=(uchar ch)
  function uchar (line 248) | uchar* set_size(int size)
  function set (line 254) | void set(const void* p)
  function push (line 263) | void push(uchar ch)
  function push_front (line 268) | void push_front(uchar ch)
  function uchar (line 273) | uchar pop()
  function uchar (line 278) | uchar pop_front()
  function uchar (line 293) | uchar* begin() const
  function uchar (line 298) | uchar* end() const
  function clear (line 308) | void clear()
  function uchar (line 313) | static uchar* next(void* p)
  function uchar (line 318) | static uchar* prev(void* p)
  function uchar (line 323) | uchar* pos(int num) const
  function pos (line 328) | int pos(void* p) const
  function rstr (line 333) | rstr sub(int begin) const
  function rstr (line 338) | rstr sub(int begin,int end) const
  function rbool (line 345) | rbool erase(int begin,int end)
  function rbool (line 350) | rbool erase(int i)
  function rbool (line 355) | rbool insert(int pos,const rstr& a)
  function uchar (line 360) | uchar get(int i) const
  function find_last (line 407) | int find_last(uchar ch) const
  function rbool (line 412) | rbool exist(const rstr& s) const
  function rbool (line 417) | static rbool is_alpha(uchar ch)
  function rbool (line 422) | static rbool is_number(uchar ch)
  function uchar (line 427) | static uchar chartoup(uchar ch)
  function upchartonum (line 432) | static int upchartonum(uchar ch)
  function chartonum (line 437) | static int chartonum(uchar ch)
  function print (line 442) | void print()
  function printl (line 447) | void printl()
  function format_t (line 453) | void format_t(const char* szFormat,...)
  function rstr (line 467) | static rstr format(const char* szFormat,...)
  function rstr (line 481) | static rstr hextodec(rstr s)
  function rstr (line 488) | static rstr bintodec(rstr s)
  function rstr (line 502) | rstr join(const rbuf<T>& v,const rstr& s)

FILE: rlib/rstrw.h
  function rstrw (line 7) | struct rstrw
  function rstr (line 50) | rstr torstr() const
  function ushort (line 60) | ushort* cstrw()
  function wchar (line 67) | wchar* cstrw_t()
  function operator (line 105) | void operator+=(const rstrw& a)
  function operator (line 110) | void operator+=(rstrw&& a)
  function operator (line 115) | void operator+=(ushort ch)
  function ushort (line 143) | ushort* set_count(int count)
  function ushort (line 149) | ushort* set_size(int size)
  function set (line 154) | void set(const wchar* p)
  function strlen_w (line 162) | int strlen_w(const wchar* p)
  function push (line 177) | void push(ushort ch)
  function push_front (line 182) | void push_front(ushort ch)
  function ushort (line 187) | ushort pop()
  function ushort (line 192) | ushort pop_front()
  function ushort (line 207) | ushort* begin() const
  function ushort (line 212) | ushort* end() const
  function clear (line 222) | void clear()
  function ushort (line 227) | static ushort* next(void* p)
  function ushort (line 232) | static ushort* prev(void* p)
  function ushort (line 237) | ushort* pos(int num) const
  function pos (line 242) | int pos(void* p) const
  function rstrw (line 247) | rstrw sub(int begin) const
  function rstrw (line 252) | rstrw sub(int begin,int end) const
  function rbool (line 259) | rbool erase(int begin,int end)
  function rbool (line 264) | rbool erase(int i)
  function rbool (line 269) | rbool insert(int pos,const rstrw& a)
  function ushort (line 274) | ushort get(int i) const
  function rbool (line 316) | static rbool is_number(ushort ch)
  function find_last (line 326) | int find_last(ushort ch) const

FILE: rlib/rthread.h
  type uint (line 9) | typedef uint rthread_ret;
  type uint (line 11) | typedef uint (__stdcall* prthread)(void*);
  function else (line 21) | struct rthread
  function wait_exit (line 48) | static void wait_exit(int tid)

FILE: rpp/rpp.cpp
  function main (line 3) | int main(int argc, char* argv[])

FILE: rpp/rpp_win.cpp
  function WinMain (line 5) | int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,

FILE: rpp/talloc.h
  type talloc_i (line 6) | struct talloc_i
  type talloc (line 13) | struct talloc
  function uchar (line 65) | static uchar* alloc_v(int len)
  function free_v (line 73) | static void free_v(uchar* addr)

FILE: rpp/tanalyse.h
  type tanalyse_item (line 5) | struct tanalyse_item
  function analyse_add (line 16) | struct tanalyse
  function analyse_print (line 32) | static void analyse_print(tsh& sh)

FILE: rpp/tconf.h
  function enum (line 8) | struct tconf
  function sort_optr (line 43) | struct toptr
  function get_grade (line 70) | int get_grade(const rstr& s) const
  function rbool (line 81) | rbool precede(const rstr& first,const rstr& second)
  function rbool (line 86) | rbool is_optr(const rstr& s) const
  function count (line 155) | struct tkey
  function get_key_index (line 179) | int get_key_index(const rstr& s)
  function rbool (line 189) | rbool is_asm_ins(const rstr& s) const
  function rbool (line 200) | rbool is_asm_reg(const rstr& s) const

FILE: rpp/tsh.h
  function print_vclass (line 69) | void print_vclass()
  function print_vword (line 77) | static void print_vword(rbuf<tword>& v)
  function print_func_sent (line 87) | static void print_func_sent(tfunc& tfi)
  function print_func_asm (line 99) | static void print_func_asm(tfunc& tfi)
  function print_func_dec (line 110) | static void print_func_dec(tclass& tci)
  function rstr (line 118) | static rstr get_func_declare_name(tclass& tci,tfunc& tfi)
  function rstr (line 135) | static rstr get_func_declare(tclass& tci,tfunc& tfi)
  function rbuf (line 151) | static rbuf<rstr> get_func_declare_lisp(tsh& sh,tclass& tci,tfunc& tfi)
  function rbuf (line 156) | static rbuf<rstr> get_func_declare_call(tsh& sh,tclass& tci,tfunc& tfi)
  function clear_word_val (line 170) | static void clear_word_val(rbuf<tword>& v,int begin,int end)
  function rstrw (line 182) | static rstrw get_main_name(tsh& sh)
  function rstr (line 191) | static rstr get_ctype(tsh& sh,const tword& word)
  function rstr (line 208) | static rstr get_tname(const rstr& s)
  function rstr (line 216) | static rstr get_ttype(rstr s)
  function rbool (line 225) | rbool is_optr_func(tfunc& tfi)
  function rbool (line 238) | rbool is_basic_type(const rstr& s)
  function rbool (line 245) | static rbool is_point_quote(const rstr& s)
  function rbool (line 250) | static rbool is_quote(const rstr& s)
  function rbool (line 255) | static rbool is_point(const rstr& s)
  function split_param (line 264) | void split_param(rbuf<tsent>& vsent,
  function split_param (line 278) | void split_param(rbuf<tsent>& vsent,const rbuf<tword>& v)
  function rbuf (line 474) | static rbuf<rstr> vword_to_vstr(const rbuf<tword>& v)
  function push_twi (line 482) | static void push_twi(rbuf<tword>& v,tword& twi,const rstr& val)
  function rstr (line 488) | rstr get_file_name(tfile* p)
  function error (line 497) | static void error(rstr e=rstr())
  function rstr (line 507) | static rstr get_src_str(const tword& word)
  function error (line 521) | void error(const tword& word,rstr e=rstr())
  function error (line 529) | void error(const tsent& sent,rstr e=rstr())
  function error (line 538) | void error(const tasm& oasm,rstr e=rstr())
  function error (line 546) | static void error(tfunc& tfi,rstr e=rstr())
  function error (line 551) | static void error(tfunc* ptfi,rstr e=rstr())

FILE: rpp/tstruct.h
  function tword (line 12) | struct tword
  function clear (line 48) | void clear()
  function print (line 97) | void print()
  function tmac (line 193) | struct tmac
  type ttl (line 217) | struct ttl
  type tfile (line 223) | struct tfile
  function tdata (line 246) | struct tdata
  function clear (line 273) | void clear()
  function print (line 283) | void print()
  function tsent (line 296) | struct tsent
  function clear (line 323) | void clear()
  function tsent (line 330) | tsent sub(int begin,int end) const
  function print (line 342) | void print()
  type tdynamic (line 348) | struct tdynamic
  type tclass (line 363) | struct tclass
  function tfunc (line 365) | struct tfunc
  function clear (line 406) | void clear()
  function tclass (line 456) | struct tclass
  function taddr (line 498) | struct taddr
  type tenv (line 521) | struct tenv

FILE: rpp/tvm.h
  type tvm (line 11) | struct tvm
  type tvm_t (line 14) | struct tvm_t
  type tvm (line 24) | struct tvm
  function rbool (line 39) | static rbool qrun(tsh& sh,tvm_t* pvmt,treg reg,treg* poldreg=null)
  function stdcall_func (line 1226) | static void stdcall_func(treg& reg)
  function cdecl_func (line 1247) | static void cdecl_func(treg& reg)
  function rbool (line 1270) | rbool run(tsh& sh)
  function init_reg (line 1288) | static void init_reg(tsh& sh,tvm_t* pitem)
  function rbool (line 1295) | rbool init(tsh& sh)
  function rbool (line 1308) | static rbool main_init(tsh& sh,rbuf<tasm>& vasm)
  function rbool (line 1319) | static rbool init_thr_ins(tsh& sh,rbuf<tasm>& vasm,void* start,void* param)
  function create_thr (line 1328) | int create_thr(tsh& sh,void* start,void* param)
  function rthread_ret (line 1345) | static rthread_ret rthread_call thread(void* param)

FILE: rpp/tvm_struct.h
  type treg (line 9) | struct treg
  function clear (line 70) | struct topnd
  function rbool (line 96) | rbool empty()
  function clear (line 102) | struct tins
  function rbool (line 120) | rbool empty()
  type tfile (line 515) | struct tfile
  function clear (line 517) | struct tpos
  function rbool (line 533) | rbool empty()
  function printl (line 548) | void printl()
  type tfunc (line 555) | struct tfunc
  function tasm (line 557) | struct tasm
  function clear (line 588) | void clear()
  function print (line 597) | void print()
  type top_node (line 604) | struct top_node

FILE: rpp/zadd.h
  function elif (line 7) | struct zadd
  function tsent (line 52) | static tsent add_local_init(tsh& sh,tfunc& tfi)
  function add_structor_func (line 61) | static void add_structor_func(tsh& sh,tdata& tdi,rbuf<tword>& v)
  function add_destructor_func (line 79) | static void add_destructor_func(tsh& sh,tdata& tdi,rbuf<tword>& v)
  function add_structor_func_m (line 97) | static void add_structor_func_m(tsh& sh,tdata& tdi,rbuf<tword>& v)
  function add_member_destruct (line 118) | static void add_member_destruct(tsh& sh,tfunc& tfi)
  function add_member_struct (line 142) | static void add_member_struct(tsh& sh,tfunc& tfi)

FILE: rpp/zasm.h
  function if (line 11) | struct zasm
  function rbool (line 45) | static rbool add_asm_ebp(tsh& sh,tfunc& tfi)
  function rbool (line 146) | static rbool use_ebp(tsh& sh,rbuf<tasm>& vasm)
  function rbool (line 521) | static rbool obtain_var_addr_var(tsh& sh,tsent& src,tdata& dst,
  function rbool (line 536) | static rbool obtain_var_addr_f(tsh& sh,tdata& retval,
  function tsent (line 550) | static tsent get_src_in(tsh& sh,tsent& src)
  function rbool (line 578) | static rbool add_esi(tsh& sh,rstr type,rbuf<tasm>& vasm,tsent& src)
  function rbool (line 630) | static rbool copy_param(tsh& sh,const rstr& src,
  function rbool (line 724) | static rbool destruct_ret(tsh& sh,tdata& retval,rbuf<tasm>& vasm)
  function rstr (line 746) | static rstr get_int(rstr& s)
  function push_asm (line 751) | static void push_asm(rbuf<tasm>& vasm,const rbuf<rstr>& vstr)
  function push_asm (line 759) | static void push_asm(rbuf<tasm>& vasm,
  function push_asm (line 780) | static void push_asm(rbuf<tasm>& vasm,
  function push_asm (line 799) | static void push_asm(rbuf<tasm>& vasm,const rstr& s1,const rstr& s2,
  function push_asm (line 815) | static void push_asm(rbuf<tasm>& vasm,const rstr& s1,const rstr& s2,
  function push_asm (line 830) | static void push_asm(rbuf<tasm>& vasm,const rstr& s1,const rstr& s2,
  function push_asm (line 843) | static void push_asm(rbuf<tasm>& vasm,const rstr& s1,const rstr& s2,
  function push_asm (line 854) | static void push_asm(rbuf<tasm>& vasm,const rstr& s1,const rstr& s2)
  function push_asm (line 862) | static void push_asm(rbuf<tasm>& vasm,const rstr& s1)

FILE: rpp/zautof.h
  function if (line 7) | struct zautof
  function op_rstr (line 170) | static void op_rstr(tsh& sh)
  function op_rstr (line 183) | static void op_rstr(tsh& sh,rbuf<tword>& v)

FILE: rpp/zbin.h
  type zbin (line 9) | struct zbin
  function rbool (line 33) | static rbool cp_call_asm(tsh& sh,tasm& item)
  function rbool (line 84) | static rbool cp_vword_to_vasm(tsh& sh,tfunc& tfi,tenv env)
  function rbool (line 99) | static rbool proc_vasm(tsh& sh,rbuf<tasm>& vasm)
  function rbool (line 111) | static rbool proc_asm(tsh& sh,tasm& oasm)
  function rbool (line 118) | static rbool proc_asm(tsh& sh,rbuf<tasm>& vasm,tasm& oasm)
  function find_comma (line 158) | static int find_comma(tsh& sh,rbuf<rstr>& v)
  function rbool (line 187) | static rbool a_asm(tsh& sh,tasm& item)
  function rbool (line 207) | static rbool obtain_qrun_type(tins& ins)
  function rbool (line 257) | static rbool a_opnd(tsh& sh,tasm& item,int index,const rbuf<rstr>& v,top...
  function trans_cstr (line 326) | static void trans_cstr(rstr& src)
  function rbool (line 366) | static rbool is_jmp_ins(int type)
  function get_reg_off (line 371) | static int get_reg_off(tsh& sh,const rstr& s)
  function clear_reg (line 396) | static void clear_reg(treg& reg)
  function print_reg (line 404) | static void print_reg(treg& reg)
  function tfunc (line 411) | static tfunc* find_func(tsh& sh,rstr name)
  function uint (line 451) | static uint find_func_bin(tsh& sh,rstr name)
  function combine_mbk (line 465) | static void combine_mbk(tsh& sh,rbuf<tword>& v)
  function combine_template (line 479) | static void combine_template(tsh& sh,rbuf<tword>& v)

FILE: rpp/zclass.h
  type zclass (line 10) | struct zclass
  function ifn (line 36) | ifn(combine_multi_class_name_one(sh,v))
  function rbool (line 45) | static rbool combine_multi_class_name_one(tsh& sh,rbuf<tword>& v)
  function main_add (line 75) | static void main_add(tsh& sh)
  function rbool (line 88) | static rbool proc_class_again(tsh& sh,rbuf<tword>& v)
  function arrange_format (line 95) | static void arrange_format(tsh& sh,rbuf<tword>& v,tfunc* ptfi)
  function arrange_format_bbk (line 102) | static void arrange_format_bbk(tsh& sh,rbuf<tword>& v,tfunc* ptfi=null)
  function arrange_format_ctrl (line 122) | static void arrange_format_ctrl(tsh& sh,rbuf<tword>& v,tfunc* ptfi)
  function rbool (line 144) | static rbool is_bbk_prev(tsh& sh,const rstr& s)
  function arrange_format_l (line 150) | static void arrange_format_l(tsh& sh,rbuf<tword>& v,tfunc* ptfi=null)
  function rbool (line 176) | static rbool name_part(tsh& sh,tclass& tci,rbuf<tword>& name_w)
  function rbool (line 230) | static rbool proc_old_tl(tsh& sh,rbuf<tword>& v,int i,rbuf<tword>& name_w)
  function rbool (line 275) | static rbool find_class(tsh& sh,rbuf<tword>& v)
  function rbool (line 322) | static rbool class_add(tsh& sh,tclass& tci,rbuf<tword>& name_w)
  function insert_type (line 342) | static void insert_type(tsh& sh,const rstr& name,int size)
  function basic_type_add (line 351) | static void basic_type_add(tsh& sh)
  function rbool (line 362) | static rbool inherit_proc_all(tsh& sh)

FILE: rpp/zcontrol.h
  function rbool (line 66) | static rbool switch_replace(tsh& sh,rbuf<tword>& v)
  function rbool (line 156) | static rbool auto_bbk(tsh& sh,rbuf<tword>& v,tfunc& tfi)
  function rbool (line 180) | static rbool auto_bbk_one(tsh& sh,rbuf<tword>& v)
  function tag_replace (line 228) | static void tag_replace(tsh& sh,tfunc& tfi)
  function tag_replace (line 250) | static void tag_replace(tword& word,rbuf<tword>& vtag)
  function part_vsent (line 257) | static void part_vsent(tfunc& tfi)
  function part_vsent (line 262) | static void part_vsent(rbuf<tsent>& vsent)
  function rbool (line 287) | static rbool need_part(rbuf<tsent>& v)
  function proc_return (line 300) | static void proc_return(tsh& sh,rbuf<tsent>& vsent,tfunc& tfi)
  function proc_return_v (line 308) | static void proc_return_v(tsh& sh,rbuf<tword>& v,tfunc& tfi)
  function rbool (line 360) | static rbool obtain_sent(tsh& sh,rbuf<tword>& v,rbuf<tsent>& vsent)
  function rbool (line 393) | static rbool proc_bbk(tsh& sh,rbuf<tword>& v)
  function find_else_end (line 417) | static int find_else_end(tsh& sh,rbuf<tword>& v,int begin)
  function rbool (line 449) | static rbool proc_if(tsh& sh,rbuf<tword>& v)
  function rbool (line 499) | static rbool proc_for(tsh& sh,rbuf<tword>& v)
  function insert_jmp_asm (line 569) | static void insert_jmp_asm(tsh& sh,tword& word,const tword& posword)
  function insert_cond_true_asm (line 576) | static void insert_cond_true_asm(tsh& sh,rbuf<rstr>& multi,
  function insert_cond_false_asm (line 584) | static void insert_cond_false_asm(tsh& sh,rbuf<rstr>& multi,
  function find_jump_out (line 592) | static int find_jump_out(tsh& sh,rbuf<tword>& v,int i)
  function rbool (line 615) | static rbool proc_continue(tsh& sh,rbuf<tword>& v)
  function rbool (line 671) | static rbool proc_break(tsh& sh,rbuf<tword>& v)
  function get_word_tab (line 698) | static int get_word_tab(tword& word)
  function get_low_end (line 715) | static int get_low_end(rbuf<tword>& v,int begin,int head)
  function get_condition_end (line 730) | static int get_condition_end(tsh& sh,rbuf<tword>& v,
  function rbool (line 765) | static rbool replace_for_to(tsh& sh,rbuf<tword>& v)
  function insert_end_statement (line 842) | static void insert_end_statement(tsh& sh,tfunc& tfi,rbuf<tword>& v)

FILE: rpp/zctl.h
  type zctl (line 13) | struct zctl
  function rbool (line 85) | static rbool a_class(tsh& sh,tclass& tci)
  function ifn (line 138) | ifn(is_type(sh,vparam))
  function rbool (line 233) | static rbool is_type(tsh& sh,rbuf<rbuf<tword> >& vparam)
  function rbool (line 245) | static rbool is_type(tsh& sh,rbuf<tword>& v)
  function vtl_replace (line 253) | static void vtl_replace(rbuf<tword>& result,rbuf<ttl>& vtl,
  function str_replace (line 263) | static void str_replace(rbuf<tword>& v,const rstr& src,const rbuf<rstr>&...
  function point_replace (line 276) | static void point_replace(tsh& sh,rbuf<tword>& v,rbool& need)
  function combine_quote (line 330) | static void combine_quote(tsh& sh,rbuf<tword>& v)

FILE: rpp/zexp.h
  function if (line 11) | struct zexp
  function rbool (line 45) | static rbool p_point_call(tsh& sh,tsent& src,tsent& outopnd,
  function rbool (line 93) | static rbool p_temp_var(tsh& sh,tsent& src,tsent& outopnd,
  function rbool (line 135) | static rbool p_class_call(tsh& sh,tsent& src,tsent& outopnd,
  function rbool (line 156) | static rbool p_mbk(tsh& sh,const tsent& first,const tsent& second,
  function rbool (line 183) | static rbool p_lisp(tsh& sh,const tsent& src,tsent& outopnd,
  function get_vsent (line 284) | static void get_vsent(rbuf<rbuf<tword> >& vlisp,rbuf<tsent>& vsent,
  function get_vlisp (line 297) | static void get_vlisp(tsh& sh,rbuf<tword> v,rbuf<rbuf<tword> >& vlisp)
  function rbool (line 303) | static rbool p_mbk_param(tsh& sh,tsent& src,tsent* pfirst,tsent& outopnd,
  function rbool (line 381) | static rbool p_call_n(tsh& sh,tsent& src,tsent* pfirst,tsent& outopnd,
  function rbool (line 444) | static rbool p_ftl(tsh& sh,tsent src,tsent* pfirst,tsent& outopnd,
  function rbool (line 469) | static rbool set_vsent(tsh& sh,tpos pos,rbuf<tsent>& vsent,
  function rbool (line 501) | static rbool p_call(tsh& sh,tsent& src,tsent* pfirst,tsent& outopnd,
  function rbool (line 569) | static rbool p_exp_all(tsh& sh,tfunc& tfi,tenv env)
  function rbool (line 583) | static rbool p_exp(tsh& sh,rbuf<tword>& v,tfunc& tfi,
  function rbool (line 595) | static rbool p_exp(tsh& sh,tsent& src,tfunc& tfi,
  function rbool (line 602) | static rbool p_exp(tsh& sh,tsent src,tsent& dst,tfunc& tfi,
  function set_func (line 934) | static void set_func(tsh& sh,tsent& outopnd,rbuf<tsent>&& vsent,tfunc* p...

FILE: rpp/zfind.h
  function get_func_local_size (line 7) | struct zfind
  function get_func_param_size (line 28) | static int get_func_param_size(const tfunc& tfi)
  function get_func_stack_size (line 37) | static int get_func_stack_size(const tfunc& tfi)
  function get_ceil_space (line 43) | static int get_ceil_space(const tdata& tdi)
  function rbool (line 48) | static rbool is_type_mebx(tsh& sh,const rstr& type)
  function rbool (line 54) | static rbool is_op_pass_type(tsh& sh,const rstr& s)
  function rbool (line 59) | static rbool is_rstr_optr(tsh& sh,const rstr& s)
  function rbool (line 67) | static rbool is_end_part_optr(tsh& sh,const rstr& s)
  function rbool (line 76) | static rbool is_empty_struct_type(tsh& sh,const rstr& s)
  function rbool (line 84) | static rbool is_class(tsh& sh,const rstr& s)
  function rbool (line 89) | static rbool is_class_t(tsh& sh,const rstr& s)
  function rbool (line 94) | static rbool is_classtl(tsh& sh,const rstr& s)
  function tclass (line 99) | static tclass* class_search_t(tsh& sh,const rstr& name)
  function tclass (line 104) | static tclass* class_search(tsh& sh,const rstr& name)
  function tclass (line 111) | static tclass* classtl_search(tsh& sh,const rstr& name)
  function tfunc (line 119) | static tfunc* func_search_empty_param_m(tclass& tci,
  function tfunc (line 132) | static tfunc* func_search_multi_param_m(tclass& tci,
  function tfunc (line 144) | static tfunc* func_search_multi_param_n(tclass& tci,const rstr& fname)
  function tfunc (line 158) | static tfunc* func_search_empty_param_n(tclass& tci,const rstr& fname)
  function tfunc (line 172) | static tfunc* func_search_multi_param_f(tclass& tci,const rstr& fname)
  function tfunc (line 185) | static tfunc* func_search_empty_param_f(tclass& tci,const rstr& fname)
  function tfunc (line 198) | static tfunc* func_search_same(tclass& tci,const rstr& fname,
  function tfunc (line 211) | static tfunc* func_search_dec(tclass& tci,const rstr& func_dec)
  function tfunc (line 219) | static tfunc* func_search(tclass& tci,const rstr& fname)
  function tfunc (line 229) | static tfunc* func_search(tclass& tci,const rstr& fname,
  function tfunc (line 240) | static tfunc* func_search(tclass& tci,const rstr& fname,const rstr& a)
  function tfunc (line 249) | static tfunc* ftl_search(tclass& tci,rstr& name)
  function tfunc (line 257) | static tfunc* destruct_search(tclass& tci)
  function rbool (line 262) | static rbool is_destruct(tsh& sh,tfunc& tfi)
  function tfunc (line 271) | static tfunc* emptystruct_search(tclass& tci)
  function rbool (line 276) | static rbool is_emptystruct(tsh& sh,tfunc& tfi)
  function tfunc (line 285) | static tfunc* copystruct_search(tclass& tci)
  function tdata (line 290) | static tdata* data_member_search(const tclass& tci,const rstr& name)
  function tdata (line 298) | static tdata* local_search(tfunc& tfi,const rstr& name)

FILE: rpp/zftl.h
  type zftl (line 7) | struct zftl
  function rbool (line 84) | static rbool f_type_replace(tsh& sh,rbuf<tword>& v)
  function rbool (line 105) | static rbool f_proc_class(tsh& sh,tclass& tci)
  function rbool (line 119) | static rbool combine_ftl_name(tsh& sh,rbuf<tword>& v,rstr& name)

FILE: rpp/zjit.h
  type zjit (line 8) | struct zjit
  function rbool (line 37) | static rbool func_to_x86(tsh& sh,tfunc& tfi,tenv env)
  function rbool (line 94) | static rbool fix_addr(tsh& sh,tasm& oasm,rbuf<tasm>& vasm)
  function rstr (line 132) | static rstr asm_to_x86(tsh& sh,tasm& item,uchar* start)
  function rstr (line 262) | static rstr p_calle(tsh& sh,tins& ins,uchar* start)
  function rbool (line 282) | static rbool a_asm(tsh& sh,tasm& item)
  function rbool (line 293) | static rbool a_opnd(tsh& sh,tasm& item,int index,const rbuf<rstr>& v,top...
  function tins (line 313) | static tins build_ins(tsh& sh,rstr s1,rstr s2,rstr s3,rstr s4)
  function tins (line 324) | static tins build_ins(tsh& sh,rstr s1,rstr s2,rstr s3,rbuf<rstr> s4)
  function tins (line 335) | static tins build_ins(tsh& sh,rstr s1,rbuf<rstr> s2,rstr s3,rstr s4)
  function init_addr_list (line 361) | static void init_addr_list(tsh& sh)
  function rbool (line 403) | static rbool eval_vstr(rbuf<rstr>& vstr,tenv env)
  function rbool (line 414) | static rbool eval_v(rbuf<tword>& v,tenv env)
  function rbool (line 445) | static rbool eval(uchar* s,tenv env)

FILE: rpp/zjitb.h
  function build_two (line 7) | struct zjitb
  function rstr (line 26) | static rstr build_three(int one,int two,int three)
  function rstr (line 36) | static rstr build_i(const tins& ins,int one)
  function rstr (line 45) | static rstr build_r(const tins& ins,int one)
  function rstr (line 54) | static rstr build_r(const tins& ins,int one,int two)
  function rstr (line 64) | static rstr build_a(const tins& ins,int one,int two)
  function rstr (line 81) | static rstr build_relative(const tins& ins,uchar* start,int one)
  function rstr (line 90) | static rstr build_relative(const tins& ins,uchar* start,int one,int two)
  function rstr (line 100) | static rstr build_ri(const tins& ins,int one)
  function rstr (line 110) | static rstr build_ri(const tins& ins,int one,int two)
  function rstr (line 121) | static rstr build_rr(const tins& ins,int one,int two)
  function rstr (line 132) | static rstr build_ra(const tins& ins,int one,int two)
  function rstr (line 150) | static rstr build_ai(const tins& ins,int one,int two)
  function rstr (line 169) | static rstr build_ar(const tins& ins,int one,int two)
  function rstr (line 187) | static rstr build_ra(const tins& ins,int one,int two,int three)
  function set_addr_bit (line 207) | static void set_addr_bit(int off,uchar* start,int val)
  function set_reg_bit (line 247) | static void set_reg_bit(int off,uchar* start)
  function set_reg_bit_center (line 283) | static void set_reg_bit_center(int off,uchar* start)

FILE: rpp/zjitf.h
  function add8 (line 7) | struct zjitf
  function sub8 (line 20) | static void sub8(int8* a,int8* b)
  function imul8 (line 25) | static void imul8(int8* a,int8* b)
  function idiv8 (line 30) | static void idiv8(int8* a,int8* b)
  function imod8 (line 35) | static void imod8(int8* a,int8* b)
  function rbool (line 40) | static rbool cgsb8(int8* a,int8* b)
  function rbool (line 45) | static rbool clsb8(int8* a,int8* b)
  function fadd8 (line 50) | static void fadd8(double* a,double* b)
  function fsub8 (line 55) | static void fsub8(double* a,double* b)
  function fmul8 (line 60) | static void fmul8(double* a,double* b)
  function fdiv8 (line 65) | static void fdiv8(double* a,double* b)
  function rbool (line 70) | static rbool fcgsb8(double* a,double* b)
  function rbool (line 75) | static rbool fclsb8(double* a,double* b)
  function uint (line 80) | static uint bshl(uint a,uint b)
  function uint (line 85) | static uint bshr(uint a,uint b)
  function bsar (line 90) | static int bsar(int a,int b)
  function _float_to_double (line 95) | static void _float_to_double(float a,double* b)
  function sin (line 101) | static void sin(double a,double* b)
  function cos (line 106) | static void cos(double a,double* b)
  function sqrt (line 111) | static void sqrt(double a,double* b)
  function get_argc (line 116) | static int get_argc()
  function set_main_ret (line 131) | static void set_main_ret(int a)
  function tfunc (line 136) | static tfunc* get_cur_func(uchar* pasm)
  function rset (line 146) | static rset<tclass>* get_vclass()
  function ftell8 (line 152) | static void ftell8(int8* ret,FILE* fp)
  function set_dll_list (line 195) | static void set_dll_list()
  function set_dll_list_one (line 227) | static void set_dll_list_one(tsh& sh,HINSTANCE hModule)

FILE: rpp/zjiti.h
  function elif (line 7) | struct zjiti
  function rstr (line 26) | static rstr b_retn()
  function rstr (line 31) | static rstr b_reti(const tins& ins)
  function rstr (line 44) | static rstr b_push(const tins& ins)
  function rstr (line 61) | static rstr b_pop(const tins& ins)
  function rstr (line 70) | static rstr b_jmp(const tins& ins,uchar* start)
  function rstr (line 87) | static rstr b_jz(const tins& ins,uchar* start)
  function rstr (line 96) | static rstr b_jnz(const tins& ins,uchar* start)
  function rstr (line 105) | static rstr b_nop()
  function rstr (line 110) | static rstr b_lea(const tins& ins)
  function rstr (line 119) | static rstr b_mov(const tins& ins)
  function rstr (line 150) | static rstr b_mov1_cl_addr(const tins& ins)
  function rstr (line 167) | static rstr b_mov1_addr_cl(const tins& ins)
  function rstr (line 184) | static rstr b_add(const tins& ins)
  function rstr (line 215) | static rstr b_sub(const tins& ins)
  function rstr (line 246) | static rstr b_imul(const tins& ins)
  function rstr (line 255) | static rstr b_idiv(const tins& ins)
  function rstr (line 264) | static rstr b_udiv(const tins& ins)
  function rstr (line 273) | static rstr b_cdq()
  function rstr (line 278) | static rstr b_sete_bl()
  function rstr (line 283) | static rstr b_setne_bl()
  function rstr (line 288) | static rstr b_setg_bl()
  function rstr (line 293) | static rstr b_setge_bl()
  function rstr (line 298) | static rstr b_setl_bl()
  function rstr (line 303) | static rstr b_setle_bl()
  function rstr (line 308) | static rstr b_seta_bl()
  function rstr (line 313) | static rstr b_setae_bl()
  function rstr (line 318) | static rstr b_setb_bl()
  function rstr (line 323) | static rstr b_setbe_bl()
  function rstr (line 328) | static rstr b_cmp(const tins& ins)
  function rstr (line 359) | static rstr b_and(const tins& ins)
  function rstr (line 390) | static rstr b_or(const tins& ins)
  function rstr (line 421) | static rstr b_xor(const tins& ins)
  function rstr (line 452) | static rstr b_not(const tins& ins)
  function rstr (line 465) | static rstr b_shl_eax_cl()
  function rstr (line 470) | static rstr b_shr_eax_cl()
  function rstr (line 475) | static rstr b_sar_eax_cl()

FILE: rpp/zlambda.h
  function if (line 8) | struct zlambda
  function rstr (line 124) | static rstr lambda_get(rbuf<tword>& v)
  function lambda_push_type (line 136) | static void lambda_push_type(const rstr& name,tfunc& tfi)
  function lambda_proc (line 145) | static void lambda_proc(tsh& sh,tfunc& tfi)
  function lambda_add_init_asm (line 200) | static void lambda_add_init_asm(tsh& sh,tfunc& tfi)
  function lambda_var_replace (line 222) | static void lambda_var_replace(tsh& sh,tfunc& tfi)
  function rbool (line 249) | static rbool function_replace(tsh& sh,rbuf<tword>& v)

FILE: rpp/zmac.h
  type zmac (line 7) | struct zmac
  function rbool (line 105) | static rbool replace(tsh& sh,tclass& tci,rbuf<tword>& v)
  function rbool (line 121) | static rbool replace_v(tsh& sh,tclass& tci,rbuf<tword>& v)
  function rbool (line 179) | static rbool replace_param(tsh& sh,rbuf<tword>& v,int& i,
  function rbool (line 192) | static rbool replace_param_common(tsh& sh,rbuf<tword>& v,int& i,
  function rbool (line 227) | static rbool replace_w(tword& word,rbuf<rbuf<rstr> >& param,tmac& mitem)

FILE: rpp/zmain.h
  function ifn (line 8) | struct zmain
  function rbool (line 23) | static rbool pack(tsh& sh)
  function rbuf (line 67) | static rbuf<rstr> param_split(rstr s)
  function tick (line 99) | static void tick(int& start)
  function rbool (line 107) | static rbool output_pre(tsh& sh)
  function rbool (line 127) | static rbool compile(tsh& sh,tvm& vm,rstrw name)
  function rpp_main (line 199) | static int rpp_main(tvm& vm,int argc,char** argv)
  function rbool (line 274) | rbool _func_to_x86(tsh& sh,tfunc& tfi,tenv env)
  function _find_symm_sbk (line 279) | int _find_symm_sbk(tsh& sh,const rbuf<tword>& v,int begin)

FILE: rpp/zmatch.h
  type zmatch (line 6) | struct zmatch
  function rbool (line 33) | static rbool is_direct_pass(tsh& sh,tsent& src,rstr& dst)
  function rbool (line 49) | static rbool is_direct_construct_pass_m(tsh& sh,rbuf<tsent>& vsent,
  function tfunc (line 68) | static tfunc* find_direct_construct_pass(tsh& sh,tclass& tci,const rstr&...
  function rbool (line 82) | static rbool is_full_pass(tsh& sh,tsent& src,rstr& dst)
  function rbool (line 107) | static rbool is_full_pass_m(tsh& sh,rbuf<tsent>& vsent,rbuf<tdata>& vparam)
  function tfunc (line 123) | static tfunc* find_full_pass(tsh& sh,tclass& tci,const rstr& fname,
  function rbool (line 136) | static rbool is_temp_var(tsh& sh,tsent& sent)
  function rbool (line 144) | static rbool is_ret_obj(tsh& sh,rbuf<tword>& v)
  function insert_type (line 182) | static void insert_type(tsh& sh,tsent& sent,const rstr& type)
  function tfunc (line 199) | static tfunc* find_replace(tsh& sh,tclass& tci,const rstr& fname,

FILE: rpp/zmemb.h
  type zmemb (line 6) | struct zmemb
  function rbool (line 147) | static rbool enum_add(tsh& sh,tclass& tci,const rbuf<tword>& v)
  function rbool (line 190) | static rbool mac_add(tsh& sh,tclass& tci,rbuf<tword>& v,int i,int& right)
  function rbool (line 282) | static rbool a_data_define(tsh& sh,tdata& item,const rbuf<tword>& vword)
  function rbool (line 350) | static rbool lambda_a_func_define(tsh& sh,tfunc& item,rbuf<tword>& v)
  function ifn (line 509) | ifn(a_data_define(sh,ditem,list[i]))
  function obtain_size_func (line 613) | static void obtain_size_func(tsh& sh,tfunc& tfi)
  function func_tl_part (line 622) | static void func_tl_part(tsh& sh,tfunc& item,rbuf<tword>& v)
  function add_this_func (line 664) | static void add_this_func(tsh& sh,tclass& tci,tfunc& tfi)
  function rbool (line 677) | static rbool default_param_proc(tsh& sh,tfunc& tfi)

FILE: rpp/znasm.h
  type znasm (line 6) | struct znasm
  function rbool (line 76) | static rbool proc_grub(tsh& sh)
  function add_str (line 166) | static void add_str(tsh& sh,rstr& result,rbuf<rstr>& vconst)
  function add_str_one (line 175) | static void add_str_one(rstr& result,int index,const rstr& s)
  function add_lambda (line 185) | static void add_lambda(tsh& sh,rstr& result)
  function add_lambda (line 194) | static void add_lambda(rstr& result,tclass& tci)
  function tfunc (line 206) | static tfunc* call_find(tsh& sh,tasm& item)
  function rstr (line 232) | static rstr symbol_trans(const rstr& s)
  function rstr (line 249) | static rstr get_nasm_symbol(tfunc& tfi)
  function rbool (line 254) | static rbool is_jmp_ins_nasm(const rstr& s)
  function rbool (line 260) | static rbool line_update(tsh& sh,rbuf<tasm>& vasm,rbuf<uchar>& vline)
  function proc_const_str (line 369) | static void proc_const_str(rbuf<rstr>& vstr,rbuf<rstr>& vconst)
  function rbool (line 381) | static rbool have_single_esp(tsh& sh,tasm& item)
  function fix_esp (line 408) | static void fix_esp(tsh& sh,tasm& item)
  function rbool (line 423) | static rbool proc_inline(tsh& sh,rstr& result,tfunc* ptfi,rbool& is_inline)
  function rbool (line 480) | static rbool proc_asm(tsh& sh,tfunc& tfi,tasm& item,
  function rstr (line 732) | static rstr link_vstr(const rbuf<rstr>& v)
  function rstr (line 737) | static rstr get_opnd1(rbuf<rstr>& vstr)
  function rbuf (line 742) | static rbuf<rstr> get_opnd1_v(rbuf<rstr>& vstr)
  function rstr (line 762) | static rstr get_opnd2(rbuf<rstr>& vstr)
  function rbuf (line 767) | static rbuf<rstr> get_opnd2_v(rbuf<rstr>& vstr)
  function count_mbk_l (line 787) | static int count_mbk_l(rbuf<rstr>& vstr)

FILE: rpp/zopt.h
  type zopt (line 7) | struct zopt
  function rbool (line 20) | static rbool op_add_sub(tsh& sh,rbuf<tasm>& vasm)
  function rbool (line 95) | static rbool match(tasm& item,tasm& pick)
  function rbool (line 100) | static rbool replace(const rbuf<tasm>& item,rbuf<tasm>& pick,rbuf<tasm>&...
  function rbool (line 132) | static rbool op_match(tsh& sh,rbuf<tasm>& vasm)

FILE: rpp/zpre.h
  function elif (line 11) | struct zpre
  function rbool (line 65) | static rbool obtain_all_file(tsh& sh)
  function rbool (line 104) | static rbool import_file(tsh& sh,rbuf<rstrw>& vname)
  function rbool (line 115) | static rbool obtain_name(tsh& sh,rbuf<rstrw>& vname,rbuf<tword>& v,tfile...
  function rstrw (line 183) | static rstrw get_abs_name(rstrw path,const rstrw& name)
  function rstrw (line 206) | static rstrw get_abs_path(const rstrw& s)
  function key_replace (line 215) | static void key_replace(tsh& sh,rbuf<tword>& v)
  function rbool (line 244) | static rbool def_replace_one(tsh& sh,rbuf<tword>& v,rset<tmac>& vmac)
  function rbool (line 271) | static rbool def_replace(tsh& sh,rset<tmac>& vdefine,rbuf<tword>& v)
  function rbool (line 289) | static rbool need_arrange(rbuf<tword>& v)
  function arrange (line 301) | static void arrange(rbuf<tword>& src,rbool* pneed=null)
  function rbool (line 336) | static rbool obtain_def(tsh& sh,rset<tmac>& vdefine,rbuf<tword>& v)
  function rbool (line 383) | static rbool ifdef_replace(tsh& sh,rset<tmac>& vdefine,rbuf<tword>& v)
  function combine_double (line 443) | static void combine_double(rbuf<tword>& v)
  function combine_float (line 461) | static void combine_float(rbuf<tword>& v)
  function const_replace (line 489) | static void const_replace(rbuf<tword>& v)
  function const_replace (line 497) | static void const_replace(tword& word)
  function count_tab_line (line 523) | static int count_tab_line(rstr& s)
  function count_tab (line 546) | static void count_tab(tfile& file)
  function rbool (line 556) | static rbool op_const_eval(tsh& sh,rbuf<tword>& v,rbool clear_sbk)

FILE: rpp/zread.h
  type zread (line 9) | struct zread
  function rbool (line 39) | static rbool auto_import(tsh& sh)
  function rstrw (line 54) | static rstrw get_inf_dir(tsh& sh)
  function rbool (line 63) | static rbool read_inf(tsh& sh)
  function rbuf (line 86) | static rbuf<tasm> get_op_vasm(tsh& sh,const rbuf<rstr>& v)
  function rbool (line 117) | static rbool read_match(tsh& sh,const rstrw& name)
  function rbool (line 152) | static rbool read_conf(tsh& sh,const rstrw& name)
  function rbool (line 190) | static rbool read_optr(tsh& sh,const rstrw& name)
  function rbool (line 225) | static rbool read_key(tsh& sh,const rstrw& name)
  function rbool (line 246) | static rbool exist(tsh& sh,const rstrw& name)
  function rbool (line 251) | static rbool read_file_pack(tsh& sh,const rstrw& name)
  function rbool (line 264) | static rbool read_file(tsh& sh,const rstrw& name)
  function rbool (line 389) | static rbool calc(tsh& sh,int first,int second,rstr& theta,int& outopnd)
  function rbool (line 414) | static rbool word_analyse(tsh& sh,rstr& src,rbuf<tword>& result,tfile* p...
  function push_word (line 635) | static void push_word(rbuf<tword>& result,tword word)
  function get_optr_s_len (line 641) | static int get_optr_s_len(tsh& sh,const uchar* s,int len,rstr& stemp)
  function add_rstr (line 656) | static void add_rstr(tsh& sh,rbuf<tword>& result,const tword& word)
  function rbool (line 675) | static rbool is_const_str(tsh& sh,const rstr& s)
  function rbool (line 682) | static rbool is_const_str(tsh& sh,rbuf<tword>& v,int begin,int end)
  function rbool (line 690) | static rbool file_exist(const rstrw& name)
  function rstr (line 701) | static rstr get_file_data(const rstrw& name)
  function rstr (line 716) | static rstr get_file_data(tsh& sh,const rstrw& name)

FILE: rpp/zsent.h
  function ifn (line 9) | struct zsent
  function add_class (line 138) | static void add_class(tsh& sh,tfunc& tfi,tenv env)
  function add_main_init_asm (line 165) | static void add_main_init_asm(tsh& sh,tfunc& tfi)
  function add_main_quote (line 201) | static void add_main_quote(tsh& sh,tfunc& tfi)
  function rbool (line 227) | static rbool asm_const_eval(tsh& sh,tfunc& tfi)
  function obtain_local_off (line 240) | static void obtain_local_off(tsh& sh,rbuf<tdata>& local)
  function obtain_param_off (line 251) | static void obtain_param_off(tfunc& tfi)
  function rbool (line 264) | static rbool proc_type_infer(tsh& sh,tfunc& tfi,tenv env)
  function rbool (line 273) | static rbool proc_type_infer(tsh& sh,tsent& sent,tfunc& tfi,tenv env)
  function rbool (line 313) | static rbool replace_temp_var_v(tsh& sh,tfunc& tfi,rbuf<tword>& v,int& tid)
  function rbool (line 371) | static rbool replace_temp_var(tsh& sh,tfunc& tfi,int& tid)

FILE: rpp/zsrep.h
  type zsrep (line 8) | struct zsrep
  function fpoint_replace (line 64) | static void fpoint_replace(tsh& sh,tfunc& tfi)
  function fpoint_replace (line 70) | static void fpoint_replace(tsh& sh,tclass& tci,rbuf<tword>& v)
  function const_replace (line 131) | static void const_replace(tsh& sh,rbuf<tsent>& vsent)
  function const_replace (line 141) | static void const_replace(tsh& sh,rbuf<tword>& v)
  function neg_replace (line 178) | static void neg_replace(tsh& sh,rbuf<tsent>& vsent)
  function neg_replace (line 186) | static void neg_replace(tsh& sh,rbuf<tword>& v)
  function rbool (line 211) | static rbool size_off_to_zero(tsh& sh,tfunc& tfi)
  function rbool (line 222) | static rbool size_off_to_zero(tsh& sh,rbuf<tword>& v)
  function rbool (line 258) | static rbool size_off_replace(tsh& sh,tfunc& tfi)
  function rbool (line 269) | static rbool size_off_replace(tsh& sh,rbuf<tword>& v,tfunc& tfi)
  function rbool (line 339) | static rbool local_var_replace(tsh& sh,tfunc& tfi)
  function rbool (line 351) | static rbool local_var_replace(tsh& sh,rbuf<tword>& v,tfunc& tfi)
  function rbool (line 387) | static rbool var_struct_replace(tsh& sh,tfunc& tfi)
  function rbool (line 402) | static rbool var_struct_replace(tsh& sh,rbuf<tword>& v,tfunc& tfi)

FILE: rpp/zsuper.h
  function if (line 7) | struct zsuper
  function rbool (line 70) | static rbool match_here(tsh& sh,const rbuf<rstr>& reg,
  function rbool (line 121) | static rbool match_multi(tsh& sh,const rbuf<rstr>& reg,
  function rbool (line 141) | static rbool replace_super_word(tword& word,rbuf<rstr>& vstr,rbuf<tword>...
  function rstr (line 178) | static rstr del_quote(rstr s)
  function rstr (line 187) | static rstr add_quote(const rstr& s)
  function link_sharp (line 202) | static void link_sharp(rbuf<rstr>& v)
  function rbool (line 213) | static rbool link_sharp_one(rbuf<rstr>& v)
Condensed preview — 336 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,537K chars).
[
  {
    "path": "bin/build.bat",
    "chars": 42,
    "preview": "@echo off\r\nrpp.exe example\\run.h %1 -build"
  },
  {
    "path": "bin/build_run.bat",
    "chars": 52,
    "preview": "@echo off\r\nrem cd /d %~dp0\r\nrpp.exe example\\run.h %1"
  },
  {
    "path": "bin/check_all.bat",
    "chars": 20,
    "preview": "rjit example\\check.h"
  },
  {
    "path": "bin/compile_speed.bat",
    "chars": 34,
    "preview": "rpp example\\compile_speed.h\r\npause"
  },
  {
    "path": "bin/example/11_4.h",
    "chars": 168,
    "preview": "\r\nvoid main()\r\n{\r\n\tputsl(XC_SY_DEFAULT)\t\r\n\tputsl(test())\r\n\tputsl(test2())\r\n}\r\n\r\nmac test() 123\r\n\r\nmac test2()\r\n{\r\n\t234\r"
  },
  {
    "path": "bin/example/11_5.h",
    "chars": 383,
    "preview": "\r\nvoid main()\r\n{\r\n\tB 1 2\r\n\tC 1 [2 *3]\r\n\tC 1 [2*3*4]\r\n\tD 1 [2 3]\r\n\t\r\n\tv=array<int>[7,8,9]\r\n\tv.join('').printl\r\n\t\r\n\tv=E(1"
  },
  {
    "path": "bin/example/11_6.h",
    "chars": 274,
    "preview": "\r\nvoid main()\r\n{\t\r\n\t==> 2 3 <==\r\n\t\r\n\t┏━━━━━┓\r\n\t┃ 1     2  ┃\r\n\t┃ 3     4  ┃  \r\n\t┗━━━━━┛\t\r\n}\r\n\r\nmac$ ==> _word _word <==\r"
  },
  {
    "path": "bin/example/11_7.h",
    "chars": 295,
    "preview": "/*\r\n对比宏和模板函数\r\n注意宏是无格式的,因此花括号和分号不可省略\r\n*/\r\n\r\nvoid main()\r\n{\r\n\tputsl fb<int>(1,2)\r\n\tputsl fb<double>(0.5,0.6)\r\n\r\n\tputsl fa"
  },
  {
    "path": "bin/example/17_1.h",
    "chars": 67,
    "preview": "/*\r\n闭包\r\n*/\r\n\r\nvoid main()\r\n{\r\n\tint a=2\r\n\tvoid[lambda(){puts a}]\r\n}"
  },
  {
    "path": "bin/example/17_2.h",
    "chars": 165,
    "preview": "/*\r\n匿名函数\r\n*/\r\n\r\nvoid main()\r\n{\r\n\tp=lambda(int a,int b){\r\n\t\tputsl a+b\r\n\t}\r\n\t\r\n\tvoid[p,1,2]\r\n\t\r\n\tp=lambda(int,int a,int b"
  },
  {
    "path": "bin/example/22_2.h",
    "chars": 216,
    "preview": "main\r\n{\r\n\tstdcall[\"MessageBoxA\",0,\"abc\",\"123\",0]\r\n\tstdcall[\"MessageBoxW\",0,utf16c(\"abc\"),utf16c(\"123\"),0]\r\n\t@MessageBox"
  },
  {
    "path": "bin/example/28.h",
    "chars": 111,
    "preview": "/*\r\n全局变量定义的时候不能使用类型推断\r\n*/\r\n\r\n\r\nint g_a=2\r\nrbuf<char> g_b(3)\r\n\r\nmain\r\n{\r\n\tputsl g_a\r\n\tb=g_b\r\n\tb.count.printl\r\n}"
  },
  {
    "path": "bin/example/34_2.h",
    "chars": 300,
    "preview": "//嵌套类和嵌套命名空间\r\n\r\nnamespace A\r\n{\r\n}\r\n\r\nclass A.B\r\n{\r\n\tint m_b\r\n\t\r\n\tA.B()\r\n\t{\r\n\t\tputsl('constructor')\r\n\t}\r\n\r\n\tstatic void "
  },
  {
    "path": "bin/example/36_6.h",
    "chars": 138,
    "preview": "import rdic.h\r\n\r\nmain\r\n{\r\n\trdic<int> a\r\n\ta['abc']=3\r\n\ta['121213']=4\r\n\ta['1']=1\r\n\tfor i=1 to 1000\r\n\t\ta[i.torstr]=i\r\n\ta['"
  },
  {
    "path": "bin/example/36_7.h",
    "chars": 146,
    "preview": "/*\r\nread self\r\n*/\r\n\r\nimport \"rfile.h\"\r\n\r\nmain\r\n{\r\n\trfile file(\"example/36_7.h\")\r\n\tfile.read_all.sub(3).print\r\n\t//auto c"
  },
  {
    "path": "bin/example/42.h",
    "chars": 248,
    "preview": "/*\r\nRPP不支持重载小括号,\r\n但是可以重载中括号实现C++的函数对象(仿函数)\r\n*/\r\n\r\nvoid main()\r\n{\r\n\tA<int,int> a=lambda(int,int n){return n*n}\r\n\tputs a["
  },
  {
    "path": "bin/example/44.h",
    "chars": 617,
    "preview": "/*\r\n惰性求值的方式实现短路求值\r\nRPP是同时支持call_by_name和call_by_need和call_by_value的语言\r\n该示例只能以JIT模式运行\r\n*/\r\n\r\nimport eval.h\r\n\r\nvoid main("
  },
  {
    "path": "bin/example/50.h",
    "chars": 649,
    "preview": "\r\nmain\r\n{\r\n\ttest1\r\n\ttest2\r\n\ttest3\r\n\ttest4\r\n\ttest5\r\n\ttest6\r\n}\r\n\r\n//浮点测试\r\ntest1\r\n{\r\n\tputsl 0.2+0.3\r\n\tputsl 0.2*0.3\r\n\tputs"
  },
  {
    "path": "bin/example/51.h",
    "chars": 852,
    "preview": "/*\r\n仅用位运算实现加减乘除,面试专用\r\n*/\r\n\r\nmain\r\n{\r\n\tfadd(1,2).printl\r\n\tfadd(19,29999).printl\r\n\r\n\tfsub(-1,3).printl\r\n\tfsub(19,2345).pr"
  },
  {
    "path": "bin/example/52.h",
    "chars": 473,
    "preview": "/*\r\n全排列的非递归实现,支持去掉重复\r\n*/\r\n\r\nvoid main()\r\n{\r\n\trbuf<int> v\r\n\t#v.push(1,2,3,4)\r\n\tfor\r\n\t\tv.join('').printl\r\n\t\tifn next_perm"
  },
  {
    "path": "bin/example/53.h",
    "chars": 533,
    "preview": "/*\r\nKMP算法\r\n*/\r\n\r\nvoid main()\r\n{\r\n\tputsl(find('abc123','c1'))\r\n\tputsl(find('abc123','c2'))\r\n}\r\n\r\nint find(rstr s,rstr p)"
  },
  {
    "path": "bin/example/54.h",
    "chars": 911,
    "preview": "/*\r\n50行代码实现正则引擎,参考《代码之美》,可以轻松解决95%的正则问题\r\n\r\nc 匹配任意的字母c \r\n.(句点) 匹配任意的单个字符 \r\n^ 匹配输入字符串的开头 \r\n$ 匹配输入字符串的结尾 \r\n* 匹配前一个字符的零个或者多"
  },
  {
    "path": "bin/example/55.h",
    "chars": 933,
    "preview": "/*\r\n栈排序与栈颠倒\r\n*/\r\n\r\nvoid main()\r\n{\r\n\trbuf<int> stack\r\n\t#stack.push(3,4,1,9,10,2)\r\n\tprint(stack)\r\n\tfunc(stack)\r\n\tprint(st"
  },
  {
    "path": "bin/example/56.h",
    "chars": 310,
    "preview": "/*\r\n组合遍历\r\n*/\r\n\r\nmain\r\n{\r\n\tn=7\r\n\tsum=0\r\n\tfor i=0;i<n;i++\r\n\t\tfor j=i+1;j<n;j++\r\n\t\t\tfor k=j+1;k<n;k++\r\n\t\t\t\tsum++\r\n\tputsl(s"
  },
  {
    "path": "bin/example/57.h",
    "chars": 159,
    "preview": "/*\r\n4个线程并行计算1个数组的5个元素\r\n*/\r\n\r\nvoid main()\r\n{\r\n\tv=array<int>[1,2,3,4,5]\r\n\tv.join(' ').printl\r\n\tv.parallel(4,lambda(int& a"
  },
  {
    "path": "bin/example/answer/1.txt",
    "chars": 1,
    "preview": "3"
  },
  {
    "path": "bin/example/answer/10_1.txt",
    "chars": 18,
    "preview": "553628800553628800"
  },
  {
    "path": "bin/example/answer/10_2.txt",
    "chars": 3,
    "preview": "259"
  },
  {
    "path": "bin/example/answer/10_3.txt",
    "chars": 15,
    "preview": "1\r\nrp<char>\r\n47"
  },
  {
    "path": "bin/example/answer/11_1.txt",
    "chars": 19,
    "preview": "9\r\n5\r\n55\r\n3628800\r\n"
  },
  {
    "path": "bin/example/answer/11_2.txt",
    "chars": 15,
    "preview": "1\r\nabc\r\n98\r\n3\r\n"
  },
  {
    "path": "bin/example/answer/11_3.txt",
    "chars": 23,
    "preview": "1\r\nabc\r\n2\r\n5\r\n20\r\n100\r\n"
  },
  {
    "path": "bin/example/answer/11_4.txt",
    "chars": 13,
    "preview": "6\r\n123\r\n234\r\n"
  },
  {
    "path": "bin/example/answer/11_5.txt",
    "chars": 30,
    "preview": "12\r\n7\r\n25\r\n6\r\n789\r\n123\r\n1234\r\n"
  },
  {
    "path": "bin/example/answer/11_6.txt",
    "chars": 16,
    "preview": "23\r\n1--2--3--4\r\n"
  },
  {
    "path": "bin/example/answer/11_7.txt",
    "chars": 26,
    "preview": "3\r\n1.100000\r\n3\r\n1.100000\r\n"
  },
  {
    "path": "bin/example/answer/12.txt",
    "chars": 12,
    "preview": "3\r\n3\r\n3\r\n3\r\n"
  },
  {
    "path": "bin/example/answer/13.txt",
    "chars": 5,
    "preview": "33333"
  },
  {
    "path": "bin/example/answer/14_1.txt",
    "chars": 42,
    "preview": "123\r\n123\r\n2\r\n3\r\n99\r\n98\r\ntest\r\nmain\r\nC\r\n5\r\n"
  },
  {
    "path": "bin/example/answer/17_1.txt",
    "chars": 1,
    "preview": "2"
  },
  {
    "path": "bin/example/answer/17_2.txt",
    "chars": 6,
    "preview": "3\r\n3\r\n"
  },
  {
    "path": "bin/example/answer/18_1.txt",
    "chars": 2,
    "preview": "12"
  },
  {
    "path": "bin/example/answer/18_2.txt",
    "chars": 2,
    "preview": "12"
  },
  {
    "path": "bin/example/answer/19_1.txt",
    "chars": 19,
    "preview": "3\r\n6\r\n103\r\n10\r\n16\r\n"
  },
  {
    "path": "bin/example/answer/19_2.txt",
    "chars": 6,
    "preview": "3\r\n5\r\n"
  },
  {
    "path": "bin/example/answer/2.txt",
    "chars": 1,
    "preview": "3"
  },
  {
    "path": "bin/example/answer/20.txt",
    "chars": 2,
    "preview": "43"
  },
  {
    "path": "bin/example/answer/21_1.txt",
    "chars": 2,
    "preview": "02"
  },
  {
    "path": "bin/example/answer/21_2.txt",
    "chars": 100,
    "preview": "2222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222"
  },
  {
    "path": "bin/example/answer/22_1.txt",
    "chars": 19,
    "preview": "3\r\n3\r\n0\r\n1\r\n-1\r\n3\r\n"
  },
  {
    "path": "bin/example/answer/23_1.txt",
    "chars": 38,
    "preview": "uint\r\nuint\r\nuint\r\nrstr\r\nint\r\n97\r\n255\r\n"
  },
  {
    "path": "bin/example/answer/23_2.txt",
    "chars": 1,
    "preview": "2"
  },
  {
    "path": "bin/example/answer/23_3.txt",
    "chars": 13,
    "preview": "int\r\nint\r\n0\r\n"
  },
  {
    "path": "bin/example/answer/24.txt",
    "chars": 6,
    "preview": "411c12"
  },
  {
    "path": "bin/example/answer/25_1.txt",
    "chars": 25,
    "preview": "0000011111222223333344444"
  },
  {
    "path": "bin/example/answer/25_2.txt",
    "chars": 60,
    "preview": "000011112222000011112222000011112222000011112222000011112222"
  },
  {
    "path": "bin/example/answer/25_3.txt",
    "chars": 60,
    "preview": "000011112222000011112222000011112222000011112222000011112222"
  },
  {
    "path": "bin/example/answer/26_1.txt",
    "chars": 21,
    "preview": "func int\r\nfunc char\r\n"
  },
  {
    "path": "bin/example/answer/26_2.txt",
    "chars": 2,
    "preview": "22"
  },
  {
    "path": "bin/example/answer/27.txt",
    "chars": 7,
    "preview": "2253344"
  },
  {
    "path": "bin/example/answer/28.txt",
    "chars": 6,
    "preview": "2\r\n3\r\n"
  },
  {
    "path": "bin/example/answer/29.txt",
    "chars": 2,
    "preview": "23"
  },
  {
    "path": "bin/example/answer/3.txt",
    "chars": 1,
    "preview": "3"
  },
  {
    "path": "bin/example/answer/30_1.txt",
    "chars": 13,
    "preview": "i>=10\r\n1\r\n0\r\n"
  },
  {
    "path": "bin/example/answer/30_2.txt",
    "chars": 1,
    "preview": "3"
  },
  {
    "path": "bin/example/answer/31.txt",
    "chars": 84,
    "preview": "123\r\n123\r\nabc'123\r\nabc'123\r\n97\r\n97\r\n97\r\n100000000\r\n100000000\r\n10\r\n10\r\n10\r\n0.500000\r\n"
  },
  {
    "path": "bin/example/answer/32_1.txt",
    "chars": 120,
    "preview": "pass 1\r\npass 1\r\npass 1\r\npass 1\r\npass 1\r\npass 2\r\nother\r\npass 2\r\npass 2\r\npass 2\r\nother\r\nother\r\ndefault\r\ndefault\r\ndefault\r\n"
  },
  {
    "path": "bin/example/answer/32_2.txt",
    "chars": 36,
    "preview": "123456789123456789123456789123456789"
  },
  {
    "path": "bin/example/answer/32_3.txt",
    "chars": 40,
    "preview": "a less than b\r\na less than b\r\n0123456789"
  },
  {
    "path": "bin/example/answer/33_1.txt",
    "chars": 2,
    "preview": "23"
  },
  {
    "path": "bin/example/answer/33_2.txt",
    "chars": 2,
    "preview": "34"
  },
  {
    "path": "bin/example/answer/34_1.txt",
    "chars": 4,
    "preview": "2224"
  },
  {
    "path": "bin/example/answer/34_2.txt",
    "chars": 41,
    "preview": "constructor\r\nconstructor\r\n3\r\nfunc\r\nfunc\r\n"
  },
  {
    "path": "bin/example/answer/35.txt",
    "chars": 9,
    "preview": "3\r\n2\r\n1\r\n"
  },
  {
    "path": "bin/example/answer/36_1.txt",
    "chars": 18,
    "preview": "3\r\n2\r\n4\r\n3\r\n2\r\n4\r\n"
  },
  {
    "path": "bin/example/answer/36_10.txt",
    "chars": 14,
    "preview": "protected code"
  },
  {
    "path": "bin/example/answer/36_2.txt",
    "chars": 23,
    "preview": "1\r\n2\r\n3\r\n1\r\n3\r\n\r\n1\r\n3\r\n"
  },
  {
    "path": "bin/example/answer/36_3.txt",
    "chars": 3,
    "preview": "4\r\n"
  },
  {
    "path": "bin/example/answer/36_4.txt",
    "chars": 57,
    "preview": "321\r\n1343\r\nfj242i\r\n12\r\n\r\n12\r\n1343\r\n321\r\nfj242i\r\n\r\n12\r\n2\r\n"
  },
  {
    "path": "bin/example/answer/36_5.txt",
    "chars": 11,
    "preview": "3\r\n6\r\n123\r\n"
  },
  {
    "path": "bin/example/answer/36_6.txt",
    "chars": 3,
    "preview": "4\r\n"
  },
  {
    "path": "bin/example/answer/36_7.txt",
    "chars": 156,
    "preview": "/*\r\r\nread self\r\r\n*/\r\r\n\r\r\nimport \"rfile.h\"\r\r\n\r\r\nmain\r\r\n{\r\r\n\trfile file(\"example/36_7.h\")\r\r\n\tfile.read_all.sub(3).print\r\r\n"
  },
  {
    "path": "bin/example/answer/42.txt",
    "chars": 1,
    "preview": "9"
  },
  {
    "path": "bin/example/answer/44.txt",
    "chars": 34,
    "preview": "or\r\ntrue\r\ntrue\r\n1\r\n1\r\n0\r\n1\r\n0\r\n0\r\n"
  },
  {
    "path": "bin/example/answer/4_1.txt",
    "chars": 1,
    "preview": "3"
  },
  {
    "path": "bin/example/answer/4_2.txt",
    "chars": 12,
    "preview": "3\r\n3\r\n0\r\n4\r\n"
  },
  {
    "path": "bin/example/answer/50.txt",
    "chars": 124,
    "preview": "0.500000\r\n0.060000\r\n0.666667\r\n-0.100000\r\n1\r\n0\r\n1984.000000\r\n-2\r\n0\r\n0\r\n0\r\n1\r\n0\r\n1\r\n1\r\n1\r\n0\r\n3\r\n27\r\n0\r\n6\r\n0\r\n1\r\nok\r\n3\r\n15\r"
  },
  {
    "path": "bin/example/answer/51.txt",
    "chars": 47,
    "preview": "3\r\n30018\r\n-4\r\n-2326\r\n9702\r\n-6815\r\n1\r\n3\r\n-3\r\n2\r\n"
  },
  {
    "path": "bin/example/answer/52.txt",
    "chars": 144,
    "preview": "1234\r\n1243\r\n1324\r\n1342\r\n1423\r\n1432\r\n2134\r\n2143\r\n2314\r\n2341\r\n2413\r\n2431\r\n3124\r\n3142\r\n3214\r\n3241\r\n3412\r\n3421\r\n4123\r\n4132\r\n"
  },
  {
    "path": "bin/example/answer/53.txt",
    "chars": 7,
    "preview": "2\r\n-1\r\n"
  },
  {
    "path": "bin/example/answer/54.txt",
    "chars": 6,
    "preview": "1\r\n1\r\n"
  },
  {
    "path": "bin/example/answer/55.txt",
    "chars": 84,
    "preview": "3\r\n4\r\n1\r\n9\r\n10\r\n2\r\n\r\n1\r\n2\r\n3\r\n4\r\n9\r\n10\r\n\r\n10\r\n9\r\n4\r\n3\r\n2\r\n1\r\n\r\n1\r\n2\r\n3\r\n4\r\n9\r\n10\r\n\r\n"
  },
  {
    "path": "bin/example/answer/56.txt",
    "chars": 18,
    "preview": "35\r\n120\r\n720\r\n35\r\n"
  },
  {
    "path": "bin/example/answer/57.txt",
    "chars": 24,
    "preview": "1 2 3 4 5\r\n3 6 9 12 15\r\n"
  },
  {
    "path": "bin/example/answer/5_1.txt",
    "chars": 6,
    "preview": "454545"
  },
  {
    "path": "bin/example/answer/5_2.txt",
    "chars": 13,
    "preview": "true232323233"
  },
  {
    "path": "bin/example/answer/6.txt",
    "chars": 22,
    "preview": "1abc\r\n123abc\r\n123abc\r\n"
  },
  {
    "path": "bin/example/answer/7.txt",
    "chars": 8,
    "preview": "-2-2-222"
  },
  {
    "path": "bin/example/answer/8.txt",
    "chars": 16,
    "preview": "3eax is not zero"
  },
  {
    "path": "bin/example/answer/9.txt",
    "chars": 16,
    "preview": "cab132\r\n123abc\r\n"
  },
  {
    "path": "bin/example/asm_opt.h",
    "chars": 4339,
    "preview": "/*\r\n汇编优化工具\r\n使汇编代码更具可读性,并提高汇编速度\r\n优化15000行大约需要30秒\r\n*/\r\n\r\nimport rfile.h\r\n\r\nmain\r\n{\r\n\t//name=getsl\r\n\tname='http.asm'\r\n\ts=r"
  },
  {
    "path": "bin/example/bf.h",
    "chars": 848,
    "preview": "/*\r\nBF解释器增强版,支持32位运算\r\n这个语言并不像看上去那么简单,下面是一个BF版的Hello World:\r\n++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.\r\n>+.+++++++."
  },
  {
    "path": "bin/example/check.h",
    "chars": 3677,
    "preview": "/*\r\n分别以解释方式和编译方式运行example下所有例子,\r\n并与标准答案进行对比,以此来检验编译器的正确性。\r\n*/\r\n\r\nimport rdir.h\r\nimport rfile.h\r\n\r\nint g_sta_ok\r\nint g_t"
  },
  {
    "path": "bin/example/code.h",
    "chars": 385,
    "preview": "/*\r\n检查当前目录下文本文件的编码类型\r\n*/\r\n\r\nimport \"rdir.h\"\r\n\r\nmain\r\n{\r\n\tv=rdir.get_file_bfs('./')\r\n\tfor i in v\r\n\t{\r\n\t\tif v[i].get_top="
  },
  {
    "path": "bin/example/compile_speed.h",
    "chars": 305,
    "preview": "//1.h amd 3.45GHZ cost time 3600ms ,new version 2800ms 1.89 2609ms fix2 2516ms 2094ms\r\n//36_2.h cost time 5375ms (1.83 "
  },
  {
    "path": "bin/example/count.h",
    "chars": 543,
    "preview": "/*\r\n统计当前目录下代码行数\r\n如果使用utf16统计更准确\r\n*/\r\n\r\nimport rdir.h\r\nimport rfile.h\r\n\r\nint g_sum=0\r\n\r\ncount_line(rstr name)\r\n{\r\n\ts=rfi"
  },
  {
    "path": "bin/example/find.h",
    "chars": 387,
    "preview": "/*\r\n文件搜索工具\r\n*/\r\n\r\nimport rfile.h\r\nimport rdir.h\r\n\r\nvoid main()\r\n{\r\n\tdir=\\\\./\r\n\tarr=array<rstr>['cpp','h']\r\n\tstr='s_ret'"
  },
  {
    "path": "bin/example/line_check.h",
    "chars": 1406,
    "preview": "/*\r\n检查代码每行是否超过92字符\r\nrpp -jit example\\line_check.h ../rpp/\r\n*/\r\n\r\nimport rdir.h\r\nimport rfile.h\r\n\r\nbool check_line(rstrw"
  },
  {
    "path": "bin/example/lisp.h",
    "chars": 1054,
    "preview": "/*\r\n60行RPP实现的lisp解释器\r\n未处理lambda、上下文等,有待完善\r\n*/\r\n\r\nvoid main()\r\n{\r\n\tfor\r\n\t\tputsl(eval(getsl))\r\n}\r\n\r\nrstr eval(rstr s)\r\n{\r"
  },
  {
    "path": "bin/example/run.h",
    "chars": 966,
    "preview": "/*\r\n编译生成exe并运行\r\n*/\r\n\r\nimport rfile.h\r\nimport rdir.h\r\n\r\nmain\r\n{\r\n\tv=rf.get_param\r\n\tif v.count<3\r\n\t\tputsl('invaild param'"
  },
  {
    "path": "bin/example/snake.h",
    "chars": 1725,
    "preview": "/*\r\n彩色版控制台贪食蛇\r\n该游戏只能以解释模式或JIT模式运行\r\n*/\r\n\r\nint g_std_out\r\nrbuf<int> g_arr\r\nint g_next\r\nint g_food\r\n\r\nvoid main()\r\n{\r\nbegi"
  },
  {
    "path": "bin/example/time.h",
    "chars": 80,
    "preview": "main\r\n{\r\n\ts=getsl\r\n\tstart=rf.tick\r\n\trf.cmd(s)\r\n\tputsl\r\n\tputsl(rf.tick-start)\r\n}"
  },
  {
    "path": "bin/gl/1.h",
    "chars": 314,
    "preview": "/*\r\n下面是编译期计算示例,sum是一个宏,计算从0加到N\r\n*/\r\n\r\nimport rpp.h\r\n\r\nvoid main()\r\n{\r\n\tputsl sum(100)//输出5050\r\n\tputsl sum(10)//输出55\r\n}\r"
  },
  {
    "path": "bin/gl/2.h",
    "chars": 428,
    "preview": "/*\r\nRPP的macro具有和Lisp宏一样强大的表达能力\r\n这种宏可以用写代码对代码进行变换,这就比C语言的宏强大得多\r\n下面是变参宏示例\r\n注意macro只能是全局的\r\n*/\r\n\r\nimport rpp.h\r\n\r\nvoid main"
  },
  {
    "path": "bin/gl/3.h",
    "chars": 432,
    "preview": "/*\r\n可以发挥想象力定制奇特的宏,\r\n比如宏可以引用整个函数的单词并进行替换,\r\n也可以定制自己的控制结构\r\n*/\r\n\r\nimport rpp.h\r\n\r\nvoid main()\r\n{\r\n\t5 times putsl('hello');\r"
  },
  {
    "path": "bin/gl/frame.h",
    "chars": 3156,
    "preview": "\r\nimport carray.h\r\n\r\ndefine M3DVector3f carray<float,3>\r\ndefine M3DVector4f carray<float,4>\r\ndefine M3DMatrix44f carray"
  },
  {
    "path": "bin/gl/gl.h",
    "chars": 2899,
    "preview": "\r\nvoid init_glut()\r\n{\r\n\tv=rf.get_param\r\n\tnum=v.count\r\n\trbuf<char*> argv\r\n\tfor i=0;i<v.count;i++\r\n\t\targv.push(v[i].cstr)"
  },
  {
    "path": "bin/gl/line.h",
    "chars": 1858,
    "preview": "/*\r\nRPP for OpenGL\r\n使用上下左右旋转,代码摘自《OpenGL超级宝典》\r\n该例子只能以JIT模式运行,并且需要最新的显卡驱动\r\n运行命令:rjit gl\\line.h\r\n*/\r\n\r\nimport math.h\r\nimp"
  },
  {
    "path": "bin/gl/sphere.h",
    "chars": 3676,
    "preview": "/*\r\nRPP for OpenGL\r\n使用上下左右移动,代码摘自《OpenGL超级宝典》\r\n该例子只能以JIT模式运行,并且需要最新的显卡驱动\r\n运行命令:rjit gl\\sphere.h\r\n*/\r\n\r\nimport math.h\r\ni"
  },
  {
    "path": "bin/ide/License.txt",
    "chars": 868,
    "preview": "License for Scintilla and SciTE\n\nCopyright 1998-2003 by Neil Hodgson <neilh@scintilla.org>\n\nAll Rights Reserved \n\nPermis"
  },
  {
    "path": "bin/ide/SciTE.properties",
    "chars": 516,
    "preview": "# SciTE.properties is the per directory local options file and can be used to\r\n# override settings made in SciTEGlobal.p"
  },
  {
    "path": "bin/ide/SciTEGlobal.properties",
    "chars": 15530,
    "preview": "# Global initialisation file for SciTE\r\n# For Linux, place in $prefix/share/scite\r\n# For Windows, place in same director"
  },
  {
    "path": "bin/ide/asm.properties",
    "chars": 19035,
    "preview": "# Define SciTE settings for Assembler files (NASM)\r\n# Originally by Black Horus blackhorus@gmx.net 2002\r\n# Updated by Ke"
  },
  {
    "path": "bin/ide/cpp.properties",
    "chars": 20085,
    "preview": "# Define SciTE settings for C++, C, C#, Ch, Java, IDL, JavaScript, Flash (ActionScript 2) files.\r\n\r\n# sma files are Smal"
  },
  {
    "path": "bin/ide/lisp.properties",
    "chars": 5009,
    "preview": "# Define SciTE settings for lisp and Scheme files.\r\n\r\nfile.patterns.lisp=*.lsp;*.lisp\r\n\r\nfilter.lisp=LISP (lsp lisp)|$(f"
  },
  {
    "path": "bin/ide/luaCOPYRIGHT",
    "chars": 1528,
    "preview": "Lua License\n-----------\n\nLua is licensed under the terms of the MIT license reproduced below.\nThis means that Lua is fre"
  },
  {
    "path": "bin/ide/modules.api",
    "chars": 1160,
    "preview": "rbool\r\nuchar\r\nushort\r\nshort\r\ntrue\r\nfalse\r\nnull\r\nelif\r\nelse\r\nif\r\nifn\r\nwhile\r\nfor\r\ndefault\r\nnamespace\r\nfriend\r\nclass\r\ngoto"
  },
  {
    "path": "bin/ide/python.properties",
    "chars": 3321,
    "preview": "# Define SciTE settings for Python files.\r\n\r\nfile.patterns.py=*.py;*.pyw\r\nfile.patterns.scons=SConstruct;SConscript\r\n\r\ns"
  },
  {
    "path": "bin/ide/scite.1",
    "chars": 561,
    "preview": ".TH SCITE 1 \"2001 February 26\"\n.SH NAME\nSciTE \\- a programmers text editor\n.SH SYNOPSIS\n.br\n.B SciTE\n[file ..]\n.SH DESCR"
  },
  {
    "path": "bin/launch_ide.bat",
    "chars": 19,
    "preview": "start ide\\SciTE.exe"
  },
  {
    "path": "bin/line_check.bat",
    "chars": 196,
    "preview": "rpp -jit example\\line_check.h ../rpp/\r\nrpp -jit example\\line_check.h ../rlib/\r\nrpp -jit example\\line_check.h rsrc/\r\nrpp "
  },
  {
    "path": "bin/nasm/bin.bat",
    "chars": 47,
    "preview": "@echo off\r\nrem cd /d %~dp0\r\n..\\rpp.exe bin.h %1"
  },
  {
    "path": "bin/nasm/bin.h",
    "chars": 322,
    "preview": "\r\nimport rfile.h\r\n\r\nmain\r\n{\r\n\tv=rf.get_param\r\n\tif v.count<3\r\n\t\tputsl('invaild param')\r\n\t\treturn\r\n\ta=v[2]\r\n\tif rf.cmd('."
  },
  {
    "path": "bin/nasm/cell.h",
    "chars": 867,
    "preview": "/*\r\n裸机运行细胞自动机(生命游戏)\r\n*/\r\n\r\nimport rbufm.h\r\n\r\nmain\r\n{\r\n\trbufm<char> arr(25,80)\r\n\tchar* p=4194304\r\n\tfor i=0 to 24\r\n\t\tfor "
  },
  {
    "path": "bin/nasm/dec.inc",
    "chars": 894,
    "preview": "IMPORT GetCommandLineA\r\nIMPORT GetTickCount\r\nIMPORT Sleep\r\nIMPORT InitializeCriticalSection\r\nIMPORT DeleteCriticalSectio"
  },
  {
    "path": "bin/nasm/menu.lst",
    "chars": 125,
    "preview": "\r\ncolor black/cyan yellow/cyan\r\ntimeout 0\r\ndefault /default\r\n\r\ntitle rpp\r\nroot (hd0,0)\r\nkernel (hd0,0)/cell.bin\r\nboot\r\n\r"
  },
  {
    "path": "bin/nasm/windemos.inc",
    "chars": 115673,
    "preview": "%ifndef __NASMX_DEMOS_INC__\r\n%define __NASMX_DEMOS_INC__\r\n\r\n;// nasmx.inc should always be the first file included.\r\n;//"
  },
  {
    "path": "bin/open_cmd.bat",
    "chars": 7,
    "preview": "cmd.exe"
  },
  {
    "path": "bin/rcheck.bat",
    "chars": 55,
    "preview": "@echo off\r\ncd /d %~dp0\r\nrpp.exe example\\run.h %1 -check"
  },
  {
    "path": "bin/rinf/conf.txt",
    "chars": 368,
    "preview": "c_export_rbin,\r\n1\r\nc_export_rasm,\r\n0\r\nc_export_rp,\r\n1\r\nc_display_inf,\r\n0\r\nc_warning,\r\n0\r\nc_auto_addinit,\r\n1\r\nc_auto_addf"
  },
  {
    "path": "bin/rinf/key.txt",
    "chars": 945,
    "preview": "rjit\r\n\r\ncalle\r\ncall\r\nretn\r\nreti\r\n\r\npush\r\npop\r\n\r\njmp\r\njebxz\r\njebxnz\r\n\r\nhalt\r\nnop\r\n\r\nlea\r\nmov\r\nmov1\r\nmov8\r\n\r\nadd\r\nsub\r\nimu"
  },
  {
    "path": "bin/rinf/match.txt",
    "chars": 515,
    "preview": "sub esp , 4 \n\r\npush @n\r\npush [ @@ + @n ]\r\ncall [ & , int , \"<=(int,int)\" ]\r\nmov ebx , [ esp ]\r\nadd esp , 4\r\n\r\nclesb [ @1"
  },
  {
    "path": "bin/rjit.bat",
    "chars": 49,
    "preview": "@echo off\r\nrem cd /d %~dp0\r\n%~dp0\\rpp.exe -jit %1"
  },
  {
    "path": "bin/rjit_win.bat",
    "chars": 43,
    "preview": "@echo off\r\ncd /d %~dp0\r\nrpp_win.exe -jit %1"
  },
  {
    "path": "bin/rpack.bat",
    "chars": 40,
    "preview": "@echo off\r\ncd /d %~dp0\r\nrpp.exe -pack %1"
  },
  {
    "path": "bin/rpack_win.bat",
    "chars": 44,
    "preview": "@echo off\r\ncd /d %~dp0\r\nrpp_win.exe -pack %1"
  },
  {
    "path": "bin/rsrc/carray.h",
    "chars": 386,
    "preview": "\r\nclass carray<T,N>\r\n{\r\n\tT m_buf[N]\r\n\t\r\n\tcarray<T,N>()\r\n\t{\r\n\t}\r\n\t\r\n\tcarray<T,N>(carray<T,N>& v)\r\n\t{\r\n\t\tthis=v\r\n\t}\r\n\r\n\tT"
  },
  {
    "path": "bin/rsrc/eval.h",
    "chars": 1275,
    "preview": "\r\nimport rpp.h\r\n\r\nbool evalue(rstr s)\r\n{\r\n\treturn eval(s,get_up_func,get_up_ebp)\r\n}\r\n\r\nbool eval(rstr s,tfunc* ptfi=nul"
  },
  {
    "path": "bin/rsrc/int8_n.h",
    "chars": 4828,
    "preview": "\r\nclass int8\r\n{\r\n\trd8 m_in;\r\n\r\n\t~int8()\r\n\t{\r\n\t}\r\n\r\n\tint8()\r\n\t{\r\n\t}\r\n\r\n\tfriend int8 operator*(int8 a,int8 b)\r\n\t{\r\n\t\tmov "
  },
  {
    "path": "bin/rsrc/math.h",
    "chars": 385,
    "preview": "\r\nnamespace math\r\n{\r\n\tdouble sin(double a)\r\n\t{\r\n\t\tp=&s_ret\r\n\t\tpush p\r\n\t\tpush [ebp+(s_off a+4)]\r\n\t\tpush a\r\n\t\tcalle \"sin\""
  },
  {
    "path": "bin/rsrc/rcc.h",
    "chars": 10305,
    "preview": "class xpoint\r\n{\r\n\tdouble x\r\n\tdouble y\r\n}\r\n\r\nnamespace cc\r\n{\r\n\tenum\r\n\t{\r\n\t\tc_cc_set_effect_volume=1000,\r\n\t\tc_cc_set_musi"
  },
  {
    "path": "bin/rsrc/rdic.h",
    "chars": 611,
    "preview": "import 'rset.h'\r\n\r\ntemplate<typename T>\r\nstruct rdic_i\r\n{\r\n\tT val;\r\n\trstr key;\r\n\r\n\tfriend rbool operator<(const rdic_i<"
  },
  {
    "path": "bin/rsrc/rstr.h",
    "chars": 5165,
    "preview": "class rstr\r\n{\r\npublic:\r\n\trbuf<char> m_buf;\r\n\r\n\t~rstr()\r\n\t{\r\n\t}\r\n\r\n\trstr()\r\n\t{\r\n\t}\r\n\r\n\trstr(const char* p)\r\n\t{\r\n\t\tset(p)"
  },
  {
    "path": "bin/rsrc/rstrw.h",
    "chars": 3779,
    "preview": "\r\n#include \"rstr.h\"\r\n\r\nstruct rstrw\r\n{\r\n\trbuf<ushort> m_buf;\r\n\r\n\t~rstrw()\r\n\t{\r\n\t}\r\n\r\n\trstrw()\r\n\t{\r\n\t}\r\n\r\n\trstrw(const u"
  },
  {
    "path": "bin/rsrc/short.h",
    "chars": 919,
    "preview": "class short\r\n{\r\n\trd2 m_in\r\n\r\n\t~short()\r\n\t{\r\n\t}\r\n\r\n\tshort()\r\n\t{\r\n\t}\r\n\r\n\tshort(short& a)\r\n\t{\r\n\t\tmov esi,this\r\n\t\tmov edi,a"
  },
  {
    "path": "bin/rsrc/varf.h",
    "chars": 3533,
    "preview": "\r\nnamespace varf\r\n{\r\n\tvoid* new()\r\n\t{\r\n\t\tsub esp,4\r\n\t\tcalle c_new\r\n\t\tmov s_ret,[esp]\r\n\t\tadd esp,4\r\n\t}\r\n\t\r\n\tvoid* new_co"
  },
  {
    "path": "bin/run.bat",
    "chars": 46,
    "preview": "@echo off\r\n%~dp0\\rpp.exe example\\run.h %1 -del"
  },
  {
    "path": "del.bat",
    "chars": 1241,
    "preview": "\r\ndel /F /Q .\\bin\\*.ilk\r\ndel /F /Q .\\bin\\*.pdb\r\n\r\ndel /F /Q .\\*.ncb\r\nattrib -R -S -A -H .\\*.suo\r\ndel /F /Q .\\*.suo\r\ndel "
  },
  {
    "path": "proj/rpp.sln",
    "chars": 1224,
    "preview": "\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2012\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-"
  },
  {
    "path": "proj/rpp.vcxproj",
    "chars": 11100,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.micros"
  },
  {
    "path": "proj/rpp.vcxproj.filters",
    "chars": 5280,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
  },
  {
    "path": "proj/rpp_win/rpp_win.sln",
    "chars": 878,
    "preview": "\r\nMicrosoft Visual Studio Solution File, Format Version 12.00\r\n# Visual Studio 2012\r\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-"
  },
  {
    "path": "proj/rpp_win/rpp_win.vcxproj",
    "chars": 4579,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.micros"
  },
  {
    "path": "proj/rpp_win/rpp_win.vcxproj.filters",
    "chars": 927,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
  },
  {
    "path": "rlib/gbk.txt",
    "chars": 715205,
    "preview": "uchar g_unicode[65536*2]={0,0,1,0,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0,11,0,12,0,13,0,14,0,15,0,16,0,17,0,18,0,19,0,20,0"
  },
  {
    "path": "rlib/ralgo.h",
    "chars": 4877,
    "preview": "#ifndef ralgo_h__\r\n#define ralgo_h__\r\n\r\n#include \"rbuf.h\"\r\n#include <new>\r\n\r\ntemplate<class T>\r\nT* r_new(int count=1)\r\n"
  },
  {
    "path": "rlib/rbase.h",
    "chars": 1895,
    "preview": "#ifndef rbase_h__\r\n#define rbase_h__\r\n\r\n#ifdef _MSC_VER\r\n\r\n//#define _CRT_SECURE_NO_DEPRECATE\r\n//#pragma warning(disabl"
  },
  {
    "path": "rlib/rbuf.h",
    "chars": 8606,
    "preview": "#ifndef rbuf_h__\r\n#define rbuf_h__\r\n\r\n#include \"rbase.h\"\r\n#include <stdio.h>\r\n#include <string.h>\r\n\r\n//#define r_round("
  },
  {
    "path": "rlib/rclass.h",
    "chars": 715,
    "preview": "#ifndef rclass_h__\r\n#define rclass_h__\r\n\r\n#include \"rbuf.h\"\r\n#include \"rf.h\"\r\n#ifdef _MSC_VER\r\n#include <string>\r\n#prag"
  },
  {
    "path": "rlib/rcode.h",
    "chars": 7182,
    "preview": "#ifndef rcode_h__\r\n#define rcode_h__\r\n\r\n#include \"rf.h\"\r\n#include \"rclass.h\"\r\n\r\nstruct rcode\r\n{\r\n\tstatic rstr gbk_to_ut"
  },
  {
    "path": "rlib/rdb.h",
    "chars": 4643,
    "preview": "#ifndef rdb_h__\r\n#define rdb_h__\r\n\r\n#include \"rfile.h\"\r\n\r\n#define rdbint rdb<int,int>\r\n\r\n//TL是数据长度,TA是地址\r\ntemplate<clas"
  },
  {
    "path": "rlib/rdic.h",
    "chars": 1223,
    "preview": "#ifndef rdic_h__\r\n#define rdic_h__\r\n\r\n#include \"rset.h\"\r\n\r\ntemplate<typename T>\r\nstruct rdic_i\r\n{\r\n\tT val;//val必须前置\r\n\tr"
  },
  {
    "path": "rlib/rdir.h",
    "chars": 3566,
    "preview": "#ifndef rdir_h__\r\n#define rdir_h__\r\n\r\n#include \"rfile.h\"\r\n#include \"rf.h\"\r\n#include \"rstrw.h\"\r\n#include \"rlist.h\"\r\n\r\n#i"
  },
  {
    "path": "rlib/rf.h",
    "chars": 2459,
    "preview": "#ifndef rf_h__\r\n#define rf_h__\r\n\r\n#include \"rstr.h\"\r\n#include <stdio.h>\r\n#include <math.h>\r\n#include <stdarg.h>\r\n#ifdef"
  },
  {
    "path": "rlib/rfile.h",
    "chars": 6638,
    "preview": "#ifndef rfile_h__\r\n#define rfile_h__\r\n\r\n#include \"rbuf.h\"\r\n#include \"rstr.h\"\r\n#include \"rf.h\"\r\n#include \"rcode.h\"\r\n#inc"
  },
  {
    "path": "rlib/rhash.h",
    "chars": 3006,
    "preview": "#ifndef rhash_h__\r\n#define rhash_h__\r\n\r\n#include \"rstr.h\"\r\n\r\ntemplate<typename T>\r\nstruct rhash_i\r\n{\r\n\tT val;\r\n\trstr na"
  },
  {
    "path": "rlib/rindex.h",
    "chars": 1593,
    "preview": "#ifndef rindex_h__\r\n#define rindex_h__\r\n\r\n#include \"rlib/rdb.h\"\r\n#include \"rlib/rdir.h\"\r\n\r\nstruct rindex\r\n{\r\n\tstatic vo"
  },
  {
    "path": "rlib/rlist.h",
    "chars": 2948,
    "preview": "#ifndef rlist_h__\r\n#define rlist_h__\r\n\r\n#include \"rbase.h\"\r\n\r\ntemplate<typename T>\r\nstruct rlist_i\r\n{\r\n\tT val;\r\n\trlist_"
  },
  {
    "path": "rlib/rmutex.h",
    "chars": 830,
    "preview": "#ifndef rmutex_h__\r\n#define rmutex_h__\r\n\r\n#ifdef _MSC_VER\r\n#include <windows.h>\r\n#else\r\n#include <semaphore.h>\r\n#endif\r"
  },
  {
    "path": "rlib/rset.h",
    "chars": 8099,
    "preview": "#ifndef rset_h__\r\n#define rset_h__\r\n\r\n#include \"rbase.h\"\r\n\r\ntemplate<typename T>\r\nstruct rset_i\r\n{\r\n\tT key;\r\n\trset_i* f"
  },
  {
    "path": "rlib/rsock.h",
    "chars": 6705,
    "preview": "#ifndef rsock_h__\r\n#define rsock_h__\r\n\r\n#ifdef _MSC_VER\r\n#include <winsock2.h>\r\n#include <windows.h>\r\ntypedef UINT_PTR "
  },
  {
    "path": "rlib/rstr.h",
    "chars": 7615,
    "preview": "#ifndef rstr_h__\r\n#define rstr_h__\r\n\r\n#include \"rbuf.h\"\r\n#include \"ralgo.h\"\r\n#ifdef _MSC_VER\r\n#include <conio.h>\r\n#else"
  },
  {
    "path": "rlib/rstrw.h",
    "chars": 4591,
    "preview": "#ifndef rstrw_h__\r\n#define rstrw_h__\r\n\r\n#include \"rstr.h\"\r\n#include \"rcode.h\"\r\n\r\nstruct rstrw\r\n{\r\n\trbuf<ushort> m_buf;\r"
  },
  {
    "path": "rlib/rthread.h",
    "chars": 1016,
    "preview": "#ifndef rthread_h__\r\n#define rthread_h__\r\n\r\n#include \"rbase.h\"\r\ntypedef void (* rthread_start)(void*);\r\n#ifdef _MSC_VER"
  },
  {
    "path": "rpp/rpp.cpp",
    "chars": 118,
    "preview": "#include \"zmain.h\"\r\n\r\nint main(int argc, char* argv[])\r\n{\r\n\tstatic tvm vm;\r\n\treturn zmain::rpp_main(vm,argc,argv);\r\n}"
  },
  {
    "path": "rpp/rpp_def.h",
    "chars": 3129,
    "preview": "#ifndef rpp_def_h__\r\n#define rpp_def_h__\r\n\r\n//#define RANALYSE\r\n#define c_rpp_deep 150\r\n#define c_point_size 4\r\n\r\n#defi"
  },
  {
    "path": "rpp/rpp_win.cpp",
    "chars": 720,
    "preview": "#include \"zmain.h\"\r\n\r\n//#define RPP_SHOW_CONSOLE\r\n\r\nint WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,\r\n\t\t"
  },
  {
    "path": "rpp/talloc.h",
    "chars": 1265,
    "preview": "#ifndef talloc_h__\r\n#define talloc_h__\r\n\r\n#include \"../rlib/rstr.h\"\r\n\r\nstruct talloc_i\r\n{\r\n\tuchar* start;\r\n\tint commit_"
  },
  {
    "path": "rpp/tanalyse.h",
    "chars": 1010,
    "preview": "#ifndef tanalyse_h__\r\n#define tanalyse_h__\r\n\r\n#ifdef RANALYSE\r\nstruct tanalyse_item\r\n{\r\n\trstr name;\r\n\tint8 count;\r\n\r\n\tf"
  },
  {
    "path": "rpp/tconf.h",
    "chars": 4961,
    "preview": "#ifndef tconf_h__\r\n#define tconf_h__\r\n\r\n#include \"../rlib/rstr.h\"\r\n#include \"../rlib/ralgo.h\"\r\n#include \"../rlib/rdic.h"
  },
  {
    "path": "rpp/tsh.h",
    "chars": 11181,
    "preview": "#ifndef tsh_h__\r\n#define tsh_h__\r\n\r\n#include \"tconf.h\"\r\n#include \"../rlib/rstrw.h\"\r\n#include \"rpp_def.h\"\r\n#include \"tst"
  },
  {
    "path": "rpp/tstruct.h",
    "chars": 7565,
    "preview": "#ifndef tstruct_h__\r\n#define tstruct_h__\r\n\r\n#include \"../rlib/rstr.h\"\r\n#include \"../rlib/rf.h\"\r\n#include \"../rlib/rcode"
  },
  {
    "path": "rpp/tvm.h",
    "chars": 35794,
    "preview": "#ifndef tvm_h__\r\n#define tvm_h__\r\n\r\n#include \"zjit.h\"\r\n#include \"../rlib/rthread.h\"\r\n#include \"../rlib/rsock.h\"\r\n#inclu"
  },
  {
    "path": "rpp/tvm_struct.h",
    "chars": 7710,
    "preview": "#ifndef tvm_struct_h__\r\n#define tvm_struct_h__\r\n\r\n#include \"../rlib/rstr.h\"\r\n#include \"rpp_def.h\"\r\n\r\n#pragma pack(4)\r\n\r"
  },
  {
    "path": "rpp/zadd.h",
    "chars": 3950,
    "preview": "#ifndef zadd_h__\r\n#define zadd_h__\r\n\r\n#include \"zcontrol.h\"\r\n\r\n//增加局部变量和成员变量构造及析构\r\nstruct zadd\r\n{\r\n\tstatic void add_loc"
  },
  {
    "path": "rpp/zasm.h",
    "chars": 21590,
    "preview": "#ifndef zasm_h__\r\n#define zasm_h__\r\n\r\n#include \"zopt.h\"\r\n\r\n//生成汇编代码\r\n//tfunc.vsent->vasm\r\n//返回指针或引用或int的表达式需要放入ebx中\r\n//"
  },
  {
    "path": "rpp/zautof.h",
    "chars": 4741,
    "preview": "#ifndef zautof_h__\r\n#define zautof_h__\r\n\r\n#include \"zfind.h\"\r\n\r\n//自动增加类成员函数\r\nstruct zautof\r\n{\r\n\tstatic rbool auto_add_f"
  },
  {
    "path": "rpp/zbin.h",
    "chars": 9467,
    "preview": "#ifndef zbin_h__\r\n#define zbin_h__\r\n\r\n#include \"zasm.h\"\r\n#include \"zsent.h\"\r\n#include \"zfind.h\"\r\n\r\n//生成二进制代码类\r\nstruct z"
  },
  {
    "path": "rpp/zclass.h",
    "chars": 8970,
    "preview": "#ifndef zclass_h__\r\n#define zclass_h__\r\n\r\n#include \"tsh.h\"\r\n#include \"zpre.h\"\r\n#include \"zfind.h\"\r\n\r\n//提取所有类\r\n//m_file."
  },
  {
    "path": "rpp/zcontrol.h",
    "chars": 19089,
    "preview": "#ifndef zcontrol_h__\r\n#define zcontrol_h__\r\n\r\n#include \"tsh.h\"\r\n#include \"zctl.h\"\r\n#include \"zclass.h\"\r\n\r\n//替换控制结构并生成语句"
  }
]

// ... and 136 more files (download for full content)

About this extraction

This page contains the full source code of the roundsheep/rpp GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 336 files (1.3 MB), approximately 765.7k tokens, and a symbol index with 947 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!