Commit 7b8afaf0 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Bug 16860 A few portability problems.

Bug 16860
A few portability problems.

2000-07-09  Jody Goldberg <jgoldberg@home.com>

	* src/history.c (history_menu_item_create) : Fix.

	* src/stf-parse.c (stf_parse_options_before_modification) : Simplify
	  for irix compiler.

	* src/print-info.c (print_info_new) : cellrange is a ValueRange.
	(save_range) : Ditto.
	* src/dialogs/dialog-printer-setup.c (do_setup_page_info) : Ditto.
	(do_fetch_page_info) : Ditto.
parent 176602e7
2000-07-09 Jody Goldberg <jgoldberg@home.com>
* src/history.c (history_menu_item_create) : Fix.
* src/stf-parse.c (stf_parse_options_before_modification) : Simplify
for irix compiler.
* src/print-info.c (print_info_new) : cellrange is a ValueRange.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_setup_page_info) : Ditto.
(do_fetch_page_info) : Ditto.
* src/application.c (application_dpi_to_pixels) : return a double.
returning a float caused just enough loss of precision to break
my putrid use of 9pt fonts.
......
2000-07-09 Jody Goldberg <jgoldberg@home.com>
* src/history.c (history_menu_item_create) : Fix.
* src/stf-parse.c (stf_parse_options_before_modification) : Simplify
for irix compiler.
* src/print-info.c (print_info_new) : cellrange is a ValueRange.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_setup_page_info) : Ditto.
(do_fetch_page_info) : Ditto.
* src/application.c (application_dpi_to_pixels) : return a double.
returning a float caused just enough loss of precision to break
my putrid use of 9pt fonts.
......
2000-07-09 Jody Goldberg <jgoldberg@home.com>
* src/history.c (history_menu_item_create) : Fix.
* src/stf-parse.c (stf_parse_options_before_modification) : Simplify
for irix compiler.
* src/print-info.c (print_info_new) : cellrange is a ValueRange.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_setup_page_info) : Ditto.
(do_fetch_page_info) : Ditto.
* src/application.c (application_dpi_to_pixels) : return a double.
returning a float caused just enough loss of precision to break
my putrid use of 9pt fonts.
......
2000-07-09 Jody Goldberg <jgoldberg@home.com>
* src/history.c (history_menu_item_create) : Fix.
* src/stf-parse.c (stf_parse_options_before_modification) : Simplify
for irix compiler.
* src/print-info.c (print_info_new) : cellrange is a ValueRange.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_setup_page_info) : Ditto.
(do_fetch_page_info) : Ditto.
* src/application.c (application_dpi_to_pixels) : return a double.
returning a float caused just enough loss of precision to break
my putrid use of 9pt fonts.
......
2000-07-09 Jody Goldberg <jgoldberg@home.com>
* src/history.c (history_menu_item_create) : Fix.
* src/stf-parse.c (stf_parse_options_before_modification) : Simplify
for irix compiler.
* src/print-info.c (print_info_new) : cellrange is a ValueRange.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_setup_page_info) : Ditto.
(do_fetch_page_info) : Ditto.
* src/application.c (application_dpi_to_pixels) : return a double.
returning a float caused just enough loss of precision to break
my putrid use of 9pt fonts.
......
2000-07-09 Jody Goldberg <jgoldberg@home.com>
* src/history.c (history_menu_item_create) : Fix.
* src/stf-parse.c (stf_parse_options_before_modification) : Simplify
for irix compiler.
* src/print-info.c (print_info_new) : cellrange is a ValueRange.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_setup_page_info) : Ditto.
(do_fetch_page_info) : Ditto.
* src/application.c (application_dpi_to_pixels) : return a double.
returning a float caused just enough loss of precision to break
my putrid use of 9pt fonts.
......
2000-07-09 Jody Goldberg <jgoldberg@home.com>
* src/history.c (history_menu_item_create) : Fix.
* src/stf-parse.c (stf_parse_options_before_modification) : Simplify
for irix compiler.
* src/print-info.c (print_info_new) : cellrange is a ValueRange.
(save_range) : Ditto.
* src/dialogs/dialog-printer-setup.c (do_setup_page_info) : Ditto.
(do_fetch_page_info) : Ditto.
* src/application.c (application_dpi_to_pixels) : return a double.
returning a float caused just enough loss of precision to break
my putrid use of 9pt fonts.
......
......@@ -611,7 +611,7 @@ cell_is_error (Cell const * cell)
return NULL;
}
inline gboolean
gboolean
cell_is_number (Cell const *cell)
{
/* FIXME : This does not handle arrays or ranges */
......@@ -638,7 +638,7 @@ cell_is_zero (Cell const *cell)
}
}
inline ExprArray const *
ExprArray const *
cell_is_array (Cell const *cell)
{
if (cell != NULL && cell_has_expr (cell) &&
......
......@@ -77,7 +77,7 @@ gtk_combo_box_finalize (GtkObject *object)
gtk_object_destroy
(GTK_OBJECT (combo_box->priv->tearoff_window));
gtk_object_unref
(GTK_OBJECT (combo_box->priv->tearoff_window)); // ??
(GTK_OBJECT (combo_box->priv->tearoff_window)); /* ?? */
}
g_free (combo_box->priv);
......
......@@ -112,7 +112,7 @@ datetime_timet_to_serial_raw (time_t t)
/* ------------------------------------------------------------------------- */
inline int
int
datetime_serial_raw_to_serial (float_t raw)
{
return (int) floor (raw + HALF_SEC);
......@@ -148,7 +148,7 @@ datetime_value_to_g (const Value *v)
/* This is time-only assuming a 24h day. It probably loses completely on */
/* days with summer time ("daylight savings") changes. */
inline int
int
datetime_serial_raw_to_seconds (float_t raw)
{
raw += HALF_SEC;
......
......@@ -1052,7 +1052,7 @@ do_setup_page_info (dialog_print_info_t *dpi)
if (dpi->pi->repeat_top.use){
char *s;
s = value_cellrange_get_as_string (&dpi->pi->repeat_top.range, FALSE);
s = value_cellrange_get_as_string ((Value *)&dpi->pi->repeat_top.range, FALSE);
gtk_entry_set_text (entry_top, s);
g_free (s);
}
......@@ -1060,7 +1060,7 @@ do_setup_page_info (dialog_print_info_t *dpi)
if (dpi->pi->repeat_left.use){
char *s;
s = value_cellrange_get_as_string (&dpi->pi->repeat_left.range, FALSE);
s = value_cellrange_get_as_string ((Value *)&dpi->pi->repeat_left.range, FALSE);
gtk_entry_set_text (entry_left, s);
g_free (s);
}
......@@ -1388,14 +1388,14 @@ do_fetch_page_info (dialog_print_info_t *dpi)
top_range = range_parse (NULL, gtk_entry_get_text (entry_top), TRUE);
if (top_range){
dpi->pi->repeat_top.range = *top_range;
dpi->pi->repeat_top.range = top_range->v_range;
dpi->pi->repeat_top.use = TRUE;
value_release (top_range);
}
left_range = range_parse (NULL, gtk_entry_get_text (entry_left), TRUE);
if (left_range){
dpi->pi->repeat_left.range = *left_range;
dpi->pi->repeat_left.range = left_range->v_range;
dpi->pi->repeat_left.use = TRUE;
value_release (left_range);
}
......
......@@ -323,7 +323,7 @@ function_def_get_name (const FunctionDefinition *fndef)
* 'nodes' function.
*
**/
inline void
void
function_def_count_args (const FunctionDefinition *fndef,
int *min, int *max)
{
......@@ -366,7 +366,7 @@ function_def_count_args (const FunctionDefinition *fndef,
*
* Return value: the type of the argument
**/
inline char
char
function_def_get_arg_type (const FunctionDefinition *fndef,
int arg_idx)
{
......
......@@ -97,11 +97,13 @@ history_menu_item_create (Workbook *wb, gchar *name, gint accel_number,
GtkWidget *menu, gint pos)
{
GnomeUIInfo info[] = {
{ GNOME_APP_UI_ITEM, "", name, file_history_cmd, wb },
{ GNOME_APP_UI_ITEM, NULL, NULL, file_history_cmd, NULL },
GNOMEUIINFO_END
};
info [0].hint = name;
info [0].label = history_item_label (name, accel_number);
info [0].user_data = wb;
#ifndef ENABLE_BONOBO
gnome_app_fill_menu (GTK_MENU_SHELL (menu), info,
......
......@@ -781,7 +781,7 @@ mstyle_verify (const MStyle *style)
return TRUE;
}
gboolean inline
gboolean
mstyle_is_element_set (const MStyle *st, MStyleElementType t)
{
g_return_val_if_fail (st != NULL, FALSE);
......
......@@ -28,7 +28,7 @@
#include "value.h"
#include "ranges.h"
inline EvalPos *
EvalPos *
eval_pos_init (EvalPos *eval_pos, Sheet *sheet, CellPos const *pos)
{
g_return_val_if_fail (eval_pos != NULL, NULL);
......
......@@ -296,14 +296,14 @@ print_info_new (void)
* Load the columns/rows to repeat
*/
if ((cellrange = load_range ("repeat_top_range=")) != NULL){
pi->repeat_top.range = *cellrange;
pi->repeat_top.range = cellrange->v_range;
pi->repeat_top.use = TRUE;
value_release (cellrange);
} else
pi->repeat_top.use = FALSE;
if ((cellrange = load_range ("repeat_left_range=")) != NULL){
pi->repeat_left.range = *cellrange;
pi->repeat_left.range = cellrange->v_range;
pi->repeat_left.use = TRUE;
value_release (cellrange);
} else
......@@ -331,7 +331,7 @@ save_range (const char *section, PrintRepeatRange *repeat)
if (repeat->use){
char *s;
s = value_cellrange_get_as_string (&repeat->range, FALSE);
s = value_cellrange_get_as_string ((Value *)&repeat->range, FALSE);
gnome_config_set_string (section, s);
g_free (s);
} else
......
......@@ -63,7 +63,7 @@ typedef struct {
typedef struct {
gboolean use;
Value range;
ValueRange range;
} PrintRepeatRange;
struct _PrintInformation {
......
......@@ -94,9 +94,9 @@ print_page_repeated_rows (Sheet *sheet,
double print_width, double print_height,
PrintJobInfo *pj)
{
Value *value = &pj->pi->repeat_top.range;
CellRef *cell_a = &value->v_range.cell.a;
CellRef *cell_b = &value->v_range.cell.b;
ValueRange const *value = &pj->pi->repeat_top.range;
CellRef const *cell_a = &value->cell.a;
CellRef const *cell_b = &value->cell.b;
base_y = pj->height - base_y;
......@@ -123,9 +123,9 @@ print_page_repeated_cols (Sheet *sheet,
double print_width, double print_height,
PrintJobInfo *pj)
{
Value *value = &pj->pi->repeat_top.range;
CellRef *cell_a = &value->v_range.cell.a;
CellRef *cell_b = &value->v_range.cell.b;
ValueRange const *value = &pj->pi->repeat_top.range;
CellRef const *cell_a = &value->cell.a;
CellRef const *cell_b = &value->cell.b;
base_y = pj->height - base_y;
......@@ -633,9 +633,9 @@ print_sheet_range (Sheet *sheet, Range r, PrintJobInfo *pj, gboolean output)
static double
print_range_used_units (Sheet *sheet, gboolean compute_rows, PrintRepeatRange *range)
{
Value *cell_range = &range->range;
CellRef *cell_a = &cell_range->v_range.cell.a;
CellRef *cell_b = &cell_range->v_range.cell.b;
ValueRange const *cell_range = &range->range;
CellRef const *cell_a = &cell_range->cell.a;
CellRef const *cell_b = &cell_range->cell.b;
if (compute_rows)
return sheet_row_get_distance_pts
......
......@@ -770,7 +770,7 @@ sheet_compute_visible_ranges (Sheet const *sheet)
* Return value: a (Cell *) containing the Cell, or NULL if
* the cell does not exist
*/
inline Cell *
Cell *
sheet_cell_get (Sheet const *sheet, int col, int row)
{
Cell *cell;
......@@ -795,7 +795,7 @@ sheet_cell_get (Sheet const *sheet, int col, int row)
* Return value: a (Cell *) containing the Cell at col, row.
* If no cell existed at that location before, it is created.
*/
inline Cell *
Cell *
sheet_cell_fetch (Sheet *sheet, int col, int row)
{
Cell *cell;
......
......@@ -209,8 +209,10 @@ stf_parse_options_before_modification (StfParseOptions_t *parseoptions)
/* Copy the old splitpositions into a temporary array so we can compare them later */
parseoptions->oldsplitpositions = g_array_new (FALSE, FALSE, sizeof (int));
for (i = 0; i < parseoptions->splitpositions->len; i++)
g_array_append_val (parseoptions->oldsplitpositions, (int) g_array_index (parseoptions->splitpositions, int, i));
for (i = 0; i < parseoptions->splitpositions->len; i++) {
int idx = g_array_index (parseoptions->splitpositions, int, i);
g_array_append_val (parseoptions->oldsplitpositions, idx);
}
}
/**
......
......@@ -77,7 +77,7 @@ gtk_combo_box_finalize (GtkObject *object)
gtk_object_destroy
(GTK_OBJECT (combo_box->priv->tearoff_window));
gtk_object_unref
(GTK_OBJECT (combo_box->priv->tearoff_window)); // ??
(GTK_OBJECT (combo_box->priv->tearoff_window)); /* ?? */
}
g_free (combo_box->priv);
......
......@@ -77,7 +77,7 @@ gtk_combo_box_finalize (GtkObject *object)
gtk_object_destroy
(GTK_OBJECT (combo_box->priv->tearoff_window));
gtk_object_unref
(GTK_OBJECT (combo_box->priv->tearoff_window)); // ??
(GTK_OBJECT (combo_box->priv->tearoff_window)); /* ?? */
}
g_free (combo_box->priv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment