#include "defines.h"
#include "varmacro.h"
#ifdef OLDGCCVARMACRO
#define keydef(name ,one,key... ) keys one, ##key = name
#define keylabeldef(name ,one,key... ) keys one, ##key = name
#else
#define keydef(name ,... ) keys  __VA_ARGS__ = name
#define keylabeldef(name ,... ) keys  __VA_ARGS__ = name
#endif
#undef PD24 
#define _WIN32 1
#define PDCURSES 1


#ifdef PDCURSES
#ifndef PD24
keylabeldef(down,27,194)
keylabeldef(up,27,195)
keylabeldef(left,27,196)
keylabeldef(right,27,197)
keylabeldef(pgup,27,19)
keylabeldef(pgdn,27,18)
keylabeldef(end,27,38)
keylabeldef(home,27,198)
keylabeldef(stab,27,31)
keylabeldef(delete,27,10)
keydef(moveshow,27,201)
keydef(dosave,27,202)
keydef(setselect,27,212)
keydef(repeat,27,182)
keydef(nextsearch,27,203)
keydef(beginfile,27,215)
keydef(endfile,27,216)
keydef(beginpage,27,209)
keydef(endpage,27,210)
keydef(middlepage,27,219)
keydef(scrollup,27,208)
keydef(edscholldown,124)
keydef(scrollitem,27,177)
keydef(scrollbackitem,27,178)
keydef(scrollbyte,123)
keydef(scrollbackbyte,125)
keydef(prevmark,27,31)
keydef(prevmode,27,207)
keydef(nextmode,27,208)
keydef(uplevel,27,179)
keydef(downlevel,58,58)
keydef(addprev,27,217)
keydef(addnext,27,218)
keydef(prevfile,27,205)
keydef(nextfile,27,206)
keydef(listfiles,27,87)
keydef(playrecord,27,204)
#endif
#else
keydef(prevmark,27,91,90)
keydef(nextchar,key_next)
keydef(backchar,key_prev)
keydef(linedown,key_down)
keydef(nextmenuitem,menukey,key_down)
keydef(lineup,key_up)
keydef(prevmenuitem,menukey,key_up)
//keydef(firstmenuitem,menukey,key_home)
keydef(nextmenu,menukey,key_next)
keydef(prevmenu,menukey,key_prev)
#ifdef __FreeBSD__
keylabeldef(backspace,127 )
keydef(nextsearch,27,91,49,51,126)
keydef(dosave,27,91,49,50,126)
keylabeldef(end,27,91,56,126)
keylabeldef(home,27,91,55,126)
keydef(beginfile,27,91,50,53,126)
keydef(endfile,27,91,50,54,126)
keydef(middlepage,27,91,51,49,126)
keydef(addprev,27,91,50,56,126)
keydef(addnext,27,91,50,57,126)
keydef(playrecord,27,91,49,52,126  )
#else
#ifdef _WIN32
keylabeldef(home,27,91,49,126 )
keylabeldef(end,27,91,52,126 )

keydef(beginfile ,27,91,50,53,126 )
keydef(endfile ,27,91,50,54,126 )
keydef(middlepage ,27,91,51,49,126 )
keydef(scrollup ,27,92 )
keydef(edscholldown ,27,124 )

keydef(scrollbyte ,27,123 )
keydef(scrollbackbyte ,27,125 )
keydef(scrollitem ,27,91,27,91 )
keydef(scrollbackitem ,27,93 )
keydef(uplevel ,27,59 )
keydef(downlevel ,27,58 )
keydef(addprev ,27,91,50,56,126 )
keydef(addnext ,27,91,50,57,126 )
#endif
#endif
#endif
//s/keydef(]*\)=[ 	]*\(.*\)/keydef(\2,\1),[ 	]*\([^)
//s/\([0-9][0-9]*\)[ 	][ 	]*\([0-9][0-9]*\)/\1,\2/g
