annotate Plugins/Input/sid/xs_title.c @ 708:e4069b00b174 trunk

[svn] - fix
author nenolod
date Sun, 26 Feb 2006 15:50:50 -0800
parents 1b82a9932b60
children f12d7e208b43
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
269
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
1 /*
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
2 XMMS-SID - SIDPlay input plugin for X MultiMedia System (XMMS)
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
3
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
4 Titlestring handling
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
5
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
6 Programmed and designed by Matti 'ccr' Hamalainen <ccr@tnsp.org>
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
7 (C) Copyright 1999-2005 Tecnic Software productions (TNSP)
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
8
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
9 This program is free software; you can redistribute it and/or modify
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
10 it under the terms of the GNU General Public License as published by
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
11 the Free Software Foundation; either version 2 of the License, or
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
12 (at your option) any later version.
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
13
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
14 This program is distributed in the hope that it will be useful,
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
17 GNU General Public License for more details.
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
18
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
19 You should have received a copy of the GNU General Public License
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
20 along with this program; if not, write to the Free Software
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
22 */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
23 #include "xs_title.h"
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
24 #include "xs_support.h"
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
25 #include "xs_config.h"
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
26 #include "libaudacious/titlestring.h"
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
27
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
28
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
29 /*
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
30 * Create a title string based on given information and settings.
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
31 */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
32 #define VPUTCH(MCH) \
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
33 if (iIndex < XS_BUF_SIZE) tmpBuf[iIndex++] = MCH;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
34 #define VPUTSTR(MSTR) { \
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
35 if (MSTR) { \
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
36 if ((iIndex + strlen(MSTR) + 1) < XS_BUF_SIZE) { \
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
37 strcpy(&tmpBuf[iIndex], MSTR); \
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
38 iIndex += strlen(MSTR); \
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
39 } else \
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
40 iIndex = XS_BUF_SIZE; \
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
41 } \
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
42 }
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
43
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
44
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
45 gchar *xs_make_titlestring(gchar * pcFilename, gint iSubTune, gint nSubTunes, gint iSidModel,
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
46 const gchar * formatString, const gchar * infoString0,
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
47 const gchar * infoString1, const gchar * infoString2)
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
48 {
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
49 gchar *tmpFilename, *tmpFilePath, *tmpFileExt, *pcStr, *pcResult, tmpStr[XS_BUF_SIZE], tmpBuf[XS_BUF_SIZE];
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
50 gint iIndex;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
51 #ifdef HAVE_XMMSEXTRA
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
52 TitleInput *ptInput;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
53 #endif
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
54
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
55 /* Split the filename into path */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
56 tmpFilePath = g_strdup(pcFilename);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
57 tmpFilename = xs_strrchr(tmpFilePath, '/');
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
58 if (tmpFilename)
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
59 tmpFilename[1] = 0;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
60
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
61 /* Filename */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
62 tmpFilename = xs_strrchr(pcFilename, '/');
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
63 if (tmpFilename)
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
64 tmpFilename = g_strdup(tmpFilename + 1);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
65 else
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
66 tmpFilename = g_strdup(pcFilename);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
67
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
68 tmpFileExt = xs_strrchr(tmpFilename, '.');
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
69 tmpFileExt[0] = 0;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
70
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
71 /* Extension */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
72 tmpFileExt = xs_strrchr(pcFilename, '.');
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
73
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
74
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
75 #ifdef HAVE_XMMSEXTRA
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
76 /* Check if the titles are overridden or not */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
77 if (!xs_cfg.titleOverride) {
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
78 /* Use generic XMMS titles */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
79 /* XMMS_NEW_TITLEINPUT(ptInput);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
80 * We duplicate and add typecast to the code here due to XMMS's braindead headers
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
81 */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
82 ptInput = (TitleInput *) g_malloc0(sizeof(TitleInput));
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
83 ptInput->__size = XMMS_TITLEINPUT_SIZE;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
84 ptInput->__version = XMMS_TITLEINPUT_VERSION;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
85
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
86 /* Create the input fields */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
87 ptInput->file_name = tmpFilename;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
88 ptInput->file_ext = tmpFileExt;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
89 ptInput->file_path = tmpFilePath;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
90
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
91 ptInput->track_name = g_strdup(infoString0);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
92 ptInput->track_number = iSubTune;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
93 ptInput->album_name = NULL;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
94 ptInput->performer = g_strdup(infoString1);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
95 ptInput->date = g_strdup((iSidModel == XS_SIDMODEL_6581) ? "SID6581" : "SID8580");
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
96
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
97 ptInput->year = 0;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
98 ptInput->genre = g_strdup("SID-tune");
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
99 ptInput->comment = g_strdup(infoString2);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
100
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
101 /* Create the string */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
102 pcResult = xmms_get_titlestring(xmms_get_gentitle_format(), ptInput);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
103
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
104 /* Dispose all allocated memory */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
105 g_free(ptInput->track_name);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
106 g_free(ptInput->performer);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
107 g_free(ptInput->comment);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
108 g_free(ptInput->date);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
109 g_free(ptInput->genre);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
110 g_free(ptInput);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
111 } else
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
112 #endif
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
113 {
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
114 /* Create the string */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
115 pcStr = xs_cfg.titleFormat;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
116 iIndex = 0;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
117 while (*pcStr && (iIndex < XS_BUF_SIZE)) {
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
118 if (*pcStr == '%') {
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
119 pcStr++;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
120 switch (*pcStr) {
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
121 case '%':
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
122 VPUTCH('%');
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
123 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
124 case 'f':
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
125 VPUTSTR(tmpFilename);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
126 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
127 case 'F':
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
128 VPUTSTR(tmpFilePath);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
129 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
130 case 'e':
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
131 VPUTSTR(tmpFileExt);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
132 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
133 case 'p':
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
134 VPUTSTR(infoString1);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
135 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
136 case 't':
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
137 VPUTSTR(infoString0);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
138 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
139 case 'c':
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
140 VPUTSTR(infoString2);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
141 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
142 case 's':
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
143 VPUTSTR(formatString);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
144 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
145 case 'm':
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
146 switch (iSidModel) {
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
147 case XS_SIDMODEL_6581:
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
148 VPUTSTR("6581");
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
149 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
150 case XS_SIDMODEL_8580:
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
151 VPUTSTR("8580");
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
152 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
153 default:
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
154 VPUTSTR("Unknown");
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
155 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
156 }
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
157 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
158 case 'n':
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
159 snprintf(tmpStr, XS_BUF_SIZE, "%i", iSubTune);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
160 VPUTSTR(tmpStr);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
161 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
162 case 'N':
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
163 snprintf(tmpStr, XS_BUF_SIZE, "%i", nSubTunes);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
164 VPUTSTR(tmpStr);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
165 break;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
166 }
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
167 } else {
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
168 VPUTCH(*pcStr);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
169 }
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
170 pcStr++;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
171 }
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
172
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
173 tmpBuf[iIndex] = 0;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
174
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
175 /* Make resulting string */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
176 pcResult = g_strdup(tmpBuf);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
177 }
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
178
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
179 /* Free temporary strings */
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
180 g_free(tmpFilename);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
181 g_free(tmpFilePath);
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
182
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
183 return pcResult;
1b82a9932b60 [svn] Import sid plugin. Ported from XMMS by giacomo.
chainsaw
parents:
diff changeset
184 }