Changeset 12564
- Timestamp:
- 12/23/11 23:50:46 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/panel/panel_feed.h
r12373 r12564 4 4 void screenpanel_feed() 5 5 { 6 char* tmpstr = NULL, *line 1 = NULL, *line2= NULL;6 char* tmpstr = NULL, *line = NULL, *lastline = NULL; 7 7 8 l ine2 = readsys(getconfig("feed", NULL), 2);9 l ine2 = string_replace("src/gz secret http://", "", line2, 1);8 lastline = readsys(getconfig("feed", NULL), 3); //line3 9 lastline = string_replace("src/gz secret http://", "", lastline, 1); 10 10 11 if(l ine2 == NULL || ostrcmp(line2, "") == 0 || ostrcmp(line2, "\n") == 0)12 l ine2 = ostrcat(line2, "00.00.00.00/svn/atemio", 1, 0);11 if(lastline == NULL || ostrcmp(lastline, "") == 0 || ostrcmp(lastline, "\n") == 0) 12 lastline = ostrcat(lastline, "00.00.00.00/svn/atemio", 1, 0); 13 13 14 l ine2 = textinput(_("Feed"), line2);14 lastline = textinput(_("Feed"), lastline); 15 15 16 if(l ine2!= NULL)16 if(lastline != NULL) 17 17 { 18 line1 = readsys(getconfig("feed", NULL), 1); 19 if(line1 == NULL) line1 = ostrcat("#", NULL, 0, 0); 18 tmpstr = readsys(getconfig("feed", NULL), 1); //line1 19 if(tmpstr == NULL || (tmpstr != NULL && strlen(tmpstr) == 0)) 20 line = ostrcat(line, "#\n", 1, 0); 21 else 22 line = ostrcat(line, tmpstr, 1, 0); 23 free(tmpstr); tmpstr = NULL; 24 25 tmpstr = readsys(getconfig("feed", NULL), 2); //line2 26 if(tmpstr == NULL || (tmpstr != NULL && strlen(tmpstr) == 0)) 27 line = ostrcat(line, "#\n", 1, 0); 28 else 29 line = ostrcat(line, tmpstr, 1, 0); 30 free(tmpstr); tmpstr = NULL; 20 31 21 if(line 1[strlen(line1) - 1] == '\n')22 tmpstr = ostrcat(line 1, "src/gz secret http://", 0, 0);32 if(line[strlen(line) - 1] == '\n') 33 tmpstr = ostrcat(line, "src/gz secret http://", 0, 0); 23 34 else 24 tmpstr = ostrcat(line1, "\nsrc/gz secret http://", 0, 0); 25 26 if(tmpstr != NULL && tmpstr[0] == '\n') 27 tmpstr = ostrcat("#", tmpstr, 0, 1); 35 tmpstr = ostrcat(line, "\nsrc/gz secret http://", 0, 0); 28 36 29 if(strlen(l ine2) == 0)37 if(strlen(lastline) == 0) 30 38 { 31 39 free(tmpstr); 32 tmpstr = ostrcat(line 1, NULL, 0, 0);40 tmpstr = ostrcat(line, NULL, 0, 0); 33 41 } 34 42 35 tmpstr = ostrcat(tmpstr, l ine2, 1, 0);43 tmpstr = ostrcat(tmpstr, lastline, 1, 0); 36 44 writesys(getconfig("feed", NULL), tmpstr, 0); 37 writeconfigtmp();38 45 } 39 46 40 47 free(tmpstr); 41 free(line 1);42 free(l ine2);48 free(line); 49 free(lastline); 43 50 } 44 51
Note: See TracChangeset
for help on using the changeset viewer.