mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
more cbb-inspired changes
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@327 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
ce94c29335
commit
e8b455feba
@ -39,7 +39,7 @@ INCLPATH = -I/usr/include \
|
||||
# and general brokenness
|
||||
# -I./../lib/libhtmlw
|
||||
|
||||
CFLAGS = -O2 -DCELL_WIDGETS=1
|
||||
CFLAGS = -g -DCELL_WIDGETS=1
|
||||
LFLAGS = -O2
|
||||
LIBS = -lXpm -lXm -lXmu -lXt -lXext -lSM -lICE -lX11 -lpng -ljpeg -lz -lm
|
||||
LIBPATH = -L/lib -L/usr/lib -L/usr/X11R6/lib/.
|
||||
|
19
src/QIFIO.c
19
src/QIFIO.c
@ -874,6 +874,9 @@ char * xaccReadQIFTransList (int fd, Account *acc)
|
||||
* Args: datafile - the file to load the data from *
|
||||
* Return: the struct with the program data in it *
|
||||
\********************************************************************/
|
||||
|
||||
#define STRSTR(x,y) ((NSTRNCMP(x,y)) || (NSTRNCMP((&(x)[1]), y)))
|
||||
|
||||
AccountGroup *
|
||||
xaccReadQIFData( char *datafile )
|
||||
{
|
||||
@ -904,7 +907,7 @@ xaccReadQIFData( char *datafile )
|
||||
grp = mallocAccountGroup();
|
||||
|
||||
while (qifline) {
|
||||
if (NSTRNCMP (qifline, "!Type:Bank")) {
|
||||
if (STRSTR (qifline, "Type:Bank")) {
|
||||
Account *acc = mallocAccount();
|
||||
DEBUG ("got bank\n");
|
||||
|
||||
@ -918,19 +921,19 @@ xaccReadQIFData( char *datafile )
|
||||
continue;
|
||||
} else
|
||||
|
||||
if (NSTRNCMP (qifline, "!Type:Cat")) {
|
||||
if (STRSTR (qifline, "Type:Cat")) {
|
||||
DEBUG ("got category\n");
|
||||
qifline = xaccReadQIFAccList (fd, grp, 1);
|
||||
continue;
|
||||
} else
|
||||
|
||||
if (NSTRNCMP (qifline, "!Type:Class")) {
|
||||
if (STRSTR (qifline, "Type:Class")) {
|
||||
DEBUG ("got class\n");
|
||||
qifline = xaccReadQIFDiscard (fd);
|
||||
continue;
|
||||
} else
|
||||
|
||||
if (NSTRNCMP (qifline, "!Type:Invst")) {
|
||||
if (STRSTR (qifline, "Type:Invst")) {
|
||||
Account *acc = mallocAccount();
|
||||
DEBUG ("got Invst\n");
|
||||
|
||||
@ -944,27 +947,27 @@ xaccReadQIFData( char *datafile )
|
||||
continue;
|
||||
} else
|
||||
|
||||
if (NSTRNCMP (qifline, "!Type:Memorized")) {
|
||||
if (STRSTR (qifline, "Type:Memorized")) {
|
||||
DEBUG ("got memorized\n");
|
||||
qifline = xaccReadQIFDiscard (fd);
|
||||
continue;
|
||||
} else
|
||||
|
||||
if (NSTRNCMP (qifline, "!Option:AutoSwitch")) {
|
||||
if (STRSTR (qifline, "Option:AutoSwitch")) {
|
||||
DEBUG ("got autoswitch on\n");
|
||||
skip = 1;
|
||||
qifline = xaccReadQIFDiscard (fd);
|
||||
continue;
|
||||
} else
|
||||
|
||||
if (NSTRNCMP (qifline, "!Clear:AutoSwitch")) {
|
||||
if (STRSTR (qifline, "Clear:AutoSwitch")) {
|
||||
DEBUG ("got autoswitch clear\n");
|
||||
skip = 0;
|
||||
qifline = xaccReadQIFDiscard (fd);
|
||||
continue;
|
||||
} else
|
||||
|
||||
if (NSTRNCMP (qifline, "!Account")) {
|
||||
if (STRSTR (qifline, "Account")) {
|
||||
if (skip) {
|
||||
/* loop and read all of the account names and descriptions */
|
||||
/* no actual dollar data is expected to be read here ... */
|
||||
|
Loading…
Reference in New Issue
Block a user