Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
gnumeric
Commits
12622861
Commit
12622861
authored
Apr 30, 1999
by
Morten Welinder
Browse files
Fix interdependent header files.
parent
780daecf
Changes
55
Hide whitespace changes
Inline
Side-by-side
ChangeLog-1999-07-09
View file @
12622861
1999-04-30 Morten Welinder <terra@diku.dk>
* src/*.h: Properly forward-declare structures. Include
dependencies. Change the occasional "void *" to its right
type.
* src/*.[cy]: Include more dependencies.
* src/sheet.c (sheet_delete_row): Remove from workbook hash also.
1999-04-29 Morten Welinder <terra@diku.dk>
...
...
ChangeLog-2000-02-23
View file @
12622861
1999-04-30 Morten Welinder <terra@diku.dk>
* src/*.h: Properly forward-declare structures. Include
dependencies. Change the occasional "void *" to its right
type.
* src/*.[cy]: Include more dependencies.
* src/sheet.c (sheet_delete_row): Remove from workbook hash also.
1999-04-29 Morten Welinder <terra@diku.dk>
...
...
OChangeLog-1999-07-09
View file @
12622861
1999-04-30 Morten Welinder <terra@diku.dk>
* src/*.h: Properly forward-declare structures. Include
dependencies. Change the occasional "void *" to its right
type.
* src/*.[cy]: Include more dependencies.
* src/sheet.c (sheet_delete_row): Remove from workbook hash also.
1999-04-29 Morten Welinder <terra@diku.dk>
...
...
OChangeLog-2000-02-23
View file @
12622861
1999-04-30 Morten Welinder <terra@diku.dk>
* src/*.h: Properly forward-declare structures. Include
dependencies. Change the occasional "void *" to its right
type.
* src/*.[cy]: Include more dependencies.
* src/sheet.c (sheet_delete_row): Remove from workbook hash also.
1999-04-29 Morten Welinder <terra@diku.dk>
...
...
src/cell.c
View file @
12622861
...
...
@@ -13,6 +13,7 @@
#include
"format.h"
#include
"color.h"
#include
"cursors.h"
#include
"utils.h"
static
int
redraws_frozen
=
0
;
static
GHashTable
*
cell_hash_queue
;
...
...
@@ -1408,11 +1409,10 @@ str_trim_spaces (char *s)
* Returns the number of columns used for the draw
*/
int
cell_draw
(
Cell
*
cell
,
void
*
sv
,
GdkGC
*
gc
,
GdkDrawable
*
drawable
,
int
x1
,
int
y1
)
cell_draw
(
Cell
*
cell
,
SheetView
*
sheet_view
,
GdkGC
*
gc
,
GdkDrawable
*
drawable
,
int
x1
,
int
y1
)
{
Style
*
style
=
cell
->
style
;
GdkFont
*
font
=
style
->
font
->
font
;
SheetView
*
sheet_view
=
sv
;
GdkGC
*
white_gc
=
GTK_WIDGET
(
sheet_view
->
sheet_view
)
->
style
->
white_gc
;
GdkRectangle
rect
;
...
...
src/cell.h
View file @
12622861
#ifndef GNUMERIC_CELL_H
#define GNUMERIC_CELL_H
/* Forward references for structures. */
typedef
struct
_Cell
Cell
;
typedef
struct
_CellRegion
CellRegion
;
typedef
GList
CellList
;
typedef
struct
_ColRowInfo
ColRowInfo
;
#include
"style.h"
#include
"sheet.h"
#include
"sheet-view.h"
#include
"str.h"
#include
"expr.h"
typedef
unsigned
char
ColType
;
typedef
unsigned
short
RowType
;
typedef
struct
{
struct
_ColRowInfo
{
int
pos
;
/* the column or row number */
/* The height */
...
...
@@ -15,7 +27,7 @@ typedef struct {
unsigned
int
hard_size
:
1
;
/* has the user explicitly set the dimensions? */
void
*
data
;
}
ColRowInfo
;
};
#define COL_INTERNAL_WIDTH(col) ((col)->pixels - ((col)->margin_b + (col)->margin_a))
#define ROW_INTERNAL_HEIGHT(row) ((row)->pixels - ((row)->margin_b + (row)->margin_a))
...
...
@@ -51,8 +63,8 @@ typedef struct {
*
* Definition of a Gnumeric Cell
*/
typedef
struct
{
void
*
sheet
;
struct
_Cell
{
Sheet
*
sheet
;
ColRowInfo
*
col
;
ColRowInfo
*
row
;
...
...
@@ -74,9 +86,7 @@ typedef struct {
CellComment
*
comment
;
int
flags
;
char
generation
;
}
Cell
;
typedef
GList
CellList
;
};
/* #define CELL_TEXT_GET(cell) ((cell)->text ? cell->text->str : cell->entered_text->str) */
#define CELL_IS_FORMAT_SET(cell) ((cell)->flags & CELL_FORMAT_SET)
...
...
@@ -97,10 +107,10 @@ typedef struct {
typedef
GList
CellCopyList
;
typedef
struct
{
struct
_CellRegion
{
int
cols
,
rows
;
CellCopyList
*
list
;
}
CellRegion
;
};
char
*
value_format
(
Value
*
value
,
StyleFormat
*
format
,
char
**
color
);
...
...
@@ -148,7 +158,7 @@ void cell_formula_changed (Cell *cell);
void
cell_queue_redraw
(
Cell
*
cell
);
int
cell_get_horizontal_align
(
const
Cell
*
cell
);
int
cell_draw
(
Cell
*
cell
,
void
*
sheet_view
,
int
cell_draw
(
Cell
*
cell
,
SheetView
*
sheet_view
,
GdkGC
*
gc
,
GdkDrawable
*
drawable
,
int
x
,
int
y
);
...
...
@@ -177,4 +187,3 @@ void row_init_span (ColRowInfo *ri);
void
row_destroy_span
(
ColRowInfo
*
ri
);
#endif
/* GNUMERIC_CELL_H */
src/dependent.h
View file @
12622861
#ifndef GNUMERIC_EVAL_H
#define GNUMERIC_EVAL_H
#include
"sheet.h"
#include
"cell.h"
/*
* A DependencyRange defines a range of cells whose values
* are used by another Cell in the spreadsheet.
...
...
src/dialog-cell-sort.c
View file @
12622861
...
...
@@ -13,6 +13,7 @@
#include
"dialogs.h"
#include
"cell.h"
#include
"expr.h"
#include
"utils.h"
typedef
struct
{
GtkWidget
*
parent
;
...
...
src/dialog-goal-seek.c
View file @
12622861
...
...
@@ -16,7 +16,7 @@
#include
"cell.h"
#include
"expr.h"
#include
"eval.h"
#include
"utils.h"
#define MAX_CELL_NAME_LEN 20
...
...
src/dialog-solver.c
View file @
12622861
...
...
@@ -12,7 +12,7 @@
#include
"gnumeric-util.h"
#include
"dialogs.h"
#include
"func.h"
#include
"utils.h"
/* Different constraint types */
static
const
char
*
constraint_strs
[]
=
{
...
...
src/dialogs.h
View file @
12622861
#ifndef GNUMERIC_DIALOGS_H
#define GNUMERIC_DIALOGS_H
#include
"sheet.h"
#include
"cell.h"
void
dialog_goto_cell
(
Workbook
*
wb
);
void
dialog_cell_format
(
Workbook
*
wb
,
Sheet
*
sheet
);
int
dialog_paste_special
(
Workbook
*
wb
);
...
...
src/dialogs/dialog-cell-sort.c
View file @
12622861
...
...
@@ -13,6 +13,7 @@
#include
"dialogs.h"
#include
"cell.h"
#include
"expr.h"
#include
"utils.h"
typedef
struct
{
GtkWidget
*
parent
;
...
...
src/dialogs/dialog-goal-seek.c
View file @
12622861
...
...
@@ -16,7 +16,7 @@
#include
"cell.h"
#include
"expr.h"
#include
"eval.h"
#include
"utils.h"
#define MAX_CELL_NAME_LEN 20
...
...
src/dialogs/dialog-solver.c
View file @
12622861
...
...
@@ -12,7 +12,7 @@
#include
"gnumeric-util.h"
#include
"dialogs.h"
#include
"func.h"
#include
"utils.h"
/* Different constraint types */
static
const
char
*
constraint_strs
[]
=
{
...
...
src/dialogs/dialogs.h
View file @
12622861
#ifndef GNUMERIC_DIALOGS_H
#define GNUMERIC_DIALOGS_H
#include
"sheet.h"
#include
"cell.h"
void
dialog_goto_cell
(
Workbook
*
wb
);
void
dialog_cell_format
(
Workbook
*
wb
,
Sheet
*
sheet
);
int
dialog_paste_special
(
Workbook
*
wb
);
...
...
src/dump.c
View file @
12622861
...
...
@@ -3,6 +3,8 @@
#include
<stdio.h>
#include
"gnumeric.h"
#include
"dump.h"
#include
"symbol.h"
#include
"func.h"
static
FILE
*
output_file
;
...
...
src/eval.h
View file @
12622861
#ifndef GNUMERIC_EVAL_H
#define GNUMERIC_EVAL_H
#include
"sheet.h"
#include
"cell.h"
/*
* A DependencyRange defines a range of cells whose values
* are used by another Cell in the spreadsheet.
...
...
src/expr.c
View file @
12622861
...
...
@@ -13,6 +13,7 @@
#include
"eval.h"
#include
"format.h"
#include
"func.h"
#include
"utils.h"
ExprTree
*
expr_parse_string
(
const
char
*
expr
,
Sheet
*
sheet
,
int
col
,
int
row
,
...
...
src/expr.h
View file @
12622861
#ifndef GNUMERIC_EXPR_H
#define GNUMERIC_EXPR_H
/* Forward reference. We should probably just include sheet.h to get this. */
struct
_Sheet
;
/* Forward references for structures. */
typedef
struct
_Value
Value
;
typedef
struct
_ExprTree
ExprTree
;
typedef
struct
_CellRef
CellRef
;
#include
"sheet.h"
#include
"symbol.h"
#include
"numbers.h"
#include
"str.h"
typedef
enum
{
OPER_EQUAL
,
/* Compare value equal */
...
...
@@ -41,15 +48,15 @@ typedef enum {
VALUE_ARRAY
,
}
ValueType
;
typedef
struct
{
struct
_
Sheet
*
sheet
;
struct
_CellRef
{
Sheet
*
sheet
;
int
col
,
row
;
unsigned
int
col_relative
:
1
;
unsigned
int
row_relative
:
1
;
}
CellRef
;
};
typedef
struct
_Value
{
struct
_Value
{
ValueType
type
;
union
{
CellRef
cell
;
...
...
@@ -60,19 +67,19 @@ typedef struct _Value {
struct
{
int
x
,
y
;
struct
_
Value
**
vals
;
/* Array [x][y] */
Value
**
vals
;
/* Array [x][y] */
}
array
;
String
*
str
;
Symbol
*
sym
;
float_t
v_float
;
/* floating point */
int_t
v_int
;
}
v
;
}
Value
;
};
#define VALUE_IS_NUMBER(x) (((x)->type == VALUE_INTEGER) || \
((x)->type == VALUE_FLOAT))
struct
ExprTree
{
struct
_
ExprTree
{
Operation
oper
;
int
ref_count
;
...
...
@@ -85,18 +92,16 @@ struct ExprTree {
}
function
;
struct
{
struct
ExprTree
*
value_a
;
struct
ExprTree
*
value_b
;
ExprTree
*
value_a
;
ExprTree
*
value_b
;
}
binary
;
struct
ExprTree
*
value
;
ExprTree
*
value
;
CellRef
ref
;
}
u
;
};
typedef
struct
ExprTree
ExprTree
;
typedef
enum
{
PARSE_OK
,
PARSE_ERR_NO_QUOTE
,
...
...
@@ -135,7 +140,7 @@ struct FunctionDefinition {
char
*
args
;
char
*
named_arguments
;
char
**
help
;
Value
*
(
*
expr_fn
)(
struct
_
Sheet
*
sheet
,
GList
*
expr_node_list
,
int
eval_col
,
int
eval_row
,
char
**
error_string
);
Value
*
(
*
expr_fn
)(
Sheet
*
sheet
,
GList
*
expr_node_list
,
int
eval_col
,
int
eval_row
,
char
**
error_string
);
Value
*
(
*
fn
)(
struct
FunctionDefinition
*
func_def
,
Value
*
argv
[],
char
**
error_string
);
};
...
...
@@ -146,30 +151,30 @@ void cell_get_abs_col_row (const CellRef *cell_ref,
int
eval_col
,
int
eval_row
,
int
*
col
,
int
*
row
);
ExprTree
*
expr_parse_string
(
const
char
*
expr
,
struct
_
Sheet
*
sheet
,
int
col
,
int
row
,
ExprTree
*
expr_parse_string
(
const
char
*
expr
,
Sheet
*
sheet
,
int
col
,
int
row
,
const
char
**
desired_format
,
char
**
error_msg
);
/* In parser.y */
ParseErr
gnumeric_expr_parser
(
const
char
*
expr
,
struct
_
Sheet
*
sheet
,
ParseErr
gnumeric_expr_parser
(
const
char
*
expr
,
Sheet
*
sheet
,
int
col
,
int
row
,
const
char
**
desired_format
,
ExprTree
**
tree
);
ExprTree
*
expr_tree_duplicate
(
ExprTree
*
expr
);
ExprTree
*
expr_tree_relocate
(
ExprTree
*
expr
,
int
col_diff
,
int
row_diff
);
char
*
expr_decode_tree
(
ExprTree
*
tree
,
struct
_
Sheet
*
sheet
,
char
*
expr_decode_tree
(
ExprTree
*
tree
,
Sheet
*
sheet
,
int
col
,
int
row
);
void
expr_tree_ref
(
ExprTree
*
tree
);
void
expr_tree_unref
(
ExprTree
*
tree
);
ExprTree
*
expr_tree_invalidate_references
(
ExprTree
*
src
,
struct
_
Sheet
*
sheet
,
ExprTree
*
expr_tree_invalidate_references
(
ExprTree
*
src
,
Sheet
*
sheet
,
int
src_col
,
int
src_row
,
int
col
,
int
row
,
int
colcount
,
int
rowcount
);
ExprTree
*
expr_tree_fixup_references
(
ExprTree
*
src
,
struct
_
Sheet
*
sheet
,
ExprTree
*
expr_tree_fixup_references
(
ExprTree
*
src
,
Sheet
*
sheet
,
int
src_col
,
int
src_row
,
int
col
,
int
row
,
int
coldelta
,
int
rowdelta
);
Value
*
eval_expr
(
struct
_
Sheet
*
sheet
,
ExprTree
*
tree
,
Value
*
eval_expr
(
Sheet
*
sheet
,
ExprTree
*
tree
,
int
col
,
int
row
,
char
**
error_string
);
...
...
src/file.h
View file @
12622861
#ifndef GNUMERIC_FILE_H
#define GNUMERIC_FILE_H
#include
"sheet.h"
typedef
gboolean
(
*
FileFormatProbe
)(
const
char
*
filename
);
typedef
Workbook
*
(
*
FileFormatOpen
)
(
const
char
*
filename
);
typedef
int
(
*
FileFormatSave
)
(
Workbook
*
wb
,
const
char
*
filename
);
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment