PIPS
wpips.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <xview/xview.h>
#include <xview/panel.h>
#include <xview/svrimage.h>
#include "genC.h"
#include "linear.h"
#include "ri.h"
#include "database.h"
#include "misc.h"
#include "ri-util.h"
#include "pipsdbm.h"
#include "constants.h"
#include "resources.h"
#include "pipsmake.h"
#include "top-level.h"
#include "wpips.h"
#include "xv_sizes.h"
#include "pips.icon"
+ Include dependency graph for wpips.c:

Go to the source code of this file.

Enumerations

enum  { WPIPS_NUMBER_OF_EVENT_TO_DEAL_DURING_PIPSMAKE_INTERPHASE = 10 }
 How much to call the notifyer between each pipsmake phase: More...
 

Functions

static void create_menus ()
 
void main_event_proc (Xv_Window window, Event *event)
 
void create_main_window ()
 
void create_icon ()
 
static void wpips_parse_arguments (int argc, char *argv[])
 Try to parse the WPips arguments. More...
 
static void execute_workspace_creation_and_so_on_given_with_options (void)
 Execute some actions asked as option after XView initialization: More...
 
static bool deal_with_wpips_events_during_pipsmake ()
 Since XView is not called while pipsmake is running, explicitly run a hook from pipsmake to run the notifyer such as to stop pipsmake: More...
 
void wpips_interrupt_pipsmake (Panel_item item, Event *event)
 To ask pipsmake to stop as soon as possible: More...
 
static int wpips_xview_error (Xv_object object, Attr_avlist avlist)
 Try to inform the user about an XView error. More...
 
void execute_main_loop_command (wpips_main_loop_command_type command)
 Exit the notify loop to execute a WPips command: More...
 
static void wpips_main_loop (Frame frame_to_map_first)
 The main loop that deals with command outside the XView notifyer: More...
 
int wpips_main (int argc, char *argv[])
 

Variables

Frame main_frame
 If we are in the Emacs mode, the log_frame is no longer really used: More...
 
Frame schoose_frame
 
Frame mchoose_frame
 
Frame log_frame
 
Frame edit_frame [MAX_NUMBER_OF_WPIPS_WINDOWS]
 
Frame help_frame
 
Frame query_frame
 
Frame options_frame
 
Panel main_panel
 
Panel status_panel
 
Panel query_panel
 
Panel mchoose_panel
 
Panel schoose_panel
 
Panel help_panel
 
static wpips_main_loop_command_type wpips_main_loop_command = WPIPS_EXIT
 The variables to pass information between inside and outside the XView notifyer: More...
 
static string workspace_name_given_to_wpips = NULL
 To deal with argument parsing: More...
 
static string module_name_given_to_wpips = NULL
 
static gen_array_t files_given_to_wpips = NULL
 
static int first_mapping = TRUE
 
static unsigned short pips_bits []
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

How much to call the notifyer between each pipsmake phase:

Enumerator
WPIPS_NUMBER_OF_EVENT_TO_DEAL_DURING_PIPSMAKE_INTERPHASE 

Definition at line 272 of file wpips.c.

272  {
274 };
@ WPIPS_NUMBER_OF_EVENT_TO_DEAL_DURING_PIPSMAKE_INTERPHASE
Definition: wpips.c:273

Function Documentation

◆ create_icon()

void create_icon ( )

Definition at line 157 of file wpips.c.

158 {
159  Server_image pips_image;
160  Icon icon;
161  Rect rect;
162 
163  pips_image = (Server_image)xv_create(NULL, SERVER_IMAGE,
164  XV_WIDTH, 64,
165  XV_HEIGHT, 64,
166  SERVER_IMAGE_BITS, pips_bits,
167  NULL);
168  icon = (Icon)xv_create(XV_NULL, ICON,
169  ICON_IMAGE, pips_image,
170  NULL);
171  rect.r_width= (int)xv_get(icon, XV_WIDTH);
172  rect.r_height= (int)xv_get(icon, XV_HEIGHT);
173  rect.r_left= 0;
174  rect.r_top= 0;
175 
176  xv_set(main_frame, FRAME_ICON, icon,
177  FRAME_CLOSED_RECT, &rect,
178  NULL);
179 }
void const char const char const int
static unsigned short pips_bits[]
Definition: wpips.c:153
Frame main_frame
If we are in the Emacs mode, the log_frame is no longer really used:
Definition: wpips.c:54

