Changeset 24035 for titan/titan/global.h
- Timestamp:
- 10/03/13 09:08:09 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/titan/global.h
r23991 r24035 1 1 #ifndef GLOBAL_H 2 2 #define GLOBAL_H 3 4 //flag 0: get pluginpath an add text 5 //flag 1: get pluginpath and change "%pluginpath%/" 6 char* createpluginpath(char* text, int flag) 7 { 8 char* tmpstr = NULL; 9 if(text == NULL) return NULL; 10 11 if(flag == 0) 12 { 13 tmpstr = ostrcat(getconfig("pluginpath", NULL), text, 0, 0); 14 if(file_exist(tmpstr) == 1) return tmpstr; 15 16 free(tmpstr); tmpstr = NULL; 17 tmpstr = ostrcat(getconfig("pluginpath1", NULL), text, 0, 0); 18 if(file_exist(tmpstr) == 1) return tmpstr; 19 20 free(tmpstr); tmpstr = NULL; 21 tmpstr = ostrcat(getconfig("pluginpath2", NULL), text, 0, 0); 22 if(file_exist(tmpstr) == 1) return tmpstr; 23 24 return NULL; 25 } 26 else 27 { 28 if(strlen(text) < 13) return NULL; 29 30 tmpstr = ostrcat(getconfig("pluginpath", NULL), &text[13]); 31 if(file_exist(tmpstr) == 1) return tmpstr; 32 33 free(tmpstr); tmpstr = NULL; 34 tmpstr = ostrcat(getconfig("pluginpath1", NULL), &text[13]); 35 if(file_exist(tmpstr) == 1) return tmpstr; 36 37 free(tmpstr); tmpstr = NULL; 38 tmpstr = ostrcat(getconfig("pluginpath2", NULL), &text[13]); 39 if(file_exist(tmpstr) == 1) return tmpstr; 40 } 41 42 return NULL; 43 } 3 44 4 45 int osystem(char* cmd, int timeout) … … 1692 1733 } 1693 1734 1735 //flag 0: normal picons 1736 //flag 1: alternate picons 1694 1737 char* createpiconpath(struct channel* chnode, int flag) 1695 1738 {
Note: See TracChangeset
for help on using the changeset viewer.