carlos@beowulf.JPL.NASA.GOV (Carlos Carrion) (11/28/89)
I'm having problems with the panel_each_item,panel_end_each macros. I've tried both the macros and writing out the code to accomplish the same thing. I produce an executable so not including .h files is not the problem. I'm using oregon's C++ compiler on a Sun 3/80. All the sunview functions are declared with C linkage and are called by member functions of C++ classes or as simple non-member functions. Here's the error message from dbxtool: signal SEGV (segmentation violation) in panel_get at 0xbaf78 panel_get+0x22: movl a0@(0x24),a0 The Sunview routine (with the explicit code written out) follows: void remove_item_with_label(pn,label) Panel pn; char* label; { Panel_item pi; char* get_window_name(); *** dbxtool points at the line below *** ==> for(pi=(Panel_item)panel_get(pn,PANEL_FIRST_ITEM);pi; pi=(Panel_item)panel_get(pn,PANEL_NEXT_ITEM)) { if(!strncmp((char*)panel_get(pi,PANEL_CLIENT_DATA),label,strlen(label))) { /* found button */ panel_set(pi,PANEL_SHOW_ITEM,FALSE,0); panel_destroy_item(pi); return; } } } A "dump" command produces the following: label = 0x1fba58 "rtg" pi = 0x1fcd10 "" pn = 0x1fba44 "rtg" A "where" command produces: panel_get(0x1fba44, 0x41750a01) at 0xbaf78 remove_item_with_label(pn = 0x1fba44 "rtg", label = 0x1fba58 "rtg"), line 425 in "src/sunview/A_sunview.c" put_up_mode_specs__6Layoutqpuct1(0x16a5ac, 0xdffff870, 0x1876c0) at 0x1492b modes_button_proc__qpvip10inputevent() at 0x6771 panel_choice(0x1fcd10, 0x176404) at 0xbd865 panel_accept_preview() at 0xb871d panel_default_handle_event(0x1fcd10, 0x176404) at 0xb8889 panel_handle_event(0x1fcd10, 0x176404) at 0xb86a5 panel_default_event(0x1fba44, 0x176404, 0x0) at 0xb866f panel_use_event() at 0xb8445 panel_notify_event(0x1fba44, 0x176404, 0x0, 0x0) at 0xe365b notify_post_event_and_arg(0x1fba44, 0x176404, 0x9, 0x0, 0xef790, 0xef7cc, 0xdffffa74) at 0xf8691 notify_post_event_and_arg(0x1fba44, 0x176404, 0x0, 0x0, 0xef790, 0xef7cc) at 0xf8571 win_is_io_grabbed() at 0xf05cd win_is_io_grabbed(0x1fba44, 0x18) at 0xefddf notify_client() at 0xfb461 notify_input(0x1fba44, 0x18) at 0xfb481 ndis_default_prioritizer(0x1fba44, 0x40, 0xdffffbd8, 0xfb470) at 0x100ea1 ndis_default_prioritizer(0x1fba44, 0x40, 0xdffffbd8, 0xdffffbb8, 0xdffffb98, 0x20, 0xdffffbfc, 0xdffffbf8, 0x1679ac, 0x0, 0x0) at 0x100dd3 notify_client(0x1fba44) at 0xfb3d9 ndis_default_scheduler(0x1, 0x170108) at 0x100f45 ndis_dispatch() at 0xfafef notify_start() at 0xf9dbf notify_dispatch() at 0xfae55 execute_interrupts(), line 163 in "src/sunview/./C_sunview.c" main_loop__13C_environmentqv(0x168b04) at 0x72d5 main(0x2, 0xdffffd60, 0xdffffd6c) at 0x71c3 Any forthcoming help will be gladly accepted! Thanks. ...cit-vax!elroy!jpl-devvax!{beowulf|pituco}!carlos