annotate src/xs_stil.c @ 224:df4cb5115322

Removed duplicate function, more portability cleanups.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 15 Dec 2004 14:23:03 +0000
parents 16e3b2446a73
children 92bad4c7b998
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
103
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS)
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
103
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
4 STIL-database handling functions
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5
103
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
6 Written by Matti "ccr" Hamalainen <ccr@tnsp.org>
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 This program is free software; you can redistribute it and/or modify
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 it under the terms of the GNU General Public License as published by
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 the Free Software Foundation; either version 2 of the License, or
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 (at your option) any later version.
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 This program is distributed in the hope that it will be useful,
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 GNU General Public License for more details.
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 along with this program; if not, write to the Free Software
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 */
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
22 #include "xs_stil.h"
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
23 #include "xs_support.h"
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
24 #include "xs_config.h"
1
183e7cbc1036 Initial revision
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 #include <stdio.h>
223
16e3b2446a73 On some systems stdlib.h has prerequisite of stdio.h, corrected order of
Matti Hamalainen <ccr@tnsp.org>
parents: 214
diff changeset
26 #include <stdlib.h>
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
27 #include <ctype.h>
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
28
103
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
29
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
30 /*
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
31 * Pointer to database in memory
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
32 */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
33 static t_xs_stil_node *xs_stildb = NULL;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
34 static t_xs_stil_node **xs_stildbi = NULL;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
35 static gint xs_stildbn = 0;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
36
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
37
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
38 /*
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
39 * Hash-database handling functions
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
40 */
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
41 t_xs_stil_node *xs_stildb_node_new(void)
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
42 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
43 t_xs_stil_node *pResult;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
44
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
45 /* Allocate memory for new node */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
46 pResult = (t_xs_stil_node *) g_malloc0(sizeof(t_xs_stil_node));
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
47 return pResult;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
48 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
49
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
50
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
51 void xs_stildb_node_free(t_xs_stil_node *pNode)
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
52 {
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
53 gint i;
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
54
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
55 if (pNode)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
56 {
141
7327a985aee8 Typofixes
Matti Hamalainen <ccr@tnsp.org>
parents: 132
diff changeset
57 /* Free subtune information */
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
58 for (i = 0; i < XS_STIL_MAXENTRY; i++)
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
59 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
60 g_free(pNode->subTune[i].pName);
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
61 g_free(pNode->subTune[i].pAuthor);
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
62 g_free(pNode->subTune[i].pInfo);
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
63 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
64
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
65 g_free(pNode->pcFilename);
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
66 g_free(pNode);
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
67 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
68 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
69
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
70
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
71 /*
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
72 * Insert given node to db linked list
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
73 */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
74 #define LPREV (pNode->pPrev)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
75 #define LTHIS (pNode)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
76 #define LNEXT (pNode->pNext)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
77
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
78 void xs_stildb_node_insert(t_xs_stil_node *pNode)
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
79 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
80 if (xs_stildb)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
81 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
82 /* The first node's pPrev points to last node */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
83 LPREV = xs_stildb->pPrev; /* New node's prev = Previous last node */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
84 xs_stildb->pPrev->pNext = pNode; /* Previous last node's next = New node */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
85 xs_stildb->pPrev = pNode; /* New last node = New node */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
86 LNEXT = NULL; /* But next is NULL! */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
87 } else {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
88 xs_stildb = pNode; /* First node ... */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
89 LPREV = pNode; /* ... it's also last */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
90 LNEXT = NULL; /* But next is NULL! */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
91 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
92 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
93
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
95 /*
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
96 * Read database to memory
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
97 */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
98 gint xs_stildb_read(gchar *dbFilename)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
99 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
100 FILE *inFile;
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
101 gchar inLine[XS_BUFSIZE + 10];
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
102 guint lineNum, linePos, eolPos;
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
103 t_xs_stil_node *tmpNode;
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
104 gboolean isError;
110
582d32db824b Removed some debug-vars
Matti Hamalainen <ccr@tnsp.org>
parents: 109
diff changeset
105 gint subEntry;
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
106
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
107 /* Try to open the file */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
108 if ((inFile = fopen(dbFilename, "ra")) == NULL)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
109 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
110 XSERR("Could not open STILDB '%s'\n", dbFilename);
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
111 return -1;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
112 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
113
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
114 /* Read and parse the data */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
115 lineNum = 0;
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
116 isError = FALSE;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
117 tmpNode = NULL;
132
4162a5370b9e Added "seek"-subsong control option, in style of xmms-sidplay.
Matti Hamalainen <ccr@tnsp.org>
parents: 117
diff changeset
118 subEntry = 0;
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
119
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
120 while (!feof(inFile) && !isError)
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
121 {
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
122 fgets(inLine, XS_BUFSIZE, inFile);
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
123 linePos = eolPos = 0;
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
124 xs_findeol(inLine, &eolPos);
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
125 inLine[eolPos] = 0;
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
126 lineNum++;
103
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
127
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
128 switch (inLine[0]) {
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
129 case '/':
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
130 /* Check if we are already parsing entry */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
131 if (tmpNode)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
132 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
133 XSERR("New entry ('%s') before end of current ('%s')! Possibly malformed STIL-file!\n",
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
134 inLine, tmpNode->pcFilename);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
135
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
136 xs_stildb_node_free(tmpNode);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
137 }
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
138
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
139 /* A new node */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
140 tmpNode = xs_stildb_node_new();
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
141 if (tmpNode)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
142 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
143 /* Initialize the node */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
144 tmpNode->pcFilename = g_strdup(inLine);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
145 subEntry = 0;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
146 } else
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
147 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
148 /* Allocation failed */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
149 XSERR("Could not allocate new STILdb-node for '%s'!\n", inLine);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
150 isError = TRUE;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
151 }
103
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
152 break;
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
153
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
154 case '(':
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
155 /* A new sub-entry */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
156 linePos++;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
157 if (inLine[linePos] == '#')
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
158 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
159 linePos++;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
160 if (inLine[linePos])
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
161 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
162 xs_findnum(inLine, &linePos);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
163 inLine[linePos] = 0;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
164 subEntry = atol(&inLine[2]);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
165
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
166 /* Sanity check */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
167 if ((subEntry < 1) || (subEntry >= XS_STIL_MAXENTRY))
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
168 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
169 XSERR("Number of subEntry (%i) for '%s' is invalid\n", subEntry, tmpNode->pcFilename);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
170 subEntry = 0;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
171 }
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
172 }
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
173 }
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
174
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
175 break;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
176
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
177 case 0:
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
178 case '#':
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
179 case '\n':
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
180 case '\r':
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
181 /* End of entry/field */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
182 if (tmpNode)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
183 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
184 /* Insert to database */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
185 xs_stildb_node_insert(tmpNode);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
186 tmpNode = NULL;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
187 }
103
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
188 break;
101
Matti Hamalainen <ccr@tnsp.org>
parents: 99
diff changeset
189
103
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
190 default:
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
191 /* Check if we are parsing an entry */
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
192 if (!tmpNode)
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
193 {
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
194 XSERR("Entry data encountered outside of entry!\n");
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
195 break;
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
196 }
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
197
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
198 /* Some other type */
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
199 if (strncmp(inLine, " NAME:", 8) == 0)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
200 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
201 g_free(tmpNode->subTune[subEntry].pName);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
202 tmpNode->subTune[subEntry].pName = g_strdup(&inLine[9]);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
203 } else
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
204 if (strncmp(inLine, " AUTHOR:", 8) == 0)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
205 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
206 g_free(tmpNode->subTune[subEntry].pAuthor);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
207 tmpNode->subTune[subEntry].pAuthor = g_strdup(&inLine[9]);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
208 } else
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
209 if (strncmp(inLine, " TITLE:", 8) == 0)
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
210 {
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
211 inLine[eolPos++] = '\n';
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
212 inLine[eolPos++] = 0;
224
df4cb5115322 Removed duplicate function, more portability cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 223
diff changeset
213 xs_pstrcat(&(tmpNode->subTune[subEntry].pInfo), &inLine[2]);
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
214 } else
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
215 if (strncmp(inLine, " ARTIST:", 8) == 0)
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
216 {
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
217 inLine[eolPos++] = '\n';
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
218 inLine[eolPos++] = 0;
224
df4cb5115322 Removed duplicate function, more portability cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 223
diff changeset
219 xs_pstrcat(&(tmpNode->subTune[subEntry].pInfo), &inLine[1]);
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
220 } else
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
221 if (strncmp(inLine, "COMMENT:", 8) == 0)
224
df4cb5115322 Removed duplicate function, more portability cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 223
diff changeset
222 xs_pstrcat(&(tmpNode->subTune[subEntry].pInfo), inLine);
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
223 else
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
224 if (strncmp(inLine, " ", 8) == 0)
224
df4cb5115322 Removed duplicate function, more portability cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 223
diff changeset
225 xs_pstrcat(&(tmpNode->subTune[subEntry].pInfo), &inLine[8]);
103
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
226 break;
fe83646e6baa Changed plrFillBuffer()-functions to return actual number of samples computed.
Matti Hamalainen <ccr@tnsp.org>
parents: 101
diff changeset
227 }
101
Matti Hamalainen <ccr@tnsp.org>
parents: 99
diff changeset
228
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
229 } /* while */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
230
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
231 /* Check if there is one remaining node */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
232 if (tmpNode)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
233 xs_stildb_node_free(tmpNode);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
234
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
235 /* Close the file */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
236 fclose(inFile);
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
237 return 0;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
238 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
239
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
240
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
241 /*
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
242 * Compare two nodes' hashes
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
243 */
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
244 gint xs_stildb_cmp(const void *pNode1, const void *pNode2)
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
245 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
246 /* We assume here that we never ever get NULL-pointers or similar */
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
247 return strcmp((*(t_xs_stil_node **) pNode1)->pcFilename,
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
248 (*(t_xs_stil_node **) pNode2)->pcFilename);
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
249 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
250
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
251
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
252 /*
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
253 * Initialize the song-length system
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
254 */
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
255 gint xs_stil_init(void)
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
256 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
257 t_xs_stil_node *pCurr;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
258 gint i;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
259
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
260 XSDEBUG("stil_init()\n");
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
261
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
262 /* Read the database */
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
263 if (!xs_cfg.stilDBPath)
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
264 return -10;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
265
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
266 if (xs_stildb_read(xs_cfg.stilDBPath) < 0)
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
267 return -9;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
268
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
269 XSDEBUG("indexing...\n");
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
270
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
271 /* Get size of db */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
272 pCurr = xs_stildb;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
273 xs_stildbn = 0;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
274 while (pCurr)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
275 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
276 xs_stildbn++;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
277 pCurr = pCurr->pNext;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
278 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
279
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
280 /* Check number of nodes */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
281 if (xs_stildbn > 0)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
282 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
283 /* Allocate memory for index-table */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
284 xs_stildbi = (t_xs_stil_node **) g_malloc(sizeof(t_xs_stil_node *) * xs_stildbn);
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
285 if (!xs_stildbi) return -6;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
286
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
287 /* Get node-pointers to table */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
288 i = 0;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
289 pCurr = xs_stildb;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
290 while (pCurr)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
291 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
292 xs_stildbi[i++] = pCurr;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
293 pCurr = pCurr->pNext;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
294 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
295
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
296 /* Sort the indexes */
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
297 qsort(xs_stildbi, xs_stildbn, sizeof(t_xs_stil_node *), xs_stildb_cmp);
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
298 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
299
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
300 /* OK */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
301 XSDEBUG("init ok.\n");
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
302 return 0;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
303 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
304
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
305
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
306 /*
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
307 * Close song-length system
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
308 */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
309 void xs_stil_close(void)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
310 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
311 t_xs_stil_node *pCurr, *pNext;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
312
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
313 /* Free the memory allocated for database */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
314 XSDEBUG("stildb_close()\n");
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
315 pCurr = xs_stildb;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
316 while (pCurr)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
317 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
318 pNext = pCurr->pNext;
99
2bc56809ec0b STIL-support fixes, variable renaming
Matti Hamalainen <ccr@tnsp.org>
parents: 94
diff changeset
319 xs_stildb_node_free(pCurr);
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
320 pCurr = pNext;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
321 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
322
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
323 xs_stildb = NULL;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
324
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
325 /* Free memory allocated for indexes */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
326 if (xs_stildbi)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
327 {
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
328 g_free(xs_stildbi);
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
329 xs_stildbi = NULL;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
330 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
331 }
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
332
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
333
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
334 /*
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
335 * Get STIL information from database
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
336 */
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
337 t_xs_stil_node * xs_stil_get(gchar *pcFilename)
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
338 {
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
339 gint iStartNode, iEndNode, iQNode, r, i;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
340 gchar *tmpFilename;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
341 gboolean iFound;
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
342 t_xs_stil_node *pResult;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
343
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
344 /* Check the database pointers */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
345 if (!xs_stildb || !xs_stildbi || !xs_cfg.stilDBEnable || !xs_cfg.hvscPath)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
346 return NULL;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
347
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
348 /* Remove postfixed directory separator from HVSC-path */
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
349 tmpFilename = strrchr(xs_cfg.hvscPath, '/');
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
350 if (tmpFilename && (tmpFilename[1] == 0))
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
351 tmpFilename[0] = 0;
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
352
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
353 /* Remove HVSC location-prefix from filename */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
354 tmpFilename = strstr(pcFilename, xs_cfg.hvscPath);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
355 if (tmpFilename)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
356 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
357 tmpFilename += strlen(xs_cfg.hvscPath);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
358 } else
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
359 tmpFilename = pcFilename;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
360
117
453ac1293f6a Fixed severe bug in xs_strmcat()
Matti Hamalainen <ccr@tnsp.org>
parents: 110
diff changeset
361 XSDEBUG("'%s', '%s'\n", xs_cfg.hvscPath, tmpFilename);
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
362
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
363 /* Look-up via index using binary search */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
364 pResult = NULL;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
365 iStartNode = 0;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
366 iEndNode = (xs_stildbn - 1);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
367 iQNode = (iEndNode / 2);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
368 iFound = FALSE;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
369
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
370 while ((!iFound) && ((iEndNode - iStartNode) > 128))
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
371 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
372 r = strcmp(tmpFilename, xs_stildbi[iQNode]->pcFilename);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
373 if (r < 0)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
374 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
375 /* Hash was in the <- LEFT side */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
376 iEndNode = iQNode;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
377 iQNode = iStartNode + ((iEndNode - iStartNode) / 2);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
378 } else
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
379 if (r > 0)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
380 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
381 /* Hash was in the RIGHT -> side */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
382 iStartNode = iQNode;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
383 iQNode = iStartNode + ((iEndNode - iStartNode) / 2);
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
384 } else
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
385 iFound = TRUE;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
386 }
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
387
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
388 /* If not found already */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
389 if (!iFound)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
390 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
391 /* Search the are linearly */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
392 iFound = FALSE;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
393 i = iStartNode;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
394 while ((i <= iEndNode) && (!iFound))
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
395 {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
396 if (strcmp(tmpFilename, xs_stildbi[i]->pcFilename) == 0)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
397 iFound = TRUE;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
398 else
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
399 i++;
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
400 }
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
401
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
402 /* Check the result */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
403 if (iFound)
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
404 pResult = xs_stildbi[i];
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
405
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
406 } else {
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
407 /* Found via binary search */
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
408 pResult = xs_stildbi[iQNode];
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
409 }
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
410
94
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
411 return pResult;
086681f70910 Start of re-write of STIL-support
Matti Hamalainen <ccr@tnsp.org>
parents: 62
diff changeset
412 }
109
578b71b62eeb Fileinfo now basically working, STIL COMMENT-fields are not yet parsed or shown.
Matti Hamalainen <ccr@tnsp.org>
parents: 103
diff changeset
413