Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 627452 | Differences between
and this patch

Collapse All | Expand All

(-)libxlsxwriter-RELEASE_0.7.7/include/xlsxwriter/utility.h (-5 lines)
Lines 156-167 Link Here
156
156
157
/* Use a user defined function to format doubles in sprintf or else a simple
157
/* Use a user defined function to format doubles in sprintf or else a simple
158
 * macro (the default). */
158
 * macro (the default). */
159
#ifdef USE_DOUBLE_FUNCTION
160
int lxw_sprintf_dbl(char *data, double number);
159
int lxw_sprintf_dbl(char *data, double number);
161
#else
162
#define lxw_sprintf_dbl(data, number) \
163
        lxw_snprintf(data, LXW_ATTR_32, "%.16g", number)
164
#endif
165
160
166
/* *INDENT-OFF* */
161
/* *INDENT-OFF* */
167
#ifdef __cplusplus
162
#ifdef __cplusplus
(-)libxlsxwriter-RELEASE_0.7.7/src/utility.c (-2 lines)
Lines 537-543 Link Here
537
 * 123.45. End-users can replace this with something more rigorous if
537
 * 123.45. End-users can replace this with something more rigorous if
538
 * required.
538
 * required.
539
 */
539
 */
540
#ifdef USE_DOUBLE_FUNCTION
541
int
540
int
542
lxw_sprintf_dbl(char *data, double number)
541
lxw_sprintf_dbl(char *data, double number)
543
{
542
{
Lines 552-555 Link Here
552
551
553
    return 0;
552
    return 0;
554
}
553
}
555
#endif
(-)libxlsxwriter-RELEASE_0.7.7/src/worksheet.c (-11 lines)
Lines 2495-2501 Link Here
2495
_write_number_cell(lxw_worksheet *self, char *range,
2495
_write_number_cell(lxw_worksheet *self, char *range,
2496
                   int32_t style_index, lxw_cell *cell)
2496
                   int32_t style_index, lxw_cell *cell)
2497
{
2497
{
2498
#ifdef USE_DOUBLE_FUNCTION
2499
    char data[LXW_ATTR_32];
2498
    char data[LXW_ATTR_32];
2500
2499
2501
    lxw_sprintf_dbl(data, cell->u.number);
2500
    lxw_sprintf_dbl(data, cell->u.number);
Lines 2506-2521 Link Here
2506
                range, style_index, data);
2505
                range, style_index, data);
2507
    else
2506
    else
2508
        fprintf(self->file, "<c r=\"%s\"><v>%s</v></c>", range, data);
2507
        fprintf(self->file, "<c r=\"%s\"><v>%s</v></c>", range, data);
2509
#else
2510
    if (style_index)
2511
        fprintf(self->file,
2512
                "<c r=\"%s\" s=\"%d\"><v>%.16g</v></c>",
2513
                range, style_index, cell->u.number);
2514
    else
2515
        fprintf(self->file,
2516
                "<c r=\"%s\"><v>%.16g</v></c>", range, cell->u.number);
2517
2518
#endif
2519
}
2508
}
2520
2509
2521
/*
2510
/*

Return to bug 627452