References int, main_frame, and pips_bits.

◆ create_main_window()

void create_main_window ( )

Xv_window main_window;

The following mask is necessary to avoid that key events occure twice.

main_window = (Xv_Window) xv_find(main_frame, WINDOW, 0); xv_set(main_window, WIN_IGNORE_EVENT, WIN_UP_ASCII_EVENTS, NULL);

commented out as we shifted to xview.3, 92.04

xv_set(canvas_paint_window(main_panel), WIN_IGNORE_EVENT, WIN_UP_ASCII_EVENTS, WIN_CONSUME_EVENT, 32526, WIN_EVENT_PROC, main_event_proc, NULL);

Definition at line 129 of file wpips.c.

130 {
131  /* Xv_window main_window; */
132 
133  main_panel = xv_create(main_frame, PANEL,
134  NULL);
135 
136  /* The following mask is necessary to avoid that key events occure twice.
137  */
138  /* main_window = (Xv_Window) xv_find(main_frame, WINDOW, 0);
139  xv_set(main_window,
140  WIN_IGNORE_EVENT, WIN_UP_ASCII_EVENTS,
141  NULL);
142  */
143  /* commented out as we shifted to xview.3, 92.04 */
144 /* xv_set(canvas_paint_window(main_panel),
145  WIN_IGNORE_EVENT, WIN_UP_ASCII_EVENTS,
146  WIN_CONSUME_EVENT, 32526,
147  WIN_EVENT_PROC, main_event_proc,
148  NULL);
149 */
150 }
Panel main_panel
Definition: wpips.c:63

References main_frame, and main_panel.

Referenced by wpips_main().

+ Here is the caller graph for this function:

◆ create_menus()

static void create_menus ( )
static

create_analyze_menu();

The option panel use the definition of the edit menu and so needs to be create after it:

Gone in create_menus_end(): ...No !

In the Emacs mode, no XView log window:

In fact, create it but disabled to keep the same frame layout:

Definition at line 85 of file wpips.c.

86 {
89 /* create_analyze_menu();*/
92  /* The option panel use the definition of the edit menu and so
93  needs to be create after it: */
95  /* Gone in create_menus_end(): ...No ! */
97  /* In the Emacs mode, no XView log window: */
98  /* In fact, create it but disabled to keep the same frame layout: */
101 }
void create_compile_menu()
Definition: gtk_compile.c:190
void create_edit_menu()
Definition: gtk_edit2.c:563
void create_help_menu()
Definition: gtk_help.c:132
void create_log_menu()
Definition: gtk_log.c:178
void create_options_menu_and_window()
Definition: gtk_props.c:516
void create_quit_button()
Definition: gtk_quit.c:108
void create_select_menu()
Definition: gtk_select.c:788
void create_transform_menu()

References create_compile_menu(), create_edit_menu(), create_help_menu(), create_log_menu(), create_options_menu_and_window(), create_quit_button(), create_select_menu(), and create_transform_menu().

Referenced by wpips_main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ deal_with_wpips_events_during_pipsmake()

static bool deal_with_wpips_events_during_pipsmake ( )
static

Since XView is not called while pipsmake is running, explicitly run a hook from pipsmake to run the notifyer such as to stop pipsmake:

First, try to show we are working :-)

Ask the XView notifyer to deal with one event.

Refresh the main frame:

pipsmake not interrupted by default:

Definition at line 279 of file wpips.c.

