# HG changeset patch # User Matti Hamalainen # Date 1169675885 0 # Node ID 60eedde4c44f9992539c798fb9b147837de88776 # Parent aec9f4beb4012e97fa858a6bbcf4af026e4b5e9c Cleanups diff -r aec9f4beb401 -r 60eedde4c44f src/xs_stil.c --- a/src/xs_stil.c Wed Jan 24 21:57:04 2007 +0000 +++ b/src/xs_stil.c Wed Jan 24 21:58:05 2007 +0000 @@ -156,7 +156,7 @@ { FILE *inFile; gchar inLine[XS_BUF_SIZE + 16]; /* Since we add some chars here and there */ - guint lineNum, linePos, eolPos; + size_t lineNum; t_xs_stil_node *tmpNode; gboolean isError, isMulti; gint subEntry; @@ -176,8 +176,8 @@ tmpNode = NULL; subEntry = 0; - while (!feof(inFile) && !isError) { - fgets(inLine, XS_BUF_SIZE, inFile); + while (!isError && !feof(inFile) && fgets(inLine, XS_BUF_SIZE, inFile)) { + size_t linePos, eolPos; inLine[XS_BUF_SIZE - 1] = 0; linePos = eolPos = 0; xs_findeol(inLine, &eolPos); @@ -292,7 +292,7 @@ break; } - } /* while */ + } /* while */ /* Check if there is one remaining node */ if (tmpNode) @@ -535,6 +535,8 @@ } else tmpFilename = pcFilename; + XSDEBUG("xs_stil_get('%s') = '%s'\n", pcFilename, tmpFilename); + pResult = xs_stildb_get_node(xs_stildb_db, tmpFilename); } else pResult = NULL;