PIPS
|
#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>
#include <sys/resource.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 <gtk/gtk.h>
#include "gpips.h"
Go to the source code of this file.
Enumerations | |
enum | { GPIPS_NUMBER_OF_EVENT_TO_DEAL_DURING_PIPSMAKE_INTERPHASE = 10 } |
How much to call the notifyer between each pipsmake phase: More... | |
Functions | |
static void | create_main_window_menu_bar () |
static void | create_menus () |
void | create_main_window () |
static void | gpips_parse_arguments (int argc, char *argv[]) |
Try to parse the gpips 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_gpips_events_during_pipsmake () |
Since XView is not called while pipsmake is running, explicitly run a hook from pipsmake to run the notifier such as to stop pipsmake: More... | |
void | execute_main_loop_command (gpips_main_loop_command_type command) |
To ask pipsmake to stop as soon as possible: More... | |
static void | gpips_main_loop () |
The main loop that deals with command outside the XView notifier: More... | |
int | gpips_main (int argc, char *argv[]) |
Variables | |
GtkWidget * | main_window |
GtkWidget * | schoose_window |
GtkWidget * | mchoose_window |
GtkWidget * | log_window |
GtkWidget * | edit_window [MAX_NUMBER_OF_GPIPS_WINDOWS] |
GtkWidget * | help_window |
GtkWidget * | query_dialog |
GtkWidget * | options_window |
GtkWidget * | main_window_vbox |
GtkWidget * | main_frame |
If we are in the Emacs mode, the log_frame is no longer really used: More... | |
GtkWidget * | status_frame |
GtkWidget * | mchoose_frame |
GtkWidget * | help_frame |
GtkWidget * | main_window_menu_bar |
static gpips_main_loop_command_type | gpips_main_loop_command = GPIPS_EXIT |
The variables to pass information between inside and outside the XView notifyer: More... | |
static string | workspace_name_given_to_gpips = NULL |
To deal with argument parsing: More... | |
static string | module_name_given_to_gpips = NULL |
static gen_array_t | files_given_to_gpips = NULL |
anonymous enum |
How much to call the notifyer between each pipsmake phase:
Enumerator | |
---|---|
GPIPS_NUMBER_OF_EVENT_TO_DEAL_DURING_PIPSMAKE_INTERPHASE |
Definition at line 216 of file gpips.c.
void create_main_window | ( | ) |
Definition at line 118 of file gpips.c.
References main_frame, main_window, and main_window_vbox.
Referenced by gpips_main().
|
static |
Definition at line 75 of file gpips.c.
References main_window_menu_bar, and main_window_vbox.
Referenced by create_menus().
|
static |
The option panel use the definition of the edit menu and so needs to be create after it:
Gone in create_menus_end(): ...No !
Definition at line 82 of file gpips.c.
References create_compile_menu(), create_edit_menu(), create_help_menu(), create_log_menu(), create_main_window_menu_bar(), create_options_menu_and_window(), create_quit_button(), and create_transform_menu().
Referenced by gpips_main().
|
static |
Since XView is not called while pipsmake is running, explicitly run a hook from pipsmake to run the notifier such as to stop pipsmake:
First, try to show we are working :-)
Ask the XView notifier to deal with one event.
Refresh the main frame:
pipsmake not interrupted by default:
Definition at line 222 of file gpips.c.
References gpips_interrupt_button_blink(), and GPIPS_NUMBER_OF_EVENT_TO_DEAL_DURING_PIPSMAKE_INTERPHASE.
Referenced by gpips_main().
void execute_main_loop_command | ( | gpips_main_loop_command_type | command | ) |
To ask pipsmake to stop as soon as possible:
Try to inform the user about an XView error. For debug, use the GPIPS_DEBUG_LEVEL to have an abort on this kind of error. Exit the notify loop to execute a gpips command:
I guess the function above does not return...
Definition at line 267 of file gpips.c.
References gpips_main_loop_command.
Referenced by gpips_execute_and_display_something_outside_the_notifyer(), safe_apply_outside_the_notifyer(), and wpips_execute_and_display_something_outside_the_notifyer().
|
static |
Execute some actions asked as option after XView initialization:
It fails, Go on with the normal gpips behaviour...
It fails, Go on with the normal gpips behaviour...
It fails, Go on with the normal gpips behaviour...
Definition at line 184 of file gpips.c.
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_callback(), files_given_to_gpips, gen_array_free(), module_name_given_to_gpips, open_workspace(), show_module(), show_workspace(), and workspace_name_given_to_gpips.
Referenced by gpips_main().
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 windows
Definition at line 312 of file gpips.c.
References close_log_file(), create_edit_window(), create_help_window(), create_log_window(), create_main_window(), create_mchoose_window(), create_menus(), create_query_window(), create_schoose_window(), create_status_subwindow(), create_windows(), deal_with_gpips_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, gpips_main_loop(), gpips_parse_arguments(), gpips_user_error(), gpips_user_log(), gpips_user_request(), gpips_user_warning(), initialize_newgen(), initialize_sc(), main_window, pips_checks(), pips_error_handler, pips_log_handler, pips_request_handler, pips_update_props_handler, pips_warning_handler, pop_pips_context(), push_pips_context(), reset_pipsmake_callback(), set_exception_callbacks(), set_pips_meta_informations(), set_pipsmake_callback(), and update_options().
|
static |
The main loop that deals with command outside the XView notifier:
The loop to execute commands:
If the notifier happen to exit without a specified command, just exit:
Restore the initial state of the blinking pips icon:
Wait again for something from X11
Definition at line 275 of file gpips.c.
References debug(), execute_gpips_execute_and_display_something_outside_the_notifier(), execute_safe_apply_outside_the_notifier(), GPIPS_EXECUTE_AND_DISPLAY, GPIPS_EXIT, gpips_interrupt_button_restore(), gpips_main_loop_command, GPIPS_SAFE_APPLY, and pips_assert.
Referenced by gpips_main().
|
static |
Try to parse the gpips arguments.
Should add a help and version option.
the one of getopt (3)
lazy init
Definition at line 153 of file gpips.c.
References exit, files_given_to_gpips, fprintf(), gen_array_append(), gen_array_make(), module_name_given_to_gpips, optind, same_string_p, and workspace_name_given_to_gpips.
Referenced by gpips_main().
GtkWidget * edit_window[MAX_NUMBER_OF_GPIPS_WINDOWS] |
|
static |
Definition at line 73 of file gpips.c.
Referenced by execute_workspace_creation_and_so_on_given_with_options(), and gpips_parse_arguments().
|
static |
The variables to pass information between inside and outside the XView notifyer:
By default, exiting the notifyer is to exit gpips:
Definition at line 68 of file gpips.c.
Referenced by execute_main_loop_command(), and gpips_main_loop().
GtkWidget* main_frame |
If we are in the Emacs mode, the log_frame is no longer really used:
Definition at line 60 of file gpips.c.
Referenced by create_main_window().
GtkWidget* main_window |
Definition at line 54 of file gpips.c.
Referenced by choose_dir_callback(), create_main_window(), create_windows(), gpips_main(), and quit_notify().
GtkWidget* main_window_menu_bar |
Definition at line 62 of file gpips.c.
Referenced by create_compile_menu(), create_edit_menu(), create_help_menu(), create_log_menu(), create_main_window_menu_bar(), create_options_menu_and_window(), create_quit_button(), create_select_menu(), and create_transform_menu().
GtkWidget* main_window_vbox |
Definition at line 57 of file gpips.c.
Referenced by create_main_window(), create_main_window_menu_bar(), and create_status_subwindow().
|
static |
Definition at line 72 of file gpips.c.
Referenced by execute_workspace_creation_and_so_on_given_with_options(), and gpips_parse_arguments().
|
static |
To deal with argument parsing:
Definition at line 71 of file gpips.c.
Referenced by execute_workspace_creation_and_so_on_given_with_options(), and gpips_parse_arguments().