280 {
281  int i;
282 
283  /* First, try to show we are working :-) */
285 
287  /* Ask the XView notifyer to deal with one event. */
288  notify_dispatch();
289 
290  /* Refresh the main frame: */
291  XFlush((Display *) xv_get(main_frame, XV_DISPLAY));
292  /* pipsmake not interrupted by default: */
293  return TRUE;
294 }
void wpips_interrupt_button_blink()
Definition: xv_status.c:163

References main_frame, wpips_interrupt_button_blink(), and WPIPS_NUMBER_OF_EVENT_TO_DEAL_DURING_PIPSMAKE_INTERPHASE.

Referenced by wpips_main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ execute_main_loop_command()

void execute_main_loop_command ( wpips_main_loop_command_type  command)

Exit the notify loop to execute a WPips command:

I guess the function above does not return...

Definition at line 333 of file wpips.c.

334 {
335  wpips_main_loop_command = command;
336  notify_stop();
337  /* I guess the function above does not return... */
338 }
static wpips_main_loop_command_type wpips_main_loop_command
The variables to pass information between inside and outside the XView notifyer:
Definition: wpips.c:75

References wpips_main_loop_command.

◆ execute_workspace_creation_and_so_on_given_with_options()

static void execute_workspace_creation_and_so_on_given_with_options ( void  )
static

Execute some actions asked as option after XView initialization:

It fails, Go on with the normal WPips behaviour...

It fails, Go on with the normal WPips behaviour...

It fails, Go on with the normal WPips behaviour...

Definition at line 236 of file wpips.c.

237 {
238  if (workspace_name_given_to_wpips != NULL)
239  {
240  if (files_given_to_wpips != NULL)
241  {
243  /* It fails, Go on with the normal WPips behaviour... */
244  return;
245 
247  /* It fails, Go on with the normal WPips behaviour... */
248  return;
249 
251  } else {
253  /* It fails, Go on with the normal WPips behaviour... */
254  return;
255  }
256 
257  if (module_name_given_to_wpips != NULL) {
259  }
261  show_workspace();
266  show_module();
267  }
268 }
void gen_array_free(gen_array_t a)
Definition: array.c:70
bool create_workspace(gen_array_t files)
FI: should be called "initialize_workspace()"; a previous call to db_create_workspace() is useful to ...
Definition: dbm.c:180
bool open_workspace(const char *name)
should be: success (cf wpips.h)
Definition: dbm.c:309
void enable_module_selection()
Definition: gtk_select.c:262
void enable_workspace_create_or_open()
Definition: gtk_select.c:213
void disable_change_directory()
Definition: gtk_select.c:186
void enable_workspace_close()
Definition: gtk_select.c:242
void show_workspace()
Definition: gtk_status.c:123
void display_memory_usage()
Definition: gtk_status.c:84
void show_module()
Definition: gtk_status.c:134
bool db_create_workspace(const char *)
Definition: workspace.c:282
static string module_name_given_to_wpips
Definition: wpips.c:79
static gen_array_t files_given_to_wpips
Definition: wpips.c:80
static string workspace_name_given_to_wpips
To deal with argument parsing:
Definition: wpips.c:78
void end_select_module_notify(string name)
Definition: xv_select.c:882

References create_workspace(), db_create_workspace(), disable_change_directory(), display_memory_usage(), enable_module_selection(), enable_workspace_close(), enable_workspace_create_or_open(), end_select_module_notify(), files_given_to_wpips, gen_array_free(), module_name_given_to_wpips, open_workspace(), show_module(), show_workspace(), and workspace_name_given_to_wpips.

Referenced by wpips_main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main_event_proc()

void main_event_proc ( Xv_Window  window,
Event *  event 
)

we place all frames

Definition at line 115 of file wpips.c.

118 {
119  if (first_mapping == TRUE && event_id(event)==32526) {
120  first_mapping = FALSE;
121 
122  /* we place all frames */
123  place_frames();
124  };
125 }
static int first_mapping
Definition: wpips.c:113
void place_frames()
Definition: xv_frames.c:177

References first_mapping, and place_frames().

+ Here is the call graph for this function:

