ncurses 6.2 - patch 20210213
[ncurses.git] / test / tracemunch
index 13a3b64719efffd68bd826552d14e9325fed8b93..cde06e576a0203e3a6816ba99f2001c6f62fcdb8 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env perl
-# $Id: tracemunch,v 1.33 2020/12/26 23:56:50 tom Exp $
+# $Id: tracemunch,v 1.40 2021/02/13 19:29:12 tom Exp $
 ##############################################################################
-# Copyright 2018-2019,2020 Thomas E. Dickey                                  #
+# Copyright 2018-2020,2021 Thomas E. Dickey                                  #
 # Copyright 1998-2005,2017 Free Software Foundation, Inc.                    #
 #                                                                            #
 # Permission is hereby granted, free of charge, to any person obtaining a    #
@@ -65,318 +65,451 @@ our %TR = qw(
 
 our $tracelevel = 0;
 
+our $tSCREEN   = 1;    # SCREEN*
+our $tWINDOW   = 2;    # WINDOW*
+our $tTERMINAL = 3;    # TERMINAL*
+our $tPANEL    = 4;    # PANEL*
+our $tFIELD    = 5;    # FIELD*
+our $tFORM     = 5;    # FORM*
+our $tMENU     = 6;    # MENU*
+our $tITEM     = 7;    # ITEM*
+
+our %known_p1_types = (
+    $tSCREEN   => "SCREEN*",
+    $tWINDOW   => "WINDOW*",
+    $tTERMINAL => "TERMINAL*",
+    $tPANEL    => "PANEL*",
+    $tFORM     => "FORM*",
+    $tFIELD    => "FIELD*",
+    $tMENU     => "MENU*",
+    $tITEM     => "ITEM*",
+);
+
 # If the trace is complete, we can infer addresses using the return value from
 # newwin, etc.  But if it is incomplete, we can still check for special cases
 # such as SCREEN* and WINDOW* parameters.  In this table, the type for the
 # first parameter is encoded, relying upon an ncurses programming convention:
-# 1 = SCREEN*
-# 2 = WINDOW*
-# 4 = TERMINAL*
-# 8 = PANEL*
-our %known_p1 = qw(
-  TransformLine           1
-  _nc_console_read        1
-  _nc_freewin             2
-  _nc_initscr             1
-  _nc_makenew             1
-  _nc_mingw_console_read  1
-  _nc_reset_colors        1
-  _nc_scroll_optimize     1
-  _nc_tinfo               1
-  _nc_tinfo_mvcur         1
-  _nc_wgetch              2
-  adjust_window           2
-  assume_default_colors   1
-  attr_get                2
-  baudrate                1
-  beep                    1
-  border_set              2
-  bottom_panel            8
-  box                     2
-  box_set                 2
-  can_change_color        1
-  cbreak                  1
-  clearok                 2
-  color_content           1
-  copywin                 2
-  curs_set                1
-  decrease_size           1
-  def_prog_mode           1
-  def_shell_mode          1
-  define_key              1
-  del_curterm             1
-  del_panel               8
-  delay_output            1
-  delscreen               1
-  delwin                  2
-  derwin                  2
-  doupdate                1
-  dupwin                  2
-  echo                    1
-  endwin                  1
-  erasechar               1
-  filter                  1
-  flash                   1
-  flushinp                1
-  getattrs                2
-  getbegx                 2
-  getbegy                 2
-  getbkgd                 2
-  getcurx                 2
-  getcury                 2
-  getmaxx                 2
-  getmaxy                 2
-  getmouse                1
-  getparx                 2
-  getpary                 2
-  halfdelay               1
-  has_ic                  1
-  has_il                  1
-  has_key                 1
-  hide_panel              8
-  idcok                   2
-  idlok                   2
-  immedok                 2
-  increase_size           1
-  init_color              1
-  init_pair               1
-  intrflush               1
-  is_cleared              2
-  is_idcok                2
-  is_idlok                2
-  is_immedok              2
-  is_keypad               2
-  is_leaveok              2
-  is_linetouched          2
-  is_nodelay              2
-  is_notimeout            2
-  is_pad                  2
-  is_scrollok             2
-  is_subwin               2
-  is_syncok               2
-  is_term_resized         1
-  is_wintouched           2
-  key_defined             1
-  keybound                1
-  keyok                   1
-  keypad                  2
-  killchar                1
-  leaveok                 2
-  longname                1
-  meta                    2
-  mouseinterval           1
-  mousemask               1
-  move_panel              8
-  mvcur                   1
-  mvderwin                2
-  mvwadd_wch              2
-  mvwadd_wchnstr          2
-  mvwadd_wchstr           2
-  mvwaddch                2
-  mvwaddchnstr            2
-  mvwaddchstr             2
-  mvwaddnstr              2
-  mvwaddnwstr             2
-  mvwaddstr               2
-  mvwaddwstr              2
-  mvwchgat                2
-  mvwdelch                2
-  mvwget_wch              2
-  mvwget_wstr             2
-  mvwgetch                2
-  mvwgetn_wstr            2
-  mvwgetnstr              2
-  mvwgetstr               2
-  mvwhline                2
-  mvwhline_set            2
-  mvwin                   2
-  mvwin_wch               2
-  mvwin_wchnstr           2
-  mvwin_wchstr            2
-  mvwinch                 2
-  mvwinchnstr             2
-  mvwinchstr              2
-  mvwins_nwstr            2
-  mvwins_wch              2
-  mvwins_wstr             2
-  mvwinsch                2
-  mvwinsnstr              2
-  mvwinsstr               2
-  mvwinstr                2
-  mvwinwstr               2
-  mvwvline                2
-  mvwvline_set            2
-  new_panel               2
-  newpad                  1
-  newterm                 1
-  newwin                  1
-  nl                      1
-  nocbreak                1
-  nodelay                 2
-  noecho                  1
-  nofilter                1
-  nonl                    1
-  noqiflush               1
-  noraw                   1
-  notimeout               2
-  overlap                 2
-  overlay                 2
-  overwrite               2
-  pair_content            1
-  panel_above             8
-  panel_below             8
-  panel_hidden            8
-  panel_userptr           8
-  panel_window            8
-  pecho_wchar             2
-  pechochar               2
-  pnoutrefresh            2
-  putwin                  2
-  qiflush                 1
-  raw                     1
-  redrawwin               2
-  replace_panel           8
-  reset_prog_mode         1
-  reset_shell_mode        1
-  resetty                 1
-  resize_term             1
-  resizeterm              1
-  restartterm             1
-  ripoffline              1
-  savetty                 1
-  scr_init                1
-  scr_restore             1
-  scr_set                 1
-  scroll                  2
-  scrollok                2
-  set_curterm             4
-  set_panel_userptr       8
-  set_term                1
-  show_panel              8
-  slk_attr                1
-  slk_attr_set            1
-  slk_attroff             1
-  slk_attron              1
-  slk_attrset             1
-  slk_clear               1
-  slk_color               1
-  slk_init                1
-  slk_label               1
-  slk_noutrefresh         1
-  slk_refresh             1
-  slk_restore             1
-  slk_set                 1
-  slk_touch               1
-  start_color             1
-  subwin                  2
-  syncok                  2
-  termattrs               1
-  termname                1
-  tgetflag                1
-  tgetnum                 1
-  tigetflag               1
-  tigetnum                1
-  tigetstr                1
-  tinfo                   1
-  top_panel               8
-  touchline               2
-  touchwin                2
-  typeahead               1
-  unget_wch               1
-  ungetch                 1
-  ungetmouse              1
-  untouchwin              2
-  use_default_colors      1
-  use_env                 1
-  use_legacy_coding       1
-  use_screen              1
-  use_tioctl              1
-  use_window              2
-  vidattr                 1
-  vidputs                 1
-  vw_printw               2
-  vwprintw                2
-  wadd_wch                2
-  wadd_wchnstr            2
-  wadd_wchstr             2
-  waddch                  2
-  waddchnstr              2
-  waddchstr               2
-  waddnstr                2
-  waddnwstr               2
-  waddstr                 2
-  waddwstr                2
-  wattr_get               2
-  wattr_off               2
-  wattr_on                2
-  wattr_set               2
-  wattroff                2
-  wattron                 2
-  wattrset                2
-  wbkgd                   2
-  wbkgdset                2
-  wborder                 2
-  wborder_set             2
-  wchgat                  2
-  wclear                  2
-  wclrtobot               2
-  wclrtoeol               2
-  wcolor_set              2
-  wcursyncup              2
-  wdelch                  2
-  wdeleteln               2
-  wechochar               2
-  wenclose                2
-  werase                  2
-  wget_wch                2
-  wget_wstr               2
-  wgetbkgrnd              2
-  wgetch                  2
-  wgetch_events           2
-  wgetdelay               2
-  wgetn_wstr              2
-  wgetnstr                2
-  wgetparent              2
-  wgetscrreg              2
-  wgetstr                 2
-  whline                  2
-  whline_set              2
-  win_wch                 2
-  win_wchnstr             2
-  win_wchstr              2
-  winch                   2
-  winchnstr               2
-  winchstr                2
-  winnstr                 2
-  winnwstr                2
-  wins_nwstr              2
-  wins_wch                2
-  wins_wstr               2
-  winsch                  2
-  winsdelln               2
-  winsertln               2
-  winsnstr                2
-  winsstr                 2
-  winstr                  2
-  winwstr                 2
-  wmouse_trafo            2
-  wmove                   2
-  wnoutrefresh            2
-  wprintw                 2
-  wredrawln               2
-  wrefresh                2
-  wresize                 2
-  wscrl                   2
-  wsetscrreg              2
-  wstandend               2
-  wstandout               2
-  wsyncdown               2
-  wsyncup                 2
-  wtimeout                2
-  wtouchln                2
-  wvline                  2
+our %known_p1 = (
+    TransformLine          => $tSCREEN,
+    _nc_console_read       => $tSCREEN,
+    _nc_freewin            => $tWINDOW,
+    _nc_initscr            => $tSCREEN,
+    _nc_makenew            => $tSCREEN,
+    _nc_mingw_console_read => $tSCREEN,
+    _nc_reset_colors       => $tSCREEN,
+    _nc_scroll_optimize    => $tSCREEN,
+    _nc_tinfo              => $tSCREEN,
+    _nc_tinfo_mvcur        => $tSCREEN,
+    _nc_wgetch             => $tWINDOW,
+    adjust_window          => $tWINDOW,
+    assume_default_colors  => $tSCREEN,
+    attr_get               => $tWINDOW,
+    baudrate               => $tSCREEN,
+    beep                   => $tSCREEN,
+    border_set             => $tWINDOW,
+    bottom_panel           => $tPANEL,
+    bottom_panel           => $tPANEL,
+    box                    => $tWINDOW,
+    box_set                => $tWINDOW,
+    can_change_color       => $tSCREEN,
+    cbreak                 => $tSCREEN,
+    ceiling_panel          => $tSCREEN,
+    clearok                => $tWINDOW,
+    color_content          => $tSCREEN,
+    copywin                => $tWINDOW,
+    current_item           => $tMENU,
+    curs_set               => $tSCREEN,
+    decrease_size          => $tSCREEN,
+    def_prog_mode          => $tSCREEN,
+    def_shell_mode         => $tSCREEN,
+    define_key             => $tSCREEN,
+    del_curterm            => $tSCREEN,
+    del_panel              => $tPANEL,
+    del_panel              => $tPANEL,
+    delay_output           => $tSCREEN,
+    delscreen              => $tSCREEN,
+    delwin                 => $tWINDOW,
+    derwin                 => $tWINDOW,
+    doupdate               => $tSCREEN,
+    dup_field              => $tFIELD,
+    dupwin                 => $tWINDOW,
+    echo                   => $tSCREEN,
+    endwin                 => $tSCREEN,
+    erasechar              => $tSCREEN,
+    field_opts_off         => $tFIELD,
+    field_opts_on          => $tFIELD,
+    filter                 => $tSCREEN,
+    flash                  => $tSCREEN,
+    flushinp               => $tSCREEN,
+    form_driver            => $tFORM,
+    form_driver_w          => $tFORM,
+    form_opts_off          => $tFORM,
+    form_opts_on           => $tFORM,
+    free_field             => $tFIELD,
+    free_form              => $tFORM,
+    free_item              => $tITEM,
+    free_menu              => $tMENU,
+    getattrs               => $tWINDOW,
+    getbegx                => $tWINDOW,
+    getbegy                => $tWINDOW,
+    getbkgd                => $tWINDOW,
+    getcurx                => $tWINDOW,
+    getcury                => $tWINDOW,
+    getmaxx                => $tWINDOW,
+    getmaxy                => $tWINDOW,
+    getmouse               => $tSCREEN,
+    getparx                => $tWINDOW,
+    getpary                => $tWINDOW,
+    ground_panel           => $tSCREEN,
+    halfdelay              => $tSCREEN,
+    has_ic                 => $tSCREEN,
+    has_il                 => $tSCREEN,
+    has_key                => $tSCREEN,
+    hide_panel             => $tPANEL,
+    hide_panel             => $tPANEL,
+    idcok                  => $tWINDOW,
+    idlok                  => $tWINDOW,
+    immedok                => $tWINDOW,
+    increase_size          => $tSCREEN,
+    init_color             => $tSCREEN,
+    init_pair              => $tSCREEN,
+    intrflush              => $tSCREEN,
+    is_cleared             => $tWINDOW,
+    is_idcok               => $tWINDOW,
+    is_idlok               => $tWINDOW,
+    is_immedok             => $tWINDOW,
+    is_keypad              => $tWINDOW,
+    is_leaveok             => $tWINDOW,
+    is_linetouched         => $tWINDOW,
+    is_nodelay             => $tWINDOW,
+    is_notimeout           => $tWINDOW,
+    is_pad                 => $tWINDOW,
+    is_scrollok            => $tWINDOW,
+    is_subwin              => $tWINDOW,
+    is_syncok              => $tWINDOW,
+    is_term_resized        => $tSCREEN,
+    is_wintouched          => $tWINDOW,
+    item_count             => $tMENU,
+    item_description       => $tITEM,
+    item_index             => $tITEM,
+    item_init              => $tMENU,
+    item_name              => $tITEM,
+    item_opts              => $tITEM,
+    item_opts_off          => $tITEM,
+    item_opts_on           => $tITEM,
+    item_term              => $tMENU,
+    item_userptr           => $tITEM,
+    item_value             => $tITEM,
+    item_visible           => $tITEM,
+    key_defined            => $tSCREEN,
+    keybound               => $tSCREEN,
+    keyok                  => $tSCREEN,
+    keypad                 => $tWINDOW,
+    killchar               => $tSCREEN,
+    leaveok                => $tWINDOW,
+    link_field             => $tFIELD,
+    longname               => $tSCREEN,
+    menu_back              => $tMENU,
+    menu_driver            => $tMENU,
+    menu_fore              => $tMENU,
+    menu_format            => $tMENU,
+    menu_grey              => $tMENU,
+    menu_init              => $tMENU,
+    menu_items             => $tMENU,
+    menu_mark              => $tMENU,
+    menu_opts              => $tMENU,
+    menu_opts_off          => $tMENU,
+    menu_opts_on           => $tMENU,
+    menu_pad               => $tMENU,
+    menu_pattern           => $tMENU,
+    menu_spacing           => $tMENU,
+    menu_sub               => $tMENU,
+    menu_term              => $tMENU,
+    menu_userptr           => $tMENU,
+    menu_win               => $tMENU,
+    meta                   => $tWINDOW,
+    mouseinterval          => $tSCREEN,
+    mousemask              => $tSCREEN,
+    move_field             => $tFIELD,
+    move_panel             => $tPANEL,
+    move_panel             => $tPANEL,
+    mvcur                  => $tSCREEN,
+    mvderwin               => $tWINDOW,
+    mvwadd_wch             => $tWINDOW,
+    mvwadd_wchnstr         => $tWINDOW,
+    mvwadd_wchstr          => $tWINDOW,
+    mvwaddch               => $tWINDOW,
+    mvwaddchnstr           => $tWINDOW,
+    mvwaddchstr            => $tWINDOW,
+    mvwaddnstr             => $tWINDOW,
+    mvwaddnwstr            => $tWINDOW,
+    mvwaddstr              => $tWINDOW,
+    mvwaddwstr             => $tWINDOW,
+    mvwchgat               => $tWINDOW,
+    mvwdelch               => $tWINDOW,
+    mvwget_wch             => $tWINDOW,
+    mvwget_wstr            => $tWINDOW,
+    mvwgetch               => $tWINDOW,
+    mvwgetn_wstr           => $tWINDOW,
+    mvwgetnstr             => $tWINDOW,
+    mvwgetstr              => $tWINDOW,
+    mvwhline               => $tWINDOW,
+    mvwhline_set           => $tWINDOW,
+    mvwin                  => $tWINDOW,
+    mvwin_wch              => $tWINDOW,
+    mvwin_wchnstr          => $tWINDOW,
+    mvwin_wchstr           => $tWINDOW,
+    mvwinch                => $tWINDOW,
+    mvwinchnstr            => $tWINDOW,
+    mvwinchstr             => $tWINDOW,
+    mvwins_nwstr           => $tWINDOW,
+    mvwins_wch             => $tWINDOW,
+    mvwins_wstr            => $tWINDOW,
+    mvwinsch               => $tWINDOW,
+    mvwinsnstr             => $tWINDOW,
+    mvwinsstr              => $tWINDOW,
+    mvwinstr               => $tWINDOW,
+    mvwinwstr              => $tWINDOW,
+    mvwvline               => $tWINDOW,
+    mvwvline_set           => $tWINDOW,
+    new_panel              => $tWINDOW,
+    new_panel              => $tWINDOW,
+    newpad                 => $tSCREEN,
+    newterm                => $tSCREEN,
+    newwin                 => $tSCREEN,
+    nl                     => $tSCREEN,
+    nocbreak               => $tSCREEN,
+    nodelay                => $tWINDOW,
+    noecho                 => $tSCREEN,
+    nofilter               => $tSCREEN,
+    nonl                   => $tSCREEN,
+    noqiflush              => $tSCREEN,
+    noraw                  => $tSCREEN,
+    notimeout              => $tWINDOW,
+    overlap                => $tWINDOW,
+    overlay                => $tWINDOW,
+    overwrite              => $tWINDOW,
+    pair_content           => $tSCREEN,
+    panel_above            => $tPANEL,
+    panel_above            => $tPANEL,
+    panel_below            => $tPANEL,
+    panel_below            => $tPANEL,
+    panel_hidden           => $tPANEL,
+    panel_hidden           => $tPANEL,
+    panel_userptr          => $tPANEL,
+    panel_userptr          => $tPANEL,
+    panel_window           => $tPANEL,
+    panel_window           => $tPANEL,
+    pecho_wchar            => $tWINDOW,
+    pechochar              => $tWINDOW,
+    pnoutrefresh           => $tWINDOW,
+    pos_form_cursor        => $tFORM,
+    pos_menu_cursor        => $tMENU,
+    post_form              => $tFORM,
+    post_menu              => $tMENU,
+    putwin                 => $tWINDOW,
+    qiflush                => $tSCREEN,
+    raw                    => $tSCREEN,
+    redrawwin              => $tWINDOW,
+    replace_panel          => $tPANEL,
+    replace_panel          => $tPANEL,
+    reset_prog_mode        => $tSCREEN,
+    reset_shell_mode       => $tSCREEN,
+    resetty                => $tSCREEN,
+    resize_term            => $tSCREEN,
+    resizeterm             => $tSCREEN,
+    restartterm            => $tSCREEN,
+    ripoffline             => $tSCREEN,
+    savetty                => $tSCREEN,
+    scale_menu             => $tMENU,
+    scr_init               => $tSCREEN,
+    scr_restore            => $tSCREEN,
+    scr_set                => $tSCREEN,
+    scroll                 => $tWINDOW,
+    scrollok               => $tWINDOW,
+    set_current_field      => $tFORM,
+    set_current_item       => $tMENU,
+    set_curterm            => $tTERMINAL,
+    set_field_back         => $tFIELD,
+    set_field_buffer       => $tFIELD,
+    set_field_fore         => $tFIELD,
+    set_field_init         => $tFORM,
+    set_field_just         => $tFIELD,
+    set_field_opts         => $tFIELD,
+    set_field_pad          => $tFIELD,
+    set_field_status       => $tFIELD,
+    set_field_term         => $tFORM,
+    set_field_type         => $tFIELD,
+    set_field_userptr      => $tFIELD,
+    set_form_fields        => $tFORM,
+    set_form_init          => $tFORM,
+    set_form_opts          => $tFORM,
+    set_form_page          => $tFORM,
+    set_form_sub           => $tFORM,
+    set_form_term          => $tFORM,
+    set_form_userptr       => $tFORM,
+    set_form_win           => $tFORM,
+    set_item_init          => $tMENU,
+    set_item_opts          => $tITEM,
+    set_item_term          => $tMENU,
+    set_item_userptr       => $tITEM,
+    set_item_value         => $tITEM,
+    set_menu_back          => $tMENU,
+    set_menu_fore          => $tMENU,
+    set_menu_format        => $tMENU,
+    set_menu_grey          => $tMENU,
+    set_menu_init          => $tMENU,
+    set_menu_items         => $tMENU,
+    set_menu_mark          => $tMENU,
+    set_menu_opts          => $tMENU,
+    set_menu_pad           => $tMENU,
+    set_menu_pattern       => $tMENU,
+    set_menu_spacing       => $tMENU,
+    set_menu_sub           => $tMENU,
+    set_menu_term          => $tMENU,
+    set_menu_userptr       => $tMENU,
+    set_menu_win           => $tMENU,
+    set_new_page           => $tFIELD,
+    set_panel_userptr      => $tPANEL,
+    set_panel_userptr      => $tPANEL,
+    set_term               => $tSCREEN,
+    set_top_row            => $tMENU,
+    show_panel             => $tPANEL,
+    show_panel             => $tPANEL,
+    slk_attr               => $tSCREEN,
+    slk_attr_set           => $tSCREEN,
+    slk_attroff            => $tSCREEN,
+    slk_attron             => $tSCREEN,
+    slk_attrset            => $tSCREEN,
+    slk_clear              => $tSCREEN,
+    slk_color              => $tSCREEN,
+    slk_init               => $tSCREEN,
+    slk_label              => $tSCREEN,
+    slk_noutrefresh        => $tSCREEN,
+    slk_refresh            => $tSCREEN,
+    slk_restore            => $tSCREEN,
+    slk_set                => $tSCREEN,
+    slk_touch              => $tSCREEN,
+    start_color            => $tSCREEN,
+    subwin                 => $tWINDOW,
+    syncok                 => $tWINDOW,
+    termattrs              => $tSCREEN,
+    termname               => $tSCREEN,
+    tgetflag               => $tSCREEN,
+    tgetnum                => $tSCREEN,
+    tigetflag              => $tSCREEN,
+    tigetnum               => $tSCREEN,
+    tigetstr               => $tSCREEN,
+    tinfo                  => $tSCREEN,
+    top_panel              => $tPANEL,
+    top_panel              => $tPANEL,
+    top_row                => $tMENU,
+    touchline              => $tWINDOW,
+    touchwin               => $tWINDOW,
+    typeahead              => $tSCREEN,
+    unfocus_current_field  => $tFORM,
+    unget_wch              => $tSCREEN,
+    ungetch                => $tSCREEN,
+    ungetmouse             => $tSCREEN,
+    unpost_form            => $tFORM,
+    unpost_menu            => $tMENU,
+    untouchwin             => $tWINDOW,
+    update_panels_sp       => $tSCREEN,
+    use_default_colors     => $tSCREEN,
+    use_env                => $tSCREEN,
+    use_legacy_coding      => $tSCREEN,
+    use_screen             => $tSCREEN,
+    use_tioctl             => $tSCREEN,
+    use_window             => $tWINDOW,
+    vidattr                => $tSCREEN,
+    vidputs                => $tSCREEN,
+    vw_printw              => $tWINDOW,
+    vwprintw               => $tWINDOW,
+    wadd_wch               => $tWINDOW,
+    wadd_wchnstr           => $tWINDOW,
+    wadd_wchstr            => $tWINDOW,
+    waddch                 => $tWINDOW,
+    waddchnstr             => $tWINDOW,
+    waddchstr              => $tWINDOW,
+    waddnstr               => $tWINDOW,
+    waddnwstr              => $tWINDOW,
+    waddstr                => $tWINDOW,
+    waddwstr               => $tWINDOW,
+    wattr_get              => $tWINDOW,
+    wattr_off              => $tWINDOW,
+    wattr_on               => $tWINDOW,
+    wattr_set              => $tWINDOW,
+    wattroff               => $tWINDOW,
+    wattron                => $tWINDOW,
+    wattrset               => $tWINDOW,
+    wbkgd                  => $tWINDOW,
+    wbkgdset               => $tWINDOW,
+    wborder                => $tWINDOW,
+    wborder_set            => $tWINDOW,
+    wchgat                 => $tWINDOW,
+    wclear                 => $tWINDOW,
+    wclrtobot              => $tWINDOW,
+    wclrtoeol              => $tWINDOW,
+    wcolor_set             => $tWINDOW,
+    wcursyncup             => $tWINDOW,
+    wdelch                 => $tWINDOW,
+    wdeleteln              => $tWINDOW,
+    wechochar              => $tWINDOW,
+    wenclose               => $tWINDOW,
+    werase                 => $tWINDOW,
+    wget_wch               => $tWINDOW,
+    wget_wstr              => $tWINDOW,
+    wgetbkgrnd             => $tWINDOW,
+    wgetch                 => $tWINDOW,
+    wgetch_events          => $tWINDOW,
+    wgetdelay              => $tWINDOW,
+    wgetn_wstr             => $tWINDOW,
+    wgetnstr               => $tWINDOW,
+    wgetparent             => $tWINDOW,
+    wgetscrreg             => $tWINDOW,
+    wgetstr                => $tWINDOW,
+    whline                 => $tWINDOW,
+    whline_set             => $tWINDOW,
+    win_wch                => $tWINDOW,
+    win_wchnstr            => $tWINDOW,
+    win_wchstr             => $tWINDOW,
+    winch                  => $tWINDOW,
+    winchnstr              => $tWINDOW,
+    winchstr               => $tWINDOW,
+    winnstr                => $tWINDOW,
+    winnwstr               => $tWINDOW,
+    wins_nwstr             => $tWINDOW,
+    wins_wch               => $tWINDOW,
+    wins_wstr              => $tWINDOW,
+    winsch                 => $tWINDOW,
+    winsdelln              => $tWINDOW,
+    winsertln              => $tWINDOW,
+    winsnstr               => $tWINDOW,
+    winsstr                => $tWINDOW,
+    winstr                 => $tWINDOW,
+    winwstr                => $tWINDOW,
+    wmouse_trafo           => $tWINDOW,
+    wmove                  => $tWINDOW,
+    wnoutrefresh           => $tWINDOW,
+    wprintw                => $tWINDOW,
+    wredrawln              => $tWINDOW,
+    wrefresh               => $tWINDOW,
+    wresize                => $tWINDOW,
+    wscrl                  => $tWINDOW,
+    wsetscrreg             => $tWINDOW,
+    wstandend              => $tWINDOW,
+    wstandout              => $tWINDOW,
+    wsyncdown              => $tWINDOW,
+    wsyncup                => $tWINDOW,
+    wtimeout               => $tWINDOW,
+    wtouchln               => $tWINDOW,
+    wvline                 => $tWINDOW,
 );
 
+our $fld_nums = 0;
+our $frm_nums = 0;
+our $itm_nums = 0;
+our $mnu_nums = 0;
 our $pan_nums = 0;
 our $scr_nums = 0;
 our $thr_nums = 0;
@@ -389,13 +522,17 @@ our $curscr = "";
 our $newscr = "";
 our $stdscr = "";
 
-our %pan_addr;
-our %scr_addr;
-our %thr_addr;
-our %trm_addr;
-our %try_addr;
-our %usr_addr;
-our %win_addr;
+our %fld_addr;    # FIELD*
+our %frm_addr;    # FORM*
+our %itm_addr;    # ITEM*
+our %mnu_addr;    # MENU*
+our %pan_addr;    # PANEL*
+our %scr_addr;    # SCREEN*
+our %thr_addr;    # thread-id
+our %trm_addr;    # TERMINAL*
+our %try_addr;    # tries-number
+our %usr_addr;    # user-pointer
+our %win_addr;    # WINDOW*
 
 sub has_addr($) {
     my $value  = shift;
@@ -411,6 +548,30 @@ sub transaddr($) {
     $arg =~ s/\b$curscr\b/curscr/g if ($curscr);
     $arg =~ s/\b$newscr\b/newscr/g if ($newscr);
     $arg =~ s/\b$stdscr\b/stdscr/g if ($stdscr);
+    if ( &has_addr($arg) ) {
+        foreach my $addr ( keys %fld_addr ) {
+            $n = $fld_addr{$addr};
+            $arg =~ s/\b$addr\b/field$n/g if ( defined $n );
+        }
+    }
+    if ( &has_addr($arg) ) {
+        foreach my $addr ( keys %frm_addr ) {
+            $n = $frm_addr{$addr};
+            $arg =~ s/\b$addr\b/form$n/g if ( defined $n );
+        }
+    }
+    if ( &has_addr($arg) ) {
+        foreach my $addr ( keys %itm_addr ) {
+            $n = $itm_addr{$addr};
+            $arg =~ s/\b$addr\b/item$n/g if ( defined $n );
+        }
+    }
+    if ( &has_addr($arg) ) {
+        foreach my $addr ( keys %mnu_addr ) {
+            $n = $mnu_addr{$addr};
+            $arg =~ s/\b$addr\b/menu$n/g if ( defined $n );
+        }
+    }
     if ( &has_addr($arg) ) {
         foreach my $addr ( keys %pan_addr ) {
             $n = $pan_addr{$addr};
@@ -475,26 +636,77 @@ sub transaddr($) {
             my $addr = $arg;
             my $type = $known_p1{$func};
             chomp $addr;
-            $addr =~ s/^[^(]+\((0x[[:xdigit:]]+).*/$1/i;
+            $addr =~ s/^[^(]+\((0x[[:xdigit:]]+).*$/$1/i;
             if ( $addr !~ /^0x[[:xdigit:]]+$/i ) {
-                printf "OOPS - expected type #$type, skipping\n>>$addr\n";
+                if ( $type == $tSCREEN and $addr =~ /^[^(]+\(screen\d+[,)]/ ) {
+
+                    # ignore
+                }
+                elsif ( $type == $tWINDOW
+                    and $addr =~
+                    /^[^(]+\((stdscr|newscr|curscr|window\d+)[,)]/ )
+                {
+
+                    # ignore
+                }
+                elsif ( $type == $tTERMINAL
+                    and $addr =~ /^[^(]+\(terminal\d+[,)]/ )
+                {
+                    # ignore
+                }
+                elsif ( $type == $tPANEL and $addr =~ /^[^(]+\(panel\d+[,)]/ ) {
+
+                    # ignore
+                }
+                elsif ( $type == $tFIELD and $addr =~ /^[^(]+\(field\d+[,)]/ ) {
+
+                    # ignore
+                }
+                elsif ( $type == $tMENU and $addr =~ /^[^(]+\(menu\d+[,)]/ ) {
+
+                    # ignore
+                }
+                elsif ( $type == $tITEM and $addr =~ /^[^(]+\(item\d+[,)]/ ) {
+
+                    # ignore
+                }
+                else {
+                    printf "OOPS - expected type \"%s\", skipping\n>>$addr\n",
+                      $known_p1_types{$type};
+                }
             }
-            elsif ( $type == 1 ) {
+            elsif ( $type == $tSCREEN ) {
                 $scr_addr{$addr} = ++$scr_nums;
                 $arg = &transaddr($arg);
             }
-            elsif ( $type == 2 ) {
+            elsif ( $type == $tWINDOW ) {
                 $win_addr{$addr} = ++$win_nums;
                 $arg = &transaddr($arg);
             }
-            elsif ( $type == 4 ) {
+            elsif ( $type == $tTERMINAL ) {
                 $trm_addr{$addr} = ++$trm_nums;
                 $arg = &transaddr($arg);
             }
-            elsif ( $type == 8 ) {
+            elsif ( $type == $tPANEL ) {
                 $pan_addr{$addr} = ++$pan_nums;
                 $arg = &transaddr($arg);
             }
+            elsif ( $type == $tFIELD ) {
+                $fld_addr{$addr} = ++$fld_nums;
+                $arg = &transaddr($arg);
+            }
+            elsif ( $type == $tFORM ) {
+                $frm_addr{$addr} = ++$frm_nums;
+                $arg = &transaddr($arg);
+            }
+            elsif ( $type == $tMENU ) {
+                $mnu_addr{$addr} = ++$mnu_nums;
+                $arg = &transaddr($arg);
+            }
+            elsif ( $type == $tITEM ) {
+                $itm_addr{$addr} = ++$itm_nums;
+                $arg = &transaddr($arg);
+            }
         }
     }
 
@@ -563,6 +775,26 @@ sub muncher($) {
                 $usr_addr{$addr} = $usr_nums++;
                 $_               = &transaddr($_);
             }
+            elsif ( $_ =~ /^create :field 0x([[:xdigit:]]+)/ ) {
+                $addr            = "0x$1";
+                $fld_addr{$addr} = $fld_nums++;
+                $_               = &transaddr($_);
+            }
+            elsif ( $_ =~ /^create :form 0x([[:xdigit:]]+)/ ) {
+                $addr            = "0x$1";
+                $frm_addr{$addr} = $frm_nums++;
+                $_               = &transaddr($_);
+            }
+            elsif ( $_ =~ /^create :menu 0x([[:xdigit:]]+)/ ) {
+                $addr            = "0x$1";
+                $mnu_addr{$addr} = $mnu_nums++;
+                $_               = &transaddr($_);
+            }
+            elsif ( $_ =~ /^create :item 0x([[:xdigit:]]+)/ ) {
+                $addr            = "0x$1";
+                $itm_addr{$addr} = $itm_nums++;
+                $_               = &transaddr($_);
+            }
             elsif ( $_ =~ /^(\+ )*called \{set_curterm\((0x[[:xdigit:]]+)\)/ ) {
                 $trm_addr{$2} = ++$trm_nums unless defined $trm_addr{$2};
             }
@@ -602,6 +834,26 @@ sub muncher($) {
                 $_    = &transaddr($_);
                 undef $pan_addr{$addr};
             }
+            elsif ( $_ =~ /^([+ ])*called \{free_field\(0x([[:xdigit:]]+)\)/ ) {
+                $addr = "0x$2";
+                $_    = &transaddr($_);
+                undef $fld_addr{$addr};
+            }
+            elsif ( $_ =~ /^([+ ])*called \{free_form\(0x([[:xdigit:]]+)\)/ ) {
+                $addr = "0x$2";
+                $_    = &transaddr($_);
+                undef $frm_addr{$addr};
+            }
+            elsif ( $_ =~ /^([+ ])*called \{free_menu\(0x([[:xdigit:]]+)\)/ ) {
+                $addr = "0x$2";
+                $_    = &transaddr($_);
+                undef $mnu_addr{$addr};
+            }
+            elsif ( $_ =~ /^([+ ])*called \{free_item\(0x([[:xdigit:]]+)\)/ ) {
+                $addr = "0x$2";
+                $_    = &transaddr($_);
+                undef $itm_addr{$addr};
+            }
 
             # Compactify runs of PutAttrChar
             if ( ( ( $tracelevel & $TR{CHARPUT} ) != 0 ) and $_ =~ /$putattr/ )