Make sure we use tabs, not spaces, in the transaction log ()

* src/engine/TransLog.c:  use TABS not SPACES for column separators
	* src/import-export/log-replay/gnc-log-replay.c: use printf
	  so we don't have a tab->space conversion problem like we
	  did in TransLog.c
	  Fixes .



git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13294 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2006-02-19 15:23:15 +00:00
parent 2b266cac25
commit 33133b87f0
3 changed files with 23 additions and 7 deletions
ChangeLog
src
engine
import-export/log-replay

View File

@ -1,3 +1,11 @@
2006-02-19 Derek Atkins <derek@ihtfp.com>
* src/engine/TransLog.c: use TABS not SPACES for column separators
* src/import-export/log-replay/gnc-log-replay.c: use printf
so we don't have a tab->space conversion problem like we
did in TransLog.c
Fixes #331620.
2006-02-18 Derek Atkins <derek@ihtfp.com>
* intl-scm/xgettext.scm: remove the absolute path from filenames

View File

@ -139,12 +139,12 @@ xaccOpenLog (void)
g_free (filename);
g_free (timestamp);
/* use tab-separated fields */
fprintf (trans_log, "mod trans_guid split_guid time_now " \
"date_entered date_posted " \
"acc_guid acc_name num description " \
"notes memo action reconciled " \
"amount value date_reconciled\n");
/* Note: this must match src/import-export/log-replay/gnc-log-replay.c */
fprintf (trans_log, "mod\ttrans_guid\tsplit_guid\ttime_now\t"
"date_entered\tdate_posted\t"
"acc_guid\tacc_name\tnum\tdescription\t"
"notes\tmemo\taction\treconciled\t"
"amount\tvalue\tdate_reconciled\n");
fprintf (trans_log, "-----------------\n");
}

View File

@ -501,8 +501,16 @@ void gnc_file_log_replay (void)
char read_buf[256];
char *read_retval;
FILE *log_file;
char * expected_header = "mod trans_guid split_guid time_now date_entered date_posted acc_guid acc_name num description notes memo action reconciled amount value date_reconciled";
char * record_start_str = "===== START";
/* NOTE: This string must match src/engine/TransLog.c (sans newline) */
char * expected_header_orig = "mod\ttrans_guid\tsplit_guid\ttime_now\t"
"date_entered\tdate_posted\tacc_guid\tacc_name\tnum\tdescription\t"
"notes\tmemo\taction\treconciled\tamount\tvalue\tdate_reconciled";
static char *expected_header = NULL;
/* Use g_strdup_printf so we don't get accidental tab -> space conversion */
if (!expected_header)
expected_header = g_strdup_printf(expected_header_orig);
gnc_set_log_level(GNC_MOD_IMPORT, GNC_LOG_DEBUG);
ENTER(" ");