◆ wpips_interrupt_pipsmake()

void wpips_interrupt_pipsmake ( Panel_item  item,
Event *  event 
)

To ask pipsmake to stop as soon as possible:

Definition at line 299 of file wpips.c.

301 {
303  user_log("PIPS interruption requested...\n");
304 }
void user_log(const char *format,...)
Definition: message.c:234
void interrupt_pipsmake_asap()
misc.c
Definition: misc.c:48

References interrupt_pipsmake_asap(), and user_log().

Referenced by create_status_subwindow().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wpips_main()

int wpips_main ( int  argc,
char *  argv[] 
)

we parse command line arguments

XV_ERROR_PROC unset as we shifted to xview.3, Apr. 92

we parse remaining command line arguments

we create all frames

Create the edit/view windows only if we are not in the Emacs mode:

In the Emacs mode, no XView log window but we need it to compute the size of some other frames...

create_menus_end();

create_icon();

Call added. RK, 9/06/1993.

If we are in the emacs mode, initialize some things:

Definition at line 378 of file wpips.c.

379 {
380  pips_checks();
382 
388 
392 
393  debug_on("WPIPS_DEBUG_LEVEL");
394 
395  /* we parse command line arguments */
396  /* XV_ERROR_PROC unset as we shifted to xview.3, Apr. 92 */
397  xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv,
398  XV_ERROR_PROC, wpips_xview_error,
399  0);
400 
401  /* we parse remaining command line arguments */
402  wpips_parse_arguments(argc, argv);
403 
404  /* we create all frames */
405  create_frames();
406 
408 
410 
412 
414 
416 
417  if (! wpips_emacs_mode)
418  /* Create the edit/view windows only if we are not in the Emacs
419  mode: */
421 
422  /* In the Emacs mode, no XView log window but we need it to compute
423  the size of some other frames... */
425 
426  create_menus();
427 
429 
430  /* create_menus_end(); */
431 
432  create_icons();
433  /* create_icon();*/
434 
435  /* Call added. RK, 9/06/1993. */
436  place_frames();
437 
438  /* If we are in the emacs mode, initialize some things: */
440 
442 
451 
453 
455 
457 
459 
460  close_log_file();
461 
462  debug_off();
463 
464  exit(0);
465 }
void close_log_file(void)
Definition: message.c:162
void(* pips_log_handler)(const char *fmt, va_list *args)
USER_LOG is a function that should be called to log the current PIPS request, as soon as it is releva...
Definition: message.c:216
string(* pips_request_handler)(const char *, va_list *)
default assignment of pips_request_handler is default_user_request.
Definition: message.c:139
void(* pips_error_handler)(const char *, const char *, va_list *)
PROMPT_USER schould be implemented.
Definition: message.c:455
void set_pips_meta_informations(const char *revs, const char *date, const char *comp)
Definition: message.c:102
void(* pips_warning_handler)(const char *, const char *, va_list *)
default assignment of pips_warning_handler is default_user_warning.
Definition: message.c:325
void set_exception_callbacks(exception_callback_t, exception_callback_t)
void set_pipsmake_callback(pipsmake_callback_handler_type p)
callback.c
Definition: callback.c:43
void reset_pipsmake_callback()
Definition: callback.c:51
void(* pips_update_props_handler)()=default_update_props
default assignment of pips_update_props_handler is default_update_props.
Definition: dbm.c:53
void initialize_emacs_mode()
The function to initialize some things in the emacs mode:
Definition: emacs.c:511
bool wpips_emacs_mode
Here are all the stuff to interface Pips with Emacs.
Definition: emacs.c:65
void push_pips_context(char const *file, char const *function, int line)
exception.c
Definition: exception.c:43
void pop_pips_context(char const *file, char const *function, int line)
Definition: exception.c:50
void create_icons()
include "logo_pips_small.xpm"
Definition: xv_icons.c:72
void disable_compile_selection()
Definition: gtk_compile.c:74
void create_edit_window()
Definition: gtk_edit2.c:513
void disable_view_selection()
Definition: gtk_edit2.c:505
void create_help_window()
Definition: gtk_help.c:78
void create_log_window()
This works but it is cleaner to use textsw_reset() instead...
Definition: gtk_log.c:215
void create_mchoose_window()
Definition: gtk_mchoose.c:242
void update_options()
Definition: gtk_props.c:138
void disable_option_selection()
Definition: gtk_props.c:130
void create_query_window()
Definition: gtk_query.c:163
void create_schoose_window()
Definition: gtk_schoose2.c:189
void disable_module_selection()
Definition: gtk_select.c:253
void enable_change_directory()
Definition: gtk_select.c:173
void disable_workspace_close()
Definition: gtk_select.c:234
void create_status_subwindow()
Definition: gtk_status.c:331
void disable_transform_selection()
Definition: gtk_transform.c:91
void pips_checks(void)
add checkings here (FI: why in help.c?) SG : PIPS_ROOT should not be required :)
Definition: help.c:100
#define debug_on(env)
Definition: misc-local.h:157
#define debug_off()
Definition: misc-local.h:160
#define exit(code)
Definition: misc-local.h:54
void initialize_newgen()
cproto-generated files
Definition: newgen.c:48
char * soft_revisions
could be shared somewhere?
Definition: revisions.c:33
char * cc_version
Definition: revisions.c:41
char * soft_date
Definition: revisions.c:39
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
Definition: entity.c:453
void initialize_sc(char *(*var_to_string)(Variable))
Definition: sc_debug.c:253
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
Definition: vecteur-local.h:60
void wpips_user_warning(const char *calling_function_name, const char *format, va_list *args)
Definition: vararg.c:56
void wpips_user_error(const char *calling_function_name, const char *format, va_list *args)
Definition: vararg.c:37
static int wpips_xview_error(Xv_object object, Attr_avlist avlist)
Try to inform the user about an XView error.
Definition: wpips.c:311
static void wpips_parse_arguments(int argc, char *argv[])
Try to parse the WPips arguments.
Definition: wpips.c:192
void create_main_window()
Definition: wpips.c:129
static bool deal_with_wpips_events_during_pipsmake()
Since XView is not called while pipsmake is running, explicitly run a hook from pipsmake to run the n...
Definition: wpips.c:279
static void execute_workspace_creation_and_so_on_given_with_options(void)
Execute some actions asked as option after XView initialization:
Definition: wpips.c:236
static void create_menus()
Definition: wpips.c:85
static void wpips_main_loop(Frame frame_to_map_first)
The main loop that deals with command outside the XView notifyer:
Definition: wpips.c:343
void create_frames()
Definition: xv_frames.c:91
void wpips_user_log(string fmt, va_list args)
Definition: xv_log.c:183
string wpips_user_request(char *a_printf_format, va_list args)
Definition: xv_query.c:197

