PIPS
xv_analyze.c
Go to the documentation of this file.
1 /*
2 
3  $Id: xv_analyze.c 23065 2016-03-02 09:05:50Z coelho $
4 
5  Copyright 1989-2016 MINES ParisTech
6 
7  This file is part of PIPS.
8 
9  PIPS is free software: you can redistribute it and/or modify it
10  under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  any later version.
13 
14  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
15  WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  FITNESS FOR A PARTICULAR PURPOSE.
17 
18  See the GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
22 
23 */
24 #ifdef HAVE_CONFIG_H
25  #include "pips_config.h"
26 #endif
27 #include <stdio.h>
28 
29 #include <sys/time.h>
30 #include <sys/resource.h>
31 #include <xview/xview.h>
32 #include <xview/panel.h>
33 #include <xview/text.h>
34 
35 #include "genC.h"
36 #include "misc.h"
37 
38 #include "wpips.h"
39 
40 /* Include the label names: */
41 #include "wpips-labels.h"
42 
43 #include "constants.h"
44 
45 void analyze_notify(menu, menu_item)
46  Menu menu;Menu_item menu_item; {
47  char *label = (char *) xv_get(menu_item, MENU_STRING);
48 
49  if (strcmp(label, SEMANTICS_ANALYZE) == 0) {
50  prompt_user("Not Implemented");
51  } else if (strcmp(label, CALLGRAPH_ANALYZE) == 0) {
52  prompt_user("Not Implemented");
53  } else {
54  pips_internal_error("Bad choice");
55  }
56 }
57 
59  Menu menu;
60 
61  menu = xv_create(XV_NULL, MENU_COMMAND_MENU, MENU_ACTION_ITEM,
62  SEMANTICS_ANALYZE, analyze_notify, MENU_ACTION_ITEM,
64 
65  (void) xv_create(main_panel, PANEL_BUTTON, PANEL_LABEL_STRING, "Analyze",
66  PANEL_ITEM_MENU, menu, 0);
67 }
#define CALLGRAPH_ANALYZE
Definition: gpips-labels.h:68
#define SEMANTICS_ANALYZE
Definition: gpips-labels.h:67
void create_analyze_menu()
Definition: xv_analyze.c:58
void analyze_notify(Menu menu, Menu_item menu_item)
Include the label names:
Definition: xv_analyze.c:45
void prompt_user(string a_printf_format,...)
Definition: gtk_log.c:66
#define pips_internal_error
Definition: misc-local.h:149
Panel main_panel
Definition: wpips.c:63