smb2-dissector: learn the "REPLAY_OPERATION" flag
[obnox/wireshark/wip.git] / tools / checkAPIs.pl
1 #!/usr/bin/env perl
2
3 #
4 # Copyright 2006, Jeff Morriss <jeff.morriss[AT]ulticom.com>
5 #
6 # A simple tool to check source code for function calls that should not
7 # be called by Wireshark code and to perform certain other checks.
8 #
9 # Usage:
10 # checkAPIs.pl [-M] [-g group1] [-g group2] [-s summary-group1] [-s summary-group2] [--nocheck-value-string-array-null-termination] file1 file2 ...
11 #
12 # $Id$
13 #
14 # Wireshark - Network traffic analyzer
15 # By Gerald Combs <gerald@wireshark.org>
16 # Copyright 1998 Gerald Combs
17 #
18 # This program is free software; you can redistribute it and/or
19 # modify it under the terms of the GNU General Public License
20 # as published by the Free Software Foundation; either version 2
21 # of the License, or (at your option) any later version.
22 #
23 # This program is distributed in the hope that it will be useful,
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26 # GNU General Public License for more details.
27 #
28 # You should have received a copy of the GNU General Public License
29 # along with this program; if not, write to the Free Software
30 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 #
32
33 use strict;
34 use Getopt::Long;
35
36 my %APIs = (
37         # API groups.
38         # Group name, e.g. 'prohibited'
39         # '<name>' => {
40         #   'count_errors'      => 1,                     # 1 if these are errors, 0 if warnings
41         #   'functions'         => [ 'f1', 'f2', ...],    # Function array
42         #   'function-counts'   => {'f1',0, 'f2',0, ...}, # Function Counts hash (initialized in the code)
43         # }
44         #
45         # APIs that MUST NOT be used in Wireshark
46         'prohibited' => { 'count_errors' => 1, 'functions' => [
47                 # Memory-unsafe APIs
48                 # Use something that won't overwrite the end of your buffer instead
49                 # of these:
50                 'gets',
51                 'sprintf',
52                 'g_sprintf',
53                 'vsprintf',
54                 'g_vsprintf',
55                 'strcpy',
56                 'strncpy',
57                 'strcat',
58                 'strncat',
59                 'cftime',
60                 'ascftime',
61                 ### non-portable APIs
62                 # use glib (g_*) versions instead of these:
63                 'ntohl',
64                 'ntohs',
65                 'htonl',
66                 'htons',
67                 'strdup',
68                 'strndup',
69                 # Windows doesn't have this; use g_ascii_strtoull() instead
70                 'strtoull',
71                 ### non-portable: fails on Windows Wireshark built with VC newer than VC6
72                 # See https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6695#c2
73                 'g_fprintf',
74                 'g_vfprintf',
75                 ### non-ANSI C
76                 # use memset, memcpy, memcmp instead of these:
77                 'bzero',
78                 'bcopy',
79                 'bcmp',
80                 # The MSDN page for ZeroMemory recommends SecureZeroMemory
81                 # instead.
82                 'ZeroMemory',
83                 # use ep_*, se_*, or g_* functions instead of these:
84                 # (One thing to be aware of is that space allocated with malloc()
85                 # may not be freeable--at least on Windows--with g_free() and
86                 # vice-versa.)
87                 'malloc',
88                 'calloc',
89                 'realloc',
90                 'valloc',
91                 'free',
92                 'cfree',
93                 # Locale-unsafe APIs
94                 # These may have unexpected behaviors in some locales (e.g.,
95                 # "I" isn't always the upper-case form of "i", and "i" isn't
96                 # always the lower-case form of "I").  Use the g_ascii_* version
97                 # instead.
98                 'strcasecmp',
99                 'strncasecmp',
100                 'g_strcasecmp',
101                 'g_strncasecmp',
102                 'g_strup',
103                 'g_strdown',
104                 'g_string_up',
105                 'g_string_down',
106                 'strerror',     # use g_strerror
107                 # Use the ws_* version of these:
108                 # (Necessary because on Windows we use UTF8 for throughout the code
109                 # so we must tweak that to UTF16 before operating on the file.  Code
110                 # using these functions will work unless the file/path name contains
111                 # non-ASCII chars.)
112                 'open',
113                 'rename',
114                 'mkdir',
115                 'stat',
116                 'unlink',
117                 'remove',
118                 'fopen',
119                 'freopen',
120                 # Misc
121                 'tmpnam'        # use mkstemp
122                 ] },
123
124         # APIs that SHOULD NOT be used in Wireshark (any more)
125         'deprecated' => { 'count_errors' => 1, 'functions' => [
126                 'perror',                                       # Use g_strerror() and report messages in whatever
127                                                                 #  fashion is appropriate for the code in question.
128                 'ctime',                                        # Use abs_time_secs_to_str()
129                 'dissector_add',                                # Use dissector_add_uint()
130                 'dissector_change',                             # Use dissector_change_uint()
131                 'dissector_delete',                             # Use dissector_delete_uint()
132                 'dissector_get_port_handle',                    # Use dissector_get_uint_handle()
133                 'dissector_reset',                              # Use dissector_reset_uint()
134                 'dissector_try_port',                           # Use dissector_try_uint()
135                 'dissector_try_port_new',                       # Use dissector_try_uint_new()
136                 'next_tvb_add_port',                            # Use next_tvb_add_uint() (and a matching change
137                                                                 #  of NTVB_PORT -> NTVB_UINT)
138
139                 ### Deprecated GLib/GObject functions/macros
140                 # (The list is based upon the GLib 2.30.2 & GObject 2.30.2 documentation;
141                 #  An entry may be commented out if it is currently
142                 #  being used in Wireshark and if the replacement functionality
143                 #  is not available in all the GLib versions that Wireshark
144                 #  currently supports.
145                 # Note: Wireshark currently (Jan 2012) requires GLib 2.14 or newer.
146                 #  The Wireshark build currently (Jan 2012) defines G_DISABLE_DEPRECATED
147                 #  so use of any of the following should cause the Wireshark build to fail and
148                 #  therefore the tests for obsolete GLib function usage in checkAPIs should not be needed.
149                 'G_ALLOC_AND_FREE',
150                 'G_ALLOC_ONLY',
151                 'g_allocator_free',                             # "use slice allocator" (avail since 2.10,2.14)
152                 'g_allocator_new',                              # "use slice allocator" (avail since 2.10,2.14)
153                 'g_async_queue_ref_unlocked',                   # g_async_queue_ref()   (OK since 2.8)
154                 'g_async_queue_unref_and_unlock',               # g_async_queue_unref() (OK since 2.8)
155                 'g_atomic_int_exchange_and_add',                # since 2.30
156                 'g_basename',
157                 'g_blow_chunks',                                # "use slice allocator" (avail since 2.10,2.14)
158                 'g_cache_value_foreach',                        # g_cache_key_foreach()
159                 'g_chunk_free',                                 # g_slice_free (avail since 2.10)
160                 'g_chunk_new',                                  # g_slice_new  (avail since 2.10)
161                 'g_chunk_new0',                                 # g_slice_new0 (avail since 2.10)
162                 'g_completion_add_items',                       # since 2.26
163                 'g_completion_clear_items',                     # since 2.26
164                 'g_completion_complete',                        # since 2.26
165                 'g_completion_complete_utf8',                   # since 2.26
166                 'g_completion_free',                            # since 2.26
167                 'g_completion_new',                             # since 2.26
168                 'g_completion_remove_items',                    # since 2.26
169                 'g_completion_set_compare',                     # since 2.26
170                 'G_CONST_RETURN',                               # since 2.26
171                 'g_date_set_time',                              # g_date_set_time_t (avail since 2.10)
172                 'g_dirname',
173                 'g_format_size_for_display',                    # since 2.30: use g_format_size()
174                 'G_GNUC_FUNCTION',
175                 'G_GNUC_PRETTY_FUNCTION',
176                 'g_hash_table_freeze',
177                 'g_hash_table_thaw',
178                 'G_HAVE_GINT64',
179                 'g_io_channel_close',
180                 'g_io_channel_read',
181                 'g_io_channel_seek',
182                 'g_io_channel_write',
183                 'g_list_pop_allocator',                         # "does nothing since 2.10"
184                 'g_list_push_allocator',                        # "does nothing since 2.10"
185                 'g_main_destroy',
186                 'g_main_is_running',
187                 'g_main_iteration',
188                 'g_main_new',
189                 'g_main_pending',
190                 'g_main_quit',
191                 'g_main_run',
192                 'g_main_set_poll_func',
193                 'g_mapped_file_free',                           # [as of 2.22: use g_map_file_unref]
194                 'g_mem_chunk_alloc',                            # "use slice allocator" (avail since 2.10)
195                 'g_mem_chunk_alloc0',                           # "use slice allocator" (avail since 2.10)
196                 'g_mem_chunk_clean',                            # "use slice allocator" (avail since 2.10)
197                 'g_mem_chunk_create',                           # "use slice allocator" (avail since 2.10)
198                 'g_mem_chunk_destroy',                          # "use slice allocator" (avail since 2.10)
199                 'g_mem_chunk_free',                             # "use slice allocator" (avail since 2.10)
200                 'g_mem_chunk_info',                             # "use slice allocator" (avail since 2.10)
201                 'g_mem_chunk_new',                              # "use slice allocator" (avail since 2.10)
202                 'g_mem_chunk_print',                            # "use slice allocator" (avail since 2.10)
203                 'g_mem_chunk_reset',                            # "use slice allocator" (avail since 2.10)
204                 'g_node_pop_allocator',                         # "does nothing since 2.10"
205                 'g_node_push_allocator',                        # "does nothing since 2.10"
206                 'g_relation_count',                             # since 2.26
207                 'g_relation_delete',                            # since 2.26
208                 'g_relation_destroy',                           # since 2.26
209                 'g_relation_exists',                            # since 2.26
210                 'g_relation_index',                             # since 2.26
211                 'g_relation_insert',                            # since 2.26
212                 'g_relation_new',                               # since 2.26
213                 'g_relation_print',                             # since 2.26
214                 'g_relation_select',                            # since 2.26
215                 'g_scanner_add_symbol',
216                 'g_scanner_remove_symbol',
217                 'g_scanner_foreach_symbol',
218                 'g_scanner_freeze_symbol_table',
219                 'g_scanner_thaw_symbol_table',
220                 'g_slist_pop_allocator',                        # "does nothing since 2.10"
221                 'g_slist_push_allocator',                       # "does nothing since 2.10"
222                 'g_source_get_current_time',                    # since 2.28: use g_source_get_time()
223                 'g_strcasecmp',                                 #
224                 'g_strdown',                                    #
225                 'g_string_down',                                #
226                 'g_string_sprintf',                             # use g_string_printf() instead
227                 'g_string_sprintfa',                            # use g_string_append_printf instead
228                 'g_string_up',                                  #
229                 'g_strncasecmp',                                #
230                 'g_strup',                                      #
231                 'g_tree_traverse',
232                 'g_tuples_destroy',                             # since 2.26
233                 'g_tuples_index',                               # since 2.26
234                 'g_unicode_canonical_decomposition',            # since 2.30: use g_unichar_fully_decompose()
235                 'G_UNICODE_COMBINING_MARK',                     # since 2.30:use G_UNICODE_SPACING_MARK
236                 'g_value_set_boxed_take_ownership',             # GObject
237                 'g_value_set_object_take_ownership',            # GObject
238                 'g_value_set_param_take_ownership',             # GObject
239                 'g_value_set_string_take_ownership',            # Gobject
240                 'G_WIN32_DLLMAIN_FOR_DLL_NAME',
241                 'g_win32_get_package_installation_directory',
242                 'g_win32_get_package_installation_subdirectory',
243                 ] },
244
245         # APIs that make the program exit. Dissectors shouldn't call these
246         'abort' => { 'count_errors' => 1, 'functions' => [
247                 'abort',
248                 'assert',
249                 'assert_perror',
250                 'exit',
251                 'g_assert',
252                 'g_error',
253                 ] },
254
255         # APIs that print to the terminal. Dissectors shouldn't call these
256         'termoutput' => { 'count_errors' => 0, 'functions' => [
257                 'printf',
258                 'g_warning',
259                 ] },
260
261         # Deprecated GTK APIs
262         #  which SHOULD NOT be used in Wireshark (any more).
263         #  (Filled in from 'E' entries in %deprecatedGtkFunctions below)
264         'deprecated-gtk' => { 'count_errors' => 1, 'functions' => [
265                 ] },
266
267         # Deprecated GTK APIs yet to be replaced
268         #  (Filled in from 'W' entries in %deprecatedGtkFunctions below)
269         'deprecated-gtk-todo' => { 'count_errors' => 0, 'functions' => [
270                 ] },
271
272 );
273
274 # Deprecated GTK+ (and GDK) functions/macros with (E)rror or (W)arning flag:
275 # (The list is based upon the GTK+ 2.24.8 documentation;
276 # E: There should be no current Wireshark use so Error if seen;
277 # W: Not all Wireshark use yet fixed so Warn if seen; (Change to E as fixed)
278
279 # Note: Wireshark currently (Jan 2012) requires GTK 2.12 or newer.
280 #       The Wireshark build currently (Jan 2012) defines GTK_DISABLE_DEPRECATED.
281 #       However: Wireshark source still has a few uses of deprecated GTK functions
282 #                (which either are ifdef'd out or GTK_DISABLE_DEPRECATED is undef'd).
283 #                Thus: there a few GTK functions still marked as 'W' below.
284 #       Deprecated GDK functions are included in the list of deprecated GTK functions.
285 #       The Wireshark build currently (Jan 2012) does not define GDK_DISABLE_DEPRECATED
286 #         since there are still some uses of deprecated GDK functions.
287 #         They are marked with 'W' below.
288
289 my %deprecatedGtkFunctions = (
290                 'gtk_about_dialog_get_name',                    'E',
291                 'gtk_about_dialog_set_name',                    'E',
292                 'gtk_about_dialog_set_email_hook',              'E', # since 2.24
293                 'gtk_about_dialog_set_url_hook',                'E', # since 2.24
294                 'gtk_accel_group_ref',                          'E',
295                 'gtk_accel_group_unref',                        'E',
296                 'gtk_action_block_activate_from',               'E', # since 2.16
297                 'gtk_action_connect_proxy',                     'E', # since 2.16: use gtk_activatable_set_related_action() (as of 2.16)
298                 'gtk_action_disconnect_proxy',                  'E', # since 2.16: use gtk_activatable_set_related_action() (as of 2.16)
299                 'gtk_action_unblock_activate_from',             'E', # since 2.16
300                 'gtk_binding_entry_add',                        'E',
301                 'gtk_binding_entry_add_signal',                 'E',
302                 'gtk_binding_entry_clear',                      'E',
303                 'gtk_binding_parse_binding',                    'E',
304                 'gtk_box_pack_end_defaults',                    'E',
305                 'gtk_box_pack_start_defaults',                  'E',
306                 'gtk_button_box_get_child_ipadding',            'E',
307                 'gtk_button_box_get_child_size',                'E',
308                 'gtk_button_box_get_spacing',                   'E',
309                 'gtk_button_box_set_child_ipadding',            'E', # style properties child-internal-pad-x/-y
310                 'gtk_button_box_set_child_size',                'E', # style properties child-min-width/-height
311                 'gtk_button_box_set_spacing',                   'E', # gtk_box_set_spacing [==]
312                 'gtk_button_enter',                             'E', # since 2.20
313                 'gtk_button_leave',                             'E', # since 2.20
314                 'gtk_button_pressed',                           'E', # since 2.20
315                 'gtk_button_released',                          'E', # since 2.20
316                 'gtk_calendar_display_options',                 'E',
317                 'gtk_calendar_freeze',                          'E',
318                 'gtk_calendar_thaw',                            'E',
319                 'GTK_CELL_PIXMAP',                              'E', # GtkTreeView (& related) ...
320                 'GTK_CELL_PIXTEXT',                             'E',
321                 'gtk_cell_renderer_editing_canceled',           'E',
322                 'GTK_CELL_TEXT',                                'E',
323                 'gtk_cell_view_get_cell_renderers',             'E', # gtk_cell_layout_get_cells ()             (avail since 2.12)
324                 'GTK_CELL_WIDGET',                              'E',
325                 'GTK_CHECK_CAST',                               'E', # G_TYPE_CHECK_INSTANCE_CAST [==]
326                 'GTK_CHECK_CLASS_CAST',                         'E', # G_TYPE_CHECK_CLASS_CAST [==]
327                 'GTK_CHECK_CLASS_TYPE',                         'E', # G_TYPE_CHECK_CLASS_TYPE [==]
328                 'GTK_CHECK_GET_CLASS',                          'E', # G_TYPE_INSTANCE_GET_CLASS [==]
329                 'gtk_check_menu_item_set_show_toggle',          'E', # Does nothing; remove; [show_toggle is always TRUE]
330                 'gtk_check_menu_item_set_state',                'E',
331                 'GTK_CHECK_TYPE',                               'E', # G_TYPE_CHECK_INSTANCE_TYPE [==]
332                 'GTK_CLASS_NAME',                               'E',
333                 'GTK_CLASS_TYPE',                               'E',
334                 'GTK_CLIST_ADD_MODE',                           'E', # GtkTreeView (& related) ...
335                 'gtk_clist_append',                             'E',
336                 'GTK_CLIST_AUTO_RESIZE_BLOCKED',                'E',
337                 'GTK_CLIST_AUTO_SORT',                          'E',
338                 'gtk_clist_clear',                              'E',
339                 'gtk_clist_column_title_active',                'E',
340                 'gtk_clist_column_title_passive',               'E',
341                 'gtk_clist_column_titles_active',               'E',
342                 'gtk_clist_column_titles_hide',                 'E',
343                 'gtk_clist_column_titles_passive',              'E',
344                 'gtk_clist_column_titles_show',                 'E',
345                 'gtk_clist_columns_autosize',                   'E',
346                 'GTK_CLIST_DRAW_DRAG_LINE',                     'E',
347                 'GTK_CLIST_DRAW_DRAG_RECT',                     'E',
348                 'gtk_clist_find_row_from_data',                 'E',
349                 'GTK_CLIST_FLAGS',                              'E',
350                 'gtk_clist_freeze',                             'E',
351                 'gtk_clist_get_cell_style',                     'E',
352                 'gtk_clist_get_cell_type',                      'E',
353                 'gtk_clist_get_column_title',                   'E',
354                 'gtk_clist_get_column_widget',                  'E',
355                 'gtk_clist_get_hadjustment',                    'E',
356                 'gtk_clist_get_pixmap',                         'E',
357                 'gtk_clist_get_pixtext',                        'E',
358                 'gtk_clist_get_row_data',                       'E',
359                 'gtk_clist_get_row_style',                      'E',
360                 'gtk_clist_get_selectable',                     'E',
361                 'gtk_clist_get_selection_info',                 'E',
362                 'gtk_clist_get_text',                           'E',
363                 'gtk_clist_get_vadjustment',                    'E',
364                 'GTK_CLIST_IN_DRAG',                            'E',
365                 'gtk_clist_insert',                             'E',
366                 'gtk_clist_moveto',                             'E',
367                 'gtk_clist_new',                                'E',
368                 'gtk_clist_new_with_titles',                    'E',
369                 'gtk_clist_optimal_column_width',               'E',
370                 'gtk_clist_prepend',                            'E',
371                 'gtk_clist_remove',                             'E',
372                 'GTK_CLIST_REORDERABLE',                        'E',
373                 'GTK_CLIST_ROW',                                'E',
374                 'GTK_CLIST_ROW_HEIGHT_SET',                     'E',
375                 'gtk_clist_row_is_visible',                     'E',
376                 'gtk_clist_row_move',                           'E',
377                 'gtk_clist_select_all',                         'E',
378                 'gtk_clist_select_row',                         'E',
379                 'gtk_clist_set_auto_sort',                      'E',
380                 'gtk_clist_set_background',                     'E',
381                 'gtk_clist_set_button_actions',                 'E',
382                 'gtk_clist_set_cell_style',                     'E',
383                 'gtk_clist_set_column_auto_resize',             'E',
384                 'gtk_clist_set_column_justification',           'E',
385                 'gtk_clist_set_column_max_width',               'E',
386                 'gtk_clist_set_column_min_width',               'E',
387                 'gtk_clist_set_column_resizeable',              'E',
388                 'gtk_clist_set_column_title',                   'E',
389                 'gtk_clist_set_column_visibility',              'E',
390                 'gtk_clist_set_column_widget',                  'E',
391                 'gtk_clist_set_column_width',                   'E',
392                 'gtk_clist_set_compare_func',                   'E',
393                 'GTK_CLIST_SET_FLAG',                           'E',
394                 'gtk_clist_set_foreground',                     'E',
395                 'gtk_clist_set_hadjustment',                    'E',
396                 'gtk_clist_set_pixmap',                         'E',
397                 'gtk_clist_set_pixtext',                        'E',
398                 'gtk_clist_set_reorderable',                    'E',
399                 'gtk_clist_set_row_data',                       'E',
400                 'gtk_clist_set_row_data_full',                  'E',
401                 'gtk_clist_set_row_height',                     'E',
402                 'gtk_clist_set_row_style',                      'E',
403                 'gtk_clist_set_selectable',                     'E',
404                 'gtk_clist_set_selection_mode',                 'E',
405                 'gtk_clist_set_shadow_type',                    'E',
406                 'gtk_clist_set_shift',                          'E',
407                 'gtk_clist_set_sort_column',                    'E',
408                 'gtk_clist_set_sort_type',                      'E',
409                 'gtk_clist_set_text',                           'E',
410                 'gtk_clist_set_use_drag_icons',                 'E',
411                 'gtk_clist_set_vadjustment',                    'E',
412                 'GTK_CLIST_SHOW_TITLES',                        'E',
413                 'gtk_clist_sort',                               'E',
414                 'gtk_clist_swap_rows',                          'E',
415                 'gtk_clist_thaw',                               'E',
416                 'gtk_clist_undo_selection',                     'E',
417                 'gtk_clist_unselect_all',                       'E',
418                 'gtk_clist_unselect_row',                       'E',
419                 'GTK_CLIST_UNSET_FLAG',                         'E',
420                 'GTK_CLIST_USE_DRAG_ICONS',                     'E',
421                 'gtk_color_selection_get_color',                'E',
422                 'gtk_color_selection_set_change_palette_hook',  'E',
423                 'gtk_color_selection_set_color',                'E',
424                 'gtk_color_selection_set_update_policy',        'E',
425                 'gtk_combo_box_append_text',                    'E', #
426                 'gtk_combo_box_entry_get_text_column',          'E', #
427                 'gtk_combo_box_entry_new',                      'E', #
428                 'gtk_combo_box_entry_new_text',                 'E', #
429                 'gtk_combo_box_entry_new_with_model',           'E', #
430                 'gtk_combo_box_entry_set_text_column',          'E', #
431                 'gtk_combo_box_get_active_text',                'E', #
432                 'gtk_combo_box_insert_text',                    'E', #
433                 'gtk_combo_box_new_text',                       'E', #
434                 'gtk_combo_box_prepend_text',                   'E', #
435                 'gtk_combo_box_remove_text',                    'E', #
436                 'gtk_combo_disable_activate',                   'E', # GtkComboBoxEntry ... (avail since 2.4/2.6/2.10/2.14)
437                 'gtk_combo_new',                                'E',
438                 'gtk_combo_set_case_sensitive',                 'E',
439                 'gtk_combo_set_item_string',                    'E',
440                 'gtk_combo_set_popdown_strings',                'E',
441                 'gtk_combo_set_use_arrows',                     'E',
442                 'gtk_combo_set_use_arrows_always',              'E',
443                 'gtk_combo_set_value_in_list',                  'E',
444                 'gtk_container_border_width',                   'E', # gtk_container_set_border_width [==]
445                 'gtk_container_children',                       'E', # gtk_container_get_children [==]
446                 'gtk_container_foreach_full',                   'E',
447                 'gtk_ctree_collapse',                           'E',
448                 'gtk_ctree_collapse_recursive',                 'E',
449                 'gtk_ctree_collapse_to_depth',                  'E',
450                 'gtk_ctree_expand',                             'E',
451                 'gtk_ctree_expand_recursive',                   'E',
452                 'gtk_ctree_expand_to_depth',                    'E',
453                 'gtk_ctree_export_to_gnode',                    'E',
454                 'gtk_ctree_find',                               'E',
455                 'gtk_ctree_find_all_by_row_data',               'E',
456                 'gtk_ctree_find_all_by_row_data_custom',        'E',
457                 'gtk_ctree_find_by_row_data',                   'E',
458                 'gtk_ctree_find_by_row_data_custom',            'E',
459                 'gtk_ctree_find_node_ptr',                      'E',
460                 'GTK_CTREE_FUNC',                               'E',
461                 'gtk_ctree_get_node_info',                      'E',
462                 'gtk_ctree_insert_gnode',                       'E',
463                 'gtk_ctree_insert_node',                        'E',
464                 'gtk_ctree_is_ancestor',                        'E',
465                 'gtk_ctree_is_hot_spot',                        'E',
466                 'gtk_ctree_is_viewable',                        'E',
467                 'gtk_ctree_last',                               'E',
468                 'gtk_ctree_move',                               'E',
469                 'gtk_ctree_new',                                'E',
470                 'gtk_ctree_new_with_titles',                    'E',
471                 'GTK_CTREE_NODE',                               'E',
472                 'gtk_ctree_node_get_cell_style',                'E',
473                 'gtk_ctree_node_get_cell_type',                 'E',
474                 'gtk_ctree_node_get_pixmap',                    'E',
475                 'gtk_ctree_node_get_pixtext',                   'E',
476                 'gtk_ctree_node_get_row_data',                  'E',
477                 'gtk_ctree_node_get_row_style',                 'E',
478                 'gtk_ctree_node_get_selectable',                'E',
479                 'gtk_ctree_node_get_text',                      'E',
480                 'gtk_ctree_node_is_visible',                    'E',
481                 'gtk_ctree_node_moveto',                        'E',
482                 'GTK_CTREE_NODE_NEXT',                          'E',
483                 'gtk_ctree_node_nth',                           'E',
484                 'GTK_CTREE_NODE_PREV',                          'E',
485                 'gtk_ctree_node_set_background',                'E',
486                 'gtk_ctree_node_set_cell_style',                'E',
487                 'gtk_ctree_node_set_foreground',                'E',
488                 'gtk_ctree_node_set_pixmap',                    'E',
489                 'gtk_ctree_node_set_pixtext',                   'E',
490                 'gtk_ctree_node_set_row_data',                  'E',
491                 'gtk_ctree_node_set_row_data_full',             'E',
492                 'gtk_ctree_node_set_row_style',                 'E',
493                 'gtk_ctree_node_set_selectable',                'E',
494                 'gtk_ctree_node_set_shift',                     'E',
495                 'gtk_ctree_node_set_text',                      'E',
496                 'gtk_ctree_post_recursive',                     'E',
497                 'gtk_ctree_post_recursive_to_depth',            'E',
498                 'gtk_ctree_pre_recursive',                      'E',
499                 'gtk_ctree_pre_recursive_to_depth',             'E',
500                 'gtk_ctree_real_select_recursive',              'E',
501                 'gtk_ctree_remove_node',                        'E',
502                 'GTK_CTREE_ROW',                                'E',
503                 'gtk_ctree_select',                             'E',
504                 'gtk_ctree_select_recursive',                   'E',
505                 'gtk_ctree_set_drag_compare_func',              'E',
506                 'gtk_ctree_set_expander_style',                 'E',
507                 'gtk_ctree_set_indent',                         'E',
508                 'gtk_ctree_set_line_style',                     'E',
509                 'gtk_ctree_set_node_info',                      'E',
510                 'gtk_ctree_set_reorderable',                    'E',
511                 'gtk_ctree_set_show_stub',                      'E',
512                 'gtk_ctree_set_spacing',                        'E',
513                 'gtk_ctree_sort_node',                          'E',
514                 'gtk_ctree_sort_recursive',                     'E',
515                 'gtk_ctree_toggle_expansion',                   'E',
516                 'gtk_ctree_toggle_expansion_recursive',         'E',
517                 'gtk_ctree_unselect',                           'E',
518                 'gtk_ctree_unselect_recursive',                 'E',
519                 'gtk_curve_get_vector',                         'E', # since 2.20
520                 'gtk_curve_new',                                'E', # since 2.20
521                 'gtk_curve_reset',                              'E', # since 2.20
522                 'gtk_curve_set_curve_type',                     'E', # since 2.20
523                 'gtk_curve_set_gamma',                          'E', # since 2.20
524                 'gtk_curve_set_range',                          'E', # since 2.20
525                 'gtk_curve_set_vector',                         'E', # since 2.20
526                 'gtk_dialog_get_has_separator',                 'E', # This function will be removed in GTK+ 3
527                 'gtk_dialog_set_has_separator',                 'E', # This function will be removed in GTK+ 3
528                 'gtk_drag_set_default_icon',                    'E',
529                 'gtk_draw_arrow',                               'E',
530                 'gtk_draw_box',                                 'E',
531                 'gtk_draw_box_gap',                             'E',
532                 'gtk_draw_check',                               'E',
533                 'gtk_draw_diamond',                             'E',
534                 'gtk_draw_expander',                            'E',
535                 'gtk_draw_extension',                           'E',
536                 'gtk_draw_flat_box',                            'E',
537                 'gtk_draw_focus',                               'E',
538                 'gtk_draw_handle',                              'E',
539                 'gtk_draw_hline',                               'E',
540                 'gtk_draw_layout',                              'E',
541                 'gtk_draw_option',                              'E',
542                 'gtk_draw_polygon',                             'E',
543                 'gtk_draw_resize_grip',                         'E',
544                 'gtk_draw_shadow',                              'E',
545                 'gtk_draw_shadow_gap',                          'E',
546                 'gtk_draw_slider',                              'E',
547                 'gtk_draw_string',                              'E',
548                 'gtk_draw_tab',                                 'E',
549                 'gtk_draw_vline',                               'E',
550                 'gtk_drawing_area_size',                        'E', # >> g_object_set() [==] ?
551                                                                      #    gtk_widget_set_size_request() [==?]
552                 'gtk_entry_append_text',                        'E', # >> gtk_editable_insert_text() [==?]
553                 'gtk_entry_new_with_max_length',                'E', # gtk_entry_new(); gtk_entry_set_max_length()
554                 'gtk_entry_prepend_text',                       'E',
555                 'gtk_entry_select_region',                      'E',
556                 'gtk_entry_set_editable',                       'E', # >> gtk_editable_set_editable() [==?]
557                 'gtk_entry_set_position',                       'E',
558                 'gtk_exit',                                     'E', # exit() [==]
559                 'gtk_file_chooser_button_new_with_backend',     'E',
560                 'gtk_file_chooser_dialog_new_with_backend',     'E',
561                 'gtk_file_chooser_widget_new_with_backend',     'E',
562                 'gtk_file_selection_complete',                  'E',
563                 'gtk_file_selection_get_filename',              'E', # GtkFileChooser ...
564                 'gtk_file_selection_get_select_multiple',       'E',
565                 'gtk_file_selection_get_selections',            'E',
566                 'gtk_file_selection_hide_fileop_buttons',       'E',
567                 'gtk_file_selection_new',                       'E',
568                 'gtk_file_selection_set_filename',              'E',
569                 'gtk_file_selection_set_select_multiple',       'E',
570                 'gtk_file_selection_show_fileop_buttons',       'E',
571                 'gtk_fixed_get_has_window',                     'E', # gtk_widget_get_has_window() (available since 2.18)
572                 'gtk_fixed_set_has_window',                     'E', # gtk_widget_set_has_window() (available since 2.18)
573                 'gtk_font_selection_dialog_get_apply_button',   'E',
574                 'gtk_font_selection_dialog_get_font',           'E',
575                 'gtk_font_selection_get_font',                  'E', # gtk_font_selection_get_font_name() [!=]
576                 'GTK_FUNDAMENTAL_TYPE',                         'E',
577                 'gtk_gamma_curve_new',                          'E', # since 2.20
578                 'gtk_hbutton_box_get_layout_default',           'E',
579                 'gtk_hbutton_box_get_spacing_default',          'E',
580                 'gtk_hbutton_box_set_layout_default',           'E',
581                 'gtk_hbutton_box_set_spacing_default',          'E',
582                 'gtk_hruler_new',                               'E', # since 2.24
583                 'gtk_icon_view_get_orientation',                'E', # gtk_icon_view_get_item_orientation()
584                 'gtk_icon_view_set_orientation',                'E', # gtk_icon_view_set_item_orientation()
585                 'gtk_idle_add',                                 'E',
586                 'gtk_idle_add_full',                            'E',
587                 'gtk_idle_add_priority',                        'E',
588                 'gtk_idle_remove',                              'E',
589                 'gtk_idle_remove_by_data',                      'E',
590                 'gtk_image_get',                                'E',
591                 'gtk_image_set',                                'E',
592                 'gtk_init_add',                                 'E', # removed in 3.0
593                 'gtk_input_add_full',                           'E', # >>> g_io_add_watch_full()
594                 'gtk_input_dialog_new',                         'E', # since 2.20
595                 'gtk_input_remove',                             'E', # >>> g_source_remove()
596                 'GTK_IS_ROOT_TREE',                             'E',
597                 'gtk_item_deselect',                            'E', # gtk_menu_item_deselect()
598                 'gtk_item_select',                              'E', # gtk_menu_item_select()
599                 'gtk_item_toggle',                              'E', #
600                 'gtk_item_factories_path_delete',               'E', # GtkUIManager (avail since 2.4) ...
601                 'gtk_item_factory_add_foreign',                 'E',
602                 'gtk_item_factory_construct',                   'E',
603                 'gtk_item_factory_create_item',                 'W',
604                 'gtk_item_factory_create_items',                'E',
605                 'gtk_item_factory_create_items_ac',             'E',
606                 'gtk_item_factory_create_menu_entries',         'E',
607                 'gtk_item_factory_delete_entries',              'E',
608                 'gtk_item_factory_delete_entry',                'E',
609                 'gtk_item_factory_delete_item',                 'E',
610                 'gtk_item_factory_from_path',                   'E',
611                 'gtk_item_factory_from_widget',                 'W',
612                 'gtk_item_factory_get_item',                    'W',
613                 'gtk_item_factory_get_item_by_action',          'E',
614                 'gtk_item_factory_get_widget',                  'W',
615                 'gtk_item_factory_get_widget_by_action',        'E',
616                 'gtk_item_factory_new',                         'E',
617                 'gtk_item_factory_path_from_widget',            'E',
618                 'gtk_item_factory_popup',                       'E',
619                 'gtk_item_factory_popup_data',                  'E',
620                 'gtk_item_factory_popup_data_from_widget',      'E',
621                 'gtk_item_factory_popup_with_data',             'E',
622                 'gtk_item_factory_set_translate_func',          'E',
623                 'gtk_label_get',                                'E', # gtk_label_get_text() [!=]
624                 'gtk_label_parse_uline',                        'E',
625                 'gtk_label_set',                                'E', # gtk_label_set_text() [==]
626                 'gtk_layout_freeze',                            'E',
627                 'gtk_layout_thaw',                              'E',
628                 'gtk_link_button_set_uri_hook',                 'E', # since 2.24
629                 'gtk_list_append_items',                        'E',
630                 'gtk_list_child_position',                      'E',
631                 'gtk_list_clear_items',                         'E',
632                 'gtk_list_end_drag_selection',                  'E',
633                 'gtk_list_end_selection',                       'E',
634                 'gtk_list_extend_selection',                    'E',
635                 'gtk_list_insert_items',                        'E',
636                 'gtk_list_item_deselect',                       'E',
637                 'gtk_list_item_new',                            'E',
638                 'gtk_list_item_new_with_label',                 'E',
639                 'gtk_list_item_select',                         'E',
640                 'gtk_list_new',                                 'E',
641                 'gtk_list_prepend_items',                       'E',
642                 'gtk_list_remove_items',                        'E',
643                 'gtk_list_remove_items_no_unref',               'E',
644                 'gtk_list_scroll_horizontal',                   'E',
645                 'gtk_list_scroll_vertical',                     'E',
646                 'gtk_list_select_all',                          'E',
647                 'gtk_list_select_child',                        'E',
648                 'gtk_list_select_item',                         'E',
649                 'gtk_list_set_selection_mode',                  'E',
650                 'gtk_list_start_selection',                     'E',
651                 'gtk_list_toggle_add_mode',                     'E',
652                 'gtk_list_toggle_focus_row',                    'E',
653                 'gtk_list_toggle_row',                          'E',
654                 'gtk_list_undo_selection',                      'E',
655                 'gtk_list_unselect_all',                        'E',
656                 'gtk_list_unselect_child',                      'E',
657                 'gtk_list_unselect_item',                       'E',
658                 'gtk_menu_append',                              'E', # gtk_menu_shell_append() [==?]
659                 'gtk_menu_bar_append',                          'E',
660                 'gtk_menu_bar_insert',                          'E',
661                 'gtk_menu_bar_prepend',                         'E',
662                 'gtk_menu_insert',                              'E',
663                 'gtk_menu_item_remove_submenu',                 'E',
664                 'gtk_menu_item_right_justify',                  'E',
665                 'gtk_menu_prepend',                             'E', # gtk_menu_shell_prepend() [==?]
666                 'gtk_menu_tool_button_set_arrow_tooltip',       'E',
667                 'gtk_notebook_current_page',                    'E',
668                 'gtk_notebook_get_group',                       'E', # since 2.24
669                 'gtk_notebook_get_group_id',                    'E',
670                 'gtk_notebook_query_tab_label_packing',         'E', # since 2.20
671                 'gtk_nitebook_set_group',                       'E', # since 2.24
672                 'gtk_notebook_set_group_id',                    'E',
673                 'gtk_notebook_set_homogeneous_tabs',            'E',
674                 'gtk_notebook_set_page',                        'E', # gtk_notebook_set_current_page() [==]
675                 'gtk_notebook_set_tab_border',                  'E',
676                 'gtk_notebook_set_tab_hborder',                 'E',
677                 'gtk_notebook_set_tab_label_packing',           'E', # since 2.20
678                 'gtk_notebook_set_tab_vborder',                 'E',
679                 'gtk_notebook_set_window_creation_hook',        'E', # since 2.24
680                 'gtk_object_add_arg_type',                      'E',
681                 'gtk_object_data_force_id',                     'E',
682                 'gtk_object_data_try_key',                      'E',
683                 'gtk_object_destroy',                           'E', # since 2.24
684                 'GTK_OBJECT_FLAGS',                             'E', # since 2.22
685                 'GTK_OBJECT_FLOATING',                          'E',
686                 'gtk_object_get',                               'E',
687                 'gtk_object_get_data',                          'E',
688                 'gtk_object_get_data_by_id',                    'E',
689                 'gtk_object_get_user_data',                     'E',
690                 'gtk_object_new',                               'E',
691                 'gtk_object_ref',                               'E',
692                 'gtk_object_remove_data',                       'E',
693                 'gtk_object_remove_data_by_id',                 'E',
694                 'gtk_object_remove_no_notify',                  'E',
695                 'gtk_object_remove_no_notify_by_id',            'E',
696                 'gtk_object_set',                               'E',
697                 'gtk_object_set_data',                          'E',
698                 'gtk_object_set_data_by_id',                    'E',
699                 'gtk_object_set_data_by_id_full',               'E',
700                 'gtk_object_set_data_full',                     'E',
701                 'gtk_object_set_user_data',                     'E',
702                 'gtk_object_sink',                              'E',
703                 'GTK_OBJECT_TYPE',                              'E', # G_OBJECT_TYPE
704                 'GTK_OBJECT_TYPE_NAME',                         'E', # G_OBJECT_TYPE_NAME
705                 'gtk_object_unref',                             'E',
706                 'gtk_object_weakref',                           'E',
707                 'gtk_object_weakunref',                         'E',
708                 'gtk_old_editable_changed',                     'E',
709                 'gtk_old_editable_claim_selection',             'E',
710                 'gtk_option_menu_get_history',                  'E', # GtkComboBox ... (avail since 2.4/2.6/2.10/2.14)
711                 'gtk_option_menu_get_menu',                     'E',
712                 'gtk_option_menu_new',                          'E',
713                 'gtk_option_menu_remove_menu',                  'E',
714                 'gtk_option_menu_set_history',                  'E',
715                 'gtk_option_menu_set_menu',                     'E',
716                 'gtk_paint_string',                             'E',
717                 'gtk_paned_gutter_size',                        'E', # gtk_paned_set_gutter_size()
718                 'gtk_paned_set_gutter_size',                    'E', # "does nothing"
719                 'gtk_pixmap_get',                               'E', # GtkImage ...
720                 'gtk_pixmap_new',                               'E',
721                 'gtk_pixmap_set',                               'E',
722                 'gtk_pixmap_set_build_insensitive',             'E',
723                 'gtk_preview_draw_row',                         'E',
724                 'gtk_preview_get_cmap',                         'E',
725                 'gtk_preview_get_info',                         'E',
726                 'gtk_preview_get_visual',                       'E',
727                 'gtk_preview_new',                              'E',
728                 'gtk_preview_put',                              'E',
729                 'gtk_preview_reset',                            'E',
730                 'gtk_preview_set_color_cube',                   'E',
731                 'gtk_preview_set_dither',                       'E',
732                 'gtk_preview_set_expand',                       'E',
733                 'gtk_preview_set_gamma',                        'E',
734                 'gtk_preview_set_install_cmap',                 'E',
735                 'gtk_preview_set_reserved',                     'E',
736                 'gtk_preview_size',                             'E',
737                 'gtk_preview_uninit',                           'E',
738                 'GTK_PRIORITY_DEFAULT',                         'E',
739                 'GTK_PRIORITY_HIGH',                            'E',
740                 'GTK_PRIORITY_INTERNAL',                        'E',
741                 'GTK_PRIORITY_LOW',                             'E',
742                 'GTK_PRIORITY_REDRAW',                          'E',
743                 'gtk_progress_bar_new_with_adjustment',         'E',
744                 'gtk_progress_bar_set_activity_blocks',         'E',
745                 'gtk_progress_bar_set_activity_step',           'E',
746                 'gtk_progress_bar_set_bar_style',               'E',
747                 'gtk_progress_bar_set_discrete_blocks',         'E',
748                 'gtk_progress_bar_update',                      'E', # >>> "gtk_progress_set_value() or
749                                                                      #    gtk_progress_set_percentage()"
750                                                                      ##  Actually: GtkProgress is deprecated so the
751                                                                      ##  right answer appears to be to use
752                                                                      ##  gtk_progress_bar_set_fraction()
753                 'gtk_progress_configure',                       'E',
754                 'gtk_progress_get_current_percentage',          'E',
755                 'gtk_progress_get_current_text',                'E',
756                 'gtk_progress_get_percentage_from_value',       'E',
757                 'gtk_progress_get_text_from_value',             'E',
758                 'gtk_progress_get_value',                       'E',
759                 'gtk_progress_set_activity_mode',               'E',
760                 'gtk_progress_set_adjustment',                  'E',
761                 'gtk_progress_set_format_string',               'E',
762                 'gtk_progress_set_percentage',                  'E',
763                 'gtk_progress_set_show_text',                   'E',
764                 'gtk_progress_set_text_alignment',              'E',
765                 'gtk_progress_set_value',                       'E',
766                 'gtk_quit_add',                                 'E', # removed in 3.0
767                 'gtk_quit_add_destroy',                         'E',
768                 'gtk_quit_add_full',                            'E',
769                 'gtk_quit_remove',                              'E',
770                 'gtk_quit_remove_by_data',                      'E',
771                 'gtk_radio_button_group',                       'E', # gtk_radio_button_get_group() [==]
772                 'gtk_radio_menu_item_group',                    'E',
773                 'gtk_range_get_update_policy',                  'E',
774                 'gtk_range_set_update_policy',                  'E',
775                 'gtk_rc_add_class_style',                       'E',
776                 'gtk_rc_add_widget_class_style',                'E',
777                 'gtk_rc_add_widget_name_style',                 'E',
778                 'gtk_rc_style_ref',                             'E',
779                 'gtk_rc_style_unref',                           'E',
780                 'gtk_recent_chooser_get_show_numbers',          'E',
781                 'gtk_recent_chooser_set_show_numbers',          'E',
782                 'gtk_recent_manager_get_for_screen',            'E',
783                 'gtk_recent_manager_get_limit',                 'E', # Use GtkRecentChooser
784                 'gtk_recent_manager_set_limit',                 'E', #
785                 'gtk_recent_manager_set_screen',                'E',
786                 'GTK_RETLOC_BOOL',                              'E',
787                 'GTK_RETLOC_BOXED',                             'E',
788                 'GTK_RETLOC_CHAR',                              'E',
789                 'GTK_RETLOC_DOUBLE',                            'E',
790                 'GTK_RETLOC_ENUM',                              'E',
791                 'GTK_RETLOC_FLAGS',                             'E',
792                 'GTK_RETLOC_FLOAT',                             'E',
793                 'GTK_RETLOC_INT',                               'E',
794                 'GTK_RETLOC_LONG',                              'E',
795                 'GTK_RETLOC_OBJECT',                            'E',
796                 'GTK_RETLOC_POINTER',                           'E',
797                 'GTK_RETLOC_STRING',                            'E',
798                 'GTK_RETLOC_UCHAR',                             'E',
799                 'GTK_RETLOC_UINT',                              'E',
800                 'GTK_RETLOC_ULONG',                             'E',
801                 'gtk_ruler_get_metric',                         'E',
802                 'gtk_ruler_get_range',                          'E',
803                 'gtk_ruler_set_metric',                         'E',
804                 'gtk_ruler_set_range',                          'E',
805                 'gtk_scale_button_get_orientation',             'E', # gtk_orientable_get_orientation()         (avail since 2.16)
806                 'gtk_scale_button_set_orientation',             'E', # gtk_orientable_set_orientation()         (avail since 2.16)
807                 'gtk_status_icon_set_tooltip',                  'E', # gtk_status_icon_set_tooltip_text()       (avail since 2.16)
808                 'gtk_selection_clear',                          'E',
809                 'gtk_set_locale',                               'E',
810                 'gtk_signal_connect',                           'E', # GSignal ...
811                 'gtk_signal_connect_after',                     'E',
812                 'gtk_signal_connect_full',                      'E',
813                 'gtk_signal_connect_object',                    'E',
814                 'gtk_signal_connect_object_after',              'E',
815                 'gtk_signal_connect_object_while_alive',        'E',
816                 'gtk_signal_connect_while_alive',               'E',
817                 'gtk_signal_default_marshaller',                'E',
818                 'gtk_signal_disconnect',                        'E',
819                 'gtk_signal_disconnect_by_data',                'E',
820                 'gtk_signal_disconnect_by_func',                'E',
821                 'gtk_signal_emit',                              'E',
822                 'gtk_signal_emit_by_name',                      'E',
823                 'gtk_signal_emit_stop',                         'E',
824                 'gtk_signal_emit_stop_by_name',                 'E',
825                 'gtk_signal_emitv',                             'E',
826                 'gtk_signal_emitv_by_name',                     'E',
827                 'GTK_SIGNAL_FUNC',                              'E',
828                 'gtk_signal_handler_block',                     'E',
829                 'gtk_signal_handler_block_by_data',             'E',
830                 'gtk_signal_handler_block_by_func',             'E',
831                 'gtk_signal_handler_pending',                   'E',
832                 'gtk_signal_handler_pending_by_func',           'E',
833                 'gtk_signal_handler_unblock',                   'E',
834                 'gtk_signal_handler_unblock_by_data',           'E',
835                 'gtk_signal_handler_unblock_by_func',           'E',
836                 'gtk_signal_lookup',                            'E',
837                 'gtk_signal_name',                              'E',
838                 'gtk_signal_new',                               'E',
839                 'gtk_signal_newv',                              'E',
840                 'GTK_SIGNAL_OFFSET',                            'E',
841                 'gtk_socket_steal',                             'E',
842                 'gtk_spin_button_get_value_as_float',           'E', # gtk_spin_button_get_value() [==]
843                 'gtk_status_icon_get_blinking',                 'E',
844                 'gtk_status_icon_set_blinking',                 'E',
845                 'GTK_STRUCT_OFFSET',                            'E',
846                 'gtk_style_apply_default_pixmap',               'E',
847                 'gtk_style_get_font',                           'E',
848                 'gtk_style_ref',                                'E',
849                 'gtk_style_set_font',                           'E',
850                 'gtk_style_unref',                              'E', # g_object_unref() [==?]
851                 'gtk_text_backward_delete',                     'E',
852                 'gtk_text_forward_delete',                      'E',
853                 'gtk_text_freeze',                              'E',
854                 'gtk_text_get_length',                          'E',
855                 'gtk_text_get_point',                           'E',
856                 'GTK_TEXT_INDEX',                               'E',
857                 'gtk_text_insert',                              'E', # GtkTextView (GtkText "known to be buggy" !)
858                 'gtk_text_new',                                 'E',
859                 'gtk_text_set_adjustments',                     'E',
860                 'gtk_text_set_editable',                        'E',
861                 'gtk_text_set_line_wrap',                       'E',
862                 'gtk_text_set_point',                           'E',
863                 'gtk_text_set_word_wrap',                       'E',
864                 'gtk_text_thaw',                                'E',
865                 'gtk_timeout_add',                              'E', # g_timeout_add()
866                 'gtk_timeout_add_full',                         'E',
867                 'gtk_timeout_remove',                           'E', # g_source_remove()
868                 'gtk_tips_query_new',                           'E',
869                 'gtk_tips_query_set_caller',                    'E',
870                 'gtk_tips_query_set_labels',                    'E',
871                 'gtk_tips_query_start_query',                   'E',
872                 'gtk_tips_query_stop_query',                    'E',
873                 'gtk_toggle_button_set_state',                  'E', # gtk_toggle_button_set_active [==]
874                 'gtk_toolbar_append_element',                   'E',
875                 'gtk_toolbar_append_item',                      'E',
876                 'gtk_toolbar_append_space',                     'E', # Use gtk_toolbar_insert() instead
877                 'gtk_toolbar_append_widget',                    'E', # ??
878                 'gtk_toolbar_get_orientation',                  'E', # gtk_orientable_get_orientation()         (avail since 2.16)
879                 'gtk_toolbar_get_tooltips',                     'E',
880                 'gtk_toolbar_insert_element',                   'E',
881                 'gtk_toolbar_insert_item',                      'E',
882                 'gtk_toolbar_insert_space',                     'E',
883                 'gtk_toolbar_insert_stock',                     'E',
884                 'gtk_toolbar_insert_widget',                    'E',
885                 'gtk_toolbar_prepend_element',                  'E',
886                 'gtk_toolbar_prepend_item',                     'E',
887                 'gtk_toolbar_prepend_space',                    'E',
888                 'gtk_toolbar_prepend_widget',                   'E',
889                 'gtk_toolbar_remove_space',                     'E',
890                 'gtk_toolbar_set_orientation',                  'E', # gtk_orientable_set_orientation()         (avail since 2.16)
891                 'gtk_toolbar_set_tooltips',                     'E',
892                 'gtk_tooltips_data_get',                        'E', # new API: GtkToolTip (avail since 2.12) ...
893                 'gtk_tooltips_disable',                         'E',
894                 'gtk_tooltips_enable',                          'E',
895                 'gtk_tooltips_force_window',                    'E',
896                 'gtk_tooltips_get_info_from_tip_window',        'E',
897                 'gtk_tooltips_new',                             'E',
898                 'gtk_tooltips_set_delay',                       'E',
899                 'gtk_tooltips_set_tip',                         'E',
900                 'gtk_tool_item_set_tooltip',                    'E', # gtk_tool_item_set_tooltip_text() (avail since 2.12)
901                 'gtk_tree_append',                              'E',
902                 'gtk_tree_child_position',                      'E',
903                 'gtk_tree_clear_items',                         'E',
904                 'gtk_tree_insert',                              'E',
905                 'gtk_tree_item_collapse',                       'E',
906                 'gtk_tree_item_deselect',                       'E',
907                 'gtk_tree_item_expand',                         'E',
908                 'gtk_tree_item_new',                            'E',
909                 'gtk_tree_item_new_with_label',                 'E',
910                 'gtk_tree_item_remove_subtree',                 'E',
911                 'gtk_tree_item_select',                         'E',
912                 'gtk_tree_item_set_subtree',                    'E',
913                 'GTK_TREE_ITEM_SUBTREE',                        'E',
914                 'gtk_tree_model_get_iter_root',                 'E',
915                 'gtk_tree_new',                                 'E',
916                 'gtk_tree_path_new_root',                       'E',
917                 'gtk_tree_prepend',                             'E',
918                 'gtk_tree_remove_item',                         'E',
919                 'gtk_tree_remove_items',                        'E',
920                 'GTK_TREE_ROOT_TREE',                           'E',
921                 'gtk_tree_select_child',                        'E',
922                 'gtk_tree_select_item',                         'E',
923                 'GTK_TREE_SELECTION_OLD',                       'E',
924                 'gtk_tree_set_selection_mode',                  'E',
925                 'gtk_tree_set_view_lines',                      'E',
926                 'gtk_tree_set_view_mode',                       'E',
927                 'gtk_tree_unselect_child',                      'E',
928                 'gtk_tree_unselect_item',                       'E',
929                 'gtk_tree_view_column_get_cell_renderers',      'E', # gtk_cell_layout_get_cells ()             (avail since 2.12)
930                 'gtk_tree_view_tree_to_widget_coords',          'E',
931                 'gtk_tree_view_widget_to_tree_coords',          'E',
932                 'gtk_type_class',                               'E', # g_type_class_peek() or g_type_class_ref()
933                 'GTK_TYPE_CTREE_NODE',                          'E',
934                 'gtk_type_enum_find_value',                     'E',
935                 'gtk_type_enum_get_values',                     'E',
936                 'gtk_type_flags_find_value',                    'E',
937                 'gtk_type_flags_get_values',                    'E',
938                 'gtk_type_from_name',                           'E',
939                 'gtk_type_init',                                'E',
940                 'gtk_type_is_a',                                'E',
941                 'GTK_TYPE_FUNDAMENTAL_LAST',                    'E',
942                 'GTK_TYPE_FUNDAMENTAL_MAX',                     'E',
943                 'GTK_TYPE_IS_OBJECT',                           'E',
944                 'gtk_type_name',                                'E',
945                 'gtk_type_new',                                 'E',
946                 'gtk_type_parent',                              'E',
947                 'gtk_type_unique',                              'E',
948                 'GTK_VALUE_BOOL',                               'E',
949                 'GTK_VALUE_BOXED',                              'E',
950                 'GTK_VALUE_CHAR',                               'E',
951                 'GTK_VALUE_DOUBLE',                             'E',
952                 'GTK_VALUE_ENUM',                               'E',
953                 'GTK_VALUE_FLAGS',                              'E',
954                 'GTK_VALUE_FLOAT',                              'E',
955                 'GTK_VALUE_INT',                                'E',
956                 'GTK_VALUE_LONG',                               'E',
957                 'GTK_VALUE_OBJECT',                             'E',
958                 'GTK_VALUE_POINTER',                            'E',
959                 'GTK_VALUE_SIGNAL',                             'E',
960                 'GTK_VALUE_STRING',                             'E',
961                 'GTK_VALUE_UCHAR',                              'E',
962                 'GTK_VALUE_UINT',                               'E',
963                 'GTK_VALUE_ULONG',                              'E',
964                 'gtk_vbutton_box_get_layout_default',           'E',
965                 'gtk_vbutton_box_get_spacing_default',          'E',
966                 'gtk_vbutton_box_set_layout_default',           'E',
967                 'gtk_vbutton_box_set_spacing_default',          'E',
968                 'gtk_vruler_new',                               'E',
969                 'GTK_WIDGET_APP_PAINTABLE',                     'E', # gtk_widget_get_app_paintable()    (avail since 2.18)
970                 'GTK_WIDGET_CAN_DEFAULT',                       'E', # gtk_widget_get_can_default()      (avail since 2.18)
971                 'GTK_WIDGET_CAN_FOCUS',                         'E', # gtk_widget_get_can_focus()        (avail since 2.18)
972                 'GTK_WIDGET_COMPOSITE_CHILD',                   'E', # gtk_widget_get_composite_child()  (avail since 2.18)
973                 'GTK_WIDGET_DOUBLE_BUFFERED',                   'E', # gtk_widget_get_double_buffered()  (avail since 2.18)
974                 'GTK_WIDGET_DRAWABLE',                          'E', # gtk_widget_get_drawable()         (avail since 2.18)
975                 'GTK_WIDGET_FLAGS',                             'E', # gtk_widget_get_flags()            (avail since 2.18)
976                 'GTK_WIDGET_HAS_DEFAULT',                       'E', # gtk_widget_get_has_default()      (avail since 2.18)
977                 'GTK_WIDGET_HAS_FOCUS',                         'E', # gtk_widget_get_has_focus()        (avail since 2.18)
978                 'GTK_WIDGET_HAS_GRAB',                          'E', # gtk_widget_get_has_grab()         (avail since 2.18)
979                 'GTK_WIDGET_IS_SENSITIVE',                      'E', # gtk_widget_get_is_sensitive()     (avail since 2.18)
980                 'GTK_WIDGET_MAPPED',                            'E', # gtk_widget_get_mapped()           (avail since 2.18)
981                 'GTK_WIDGET_NO_WINDOW',                         'E', # gtk_widget_get_no_window()        (avail since 2.18)
982                 'GTK_WIDGET_PARENT_SENSITIVE',                  'E', # gtk_widget_get_parent_sensitive() (avail since 2.18)
983                 'GTK_WIDGET_RC_STYLE',                          'E', # gtk_widget_get_rc_style()         (avail since 2.18)
984                 'GTK_WIDGET_REALIZED',                          'E', # gtk_widget_get_realized()         (avail since 2.18)
985                 'GTK_WIDGET_RECEIVES_DEFAULT',                  'E', # gtk_widget_get_receives_default() (avail since 2.18)
986                 'GTK_WIDGET_SAVED_STATE',                       'E', # gtk_widget_get_saved_state()      (avail since 2.18)
987                 'GTK_WIDGET_SENSITIVE',                         'E', # gtk_widget_get_sensitive()        (avail since 2.18)
988                 'GTK_WIDGET_SET_FLAGS',                         'W', # since GTK 2.22
989                 'GTK_WIDGET_STATE',                             'E', # gtk_widget_get_state()            (avail since 2.18)
990                 'GTK_WIDGET_TOPLEVEL',                          'E', # gtk_widget_get_toplevel()         (avail since 2.18)
991                 'GTK_WIDGET_TYPE',                              'E', # gtk_widget_get_type()             (avail since 2.18)
992                 'GTK_WIDGET_UNSET_FLAGS',                       'E',
993                 'GTK_WIDGET_VISIBLE',                           'E', # gtk_widget_get_visible()          (avail since 2.18)
994                 'gtk_widget_draw',                              'E', # gtk_widget_queue_draw_area():
995                                                                      #  "in general a better choice if you want
996                                                                      #  to draw a region of a widget."
997                 'gtk_widget_get_action',                        'E', # gtk_activatable_get_related_action() (avail since 2.16)
998                 'gtk_widget_hide_all',                          'E',
999                 'gtk_widget_pop_visual',                        'E',
1000                 'gtk_widget_push_visual',                       'E',
1001                 'gtk_widget_queue_clear',                       'E',
1002                 'gtk_widget_queue_clear_area',                  'E',
1003                 'gtk_widget_ref',                               'E', # g_object_ref() [==]
1004                 'gtk_widget_reset_shapes',                      'E',
1005                 'gtk_widget_restore_default_style',             'E',
1006                 'gtk_widget_set',                               'E', # g_object_set() [==]
1007                 'gtk_widget_set_default_visual',                'E',
1008                 'gtk_widget_set_rc_style',                      'E',
1009                 'gtk_widget_set_uposition',                     'E', # ?? (see GTK documentation)
1010                 'gtk_widget_set_usize',                         'E', # gtk_widget_set_size_request()
1011                 'gtk_widget_set_visual',                        'E',
1012                 'gtk_widget_unref',                             'E',
1013                 'gtk_window_get_frame_dimensions',              'E',
1014                 'gtk_window_get_has_frame',                     'E',
1015                 'gtk_window_set_frame_dimensions',              'E',
1016                 'gtk_window_set_has_frame',                     'E',
1017                 'gtk_window_position',                          'E',
1018                 'gtk_window_set_policy',                        'E', # >>? gtk_window_set_resizable()
1019
1020 ## GDK deprecated functions:
1021                 'gdk_bitmap_create_from_data',                  'E', #
1022                 'gdk_bitmap_ref',                               'E', #
1023                 'gdk_bitmap_unref',                             'E', #
1024                 'gdk_cairo_set_source_pixmap',                  'W', # deprecated since version 2.24.
1025                                                                      # Use gdk_cairo_set_source_window() where appropriate(Since 2.24).
1026                 'gdk_char_height',                              'E', #
1027                 'gdk_char_measure',                             'E', #
1028                 'gdk_char_width',                               'E', #
1029                 'gdk_char_width_wc',                            'E', #
1030                 'gdk_colormap_change',                          'E', #
1031                 'gdk_colormap_get_system_size',                 'E', #
1032                 'gdk_colormap_ref',                             'E', #
1033                 'gdk_colormap_unref',                           'E', #
1034                 'gdk_colors_alloc',                             'E', #
1035                 'gdk_colors_free',                              'E', #
1036                 'gdk_colors_store',                             'E', #
1037                 'gdk_color_alloc',                              'E', #
1038                 'gdk_color_black',                              'E', #
1039                 'gdk_color_change',                             'E', #
1040                 'gdk_color_white',                              'E', #
1041                 'gdk_cursor_destroy',                           'E', #
1042                 'GdkDestroyNotify',                             'E', #
1043                 'gdk_DISPLAY',                                  'E', #
1044                 'gdk_display_set_pointer_hooks',                'E', #
1045                 'gdk_drag_context_new',                         'E', #
1046                 'gdk_drag_context_ref',                         'E', #
1047                 'gdk_drag_context_unref',                       'E', #
1048                 'gdk_drag_find_window',                         'E', #
1049                 'gdk_drag_get_protocol',                        'E', #
1050                 'gdk_drawable_copy_to_image',                   'E', #
1051                 'gdk_drawable_get_data',                        'E', #
1052                 'gdk_drawable_get_display',                     'E', #
1053                 'gdk_drawable_get_image',                       'E', #
1054                 'gdk_drawable_get_screen',                      'E', #
1055                 'gdk_drawable_get_size',                        'W', # deprecated since version 2.24 Use gdk_window_get_width()
1056                                                                      #  and gdk_window_get_height() for GdkWindows.
1057                                                                      # Use gdk_pixmap_get_size() for GdkPixmaps
1058                 'gdk_drawable_get_visual',                      'E', #
1059                 'gdk_drawable_ref',                             'E', #
1060                 'gdk_drawable_set_data',                        'E', #
1061                 'gdk_drawable_unref',                           'E', #
1062                 'gdk_draw_arc',                                 'E', # deprecated since version 2.22. Use cairo_arc() and
1063                                                                      #  cairo_fill() or cairo_stroke() instead.
1064                 'gdk_draw_drawable',                            'E', # deprecated since version 2.22. Use  gdk_cairo_set_source_pixmap(),
1065                                                                      #  cairo_rectangle() and cairo_fill() to draw pixmap
1066                                                                      #  on top of other drawables
1067                 'gdk_draw_glyphs',                              'E', #
1068                 'gdk_draw_glyphs_transformed',                  'E', #
1069                 'gdk_draw_gray_image',                          'E', #
1070                 'gdk_draw_image',                               'E', #
1071                 'gdk_draw_indexed_image',                       'E', #
1072                 'gdk_draw_layout',                              'E', #
1073                 'gdk_draw_layout_line',                         'E', #
1074                 'gdk_draw_layout_line_with_colors',             'E', #
1075                 'gdk_draw_layout_with_colors',                  'E', #
1076                 'gdk_draw_line',                                'W', # deprecated since version 2.22. Use cairo_line_to() and cairo_stroke()
1077                 'gdk_draw_lines',                               'E', # deprecated since version 2.22. Use cairo_line_to() and cairo_stroke()
1078                 'gdk_draw_pixbuf',                              'E', # gdk_cairo_set_source_pixbuf() and cairo_paint() or
1079                                                                      #  cairo_rectangle() and cairo_fill() instead.
1080                 'gdk_draw_pixmap',                              'E', # gdk_draw_drawable() (gdk_draw_drawable has been
1081                                                                      #  deprecated since version 2.22 )
1082                 'gdk_draw_point',                               'E', #
1083                 'gdk_draw_points',                              'E', #
1084                 'gdk_draw_polygon',                             'E', # deprecated since version 2.22. Use cairo_line_to()
1085                                                                      #  or cairo_append_path() and cairo_fill()
1086                                                                      #  or cairo_stroke() instead.
1087                 'gdk_draw_rectangle',                           'E', # deprecated since version 2.22, Use cairo_rectangle()
1088                                                                      #  and cairo_fill() or cairo_stroke()
1089                 'gdk_draw_rgb_32_image',                        'E', #
1090                 'gdk_draw_rgb_32_image_dithalign',              'E', #
1091                 'gdk_draw_rgb_image',                           'E', #
1092                 'gdk_draw_rgb_image_dithalign',                 'E', #
1093                 'gdk_draw_segments',                            'E', #
1094                 'gdk_draw_string',                              'E', #
1095                 'gdk_draw_text',                                'E', #
1096                 'gdk_draw_text_wc',                             'E', #
1097                 'gdk_draw_trapezoids',                          'E', #
1098                 'gdk_event_get_graphics_expose',                'E', #
1099                 'gdk_exit',                                     'E', #
1100                 'GdkFillRule',                                  'E', #
1101                 'GdkFont',                                      'E', #
1102                 'gdk_fontset_load',                             'E', #
1103                 'gdk_fontset_load_for_display',                 'E', #
1104                 'GdkFontType',                                  'E', #
1105                 'gdk_font_equal',                               'E', #
1106                 'gdk_font_from_description',                    'E', #
1107                 'gdk_font_from_description_for_display',        'E', #
1108                 'gdk_font_get_display',                         'E', #
1109                 'gdk_font_id',                                  'E', #
1110                 'gdk_font_load',                                'E', #
1111                 'gdk_font_load_for_display',                    'E', #
1112                 'gdk_font_lookup',                              'E', #
1113                 'gdk_font_lookup_for_display',                  'E', #
1114                 'gdk_font_ref',                                 'E', #
1115                 'gdk_font_unref',                               'E', #
1116                 'gdk_FONT_XDISPLAY',                            'E', #
1117                 'gdk_FONT_XFONT',                               'E', #
1118                 'gdk_free_compound_text',                       'E', #
1119                 'gdk_free_text_list',                           'E', #
1120                 'gdk_gc_copy',                                  'E', #
1121                 'gdk_gc_destroy',                               'E', #
1122                 'gdk_gc_get_colormap',                          'E', #
1123                 'gdk_gc_get_screen',                            'E', #
1124                 'gdk_gc_get_values',                            'E', #
1125                 'gdk_gc_new',                                   'W', # deprecated since version 2.22 and should not be used
1126                                                                      #  in newly-written code. Use Cairo for rendering.
1127                 'gdk_gc_new_with_values',                       'E', # deprecated since version 2.22
1128                 'gdk_gc_offset',                                'E', #
1129                 'gdk_gc_ref',                                   'E', #
1130                 'gdk_gc_set_background',                        'E', #
1131                 'gdk_gc_set_clip_mask',                         'E', #
1132                 'gdk_gc_set_clip_origin',                       'E', #
1133                 'gdk_gc_set_clip_rectangle',                    'E', #
1134                 'gdk_gc_set_clip_region',                       'E', #
1135                 'gdk_gc_set_colormap',                          'E', #
1136                 'gdk_gc_set_dashes',                            'E', #
1137                 'gdk_gc_set_exposures',                         'E', #
1138                 'gdk_gc_set_fill',                              'E', # deprecated since version 2.22. Use cairo_pattern_set_extend()
1139                                                                      #  on the source.
1140                 'gdk_gc_set_font',                              'E', #
1141                 'gdk_gc_set_foreground',                        'W', # deprecated since version 2.22. Use gdk_cairo_set_source_color()
1142                                                                      #  to use a GdkColor as the source in Cairo.
1143                 'gdk_gc_set_function',                          'W', # deprecated since version 2.22. Use cairo_set_operator() with Cairo.
1144                 'gdk_gc_set_line_attributes',                   'E', #
1145                 'gdk_gc_set_rgb_bg_color',                      'E', #
1146                 'gdk_gc_set_rgb_fg_color',                      'E', # deprecated since version 2.22.
1147                                                                      #  Use gdk_cairo_set_source_color() instead.
1148                 'gdk_gc_set_stipple',                           'E', #
1149                 'gdk_gc_set_subwindow',                         'E', #
1150                 'gdk_gc_set_tile',                              'E', # deprecated since version 2.22.
1151                                                                      # The following code snippet sets a tiling GdkPixmap as the
1152                                                                      #   source in Cairo:
1153                                                                      # gdk_cairo_set_source_pixmap (cr, tile, ts_origin_x, ts_origin_y);
1154                                                                      # cairo_pattern_set_extend (cairo_get_source (cr),
1155                                                                      #  CAIRO_EXTEND_REPEAT);
1156                 'gdk_gc_set_ts_origin',                         'E', #
1157                 'gdk_gc_set_values',                            'E', #
1158                 'gdk_gc_unref',                                 'E', # deprecated since version 2.0. Use g_object_unref()
1159                 'gdk_get_use_xshm',                             'E', #
1160                 'gdk_image_destroy',                            'E', #
1161                 'gdk_image_get',                                'E', #
1162                 'gdk_image_get_bits_per_pixel',                 'E', #
1163                 'gdk_image_get_bytes_per_line',                 'E', #
1164                 'gdk_image_get_bytes_per_pixel',                'E', #
1165                 'gdk_image_get_byte_order',                     'E', #
1166                 'gdk_image_get_colormap',                       'E', #
1167                 'gdk_image_get_depth',                          'E', #
1168                 'gdk_image_get_height',                         'E', #
1169                 'gdk_image_get_image_type',                     'E', #
1170                 'gdk_image_get_pixel',                          'E', #
1171                 'gdk_image_get_pixels',                         'E', #
1172                 'gdk_image_get_visual',                         'E', #
1173                 'gdk_image_get_width',                          'E', #
1174                 'gdk_image_new',                                'E', #
1175                 'gdk_image_new_bitmap',                         'E', #
1176                 'gdk_image_put_pixel',                          'E', #
1177                 'gdk_image_ref',                                'E', #
1178                 'gdk_image_set_colormap',                       'E', #
1179                 'gdk_image_unref',                              'E', #
1180                 'gdk_input_add',                                'E', #
1181                 'gdk_input_add_full',                           'E', #
1182                 'gdk_input_remove',                             'E', #
1183                 'gdk_mbstowcs',                                 'E', #
1184                 'gdk_net_wm_supports',                          'E', #
1185                 'gdk_pango_context_set_colormap',               'E', #
1186                 'gdk_pixbuf_render_to_drawable',                'E', #
1187                 'gdk_pixbuf_render_to_drawable_alpha',          'E', #
1188                 'gdk_pixmap_colormap_create_from_xpm',          'E', #
1189                 'gdk_pixmap_colormap_create_from_xpm_d',        'E', #
1190                 'gdk_pixmap_create_from_data',                  'E', #
1191                 'gdk_pixmap_create_from_xpm',                   'E', #
1192                 'gdk_pixmap_create_from_xpm_d',                 'E', # deprecated since version 2.22. Use a GdkPixbuf instead. You can
1193                                                                      #  use gdk_pixbuf_new_from_xpm_data() to create it.
1194                                                                      # If you must use a pixmap, use gdk_pixmap_new() to create it
1195                                                                      #  and Cairo to draw the pixbuf onto it.
1196                 'gdk_pixmap_ref',                               'E', #
1197                 'gdk_pixmap_unref',                             'E', # Deprecated equivalent of g_object_unref().
1198                 'gdk_region_polygon',                           'E', #
1199                 'gdk_region_rect_equal',                        'E', #
1200                 'gdk_region_shrink',                            'E', #
1201                 'gdk_region_spans_intersect_foreach',           'E', #
1202                 'GdkRgbCmap',                                   'E', #
1203                 'gdk_rgb_cmap_free',                            'E', #
1204                 'gdk_rgb_cmap_new',                             'E', #
1205                 'gdk_rgb_colormap_ditherable',                  'E', #
1206                 'gdk_rgb_ditherable',                           'E', #
1207                 'gdk_rgb_find_color',                           'E', #
1208                 'gdk_rgb_gc_set_background',                    'E', #
1209                 'gdk_rgb_gc_set_foreground',                    'E', #
1210                 'gdk_rgb_get_cmap',                             'E', #
1211                 'gdk_rgb_get_colormap',                         'E', #
1212                 'gdk_rgb_get_visual',                           'E', #
1213                 'gdk_rgb_init',                                 'E', #
1214                 'gdk_rgb_set_install',                          'E', #
1215                 'gdk_rgb_set_min_colors',                       'E', #
1216                 'gdk_rgb_set_verbose',                          'E', #
1217                 'gdk_rgb_xpixel_from_rgb',                      'E', #
1218                 'gdk_ROOT_PARENT',                              'E', #
1219                 'gdk_screen_get_rgb_colormap',                  'E', #
1220                 'gdk_screen_get_rgb_visual',                    'E', #
1221                 'GdkSelection',                                 'E', #
1222                 'GdkSelectionType',                             'E', #
1223                 'gdk_set_locale',                               'E', #
1224                 'gdk_set_pointer_hooks',                        'E', #
1225                 'gdk_set_sm_client_id',                         'E', #
1226                 'gdk_set_use_xshm',                             'E', #
1227                 'GdkSpanFunc',                                  'E', #
1228                 'gdk_spawn_command_line_on_screen',             'E', #
1229                 'gdk_spawn_on_screen',                          'E', #
1230                 'gdk_spawn_on_screen_with_pipes',               'E', #
1231                 'gdk_string_extents',                           'E', #
1232                 'gdk_string_height',                            'E', #
1233                 'gdk_string_measure',                           'E', #
1234                 'gdk_string_to_compound_text',                  'E', #
1235                 'gdk_string_to_compound_text_for_display',      'E', #
1236                 'gdk_string_width',                             'E', #
1237                 'GdkTarget',                                    'E', #
1238                 'gdk_text_extents',                             'E', #
1239                 'gdk_text_extents_wc',                          'E', #
1240                 'gdk_text_height',                              'E', #
1241                 'gdk_text_measure',                             'E', #
1242                 'gdk_text_property_to_text_list',               'E', #
1243                 'gdk_text_property_to_text_list_for_display',   'E', #
1244                 'gdk_text_property_to_utf8_list',               'E', #
1245                 'gdk_text_width',                               'E', #
1246                 'gdk_text_width_wc',                            'E', #
1247                 'gdk_threads_mutex',                            'E', #
1248                 'gdk_utf8_to_compound_text',                    'E', #
1249                 'gdk_utf8_to_compound_text_for_display',        'E', #
1250                 'gdk_visual_ref',                               'E', #
1251                 'gdk_visual_unref',                             'E', #
1252                 'gdk_wcstombs',                                 'E', #
1253                 'gdk_window_copy_area',                         'E', #
1254                 'gdk_window_foreign_new',                       'E', #
1255                 'gdk_window_foreign_new_for_display',           'E', #
1256                 'gdk_window_get_colormap',                      'E', # Deprecated equivalent of gdk_drawable_get_colormap().
1257                 'gdk_window_get_deskrelative_origin',           'E', #
1258                 'gdk_window_get_size',                          'E', # Deprecated equivalent of gdk_drawable_get_size().
1259                 'gdk_window_get_toplevels',                     'E', #
1260                 'gdk_window_get_type',                          'E', #
1261                 'gdk_window_lookup',                            'E', #
1262                 'gdk_window_lookup_for_display',                'E', #
1263                 'gdk_window_ref',                               'E', #
1264                 'gdk_window_set_colormap',                      'E', #
1265                 'gdk_window_set_hints',                         'E', #
1266                 'gdk_window_unref',                             'E', #
1267                 'gdk_x11_font_get_name',                        'E', #
1268                 'gdk_x11_font_get_xdisplay',                    'E', #
1269                 'gdk_x11_font_get_xfont',                       'E', #
1270                 'gdk_x11_gc_get_xdisplay',                      'E', #
1271                 'gdk_x11_gc_get_xgc',                           'E', #
1272                 'gdk_xid_table_lookup',                         'E', #
1273                 'gdk_xid_table_lookup_for_display',             'E', #
1274                 'gdkx_colormap_get',                            'E', #
1275                 'gdkx_visual_get',                              'E', #
1276
1277 );
1278
1279 @{$APIs{'deprecated-gtk'}->{'functions'}}      = grep {$deprecatedGtkFunctions{$_} eq 'E'} keys %deprecatedGtkFunctions;
1280 @{$APIs{'deprecated-gtk-todo'}->{'functions'}} = grep {$deprecatedGtkFunctions{$_} eq 'W'} keys %deprecatedGtkFunctions;
1281
1282
1283
1284 # Given a ref to a hash containing "functions" and "functions_count" entries:
1285 # Determine if any item of the list of APIs contained in the array referenced by "functions"
1286 # exists in the file.
1287 # For each API which appears in the file:
1288 #     Push the API onto the provided list;
1289 #     Add the number of times the API appears in the file to the total count
1290 #      for the API (stored as the value of the API key in the hash referenced by "function_counts").
1291
1292 sub findAPIinFile($$$)
1293 {
1294         my ($groupHashRef, $fileContentsRef, $foundAPIsRef) = @_;
1295
1296         for my $api ( @{$groupHashRef->{functions}} )
1297         {
1298                 my $cnt = 0;
1299                 while (${$fileContentsRef} =~ m/ \W $api \W* \( /gx)
1300                 {
1301                         $cnt += 1;
1302                 }
1303                 if ($cnt > 0) {
1304                         push @{$foundAPIsRef}, $api;
1305                         $groupHashRef->{function_counts}->{$api} += 1;
1306                 }
1307         }
1308 }
1309
1310 sub checkAddTextCalls($$)
1311 {
1312         my ($fileContentsRef, $filename) = @_;
1313         my $add_text_count = 0;
1314         my $okay_add_text_count = 0;
1315         my $add_xxx_count = 0;
1316
1317         # First count how many proto_tree_add_text() calls there are in total
1318         while (${$fileContentsRef} =~ m/ \W* proto_tree_add_text \W* \( /gox) {
1319                 $add_text_count++;
1320         }
1321         # Then count how many of them are "okay" by virtue of their generate proto_item
1322         # being used (e.g., to hang a subtree off of)
1323         while (${$fileContentsRef} =~ m/ \W* [a-zA-Z0-9]+ \W* = \W* proto_tree_add_text \W* \( /gox) {
1324                 $okay_add_text_count++;
1325         }
1326         # Then count how many proto_tree_add_*() calls there are
1327         while (${$fileContentsRef} =~ m/ \W proto_tree_add_[a-z]+ \W* \( /gox) {
1328                 $add_xxx_count++;
1329         }
1330
1331         #printf "add_text_count %d, okay_add_text_count %d\n", $add_text_count, $okay_add_text_count;
1332         $add_xxx_count -= $add_text_count;
1333         $add_text_count -= $okay_add_text_count;
1334
1335         # Don't bother with files with small counts
1336         if ($add_xxx_count < 10 || $add_text_count < 10) {
1337                 return;
1338         }
1339
1340         my $percentage = 100*$add_text_count/$add_xxx_count;
1341         if ($percentage > 50) {
1342                 printf "%s: found %d useless add_text() vs. %d add_<something else>() calls (%.2f%%)\n",
1343                         $filename, $add_text_count, $add_xxx_count, $percentage;
1344         }
1345 }
1346
1347 # APIs which (generally) should not be called with an argument of tvb_get_ptr()
1348 my @TvbPtrAPIs = (
1349         # Use NULL for the value_ptr instead of tvb_get_ptr() (only if the
1350         # given offset and length are equal) with these:
1351         'proto_tree_add_bytes_format',
1352         'proto_tree_add_bytes_format_value',
1353         # Use the tvb_* version of these:
1354         'ether_to_str',
1355         'ip_to_str',
1356         'ip6_to_str',
1357         'fc_to_str',
1358         'fcwwn_to_str',
1359         # Use tvb_bytes_to_str[_punct] instead of:
1360         'bytes_to_str',
1361         'bytes_to_str_punct',
1362 );
1363
1364 sub checkAPIsCalledWithTvbGetPtr($$$)
1365 {
1366         my ($APIs, $fileContentsRef, $foundAPIsRef) = @_;
1367
1368         for my $api (@{$APIs}) {
1369                 my @items;
1370                 my $cnt = 0;
1371
1372                 @items = (${$fileContentsRef} =~ m/ ($api [^;]* ; ) /xsg);
1373                 while (@items) {
1374                         my ($item) = @items;
1375                         shift @items;
1376                         if ($item =~ / tvb_get_ptr /xos) {
1377                                 $cnt += 1;
1378                         }
1379                 }
1380
1381                 if ($cnt > 0) {
1382                         push @{$foundAPIsRef}, $api;
1383                 }
1384         }
1385 }
1386
1387 # Verify that all declared ett_ variables are registered.
1388 # Don't bother trying to check usage (for now)...
1389 sub check_ett_registration($$)
1390 {
1391         my ($fileContentsRef, $filename) = @_;
1392         my @ett_declarations;
1393         my %ett_registrations;
1394         my @unRegisteredEtts;
1395
1396         # A pattern to match ett variable names.  Obviously this assumes that
1397         # they start with ett_
1398         my $EttVarName = qr{ (?: ett_[a-z0-9_]+ (?:\[[0-9]+\])? ) }xi;
1399
1400         # Remove macro lines
1401         my $fileContents = ${$fileContentsRef};
1402         $fileContents =~ s { ^\s*\#.*$} []xogm;
1403
1404         # Find all the ett_ variables declared in the file
1405         @ett_declarations = ($fileContents =~ m{
1406                 ^\s*static              # assume declarations are on their own line
1407                 \s+
1408                 g?int                   # could be int or gint
1409                 \s+
1410                 ($EttVarName)           # variable name
1411                 \s*=\s*
1412                 -1\s*;
1413         }xgiom);
1414
1415         if (!@ett_declarations) {
1416                 print "Found no etts in ".$filename."\n";
1417                 return;
1418         }
1419
1420         #print "Found these etts in ".$filename.": ".join(',', @ett_declarations)."\n\n";
1421
1422         # Find the array used for registering the etts
1423         # Save off the block of code containing just the variables
1424         my @reg_blocks;
1425         @reg_blocks = ($fileContents =~ m{
1426                 static
1427                 \s+
1428                 g?int
1429                 \s*\*\s*                # it's an array of pointers
1430                 [a-z0-9_]+              # array name; usually (always?) "ett"
1431                 \s*\[\s*\]\s*           # array brackets
1432                 =
1433                 \s*\{
1434                 ((?:\s*&\s*             # address of the following variable
1435                 $EttVarName             # variable name
1436                 \s*,?                   # the comma is optional (for the last entry)
1437                 \s*)+)                  # match one or more variable names
1438                 \}
1439                 \s*
1440                 ;
1441         }xgios);
1442         #print "Found this ett registration block in ".$filename.": ".join(',', @reg_blocks)."\n";
1443
1444         if (@reg_blocks == 0) {
1445                 print "Hmm, found ".@reg_blocks." ett registration blocks in ".$filename."\n";
1446                 # For now...
1447                 return;
1448         }
1449
1450         while (@reg_blocks) {
1451                 my ($block) = @reg_blocks;
1452                 shift @reg_blocks;
1453
1454                 # Convert the list returned by the match into a hash of the
1455                 # form ett_variable_name -> 1.  Then combine this new hash with
1456                 # the hash from the last registration block.
1457                 # (Of course) using hashes makes the lookups much faster.
1458                 %ett_registrations = map { $_ => 1 } ($block =~ m{
1459                         \s*&\s*                 # address of the following variable
1460                         ($EttVarName)           # variable name
1461                         \s*,?                   # the comma is optional (for the last entry)
1462                 }xgios, %ett_registrations);
1463         }
1464         #print "Found these ett registrations in ".$filename.": ";
1465         #while( my ($k, $v) = each %ett_registrations ) {
1466         #          print "$k\n";
1467         #}
1468
1469         # Find which declared etts are not registered.
1470         # XXX - using <@ett_declarations> and $_ instead of $ett_var makes this
1471         # MUCH slower...  Why?
1472         while (@ett_declarations) {
1473                 my ($ett_var) = @ett_declarations;
1474                 shift @ett_declarations;
1475
1476                 push(@unRegisteredEtts, $ett_var) if (!$ett_registrations{$ett_var});
1477         }
1478
1479         if (@unRegisteredEtts) {
1480                 print STDERR "Error: found these unregistered ett variables in ".$filename.": ".join(',', @unRegisteredEtts)."\n";
1481         }
1482
1483 }
1484
1485 # Given the file contents and a file name, check all of the hf entries for
1486 # various problems (such as those checked for in proto.c).
1487 sub check_hf_entries($$)
1488 {
1489         my ($fileContentsRef, $filename) = @_;
1490         my $errorCount = 0;
1491
1492         my @items;
1493         @items = (${$fileContentsRef} =~ m{
1494                                   \{
1495                                   \s*
1496                                   &\s*([A-Z0-9_\[\]-]+)         # &hf
1497                                   \s*,\s*
1498                                   \{\s*
1499                                   ("[A-Z0-9 '\./\(\)_:-]+")     # name
1500                                   \s*,\s*
1501                                   (NULL|"[A-Z0-9_\.-]*")        # abbrev
1502                                   \s*,\s*
1503                                   (FT_[A-Z0-9_]+)               # field type
1504                                   \s*,\s*
1505                                   ([A-Z0-9x\|_]+)               # display
1506                                   \s*,\s*
1507                                   ([A-Z0-9&_\(\)' -]+)          # convert
1508                                   \s*,\s*
1509                                   ([A-Z0-9_]+)                  # bitmask
1510                                   \s*,\s*
1511                                   (NULL|"[A-Z0-9 '\./\(\)\?_:-]+")      # blurb (NULL or a string)
1512                                   \s*,\s*
1513                                   HFILL                         # HFILL
1514         }xgios);
1515
1516         #print "Found @items items\n";
1517         while (@items) {
1518                 my ($hf, $name, $abbrev, $ft, $display, $convert, $bitmask, $blurb) = @items;
1519                 shift @items; shift @items; shift @items; shift @items; shift @items; shift @items; shift @items; shift @items;
1520
1521                 #print "name=$name, abbrev=$abbrev, ft=$ft, display=$display, convert=$convert, bitmask=$bitmask, blurb=$blurb\n";
1522
1523                 if ($abbrev eq '""' || $abbrev eq "NULL") {
1524                         print STDERR "Error: field $name does not have an abbreviation in $filename\n";
1525                         $errorCount++;
1526                 }
1527                 if ($abbrev =~ m/\.\.+/) {
1528                         print STDERR "Error: the abbreviation for field $name ($abbrev) contains two or more sequential periods in $filename\n";
1529                         $errorCount++;
1530                 }
1531                 if ($name eq $abbrev) {
1532                         print STDERR "Error: the abbreviation for field $name matches the field name in $filename\n";
1533                         $errorCount++;
1534                 }
1535                 if (lc($name) eq lc($blurb)) {
1536                         print STDERR "Error: the blurb for field $name ($abbrev) matches the field name in $filename\n";
1537                         $errorCount++;
1538                 }
1539                 if ($name =~ m/"\s+/) {
1540                         print STDERR "Error: the name for field $name ($abbrev) has leading space in $filename\n";
1541                         $errorCount++;
1542                 }
1543                 if ($name =~ m/\s+"/) {
1544                         print STDERR "Error: the name for field $name ($abbrev) has trailing space in $filename\n";
1545                         $errorCount++;
1546                 }
1547                 if ($blurb =~ m/"\s+/) {
1548                         print STDERR "Error: the blurb for field $name ($abbrev) has leading space in $filename\n";
1549                         $errorCount++;
1550                 }
1551                 if ($blurb =~ m/\s+"/) {
1552                         print STDERR "Error: the blurb for field $name ($abbrev) has trailing space in $filename\n";
1553                         $errorCount++;
1554                 }
1555                 if ($abbrev =~ m/\s+/) {
1556                         print STDERR "Error: the abbreviation for field $name ($abbrev) has white space in $filename\n";
1557                         $errorCount++;
1558                 }
1559                 if ("\"".$hf ."\"" eq $name) {
1560                         print STDERR "Error: name is the hf_variable_name in field $name ($abbrev) in $filename\n";
1561                         $errorCount++;
1562                 }
1563                 if ("\"".$hf ."\"" eq $abbrev) {
1564                         print STDERR "Error: abbreviation is the hf_variable_name in field $name ($abbrev) in $filename\n";
1565                         $errorCount++;
1566                 }
1567         }
1568
1569         return $errorCount;
1570 }
1571
1572 # The below Regexp are based on those from:
1573 # http://aspn.activestate.com/ASPN/Cookbook/Rx/Recipe/59811
1574 # They are in the public domain.
1575
1576 # 1. A complicated regex which matches C-style comments.
1577 my $CComment = qr{ / [*] [^*]* [*]+ (?: [^/*] [^*]* [*]+ )* / }x;
1578
1579 # 1.a A regex that matches C++-style comments.
1580 #my $CppComment = qr{ // (.*?) \n }x;
1581
1582 # 2. A regex which matches double-quoted strings.
1583 #    ?s added so that strings containing a 'line continuation'
1584 #    ( \ followed by a new-line) will match.
1585 my $DoubleQuotedStr = qr{ (?: ["] (?s: \\. | [^\"\\])* ["]) }x;
1586
1587 # 3. A regex which matches single-quoted strings.
1588 my $SingleQuotedStr = qr{ (?: \' (?: \\. | [^\'\\])* [']) }x;
1589
1590 # 4. Now combine 1 through 3 to produce a regex which
1591 #    matches _either_ double or single quoted strings
1592 #    OR comments. We surround the comment-matching
1593 #    regex in capturing parenthesis to store the contents
1594 #    of the comment in $1.
1595 #    my $commentAndStringRegex = qr{(?:$DoubleQuotedStr|$SingleQuotedStr)|($CComment)|($CppComment)};
1596
1597 # 4. Wireshark is strictly a C program so don't take out C++ style comments
1598 #    since they shouldn't be there anyway...
1599 #    Also: capturing the comment isn't necessary.
1600 my $commentAndStringRegex = qr{ (?: $DoubleQuotedStr | $SingleQuotedStr | $CComment) }x;
1601
1602 #### Regex for use when searching for value-string definitions
1603 my $StaticRegex             = qr/ static \s+                                                            /xs;
1604 my $ConstRegex              = qr/ const  \s+                                                            /xs;
1605 my $Static_andor_ConstRegex = qr/ (?: $StaticRegex $ConstRegex | $StaticRegex | $ConstRegex)            /xs;
1606 my $ValueStringRegex        = qr/ $Static_andor_ConstRegex value_string \ + [^;*]+ = [^;]+ [{] [^;]+ ;  /xs;
1607
1608 #
1609 # MAIN
1610 #
1611 my $errorCount = 0;
1612 # The default list, which can be expanded.
1613 my @apiGroups = qw(prohibited deprecated);
1614 my @apiSummaryGroups = ();
1615 my $check_value_string_array_null_termination = 1;      # default: enabled
1616 my $machine_readable_output = 0;                        # default: disabled
1617 my $check_hf = 1;                                       # default: enabled
1618 my $debug_flag = 0;
1619
1620 my $result = GetOptions(
1621                         'group=s' => \@apiGroups,
1622                         'summary-group=s' => \@apiSummaryGroups,
1623                         'check-value-string-array-null-termination!' => \$check_value_string_array_null_termination,
1624                         'Machine-readable' => \$machine_readable_output,
1625                         'nohf' => \$check_hf,
1626                         'debug' => \$debug_flag
1627                         );
1628 if (!$result) {
1629         print "Usage: checkAPIs.pl [-M] [-g group1] [-g group2] ... [-s group1] [-s group2] ... [--nocheck-value-string-array-null-termination] file1 file2 ..\n";
1630         print "       -g <group>:  Check input files for use of APIs in <group> (in addition to the default groups)\n";
1631         print "       -s <group>:  Output summary (count) for each API in <group> (-g <group> also req'd)\n";
1632         print "       -M: Generate output for -g in 'machine-readable' format\n";
1633         print "\n";
1634         print "   Default Groups[-g]: ", join (", ", sort @apiGroups), "\n";
1635         print "   Available Groups:   ", join (", ", sort keys %APIs), "\n";
1636         exit(1);
1637 }
1638
1639 # Add a 'function_count' anonymous hash to each of the 'apiGroup' entries in the %APIs hash.
1640 for my $apiGroup (keys %APIs) {
1641         my @functions = @{$APIs{$apiGroup}{functions}};
1642
1643         $APIs{$apiGroup}->{function_counts}   = {};
1644         @{$APIs{$apiGroup}->{function_counts}}{@functions} = ();  # Add fcn names as keys to the anonymous hash
1645 }
1646
1647
1648 # Read through the files; do various checks
1649 while ($_ = $ARGV[0])
1650 {
1651         shift;
1652         my $filename = $_;
1653         my $fileContents = '';
1654         my @foundAPIs = ();
1655         my $line;
1656
1657         die "No such file: \"$filename\"" if (! -e $filename);
1658
1659         # delete leading './'
1660         $filename =~ s{ ^ \. / } {}xo;
1661
1662         # Read in the file (ouch, but it's easier that way)
1663         open(FC, $filename) || die("Couldn't open $filename");
1664         $line = 1;
1665         while (<FC>) {
1666                 $fileContents .= $_;
1667                 if ($_ =~ m{ [\x80-\xFF] }xo) {
1668                         print STDERR "Error: Found non-ASCII characters on line " .$line. " of " .$filename."\n";
1669                         $errorCount++;
1670                 }
1671                 $line++;
1672         }
1673         close(FC);
1674
1675         if ($fileContents =~ m{ %ll }xo)
1676         {
1677                 # use G_GINT64_MODIFIER instead of ll
1678                 print STDERR "Error: Found %ll in " .$filename."\n";
1679                 $errorCount++;
1680         }
1681         if ($fileContents =~ m{ %hh }xo)
1682         {
1683                 # %hh is C99 and Windows doesn't like it:
1684                 # http://connect.microsoft.com/VisualStudio/feedback/details/416843/sscanf-cannot-not-handle-hhd-format
1685                 # Need to use temporary variables instead.
1686                 print STDERR "Error: Found %hh in " .$filename."\n";
1687                 $errorCount++;
1688         }
1689
1690         if (! ($fileContents =~ m{ \$Id .* \$ }xo))
1691         {
1692                 print STDERR "Warning: ".$filename." does not have an SVN Id tag.\n";
1693         }
1694
1695         # optionally check the hf entries
1696         if ($check_hf) {
1697                 $errorCount += check_hf_entries(\$fileContents, $filename);
1698         }
1699
1700         # Remove all the C-comments and strings
1701         $fileContents =~ s {$commentAndStringRegex} []xog;
1702
1703         #check_ett_registration(\$fileContents, $filename);
1704
1705         if ($fileContents =~ m{ // }xo)
1706         {
1707                 print STDERR "Error: Found C++ style comments in " .$filename."\n";
1708                 $errorCount++;
1709         }
1710
1711         #checkAPIsCalledWithTvbGetPtr(\@TvbPtrAPIs, \$fileContents, \@foundAPIs);
1712         #if (@foundAPIs) {
1713         #       print STDERR "Found APIs with embedded tvb_get_ptr() calls in ".$filename.": ".join(',', @foundAPIs)."\n"
1714         #}
1715
1716         #checkAddTextCalls(\$fileContents, $filename);
1717
1718         # Brute force check for value_string arrays which are missing {0, NULL} as the final (terminating) array entry
1719         if ($check_value_string_array_null_termination) {
1720                 #  Assumption: definition is of form (pseudo-Regex):
1721                 #    " (static const|static|const) value_string .+ = { .+ ;" (possibly over multiple lines)
1722                 while ($fileContents =~ / ( $ValueStringRegex ) /xsog) {
1723                         # value_string array definition found; check if NULL terminated
1724                         my $vs = my $vsx = $1;
1725                         if ($debug_flag) {
1726                                 $vsx =~ / ( .+ value_string [^=]+ ) = /xo;
1727                                 printf STDERR "==> %-35.35s: %s\n", $filename, $1;
1728                                 printf STDERR "%s\n", $vs;
1729                         }
1730                         $vs =~ s{ \s } {}xg;
1731                         # README.developer says
1732                         #  "Don't put a comma after the last tuple of an initializer of an array"
1733                         # However: since this usage is present in some number of cases, we'll allow for now
1734                         if ($vs !~ / , NULL [}] ,? [}] ; $/xo) {
1735                                 $vsx =~ /( value_string [^=]+ ) = /xo;
1736                                 printf STDERR "Error: %-35.35s: {0, NULL} is required as the last value_string array entry: %s\n", $filename, $1;
1737                                 $errorCount++;
1738                         }
1739                         if ($vs !~ / (static)? const value_string /xo)  {
1740                                 $vsx =~ /( value_string [^=]+ ) = /xo;
1741                                 printf STDERR "Error: %-35.35s: Missing 'const': %s\n", $filename, $1;
1742                                 $errorCount++;
1743                         }
1744                 }
1745         }
1746
1747         # Check and count APIs
1748         for my $apiGroup (@apiGroups) {
1749                 my $pfx = "Warning";
1750                 @foundAPIs = ();
1751
1752                 findAPIinFile($APIs{$apiGroup}, \$fileContents, \@foundAPIs);
1753
1754                 if ($APIs{$apiGroup}->{count_errors}) {
1755                         # the use of "prohibited" APIs is an error, increment the error count
1756                         $errorCount += @foundAPIs;
1757                         $pfx = "Error";
1758                 }
1759
1760                 if (@foundAPIs && ! $machine_readable_output) {
1761                         print STDERR $pfx . ": Found " . $apiGroup . " APIs in ".$filename.": ".join(',', @foundAPIs)."\n";
1762                 }
1763                 if (@foundAPIs && $machine_readable_output) {
1764                         for my $api (@foundAPIs) {
1765                                 printf STDERR "%-8.8s %-20.20s %-30.30s %-45.45s\n", $pfx, $apiGroup, $filename, $api;
1766                         }
1767                 }
1768         }
1769 }
1770
1771 # Summary: Print Use Counts of each API in each requested summary group
1772
1773 for my $apiGroup (@apiSummaryGroups) {
1774         printf "\n\nUse Counts\n";
1775         for my $api (sort {"\L$a" cmp "\L$b"} (keys %{$APIs{$apiGroup}->{function_counts}}   )) {
1776                 printf "%-20.20s %5d  %-40.40s\n", $apiGroup . ':', $APIs{$apiGroup}{function_counts}{$api}, $api;
1777         }
1778 }
1779
1780 exit($errorCount);
1781