References cc_version, close_log_file(), create_edit_window(), create_frames(), create_help_window(), create_icons(), create_log_window(), create_main_window(), create_mchoose_window(), create_menus(), create_query_window(), create_schoose_window(), create_status_subwindow(), deal_with_wpips_events_during_pipsmake(), debug_off, debug_on, disable_compile_selection(), disable_module_selection(), disable_option_selection(), disable_transform_selection(), disable_view_selection(), disable_workspace_close(), display_memory_usage(), enable_change_directory(), enable_workspace_create_or_open(), entity_local_name(), execute_workspace_creation_and_so_on_given_with_options(), exit, initialize_emacs_mode(), initialize_newgen(), initialize_sc(), main_frame, pips_checks(), pips_error_handler, pips_log_handler, pips_request_handler, pips_update_props_handler, pips_warning_handler, place_frames(), pop_pips_context(), push_pips_context(), reset_pipsmake_callback(), set_exception_callbacks(), set_pips_meta_informations(), set_pipsmake_callback(), soft_date, soft_revisions, update_options(), wpips_emacs_mode, wpips_main_loop(), wpips_parse_arguments(), wpips_user_error(), wpips_user_log(), wpips_user_request(), wpips_user_warning(), and wpips_xview_error().

+ Here is the call graph for this function:

