25 #include "pips_config.h"
29 #include <xview/xview.h>
30 #include <xview/panel.h>
48 void (* function_to_apply_on_each_menu_item)(Menu_item))
52 for(i = (
int) xv_get(
compile_menu, MENU_NITEMS); i >= 1; i--) {
53 Menu_item menu_item = (Menu_item) xv_get(
compile_menu, MENU_NTH_ITEM, i);
55 if (!(
bool) xv_get(menu_item, MENU_TITLE))
56 function_to_apply_on_each_menu_item(menu_item);
79 char *
file_name = (
char *) xv_get(menu_item, MENU_STRING);
104 menu = (Menu) xv_get(menu_item, MENU_PULLRIGHT);
110 char *hpfc_directory;
119 for(i = (
int) xv_get(menu, MENU_NITEMS); i > 0; i--) {
120 xv_set(menu, MENU_REMOVE, i, NULL);
121 xv_destroy(xv_get(menu, MENU_NTH_ITEM, i));
130 if (return_code == -1) {
132 "Directory \"%s\" not found... \n"
133 " Have you run the HPFC compiler from the Compile menu?\n",
136 menu = (Menu) xv_create(NULL, MENU,
138 "Are you sure you used the HPF compiler ?",
139 MENU_ITEM, MENU_STRING,
140 "*** No HPFC directory found ! ***", NULL,
143 else if (file_number == 0) {
145 "No file found in the directory \"%s\"... \n"
146 " Have you run the HPFC compiler from the Compile menu?\n",
149 menu = (Menu) xv_create(NULL, MENU,
151 "Are you sure you used the HPF compiler ?",
152 MENU_ITEM, MENU_STRING,
153 "*** No HPFC file found ! ***", NULL,
157 menu = (Menu) xv_create(NULL, MENU,
159 " Select an HPFC file to view ",
163 for(i = 0; i < file_number; i++)
164 xv_set(menu, MENU_APPEND_ITEM,
165 xv_create(XV_NULL, MENUITEM,
180 case MENU_DISPLAY_DONE:
183 menu = (Menu) xv_get(menu_item, MENU_PULLRIGHT);
189 menu = (Menu) xv_get(menu_item, MENU_PULLRIGHT);
193 case MENU_NOTIFY_DONE:
194 menu = (Menu) xv_get(menu_item, MENU_PULLRIGHT);
205 #define HPFC_COMPILE "Compile an HPF program"
206 #define HPFC_MAKE "Make an HPF program"
207 #define HPFC_RUN "Run an HPF program"
223 char *label, *modulename;
232 label = (
char *) xv_get(menu_item, MENU_STRING);
260 xv_create(XV_NULL, MENU_COMMAND_MENU,
261 MENU_GEN_PIN_WINDOW,
main_frame,
"Compile Menu",
262 MENU_TITLE_ITEM,
"Compilation ",
268 MENU_GEN_PULLRIGHT_ITEM,
269 "View the HPF Compiler Output",
274 PANEL_LABEL_STRING,
"Compile",
void user_log(const char *format,...)
string db_get_current_module_name(void)
Also used to check whether set...
void gen_array_full_free(gen_array_t a)
gen_array_t gen_array_make(size_t size)
declarations...
void * gen_array_item(const gen_array_t a, size_t i)
bool wpips_emacs_mode
Here are all the stuff to interface Pips with Emacs.
GtkWidget * main_frame
If we are in the Emacs mode, the log_frame is no longer really used:
int alloc_first_initialized_window(bool the_same_as_previous)
Find the first free window if any.
void prompt_user(string a_printf_format,...)
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_internal_error
#define user_warning(fn,...)
#define same_string_p(s1, s2)
bool safe_apply(const char *phase_n, const char *module_n)
int hpfc_get_file_list(gen_array_t, char **)
string hpfc_generate_path_name_of_file_name(const char *)
Return the path of an HPFC file name relative to the current PIPS directory.
#define WPIPS_MENU_SEPARATOR
Define the menu separator:
Menu generate_a_menu_with_HPF_output_files(Menu_item menu_item, Menu_generate action)
void hpfc_notify(Menu menu, Menu_item menu_item)
void disable_compile_selection()
void apply_on_each_compile_item(void(*function_to_apply_on_each_menu_item)(Menu_item))
void create_compile_menu()
void initialize_wpips_hpfc_hack_for_fabien_and_from_fabien()
static bool wpips_hpfc_install_was_performed_hack
quick fix around pipsmake, FC, 23/10/95
void notify_hpfc_file_view(Menu menu, Menu_item menu_item)
void enable_compile_selection()
void wpips_file_view(char *file_name, char *title_module_name, char *title_label, char *icon_name, char *icon_title)
Display a file in a wpips or epips window:
void enable_menu_item(Menu_item item)
void disable_menu_item(Menu_item item)