diff src/xs_title.c @ 657:acaba070cf49

Lots of cosmetic code cleanups; synced the de-gettextification from Audacious-SID, I suppose it makes some sense ...
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 02 Apr 2008 19:46:59 +0300
parents ddae043e8e47
children b0743dc9165d
line wrap: on
line diff
--- a/src/xs_title.c	Wed Mar 26 08:55:29 2008 +0200
+++ b/src/xs_title.c	Wed Apr 02 19:46:59 2008 +0300
@@ -52,25 +52,25 @@
 /* Create a title string based on given information and settings.
  */
 #define VPUTCH(MCH)	\
-	if (iIndex < XS_BUF_SIZE) tmpBuf[iIndex++] = MCH;
+	if (index < XS_BUF_SIZE) tmpBuf[index++] = MCH;
 
 #define VPUTSTR(MSTR) {						\
 	if (MSTR) {						\
-		if ((iIndex + strlen(MSTR) + 1) < XS_BUF_SIZE) {\
-			strcpy(&tmpBuf[iIndex], MSTR);		\
-			iIndex += strlen(MSTR); 		\
+		if ((index + strlen(MSTR) + 1) < XS_BUF_SIZE) {\
+			strcpy(&tmpBuf[index], MSTR);		\
+			index += strlen(MSTR); 		\
 		} else						\
-			iIndex = XS_BUF_SIZE;			\
+			index = XS_BUF_SIZE;			\
 	}							\
 }
 
 
-gchar *xs_make_titlestring(t_xs_tuneinfo *p, gint subTune)
+gchar *xs_make_titlestring(xs_tuneinfo_t *p, gint subTune)
 {
 	gchar *tmpFilename, *tmpFilePath, *tmpFileExt,
-		*pcStr, *pcResult, tmpStr[XS_BUF_SIZE], tmpBuf[XS_BUF_SIZE];
-	t_xs_subtuneinfo *subInfo;
-	gint iIndex;
+		*str, *result, tmpStr[XS_BUF_SIZE], tmpBuf[XS_BUF_SIZE];
+	xs_subtuneinfo_t *subInfo;
+	gint index;
 
 	/* Get filename parts */
 	xs_path_split(p->sidFilename, &tmpFilename,
@@ -107,7 +107,7 @@
 		pTuple->genre = g_strdup("SID-tune");
 		pTuple->comment = g_strdup(p->sidCopyright);
 
-		pcResult = xmms_get_titlestring(xmms_get_gentitle_format(), pTuple);
+		result = xmms_get_titlestring(xmms_get_gentitle_format(), pTuple);
 
 		g_free(pTuple->track_name);
 		g_free(pTuple->album_name);
@@ -120,12 +120,12 @@
 #endif
 	{
 		/* Create the string */
-		pcStr = xs_cfg.titleFormat;
-		iIndex = 0;
-		while (*pcStr && (iIndex < XS_BUF_SIZE)) {
-			if (*pcStr == '%') {
-				pcStr++;
-				switch (*pcStr) {
+		str = xs_cfg.titleFormat;
+		index = 0;
+		while (*str && (index < XS_BUF_SIZE)) {
+			if (*str == '%') {
+				str++;
+				switch (*str) {
 				case '%':
 					VPUTCH('%');
 					break;
@@ -202,20 +202,20 @@
 					break;
 				}
 			} else
-				VPUTCH(*pcStr);
+				VPUTCH(*str);
 
-			pcStr++;
+			str++;
 		}
 
-		tmpBuf[iIndex] = 0;
+		tmpBuf[index] = 0;
 
 		/* Make resulting string */
-		pcResult = g_strdup(tmpBuf);
+		result = g_strdup(tmpBuf);
 	}
 
 	/* Free temporary strings */
 	g_free(tmpFilename);
 	g_free(tmpFilePath);
 
-	return pcResult;
+	return result;
 }