◆ wpips_main_loop()

static void wpips_main_loop ( Frame  frame_to_map_first)
static

The main loop that deals with command outside the XView notifyer:

The loop to execute commands:

If the notifyer happen to exit without a specifyed command, just exit:

Restore the initial state of the blinking pips icon:

Wait again for something from X11 and emacs:

Definition at line 343 of file wpips.c.

344 {
345  xv_main_loop(frame_to_map_first);
346 
347  /* The loop to execute commands: */
349  debug(1, "wpips_main_loop", "wpips_main_loop_command = %d\n", wpips_main_loop_command);
350 
351  switch((int) wpips_main_loop_command) {
352  case WPIPS_SAFE_APPLY:
354  break;
355 
358  break;
359 
360  default:
361  pips_assert("wpips_main_loop does not understand the wpips_main_loop_command", 0);
362  }
363 
364  /* If the notifyer happen to exit without a specifyed command,
365  just exit: */
367 
368  /* Restore the initial state of the blinking pips icon: */
370 
371  /* Wait again for something from X11 and emacs: */
372  notify_start();
373  }
374 }
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
Definition: misc-local.h:172
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
Definition: debug.c:189
@ WPIPS_EXIT
Definition: wpips-local.h:67
@ WPIPS_EXECUTE_AND_DISPLAY
Definition: wpips-local.h:69
@ WPIPS_SAFE_APPLY
Definition: wpips-local.h:68
void execute_wpips_execute_and_display_something_outside_the_notifyer()
To execute something and display some Pips output with wpips or epips, called outside the notifyer:
Definition: xv_edit2.c:438
void wpips_interrupt_button_restore()
Definition: xv_status.c:179
void execute_safe_apply_outside_the_notifyer()
Definition: xv_transform.c:111

References debug(), execute_safe_apply_outside_the_notifyer(), execute_wpips_execute_and_display_something_outside_the_notifyer(), pips_assert, WPIPS_EXECUTE_AND_DISPLAY, WPIPS_EXIT, wpips_interrupt_button_restore(), wpips_main_loop_command, and WPIPS_SAFE_APPLY.

Referenced by wpips_main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wpips_parse_arguments()

static void wpips_parse_arguments ( int  argc,
char *  argv[] 
)
static

Try to parse the WPips arguments.

The problem is that the -emacs option need to be known early but the workspace and other typical PIPS options need to be evaluate later...

Should add a help and version option.

the one of getopt (3)

Wpips is called from emacs. RK.

lazy init

Definition at line 192 of file wpips.c.

194 {
195  extern int optind; /* the one of getopt (3) */
196  int iarg = optind;
197 
198  while (iarg < argc) {
199  if (same_string_p(argv[iarg], "-emacs")) {
200  argv[iarg] = NULL;
201  /* Wpips is called from emacs. RK. */
202  wpips_emacs_mode = 1;
203  }
204  else if (same_string_p(argv[iarg], "-workspace")) {
205  argv[iarg] = NULL;
206  workspace_name_given_to_wpips = argv[++iarg];
207  }
208  else if (same_string_p(argv[iarg], "-module")) {
209  argv[iarg] = NULL;
210  module_name_given_to_wpips = argv[++iarg];
211  }
212  else if (same_string_p(argv[iarg], "-files")) {
213  argv[iarg] = NULL;
214 
215  if (!files_given_to_wpips) /* lazy init */
217  gen_array_append(files_given_to_wpips, argv[++iarg]);
218  }
219  else {
220  if (argv[iarg][0] == '-') {
221  fprintf(stderr, "Usage: %s ", argv[0]);
222  fprintf(stderr, "[ X-Window options ] [ -emacs ]");
223  fprintf(stderr, "[ -workspace name [ -module name ] ");
224  fprintf(stderr, "[ -files file1.f file2.f ... ] ]\n");
225  exit(1);
226  }
227  }
228 
229  iarg += 1;
230  }
231 }
gen_array_t gen_array_make(size_t size)
declarations...
Definition: array.c:40
void gen_array_append(gen_array_t a, void *what)
Definition: array.c:105
#define same_string_p(s1, s2)
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
int optind

