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 
46 void analyze_notify(menu, menu_item)
47 Menu menu;
48 Menu_item menu_item;
49 {
50  char *label = (char *) xv_get(menu_item, MENU_STRING);
51 
52  if (strcmp(label, SEMANTICS_ANALYZE) == 0) {
53  prompt_user("Not Implemented");
54  }
55  else if (strcmp(label, CALLGRAPH_ANALYZE) == 0) {
56  prompt_user("Not Implemented");
57  }
58  else {
59  pips_internal_error("Bad choice");
60  }
61 }
62 
63 
64 
66 {
67  Menu menu;
68 
69  menu = xv_create(XV_NULL, MENU_COMMAND_MENU,
70  MENU_ACTION_ITEM, SEMANTICS_ANALYZE, analyze_notify,
71  MENU_ACTION_ITEM, CALLGRAPH_ANALYZE, analyze_notify,
72  NULL);
73 
74  (void) xv_create(main_panel, PANEL_BUTTON,
75  PANEL_LABEL_STRING, "Analyze",
76  PANEL_ITEM_MENU, menu,
77  0);
78 }
#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