Mercurial > hg > xmms-sid
annotate src/xs_title.c @ 618:ddae043e8e47
Remove Audacious related stuff.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sun, 02 Sep 2007 22:00:00 +0000 |
parents | a751d2b85a7d |
children | acaba070cf49 |
rev | line source |
---|---|
217 | 1 /* |
2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS) | |
3 | |
4 Titlestring handling | |
5 | |
324 | 6 Programmed and designed by Matti 'ccr' Hamalainen <ccr@tnsp.org> |
422 | 7 (C) Copyright 1999-2007 Tecnic Software productions (TNSP) |
217 | 8 |
9 This program is free software; you can redistribute it and/or modify | |
10 it under the terms of the GNU General Public License as published by | |
11 the Free Software Foundation; either version 2 of the License, or | |
12 (at your option) any later version. | |
13 | |
14 This program is distributed in the hope that it will be useful, | |
15 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 GNU General Public License for more details. | |
18 | |
412
7f694e5a1493
Updated GNU GPL (new FSF address) and some cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
19 You should have received a copy of the GNU General Public License along |
7f694e5a1493
Updated GNU GPL (new FSF address) and some cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
20 with this program; if not, write to the Free Software Foundation, Inc., |
7f694e5a1493
Updated GNU GPL (new FSF address) and some cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents:
402
diff
changeset
|
21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
217 | 22 */ |
23 #include "xs_title.h" | |
24 #include "xs_support.h" | |
25 #include "xs_config.h" | |
540 | 26 |
618
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
27 |
540 | 28 static void xs_path_split(gchar *path, gchar **tmpFilename, gchar **tmpFilePath, gchar **tmpFileExt) |
29 { | |
30 gchar *tmpStr; | |
31 | |
32 /* Split the filename into path */ | |
33 *tmpFilePath = g_strdup(path); | |
34 tmpStr = xs_strrchr(*tmpFilePath, '/'); | |
35 if (tmpStr) tmpStr[1] = 0; | |
36 | |
37 /* Filename */ | |
38 *tmpFilename = xs_strrchr(path, '/'); | |
39 if (*tmpFilename) | |
40 *tmpFilename = g_strdup(*tmpFilename + 1); | |
41 else | |
42 *tmpFilename = g_strdup(path); | |
43 | |
44 tmpStr = xs_strrchr(*tmpFilename, '.'); | |
45 tmpStr[0] = 0; | |
46 | |
47 /* Extension */ | |
48 *tmpFileExt = xs_strrchr(path, '.'); | |
49 } | |
50 | |
51 | |
618
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
52 /* Create a title string based on given information and settings. |
217 | 53 */ |
54 #define VPUTCH(MCH) \ | |
392
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
377
diff
changeset
|
55 if (iIndex < XS_BUF_SIZE) tmpBuf[iIndex++] = MCH; |
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
377
diff
changeset
|
56 |
217 | 57 #define VPUTSTR(MSTR) { \ |
58 if (MSTR) { \ | |
618
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
59 if ((iIndex + strlen(MSTR) + 1) < XS_BUF_SIZE) {\ |
217 | 60 strcpy(&tmpBuf[iIndex], MSTR); \ |
61 iIndex += strlen(MSTR); \ | |
392
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
377
diff
changeset
|
62 } else \ |
372
1222cff759c6
Titlestring tag %N for number of subtunes; Removed "SID" from SID model
Matti Hamalainen <ccr@tnsp.org>
parents:
359
diff
changeset
|
63 iIndex = XS_BUF_SIZE; \ |
392
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
377
diff
changeset
|
64 } \ |
b09d74eb71e6
Working on getting STIL and SLDB using completely dynamically allocated
Matti Hamalainen <ccr@tnsp.org>
parents:
377
diff
changeset
|
65 } |
217 | 66 |
67 | |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
68 gchar *xs_make_titlestring(t_xs_tuneinfo *p, gint subTune) |
217 | 69 { |
540 | 70 gchar *tmpFilename, *tmpFilePath, *tmpFileExt, |
71 *pcStr, *pcResult, tmpStr[XS_BUF_SIZE], tmpBuf[XS_BUF_SIZE]; | |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
72 t_xs_subtuneinfo *subInfo; |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
73 gint iIndex; |
217 | 74 |
540 | 75 /* Get filename parts */ |
76 xs_path_split(p->sidFilename, &tmpFilename, | |
77 &tmpFilePath, &tmpFileExt); | |
78 | |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
79 /* Get sub-tune information */ |
472 | 80 if ((subTune > 0) && (subTune <= p->nsubTunes)) { |
81 subInfo = &(p->subTunes[subTune - 1]); | |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
82 } else |
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
83 subInfo = NULL; |
217 | 84 |
540 | 85 |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
86 /* Check if the titles are overridden or not */ |
618
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
87 #ifdef HAVE_XMMSEXTRA |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
88 if (!xs_cfg.titleOverride) { |
618
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
89 TitleInput *pTuple; |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
90 |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
91 pTuple = (TitleInput *) g_malloc0(sizeof(TitleInput)); |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
92 pTuple->__size = XMMS_TITLEINPUT_SIZE; |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
93 pTuple->__version = XMMS_TITLEINPUT_VERSION; |
540 | 94 |
618
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
95 /* Create the input fields */ |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
96 pTuple->file_name = tmpFilename; |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
97 pTuple->file_ext = tmpFileExt; |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
98 pTuple->file_path = tmpFilePath; |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
99 |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
100 pTuple->track_name = g_strdup(p->sidName); |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
101 pTuple->track_number = subTune; |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
102 pTuple->album_name = NULL; |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
103 pTuple->performer = g_strdup(p->sidComposer); |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
104 pTuple->date = g_strdup((p->sidModel == XS_SIDMODEL_6581) ? "SID6581" : "SID8580"); |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
105 |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
106 pTuple->year = 0; |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
107 pTuple->genre = g_strdup("SID-tune"); |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
108 pTuple->comment = g_strdup(p->sidCopyright); |
ddae043e8e47
Remove Audacious related stuff.
Matti Hamalainen <ccr@tnsp.org>
parents:
611
diff
changeset
|
109 |
540 | 110 pcResult = xmms_get_titlestring(xmms_get_gentitle_format(), pTuple); |
541
e795d8e73ebc
More Audacious compatibility glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
540
diff
changeset
|
111 |
e795d8e73ebc
More Audacious compatibility glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
540
diff
changeset
|
112 g_free(pTuple->track_name); |
e795d8e73ebc
More Audacious compatibility glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
540
diff
changeset
|
113 g_free(pTuple->album_name); |
e795d8e73ebc
More Audacious compatibility glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
540
diff
changeset
|
114 g_free(pTuple->performer); |
e795d8e73ebc
More Audacious compatibility glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
540
diff
changeset
|
115 g_free(pTuple->date); |
e795d8e73ebc
More Audacious compatibility glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
540
diff
changeset
|
116 g_free(pTuple->genre); |
e795d8e73ebc
More Audacious compatibility glue.
Matti Hamalainen <ccr@tnsp.org>
parents:
540
diff
changeset
|
117 g_free(pTuple->comment); |
540 | 118 g_free(pTuple); |
611
a751d2b85a7d
Merge in Tuple changes from Audacious-SID.
Matti Hamalainen <ccr@tnsp.org>
parents:
541
diff
changeset
|
119 } else |
217 | 120 #endif |
121 { | |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
122 /* Create the string */ |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
123 pcStr = xs_cfg.titleFormat; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
124 iIndex = 0; |
372
1222cff759c6
Titlestring tag %N for number of subtunes; Removed "SID" from SID model
Matti Hamalainen <ccr@tnsp.org>
parents:
359
diff
changeset
|
125 while (*pcStr && (iIndex < XS_BUF_SIZE)) { |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
126 if (*pcStr == '%') { |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
127 pcStr++; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
128 switch (*pcStr) { |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
129 case '%': |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
130 VPUTCH('%'); |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
131 break; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
132 case 'f': |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
133 VPUTSTR(tmpFilename); |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
134 break; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
135 case 'F': |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
136 VPUTSTR(tmpFilePath); |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
137 break; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
138 case 'e': |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
139 VPUTSTR(tmpFileExt); |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
140 break; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
141 case 'p': |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
142 VPUTSTR(p->sidComposer); |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
143 break; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
144 case 't': |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
145 VPUTSTR(p->sidName); |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
146 break; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
147 case 'c': |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
148 VPUTSTR(p->sidCopyright); |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
149 break; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
150 case 's': |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
151 VPUTSTR(p->sidFormat); |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
152 break; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
153 case 'm': |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
154 switch (p->sidModel) { |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
155 case XS_SIDMODEL_6581: |
372
1222cff759c6
Titlestring tag %N for number of subtunes; Removed "SID" from SID model
Matti Hamalainen <ccr@tnsp.org>
parents:
359
diff
changeset
|
156 VPUTSTR("6581"); |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
157 break; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
158 case XS_SIDMODEL_8580: |
372
1222cff759c6
Titlestring tag %N for number of subtunes; Removed "SID" from SID model
Matti Hamalainen <ccr@tnsp.org>
parents:
359
diff
changeset
|
159 VPUTSTR("8580"); |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
160 break; |
479
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
161 case XS_SIDMODEL_ANY: |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
162 VPUTSTR("ANY"); |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
163 break; |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
164 default: |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
165 VPUTSTR("?"); |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
166 break; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
167 } |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
168 break; |
479
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
169 case 'C': |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
170 if (subInfo && (subInfo->tuneSpeed > 0)) { |
479
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
171 switch (subInfo->tuneSpeed) { |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
172 case XS_CLOCK_PAL: |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
173 VPUTSTR("PAL"); |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
174 break; |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
175 case XS_CLOCK_NTSC: |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
176 VPUTSTR("NTSC"); |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
177 break; |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
178 case XS_CLOCK_ANY: |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
179 VPUTSTR("ANY"); |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
180 break; |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
181 case XS_CLOCK_VBI: |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
182 VPUTSTR("VBI"); |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
183 break; |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
184 case XS_CLOCK_CIA: |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
185 VPUTSTR("CIA"); |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
186 break; |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
187 default: |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
188 g_snprintf(tmpStr, XS_BUF_SIZE, |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
189 "%iHz", subInfo->tuneSpeed); |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
190 VPUTSTR(tmpStr); |
99f05a74de5b
Improvements in titlestring handling and information passing in
Matti Hamalainen <ccr@tnsp.org>
parents:
472
diff
changeset
|
191 } |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
192 } else |
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
193 VPUTSTR("?"); |
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
194 break; |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
195 case 'n': |
472 | 196 g_snprintf(tmpStr, XS_BUF_SIZE, "%i", subTune); |
372
1222cff759c6
Titlestring tag %N for number of subtunes; Removed "SID" from SID model
Matti Hamalainen <ccr@tnsp.org>
parents:
359
diff
changeset
|
197 VPUTSTR(tmpStr); |
1222cff759c6
Titlestring tag %N for number of subtunes; Removed "SID" from SID model
Matti Hamalainen <ccr@tnsp.org>
parents:
359
diff
changeset
|
198 break; |
1222cff759c6
Titlestring tag %N for number of subtunes; Removed "SID" from SID model
Matti Hamalainen <ccr@tnsp.org>
parents:
359
diff
changeset
|
199 case 'N': |
402
f997b79a7251
More work on merging of improved STIL/SLDB handling code with completely
Matti Hamalainen <ccr@tnsp.org>
parents:
392
diff
changeset
|
200 g_snprintf(tmpStr, XS_BUF_SIZE, "%i", p->nsubTunes); |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
201 VPUTSTR(tmpStr); |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
202 break; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
203 } |
498 | 204 } else |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
205 VPUTCH(*pcStr); |
498 | 206 |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
207 pcStr++; |
217 | 208 } |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
209 |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
210 tmpBuf[iIndex] = 0; |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
211 |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
212 /* Make resulting string */ |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
213 pcResult = g_strdup(tmpBuf); |
217 | 214 } |
215 | |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
216 /* Free temporary strings */ |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
217 g_free(tmpFilename); |
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
218 g_free(tmpFilePath); |
217 | 219 |
359
b1a858b8cb1a
Re-indentation all (non-generated) code.
Matti Hamalainen <ccr@tnsp.org>
parents:
324
diff
changeset
|
220 return pcResult; |
217 | 221 } |