comparison src/xs_title.c @ 392:b09d74eb71e6

Working on getting STIL and SLDB using completely dynamically allocated structures. Indentation cleanups, etc.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 31 May 2006 10:02:00 +0000
parents 29be09bd9397
children f997b79a7251
comparison
equal deleted inserted replaced
391:3cc7455360ad 392:b09d74eb71e6
28 28
29 /* 29 /*
30 * Create a title string based on given information and settings. 30 * Create a title string based on given information and settings.
31 */ 31 */
32 #define VPUTCH(MCH) \ 32 #define VPUTCH(MCH) \
33 if (iIndex < XS_BUF_SIZE) tmpBuf[iIndex++] = MCH; 33 if (iIndex < XS_BUF_SIZE) tmpBuf[iIndex++] = MCH;
34
34 #define VPUTSTR(MSTR) { \ 35 #define VPUTSTR(MSTR) { \
35 if (MSTR) { \ 36 if (MSTR) { \
36 if ((iIndex + strlen(MSTR) + 1) < XS_BUF_SIZE) { \ 37 if ((iIndex + strlen(MSTR) + 1) < XS_BUF_SIZE) { \
37 strcpy(&tmpBuf[iIndex], MSTR); \ 38 strcpy(&tmpBuf[iIndex], MSTR); \
38 iIndex += strlen(MSTR); \ 39 iIndex += strlen(MSTR); \
39 } else \ 40 } else \
40 iIndex = XS_BUF_SIZE; \ 41 iIndex = XS_BUF_SIZE; \
41 } \ 42 } \
42 } 43 }
43 44
44 45
45 gchar *xs_make_titlestring(gchar * pcFilename, gint iSubTune, gint nSubTunes, gint iSidModel, 46 gchar *xs_make_titlestring(gchar * pcFilename, gint iSubTune, gint nSubTunes, gint iSidModel,
46 const gchar * formatString, const gchar * infoString0, 47 const gchar * formatString, const gchar * infoString0,
47 const gchar * infoString1, const gchar * infoString2) 48 const gchar * infoString1, const gchar * infoString2)
48 { 49 {
49 gchar *tmpFilename, *tmpFilePath, *tmpFileExt, *pcStr, *pcResult, tmpStr[XS_BUF_SIZE], tmpBuf[XS_BUF_SIZE]; 50 gchar *tmpFilename, *tmpFilePath, *tmpFileExt, *pcStr,
51 *pcResult, tmpStr[XS_BUF_SIZE], tmpBuf[XS_BUF_SIZE];
50 gint iIndex; 52 gint iIndex;
51 #ifdef HAVE_XMMSEXTRA 53 #ifdef HAVE_XMMSEXTRA
52 TitleInput *ptInput; 54 TitleInput *ptInput;
53 #endif 55 #endif
54 56