make inline correct
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 14 Aug 2004 21:12:12 +0000 (21:12 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 14 Aug 2004 21:12:12 +0000 (21:12 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@759 04897980-b3bd-0310-b5e0-8ef037075253

13 files changed:
ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c
ltt/branches/poly/lttv/modules/gui/controlflow/cfv.h
ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c
ltt/branches/poly/lttv/modules/gui/controlflow/drawing.h
ltt/branches/poly/lttv/modules/gui/controlflow/drawitem.c
ltt/branches/poly/lttv/modules/gui/controlflow/drawitem.h
ltt/branches/poly/lttv/modules/gui/controlflow/eventhooks.c
ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c
ltt/branches/poly/lttv/modules/gui/controlflow/processlist.h
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/menu.c
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/toolbar.c

index e2977da8d125514a47e7ae6ea9ae952162271cc9..8d4a339ec2b47ff25bc3fd2045f0fb3ac6cada1b 100644 (file)
@@ -211,16 +211,4 @@ guicontrolflow_destructor(ControlFlowData *control_flow_data)
  
 }
 
-__inline__ GtkWidget *guicontrolflow_get_widget(
-                                     ControlFlowData *control_flow_data)
-{
-  return control_flow_data->top_widget ;
-}
-
-__inline__ ProcessList *guicontrolflow_get_process_list
-    (ControlFlowData *control_flow_data)
-{
-    return control_flow_data->process_list ;
-}
-
 
index 1c171758b76ad08ddb0645c2bbba5db606e11621..03cef7e72f6631ba80b12c1f4481583de30eb2e2 100644 (file)
@@ -33,10 +33,19 @@ void
 guicontrolflow_destructor_full(ControlFlowData *control_flow_data);
 void
 guicontrolflow_destructor(ControlFlowData *control_flow_data);
-__inline__ GtkWidget *guicontrolflow_get_widget(
-                                       ControlFlowData *control_flow_data);
-__inline__ ProcessList *guicontrolflow_get_process_list(
-                                       ControlFlowData *control_flow_data);
+
+inline GtkWidget *guicontrolflow_get_widget(
+                                     ControlFlowData *control_flow_data)
+{
+  return control_flow_data->top_widget ;
+}
+
+inline ProcessList *guicontrolflow_get_process_list
+    (ControlFlowData *control_flow_data)
+{
+    return control_flow_data->process_list ;
+}
+
 
 
 #endif // _CFV_H
index 33a8124b9f8d5e8bfcd0b2117de14a3840ac53ac..d94a509ef5e383afcba712c80e273efa659d80b5 100644 (file)
@@ -924,50 +924,6 @@ GtkWidget *drawing_get_widget(Drawing_t *drawing)
   return drawing->vbox;
 }
 
