Commit 646d7df1 authored by Jeff Garzik's avatar Jeff Garzik Committed by Jeff Garzik

New file import filter for SC and xspread spreadsheets. update prototype

1999-11-21  Jeff Garzik  <jgarzik@mandrakesoft.com>

        * configure.in, plugins/Makefile.am:
        New file import filter for SC and xspread spreadsheets.
        * src/utils.h (parse_cell_name): update prototype
        * src/utils.c (parse_cell_name): return gboolean, to reflect true,
        and documented, nature of return value.
        (parse_cell_name_list): move loop exit condition into 'for' statement
parent b15cfde1
1999-11-21 Jeff Garzik <jgarzik@mandrakesoft.com>
* configure.in, plugins/Makefile.am:
New file import filter for SC and xspread spreadsheets.
* src/utils.h (parse_cell_name): update prototype
* src/utils.c (parse_cell_name): return gboolean, to reflect true,
and documented, nature of return value.
(parse_cell_name_list): move loop exit condition into 'for' statement
1999-11-20 Jody Goldberg <jgoldberg@home.com> 1999-11-20 Jody Goldberg <jgoldberg@home.com>
* src/format.c (format_number) : Handle m, mm as minutes if followed * src/format.c (format_number) : Handle m, mm as minutes if followed
......
1999-11-21 Jeff Garzik <jgarzik@mandrakesoft.com>
* configure.in, plugins/Makefile.am:
New file import filter for SC and xspread spreadsheets.
* src/utils.h (parse_cell_name): update prototype
* src/utils.c (parse_cell_name): return gboolean, to reflect true,
and documented, nature of return value.
(parse_cell_name_list): move loop exit condition into 'for' statement
1999-11-20 Jody Goldberg <jgoldberg@home.com> 1999-11-20 Jody Goldberg <jgoldberg@home.com>
* src/format.c (format_number) : Handle m, mm as minutes if followed * src/format.c (format_number) : Handle m, mm as minutes if followed
......
...@@ -269,6 +269,7 @@ doc/es/Makefile ...@@ -269,6 +269,7 @@ doc/es/Makefile
corba-test/Makefile corba-test/Makefile
plugins/Makefile plugins/Makefile
plugins/sample/Makefile plugins/sample/Makefile
plugins/sc/Makefile
plugins/sylk/Makefile plugins/sylk/Makefile
plugins/excel/Makefile plugins/excel/Makefile
plugins/excel/libole2/Makefile plugins/excel/libole2/Makefile
......
...@@ -19,6 +19,6 @@ endif ...@@ -19,6 +19,6 @@ endif
#SUBDIRS = sample stat excel ff-csv text $(PYTHON) $(PERL) $(GUILE_DIR) xbase #SUBDIRS = sample stat excel ff-csv text $(PYTHON) $(PERL) $(GUILE_DIR) xbase
SUBDIRS = sample stat excel lotus-123 oleo sylk ff-csv text xbase html dif $(PYTHON) $(GUILE_DIR) SUBDIRS = sample stat excel lotus-123 oleo sc sylk ff-csv text xbase html dif $(PYTHON) $(GUILE_DIR)
...@@ -148,7 +148,7 @@ col_from_name (const char *cell_str) ...@@ -148,7 +148,7 @@ col_from_name (const char *cell_str)
* *
* Return value: true if the cell_name could be successfully parsed * Return value: true if the cell_name could be successfully parsed
*/ */
int gboolean
parse_cell_name (const char *cell_str, int *col, int *row) parse_cell_name (const char *cell_str, int *col, int *row)
{ {
char c; char c;
...@@ -275,7 +275,7 @@ parse_cell_name_list (Sheet *sheet, ...@@ -275,7 +275,7 @@ parse_cell_name_list (Sheet *sheet,
g_return_val_if_fail (error_flag != NULL, NULL); g_return_val_if_fail (error_flag != NULL, NULL);
buf = g_malloc (strlen (cell_name_str) + 1); buf = g_malloc (strlen (cell_name_str) + 1);
for (i = n = 0; 1; i++){ for (i = n = 0; cell_name_str [i]; i++){
if ((cell_name_str [i] == ',') || (cell_name_str [i] == '\0')){ if ((cell_name_str [i] == ',') || (cell_name_str [i] == '\0')){
buf [n] = '\0'; buf [n] = '\0';
...@@ -297,9 +297,6 @@ parse_cell_name_list (Sheet *sheet, ...@@ -297,9 +297,6 @@ parse_cell_name_list (Sheet *sheet,
n = 0; n = 0;
} else } else
buf [n++] = cell_name_str [i]; buf [n++] = cell_name_str [i];
if (cell_name_str [i] == '\0')
break;
} }
*error_flag = 0; *error_flag = 0;
......
...@@ -10,7 +10,7 @@ void float_get_from_range (const char *start, const char *end, float_t ...@@ -10,7 +10,7 @@ void float_get_from_range (const char *start, const char *end, float_t
const char *cell_name (int col, int row); const char *cell_name (int col, int row);
/* Various parsing routines */ /* Various parsing routines */
int parse_cell_name (const char *cell_str, int *col, int *row); gboolean parse_cell_name (const char *cell_str, int *col, int *row);
gboolean parse_cell_range (Sheet *sheet, const char *range, Value **v); gboolean parse_cell_range (Sheet *sheet, const char *range, Value **v);
GSList *parse_cell_name_list (Sheet *sheet, const char *cell_name_str, GSList *parse_cell_name_list (Sheet *sheet, const char *cell_name_str,
int *error_flag); int *error_flag);
......
...@@ -148,7 +148,7 @@ col_from_name (const char *cell_str) ...@@ -148,7 +148,7 @@ col_from_name (const char *cell_str)
* *
* Return value: true if the cell_name could be successfully parsed * Return value: true if the cell_name could be successfully parsed
*/ */
int gboolean
parse_cell_name (const char *cell_str, int *col, int *row) parse_cell_name (const char *cell_str, int *col, int *row)
{ {
char c; char c;
...@@ -275,7 +275,7 @@ parse_cell_name_list (Sheet *sheet, ...@@ -275,7 +275,7 @@ parse_cell_name_list (Sheet *sheet,
g_return_val_if_fail (error_flag != NULL, NULL); g_return_val_if_fail (error_flag != NULL, NULL);
buf = g_malloc (strlen (cell_name_str) + 1); buf = g_malloc (strlen (cell_name_str) + 1);
for (i = n = 0; 1; i++){ for (i = n = 0; cell_name_str [i]; i++){
if ((cell_name_str [i] == ',') || (cell_name_str [i] == '\0')){ if ((cell_name_str [i] == ',') || (cell_name_str [i] == '\0')){
buf [n] = '\0'; buf [n] = '\0';
...@@ -297,9 +297,6 @@ parse_cell_name_list (Sheet *sheet, ...@@ -297,9 +297,6 @@ parse_cell_name_list (Sheet *sheet,
n = 0; n = 0;
} else } else
buf [n++] = cell_name_str [i]; buf [n++] = cell_name_str [i];
if (cell_name_str [i] == '\0')
break;
} }
*error_flag = 0; *error_flag = 0;
......
...@@ -10,7 +10,7 @@ void float_get_from_range (const char *start, const char *end, float_t ...@@ -10,7 +10,7 @@ void float_get_from_range (const char *start, const char *end, float_t
const char *cell_name (int col, int row); const char *cell_name (int col, int row);
/* Various parsing routines */ /* Various parsing routines */
int parse_cell_name (const char *cell_str, int *col, int *row); gboolean parse_cell_name (const char *cell_str, int *col, int *row);
gboolean parse_cell_range (Sheet *sheet, const char *range, Value **v); gboolean parse_cell_range (Sheet *sheet, const char *range, Value **v);
GSList *parse_cell_name_list (Sheet *sheet, const char *cell_name_str, GSList *parse_cell_name_list (Sheet *sheet, const char *cell_name_str,
int *error_flag); int *error_flag);
......
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