Commit d95baa6f authored by Arturo Espinosa's avatar Arturo Espinosa
Browse files

Minimal fixes + fix the last header cleanup errors

parent 61351870
1998-09-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/format.c (append_year): Year 2000 fix :-).
* src/cell.c (cell_set_text_simple): Fix, use localeconv
information to figure out if the text is a number or not.
1998-09-30 Havoc Pennington <hp@pobox.com>
* src/dialog-cell-format.c (color_pick_change_notify): Change args
......
1998-09-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/format.c (append_year): Year 2000 fix :-).
* src/cell.c (cell_set_text_simple): Fix, use localeconv
information to figure out if the text is a number or not.
1998-09-30 Havoc Pennington <hp@pobox.com>
* src/dialog-cell-format.c (color_pick_change_notify): Change args
......
1998-09-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/format.c (append_year): Year 2000 fix :-).
* src/cell.c (cell_set_text_simple): Fix, use localeconv
information to figure out if the text is a number or not.
1998-09-30 Havoc Pennington <hp@pobox.com>
* src/dialog-cell-format.c (color_pick_change_notify): Change args
......
1998-09-30 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/format.c (append_year): Year 2000 fix :-).
* src/cell.c (cell_set_text_simple): Fix, use localeconv
information to figure out if the text is a number or not.
1998-09-30 Havoc Pennington <hp@pobox.com>
* src/dialog-cell-format.c (color_pick_change_notify): Change args
......
......@@ -252,6 +252,8 @@ cell_render_value (Cell *cell)
void
cell_set_text_simple (Cell *cell, char *text)
{
struct lconv *lconv;
g_return_if_fail (cell != NULL);
g_return_if_fail (text != NULL);
......@@ -279,6 +281,8 @@ cell_set_text_simple (Cell *cell, char *text)
int is_text, is_float, maybe_float, has_digits;
char *p;
lconv = localeconv ();
is_text = is_float = maybe_float = has_digits = FALSE;
for (p = text; *p && !is_text; p++){
switch (*p){
......@@ -292,9 +296,15 @@ cell_set_text_simple (Cell *cell, char *text)
break;
/* falldown */
case 'E': case 'e': case '+': case ':': case '.':
case 'E': case 'e': case '+': case ':': case '.': case ',':
if (*p == ',' || *p == '.')
if (lconv->decimal_point != *p){
is_text = TRUE;
break;
}
maybe_float = TRUE;
break;
default:
is_text = TRUE;
}
......
......@@ -2,7 +2,7 @@
* Clipboard.c: Implements the copy/paste operations
*
* Author:
* MIguel de Icaza (miguel@gnu.org)
* Miguel de Icaza (miguel@gnu.org)
*
*/
#include <config.h>
......
......@@ -79,8 +79,8 @@ do_roundup (GString *string)
* Parses the year field at the beginning of the format. Returns the
* number of characters used.
*/
static
int append_year (GString *string, gchar *format, struct tm *time_split)
static int
append_year (GString *string, gchar *format, struct tm *time_split)
{
char temp [5];
......@@ -90,7 +90,10 @@ int append_year (GString *string, gchar *format, struct tm *time_split)
}
if (format [2] != 'y' || format [3] != 'y'){
sprintf (temp, "%02d", time_split->tm_year);
if (time_split->tm_year > 99)
sprintf (temp, "%04d", time_split + 1900);
else
sprintf (temp, "%02d", time_split->tm_year);
g_string_append (string, temp);
return 2;
}
......
#ifndef GNUMERIC_SHEET_H
#define GNUMERIC_SHEET_H
#ifndef GNUMERIC_GNUMERIC_SHEET_H
#define GNUMERIC_GNUMERIC_SHEET_H
#include "item-grid.h"
#include "item-cursor.h"
......@@ -75,6 +75,6 @@ void gnumeric_sheet_destroy_editing_cursor (GnumericSheet *gsheet);
typedef struct {
GnomeCanvasClass parent_class;
} GnumericSheetClass;
#endif
#endif /* GNUMERIC_GNUMERIC_SHEET_H */
#ifndef GNUMERIC_SHEET_H
#define GNUMERIC_SHEET_H
#ifndef GNUMERIC_GNUMERIC_SHEET_H
#define GNUMERIC_GNUMERIC_SHEET_H
#include "item-grid.h"
#include "item-cursor.h"
......@@ -75,6 +75,6 @@ void gnumeric_sheet_destroy_editing_cursor (GnumericSheet *gsheet);
typedef struct {
GnomeCanvasClass parent_class;
} GnumericSheetClass;
#endif
#endif /* GNUMERIC_GNUMERIC_SHEET_H */
#ifndef GNUMERIC_UTIL_H
#define GNUMERIC_UTIL_H
#ifndef GNUMERIC_GNUMERIC_UTIL_H
#define GNUMERIC_GNUMERIC_UTIL_H
void gnumeric_notice (char *str);
......@@ -13,4 +13,4 @@ void gtk_radio_button_select (GSList *group, int n);
char *font_get_bold_name (char *fontname);
char *font_get_italic_name (char *fontname);
char *font_change_component (char *fontname, int idx, char *value);
#endif
#endif /* GNUMERIC_GNUMERIC_UTIL_H */
#ifndef GNUMERIC_UTIL_H
#define GNUMERIC_UTIL_H
#ifndef GNUMERIC_GNUMERIC_UTIL_H
#define GNUMERIC_GNUMERIC_UTIL_H
void gnumeric_notice (char *str);
......@@ -13,4 +13,4 @@ void gtk_radio_button_select (GSList *group, int n);
char *font_get_bold_name (char *fontname);
char *font_get_italic_name (char *fontname);
char *font_change_component (char *fontname, int idx, char *value);
#endif
#endif /* GNUMERIC_GNUMERIC_UTIL_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