Commit 30dbb121 authored by Arturo Espinosa's avatar Arturo Espinosa
Browse files

Made all of the header inclussion conditionals consistent

parent c9d82c98
...@@ -52,7 +52,7 @@ typedef struct { ...@@ -52,7 +52,7 @@ typedef struct {
typedef GList CellList; typedef GList CellList;
#define CELL_TEXT_GET(cell) ((cell)->text ? cell->text->str : cell->entered_text->str) #define CELL_TEXT_GET(cell) ((cell)->text ? cell->text->str : cell->entered_text->str)
#define CELL_IS_FORMULA(cell) (cell->entered_text->str [0] == '=') #define CELL_IS_FORMULA(cell) ((cell)->entered_text->str [0] == '=')
typedef enum { typedef enum {
CELL_COPY_TYPE_CELL, CELL_COPY_TYPE_CELL,
......
#ifndef CLIPBOARD_H #ifndef GNUMERIC_CLIPBOARD_H
#define CLIPBOARD_H #define GNUMERIC_CLIPBOARD_H
enum { enum {
PASTE_VALUES = 0, PASTE_VALUES = 0,
...@@ -32,4 +32,4 @@ void clipboard_release (CellRegion *region); ...@@ -32,4 +32,4 @@ void clipboard_release (CellRegion *region);
void x_clipboard_bind_workbook (Workbook *wb); void x_clipboard_bind_workbook (Workbook *wb);
#endif #endif /* GNUMERIC_CLIPBOARD_H */
#ifndef COLOR_H #ifndef GNUMERIC_COLOR_H
#define COLOR_H #define GNUMERIC_COLOR_H
void color_init (void); void color_init (void);
...@@ -11,4 +11,4 @@ void color_alloc_gdk (GdkColor *color); ...@@ -11,4 +11,4 @@ void color_alloc_gdk (GdkColor *color);
/* Colors used by any GnumericSheet item */ /* Colors used by any GnumericSheet item */
extern GdkColor gs_white, gs_light_gray, gs_dark_gray, gs_black, gs_red; extern GdkColor gs_white, gs_light_gray, gs_dark_gray, gs_black, gs_red;
#endif #endif /* GNUMERIC_COLOR_H */
#ifndef CURSORS_H #ifndef GNUMERIC_CURSORS_H
#define CURSORS_H #define GNUMERIC_CURSORS_H
typedef struct { typedef struct {
GdkCursor *cursor; GdkCursor *cursor;
...@@ -22,4 +22,4 @@ void cursors_shutdown (void); ...@@ -22,4 +22,4 @@ void cursors_shutdown (void);
#define cursor_set_widget(w,c) \ #define cursor_set_widget(w,c) \
gdk_window_set_cursor (GTK_WIDGET (w)->window, gnumeric_cursors [c].cursor) gdk_window_set_cursor (GTK_WIDGET (w)->window, gnumeric_cursors [c].cursor)
#endif #endif /* GNUMERIC_CURSORS_H */
#ifndef EVAL_H #ifndef GNUMERIC_EVAL_H
#define EVAL_H #define GNUMERIC_EVAL_H
/* /*
* A DependencyRange defines a range of cells whose values * A DependencyRange defines a range of cells whose values
...@@ -50,5 +50,5 @@ void cell_queue_recalc_list (GList *list); ...@@ -50,5 +50,5 @@ void cell_queue_recalc_list (GList *list);
*/ */
void cell_eval (Cell *cell); void cell_eval (Cell *cell);
#endif #endif /* GNUMERIC_EVAL_H */
#ifndef DIALOGS_H #ifndef GNUMERIC_DIALOGS_H
#define DIALOGS_H #define GNUMERIC_DIALOGS_H
void dialog_goto_cell (Workbook *wb); void dialog_goto_cell (Workbook *wb);
void dialog_cell_format (Sheet *sheet); void dialog_cell_format (Sheet *sheet);
...@@ -10,4 +10,4 @@ void dialog_zoom (Sheet *sheet); ...@@ -10,4 +10,4 @@ void dialog_zoom (Sheet *sheet);
char *dialog_query_load_file (void); char *dialog_query_load_file (void);
void dialog_about (void); void dialog_about (void);
#endif #endif /* GNUMERIC_DIALOGS_H */
#ifndef DIALOGS_H #ifndef GNUMERIC_DIALOGS_H
#define DIALOGS_H #define GNUMERIC_DIALOGS_H
void dialog_goto_cell (Workbook *wb); void dialog_goto_cell (Workbook *wb);
void dialog_cell_format (Sheet *sheet); void dialog_cell_format (Sheet *sheet);
...@@ -10,4 +10,4 @@ void dialog_zoom (Sheet *sheet); ...@@ -10,4 +10,4 @@ void dialog_zoom (Sheet *sheet);
char *dialog_query_load_file (void); char *dialog_query_load_file (void);
void dialog_about (void); void dialog_about (void);
#endif #endif /* GNUMERIC_DIALOGS_H */
#ifndef EVAL_H #ifndef GNUMERIC_EVAL_H
#define EVAL_H #define GNUMERIC_EVAL_H
/* /*
* A DependencyRange defines a range of cells whose values * A DependencyRange defines a range of cells whose values
...@@ -50,5 +50,5 @@ void cell_queue_recalc_list (GList *list); ...@@ -50,5 +50,5 @@ void cell_queue_recalc_list (GList *list);
*/ */
void cell_eval (Cell *cell); void cell_eval (Cell *cell);
#endif #endif /* GNUMERIC_EVAL_H */
#ifndef EXPR_H #ifndef GNUMERIC_EXPR_H
#define EXPR_H #define GNUMERIC_EXPR_H
typedef enum { typedef enum {
OPER_EQUAL, OPER_EQUAL,
...@@ -169,4 +169,4 @@ int yyparse (void); ...@@ -169,4 +169,4 @@ int yyparse (void);
void functions_init (void); void functions_init (void);
void constants_init (void); void constants_init (void);
#endif #endif /* GNUMERIC_EXPR_H */
#ifndef FORMAT_H_ #ifndef GNUMERIC_FORMAT_H
#define FORMAT_H_ #define GNUMERIC_FORMAT_H
void format_destroy (StyleFormat *format); void format_destroy (StyleFormat *format);
void format_compile (StyleFormat *format); void format_compile (StyleFormat *format);
...@@ -7,4 +7,4 @@ gchar *format_value (StyleFormat *format, Value *value, StyleColor **color); ...@@ -7,4 +7,4 @@ gchar *format_value (StyleFormat *format, Value *value, StyleColor **color);
void format_color_init (void); void format_color_init (void);
void format_color_shutdown (void); void format_color_shutdown (void);
#endif #endif /* GNUMERIC_FORMAT_H */
#ifndef G_UTILS_H #ifndef GNUMERIC_UTILS_H
#define G_UTILS_H #define GNUMERIC_UTILS_H
/* Gets an integer in the buffer in start to end */ /* Gets an integer in the buffer in start to end */
void int_get_from_range (char *start, char *end, int_t *t); void int_get_from_range (char *start, char *end, int_t *t);
...@@ -11,4 +11,4 @@ char *cellref_name (CellRef *cell_ref, int eval_col, int eval_row); ...@@ -11,4 +11,4 @@ char *cellref_name (CellRef *cell_ref, int eval_col, int eval_row);
int parse_cell_name (char *cell_str, int *col, int *row); int parse_cell_name (char *cell_str, int *col, int *row);
char *col_name (int col); char *col_name (int col);
#endif #endif /* GNUMERIC_UTILS_H */
#ifndef ITEM_BAR_H #ifndef GNUMERIC_ITEM_BAR_H
#define ITEM_BAR_H #define GNUMERIC_ITEM_BAR_H
#define ITEM_BAR(obj) (GTK_CHECK_CAST((obj), item_bar_get_type (), ItemBar)) #define ITEM_BAR(obj) (GTK_CHECK_CAST((obj), item_bar_get_type (), ItemBar))
#define ITEM_BAR_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), item_bar_get_type ())) #define ITEM_BAR_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), item_bar_get_type ()))
...@@ -40,4 +40,4 @@ typedef struct { ...@@ -40,4 +40,4 @@ typedef struct {
void (* size_changed) (ItemBar *, int column, int new_width); void (* size_changed) (ItemBar *, int column, int new_width);
} ItemBarClass; } ItemBarClass;
#endif #endif /* GNUMERIC_ITEM_BAR_H */
#ifndef ITEM_CURSOR_H #ifndef GNUMERIC_ITEM_CURSOR_H
#define ITEM_CURSOR_H #define GNUMERIC_ITEM_CURSOR_H
#define ITEM_CURSOR(obj) (GTK_CHECK_CAST((obj), item_cursor_get_type (), ItemCursor)) #define ITEM_CURSOR(obj) (GTK_CHECK_CAST((obj), item_cursor_get_type (), ItemCursor))
#define ITEM_CURSOR_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), item_cursor_get_type ())) #define ITEM_CURSOR_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), item_cursor_get_type ()))
...@@ -57,5 +57,4 @@ void item_cursor_set_bounds (ItemCursor *item_cursor, ...@@ -57,5 +57,4 @@ void item_cursor_set_bounds (ItemCursor *item_cursor,
void item_cursor_set_visibility (ItemCursor *item_cursor, void item_cursor_set_visibility (ItemCursor *item_cursor,
int visible); int visible);
#endif #endif /* GNUMERIC_ITEM_CURSOR_H */
#ifndef ITEM_EDIT_H #ifndef GNUMERIC_ITEM_EDIT_H
#define ITEM_EDIT_H #define GNUMERIC_ITEM_EDIT_H
#define ITEM_EDIT(obj) (GTK_CHECK_CAST((obj), item_edit_get_type (), ItemEdit)) #define ITEM_EDIT(obj) (GTK_CHECK_CAST((obj), item_edit_get_type (), ItemEdit))
#define ITEM_EDIT_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), item_edit_get_type ())) #define ITEM_EDIT_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), item_edit_get_type ()))
...@@ -29,5 +29,4 @@ typedef struct { ...@@ -29,5 +29,4 @@ typedef struct {
GnomeCanvasItemClass parent_class; GnomeCanvasItemClass parent_class;
} ItemEditClass; } ItemEditClass;
#endif /* GNUMERIC_ITEM_EDIT_H */
#endif
#ifndef ITEM_GRID_H #ifndef GNUMERIC_ITEM_GRID_H
#define ITEM_GRID_H #define GNUMERIC_ITEM_GRID_H
#define ITEM_GRID(obj) (GTK_CHECK_CAST((obj), item_grid_get_type (), ItemGrid)) #define ITEM_GRID(obj) (GTK_CHECK_CAST((obj), item_grid_get_type (), ItemGrid))
#define ITEM_GRID_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), item_grid_get_type ())) #define ITEM_GRID_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), item_grid_get_type ()))
...@@ -40,4 +40,4 @@ typedef struct { ...@@ -40,4 +40,4 @@ typedef struct {
GnomeCanvasItemClass parent_class; GnomeCanvasItemClass parent_class;
} ItemGridClass; } ItemGridClass;
#endif #endif /* GNUMERIC_ITEM_GRID_H */
#ifndef GNUMERIC_NUMBER_MATCH #ifndef GNUMERIC_NUMBER_MATCH_H
#define GNUMERIC_NUMBER_MATCH #define GNUMERIC_NUMBER_MATCH_H
int format_match_define (char *format); int format_match_define (char *format);
void format_match_init (void); void format_match_init (void);
void format_match_finish (void); void format_match_finish (void);
gboolean format_match (char *s, double *v, char **format); gboolean format_match (char *s, double *v, char **format);
#endif #endif /* GNUMERIC_NUMBER_MATCH_H */
#ifndef GNUMERIC_NUMBERS_H
#define GNUMERIC_NUMBERS_H
#ifdef GNUMERIC_USE_GMP #ifdef GNUMERIC_USE_GMP
#include <gmp.h> #include <gmp.h>
...@@ -33,4 +35,4 @@ typedef int int_t; ...@@ -33,4 +35,4 @@ typedef int int_t;
#define mpf_neg(a,b) a = -b #define mpf_neg(a,b) a = -b
#endif #endif
#endif /* GNUMERIC_NUMBERS_H */
...@@ -169,8 +169,6 @@ exp: NUMBER { $$ = $1 } ...@@ -169,8 +169,6 @@ exp: NUMBER { $$ = $1 }
} }
| '(' exp ')' { | '(' exp ')' {
$$ = p_new (ExprTree);
$$->ref_count = 1;
$$ = $2; $$ = $2;
} }
......
#ifndef PATTERN_SELECTOR_H #ifndef GNUMERIC_PATTERN_SELECTOR_H
#define PATTERN_SELECTOR_H #define GNUMERIC_PATTERN_SELECTOR_H
#define PATTERN_SELECTOR_TYPE (pattern_selector_get_type ()) #define PATTERN_SELECTOR_TYPE (pattern_selector_get_type ())
#define PATTERN_SELECTOR(obj) (GTK_CHECK_CAST((obj), PATTERN_SELECTOR_TYPE, PatternSelector)) #define PATTERN_SELECTOR(obj) (GTK_CHECK_CAST((obj), PATTERN_SELECTOR_TYPE, PatternSelector))
...@@ -22,4 +22,4 @@ GtkType pattern_selector_get_type (void); ...@@ -22,4 +22,4 @@ GtkType pattern_selector_get_type (void);
GtkWidget *pattern_selector_new (int pattern); GtkWidget *pattern_selector_new (int pattern);
void pattern_selector_select (PatternSelector *ps, int pattern); void pattern_selector_select (PatternSelector *ps, int pattern);
#endif #endif /* GNUMERIC_PATTERN_SELECTOR_H */
#ifndef GNUMERIC_PIXMAPS_H
#define GNUMERIC_PIXMAPS_H
#include "pixmaps/align-center.xpm" #include "pixmaps/align-center.xpm"
#include "pixmaps/align-left.xpm" #include "pixmaps/align-left.xpm"
#include "pixmaps/align-right.xpm" #include "pixmaps/align-right.xpm"
...@@ -7,3 +10,5 @@ ...@@ -7,3 +10,5 @@
#include "pixmaps/oval.xpm" #include "pixmaps/oval.xpm"
#include "pixmaps/bold.xpm" #include "pixmaps/bold.xpm"
#include "pixmaps/italic.xpm" #include "pixmaps/italic.xpm"
#endif /* GNUMERIC_PIXMAPS_H */
#ifndef _PLUGIN_H #ifndef GNUMERIC_PLUGIN_H
#define _PLUGIN_H #define GNUMERIC_PLUGIN_H
#include <gmodule.h> #include <gmodule.h>
...@@ -24,4 +24,4 @@ PluginData *plugin_load (gchar *filename); ...@@ -24,4 +24,4 @@ PluginData *plugin_load (gchar *filename);
void plugin_unload (PluginData *pd); void plugin_unload (PluginData *pd);
GtkWidget *plugin_manager_new (void); GtkWidget *plugin_manager_new (void);
#endif #endif /* GNUMERIC_PLUGIN_H */
#ifndef RENDER_ASCII_H #ifndef GNUMERIC_RENDER_ASCII_H
#define RENDER_ASCII_H #define GNUMERIC_RENDER_ASCII_H
char *cell_region_render_ascii (CellRegion *cr); char *cell_region_render_ascii (CellRegion *cr);
#endif #endif /* GNUMERIC_RENDER_ASCII_H */
#ifndef SHEET_AUTOFILL #ifndef GNUMERIC_SHEET_AUTOFILL_H
#define SHEET_AUTOFILL #define GNUMERIC_SHEET_AUTOFILL_H
typedef int (*AutofillFunction) (Sheet *sheet, typedef int (*AutofillFunction) (Sheet *sheet,
int base_col, int base_row, int base_col, int base_row,
...@@ -13,4 +13,4 @@ void sheet_autofill (Sheet *sheet, ...@@ -13,4 +13,4 @@ void sheet_autofill (Sheet *sheet,
int w, int h, int w, int h,
int end_col, int end_row); int end_col, int end_row);
#endif #endif /* GNUMERIC_SHEET_AUTOFILL_H */
#ifndef SHEET_VIEW_H #ifndef GNUMERIC_SHEET_VIEW_H
#define SHEET_VIEW_H #define GNUMERIC_SHEET_VIEW_H
#include <gtk/gtktable.h> #include <gtk/gtktable.h>
...@@ -60,4 +60,4 @@ typedef struct { ...@@ -60,4 +60,4 @@ typedef struct {
GtkTableClass parent_class; GtkTableClass parent_class;
} SheetViewClass; } SheetViewClass;
#endif /* SHEET_VIEW_H */ #endif /* GNUMERIC_SHEET_VIEW_H */
#ifndef SHEET_OBJECT_H #ifndef GNUMERIC_SHEET_OBJECT_H
#define SHEET_OBJECT_H #define GNUMERIC_SHEET_OBJECT_H
typedef enum { typedef enum {
SHEET_OBJECT_LINE, SHEET_OBJECT_LINE,
...@@ -59,5 +59,5 @@ void sheet_object_make_current (Sheet *sheet, ...@@ -59,5 +59,5 @@ void sheet_object_make_current (Sheet *sheet,
void sheet_object_register (Sheet *sheet, void sheet_object_register (Sheet *sheet,
SheetObject *object); SheetObject *object);
#endif #endif /* GNUMERIC_SHEET_OBJECT_H */
#ifndef SHEET_VIEW_H #ifndef GNUMERIC_SHEET_VIEW_H
#define SHEET_VIEW_H #define GNUMERIC_SHEET_VIEW_H
#include <gtk/gtktable.h> #include <gtk/gtktable.h>
...@@ -60,4 +60,4 @@ typedef struct { ...@@ -60,4 +60,4 @@ typedef struct {
GtkTableClass parent_class; GtkTableClass parent_class;
} SheetViewClass; } SheetViewClass;
#endif /* SHEET_VIEW_H */ #endif /* GNUMERIC_SHEET_VIEW_H */
...@@ -637,6 +637,14 @@ sheet_set_text (Sheet *sheet, int col, int row, char *str) ...@@ -637,6 +637,14 @@ sheet_set_text (Sheet *sheet, int col, int row, char *str)
text = gtk_entry_get_text (GTK_ENTRY (sheet->workbook->ea_input)); text = gtk_entry_get_text (GTK_ENTRY (sheet->workbook->ea_input));
if (*text == '@'){
char *new_text = g_strdup (text);
*new_text = '=';
gtk_entry_set_text (GTK_ENTRY (sheet->workbook->ea_input), new_text);
g_free (new_text);
}
/* /*
* Figure out if a format matches, and for sanity compare that to * Figure out if a format matches, and for sanity compare that to
* a rendered version of the text, if they compare equally, then * a rendered version of the text, if they compare equally, then
......
#ifndef SHEET_H #ifndef GNUMERIC_SHEET_H
#define SHEET_H #define GNUMERIC_SHEET_H
#define SHEET_MAX_ROWS (16 * 1024) #define SHEET_MAX_ROWS (16 * 1024)
#define SHEET_MAX_COLS 256 #define SHEET_MAX_COLS 256
...@@ -358,5 +358,5 @@ void workbook_feedback_set (Workbook *, ...@@ -358,5 +358,5 @@ void workbook_feedback_set (Workbook *,
void *data); void *data);
extern Workbook *current_workbook; extern Workbook *current_workbook;
#endif #endif /* GNUMERIC_SHEET_H */
#ifndef STRING_H #ifndef GNUMERIC_STRING_H
#define STRING_H #define GNUMERIC_STRING_H
typedef struct { typedef struct {
int ref_count; int ref_count;
...@@ -14,4 +14,4 @@ String *string_ref (String *); ...@@ -14,4 +14,4 @@ String *string_ref (String *);
void string_unref (String *); void string_unref (String *);
void string_unref_ptr (String **); void string_unref_ptr (String **);
#endif #endif /* GNUMERIC_STRING_H */
#ifndef COLOR_H #ifndef GNUMERIC_COLOR_H
#define COLOR_H #define GNUMERIC_COLOR_H
void color_init (void); void color_init (void);
...@@ -11,4 +11,4 @@ void color_alloc_gdk (GdkColor *color); ...@@ -11,4 +11,4 @@ void color_alloc_gdk (GdkColor *color);
/* Colors used by any GnumericSheet item */ /* Colors used by any GnumericSheet item */
extern GdkColor gs_white, gs_light_gray, gs_dark_gray, gs_black, gs_red; extern GdkColor gs_white, gs_light_gray, gs_dark_gray, gs_black, gs_red;
#endif #endif /* GNUMERIC_COLOR_H */
#ifndef SYMBOL_H #ifndef GNUMERIC_SYMBOL_H
#define SYMBOL_H #define GNUMERIC_SYMBOL_H
typedef enum { typedef enum {
SYMBOL_FUNCTION, SYMBOL_FUNCTION,
...@@ -26,4 +26,4 @@ Symbol *symbol_ref_string (char *str); ...@@ -26,4 +26,4 @@ Symbol *symbol_ref_string (char *str);
extern GHashTable *symbol_hash_table; extern GHashTable *symbol_hash_table;
#endif #endif /* GNUMERIC_SYMBOL_H */
#ifndef G_UTILS_H #ifndef GNUMERIC_UTILS_H
#define G_UTILS_H #define GNUMERIC_UTILS_H
/* Gets an integer in the buffer in start to end */ /* Gets an integer in the buffer in start to end */
void int_get_from_range (char *start, char *end, int_t *t); void int_get_from_range (char *start, char *end, int_t *t);
...@@ -11,4 +11,4 @@ char *cellref_name (CellRef *cell_ref, int eval_col, int eval_row); ...@@ -11,4 +11,4 @@ char *cellref_name (CellRef *cell_ref, int eval_col, int eval_row);
int parse_cell_name (char *cell_str, int *col, int *row); int parse_cell_name (char *cell_str, int *col, int *row);
char *col_name (int col); char *col_name (int col);
#endif #endif /* GNUMERIC_UTILS_H */
...@@ -6,12 +6,12 @@ ...@@ -6,12 +6,12 @@
* $Id$ * $Id$
*/ */
#ifndef __GNUMERIC_XML_IO__ #ifndef GNUMERIC_XML_IO_H
#define __GNUMERIC_XML_IO__ #define GNUMERIC_XML_IO_H
Sheet* gnumericReadXmlSheet (const char *filename); Sheet* gnumericReadXmlSheet (const char *filename);
int gnumericWriteXmlSheet (Sheet *sheet, const char *filename); int gnumericWriteXmlSheet (Sheet *sheet, const char *filename);
Workbook* gnumericReadXmlWorkbook (const char *filename); Workbook* gnumericReadXmlWorkbook (const char *filename);
int gnumericWriteXmlWorkbook (Workbook *sheet, const char *filename); int gnumericWriteXmlWorkbook (Workbook *sheet, const char *filename);
#endif /* __GNUMERIC_XML_IO__ */ #endif /* GNUMERIC_XML_IO_H */
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