-/* convert_pixels_to_time
- *
- * Convert from window pixel and time interval to an absolute time.
- */
-__inline__ void convert_pixels_to_time(
-    gint width,
-    guint x,
-    TimeWindow time_window,
-    LttTime *time)
-{
-  double time_d;
-  
-  time_d = time_window.time_width_double;
-  time_d = time_d / (double)width * (double)x;
-  *time = ltt_time_from_double(time_d);
-  *time = ltt_time_add(time_window.start_time, *time);
-}
-
-
-__inline__ void convert_time_to_pixels(
-    TimeWindow time_window,
-    LttTime time,
-    int width,
-    guint *x)
-{
-  double time_d;
-#ifdef EXTRA_CHECK 
-  g_assert(ltt_time_compare(window_time_begin, time) <= 0 &&
-           ltt_time_compare(window_time_end, time) >= 0);
-#endif //EXTRA_CHECK
-  
-  time = ltt_time_sub(time, time_window.start_time);
-  
-  time_d = ltt_time_to_double(time);
-  
-  if(time_window.time_width_double == 0.0) {
-    g_assert(time_d == 0.0);
-    *x = 0;
-  } else {
-    *x = (guint)(time_d / time_window.time_width_double * (double)width);
-  }
-  
-}
-
 void drawing_draw_line( Drawing_t *drawing,
       GdkPixmap *pixmap,
       guint x1, guint y1,
index 6cbcb8484e4d14ffb49acd2cb941977abc9440c1..02dd33e4948a2b77d9a939026efd0e2971110eb9 100644 (file)
@@ -134,18 +134,6 @@ void drawing_remove_square(Drawing_t *drawing,
         guint y,
         guint height);
 
-__inline__ void convert_pixels_to_time(
-    gint width,
-    guint x,
-    TimeWindow time_window,
-    LttTime *time);
-
-__inline__ void convert_time_to_pixels(
-    TimeWindow time_window,
-    LttTime time,
-    gint width,
-    guint *x);
-
 void drawing_update_ruler(Drawing_t *drawing, TimeWindow *time_window);
 
 void drawing_request_expose(EventsRequest *events_request,
@@ -164,4 +152,51 @@ tree_row_activated(GtkTreeModel *treemodel,
                    GtkTreeViewColumn *arg2,
                    gpointer user_data);
 
+
+/* convert_pixels_to_time
+ *
+ * Convert from window pixel and time interval to an absolute time.
+ */
+inline void convert_pixels_to_time(
+    gint width,
+    guint x,
+    TimeWindow time_window,
+    LttTime *time)
+{
+  double time_d;
+  
+  time_d = time_window.time_width_double;
+  time_d = time_d / (double)width * (double)x;
+  *time = ltt_time_from_double(time_d);
+  *time = ltt_time_add(time_window.start_time, *time);
+}
+
+
+inline void convert_time_to_pixels(
+    TimeWindow time_window,
+    LttTime time,
+    int width,
+    guint *x)
+{
+  double time_d;
+#ifdef EXTRA_CHECK 
+  g_assert(ltt_time_compare(window_time_begin, time) <= 0 &&
+           ltt_time_compare(window_time_end, time) >= 0);
+#endif //EXTRA_CHECK
+  
+  time = ltt_time_sub(time, time_window.start_time);
+  
+  time_d = ltt_time_to_double(time);
+  
+  if(time_window.time_width_double == 0.0) {
+    g_assert(time_d == 0.0);
+    *x = 0;
+  } else {
+    *x = (guint)(time_d / time_window.time_width_double * (double)width);
+  }
+  
+}
+
+
+
 #endif // _DRAWING_H
index c71aeebeacce9924b9768b2b40d8e9a30c52da07..a3085a8aa1824040f13a26c45bf058ac9d072358 100644 (file)
 #define MAX_PATH_LEN 256
 
 /* drawing hook functions */
-__inline__ gboolean draw_text( void *hook_data, void *call_data)
+gboolean draw_text( void *hook_data, void *call_data)
 {
   PropertiesText *properties = (PropertiesText*)hook_data;
   DrawContext *draw_context = (DrawContext*)call_data;
@@ -206,7 +206,7 @@ __inline__ gboolean draw_text( void *hook_data, void *call_data)
 /* To speed up the process, search in already loaded icons list first. Only
  * load it if not present.
  */
-__inline__ gboolean draw_icon( void *hook_data, void *call_data)
+gboolean draw_icon( void *hook_data, void *call_data)
 {
   PropertiesIcon *properties = (PropertiesIcon*)hook_data;
   DrawContext *draw_context = (DrawContext*)call_data;
@@ -311,7 +311,7 @@ __inline__ gboolean draw_icon( void *hook_data, void *call_data)
   return 0;
 }
 
-__inline__ gboolean draw_line( void *hook_data, void *call_data)
+gboolean draw_line( void *hook_data, void *call_data)
 {
   PropertiesLine *properties = (PropertiesLine*)hook_data;
   DrawContext *draw_context = (DrawContext*)call_data;
@@ -357,7 +357,7 @@ __inline__ gboolean draw_line( void *hook_data, void *call_data)
   return 0;
 }
 
-__inline__ gboolean draw_arc( void *hook_data, void *call_data)
+gboolean draw_arc( void *hook_data, void *call_data)
 {
   PropertiesArc *properties = (PropertiesArc*)hook_data;
   DrawContext *draw_context = (DrawContext*)call_data;
@@ -433,7 +433,7 @@ __inline__ gboolean draw_arc( void *hook_data, void *call_data)
   return 0;
 }
 
-__inline__ gboolean draw_bg( void *hook_data, void *call_data)
+gboolean draw_bg( void *hook_data, void *call_data)
 {
   PropertiesBG *properties = (PropertiesBG*)hook_data;
   DrawContext *draw_context = (DrawContext*)call_data;
index 434f20072a38b7ea42da024e1c6aa0638f06c297..df945e3a44998a24db105a9391c38f9c27593a00 100644 (file)
@@ -268,11 +268,11 @@ void exec_operations( LttvIAttribute *attributes,
  * different items.
  */
 
-__inline__ gboolean draw_text( void *hook_data, void *call_data);
-__inline__ gboolean draw_icon( void *hook_data, void *call_data);
-__inline__ gboolean draw_line( void *hook_data, void *call_data);
-__inline__ gboolean draw_arc( void *hook_data, void *call_data);
-__inline__ gboolean draw_bg( void *hook_data, void *call_data);
+gboolean draw_text( void *hook_data, void *call_data);
+gboolean draw_icon( void *hook_data, void *call_data);
+gboolean draw_line( void *hook_data, void *call_data);
+gboolean draw_arc( void *hook_data, void *call_data);
+gboolean draw_bg( void *hook_data, void *call_data);
 
 
 #endif // _DRAW_ITEM_H
index ce655eba0eca6796695228508cc54d3c28e5397f..14ae53593982d15f5bd782a12ec8e63b11828b92 100644 (file)
@@ -271,7 +271,7 @@ int event_selected_hook(void *hook_data, void *call_data)
 }
 
 /* Function that selects the color of status&exemode line */
-static __inline__ PropertiesLine prepare_s_e_line(LttvProcessState *process)
+static inline PropertiesLine prepare_s_e_line(LttvProcessState *process)
 {
   PropertiesLine prop_line;
   prop_line.line_width = 2;
@@ -318,7 +318,7 @@ static __inline__ PropertiesLine prepare_s_e_line(LttvProcessState *process)
 }
 
 #if 0
-static __inline__ PropertiesLine prepare_status_line(LttvProcessState *process)
+static inline PropertiesLine prepare_status_line(LttvProcessState *process)
 {
   PropertiesLine prop_line;
   prop_line.line_width = 2;
@@ -1937,7 +1937,7 @@ int after_schedchange_hook(void *hook_data, void *call_data)
 }
 
 #if 0
-static __inline__ PropertiesLine prepare_execmode_line(LttvProcessState *process)
+static inline PropertiesLine prepare_execmode_line(LttvProcessState *process)
 {
   PropertiesLine prop_line;
   prop_line.line_width = 1;
index 727f74ed0e3752765b020aa7af4981f55859d4b1..644cce52c8cc87cb61e1f515f2ad804f64377155 100644 (file)
@@ -32,7 +32,7 @@
  *                       Methods to synchronize process list                 *
  *****************************************************************************/
 
-//static __inline__ guint get_cpu_number_from_name(GQuark name);
+//static inline guint get_cpu_number_from_name(GQuark name);
   
 /* Enumeration of the columns */
 enum
@@ -442,7 +442,7 @@ GtkWidget *processlist_get_widget(ProcessList *process_list)
 
 
 
-static __inline__ gint get_cell_height(ProcessList *process_list, GtkTreeView *tree_view)
+static inline gint get_cell_height(ProcessList *process_list, GtkTreeView *tree_view)
 {
   gint height = process_list->cell_height_cache;
   if(height != -1) return height;
@@ -592,59 +592,8 @@ int processlist_remove( ProcessList *process_list,
 }
 
 
-__inline__ guint processlist_get_height(ProcessList *process_list)
-{
-  return get_cell_height(process_list,
-                         (GtkTreeView*)process_list->process_list_widget)
-        * process_list->number_of_process ;
-}
-
-
-__inline__ HashedProcessData *processlist_get_process_data( 
-          ProcessList *process_list,
-          guint pid, guint cpu, LttTime *birth, guint trace_num)
-{
-  ProcessInfo process_info;
-  gint *path_indices;
-  GtkTreePath *tree_path;
-
-  process_info.pid = pid;
-  if(pid == 0)
-    process_info.cpu = cpu;
-  else
-    process_info.cpu = 0;
-  process_info.birth = *birth;
-  process_info.trace_num = trace_num;
-
-  return  (HashedProcessData*)g_hash_table_lookup(
-                process_list->process_hash,
-                &process_info);
-}
-
-
-__inline__ gint processlist_get_pixels_from_data(  ProcessList *process_list,
-          HashedProcessData *hashed_process_data,
-          guint *y,
-          guint *height)
-{
-  gint *path_indices;
-  GtkTreePath *tree_path;
-
-  tree_path = gtk_tree_model_get_path((GtkTreeModel*)process_list->list_store,
-                    &hashed_process_data->y_iter);
-  path_indices =  gtk_tree_path_get_indices (tree_path);
-
-  *height = get_cell_height(process_list,
-      (GtkTreeView*)process_list->process_list_widget);
-  *y = *height * path_indices[0];
-  gtk_tree_path_free(tree_path);
-
-  return 0; 
-
-}
-
 #if 0
-static __inline__ guint get_cpu_number_from_name(GQuark name)
+static inline guint get_cpu_number_from_name(GQuark name)
 {
   const gchar *string;
   char *begin;
index 437110a16c3f5b7d6449540755149a51da0bac70..1a4f743e5a80bf60c4285f948166d867d0c972d3 100644 (file)
@@ -112,15 +112,58 @@ int processlist_add(ProcessList *process_list, guint pid, guint cpu, guint ppid,
 int processlist_remove(ProcessList *process_list, guint pid, guint cpu, 
     LttTime *birth, guint trace_num);
 
-__inline__ guint processlist_get_height(ProcessList *process_list);
 
-__inline__ HashedProcessData *processlist_get_process_data(
-        ProcessList *process_list,
-        guint pid, guint cpu, LttTime *birth, guint trace_num);
-
-__inline__ gint processlist_get_pixels_from_data(  ProcessList *process_list,
+inline guint processlist_get_height(ProcessList *process_list)
+{
+  return get_cell_height(process_list,
+                         (GtkTreeView*)process_list->process_list_widget)
+        * process_list->number_of_process ;
+}
+
+
+inline HashedProcessData *processlist_get_process_data( 
+          ProcessList *process_list,
+          guint pid, guint cpu, LttTime *birth, guint trace_num)
+{
+  ProcessInfo process_info;
+  gint *path_indices;
+  GtkTreePath *tree_path;
+
+  process_info.pid = pid;
+  if(pid == 0)
+    process_info.cpu = cpu;
+  else
+    process_info.cpu = 0;
+  process_info.birth = *birth;
+  process_info.trace_num = trace_num;
+
+  return  (HashedProcessData*)g_hash_table_lookup(
+                process_list->process_hash,
+                &process_info);
+}
+
+
+inline gint processlist_get_pixels_from_data(  ProcessList *process_list,
           HashedProcessData *hashed_process_data,
           guint *y,
-          guint *height);
+          guint *height)
+{
+  gint *path_indices;
+  GtkTreePath *tree_path;
+
+  tree_path = gtk_tree_model_get_path((GtkTreeModel*)process_list->list_store,
+                    &hashed_process_data->y_iter);
+  path_indices =  gtk_tree_path_get_indices (tree_path);
+
+  *height = get_cell_height(process_list,
+      (GtkTreeView*)process_list->process_list_widget);
+  *y = *height * path_indices[0];
+  gtk_tree_path_free(tree_path);
+
+  return 0; 
+
+}
+
+
 
 #endif // _PROCESS_LIST_H
index 10bc10c392ac871e28d6951da9180eb766197174..c44a39bdf0d71d6c26b35b6d83ccb12b2bb0d387 100644 (file)
@@ -906,23 +906,6 @@ void lttvwindow_events_request_remove_all(Tab       *tab,
 }
 
 
-
-/**
- * Function to get the current time interval shown on the current tab.
- * It will be called by a viewer's hook function to update the 
- * shown time interval of the viewer and also be called by the constructor
- * of the viewer.
- * @param tab viewer's tab 
- * @return time window.
- */
-
-__inline__ TimeWindow lttvwindow_get_time_window(Tab *tab)
-{
-  return tab->time_window;
-  
-}
-
-
 /**
  * Function to get the current time/event of the current tab.
  * It will be called by a viewer's hook function to update the 
index dc64bb4a2f83a485ba5f597f95433ed85b77dd46..157ed164487cdacc57c6b9594654358d6efa24dd 100644 (file)
@@ -658,13 +658,18 @@ void lttvwindow_events_request_remove_all(Tab            *tab,
 
 
 /**
- * Function to get the current time window of the current tab.
- * 
- * @param tab the tab the viewer belongs to.
- * @return the current tab's time interval.
+ * Function to get the current time interval shown on the current tab.
+ * It will be called by a viewer's hook function to update the 
+ * shown time interval of the viewer and also be called by the constructor
+ * of the viewer.
+ * @param tab viewer's tab 
+ * @return time window.
  */
 
-__inline__ TimeWindow lttvwindow_get_time_window(Tab *tab);
+inline TimeWindow lttvwindow_get_time_window(Tab *tab)
+{
+  return tab->time_window;
+}
 
 
 /**
index 33f170b0054dc2c49a6f52fe1ee27963b2470ecd..90a782b5ba76dcf1ba8898fc46f2ca94ab0a8f7e 100644 (file)
 #include <lttvwindow/menu.h>
 
 
-inline LttvMenus *lttv_menus_new() {
+LttvMenus *lttv_menus_new() {
   return g_array_new(FALSE, FALSE, sizeof(LttvMenuClosure));
 }
 
 /* MD: delete elements of the array also, but don't free pointed addresses
  * (functions).
  */
-inline void lttv_menus_destroy(LttvMenus *h) {
+void lttv_menus_destroy(LttvMenus *h) {
   g_debug("lttv_menus_destroy()");
   g_array_free(h, TRUE);
 }
 
-inline LttvMenuClosure lttv_menus_add(LttvMenus *h, lttvwindow_viewer_constructor f, char* menu_path, char* menu_text, GtkWidget *widget)
+LttvMenuClosure lttv_menus_add(LttvMenus *h,
+    lttvwindow_viewer_constructor f,
+    char* menu_path, char* menu_text, GtkWidget *widget)
 {
   LttvMenuClosure c;
 
index feda92c57e830fa250d99c378acc22fce492eae1..8a7eb4a227e228d3cca56c2ef5b635ed384ea068 100644 (file)
 #include <lttv/lttv.h>
 #include <lttvwindow/toolbar.h>
 
-inline LttvToolbars *lttv_toolbars_new() {
+LttvToolbars *lttv_toolbars_new() {
   return g_array_new(FALSE, FALSE, sizeof(LttvToolbarClosure));
 }
 
 /* MD: delete elements of the array also, but don't free pointed addresses
  * (functions).
  */
-inline void lttv_toolbars_destroy(LttvToolbars *h) {
+void lttv_toolbars_destroy(LttvToolbars *h) {
   g_debug("lttv_toolbars_destroy");
   g_array_free(h, TRUE);
 }
 
-inline LttvToolbarClosure lttv_toolbars_add(LttvToolbars *h, lttvwindow_viewer_constructor f, char* tooltip, char ** pixmap, GtkWidget *widget)
+LttvToolbarClosure lttv_toolbars_add(LttvToolbars *h,
+    lttvwindow_viewer_constructor f,
+    char* tooltip, char ** pixmap, GtkWidget *widget)
 {
   LttvToolbarClosure c;
 
This page took 0.033871 seconds and 4 git commands to generate.