~motumedia/xine-ui/ubuntu

« back to all changes in this revision

Viewing changes to src/xitk/xine-toolkit/skin.c

  • Committer: Reinhard Tartler
  • Date: 2007-01-30 10:33:18 UTC
  • mfrom: (2541.1.34 xine-ui.0.99.4+cvs)
  • Revision ID: siretart@tauware.de-20070130103318-evmro8n4ydtj3cwb
merge debian changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 * along with this program; if not, write to the Free Software
18
18
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
19
19
 *
20
 
 * $Id: skin.c,v 1.39 2006/05/22 17:53:26 mshopf Exp $
 
20
 * $Id: skin.c,v 1.40 2006/07/15 20:26:20 dgp85 Exp $
21
21
 *
22
22
 */
23
23
#ifdef HAVE_CONFIG_H
31
31
#include <pthread.h>
32
32
#include <errno.h>
33
33
 
 
34
#include "utils.h"
34
35
#include "_xitk.h"
35
36
 
36
37
#undef DEBUG_SKIN
148
149
                snprintf(ppath, sizeof(ppath), "%s", skonfig->path);
149
150
                if((z = strrchr(ppath, '/')) != NULL) {
150
151
                  *z = '\0';
151
 
                  strcat(buf2, ppath);
 
152
                  strlcat(buf2, ppath, sizeof(buf2));
152
153
                }
153
154
              }
154
155
            }
155
156
            else if(!strncmp("SKIN_VERSION", var, strlen(var))) {
156
157
              if(skonfig->version >= 0)
157
 
                sprintf(buf2+strlen(buf2), "%d", skonfig->version);
 
158
                snprintf(buf2+strlen(buf2), sizeof(buf2)-strlen(buf2), "%d", skonfig->version);
158
159
            }
159
160
            else if(!strncmp("SKIN_AUTHOR", var, strlen(var))) {
160
161
              if(skonfig->author)
161
 
                strcat(buf2, skonfig->author);
 
162
                strlcat(buf2, skonfig->author, sizeof(buf2));
162
163
            }
163
164
            else if(!strncmp("SKIN_PATH", var, strlen(var))) {
164
165
              if(skonfig->path)
165
 
                strcat(buf2, skonfig->path);
 
166
                strlcat(buf2, skonfig->path, sizeof(buf2));
166
167
            }
167
168
            else if(!strncmp("SKIN_NAME", var, strlen(var))) {
168
169
              if(skonfig->name)
169
 
                strcat(buf2, skonfig->name);
 
170
                strlcat(buf2, skonfig->name, sizeof(buf2));
170
171
            }
171
172
            else if(!strncmp("SKIN_DATE", var, strlen(var))) {
172
173
              if(skonfig->date)
173
 
                strcat(buf2, skonfig->date);
 
174
                strlcat(buf2, skonfig->date, sizeof(buf2));
174
175
            }
175
176
            else if(!strncmp("SKIN_URL", var, strlen(var))) {
176
177
              if(skonfig->url)
177
 
                strcat(buf2, skonfig->url);
 
178
                strlcat(buf2, skonfig->url, sizeof(buf2));
178
179
            }
179
180
            else if(!strncmp("HOME", var, strlen(var))) {
180
181
              if(skonfig->url)
181
 
                strcat(buf2, xitk_get_homedir());
 
182
                strlcat(buf2, xitk_get_homedir(), sizeof(buf2));
182
183
            }
183
184
            /* else ignore */
184
185
          }