Commit a951036f authored by Chyla Zbigniew's avatar Chyla Zbigniew
Browse files

Allocate "empty" line by default. (dif_get_line): Fixed typo.


* dif.c
(dif_input_context_new): Allocate "empty" line by default.
(dif_get_line): Fixed typo.
parent 6475408c
2001-05-31 Zbigniew Chyla <cyba@gnome.pl>
* dif.c
(dif_input_context_new): Allocate "empty" line by default.
(dif_get_line): Fixed typo.
2001-05-29 Zbigniew Chyla <cyba@gnome.pl>
* dif.c
......
......@@ -68,9 +68,9 @@ dif_input_context_new (IOContext *io_context, Workbook *wb, char const *file_nam
ctxt->data = data;
ctxt->cur = data;
ctxt->line_no = 1;
ctxt->line = NULL;
ctxt->line = g_malloc (1);
ctxt->line_len = 0;
ctxt->alloc_line_len = -1;
ctxt->alloc_line_len = 0;
ctxt->sheet = workbook_sheet_add (wb, NULL, FALSE);
/* gnumeric_io_progress_message (io_context, _("Reading file..."));
......@@ -114,7 +114,7 @@ dif_get_line (DifInputContext *ctxt)
ctxt->line[ctxt->line_len] = '\0';
if (p == p_limit || (p == p_limit - 1 && (p[0] == '\n' || p[0] == '\r'))) {
ctxt->cur = p;
ctxt->cur = p_limit;
} else if ((p[0] == '\n' && p[1] == '\r') || (p[0] == '\r' && p[1] == '\n')) {
ctxt->cur = p + 2;
} else {
......
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