25 #include "pips_config.h"
31 #include <sys/resource.h>
32 #include <xview/xview.h>
33 #include <xview/panel.h>
34 #include <xview/svrimage.h>
44 #include "constants.h"
45 #include "resources.h"
159 Server_image pips_image;
163 pips_image = (Server_image)xv_create(NULL, SERVER_IMAGE,
168 icon = (Icon)xv_create(XV_NULL, ICON,
169 ICON_IMAGE, pips_image,
171 rect.r_width= (
int)xv_get(icon, XV_WIDTH);
172 rect.r_height= (
int)xv_get(icon, XV_HEIGHT);
177 FRAME_CLOSED_RECT, &rect,
198 while (iarg < argc) {
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");
291 XFlush((Display *) xv_get(
main_frame, XV_DISPLAY));
303 user_log(
"PIPS interruption requested...\n");
316 fprintf(stderr,
"wpips_xview_error caught an error:\n%s\n",
317 xv_error_format(
object, avlist));
321 fprintf(stderr,
"wpips_xview_error is aborting as requested since WPIPS_DEBUG_LEVEL > 0...\n");
345 xv_main_loop(frame_to_map_first);
361 pips_assert(
"wpips_main_loop does not understand the wpips_main_loop_command", 0);
397 xv_init(XV_INIT_ARGC_PTR_ARGV, &argc, argv,
void close_log_file(void)
void user_log(const char *format,...)
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...
string(* pips_request_handler)(const char *, va_list *)
default assignment of pips_request_handler is default_user_request.
void(* pips_error_handler)(const char *, const char *, va_list *)
PROMPT_USER schould be implemented.
void set_pips_meta_informations(const char *revs, const char *date, const char *comp)
void(* pips_warning_handler)(const char *, const char *, va_list *)
default assignment of pips_warning_handler is default_user_warning.
void const char const char const int
void set_exception_callbacks(exception_callback_t, exception_callback_t)
gen_array_t gen_array_make(size_t size)
declarations...
void gen_array_append(gen_array_t a, void *what)
void gen_array_free(gen_array_t a)
void set_pipsmake_callback(pipsmake_callback_handler_type p)
callback.c
void reset_pipsmake_callback()
bool create_workspace(gen_array_t files)
FI: should be called "initialize_workspace()"; a previous call to db_create_workspace() is useful to ...
void(* pips_update_props_handler)()=default_update_props
default assignment of pips_update_props_handler is default_update_props.
bool open_workspace(const char *name)
should be: success (cf wpips.h)
void initialize_emacs_mode()
The function to initialize some things in the emacs mode:
bool wpips_emacs_mode
Here are all the stuff to interface Pips with Emacs.
void push_pips_context(char const *file, char const *function, int line)
exception.c
void pop_pips_context(char const *file, char const *function, int line)
void create_icons()
include "logo_pips_small.xpm"
void disable_compile_selection()
void create_compile_menu()
void create_edit_window()
void disable_view_selection()
void create_help_window()
void create_log_window()
This works but it is cleaner to use textsw_reset() instead...
void create_mchoose_window()
void create_options_menu_and_window()
void disable_option_selection()
void create_query_window()
void create_quit_button()
void create_schoose_window()
void disable_module_selection()
void enable_module_selection()
void enable_workspace_create_or_open()
void disable_change_directory()
void enable_workspace_close()
void create_select_menu()
void enable_change_directory()
void disable_workspace_close()
void display_memory_usage()
void create_status_subwindow()
void pips_checks(void)
add checkings here (FI: why in help.c?) SG : PIPS_ROOT should not be required :)
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
int get_debug_level(void)
GET_DEBUG_LEVEL returns the current debugging level.
void debug(const int the_expected_debug_level, const char *calling_function_name, const char *a_message_format,...)
ARARGS0.
void initialize_newgen()
cproto-generated files
#define same_string_p(s1, s2)
char * soft_revisions
could be shared somewhere?
void interrupt_pipsmake_asap()
misc.c
bool db_create_workspace(const char *)
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...
void initialize_sc(char *(*var_to_string)(Variable))
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
void * Variable
arithmetique is a requirement for vecteur, but I do not want to inforce it in all pips files....
#define MAX_NUMBER_OF_WPIPS_WINDOWS
How many display wondows can be opened :
wpips_main_loop_command_type
The type to describe the command to execute outside the notifyer:
@ WPIPS_EXECUTE_AND_DISPLAY
void wpips_user_warning(const char *calling_function_name, const char *format, va_list *args)
void wpips_user_error(const char *calling_function_name, const char *format, va_list *args)
void execute_main_loop_command(wpips_main_loop_command_type command)
Exit the notify loop to execute a WPips command:
static unsigned short pips_bits[]
static string module_name_given_to_wpips
static int wpips_xview_error(Xv_object object, Attr_avlist avlist)
Try to inform the user about an XView error.
static gen_array_t files_given_to_wpips
static void wpips_parse_arguments(int argc, char *argv[])
Try to parse the WPips arguments.
void main_event_proc(Xv_Window window, Event *event)
Frame main_frame
If we are in the Emacs mode, the log_frame is no longer really used:
int wpips_main(int argc, char *argv[])
void create_main_window()
@ WPIPS_NUMBER_OF_EVENT_TO_DEAL_DURING_PIPSMAKE_INTERPHASE
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...
void wpips_interrupt_pipsmake(Panel_item item, Event *event)
To ask pipsmake to stop as soon as possible:
Frame edit_frame[MAX_NUMBER_OF_WPIPS_WINDOWS]
static wpips_main_loop_command_type wpips_main_loop_command
The variables to pass information between inside and outside the XView notifyer:
static void execute_workspace_creation_and_so_on_given_with_options(void)
Execute some actions asked as option after XView initialization:
static void create_menus()
static void wpips_main_loop(Frame frame_to_map_first)
The main loop that deals with command outside the XView notifyer:
static string workspace_name_given_to_wpips
To deal with argument parsing:
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:
void wpips_user_log(string fmt, va_list args)
string wpips_user_request(char *a_printf_format, va_list args)
void end_select_module_notify(string name)
void wpips_interrupt_button_restore()
void wpips_interrupt_button_blink()