References exit, files_given_to_wpips, fprintf(), gen_array_append(), gen_array_make(), module_name_given_to_wpips, optind, same_string_p, workspace_name_given_to_wpips, and wpips_emacs_mode.

Referenced by wpips_main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wpips_xview_error()

static int wpips_xview_error ( Xv_object  object,
Attr_avlist  avlist 
)
static

Try to inform the user about an XView error.

For debug, use the WPIPS_DEBUG_LEVEL to have an abort on this kind of error.

Cannot use pips_assert since it uses XView, neither get_bool_property for the same reason:

Definition at line 311 of file wpips.c.

313 {
314  debug_on("WPIPS_DEBUG_LEVEL");
315 
316  fprintf(stderr, "wpips_xview_error caught an error:\n%s\n",
317  xv_error_format(object, avlist));
318  /* Cannot use pips_assert since it uses XView, neither
319  get_bool_property for the same reason: */
320  if (get_debug_level() > 0) {
321  fprintf(stderr, "wpips_xview_error is aborting as requested since WPIPS_DEBUG_LEVEL > 0...\n");
322  abort();
323  }
324 
325  debug_off();
326 
327  return XV_OK;
328 }
#define abort()
Definition: misc-local.h:53
int get_debug_level(void)
GET_DEBUG_LEVEL returns the current debugging level.
Definition: debug.c:67

References abort, debug_off, debug_on, fprintf(), and get_debug_level().

Referenced by wpips_main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ edit_frame

Frame edit_frame[MAX_NUMBER_OF_WPIPS_WINDOWS]

Definition at line 58 of file wpips.c.

◆ files_given_to_wpips

gen_array_t files_given_to_wpips = NULL
static

◆ first_mapping

int first_mapping = TRUE
static

Definition at line 113 of file wpips.c.

Referenced by main_event_proc().

◆ help_frame

Frame help_frame

Definition at line 59 of file wpips.c.

◆ help_panel

Panel help_panel

Definition at line 68 of file wpips.c.

◆ log_frame

Frame log_frame

Definition at line 57 of file wpips.c.

◆ main_frame

◆ main_panel

◆ mchoose_frame

Frame mchoose_frame

Definition at line 56 of file wpips.c.

◆ mchoose_panel

Panel mchoose_panel

Definition at line 66 of file wpips.c.

◆ module_name_given_to_wpips

string module_name_given_to_wpips = NULL
static

◆ options_frame

Frame options_frame

Definition at line 61 of file wpips.c.

◆ pips_bits

unsigned short pips_bits[]
static
Initial value:
= {
}

Definition at line 153 of file wpips.c.

Referenced by create_icon().

◆ query_frame

Frame query_frame

Definition at line 60 of file wpips.c.

◆ query_panel

Panel query_panel

Definition at line 65 of file wpips.c.

◆ schoose_frame

Frame schoose_frame

Definition at line 55 of file wpips.c.

◆ schoose_panel

Panel schoose_panel

Definition at line 67 of file wpips.c.

◆ status_panel

Panel status_panel

Definition at line 64 of file wpips.c.

◆ workspace_name_given_to_wpips

string workspace_name_given_to_wpips = NULL
static

To deal with argument parsing:

Definition at line 78 of file wpips.c.

Referenced by execute_workspace_creation_and_so_on_given_with_options(), and wpips_parse_arguments().

◆ wpips_main_loop_command

wpips_main_loop_command_type wpips_main_loop_command = WPIPS_EXIT
static

The variables to pass information between inside and outside the XView notifyer:

By default, exiting the notifyer is to exit wpips:

Definition at line 75 of file wpips.c.

Referenced by execute_main_loop_command(), and wpips_main_loop().