summary refs log tree commit diff stats
path: root/lib/wrappers/pdcurses.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/wrappers/pdcurses.nim')
-rw-r--r--lib/wrappers/pdcurses.nim1401
1 files changed, 708 insertions, 693 deletions
diff --git a/lib/wrappers/pdcurses.nim b/lib/wrappers/pdcurses.nim
index bed69648a..74993c515 100644
--- a/lib/wrappers/pdcurses.nim
+++ b/lib/wrappers/pdcurses.nim
@@ -1,3 +1,12 @@
+#
+#
+#            Nim's Runtime Library
+#        (c) Copyright 2015 Andreas Rumpf
+#
+#    See the file "copying.txt", included in this
+#    distribution, for details about the copyright.
+#
+
 {.deadCodeElim: on.}
 
 discard """
@@ -32,7 +41,7 @@ pdcwin.h:
 
 when defined(windows):
   import windows
-  
+
   const
     pdcursesdll = "pdcurses.dll"
     unixOS = false
@@ -47,13 +56,13 @@ type
   cunsignedchar = char
   cunsignedlong = uint32
 
-const 
+const
   BUILD* = 3401
-  PDCURSES* = 1               # PDCurses-only routines 
-  XOPEN* = 1                  # X/Open Curses routines 
-  SYSVcurses* = 1             # System V Curses routines 
-  BSDcurses* = 1              # BSD Curses routines 
-  CHTYPE_LONG* = 1            # size of chtype; long 
+  PDCURSES* = 1               # PDCurses-only routines
+  XOPEN* = 1                  # X/Open Curses routines
+  SYSVcurses* = 1             # System V Curses routines
+  BSDcurses* = 1              # BSD Curses routines
+  CHTYPE_LONG* = 1            # size of chtype; long
   ERR* = (- 1)
   OK* = 0
   BUTTON_RELEASED* = 0x00000000
@@ -61,10 +70,10 @@ const
   BUTTON_CLICKED* = 0x00000002
   BUTTON_DOUBLE_CLICKED* = 0x00000003
   BUTTON_TRIPLE_CLICKED* = 0x00000004
-  BUTTON_MOVED* = 0x00000005  # PDCurses 
-  WHEEL_SCROLLED* = 0x00000006 # PDCurses 
-  BUTTON_ACTION_MASK* = 0x00000007 # PDCurses 
-  BUTTON_MODIFIER_MASK* = 0x00000038 # PDCurses 
+  BUTTON_MOVED* = 0x00000005  # PDCurses
+  WHEEL_SCROLLED* = 0x00000006 # PDCurses
+  BUTTON_ACTION_MASK* = 0x00000007 # PDCurses
+  BUTTON_MODIFIER_MASK* = 0x00000038 # PDCurses
   MOUSE_MOVED* = 0x00000008
   MOUSE_POSITION* = 0x00000010
   MOUSE_WHEEL_UP* = 0x00000020
@@ -74,19 +83,19 @@ const
   BUTTON1_CLICKED* = 0x00000004
   BUTTON1_DOUBLE_CLICKED* = 0x00000008
   BUTTON1_TRIPLE_CLICKED* = 0x00000010
-  BUTTON1_MOVED* = 0x00000010 # PDCurses 
+  BUTTON1_MOVED* = 0x00000010 # PDCurses
   BUTTON2_RELEASED* = 0x00000020
   BUTTON2_PRESSED* = 0x00000040
   BUTTON2_CLICKED* = 0x00000080
   BUTTON2_DOUBLE_CLICKED* = 0x00000100
   BUTTON2_TRIPLE_CLICKED* = 0x00000200
-  BUTTON2_MOVED* = 0x00000200 # PDCurses 
+  BUTTON2_MOVED* = 0x00000200 # PDCurses
   BUTTON3_RELEASED* = 0x00000400
   BUTTON3_PRESSED* = 0x00000800
   BUTTON3_CLICKED* = 0x00001000
   BUTTON3_DOUBLE_CLICKED* = 0x00002000
   BUTTON3_TRIPLE_CLICKED* = 0x00004000
-  BUTTON3_MOVED* = 0x00004000 # PDCurses 
+  BUTTON3_MOVED* = 0x00004000 # PDCurses
   BUTTON4_RELEASED* = 0x00008000
   BUTTON4_PRESSED* = 0x00010000
   BUTTON4_CLICKED* = 0x00020000
@@ -97,10 +106,10 @@ const
   BUTTON5_CLICKED* = 0x00400000
   BUTTON5_DOUBLE_CLICKED* = 0x00800000
   BUTTON5_TRIPLE_CLICKED* = 0x01000000
-  MOUSE_WHEEL_SCROLL* = 0x02000000 # PDCurses 
-  BUTTON_MODIFIER_SHIFT* = 0x04000000 # PDCurses 
-  BUTTON_MODIFIER_CONTROL* = 0x08000000 # PDCurses 
-  BUTTON_MODIFIER_ALT* = 0x10000000 # PDCurses 
+  MOUSE_WHEEL_SCROLL* = 0x02000000 # PDCurses
+  BUTTON_MODIFIER_SHIFT* = 0x04000000 # PDCurses
+  BUTTON_MODIFIER_CONTROL* = 0x08000000 # PDCurses
+  BUTTON_MODIFIER_ALT* = 0x10000000 # PDCurses
   ALL_MOUSE_EVENTS* = 0x1FFFFFFF
   REPORT_MOUSE_POSITION* = 0x20000000
   A_NORMAL* = 0
@@ -119,11 +128,11 @@ const
   A_PROTECT* = (A_UNDERLINE or A_LEFTLINE or A_RIGHTLINE)
   ATTR_SHIFT* = 19
   COLOR_SHIFT* = 24
-  A_STANDOUT* = (A_REVERSE or A_BOLD) # X/Open 
+  A_STANDOUT* = (A_REVERSE or A_BOLD) # X/Open
   A_DIM* = A_NORMAL
-  CHR_MSK* = A_CHARTEXT       # Obsolete 
-  ATR_MSK* = A_ATTRIBUTES     # Obsolete 
-  ATR_NRM* = A_NORMAL         # Obsolete 
+  CHR_MSK* = A_CHARTEXT       # Obsolete
+  ATR_MSK* = A_ATTRIBUTES     # Obsolete
+  ATR_NRM* = A_NORMAL         # Obsolete
   WA_ALTCHARSET* = A_ALTCHARSET
   WA_BLINK* = A_BLINK
   WA_BOLD* = A_BOLD
@@ -147,93 +156,93 @@ const
   COLOR_MAGENTA* = (COLOR_RED or COLOR_BLUE)
   COLOR_YELLOW* = (COLOR_RED or COLOR_GREEN)
   COLOR_WHITE* = 7
-  KEY_CODE_YES* = 0x00000100  # If get_wch() gives a key code 
-  KEY_BREAK* = 0x00000101     # Not on PC KBD 
-  KEY_DOWN* = 0x00000102      # Down arrow key 
-  KEY_UP* = 0x00000103        # Up arrow key 
-  KEY_LEFT* = 0x00000104      # Left arrow key 
-  KEY_RIGHT* = 0x00000105     # Right arrow key 
-  KEY_HOME* = 0x00000106      # home key 
-  KEY_BACKSPACE* = 0x00000107 # not on pc 
-  KEY_F0* = 0x00000108        # function keys; 64 reserved 
-  KEY_DL* = 0x00000148        # delete line 
-  KEY_IL* = 0x00000149        # insert line 
-  KEY_DC* = 0x0000014A        # delete character 
-  KEY_IC* = 0x0000014B        # insert char or enter ins mode 
-  KEY_EIC* = 0x0000014C       # exit insert char mode 
-  KEY_CLEAR* = 0x0000014D     # clear screen 
-  KEY_EOS* = 0x0000014E       # clear to end of screen 
-  KEY_EOL* = 0x0000014F       # clear to end of line 
-  KEY_SF* = 0x00000150        # scroll 1 line forward 
-  KEY_SR* = 0x00000151        # scroll 1 line back (reverse) 
-  KEY_NPAGE* = 0x00000152     # next page 
-  KEY_PPAGE* = 0x00000153     # previous page 
-  KEY_STAB* = 0x00000154      # set tab 
-  KEY_CTAB* = 0x00000155      # clear tab 
-  KEY_CATAB* = 0x00000156     # clear all tabs 
-  KEY_ENTER* = 0x00000157     # enter or send (unreliable) 
-  KEY_SRESET* = 0x00000158    # soft/reset (partial/unreliable) 
-  KEY_RESET* = 0x00000159     # reset/hard reset (unreliable) 
-  KEY_PRINT* = 0x0000015A     # print/copy 
-  KEY_LL* = 0x0000015B        # home down/bottom (lower left) 
-  KEY_ABORT* = 0x0000015C     # abort/terminate key (any) 
-  KEY_SHELP* = 0x0000015D     # short help 
-  KEY_LHELP* = 0x0000015E     # long help 
-  KEY_BTAB* = 0x0000015F      # Back tab key 
-  KEY_BEG* = 0x00000160       # beg(inning) key 
-  KEY_CANCEL* = 0x00000161    # cancel key 
-  KEY_CLOSE* = 0x00000162     # close key 
-  KEY_COMMAND* = 0x00000163   # cmd (command) key 
-  KEY_COPY* = 0x00000164      # copy key 
-  KEY_CREATE* = 0x00000165    # create key 
-  KEY_END* = 0x00000166       # end key 
-  KEY_EXIT* = 0x00000167      # exit key 
-  KEY_FIND* = 0x00000168      # find key 
-  KEY_HELP* = 0x00000169      # help key 
-  KEY_MARK* = 0x0000016A      # mark key 
-  KEY_MESSAGE* = 0x0000016B   # message key 
-  KEY_MOVE* = 0x0000016C      # move key 
-  KEY_NEXT* = 0x0000016D      # next object key 
-  KEY_OPEN* = 0x0000016E      # open key 
-  KEY_OPTIONS* = 0x0000016F   # options key 
-  KEY_PREVIOUS* = 0x00000170  # previous object key 
-  KEY_REDO* = 0x00000171      # redo key 
-  KEY_REFERENCE* = 0x00000172 # ref(erence) key 
-  KEY_REFRESH* = 0x00000173   # refresh key 
-  KEY_REPLACE* = 0x00000174   # replace key 
-  KEY_RESTART* = 0x00000175   # restart key 
-  KEY_RESUME* = 0x00000176    # resume key 
-  KEY_SAVE* = 0x00000177      # save key 
-  KEY_SBEG* = 0x00000178      # shifted beginning key 
-  KEY_SCANCEL* = 0x00000179   # shifted cancel key 
-  KEY_SCOMMAND* = 0x0000017A  # shifted command key 
-  KEY_SCOPY* = 0x0000017B     # shifted copy key 
-  KEY_SCREATE* = 0x0000017C   # shifted create key 
-  KEY_SDC* = 0x0000017D       # shifted delete char key 
-  KEY_SDL* = 0x0000017E       # shifted delete line key 
-  KEY_SELECT* = 0x0000017F    # select key 
-  KEY_SEND* = 0x00000180      # shifted end key 
-  KEY_SEOL* = 0x00000181      # shifted clear line key 
-  KEY_SEXIT* = 0x00000182     # shifted exit key 
-  KEY_SFIND* = 0x00000183     # shifted find key 
-  KEY_SHOME* = 0x00000184     # shifted home key 
-  KEY_SIC* = 0x00000185       # shifted input key 
-  KEY_SLEFT* = 0x00000187     # shifted left arrow key 
-  KEY_SMESSAGE* = 0x00000188  # shifted message key 
-  KEY_SMOVE* = 0x00000189     # shifted move key 
-  KEY_SNEXT* = 0x0000018A     # shifted next key 
-  KEY_SOPTIONS* = 0x0000018B  # shifted options key 
-  KEY_SPREVIOUS* = 0x0000018C # shifted prev key 
-  KEY_SPRINT* = 0x0000018D    # shifted print key 
-  KEY_SREDO* = 0x0000018E     # shifted redo key 
-  KEY_SREPLACE* = 0x0000018F  # shifted replace key 
-  KEY_SRIGHT* = 0x00000190    # shifted right arrow 
-  KEY_SRSUME* = 0x00000191    # shifted resume key 
-  KEY_SSAVE* = 0x00000192     # shifted save key 
-  KEY_SSUSPEND* = 0x00000193  # shifted suspend key 
-  KEY_SUNDO* = 0x00000194     # shifted undo key 
-  KEY_SUSPEND* = 0x00000195   # suspend key 
-  KEY_UNDO* = 0x00000196      # undo key 
+  KEY_CODE_YES* = 0x00000100  # If get_wch() gives a key code
+  KEY_BREAK* = 0x00000101     # Not on PC KBD
+  KEY_DOWN* = 0x00000102      # Down arrow key
+  KEY_UP* = 0x00000103        # Up arrow key
+  KEY_LEFT* = 0x00000104      # Left arrow key
+  KEY_RIGHT* = 0x00000105     # Right arrow key
+  KEY_HOME* = 0x00000106      # home key
+  KEY_BACKSPACE* = 0x00000107 # not on pc
+  KEY_F0* = 0x00000108        # function keys; 64 reserved
+  KEY_DL* = 0x00000148        # delete line
+  KEY_IL* = 0x00000149        # insert line
+  KEY_DC* = 0x0000014A        # delete character
+  KEY_IC* = 0x0000014B        # insert char or enter ins mode
+  KEY_EIC* = 0x0000014C       # exit insert char mode
+  KEY_CLEAR* = 0x0000014D     # clear screen
+  KEY_EOS* = 0x0000014E       # clear to end of screen
+  KEY_EOL* = 0x0000014F       # clear to end of line
+  KEY_SF* = 0x00000150        # scroll 1 line forward
+  KEY_SR* = 0x00000151        # scroll 1 line back (reverse)
+  KEY_NPAGE* = 0x00000152     # next page
+  KEY_PPAGE* = 0x00000153     # previous page
+  KEY_STAB* = 0x00000154      # set tab
+  KEY_CTAB* = 0x00000155      # clear tab
+  KEY_CATAB* = 0x00000156     # clear all tabs
+  KEY_ENTER* = 0x00000157     # enter or send (unreliable)
+  KEY_SRESET* = 0x00000158    # soft/reset (partial/unreliable)
+  KEY_RESET* = 0x00000159     # reset/hard reset (unreliable)
+  KEY_PRINT* = 0x0000015A     # print/copy
+  KEY_LL* = 0x0000015B        # home down/bottom (lower left)
+  KEY_ABORT* = 0x0000015C     # abort/terminate key (any)
+  KEY_SHELP* = 0x0000015D     # short help
+  KEY_LHELP* = 0x0000015E     # long help
+  KEY_BTAB* = 0x0000015F      # Back tab key
+  KEY_BEG* = 0x00000160       # beg(inning) key
+  KEY_CANCEL* = 0x00000161    # cancel key
+  KEY_CLOSE* = 0x00000162     # close key
+  KEY_COMMAND* = 0x00000163   # cmd (command) key
+  KEY_COPY* = 0x00000164      # copy key
+  KEY_CREATE* = 0x00000165    # create key
+  KEY_END* = 0x00000166       # end key
+  KEY_EXIT* = 0x00000167      # exit key
+  KEY_FIND* = 0x00000168      # find key
+  KEY_HELP* = 0x00000169      # help key
+  KEY_MARK* = 0x0000016A      # mark key
+  KEY_MESSAGE* = 0x0000016B   # message key
+  KEY_MOVE* = 0x0000016C      # move key
+  KEY_NEXT* = 0x0000016D      # next object key
+  KEY_OPEN* = 0x0000016E      # open key
+  KEY_OPTIONS* = 0x0000016F   # options key
+  KEY_PREVIOUS* = 0x00000170  # previous object key
+  KEY_REDO* = 0x00000171      # redo key
+  KEY_REFERENCE* = 0x00000172 # ref(erence) key
+  KEY_REFRESH* = 0x00000173   # refresh key
+  KEY_REPLACE* = 0x00000174   # replace key
+  KEY_RESTART* = 0x00000175   # restart key
+  KEY_RESUME* = 0x00000176    # resume key
+  KEY_SAVE* = 0x00000177      # save key
+  KEY_SBEG* = 0x00000178      # shifted beginning key
+  KEY_SCANCEL* = 0x00000179   # shifted cancel key
+  KEY_SCOMMAND* = 0x0000017A  # shifted command key
+  KEY_SCOPY* = 0x0000017B     # shifted copy key
+  KEY_SCREATE* = 0x0000017C   # shifted create key
+  KEY_SDC* = 0x0000017D       # shifted delete char key
+  KEY_SDL* = 0x0000017E       # shifted delete line key
+  KEY_SELECT* = 0x0000017F    # select key
+  KEY_SEND* = 0x00000180      # shifted end key
+  KEY_SEOL* = 0x00000181      # shifted clear line key
+  KEY_SEXIT* = 0x00000182     # shifted exit key
+  KEY_SFIND* = 0x00000183     # shifted find key
+  KEY_SHOME* = 0x00000184     # shifted home key
+  KEY_SIC* = 0x00000185       # shifted input key
+  KEY_SLEFT* = 0x00000187     # shifted left arrow key
+  KEY_SMESSAGE* = 0x00000188  # shifted message key
+  KEY_SMOVE* = 0x00000189     # shifted move key
+  KEY_SNEXT* = 0x0000018A     # shifted next key
+  KEY_SOPTIONS* = 0x0000018B  # shifted options key
+  KEY_SPREVIOUS* = 0x0000018C # shifted prev key
+  KEY_SPRINT* = 0x0000018D    # shifted print key
+  KEY_SREDO* = 0x0000018E     # shifted redo key
+  KEY_SREPLACE* = 0x0000018F  # shifted replace key
+  KEY_SRIGHT* = 0x00000190    # shifted right arrow
+  KEY_SRSUME* = 0x00000191    # shifted resume key
+  KEY_SSAVE* = 0x00000192     # shifted save key
+  KEY_SSUSPEND* = 0x00000193  # shifted suspend key
+  KEY_SUNDO* = 0x00000194     # shifted undo key
+  KEY_SUSPEND* = 0x00000195   # suspend key
+  KEY_UNDO* = 0x00000196      # undo key
   ALT_0* = 0x00000197
   ALT_1* = 0x00000198
   ALT_2* = 0x00000199
@@ -270,46 +279,46 @@ const
   ALT_X* = 0x000001B8
   ALT_Y* = 0x000001B9
   ALT_Z* = 0x000001BA
-  CTL_LEFT* = 0x000001BB      # Control-Left-Arrow 
+  CTL_LEFT* = 0x000001BB      # Control-Left-Arrow
   CTL_RIGHT* = 0x000001BC
   CTL_PGUP* = 0x000001BD
   CTL_PGDN* = 0x000001BE
   CTL_HOME* = 0x000001BF
   CTL_END* = 0x000001C0
-  KEY_A1* = 0x000001C1        # upper left on Virtual keypad 
-  KEY_A2* = 0x000001C2        # upper middle on Virt. keypad 
-  KEY_A3* = 0x000001C3        # upper right on Vir. keypad 
-  KEY_B1* = 0x000001C4        # middle left on Virt. keypad 
-  KEY_B2* = 0x000001C5        # center on Virt. keypad 
-  KEY_B3* = 0x000001C6        # middle right on Vir. keypad 
-  KEY_C1* = 0x000001C7        # lower left on Virt. keypad 
-  KEY_C2* = 0x000001C8        # lower middle on Virt. keypad 
-  KEY_C3* = 0x000001C9        # lower right on Vir. keypad 
-  PADSLASH* = 0x000001CA      # slash on keypad 
-  PADENTER* = 0x000001CB      # enter on keypad 
-  CTL_PADENTER* = 0x000001CC  # ctl-enter on keypad 
-  ALT_PADENTER* = 0x000001CD  # alt-enter on keypad 
-  PADSTOP* = 0x000001CE       # stop on keypad 
-  PADSTAR* = 0x000001CF       # star on keypad 
-  PADMINUS* = 0x000001D0      # minus on keypad 
-  PADPLUS* = 0x000001D1       # plus on keypad 
-  CTL_PADSTOP* = 0x000001D2   # ctl-stop on keypad 
-  CTL_PADCENTER* = 0x000001D3 # ctl-enter on keypad 
-  CTL_PADPLUS* = 0x000001D4   # ctl-plus on keypad 
-  CTL_PADMINUS* = 0x000001D5  # ctl-minus on keypad 
-  CTL_PADSLASH* = 0x000001D6  # ctl-slash on keypad 
-  CTL_PADSTAR* = 0x000001D7   # ctl-star on keypad 
-  ALT_PADPLUS* = 0x000001D8   # alt-plus on keypad 
-  ALT_PADMINUS* = 0x000001D9  # alt-minus on keypad 
-  ALT_PADSLASH* = 0x000001DA  # alt-slash on keypad 
-  ALT_PADSTAR* = 0x000001DB   # alt-star on keypad 
-  ALT_PADSTOP* = 0x000001DC   # alt-stop on keypad 
-  CTL_INS* = 0x000001DD       # ctl-insert 
-  ALT_DEL* = 0x000001DE       # alt-delete 
-  ALT_INS* = 0x000001DF       # alt-insert 
-  CTL_UP* = 0x000001E0        # ctl-up arrow 
-  CTL_DOWN* = 0x000001E1      # ctl-down arrow 
-  CTL_TAB* = 0x000001E2       # ctl-tab 
+  KEY_A1* = 0x000001C1        # upper left on Virtual keypad
+  KEY_A2* = 0x000001C2        # upper middle on Virt. keypad
+  KEY_A3* = 0x000001C3        # upper right on Vir. keypad
+  KEY_B1* = 0x000001C4        # middle left on Virt. keypad
+  KEY_B2* = 0x000001C5        # center on Virt. keypad
+  KEY_B3* = 0x000001C6        # middle right on Vir. keypad
+  KEY_C1* = 0x000001C7        # lower left on Virt. keypad
+  KEY_C2* = 0x000001C8        # lower middle on Virt. keypad
+  KEY_C3* = 0x000001C9        # lower right on Vir. keypad
+  PADSLASH* = 0x000001CA      # slash on keypad
+  PADENTER* = 0x000001CB      # enter on keypad
+  CTL_PADENTER* = 0x000001CC  # ctl-enter on keypad
+  ALT_PADENTER* = 0x000001CD  # alt-enter on keypad
+  PADSTOP* = 0x000001CE       # stop on keypad
+  PADSTAR* = 0x000001CF       # star on keypad
+  PADMINUS* = 0x000001D0      # minus on keypad
+  PADPLUS* = 0x000001D1       # plus on keypad
+  CTL_PADSTOP* = 0x000001D2   # ctl-stop on keypad
+  CTL_PADCENTER* = 0x000001D3 # ctl-enter on keypad
+  CTL_PADPLUS* = 0x000001D4   # ctl-plus on keypad
+  CTL_PADMINUS* = 0x000001D5  # ctl-minus on keypad
+  CTL_PADSLASH* = 0x000001D6  # ctl-slash on keypad
+  CTL_PADSTAR* = 0x000001D7   # ctl-star on keypad
+  ALT_PADPLUS* = 0x000001D8   # alt-plus on keypad
+  ALT_PADMINUS* = 0x000001D9  # alt-minus on keypad
+  ALT_PADSLASH* = 0x000001DA  # alt-slash on keypad
+  ALT_PADSTAR* = 0x000001DB   # alt-star on keypad
+  ALT_PADSTOP* = 0x000001DC   # alt-stop on keypad
+  CTL_INS* = 0x000001DD       # ctl-insert
+  ALT_DEL* = 0x000001DE       # alt-delete
+  ALT_INS* = 0x000001DF       # alt-insert
+  CTL_UP* = 0x000001E0        # ctl-up arrow
+  CTL_DOWN* = 0x000001E1      # ctl-down arrow
+  CTL_TAB* = 0x000001E2       # ctl-tab
   ALT_TAB* = 0x000001E3
   ALT_MINUS* = 0x000001E4
   ALT_EQUAL* = 0x000001E5
@@ -317,24 +326,24 @@ const
   ALT_PGUP* = 0x000001E7
   ALT_PGDN* = 0x000001E8
   ALT_END* = 0x000001E9
-  ALT_UP* = 0x000001EA        # alt-up arrow 
-  ALT_DOWN* = 0x000001EB      # alt-down arrow 
-  ALT_RIGHT* = 0x000001EC     # alt-right arrow 
-  ALT_LEFT* = 0x000001ED      # alt-left arrow 
-  ALT_ENTER* = 0x000001EE     # alt-enter 
-  ALT_ESC* = 0x000001EF       # alt-escape 
-  ALT_BQUOTE* = 0x000001F0    # alt-back quote 
-  ALT_LBRACKET* = 0x000001F1  # alt-left bracket 
-  ALT_RBRACKET* = 0x000001F2  # alt-right bracket 
-  ALT_SEMICOLON* = 0x000001F3 # alt-semi-colon 
-  ALT_FQUOTE* = 0x000001F4    # alt-forward quote 
-  ALT_COMMA* = 0x000001F5     # alt-comma 
-  ALT_STOP* = 0x000001F6      # alt-stop 
-  ALT_FSLASH* = 0x000001F7    # alt-forward slash 
-  ALT_BKSP* = 0x000001F8      # alt-backspace 
-  CTL_BKSP* = 0x000001F9      # ctl-backspace 
-  PAD0* = 0x000001FA          # keypad 0 
-  CTL_PAD0* = 0x000001FB      # ctl-keypad 0 
+  ALT_UP* = 0x000001EA        # alt-up arrow
+  ALT_DOWN* = 0x000001EB      # alt-down arrow
+  ALT_RIGHT* = 0x000001EC     # alt-right arrow
+  ALT_LEFT* = 0x000001ED      # alt-left arrow
+  ALT_ENTER* = 0x000001EE     # alt-enter
+  ALT_ESC* = 0x000001EF       # alt-escape
+  ALT_BQUOTE* = 0x000001F0    # alt-back quote
+  ALT_LBRACKET* = 0x000001F1  # alt-left bracket
+  ALT_RBRACKET* = 0x000001F2  # alt-right bracket
+  ALT_SEMICOLON* = 0x000001F3 # alt-semi-colon
+  ALT_FQUOTE* = 0x000001F4    # alt-forward quote
+  ALT_COMMA* = 0x000001F5     # alt-comma
+  ALT_STOP* = 0x000001F6      # alt-stop
+  ALT_FSLASH* = 0x000001F7    # alt-forward slash
+  ALT_BKSP* = 0x000001F8      # alt-backspace
+  CTL_BKSP* = 0x000001F9      # ctl-backspace
+  PAD0* = 0x000001FA          # keypad 0
+  CTL_PAD0* = 0x000001FB      # ctl-keypad 0
   CTL_PAD1* = 0x000001FC
   CTL_PAD2* = 0x000001FD
   CTL_PAD3* = 0x000001FE
@@ -344,7 +353,7 @@ const
   CTL_PAD7* = 0x00000202
   CTL_PAD8* = 0x00000203
   CTL_PAD9* = 0x00000204
-  ALT_PAD0* = 0x00000205      # alt-keypad 0 
+  ALT_PAD0* = 0x00000205      # alt-keypad 0
   ALT_PAD1* = 0x00000206
   ALT_PAD2* = 0x00000207
   ALT_PAD3* = 0x00000208
@@ -354,30 +363,30 @@ const
   ALT_PAD7* = 0x0000020C
   ALT_PAD8* = 0x0000020D
   ALT_PAD9* = 0x0000020E
-  CTL_DEL* = 0x0000020F       # clt-delete 
-  ALT_BSLASH* = 0x00000210    # alt-back slash 
-  CTL_ENTER* = 0x00000211     # ctl-enter 
-  SHF_PADENTER* = 0x00000212  # shift-enter on keypad 
-  SHF_PADSLASH* = 0x00000213  # shift-slash on keypad 
-  SHF_PADSTAR* = 0x00000214   # shift-star  on keypad 
-  SHF_PADPLUS* = 0x00000215   # shift-plus  on keypad 
-  SHF_PADMINUS* = 0x00000216  # shift-minus on keypad 
-  SHF_UP* = 0x00000217        # shift-up on keypad 
-  SHF_DOWN* = 0x00000218      # shift-down on keypad 
-  SHF_IC* = 0x00000219        # shift-insert on keypad 
-  SHF_DC* = 0x0000021A        # shift-delete on keypad 
-  KEY_MOUSE* = 0x0000021B     # "mouse" key 
-  KEY_SHIFT_L* = 0x0000021C   # Left-shift 
-  KEY_SHIFT_R* = 0x0000021D   # Right-shift 
-  KEY_CONTROL_L* = 0x0000021E # Left-control 
-  KEY_CONTROL_R* = 0x0000021F # Right-control 
-  KEY_ALT_L* = 0x00000220     # Left-alt 
-  KEY_ALT_R* = 0x00000221     # Right-alt 
-  KEY_RESIZE* = 0x00000222    # Window resize 
-  KEY_SUP* = 0x00000223       # Shifted up arrow 
-  KEY_SDOWN* = 0x00000224     # Shifted down arrow 
-  KEY_MIN* = KEY_BREAK        # Minimum curses key value 
-  KEY_MAX* = KEY_SDOWN        # Maximum curses key 
+  CTL_DEL* = 0x0000020F       # clt-delete
+  ALT_BSLASH* = 0x00000210    # alt-back slash
+  CTL_ENTER* = 0x00000211     # ctl-enter
+  SHF_PADENTER* = 0x00000212  # shift-enter on keypad
+  SHF_PADSLASH* = 0x00000213  # shift-slash on keypad
+  SHF_PADSTAR* = 0x00000214   # shift-star  on keypad
+  SHF_PADPLUS* = 0x00000215   # shift-plus  on keypad
+  SHF_PADMINUS* = 0x00000216  # shift-minus on keypad
+  SHF_UP* = 0x00000217        # shift-up on keypad
+  SHF_DOWN* = 0x00000218      # shift-down on keypad
+  SHF_IC* = 0x00000219        # shift-insert on keypad
+  SHF_DC* = 0x0000021A        # shift-delete on keypad
+  KEY_MOUSE* = 0x0000021B     # "mouse" key
+  KEY_SHIFT_L* = 0x0000021C   # Left-shift
+  KEY_SHIFT_R* = 0x0000021D   # Right-shift
+  KEY_CONTROL_L* = 0x0000021E # Left-control
+  KEY_CONTROL_R* = 0x0000021F # Right-control
+  KEY_ALT_L* = 0x00000220     # Left-alt
+  KEY_ALT_R* = 0x00000221     # Right-alt
+  KEY_RESIZE* = 0x00000222    # Window resize
+  KEY_SUP* = 0x00000223       # Shifted up arrow
+  KEY_SDOWN* = 0x00000224     # Shifted down arrow
+  KEY_MIN* = KEY_BREAK        # Minimum curses key value
+  KEY_MAX* = KEY_SDOWN        # Maximum curses key
   CLIP_SUCCESS* = 0
   CLIP_ACCESS_ERROR* = 1
   CLIP_EMPTY* = 2
@@ -394,103 +403,107 @@ when appType == "gui":
     BUTTON_CTRL* = BUTTON_MODIFIER_CONTROL
     BUTTON_ALT* = BUTTON_MODIFIER_ALT
 else:
-  const 
+  const
     BUTTON_SHIFT* = 0x00000008
     BUTTON_CONTROL* = 0x00000010
     BUTTON_ALT* = 0x00000020
 
-type 
-  TMOUSE_STATUS*{.pure, final.} = object 
-    x*: cint                  # absolute column, 0 based, measured in characters 
-    y*: cint                  # absolute row, 0 based, measured in characters 
-    button*: array[0..3 - 1, cshort] # state of each button 
-    changes*: cint            # flags indicating what has changed with the mouse 
-  
-  TMEVENT*{.pure, final.} = object 
-    id*: cshort               # unused, always 0 
+type
+  TMOUSE_STATUS*{.pure, final.} = object
+    x*: cint                  # absolute column, 0 based, measured in characters
+    y*: cint                  # absolute row, 0 based, measured in characters
+    button*: array[0..3 - 1, cshort] # state of each button
+    changes*: cint            # flags indicating what has changed with the mouse
+
+  MEVENT*{.pure, final.} = object
+    id*: cshort               # unused, always 0
     x*: cint
     y*: cint
-    z*: cint                  # x, y same as MOUSE_STATUS; z unused 
+    z*: cint                  # x, y same as TMOUSE_STATUS; z unused
     bstate*: cunsignedlong    # equivalent to changes + button[], but
-                              #                           in the same format as used for mousemask() 
-  
-  TWINDOW*{.pure, final.} = object 
-    cury*: cint              # current pseudo-cursor 
+                              # in the same format as used for mousemask()
+
+  WINDOW*{.pure, final.} = object
+    cury*: cint              # current pseudo-cursor
     curx*: cint
-    maxy*: cint              # max window coordinates 
+    maxy*: cint              # max window coordinates
     maxx*: cint
-    begy*: cint              # origin on screen 
+    begy*: cint              # origin on screen
     begx*: cint
-    flags*: cint             # window properties 
-    attrs*: cunsignedlong    # standard attributes and colors 
-    bkgd*: cunsignedlong     # background, normally blank 
-    clear*: cunsignedchar    # causes clear at next refresh 
-    leaveit*: cunsignedchar  # leaves cursor where it is 
-    scroll*: cunsignedchar   # allows window scrolling 
-    nodelay*: cunsignedchar  # input character wait flag 
-    immed*: cunsignedchar    # immediate update flag 
-    sync*: cunsignedchar     # synchronise window ancestors 
-    use_keypad*: cunsignedchar # flags keypad key mode active 
-    y*: ptr ptr cunsignedlong # pointer to line pointer array 
-    firstch*: ptr cint       # first changed character in line 
-    lastch*: ptr cint        # last changed character in line 
-    tmarg*: cint             # top of scrolling region 
-    bmarg*: cint             # bottom of scrolling region 
-    delayms*: cint           # milliseconds of delay for getch() 
+    flags*: cint             # window properties
+    attrs*: cunsignedlong    # standard attributes and colors
+    bkgd*: cunsignedlong     # background, normally blank
+    clear*: cunsignedchar    # causes clear at next refresh
+    leaveit*: cunsignedchar  # leaves cursor where it is
+    scroll*: cunsignedchar   # allows window scrolling
+    nodelay*: cunsignedchar  # input character wait flag
+    immed*: cunsignedchar    # immediate update flag
+    sync*: cunsignedchar     # synchronise window ancestors
+    use_keypad*: cunsignedchar # flags keypad key mode active
+    y*: ptr ptr cunsignedlong # pointer to line pointer array
+    firstch*: ptr cint       # first changed character in line
+    lastch*: ptr cint        # last changed character in line
+    tmarg*: cint             # top of scrolling region
+    bmarg*: cint             # bottom of scrolling region
+    delayms*: cint           # milliseconds of delay for getch()
     parx*: cint
-    pary*: cint              # coords relative to parent (0,0) 
-    parent*: ptr TWINDOW        # subwin's pointer to parent win 
-  
-  TPANELOBS*{.pure, final.} = object 
-    above*: ptr TPANELOBS
-    pan*: ptr TPANEL
+    pary*: cint              # coords relative to parent (0,0)
+    parent*: ptr WINDOW        # subwin's pointer to parent win
+
+  PANELOBS*{.pure, final.} = object
+    above*: ptr PANELOBS
+    pan*: ptr PANEL
 
-  TPANEL*{.pure, final.} = object 
-    win*: ptr TWINDOW
+  PANEL*{.pure, final.} = object
+    win*: ptr WINDOW
     wstarty*: cint
     wendy*: cint
     wstartx*: cint
     wendx*: cint
-    below*: ptr TPANEL
-    above*: ptr TPANEL
+    below*: ptr PANEL
+    above*: ptr PANEL
     user*: pointer
-    obscure*: ptr TPANELOBS
+    obscure*: ptr PANELOBS
+{.deprecated: [
+              #TMOUSE_STATUS: MOUSE_STATUS, # Name conflict when we drop the `T`
+              TMEVENT: MEVENT, TWINDOW: WINDOW,
+              TPANELOBS: PANELOBS, TPANEL:PANEL].}
 
 when unixOS:
   type
-    TSCREEN*{.pure, final.} = object 
-      alive*: cunsignedchar     # if initscr() called, and not endwin() 
-      autocr*: cunsignedchar    # if cr -> lf 
-      cbreak*: cunsignedchar    # if terminal unbuffered 
-      echo*: cunsignedchar      # if terminal echo 
-      raw_inp*: cunsignedchar   # raw input mode (v. cooked input) 
-      raw_out*: cunsignedchar   # raw output mode (7 v. 8 bits) 
-      audible*: cunsignedchar   # FALSE if the bell is visual 
-      mono*: cunsignedchar      # TRUE if current screen is mono 
-      resized*: cunsignedchar   # TRUE if TERM has been resized 
-      orig_attr*: cunsignedchar # TRUE if we have the original colors 
-      orig_fore*: cshort        # original screen foreground color 
-      orig_back*: cshort        # original screen foreground color 
-      cursrow*: cint            # position of physical cursor 
-      curscol*: cint            # position of physical cursor 
-      visibility*: cint         # visibility of cursor 
-      orig_cursor*: cint        # original cursor size 
-      lines*: cint              # new value for LINES 
-      cols*: cint               # new value for COLS 
-      trap_mbe*: cunsignedlong # trap these mouse button events 
-      map_mbe_to_key*: cunsignedlong # map mouse buttons to slk 
+    SCREEN*{.pure, final.} = object
+      alive*: cunsignedchar     # if initscr() called, and not endwin()
+      autocr*: cunsignedchar    # if cr -> lf
+      cbreak*: cunsignedchar    # if terminal unbuffered
+      echo*: cunsignedchar      # if terminal echo
+      raw_inp*: cunsignedchar   # raw input mode (v. cooked input)
+      raw_out*: cunsignedchar   # raw output mode (7 v. 8 bits)
+      audible*: cunsignedchar   # FALSE if the bell is visual
+      mono*: cunsignedchar      # TRUE if current screen is mono
+      resized*: cunsignedchar   # TRUE if TERM has been resized
+      orig_attr*: cunsignedchar # TRUE if we have the original colors
+      orig_fore*: cshort        # original screen foreground color
+      orig_back*: cshort        # original screen foreground color
+      cursrow*: cint            # position of physical cursor
+      curscol*: cint            # position of physical cursor
+      visibility*: cint         # visibility of cursor
+      orig_cursor*: cint        # original cursor size
+      lines*: cint              # new value for LINES
+      cols*: cint               # new value for COLS
+      trap_mbe*: cunsignedlong # trap these mouse button events
+      map_mbe_to_key*: cunsignedlong # map mouse buttons to slk
       mouse_wait*: cint # time to wait (in ms) for a button release after a press
-      slklines*: cint           # lines in use by slk_init() 
-      slk_winptr*: ptr TWINDOW   # window for slk 
-      linesrippedoff*: cint     # lines ripped off via ripoffline() 
-      linesrippedoffontop*: cint # lines ripped off on top via ripoffline() 
-      delaytenths*: cint        # 1/10ths second to wait block getch() for 
-      preserve*: cunsignedchar # TRUE if screen background to be preserved 
-      restore*: cint           # specifies if screen background to be restored, and how 
-      save_key_modifiers*: cunsignedchar # TRUE if each key modifiers saved with each key press 
-      return_key_modifiers*: cunsignedchar # TRUE if modifier keys are returned as "real" keys 
+      slklines*: cint           # lines in use by slk_init()
+      slk_winptr*: ptr WINDOW   # window for slk
+      linesrippedoff*: cint     # lines ripped off via ripoffline()
+      linesrippedoffontop*: cint # lines ripped off on top via ripoffline()
+      delaytenths*: cint        # 1/10ths second to wait block getch() for
+      preserve*: cunsignedchar # TRUE if screen background to be preserved
+      restore*: cint           # specifies if screen background to be restored, and how
+      save_key_modifiers*: cunsignedchar # TRUE if each key modifiers saved with each key press
+      return_key_modifiers*: cunsignedchar # TRUE if modifier keys are returned as "real" keys
       key_code*: cunsignedchar # TRUE if last key is a special key;
-      XcurscrSize*: cint        # size of Xcurscr shared memory block 
+      XcurscrSize*: cint        # size of Xcurscr shared memory block
       sb_on*: cunsignedchar
       sb_viewport_y*: cint
       sb_viewport_x*: cint
@@ -498,70 +511,72 @@ when unixOS:
       sb_total_x*: cint
       sb_cur_y*: cint
       sb_cur_x*: cint
-      line_color*: cshort       # color of line attributes - default -1 
+      line_color*: cshort       # color of line attributes - default -1
+  {.deprecated: [TSCREEN: SCREEN].}
 else:
   type
-    TSCREEN*{.pure, final.} = object 
-      alive*: cunsignedchar     # if initscr() called, and not endwin() 
-      autocr*: cunsignedchar    # if cr -> lf 
-      cbreak*: cunsignedchar    # if terminal unbuffered 
-      echo*: cunsignedchar      # if terminal echo 
-      raw_inp*: cunsignedchar   # raw input mode (v. cooked input) 
-      raw_out*: cunsignedchar   # raw output mode (7 v. 8 bits) 
-      audible*: cunsignedchar   # FALSE if the bell is visual 
-      mono*: cunsignedchar      # TRUE if current screen is mono 
-      resized*: cunsignedchar   # TRUE if TERM has been resized 
-      orig_attr*: cunsignedchar # TRUE if we have the original colors 
-      orig_fore*: cshort        # original screen foreground color 
-      orig_back*: cshort        # original screen foreground color 
-      cursrow*: cint            # position of physical cursor 
-      curscol*: cint            # position of physical cursor 
-      visibility*: cint         # visibility of cursor 
-      orig_cursor*: cint        # original cursor size 
-      lines*: cint              # new value for LINES 
-      cols*: cint               # new value for COLS 
-      trap_mbe*: cunsignedlong # trap these mouse button events 
-      map_mbe_to_key*: cunsignedlong # map mouse buttons to slk 
+    SCREEN*{.pure, final.} = object
+      alive*: cunsignedchar     # if initscr() called, and not endwin()
+      autocr*: cunsignedchar    # if cr -> lf
+      cbreak*: cunsignedchar    # if terminal unbuffered
+      echo*: cunsignedchar      # if terminal echo
+      raw_inp*: cunsignedchar   # raw input mode (v. cooked input)
+      raw_out*: cunsignedchar   # raw output mode (7 v. 8 bits)
+      audible*: cunsignedchar   # FALSE if the bell is visual
+      mono*: cunsignedchar      # TRUE if current screen is mono
+      resized*: cunsignedchar   # TRUE if TERM has been resized
+      orig_attr*: cunsignedchar # TRUE if we have the original colors
+      orig_fore*: cshort        # original screen foreground color
+      orig_back*: cshort        # original screen foreground color
+      cursrow*: cint            # position of physical cursor
+      curscol*: cint            # position of physical cursor
+      visibility*: cint         # visibility of cursor
+      orig_cursor*: cint        # original cursor size
+      lines*: cint              # new value for LINES
+      cols*: cint               # new value for COLS
+      trap_mbe*: cunsignedlong # trap these mouse button events
+      map_mbe_to_key*: cunsignedlong # map mouse buttons to slk
       mouse_wait*: cint # time to wait (in ms) for a button release after a press
-      slklines*: cint           # lines in use by slk_init() 
-      slk_winptr*: ptr TWINDOW   # window for slk 
-      linesrippedoff*: cint     # lines ripped off via ripoffline() 
-      linesrippedoffontop*: cint # lines ripped off on top via ripoffline() 
-      delaytenths*: cint        # 1/10ths second to wait block getch() for 
-      preserve*: cunsignedchar # TRUE if screen background to be preserved 
-      restore*: cint           # specifies if screen background to be restored, and how 
-      save_key_modifiers*: cunsignedchar # TRUE if each key modifiers saved with each key press 
-      return_key_modifiers*: cunsignedchar # TRUE if modifier keys are returned as "real" keys 
+      slklines*: cint           # lines in use by slk_init()
+      slk_winptr*: ptr WINDOW   # window for slk
+      linesrippedoff*: cint     # lines ripped off via ripoffline()
+      linesrippedoffontop*: cint # lines ripped off on top via ripoffline()
+      delaytenths*: cint        # 1/10ths second to wait block getch() for
+      preserve*: cunsignedchar # TRUE if screen background to be preserved
+      restore*: cint           # specifies if screen background to be restored, and how
+      save_key_modifiers*: cunsignedchar # TRUE if each key modifiers saved with each key press
+      return_key_modifiers*: cunsignedchar # TRUE if modifier keys are returned as "real" keys
       key_code*: cunsignedchar # TRUE if last key is a special key;
-      line_color*: cshort       # color of line attributes - default -1 
+      line_color*: cshort       # color of line attributes - default -1
+  {.deprecated: [TSCREEN: SCREEN].}
 
 var
   LINES*{.importc: "LINES", dynlib: pdcursesdll.}: cint
   COLS*{.importc: "COLS", dynlib: pdcursesdll.}: cint
-  stdscr*{.importc: "stdscr", dynlib: pdcursesdll.}: ptr TWINDOW
-  curscr*{.importc: "curscr", dynlib: pdcursesdll.}: ptr TWINDOW
-  SP*{.importc: "SP", dynlib: pdcursesdll.}: ptr TSCREEN
-  Mouse_status*{.importc: "Mouse_status", dynlib: pdcursesdll.}: TMOUSE_STATUS
+  stdscr*{.importc: "stdscr", dynlib: pdcursesdll.}: ptr WINDOW
+  curscr*{.importc: "curscr", dynlib: pdcursesdll.}: ptr WINDOW
+  SP*{.importc: "SP", dynlib: pdcursesdll.}: ptr SCREEN
+  Mouse_status*{.importc: "Mouse_status", dynlib: pdcursesdll.}: MOUSE_STATUS
   COLORS*{.importc: "COLORS", dynlib: pdcursesdll.}: cint
   COLOR_PAIRS*{.importc: "COLOR_PAIRS", dynlib: pdcursesdll.}: cint
   TABSIZE*{.importc: "TABSIZE", dynlib: pdcursesdll.}: cint
   acs_map*{.importc: "acs_map", dynlib: pdcursesdll.}: ptr cunsignedlong
   ttytype*{.importc: "ttytype", dynlib: pdcursesdll.}: cstring
 
-template BUTTON_CHANGED*(x: expr): expr = 
+template BUTTON_CHANGED*(x: expr): expr =
   (Mouse_status.changes and (1 shl ((x) - 1)))
 
-template BUTTON_STATUS*(x: expr): expr = 
+template BUTTON_STATUS*(x: expr): expr =
   (Mouse_status.button[(x) - 1])
 
 template ACS_PICK*(w, n: expr): expr = int32(w) or A_ALTCHARSET
 
 template KEY_F*(n: expr): expr = KEY_F0 + n
 
-template COLOR_PAIR*(n: expr): expr = 
+template COLOR_PAIR*(n: expr): expr =
   ((cunsignedlong(n) shl COLOR_SHIFT) and A_COLOR)
 
-template PAIR_NUMBER*(n: expr): expr = 
+template PAIR_NUMBER*(n: expr): expr =
   (((n) and A_COLOR) shr COLOR_SHIFT)
 
 const
@@ -659,75 +674,75 @@ discard """WACS_ULCORNER* = (addr((acs_map['l'])))
   WACS_SBSB* = WACS_VLINE
   WACS_SSSS* = WACS_PLUS"""
 
-proc addch*(a2: cunsignedlong): cint{.extdecl, importc: "addch", 
+proc addch*(a2: cunsignedlong): cint{.extdecl, importc: "addch",
                                       dynlib: pdcursesdll.}
-proc addchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl, 
+proc addchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
     importc: "addchnstr", dynlib: pdcursesdll.}
-proc addchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "addchstr", 
+proc addchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "addchstr",
     dynlib: pdcursesdll.}
-proc addnstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "addnstr", 
+proc addnstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "addnstr",
     dynlib: pdcursesdll.}
 proc addstr*(a2: cstring): cint{.extdecl, importc: "addstr", dynlib: pdcursesdll.}
-proc attroff*(a2: cunsignedlong): cint{.extdecl, importc: "attroff", 
+proc attroff*(a2: cunsignedlong): cint{.extdecl, importc: "attroff",
                                         dynlib: pdcursesdll.}
-proc attron*(a2: cunsignedlong): cint{.extdecl, importc: "attron", 
+proc attron*(a2: cunsignedlong): cint{.extdecl, importc: "attron",
                                        dynlib: pdcursesdll.}
-proc attrset*(a2: cunsignedlong): cint{.extdecl, importc: "attrset", 
+proc attrset*(a2: cunsignedlong): cint{.extdecl, importc: "attrset",
                                         dynlib: pdcursesdll.}
-proc attr_get*(a2: ptr cunsignedlong; a3: ptr cshort; a4: pointer): cint{.extdecl, 
+proc attr_get*(a2: ptr cunsignedlong; a3: ptr cshort; a4: pointer): cint{.extdecl,
     importc: "attr_get", dynlib: pdcursesdll.}
-proc attr_off*(a2: cunsignedlong; a3: pointer): cint{.extdecl, 
+proc attr_off*(a2: cunsignedlong; a3: pointer): cint{.extdecl,
     importc: "attr_off", dynlib: pdcursesdll.}
-proc attr_on*(a2: cunsignedlong; a3: pointer): cint{.extdecl, importc: "attr_on", 
+proc attr_on*(a2: cunsignedlong; a3: pointer): cint{.extdecl, importc: "attr_on",
     dynlib: pdcursesdll.}
-proc attr_set*(a2: cunsignedlong; a3: cshort; a4: pointer): cint{.extdecl, 
+proc attr_set*(a2: cunsignedlong; a3: cshort; a4: pointer): cint{.extdecl,
     importc: "attr_set", dynlib: pdcursesdll.}
 proc baudrate*(): cint{.extdecl, importc: "baudrate", dynlib: pdcursesdll.}
 proc beep*(): cint{.extdecl, importc: "beep", dynlib: pdcursesdll.}
 proc bkgd*(a2: cunsignedlong): cint{.extdecl, importc: "bkgd", dynlib: pdcursesdll.}
 proc bkgdset*(a2: cunsignedlong){.extdecl, importc: "bkgdset", dynlib: pdcursesdll.}
-proc border*(a2: cunsignedlong; a3: cunsignedlong; a4: cunsignedlong; 
-             a5: cunsignedlong; a6: cunsignedlong; a7: cunsignedlong; 
-             a8: cunsignedlong; a9: cunsignedlong): cint{.extdecl, 
+proc border*(a2: cunsignedlong; a3: cunsignedlong; a4: cunsignedlong;
+             a5: cunsignedlong; a6: cunsignedlong; a7: cunsignedlong;
+             a8: cunsignedlong; a9: cunsignedlong): cint{.extdecl,
     importc: "border", dynlib: pdcursesdll.}
-proc box*(a2: ptr TWINDOW; a3: cunsignedlong; a4: cunsignedlong): cint{.extdecl, 
+proc box*(a2: ptr WINDOW; a3: cunsignedlong; a4: cunsignedlong): cint{.extdecl,
     importc: "box", dynlib: pdcursesdll.}
-proc can_change_color*(): cunsignedchar{.extdecl, importc: "can_change_color", 
+proc can_change_color*(): cunsignedchar{.extdecl, importc: "can_change_color",
     dynlib: pdcursesdll.}
 proc cbreak*(): cint{.extdecl, importc: "cbreak", dynlib: pdcursesdll.}
-proc chgat*(a2: cint; a3: cunsignedlong; a4: cshort; a5: pointer): cint{.extdecl, 
+proc chgat*(a2: cint; a3: cunsignedlong; a4: cshort; a5: pointer): cint{.extdecl,
     importc: "chgat", dynlib: pdcursesdll.}
-proc clearok*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, 
+proc clearok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
     importc: "clearok", dynlib: pdcursesdll.}
 proc clear*(): cint{.extdecl, importc: "clear", dynlib: pdcursesdll.}
 proc clrtobot*(): cint{.extdecl, importc: "clrtobot", dynlib: pdcursesdll.}
 proc clrtoeol*(): cint{.extdecl, importc: "clrtoeol", dynlib: pdcursesdll.}
 proc color_content*(a2: cshort; a3: ptr cshort; a4: ptr cshort; a5: ptr cshort): cint{.
     extdecl, importc: "color_content", dynlib: pdcursesdll.}
-proc color_set*(a2: cshort; a3: pointer): cint{.extdecl, importc: "color_set", 
+proc color_set*(a2: cshort; a3: pointer): cint{.extdecl, importc: "color_set",
     dynlib: pdcursesdll.}
-proc copywin*(a2: ptr TWINDOW; a3: ptr TWINDOW; a4: cint; a5: cint; a6: cint; 
-              a7: cint; a8: cint; a9: cint; a10: cint): cint{.extdecl, 
+proc copywin*(a2: ptr WINDOW; a3: ptr WINDOW; a4: cint; a5: cint; a6: cint;
+              a7: cint; a8: cint; a9: cint; a10: cint): cint{.extdecl,
     importc: "copywin", dynlib: pdcursesdll.}
 proc curs_set*(a2: cint): cint{.extdecl, importc: "curs_set", dynlib: pdcursesdll.}
-proc def_prog_mode*(): cint{.extdecl, importc: "def_prog_mode", 
+proc def_prog_mode*(): cint{.extdecl, importc: "def_prog_mode",
                              dynlib: pdcursesdll.}
-proc def_shell_mode*(): cint{.extdecl, importc: "def_shell_mode", 
+proc def_shell_mode*(): cint{.extdecl, importc: "def_shell_mode",
                               dynlib: pdcursesdll.}
-proc delay_output*(a2: cint): cint{.extdecl, importc: "delay_output", 
+proc delay_output*(a2: cint): cint{.extdecl, importc: "delay_output",
                                     dynlib: pdcursesdll.}
 proc delch*(): cint{.extdecl, importc: "delch", dynlib: pdcursesdll.}
 proc deleteln*(): cint{.extdecl, importc: "deleteln", dynlib: pdcursesdll.}
-proc delscreen*(a2: ptr TSCREEN){.extdecl, importc: "delscreen", 
+proc delscreen*(a2: ptr SCREEN){.extdecl, importc: "delscreen",
                                  dynlib: pdcursesdll.}
-proc delwin*(a2: ptr TWINDOW): cint{.extdecl, importc: "delwin", 
+proc delwin*(a2: ptr WINDOW): cint{.extdecl, importc: "delwin",
                                     dynlib: pdcursesdll.}
-proc derwin*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr TWINDOW{.
+proc derwin*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr WINDOW{.
     extdecl, importc: "derwin", dynlib: pdcursesdll.}
 proc doupdate*(): cint{.extdecl, importc: "doupdate", dynlib: pdcursesdll.}
-proc dupwin*(a2: ptr TWINDOW): ptr TWINDOW{.extdecl, importc: "dupwin", 
+proc dupwin*(a2: ptr WINDOW): ptr WINDOW{.extdecl, importc: "dupwin",
     dynlib: pdcursesdll.}
-proc echochar*(a2: cunsignedlong): cint{.extdecl, importc: "echochar", 
+proc echochar*(a2: cunsignedlong): cint{.extdecl, importc: "echochar",
     dynlib: pdcursesdll.}
 proc echo*(): cint{.extdecl, importc: "echo", dynlib: pdcursesdll.}
 proc endwin*(): cint{.extdecl, importc: "endwin", dynlib: pdcursesdll.}
@@ -736,614 +751,614 @@ proc erase*(): cint{.extdecl, importc: "erase", dynlib: pdcursesdll.}
 proc filter*(){.extdecl, importc: "filter", dynlib: pdcursesdll.}
 proc flash*(): cint{.extdecl, importc: "flash", dynlib: pdcursesdll.}
 proc flushinp*(): cint{.extdecl, importc: "flushinp", dynlib: pdcursesdll.}
-proc getbkgd*(a2: ptr TWINDOW): cunsignedlong{.extdecl, importc: "getbkgd", 
+proc getbkgd*(a2: ptr WINDOW): cunsignedlong{.extdecl, importc: "getbkgd",
     dynlib: pdcursesdll.}
-proc getnstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "getnstr", 
+proc getnstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "getnstr",
     dynlib: pdcursesdll.}
 proc getstr*(a2: cstring): cint{.extdecl, importc: "getstr", dynlib: pdcursesdll.}
-proc getwin*(a2: File): ptr TWINDOW{.extdecl, importc: "getwin", 
+proc getwin*(a2: File): ptr WINDOW{.extdecl, importc: "getwin",
                                         dynlib: pdcursesdll.}
-proc halfdelay*(a2: cint): cint{.extdecl, importc: "halfdelay", 
+proc halfdelay*(a2: cint): cint{.extdecl, importc: "halfdelay",
                                  dynlib: pdcursesdll.}
-proc has_colors*(): cunsignedchar{.extdecl, importc: "has_colors", 
+proc has_colors*(): cunsignedchar{.extdecl, importc: "has_colors",
                                    dynlib: pdcursesdll.}
 proc has_ic*(): cunsignedchar{.extdecl, importc: "has_ic", dynlib: pdcursesdll.}
 proc has_il*(): cunsignedchar{.extdecl, importc: "has_il", dynlib: pdcursesdll.}
-proc hline*(a2: cunsignedlong; a3: cint): cint{.extdecl, importc: "hline", 
+proc hline*(a2: cunsignedlong; a3: cint): cint{.extdecl, importc: "hline",
     dynlib: pdcursesdll.}
-proc idcok*(a2: ptr TWINDOW; a3: cunsignedchar){.extdecl, importc: "idcok", 
+proc idcok*(a2: ptr WINDOW; a3: cunsignedchar){.extdecl, importc: "idcok",
     dynlib: pdcursesdll.}
-proc idlok*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, importc: "idlok", 
+proc idlok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "idlok",
     dynlib: pdcursesdll.}
-proc immedok*(a2: ptr TWINDOW; a3: cunsignedchar){.extdecl, importc: "immedok", 
+proc immedok*(a2: ptr WINDOW; a3: cunsignedchar){.extdecl, importc: "immedok",
     dynlib: pdcursesdll.}
-proc inchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl, 
+proc inchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
     importc: "inchnstr", dynlib: pdcursesdll.}
-proc inchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "inchstr", 
+proc inchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "inchstr",
     dynlib: pdcursesdll.}
 proc inch*(): cunsignedlong{.extdecl, importc: "inch", dynlib: pdcursesdll.}
-proc init_color*(a2: cshort; a3: cshort; a4: cshort; a5: cshort): cint{.extdecl, 
+proc init_color*(a2: cshort; a3: cshort; a4: cshort; a5: cshort): cint{.extdecl,
     importc: "init_color", dynlib: pdcursesdll.}
-proc init_pair*(a2: cshort; a3: cshort; a4: cshort): cint{.extdecl, 
+proc init_pair*(a2: cshort; a3: cshort; a4: cshort): cint{.extdecl,
     importc: "init_pair", dynlib: pdcursesdll.}
-proc initscr*(): ptr TWINDOW{.extdecl, importc: "initscr", dynlib: pdcursesdll.}
-proc innstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "innstr", 
+proc initscr*(): ptr WINDOW{.extdecl, importc: "initscr", dynlib: pdcursesdll.}
+proc innstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "innstr",
     dynlib: pdcursesdll.}
-proc insch*(a2: cunsignedlong): cint{.extdecl, importc: "insch", 
+proc insch*(a2: cunsignedlong): cint{.extdecl, importc: "insch",
                                       dynlib: pdcursesdll.}
 proc insdelln*(a2: cint): cint{.extdecl, importc: "insdelln", dynlib: pdcursesdll.}
 proc insertln*(): cint{.extdecl, importc: "insertln", dynlib: pdcursesdll.}
-proc insnstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "insnstr", 
+proc insnstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "insnstr",
     dynlib: pdcursesdll.}
 proc insstr*(a2: cstring): cint{.extdecl, importc: "insstr", dynlib: pdcursesdll.}
 proc instr*(a2: cstring): cint{.extdecl, importc: "instr", dynlib: pdcursesdll.}
-proc intrflush*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, 
+proc intrflush*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
     importc: "intrflush", dynlib: pdcursesdll.}
 proc isendwin*(): cunsignedchar{.extdecl, importc: "isendwin", dynlib: pdcursesdll.}
-proc is_linetouched*(a2: ptr TWINDOW; a3: cint): cunsignedchar{.extdecl, 
+proc is_linetouched*(a2: ptr WINDOW; a3: cint): cunsignedchar{.extdecl,
     importc: "is_linetouched", dynlib: pdcursesdll.}
-proc is_wintouched*(a2: ptr TWINDOW): cunsignedchar{.extdecl, 
+proc is_wintouched*(a2: ptr WINDOW): cunsignedchar{.extdecl,
     importc: "is_wintouched", dynlib: pdcursesdll.}
 proc keyname*(a2: cint): cstring{.extdecl, importc: "keyname", dynlib: pdcursesdll.}
-proc keypad*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, importc: "keypad", 
+proc keypad*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "keypad",
     dynlib: pdcursesdll.}
 proc killchar*(): char{.extdecl, importc: "killchar", dynlib: pdcursesdll.}
-proc leaveok*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, 
+proc leaveok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
     importc: "leaveok", dynlib: pdcursesdll.}
 proc longname*(): cstring{.extdecl, importc: "longname", dynlib: pdcursesdll.}
-proc meta*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, importc: "meta", 
+proc meta*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "meta",
     dynlib: pdcursesdll.}
-proc move*(a2: cint; a3: cint): cint{.extdecl, importc: "move", 
+proc move*(a2: cint; a3: cint): cint{.extdecl, importc: "move",
                                       dynlib: pdcursesdll.}
-proc mvaddch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl, 
+proc mvaddch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl,
     importc: "mvaddch", dynlib: pdcursesdll.}
 proc mvaddchnstr*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
     extdecl, importc: "mvaddchnstr", dynlib: pdcursesdll.}
-proc mvaddchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl, 
+proc mvaddchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
     importc: "mvaddchstr", dynlib: pdcursesdll.}
-proc mvaddnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl, 
+proc mvaddnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
     importc: "mvaddnstr", dynlib: pdcursesdll.}
-proc mvaddstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl, 
+proc mvaddstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
     importc: "mvaddstr", dynlib: pdcursesdll.}
-proc mvchgat*(a2: cint; a3: cint; a4: cint; a5: cunsignedlong; a6: cshort; 
+proc mvchgat*(a2: cint; a3: cint; a4: cint; a5: cunsignedlong; a6: cshort;
               a7: pointer): cint{.extdecl, importc: "mvchgat", dynlib: pdcursesdll.}
-proc mvcur*(a2: cint; a3: cint; a4: cint; a5: cint): cint{.extdecl, 
+proc mvcur*(a2: cint; a3: cint; a4: cint; a5: cint): cint{.extdecl,
     importc: "mvcur", dynlib: pdcursesdll.}
-proc mvdelch*(a2: cint; a3: cint): cint{.extdecl, importc: "mvdelch", 
+proc mvdelch*(a2: cint; a3: cint): cint{.extdecl, importc: "mvdelch",
     dynlib: pdcursesdll.}
-proc mvderwin*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, 
+proc mvderwin*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
     importc: "mvderwin", dynlib: pdcursesdll.}
-proc mvgetch*(a2: cint; a3: cint): cint{.extdecl, importc: "mvgetch", 
+proc mvgetch*(a2: cint; a3: cint): cint{.extdecl, importc: "mvgetch",
     dynlib: pdcursesdll.}
-proc mvgetnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl, 
+proc mvgetnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
     importc: "mvgetnstr", dynlib: pdcursesdll.}
-proc mvgetstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl, 
+proc mvgetstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
     importc: "mvgetstr", dynlib: pdcursesdll.}
-proc mvhline*(a2: cint; a3: cint; a4: cunsignedlong; a5: cint): cint{.extdecl, 
+proc mvhline*(a2: cint; a3: cint; a4: cunsignedlong; a5: cint): cint{.extdecl,
     importc: "mvhline", dynlib: pdcursesdll.}
-proc mvinch*(a2: cint; a3: cint): cunsignedlong{.extdecl, importc: "mvinch", 
+proc mvinch*(a2: cint; a3: cint): cunsignedlong{.extdecl, importc: "mvinch",
     dynlib: pdcursesdll.}
 proc mvinchnstr*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
     extdecl, importc: "mvinchnstr", dynlib: pdcursesdll.}
-proc mvinchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl, 
+proc mvinchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
     importc: "mvinchstr", dynlib: pdcursesdll.}
-proc mvinnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl, 
+proc mvinnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
     importc: "mvinnstr", dynlib: pdcursesdll.}
-proc mvinsch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl, 
+proc mvinsch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl,
     importc: "mvinsch", dynlib: pdcursesdll.}
-proc mvinsnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl, 
+proc mvinsnstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
     importc: "mvinsnstr", dynlib: pdcursesdll.}
-proc mvinsstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl, 
+proc mvinsstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
     importc: "mvinsstr", dynlib: pdcursesdll.}
-proc mvinstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl, importc: "mvinstr", 
+proc mvinstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl, importc: "mvinstr",
     dynlib: pdcursesdll.}
-proc mvprintw*(a2: cint; a3: cint; a4: cstring): cint{.varargs, extdecl, 
+proc mvprintw*(a2: cint; a3: cint; a4: cstring): cint{.varargs, extdecl,
     importc: "mvprintw", dynlib: pdcursesdll.}
-proc mvscanw*(a2: cint; a3: cint; a4: cstring): cint{.varargs, extdecl, 
+proc mvscanw*(a2: cint; a3: cint; a4: cstring): cint{.varargs, extdecl,
     importc: "mvscanw", dynlib: pdcursesdll.}
-proc mvvline*(a2: cint; a3: cint; a4: cunsignedlong; a5: cint): cint{.extdecl, 
+proc mvvline*(a2: cint; a3: cint; a4: cunsignedlong; a5: cint): cint{.extdecl,
     importc: "mvvline", dynlib: pdcursesdll.}
-proc mvwaddchnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong; 
-                   a6: cint): cint{.extdecl, importc: "mvwaddchnstr", 
+proc mvwaddchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
+                   a6: cint): cint{.extdecl, importc: "mvwaddchnstr",
                                     dynlib: pdcursesdll.}
-proc mvwaddchstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
+proc mvwaddchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
     extdecl, importc: "mvwaddchstr", dynlib: pdcursesdll.}
-proc mvwaddch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
+proc mvwaddch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
     extdecl, importc: "mvwaddch", dynlib: pdcursesdll.}
-proc mvwaddnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
+proc mvwaddnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
     extdecl, importc: "mvwaddnstr", dynlib: pdcursesdll.}
-proc mvwaddstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl, 
+proc mvwaddstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
     importc: "mvwaddstr", dynlib: pdcursesdll.}
-proc mvwchgat*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cunsignedlong; 
-               a7: cshort; a8: pointer): cint{.extdecl, importc: "mvwchgat", 
+proc mvwchgat*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cunsignedlong;
+               a7: cshort; a8: pointer): cint{.extdecl, importc: "mvwchgat",
     dynlib: pdcursesdll.}
-proc mvwdelch*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, 
+proc mvwdelch*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
     importc: "mvwdelch", dynlib: pdcursesdll.}
-proc mvwgetch*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, 
+proc mvwgetch*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
     importc: "mvwgetch", dynlib: pdcursesdll.}
-proc mvwgetnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
+proc mvwgetnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
     extdecl, importc: "mvwgetnstr", dynlib: pdcursesdll.}
-proc mvwgetstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl, 
+proc mvwgetstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
     importc: "mvwgetstr", dynlib: pdcursesdll.}
-proc mvwhline*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong; a6: cint): cint{.
+proc mvwhline*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong; a6: cint): cint{.
     extdecl, importc: "mvwhline", dynlib: pdcursesdll.}
-proc mvwinchnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong; 
-                  a6: cint): cint{.extdecl, importc: "mvwinchnstr", 
+proc mvwinchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
+                  a6: cint): cint{.extdecl, importc: "mvwinchnstr",
                                    dynlib: pdcursesdll.}
-proc mvwinchstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
+proc mvwinchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
     extdecl, importc: "mvwinchstr", dynlib: pdcursesdll.}
-proc mvwinch*(a2: ptr TWINDOW; a3: cint; a4: cint): cunsignedlong{.extdecl, 
+proc mvwinch*(a2: ptr WINDOW; a3: cint; a4: cint): cunsignedlong{.extdecl,
     importc: "mvwinch", dynlib: pdcursesdll.}
-proc mvwinnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
+proc mvwinnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
     extdecl, importc: "mvwinnstr", dynlib: pdcursesdll.}
-proc mvwinsch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
+proc mvwinsch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
     extdecl, importc: "mvwinsch", dynlib: pdcursesdll.}
-proc mvwinsnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
+proc mvwinsnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
     extdecl, importc: "mvwinsnstr", dynlib: pdcursesdll.}
-proc mvwinsstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl, 
+proc mvwinsstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
     importc: "mvwinsstr", dynlib: pdcursesdll.}
-proc mvwinstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl, 
+proc mvwinstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.extdecl,
     importc: "mvwinstr", dynlib: pdcursesdll.}
-proc mvwin*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, importc: "mvwin", 
+proc mvwin*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl, importc: "mvwin",
     dynlib: pdcursesdll.}
-proc mvwprintw*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.varargs, 
+proc mvwprintw*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.varargs,
     extdecl, importc: "mvwprintw", dynlib: pdcursesdll.}
-proc mvwscanw*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.varargs, 
+proc mvwscanw*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.varargs,
     extdecl, importc: "mvwscanw", dynlib: pdcursesdll.}
-proc mvwvline*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong; a6: cint): cint{.
+proc mvwvline*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong; a6: cint): cint{.
     extdecl, importc: "mvwvline", dynlib: pdcursesdll.}
 proc napms*(a2: cint): cint{.extdecl, importc: "napms", dynlib: pdcursesdll.}
-proc newpad*(a2: cint; a3: cint): ptr TWINDOW{.extdecl, importc: "newpad", 
+proc newpad*(a2: cint; a3: cint): ptr WINDOW{.extdecl, importc: "newpad",
     dynlib: pdcursesdll.}
-proc newterm*(a2: cstring; a3: File; a4: File): ptr TSCREEN{.extdecl, 
+proc newterm*(a2: cstring; a3: File; a4: File): ptr SCREEN{.extdecl,
     importc: "newterm", dynlib: pdcursesdll.}
-proc newwin*(a2: cint; a3: cint; a4: cint; a5: cint): ptr TWINDOW{.extdecl, 
+proc newwin*(a2: cint; a3: cint; a4: cint; a5: cint): ptr WINDOW{.extdecl,
     importc: "newwin", dynlib: pdcursesdll.}
 proc nl*(): cint{.extdecl, importc: "nl", dynlib: pdcursesdll.}
 proc nocbreak*(): cint{.extdecl, importc: "nocbreak", dynlib: pdcursesdll.}
-proc nodelay*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, 
+proc nodelay*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
     importc: "nodelay", dynlib: pdcursesdll.}
 proc noecho*(): cint{.extdecl, importc: "noecho", dynlib: pdcursesdll.}
 proc nonl*(): cint{.extdecl, importc: "nonl", dynlib: pdcursesdll.}
 proc noqiflush*(){.extdecl, importc: "noqiflush", dynlib: pdcursesdll.}
 proc noraw*(): cint{.extdecl, importc: "noraw", dynlib: pdcursesdll.}
-proc notimeout*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, 
+proc notimeout*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
     importc: "notimeout", dynlib: pdcursesdll.}
-proc overlay*(a2: ptr TWINDOW; a3: ptr TWINDOW): cint{.extdecl, importc: "overlay", 
+proc overlay*(a2: ptr WINDOW; a3: ptr WINDOW): cint{.extdecl, importc: "overlay",
     dynlib: pdcursesdll.}
-proc overwrite*(a2: ptr TWINDOW; a3: ptr TWINDOW): cint{.extdecl, 
+proc overwrite*(a2: ptr WINDOW; a3: ptr WINDOW): cint{.extdecl,
     importc: "overwrite", dynlib: pdcursesdll.}
-proc pair_content*(a2: cshort; a3: ptr cshort; a4: ptr cshort): cint{.extdecl, 
+proc pair_content*(a2: cshort; a3: ptr cshort; a4: ptr cshort): cint{.extdecl,
     importc: "pair_content", dynlib: pdcursesdll.}
-proc pechochar*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, 
+proc pechochar*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
     importc: "pechochar", dynlib: pdcursesdll.}
-proc pnoutrefresh*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cint; 
-                   a7: cint; a8: cint): cint{.extdecl, importc: "pnoutrefresh", 
+proc pnoutrefresh*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint;
+                   a7: cint; a8: cint): cint{.extdecl, importc: "pnoutrefresh",
     dynlib: pdcursesdll.}
-proc prefresh*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cint; a7: cint; 
+proc prefresh*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint; a7: cint;
                a8: cint): cint{.extdecl, importc: "prefresh", dynlib: pdcursesdll.}
-proc printw*(a2: cstring): cint{.varargs, extdecl, importc: "printw", 
+proc printw*(a2: cstring): cint{.varargs, extdecl, importc: "printw",
                                  dynlib: pdcursesdll.}
-proc putwin*(a2: ptr TWINDOW; a3: File): cint{.extdecl, importc: "putwin", 
+proc putwin*(a2: ptr WINDOW; a3: File): cint{.extdecl, importc: "putwin",
     dynlib: pdcursesdll.}
 proc qiflush*(){.extdecl, importc: "qiflush", dynlib: pdcursesdll.}
 proc raw*(): cint{.extdecl, importc: "raw", dynlib: pdcursesdll.}
-proc redrawwin*(a2: ptr TWINDOW): cint{.extdecl, importc: "redrawwin", 
+proc redrawwin*(a2: ptr WINDOW): cint{.extdecl, importc: "redrawwin",
                                        dynlib: pdcursesdll.}
 proc refresh*(): cint{.extdecl, importc: "refresh", dynlib: pdcursesdll.}
-proc reset_prog_mode*(): cint{.extdecl, importc: "reset_prog_mode", 
+proc reset_prog_mode*(): cint{.extdecl, importc: "reset_prog_mode",
                                dynlib: pdcursesdll.}
-proc reset_shell_mode*(): cint{.extdecl, importc: "reset_shell_mode", 
+proc reset_shell_mode*(): cint{.extdecl, importc: "reset_shell_mode",
                                 dynlib: pdcursesdll.}
 proc resetty*(): cint{.extdecl, importc: "resetty", dynlib: pdcursesdll.}
-#int     ripoffline(int, int (*)(TWINDOW *, int));
+#int     ripoffline(int, int (*)(WINDOW *, int));
 proc savetty*(): cint{.extdecl, importc: "savetty", dynlib: pdcursesdll.}
-proc scanw*(a2: cstring): cint{.varargs, extdecl, importc: "scanw", 
+proc scanw*(a2: cstring): cint{.varargs, extdecl, importc: "scanw",
                                 dynlib: pdcursesdll.}
-proc scr_dump*(a2: cstring): cint{.extdecl, importc: "scr_dump", 
+proc scr_dump*(a2: cstring): cint{.extdecl, importc: "scr_dump",
                                    dynlib: pdcursesdll.}
-proc scr_init*(a2: cstring): cint{.extdecl, importc: "scr_init", 
+proc scr_init*(a2: cstring): cint{.extdecl, importc: "scr_init",
                                    dynlib: pdcursesdll.}
-proc scr_restore*(a2: cstring): cint{.extdecl, importc: "scr_restore", 
+proc scr_restore*(a2: cstring): cint{.extdecl, importc: "scr_restore",
                                       dynlib: pdcursesdll.}
 proc scr_set*(a2: cstring): cint{.extdecl, importc: "scr_set", dynlib: pdcursesdll.}
 proc scrl*(a2: cint): cint{.extdecl, importc: "scrl", dynlib: pdcursesdll.}
-proc scroll*(a2: ptr TWINDOW): cint{.extdecl, importc: "scroll", 
+proc scroll*(a2: ptr WINDOW): cint{.extdecl, importc: "scroll",
                                     dynlib: pdcursesdll.}
-proc scrollok*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, 
+proc scrollok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl,
     importc: "scrollok", dynlib: pdcursesdll.}
-proc set_term*(a2: ptr TSCREEN): ptr TSCREEN{.extdecl, importc: "set_term", 
+proc set_term*(a2: ptr SCREEN): ptr SCREEN{.extdecl, importc: "set_term",
     dynlib: pdcursesdll.}
-proc setscrreg*(a2: cint; a3: cint): cint{.extdecl, importc: "setscrreg", 
+proc setscrreg*(a2: cint; a3: cint): cint{.extdecl, importc: "setscrreg",
     dynlib: pdcursesdll.}
-proc slk_attroff*(a2: cunsignedlong): cint{.extdecl, importc: "slk_attroff", 
+proc slk_attroff*(a2: cunsignedlong): cint{.extdecl, importc: "slk_attroff",
     dynlib: pdcursesdll.}
-proc slk_attr_off*(a2: cunsignedlong; a3: pointer): cint{.extdecl, 
+proc slk_attr_off*(a2: cunsignedlong; a3: pointer): cint{.extdecl,
     importc: "slk_attr_off", dynlib: pdcursesdll.}
-proc slk_attron*(a2: cunsignedlong): cint{.extdecl, importc: "slk_attron", 
+proc slk_attron*(a2: cunsignedlong): cint{.extdecl, importc: "slk_attron",
     dynlib: pdcursesdll.}
-proc slk_attr_on*(a2: cunsignedlong; a3: pointer): cint{.extdecl, 
+proc slk_attr_on*(a2: cunsignedlong; a3: pointer): cint{.extdecl,
     importc: "slk_attr_on", dynlib: pdcursesdll.}
-proc slk_attrset*(a2: cunsignedlong): cint{.extdecl, importc: "slk_attrset", 
+proc slk_attrset*(a2: cunsignedlong): cint{.extdecl, importc: "slk_attrset",
     dynlib: pdcursesdll.}
-proc slk_attr_set*(a2: cunsignedlong; a3: cshort; a4: pointer): cint{.extdecl, 
+proc slk_attr_set*(a2: cunsignedlong; a3: cshort; a4: pointer): cint{.extdecl,
     importc: "slk_attr_set", dynlib: pdcursesdll.}
 proc slk_clear*(): cint{.extdecl, importc: "slk_clear", dynlib: pdcursesdll.}
-proc slk_color*(a2: cshort): cint{.extdecl, importc: "slk_color", 
+proc slk_color*(a2: cshort): cint{.extdecl, importc: "slk_color",
                                    dynlib: pdcursesdll.}
 proc slk_init*(a2: cint): cint{.extdecl, importc: "slk_init", dynlib: pdcursesdll.}
-proc slk_label*(a2: cint): cstring{.extdecl, importc: "slk_label", 
+proc slk_label*(a2: cint): cstring{.extdecl, importc: "slk_label",
                                     dynlib: pdcursesdll.}
-proc slk_noutrefresh*(): cint{.extdecl, importc: "slk_noutrefresh", 
+proc slk_noutrefresh*(): cint{.extdecl, importc: "slk_noutrefresh",
                                dynlib: pdcursesdll.}
 proc slk_refresh*(): cint{.extdecl, importc: "slk_refresh", dynlib: pdcursesdll.}
 proc slk_restore*(): cint{.extdecl, importc: "slk_restore", dynlib: pdcursesdll.}
-proc slk_set*(a2: cint; a3: cstring; a4: cint): cint{.extdecl, importc: "slk_set", 
+proc slk_set*(a2: cint; a3: cstring; a4: cint): cint{.extdecl, importc: "slk_set",
     dynlib: pdcursesdll.}
 proc slk_touch*(): cint{.extdecl, importc: "slk_touch", dynlib: pdcursesdll.}
 proc standend*(): cint{.extdecl, importc: "standend", dynlib: pdcursesdll.}
 proc standout*(): cint{.extdecl, importc: "standout", dynlib: pdcursesdll.}
 proc start_color*(): cint{.extdecl, importc: "start_color", dynlib: pdcursesdll.}
-proc subpad*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr TWINDOW{.
+proc subpad*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr WINDOW{.
     extdecl, importc: "subpad", dynlib: pdcursesdll.}
-proc subwin*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr TWINDOW{.
+proc subwin*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint; a6: cint): ptr WINDOW{.
     extdecl, importc: "subwin", dynlib: pdcursesdll.}
-proc syncok*(a2: ptr TWINDOW; a3: cunsignedchar): cint{.extdecl, importc: "syncok", 
+proc syncok*(a2: ptr WINDOW; a3: cunsignedchar): cint{.extdecl, importc: "syncok",
     dynlib: pdcursesdll.}
-proc termattrs*(): cunsignedlong{.extdecl, importc: "termattrs", 
+proc termattrs*(): cunsignedlong{.extdecl, importc: "termattrs",
                                   dynlib: pdcursesdll.}
-proc termattrs2*(): cunsignedlong{.extdecl, importc: "term_attrs", 
+proc termattrs2*(): cunsignedlong{.extdecl, importc: "term_attrs",
                                    dynlib: pdcursesdll.}
 proc termname*(): cstring{.extdecl, importc: "termname", dynlib: pdcursesdll.}
 proc timeout*(a2: cint){.extdecl, importc: "timeout", dynlib: pdcursesdll.}
-proc touchline*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, 
+proc touchline*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
     importc: "touchline", dynlib: pdcursesdll.}
-proc touchwin*(a2: ptr TWINDOW): cint{.extdecl, importc: "touchwin", 
+proc touchwin*(a2: ptr WINDOW): cint{.extdecl, importc: "touchwin",
                                       dynlib: pdcursesdll.}
-proc typeahead*(a2: cint): cint{.extdecl, importc: "typeahead", 
+proc typeahead*(a2: cint): cint{.extdecl, importc: "typeahead",
                                  dynlib: pdcursesdll.}
-proc untouchwin*(a2: ptr TWINDOW): cint{.extdecl, importc: "untouchwin", 
+proc untouchwin*(a2: ptr WINDOW): cint{.extdecl, importc: "untouchwin",
                                         dynlib: pdcursesdll.}
 proc use_env*(a2: cunsignedchar){.extdecl, importc: "use_env", dynlib: pdcursesdll.}
-proc vidattr*(a2: cunsignedlong): cint{.extdecl, importc: "vidattr", 
+proc vidattr*(a2: cunsignedlong): cint{.extdecl, importc: "vidattr",
                                         dynlib: pdcursesdll.}
-proc vid_attr*(a2: cunsignedlong; a3: cshort; a4: pointer): cint{.extdecl, 
+proc vid_attr*(a2: cunsignedlong; a3: cshort; a4: pointer): cint{.extdecl,
     importc: "vid_attr", dynlib: pdcursesdll.}
 #int     vidputs(chtype, int (*)(int));
 #int     vid_puts(attr_t, short, void *, int (*)(int));
-proc vline*(a2: cunsignedlong; a3: cint): cint{.extdecl, importc: "vline", 
+proc vline*(a2: cunsignedlong; a3: cint): cint{.extdecl, importc: "vline",
     dynlib: pdcursesdll.}
-proc vwprintw*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, varargs,
+proc vwprintw*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
     importc: "vw_printw", dynlib: pdcursesdll.}
-proc vwprintw2*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, varargs,
+proc vwprintw2*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
     importc: "vwprintw", dynlib: pdcursesdll.}
-proc vwscanw*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, varargs,
+proc vwscanw*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
     importc: "vw_scanw", dynlib: pdcursesdll.}
-proc vwscanw2*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, varargs,
+proc vwscanw2*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, varargs,
     importc: "vwscanw", dynlib: pdcursesdll.}
-proc waddchnstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl, 
+proc waddchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
     importc: "waddchnstr", dynlib: pdcursesdll.}
-proc waddchstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl, 
+proc waddchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
     importc: "waddchstr", dynlib: pdcursesdll.}
-proc waddch*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, importc: "waddch", 
+proc waddch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl, importc: "waddch",
     dynlib: pdcursesdll.}
-proc waddnstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl, 
+proc waddnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
     importc: "waddnstr", dynlib: pdcursesdll.}
-proc waddstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, importc: "waddstr", 
+proc waddstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "waddstr",
     dynlib: pdcursesdll.}
-proc wattroff*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, 
+proc wattroff*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
     importc: "wattroff", dynlib: pdcursesdll.}
-proc wattron*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, 
+proc wattron*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
     importc: "wattron", dynlib: pdcursesdll.}
-proc wattrset*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, 
+proc wattrset*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
     importc: "wattrset", dynlib: pdcursesdll.}
-proc wattr_get*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: ptr cshort; 
-                a5: pointer): cint{.extdecl, importc: "wattr_get", 
+proc wattr_get*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: ptr cshort;
+                a5: pointer): cint{.extdecl, importc: "wattr_get",
                                     dynlib: pdcursesdll.}
-proc wattr_off*(a2: ptr TWINDOW; a3: cunsignedlong; a4: pointer): cint{.extdecl, 
+proc wattr_off*(a2: ptr WINDOW; a3: cunsignedlong; a4: pointer): cint{.extdecl,
     importc: "wattr_off", dynlib: pdcursesdll.}
-proc wattr_on*(a2: ptr TWINDOW; a3: cunsignedlong; a4: pointer): cint{.extdecl, 
+proc wattr_on*(a2: ptr WINDOW; a3: cunsignedlong; a4: pointer): cint{.extdecl,
     importc: "wattr_on", dynlib: pdcursesdll.}
-proc wattr_set*(a2: ptr TWINDOW; a3: cunsignedlong; a4: cshort; a5: pointer): cint{.
+proc wattr_set*(a2: ptr WINDOW; a3: cunsignedlong; a4: cshort; a5: pointer): cint{.
     extdecl, importc: "wattr_set", dynlib: pdcursesdll.}
-proc wbkgdset*(a2: ptr TWINDOW; a3: cunsignedlong){.extdecl, importc: "wbkgdset", 
+proc wbkgdset*(a2: ptr WINDOW; a3: cunsignedlong){.extdecl, importc: "wbkgdset",
     dynlib: pdcursesdll.}
-proc wbkgd*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, importc: "wbkgd", 
+proc wbkgd*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl, importc: "wbkgd",
     dynlib: pdcursesdll.}
-proc wborder*(a2: ptr TWINDOW; a3: cunsignedlong; a4: cunsignedlong; 
-              a5: cunsignedlong; a6: cunsignedlong; a7: cunsignedlong; 
+proc wborder*(a2: ptr WINDOW; a3: cunsignedlong; a4: cunsignedlong;
+              a5: cunsignedlong; a6: cunsignedlong; a7: cunsignedlong;
               a8: cunsignedlong; a9: cunsignedlong; a10: cunsignedlong): cint{.
     extdecl, importc: "wborder", dynlib: pdcursesdll.}
-proc wchgat*(a2: ptr TWINDOW; a3: cint; a4: cunsignedlong; a5: cshort; 
+proc wchgat*(a2: ptr WINDOW; a3: cint; a4: cunsignedlong; a5: cshort;
              a6: pointer): cint{.extdecl, importc: "wchgat", dynlib: pdcursesdll.}
-proc wclear*(a2: ptr TWINDOW): cint{.extdecl, importc: "wclear", 
+proc wclear*(a2: ptr WINDOW): cint{.extdecl, importc: "wclear",
                                     dynlib: pdcursesdll.}
-proc wclrtobot*(a2: ptr TWINDOW): cint{.extdecl, importc: "wclrtobot", 
+proc wclrtobot*(a2: ptr WINDOW): cint{.extdecl, importc: "wclrtobot",
                                        dynlib: pdcursesdll.}
-proc wclrtoeol*(a2: ptr TWINDOW): cint{.extdecl, importc: "wclrtoeol", 
+proc wclrtoeol*(a2: ptr WINDOW): cint{.extdecl, importc: "wclrtoeol",
                                        dynlib: pdcursesdll.}
-proc wcolor_set*(a2: ptr TWINDOW; a3: cshort; a4: pointer): cint{.extdecl, 
+proc wcolor_set*(a2: ptr WINDOW; a3: cshort; a4: pointer): cint{.extdecl,
     importc: "wcolor_set", dynlib: pdcursesdll.}
-proc wcursyncup*(a2: ptr TWINDOW){.extdecl, importc: "wcursyncup", 
+proc wcursyncup*(a2: ptr WINDOW){.extdecl, importc: "wcursyncup",
                                   dynlib: pdcursesdll.}
-proc wdelch*(a2: ptr TWINDOW): cint{.extdecl, importc: "wdelch", 
+proc wdelch*(a2: ptr WINDOW): cint{.extdecl, importc: "wdelch",
                                     dynlib: pdcursesdll.}
-proc wdeleteln*(a2: ptr TWINDOW): cint{.extdecl, importc: "wdeleteln", 
+proc wdeleteln*(a2: ptr WINDOW): cint{.extdecl, importc: "wdeleteln",
                                        dynlib: pdcursesdll.}
-proc wechochar*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, 
+proc wechochar*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
     importc: "wechochar", dynlib: pdcursesdll.}
-proc werase*(a2: ptr TWINDOW): cint{.extdecl, importc: "werase", 
+proc werase*(a2: ptr WINDOW): cint{.extdecl, importc: "werase",
                                     dynlib: pdcursesdll.}
-proc wgetch*(a2: ptr TWINDOW): cint{.extdecl, importc: "wgetch", 
+proc wgetch*(a2: ptr WINDOW): cint{.extdecl, importc: "wgetch",
                                     dynlib: pdcursesdll.}
-proc wgetnstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl, 
+proc wgetnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
     importc: "wgetnstr", dynlib: pdcursesdll.}
-proc wgetstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, importc: "wgetstr", 
+proc wgetstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "wgetstr",
     dynlib: pdcursesdll.}
-proc whline*(a2: ptr TWINDOW; a3: cunsignedlong; a4: cint): cint{.extdecl, 
+proc whline*(a2: ptr WINDOW; a3: cunsignedlong; a4: cint): cint{.extdecl,
     importc: "whline", dynlib: pdcursesdll.}
-proc winchnstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl, 
+proc winchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
     importc: "winchnstr", dynlib: pdcursesdll.}
-proc winchstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl, 
+proc winchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
     importc: "winchstr", dynlib: pdcursesdll.}
-proc winch*(a2: ptr TWINDOW): cunsignedlong{.extdecl, importc: "winch", 
+proc winch*(a2: ptr WINDOW): cunsignedlong{.extdecl, importc: "winch",
     dynlib: pdcursesdll.}
-proc winnstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl, 
+proc winnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
     importc: "winnstr", dynlib: pdcursesdll.}
-proc winsch*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, importc: "winsch", 
+proc winsch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl, importc: "winsch",
     dynlib: pdcursesdll.}
-proc winsdelln*(a2: ptr TWINDOW; a3: cint): cint{.extdecl, importc: "winsdelln", 
+proc winsdelln*(a2: ptr WINDOW; a3: cint): cint{.extdecl, importc: "winsdelln",
     dynlib: pdcursesdll.}
-proc winsertln*(a2: ptr TWINDOW): cint{.extdecl, importc: "winsertln", 
+proc winsertln*(a2: ptr WINDOW): cint{.extdecl, importc: "winsertln",
                                        dynlib: pdcursesdll.}
-proc winsnstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl, 
+proc winsnstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
     importc: "winsnstr", dynlib: pdcursesdll.}
-proc winsstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, importc: "winsstr", 
+proc winsstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "winsstr",
     dynlib: pdcursesdll.}
-proc winstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, importc: "winstr", 
+proc winstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "winstr",
     dynlib: pdcursesdll.}
-proc wmove*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, importc: "wmove", 
+proc wmove*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl, importc: "wmove",
     dynlib: pdcursesdll.}
-proc wnoutrefresh*(a2: ptr TWINDOW): cint{.extdecl, importc: "wnoutrefresh", 
+proc wnoutrefresh*(a2: ptr WINDOW): cint{.extdecl, importc: "wnoutrefresh",
     dynlib: pdcursesdll.}
-proc wprintw*(a2: ptr TWINDOW; a3: cstring): cint{.varargs, extdecl, 
+proc wprintw*(a2: ptr WINDOW; a3: cstring): cint{.varargs, extdecl,
     importc: "wprintw", dynlib: pdcursesdll.}
-proc wredrawln*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, 
+proc wredrawln*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
     importc: "wredrawln", dynlib: pdcursesdll.}
-proc wrefresh*(a2: ptr TWINDOW): cint{.extdecl, importc: "wrefresh", 
+proc wrefresh*(a2: ptr WINDOW): cint{.extdecl, importc: "wrefresh",
                                       dynlib: pdcursesdll.}
-proc wscanw*(a2: ptr TWINDOW; a3: cstring): cint{.varargs, extdecl, 
+proc wscanw*(a2: ptr WINDOW; a3: cstring): cint{.varargs, extdecl,
     importc: "wscanw", dynlib: pdcursesdll.}
-proc wscrl*(a2: ptr TWINDOW; a3: cint): cint{.extdecl, importc: "wscrl", 
+proc wscrl*(a2: ptr WINDOW; a3: cint): cint{.extdecl, importc: "wscrl",
     dynlib: pdcursesdll.}
-proc wsetscrreg*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, 
+proc wsetscrreg*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
     importc: "wsetscrreg", dynlib: pdcursesdll.}
-proc wstandend*(a2: ptr TWINDOW): cint{.extdecl, importc: "wstandend", 
+proc wstandend*(a2: ptr WINDOW): cint{.extdecl, importc: "wstandend",
                                        dynlib: pdcursesdll.}
-proc wstandout*(a2: ptr TWINDOW): cint{.extdecl, importc: "wstandout", 
+proc wstandout*(a2: ptr WINDOW): cint{.extdecl, importc: "wstandout",
                                        dynlib: pdcursesdll.}
-proc wsyncdown*(a2: ptr TWINDOW){.extdecl, importc: "wsyncdown", 
+proc wsyncdown*(a2: ptr WINDOW){.extdecl, importc: "wsyncdown",
                                  dynlib: pdcursesdll.}
-proc wsyncup*(a2: ptr TWINDOW){.extdecl, importc: "wsyncup", dynlib: pdcursesdll.}
-proc wtimeout*(a2: ptr TWINDOW; a3: cint){.extdecl, importc: "wtimeout", 
+proc wsyncup*(a2: ptr WINDOW){.extdecl, importc: "wsyncup", dynlib: pdcursesdll.}
+proc wtimeout*(a2: ptr WINDOW; a3: cint){.extdecl, importc: "wtimeout",
     dynlib: pdcursesdll.}
-proc wtouchln*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cint): cint{.extdecl, 
+proc wtouchln*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cint): cint{.extdecl,
     importc: "wtouchln", dynlib: pdcursesdll.}
-proc wvline*(a2: ptr TWINDOW; a3: cunsignedlong; a4: cint): cint{.extdecl, 
+proc wvline*(a2: ptr WINDOW; a3: cunsignedlong; a4: cint): cint{.extdecl,
     importc: "wvline", dynlib: pdcursesdll.}
-proc addnwstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "addnwstr", 
+proc addnwstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "addnwstr",
     dynlib: pdcursesdll.}
-proc addwstr*(a2: cstring): cint{.extdecl, importc: "addwstr", 
+proc addwstr*(a2: cstring): cint{.extdecl, importc: "addwstr",
                                       dynlib: pdcursesdll.}
-proc add_wch*(a2: ptr cunsignedlong): cint{.extdecl, importc: "add_wch", 
+proc add_wch*(a2: ptr cunsignedlong): cint{.extdecl, importc: "add_wch",
     dynlib: pdcursesdll.}
-proc add_wchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl, 
+proc add_wchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
     importc: "add_wchnstr", dynlib: pdcursesdll.}
-proc add_wchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "add_wchstr", 
+proc add_wchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "add_wchstr",
     dynlib: pdcursesdll.}
-proc border_set*(a2: ptr cunsignedlong; a3: ptr cunsignedlong; 
-                 a4: ptr cunsignedlong; a5: ptr cunsignedlong; 
-                 a6: ptr cunsignedlong; a7: ptr cunsignedlong; 
-                 a8: ptr cunsignedlong; a9: ptr cunsignedlong): cint{.extdecl, 
+proc border_set*(a2: ptr cunsignedlong; a3: ptr cunsignedlong;
+                 a4: ptr cunsignedlong; a5: ptr cunsignedlong;
+                 a6: ptr cunsignedlong; a7: ptr cunsignedlong;
+                 a8: ptr cunsignedlong; a9: ptr cunsignedlong): cint{.extdecl,
     importc: "border_set", dynlib: pdcursesdll.}
-proc box_set*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: ptr cunsignedlong): cint{.
+proc box_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: ptr cunsignedlong): cint{.
     extdecl, importc: "box_set", dynlib: pdcursesdll.}
-proc echo_wchar*(a2: ptr cunsignedlong): cint{.extdecl, importc: "echo_wchar", 
+proc echo_wchar*(a2: ptr cunsignedlong): cint{.extdecl, importc: "echo_wchar",
     dynlib: pdcursesdll.}
-proc erasewchar*(a2: cstring): cint{.extdecl, importc: "erasewchar", 
+proc erasewchar*(a2: cstring): cint{.extdecl, importc: "erasewchar",
     dynlib: pdcursesdll.}
-proc getbkgrnd*(a2: ptr cunsignedlong): cint{.extdecl, importc: "getbkgrnd", 
+proc getbkgrnd*(a2: ptr cunsignedlong): cint{.extdecl, importc: "getbkgrnd",
     dynlib: pdcursesdll.}
-proc getcchar*(a2: ptr cunsignedlong; a3: cstring; a4: ptr cunsignedlong; 
-               a5: ptr cshort; a6: pointer): cint{.extdecl, importc: "getcchar", 
+proc getcchar*(a2: ptr cunsignedlong; a3: cstring; a4: ptr cunsignedlong;
+               a5: ptr cshort; a6: pointer): cint{.extdecl, importc: "getcchar",
     dynlib: pdcursesdll.}
-proc getn_wstr*(a2: ptr cint; a3: cint): cint{.extdecl, importc: "getn_wstr", 
+proc getn_wstr*(a2: ptr cint; a3: cint): cint{.extdecl, importc: "getn_wstr",
     dynlib: pdcursesdll.}
-proc get_wch*(a2: ptr cint): cint{.extdecl, importc: "get_wch", 
+proc get_wch*(a2: ptr cint): cint{.extdecl, importc: "get_wch",
                                      dynlib: pdcursesdll.}
-proc get_wstr*(a2: ptr cint): cint{.extdecl, importc: "get_wstr", 
+proc get_wstr*(a2: ptr cint): cint{.extdecl, importc: "get_wstr",
                                       dynlib: pdcursesdll.}
-proc hline_set*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl, 
+proc hline_set*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
     importc: "hline_set", dynlib: pdcursesdll.}
-proc innwstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "innwstr", 
+proc innwstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "innwstr",
     dynlib: pdcursesdll.}
-proc ins_nwstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "ins_nwstr", 
+proc ins_nwstr*(a2: cstring; a3: cint): cint{.extdecl, importc: "ins_nwstr",
     dynlib: pdcursesdll.}
-proc ins_wch*(a2: ptr cunsignedlong): cint{.extdecl, importc: "ins_wch", 
+proc ins_wch*(a2: ptr cunsignedlong): cint{.extdecl, importc: "ins_wch",
     dynlib: pdcursesdll.}
-proc ins_wstr*(a2: cstring): cint{.extdecl, importc: "ins_wstr", 
+proc ins_wstr*(a2: cstring): cint{.extdecl, importc: "ins_wstr",
                                        dynlib: pdcursesdll.}
-proc inwstr*(a2: cstring): cint{.extdecl, importc: "inwstr", 
+proc inwstr*(a2: cstring): cint{.extdecl, importc: "inwstr",
                                      dynlib: pdcursesdll.}
-proc in_wch*(a2: ptr cunsignedlong): cint{.extdecl, importc: "in_wch", 
+proc in_wch*(a2: ptr cunsignedlong): cint{.extdecl, importc: "in_wch",
     dynlib: pdcursesdll.}
-proc in_wchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl, 
+proc in_wchnstr*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
     importc: "in_wchnstr", dynlib: pdcursesdll.}
-proc in_wchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "in_wchstr", 
+proc in_wchstr*(a2: ptr cunsignedlong): cint{.extdecl, importc: "in_wchstr",
     dynlib: pdcursesdll.}
-proc key_name*(a2: char): cstring{.extdecl, importc: "key_name", 
+proc key_name*(a2: char): cstring{.extdecl, importc: "key_name",
                                       dynlib: pdcursesdll.}
-proc killwchar*(a2: cstring): cint{.extdecl, importc: "killwchar", 
+proc killwchar*(a2: cstring): cint{.extdecl, importc: "killwchar",
                                         dynlib: pdcursesdll.}
-proc mvaddnwstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl, 
+proc mvaddnwstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
     importc: "mvaddnwstr", dynlib: pdcursesdll.}
-proc mvaddwstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl, 
+proc mvaddwstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
     importc: "mvaddwstr", dynlib: pdcursesdll.}
-proc mvadd_wch*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl, 
+proc mvadd_wch*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
     importc: "mvadd_wch", dynlib: pdcursesdll.}
 proc mvadd_wchnstr*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
     extdecl, importc: "mvadd_wchnstr", dynlib: pdcursesdll.}
-proc mvadd_wchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl, 
+proc mvadd_wchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
     importc: "mvadd_wchstr", dynlib: pdcursesdll.}
-proc mvgetn_wstr*(a2: cint; a3: cint; a4: ptr cint; a5: cint): cint{.extdecl, 
+proc mvgetn_wstr*(a2: cint; a3: cint; a4: ptr cint; a5: cint): cint{.extdecl,
     importc: "mvgetn_wstr", dynlib: pdcursesdll.}
-proc mvget_wch*(a2: cint; a3: cint; a4: ptr cint): cint{.extdecl, 
+proc mvget_wch*(a2: cint; a3: cint; a4: ptr cint): cint{.extdecl,
     importc: "mvget_wch", dynlib: pdcursesdll.}
-proc mvget_wstr*(a2: cint; a3: cint; a4: ptr cint): cint{.extdecl, 
+proc mvget_wstr*(a2: cint; a3: cint; a4: ptr cint): cint{.extdecl,
     importc: "mvget_wstr", dynlib: pdcursesdll.}
 proc mvhline_set*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
     extdecl, importc: "mvhline_set", dynlib: pdcursesdll.}
-proc mvinnwstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl, 
+proc mvinnwstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
     importc: "mvinnwstr", dynlib: pdcursesdll.}
-proc mvins_nwstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl, 
+proc mvins_nwstr*(a2: cint; a3: cint; a4: cstring; a5: cint): cint{.extdecl,
     importc: "mvins_nwstr", dynlib: pdcursesdll.}
-proc mvins_wch*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl, 
+proc mvins_wch*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
     importc: "mvins_wch", dynlib: pdcursesdll.}
-proc mvins_wstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl, 
+proc mvins_wstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
     importc: "mvins_wstr", dynlib: pdcursesdll.}
-proc mvinwstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl, 
+proc mvinwstr*(a2: cint; a3: cint; a4: cstring): cint{.extdecl,
     importc: "mvinwstr", dynlib: pdcursesdll.}
-proc mvin_wch*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl, 
+proc mvin_wch*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
     importc: "mvin_wch", dynlib: pdcursesdll.}
 proc mvin_wchnstr*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
     extdecl, importc: "mvin_wchnstr", dynlib: pdcursesdll.}
-proc mvin_wchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl, 
+proc mvin_wchstr*(a2: cint; a3: cint; a4: ptr cunsignedlong): cint{.extdecl,
     importc: "mvin_wchstr", dynlib: pdcursesdll.}
 proc mvvline_set*(a2: cint; a3: cint; a4: ptr cunsignedlong; a5: cint): cint{.
     extdecl, importc: "mvvline_set", dynlib: pdcursesdll.}
-proc mvwaddnwstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
+proc mvwaddnwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
     extdecl, importc: "mvwaddnwstr", dynlib: pdcursesdll.}
-proc mvwaddwstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.
+proc mvwaddwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.
     extdecl, importc: "mvwaddwstr", dynlib: pdcursesdll.}
-proc mvwadd_wch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
+proc mvwadd_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
     extdecl, importc: "mvwadd_wch", dynlib: pdcursesdll.}
-proc mvwadd_wchnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong; 
-                     a6: cint): cint{.extdecl, importc: "mvwadd_wchnstr", 
+proc mvwadd_wchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
+                     a6: cint): cint{.extdecl, importc: "mvwadd_wchnstr",
                                       dynlib: pdcursesdll.}
-proc mvwadd_wchstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
+proc mvwadd_wchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
     extdecl, importc: "mvwadd_wchstr", dynlib: pdcursesdll.}
-proc mvwgetn_wstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cint; a6: cint): cint{.
+proc mvwgetn_wstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cint; a6: cint): cint{.
     extdecl, importc: "mvwgetn_wstr", dynlib: pdcursesdll.}
-proc mvwget_wch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cint): cint{.
+proc mvwget_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cint): cint{.
     extdecl, importc: "mvwget_wch", dynlib: pdcursesdll.}
-proc mvwget_wstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cint): cint{.
+proc mvwget_wstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cint): cint{.
     extdecl, importc: "mvwget_wstr", dynlib: pdcursesdll.}
-proc mvwhline_set*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong; 
-                   a6: cint): cint{.extdecl, importc: "mvwhline_set", 
+proc mvwhline_set*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
+                   a6: cint): cint{.extdecl, importc: "mvwhline_set",
                                     dynlib: pdcursesdll.}
-proc mvwinnwstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
+proc mvwinnwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
     extdecl, importc: "mvwinnwstr", dynlib: pdcursesdll.}
-proc mvwins_nwstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
+proc mvwins_nwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring; a6: cint): cint{.
     extdecl, importc: "mvwins_nwstr", dynlib: pdcursesdll.}
-proc mvwins_wch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
+proc mvwins_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
     extdecl, importc: "mvwins_wch", dynlib: pdcursesdll.}
-proc mvwins_wstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.
+proc mvwins_wstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.
     extdecl, importc: "mvwins_wstr", dynlib: pdcursesdll.}
-proc mvwin_wch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
+proc mvwin_wch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
     extdecl, importc: "mvwin_wch", dynlib: pdcursesdll.}
-proc mvwin_wchnstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong; 
-                    a6: cint): cint{.extdecl, importc: "mvwin_wchnstr", 
+proc mvwin_wchnstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
+                    a6: cint): cint{.extdecl, importc: "mvwin_wchnstr",
                                      dynlib: pdcursesdll.}
-proc mvwin_wchstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
+proc mvwin_wchstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong): cint{.
     extdecl, importc: "mvwin_wchstr", dynlib: pdcursesdll.}
-proc mvwinwstr*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cstring): cint{.
+proc mvwinwstr*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cstring): cint{.
     extdecl, importc: "mvwinwstr", dynlib: pdcursesdll.}
-proc mvwvline_set*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong; 
-                   a6: cint): cint{.extdecl, importc: "mvwvline_set", 
+proc mvwvline_set*(a2: ptr WINDOW; a3: cint; a4: cint; a5: ptr cunsignedlong;
+                   a6: cint): cint{.extdecl, importc: "mvwvline_set",
                                     dynlib: pdcursesdll.}
-proc pecho_wchar*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl, 
+proc pecho_wchar*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
     importc: "pecho_wchar", dynlib: pdcursesdll.}
-proc setcchar*(a2: ptr cunsignedlong; a3: cstring; a4: cunsignedlong; 
-               a5: cshort; a6: pointer): cint{.extdecl, importc: "setcchar", 
+proc setcchar*(a2: ptr cunsignedlong; a3: cstring; a4: cunsignedlong;
+               a5: cshort; a6: pointer): cint{.extdecl, importc: "setcchar",
     dynlib: pdcursesdll.}
-proc slk_wset*(a2: cint; a3: cstring; a4: cint): cint{.extdecl, 
+proc slk_wset*(a2: cint; a3: cstring; a4: cint): cint{.extdecl,
     importc: "slk_wset", dynlib: pdcursesdll.}
-proc unget_wch*(a2: char): cint{.extdecl, importc: "unget_wch", 
+proc unget_wch*(a2: char): cint{.extdecl, importc: "unget_wch",
                                     dynlib: pdcursesdll.}
-proc vline_set*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl, 
+proc vline_set*(a2: ptr cunsignedlong; a3: cint): cint{.extdecl,
     importc: "vline_set", dynlib: pdcursesdll.}
-proc waddnwstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl, 
+proc waddnwstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
     importc: "waddnwstr", dynlib: pdcursesdll.}
-proc waddwstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, 
+proc waddwstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl,
     importc: "waddwstr", dynlib: pdcursesdll.}
-proc wadd_wch*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl, 
+proc wadd_wch*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
     importc: "wadd_wch", dynlib: pdcursesdll.}
-proc wadd_wchnstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.
+proc wadd_wchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.
     extdecl, importc: "wadd_wchnstr", dynlib: pdcursesdll.}
-proc wadd_wchstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl, 
+proc wadd_wchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
     importc: "wadd_wchstr", dynlib: pdcursesdll.}
-proc wbkgrnd*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl, 
+proc wbkgrnd*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
     importc: "wbkgrnd", dynlib: pdcursesdll.}
-proc wbkgrndset*(a2: ptr TWINDOW; a3: ptr cunsignedlong){.extdecl, 
+proc wbkgrndset*(a2: ptr WINDOW; a3: ptr cunsignedlong){.extdecl,
     importc: "wbkgrndset", dynlib: pdcursesdll.}
-proc wborder_set*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: ptr cunsignedlong; 
-                  a5: ptr cunsignedlong; a6: ptr cunsignedlong; 
-                  a7: ptr cunsignedlong; a8: ptr cunsignedlong; 
-                  a9: ptr cunsignedlong; a10: ptr cunsignedlong): cint{.extdecl, 
+proc wborder_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: ptr cunsignedlong;
+                  a5: ptr cunsignedlong; a6: ptr cunsignedlong;
+                  a7: ptr cunsignedlong; a8: ptr cunsignedlong;
+                  a9: ptr cunsignedlong; a10: ptr cunsignedlong): cint{.extdecl,
     importc: "wborder_set", dynlib: pdcursesdll.}
-proc wecho_wchar*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl, 
+proc wecho_wchar*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
     importc: "wecho_wchar", dynlib: pdcursesdll.}
-proc wgetbkgrnd*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl, 
+proc wgetbkgrnd*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
     importc: "wgetbkgrnd", dynlib: pdcursesdll.}
-proc wgetn_wstr*(a2: ptr TWINDOW; a3: ptr cint; a4: cint): cint{.extdecl, 
+proc wgetn_wstr*(a2: ptr WINDOW; a3: ptr cint; a4: cint): cint{.extdecl,
     importc: "wgetn_wstr", dynlib: pdcursesdll.}
-proc wget_wch*(a2: ptr TWINDOW; a3: ptr cint): cint{.extdecl, 
+proc wget_wch*(a2: ptr WINDOW; a3: ptr cint): cint{.extdecl,
     importc: "wget_wch", dynlib: pdcursesdll.}
-proc wget_wstr*(a2: ptr TWINDOW; a3: ptr cint): cint{.extdecl, 
+proc wget_wstr*(a2: ptr WINDOW; a3: ptr cint): cint{.extdecl,
     importc: "wget_wstr", dynlib: pdcursesdll.}
-proc whline_set*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl, 
+proc whline_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
     importc: "whline_set", dynlib: pdcursesdll.}
-proc winnwstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl, 
+proc winnwstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
     importc: "winnwstr", dynlib: pdcursesdll.}
-proc wins_nwstr*(a2: ptr TWINDOW; a3: cstring; a4: cint): cint{.extdecl, 
+proc wins_nwstr*(a2: ptr WINDOW; a3: cstring; a4: cint): cint{.extdecl,
     importc: "wins_nwstr", dynlib: pdcursesdll.}
-proc wins_wch*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl, 
+proc wins_wch*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
     importc: "wins_wch", dynlib: pdcursesdll.}
-proc wins_wstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, 
+proc wins_wstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl,
     importc: "wins_wstr", dynlib: pdcursesdll.}
-proc winwstr*(a2: ptr TWINDOW; a3: cstring): cint{.extdecl, importc: "winwstr", 
+proc winwstr*(a2: ptr WINDOW; a3: cstring): cint{.extdecl, importc: "winwstr",
     dynlib: pdcursesdll.}
-proc win_wch*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl, 
+proc win_wch*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
     importc: "win_wch", dynlib: pdcursesdll.}
-proc win_wchnstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl, 
+proc win_wchnstr*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
     importc: "win_wchnstr", dynlib: pdcursesdll.}
-proc win_wchstr*(a2: ptr TWINDOW; a3: ptr cunsignedlong): cint{.extdecl, 
+proc win_wchstr*(a2: ptr WINDOW; a3: ptr cunsignedlong): cint{.extdecl,
     importc: "win_wchstr", dynlib: pdcursesdll.}
-proc wunctrl*(a2: ptr cunsignedlong): cstring{.extdecl, importc: "wunctrl", 
+proc wunctrl*(a2: ptr cunsignedlong): cstring{.extdecl, importc: "wunctrl",
     dynlib: pdcursesdll.}
-proc wvline_set*(a2: ptr TWINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl, 
+proc wvline_set*(a2: ptr WINDOW; a3: ptr cunsignedlong; a4: cint): cint{.extdecl,
     importc: "wvline_set", dynlib: pdcursesdll.}
-proc getattrs*(a2: ptr TWINDOW): cunsignedlong{.extdecl, importc: "getattrs", 
+proc getattrs*(a2: ptr WINDOW): cunsignedlong{.extdecl, importc: "getattrs",
     dynlib: pdcursesdll.}
-proc getbegx*(a2: ptr TWINDOW): cint{.extdecl, importc: "getbegx", 
+proc getbegx*(a2: ptr WINDOW): cint{.extdecl, importc: "getbegx",
                                      dynlib: pdcursesdll.}
-proc getbegy*(a2: ptr TWINDOW): cint{.extdecl, importc: "getbegy", 
+proc getbegy*(a2: ptr WINDOW): cint{.extdecl, importc: "getbegy",
                                      dynlib: pdcursesdll.}
-proc getmaxx*(a2: ptr TWINDOW): cint{.extdecl, importc: "getmaxx", 
+proc getmaxx*(a2: ptr WINDOW): cint{.extdecl, importc: "getmaxx",
                                      dynlib: pdcursesdll.}
-proc getmaxy*(a2: ptr TWINDOW): cint{.extdecl, importc: "getmaxy", 
+proc getmaxy*(a2: ptr WINDOW): cint{.extdecl, importc: "getmaxy",
                                      dynlib: pdcursesdll.}
-proc getparx*(a2: ptr TWINDOW): cint{.extdecl, importc: "getparx", 
+proc getparx*(a2: ptr WINDOW): cint{.extdecl, importc: "getparx",
                                      dynlib: pdcursesdll.}
-proc getpary*(a2: ptr TWINDOW): cint{.extdecl, importc: "getpary", 
+proc getpary*(a2: ptr WINDOW): cint{.extdecl, importc: "getpary",
                                      dynlib: pdcursesdll.}
-proc getcurx*(a2: ptr TWINDOW): cint{.extdecl, importc: "getcurx", 
+proc getcurx*(a2: ptr WINDOW): cint{.extdecl, importc: "getcurx",
                                      dynlib: pdcursesdll.}
-proc getcury*(a2: ptr TWINDOW): cint{.extdecl, importc: "getcury", 
+proc getcury*(a2: ptr WINDOW): cint{.extdecl, importc: "getcury",
                                      dynlib: pdcursesdll.}
 proc traceoff*(){.extdecl, importc: "traceoff", dynlib: pdcursesdll.}
 proc traceon*(){.extdecl, importc: "traceon", dynlib: pdcursesdll.}
-proc unctrl*(a2: cunsignedlong): cstring{.extdecl, importc: "unctrl", 
+proc unctrl*(a2: cunsignedlong): cstring{.extdecl, importc: "unctrl",
     dynlib: pdcursesdll.}
 proc crmode*(): cint{.extdecl, importc: "crmode", dynlib: pdcursesdll.}
 proc nocrmode*(): cint{.extdecl, importc: "nocrmode", dynlib: pdcursesdll.}
@@ -1351,156 +1366,156 @@ proc draino*(a2: cint): cint{.extdecl, importc: "draino", dynlib: pdcursesdll.}
 proc resetterm*(): cint{.extdecl, importc: "resetterm", dynlib: pdcursesdll.}
 proc fixterm*(): cint{.extdecl, importc: "fixterm", dynlib: pdcursesdll.}
 proc saveterm*(): cint{.extdecl, importc: "saveterm", dynlib: pdcursesdll.}
-proc setsyx*(a2: cint; a3: cint): cint{.extdecl, importc: "setsyx", 
+proc setsyx*(a2: cint; a3: cint): cint{.extdecl, importc: "setsyx",
                                         dynlib: pdcursesdll.}
-proc mouse_set*(a2: cunsignedlong): cint{.extdecl, importc: "mouse_set", 
+proc mouse_set*(a2: cunsignedlong): cint{.extdecl, importc: "mouse_set",
     dynlib: pdcursesdll.}
-proc mouse_on*(a2: cunsignedlong): cint{.extdecl, importc: "mouse_on", 
+proc mouse_on*(a2: cunsignedlong): cint{.extdecl, importc: "mouse_on",
     dynlib: pdcursesdll.}
-proc mouse_off*(a2: cunsignedlong): cint{.extdecl, importc: "mouse_off", 
+proc mouse_off*(a2: cunsignedlong): cint{.extdecl, importc: "mouse_off",
     dynlib: pdcursesdll.}
-proc request_mouse_pos*(): cint{.extdecl, importc: "request_mouse_pos", 
+proc request_mouse_pos*(): cint{.extdecl, importc: "request_mouse_pos",
                                  dynlib: pdcursesdll.}
-proc map_button*(a2: cunsignedlong): cint{.extdecl, importc: "map_button", 
+proc map_button*(a2: cunsignedlong): cint{.extdecl, importc: "map_button",
     dynlib: pdcursesdll.}
-proc wmouse_position*(a2: ptr TWINDOW; a3: ptr cint; a4: ptr cint){.extdecl, 
+proc wmouse_position*(a2: ptr WINDOW; a3: ptr cint; a4: ptr cint){.extdecl,
     importc: "wmouse_position", dynlib: pdcursesdll.}
 proc getmouse*(): cunsignedlong{.extdecl, importc: "getmouse", dynlib: pdcursesdll.}
 proc getbmap*(): cunsignedlong{.extdecl, importc: "getbmap", dynlib: pdcursesdll.}
-proc assume_default_colors*(a2: cint; a3: cint): cint{.extdecl, 
+proc assume_default_colors*(a2: cint; a3: cint): cint{.extdecl,
     importc: "assume_default_colors", dynlib: pdcursesdll.}
-proc curses_version*(): cstring{.extdecl, importc: "curses_version", 
+proc curses_version*(): cstring{.extdecl, importc: "curses_version",
                                  dynlib: pdcursesdll.}
-proc has_key*(a2: cint): cunsignedchar{.extdecl, importc: "has_key", 
+proc has_key*(a2: cint): cunsignedchar{.extdecl, importc: "has_key",
                                         dynlib: pdcursesdll.}
-proc use_default_colors*(): cint{.extdecl, importc: "use_default_colors", 
+proc use_default_colors*(): cint{.extdecl, importc: "use_default_colors",
                                   dynlib: pdcursesdll.}
-proc wresize*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, 
+proc wresize*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
     importc: "wresize", dynlib: pdcursesdll.}
-proc mouseinterval*(a2: cint): cint{.extdecl, importc: "mouseinterval", 
+proc mouseinterval*(a2: cint): cint{.extdecl, importc: "mouseinterval",
                                      dynlib: pdcursesdll.}
-proc mousemask*(a2: cunsignedlong; a3: ptr cunsignedlong): cunsignedlong{.extdecl, 
+proc mousemask*(a2: cunsignedlong; a3: ptr cunsignedlong): cunsignedlong{.extdecl,
     importc: "mousemask", dynlib: pdcursesdll.}
 proc mouse_trafo*(a2: ptr cint; a3: ptr cint; a4: cunsignedchar): cunsignedchar{.
     extdecl, importc: "mouse_trafo", dynlib: pdcursesdll.}
-proc nc_getmouse*(a2: ptr TMEVENT): cint{.extdecl, importc: "nc_getmouse", 
+proc nc_getmouse*(a2: ptr MEVENT): cint{.extdecl, importc: "nc_getmouse",
     dynlib: pdcursesdll.}
-proc ungetmouse*(a2: ptr TMEVENT): cint{.extdecl, importc: "ungetmouse", 
+proc ungetmouse*(a2: ptr MEVENT): cint{.extdecl, importc: "ungetmouse",
                                         dynlib: pdcursesdll.}
-proc wenclose*(a2: ptr TWINDOW; a3: cint; a4: cint): cunsignedchar{.extdecl, 
+proc wenclose*(a2: ptr WINDOW; a3: cint; a4: cint): cunsignedchar{.extdecl,
     importc: "wenclose", dynlib: pdcursesdll.}
-proc wmouse_trafo*(a2: ptr TWINDOW; a3: ptr cint; a4: ptr cint; a5: cunsignedchar): cunsignedchar{.
+proc wmouse_trafo*(a2: ptr WINDOW; a3: ptr cint; a4: ptr cint; a5: cunsignedchar): cunsignedchar{.
     extdecl, importc: "wmouse_trafo", dynlib: pdcursesdll.}
-proc addrawch*(a2: cunsignedlong): cint{.extdecl, importc: "addrawch", 
+proc addrawch*(a2: cunsignedlong): cint{.extdecl, importc: "addrawch",
     dynlib: pdcursesdll.}
-proc insrawch*(a2: cunsignedlong): cint{.extdecl, importc: "insrawch", 
+proc insrawch*(a2: cunsignedlong): cint{.extdecl, importc: "insrawch",
     dynlib: pdcursesdll.}
-proc is_termresized*(): cunsignedchar{.extdecl, importc: "is_termresized", 
+proc is_termresized*(): cunsignedchar{.extdecl, importc: "is_termresized",
                                        dynlib: pdcursesdll.}
-proc mvaddrawch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl, 
+proc mvaddrawch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl,
     importc: "mvaddrawch", dynlib: pdcursesdll.}
-proc mvdeleteln*(a2: cint; a3: cint): cint{.extdecl, importc: "mvdeleteln", 
+proc mvdeleteln*(a2: cint; a3: cint): cint{.extdecl, importc: "mvdeleteln",
     dynlib: pdcursesdll.}
-proc mvinsertln*(a2: cint; a3: cint): cint{.extdecl, importc: "mvinsertln", 
+proc mvinsertln*(a2: cint; a3: cint): cint{.extdecl, importc: "mvinsertln",
     dynlib: pdcursesdll.}
-proc mvinsrawch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl, 
+proc mvinsrawch*(a2: cint; a3: cint; a4: cunsignedlong): cint{.extdecl,
     importc: "mvinsrawch", dynlib: pdcursesdll.}
-proc mvwaddrawch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
+proc mvwaddrawch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
     extdecl, importc: "mvwaddrawch", dynlib: pdcursesdll.}
-proc mvwdeleteln*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, 
+proc mvwdeleteln*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
     importc: "mvwdeleteln", dynlib: pdcursesdll.}
-proc mvwinsertln*(a2: ptr TWINDOW; a3: cint; a4: cint): cint{.extdecl, 
+proc mvwinsertln*(a2: ptr WINDOW; a3: cint; a4: cint): cint{.extdecl,
     importc: "mvwinsertln", dynlib: pdcursesdll.}
-proc mvwinsrawch*(a2: ptr TWINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
+proc mvwinsrawch*(a2: ptr WINDOW; a3: cint; a4: cint; a5: cunsignedlong): cint{.
     extdecl, importc: "mvwinsrawch", dynlib: pdcursesdll.}
-proc raw_output*(a2: cunsignedchar): cint{.extdecl, importc: "raw_output", 
+proc raw_output*(a2: cunsignedchar): cint{.extdecl, importc: "raw_output",
     dynlib: pdcursesdll.}
-proc resize_term*(a2: cint; a3: cint): cint{.extdecl, importc: "resize_term", 
+proc resize_term*(a2: cint; a3: cint): cint{.extdecl, importc: "resize_term",
     dynlib: pdcursesdll.}
-proc resize_window*(a2: ptr TWINDOW; a3: cint; a4: cint): ptr TWINDOW{.extdecl, 
+proc resize_window*(a2: ptr WINDOW; a3: cint; a4: cint): ptr WINDOW{.extdecl,
     importc: "resize_window", dynlib: pdcursesdll.}
-proc waddrawch*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, 
+proc waddrawch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
     importc: "waddrawch", dynlib: pdcursesdll.}
-proc winsrawch*(a2: ptr TWINDOW; a3: cunsignedlong): cint{.extdecl, 
+proc winsrawch*(a2: ptr WINDOW; a3: cunsignedlong): cint{.extdecl,
     importc: "winsrawch", dynlib: pdcursesdll.}
 proc wordchar*(): char{.extdecl, importc: "wordchar", dynlib: pdcursesdll.}
-proc slk_wlabel*(a2: cint): cstring{.extdecl, importc: "slk_wlabel", 
+proc slk_wlabel*(a2: cint): cstring{.extdecl, importc: "slk_wlabel",
     dynlib: pdcursesdll.}
-proc debug*(a2: cstring){.varargs, extdecl, importc: "PDC_debug", 
+proc debug*(a2: cstring){.varargs, extdecl, importc: "PDC_debug",
                           dynlib: pdcursesdll.}
-proc ungetch*(a2: cint): cint{.extdecl, importc: "PDC_ungetch", 
+proc ungetch*(a2: cint): cint{.extdecl, importc: "PDC_ungetch",
                                dynlib: pdcursesdll.}
-proc set_blink*(a2: cunsignedchar): cint{.extdecl, importc: "PDC_set_blink", 
+proc set_blink*(a2: cunsignedchar): cint{.extdecl, importc: "PDC_set_blink",
     dynlib: pdcursesdll.}
-proc set_line_color*(a2: cshort): cint{.extdecl, importc: "PDC_set_line_color", 
+proc set_line_color*(a2: cshort): cint{.extdecl, importc: "PDC_set_line_color",
                                         dynlib: pdcursesdll.}
-proc set_title*(a2: cstring){.extdecl, importc: "PDC_set_title", 
+proc set_title*(a2: cstring){.extdecl, importc: "PDC_set_title",
                               dynlib: pdcursesdll.}
-proc clearclipboard*(): cint{.extdecl, importc: "PDC_clearclipboard", 
+proc clearclipboard*(): cint{.extdecl, importc: "PDC_clearclipboard",
                               dynlib: pdcursesdll.}
-proc freeclipboard*(a2: cstring): cint{.extdecl, importc: "PDC_freeclipboard", 
+proc freeclipboard*(a2: cstring): cint{.extdecl, importc: "PDC_freeclipboard",
                                         dynlib: pdcursesdll.}
-proc getclipboard*(a2: cstringArray; a3: ptr clong): cint{.extdecl, 
+proc getclipboard*(a2: cstringArray; a3: ptr clong): cint{.extdecl,
     importc: "PDC_getclipboard", dynlib: pdcursesdll.}
-proc setclipboard*(a2: cstring; a3: clong): cint{.extdecl, 
+proc setclipboard*(a2: cstring; a3: clong): cint{.extdecl,
     importc: "PDC_setclipboard", dynlib: pdcursesdll.}
-proc get_input_fd*(): cunsignedlong{.extdecl, importc: "PDC_get_input_fd", 
+proc get_input_fd*(): cunsignedlong{.extdecl, importc: "PDC_get_input_fd",
                                      dynlib: pdcursesdll.}
-proc get_key_modifiers*(): cunsignedlong{.extdecl, 
+proc get_key_modifiers*(): cunsignedlong{.extdecl,
     importc: "PDC_get_key_modifiers", dynlib: pdcursesdll.}
-proc return_key_modifiers*(a2: cunsignedchar): cint{.extdecl, 
+proc return_key_modifiers*(a2: cunsignedchar): cint{.extdecl,
     importc: "PDC_return_key_modifiers", dynlib: pdcursesdll.}
-proc save_key_modifiers*(a2: cunsignedchar): cint{.extdecl, 
+proc save_key_modifiers*(a2: cunsignedchar): cint{.extdecl,
     importc: "PDC_save_key_modifiers", dynlib: pdcursesdll.}
-proc bottom_panel*(pan: ptr TPANEL): cint{.extdecl, importc: "bottom_panel", 
+proc bottom_panel*(pan: ptr PANEL): cint{.extdecl, importc: "bottom_panel",
     dynlib: pdcursesdll.}
-proc del_panel*(pan: ptr TPANEL): cint{.extdecl, importc: "del_panel", 
+proc del_panel*(pan: ptr PANEL): cint{.extdecl, importc: "del_panel",
                                        dynlib: pdcursesdll.}
-proc hide_panel*(pan: ptr TPANEL): cint{.extdecl, importc: "hide_panel", 
+proc hide_panel*(pan: ptr PANEL): cint{.extdecl, importc: "hide_panel",
                                         dynlib: pdcursesdll.}
-proc move_panel*(pan: ptr TPANEL; starty: cint; startx: cint): cint{.extdecl, 
+proc move_panel*(pan: ptr PANEL; starty: cint; startx: cint): cint{.extdecl,
     importc: "move_panel", dynlib: pdcursesdll.}
-proc new_panel*(win: ptr TWINDOW): ptr TPANEL{.extdecl, importc: "new_panel", 
+proc new_panel*(win: ptr WINDOW): ptr PANEL{.extdecl, importc: "new_panel",
     dynlib: pdcursesdll.}
-proc panel_above*(pan: ptr TPANEL): ptr TPANEL{.extdecl, importc: "panel_above", 
+proc panel_above*(pan: ptr PANEL): ptr PANEL{.extdecl, importc: "panel_above",
     dynlib: pdcursesdll.}
-proc panel_below*(pan: ptr TPANEL): ptr TPANEL{.extdecl, importc: "panel_below", 
+proc panel_below*(pan: ptr PANEL): ptr PANEL{.extdecl, importc: "panel_below",
     dynlib: pdcursesdll.}
-proc panel_hidden*(pan: ptr TPANEL): cint{.extdecl, importc: "panel_hidden", 
+proc panel_hidden*(pan: ptr PANEL): cint{.extdecl, importc: "panel_hidden",
     dynlib: pdcursesdll.}
-proc panel_userptr*(pan: ptr TPANEL): pointer{.extdecl, importc: "panel_userptr", 
+proc panel_userptr*(pan: ptr PANEL): pointer{.extdecl, importc: "panel_userptr",
     dynlib: pdcursesdll.}
-proc panel_window*(pan: ptr TPANEL): ptr TWINDOW{.extdecl, importc: "panel_window", 
+proc panel_window*(pan: ptr PANEL): ptr WINDOW{.extdecl, importc: "panel_window",
     dynlib: pdcursesdll.}
-proc replace_panel*(pan: ptr TPANEL; win: ptr TWINDOW): cint{.extdecl, 
+proc replace_panel*(pan: ptr PANEL; win: ptr WINDOW): cint{.extdecl,
     importc: "replace_panel", dynlib: pdcursesdll.}
-proc set_panel_userptr*(pan: ptr TPANEL; uptr: pointer): cint{.extdecl, 
+proc set_panel_userptr*(pan: ptr PANEL; uptr: pointer): cint{.extdecl,
     importc: "set_panel_userptr", dynlib: pdcursesdll.}
-proc show_panel*(pan: ptr TPANEL): cint{.extdecl, importc: "show_panel", 
+proc show_panel*(pan: ptr PANEL): cint{.extdecl, importc: "show_panel",
                                         dynlib: pdcursesdll.}
-proc top_panel*(pan: ptr TPANEL): cint{.extdecl, importc: "top_panel", 
+proc top_panel*(pan: ptr PANEL): cint{.extdecl, importc: "top_panel",
                                        dynlib: pdcursesdll.}
 proc update_panels*(){.extdecl, importc: "update_panels", dynlib: pdcursesdll.}
 
 when unixOS:
-  proc Xinitscr*(a2: cint; a3: cstringArray): ptr TWINDOW{.extdecl, 
+  proc Xinitscr*(a2: cint; a3: cstringArray): ptr WINDOW{.extdecl,
     importc: "Xinitscr", dynlib: pdcursesdll.}
   proc XCursesExit*(){.extdecl, importc: "XCursesExit", dynlib: pdcursesdll.}
   proc sb_init*(): cint{.extdecl, importc: "sb_init", dynlib: pdcursesdll.}
-  proc sb_set_horz*(a2: cint; a3: cint; a4: cint): cint{.extdecl, 
+  proc sb_set_horz*(a2: cint; a3: cint; a4: cint): cint{.extdecl,
     importc: "sb_set_horz", dynlib: pdcursesdll.}
-  proc sb_set_vert*(a2: cint; a3: cint; a4: cint): cint{.extdecl, 
+  proc sb_set_vert*(a2: cint; a3: cint; a4: cint): cint{.extdecl,
     importc: "sb_set_vert", dynlib: pdcursesdll.}
-  proc sb_get_horz*(a2: ptr cint; a3: ptr cint; a4: ptr cint): cint{.extdecl, 
+  proc sb_get_horz*(a2: ptr cint; a3: ptr cint; a4: ptr cint): cint{.extdecl,
     importc: "sb_get_horz", dynlib: pdcursesdll.}
-  proc sb_get_vert*(a2: ptr cint; a3: ptr cint; a4: ptr cint): cint{.extdecl, 
+  proc sb_get_vert*(a2: ptr cint; a3: ptr cint; a4: ptr cint): cint{.extdecl,
     importc: "sb_get_vert", dynlib: pdcursesdll.}
   proc sb_refresh*(): cint{.extdecl, importc: "sb_refresh", dynlib: pdcursesdll.}
 
-template getch*(): expr = 
+template getch*(): expr =
   wgetch(stdscr)
 
-template ungetch*(ch: expr): expr = 
+template ungetch*(ch: expr): expr =
   ungetch(ch)
 
 template getbegyx*(w, y, x: expr): expr =
@@ -1519,13 +1534,13 @@ template getyx*(w, y, x: expr): expr =
   y = getcury(w)
   x = getcurx(w)
 
-template getsyx*(y, x: expr): stmt = 
+template getsyx*(y, x: expr): stmt =
   if curscr.leaveit:
     (x) = - 1
     (y) = (x)
   else: getyx(curscr, (y), (x))
-  
-template getmouse*(x: expr): expr = 
+
+template getmouse*(x: expr): expr =
   nc_getmouse(x)
 
 when defined(windows):
@@ -1535,5 +1550,5 @@ when defined(windows):
     con_in*{.importc: "pdc_con_in", dynlib: pdcursesdll.}: HANDLE
     quick_edit*{.importc: "pdc_quick_edit", dynlib: pdcursesdll.}: DWORD
 
-  proc get_buffer_rows*(): cint{.extdecl, importc: "PDC_get_buffer_rows", 
-                               dynlib: pdcursesdll.}
\ No newline at end of file
+  proc get_buffer_rows*(): cint{.extdecl, importc: "PDC_get_buffer_rows",
+                               dynlib: pdcursesdll.}