Changeset 39581 for titan/plugins/tithek/tithek_global.h
- Timestamp:
- 01/01/17 18:02:44 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/plugins/tithek/tithek_global.h
r39576 r39581 786 786 drawscreen(load, 0, 0); 787 787 788 char* titheklocalfile = ostrcat("/tmp/tithek/mainmenu.local.list", NULL, 0, 0); 789 788 790 if(flag == 1) 789 791 { … … 828 830 system(cmd); 829 831 free(cmd), cmd = NULL; 830 } 831 832 cmd = ostrcat("ls -1 ", path, 0, 0); 833 cmd = ostrcat(cmd, "/*.sh", 1, 0); 834 835 free(path), path = NULL; 836 tmpstr1 = command("ls -1 /mnt/parser/*.sh"); 837 tmpstr2 = command(cmd); 838 free(cmd), cmd = NULL; 839 tmpstr = ostrcat(tmpstr1, "\n", 0, 0); 840 tmpstr = ostrcat(tmpstr, tmpstr2, 1, 0); 841 842 int count = 0, i = 0; 843 struct splitstr* ret1 = NULL; 844 ret1 = strsplit(tmpstr, "\n", &count); 845 846 int max = count; 847 for(i = 0; i < max; i++) 848 { 849 if(file_exist(ret1[i].part) && cmpfilenameext(ret1[i].part, ".sh") == 0) 832 // } 833 834 cmd = ostrcat("ls -1 ", path, 0, 0); 835 cmd = ostrcat(cmd, "/*.sh", 1, 0); 836 837 free(path), path = NULL; 838 tmpstr1 = command("ls -1 /mnt/parser/*.sh"); 839 tmpstr2 = command(cmd); 840 free(cmd), cmd = NULL; 841 tmpstr = ostrcat(tmpstr1, "\n", 0, 0); 842 tmpstr = ostrcat(tmpstr, tmpstr2, 1, 0); 843 844 int count = 0, i = 0; 845 struct splitstr* ret1 = NULL; 846 ret1 = strsplit(tmpstr, "\n", &count); 847 848 int max = count; 849 for(i = 0; i < max; i++) 850 850 { 851 cmd = ostrcat(ret1[i].part, " ", 0, 0); 852 cmd = ostrcat(cmd, ret1[i].part, 1, 0); 853 cmd = ostrcat(cmd, " init", 1, 0); 854 line = command(cmd); 855 debug(99, "add main menuentry: %s", line); 856 writesys(tithekfile, line, 3); 857 free(cmd), cmd = NULL; 858 free(line), line = NULL; 851 if(file_exist(ret1[i].part) && cmpfilenameext(ret1[i].part, ".sh") == 0) 852 { 853 cmd = ostrcat(ret1[i].part, " ", 0, 0); 854 cmd = ostrcat(cmd, ret1[i].part, 1, 0); 855 cmd = ostrcat(cmd, " init", 1, 0); 856 line = command(cmd); 857 debug(99, "add main menuentry: %s", line); 858 writesys(titheklocalfile, line, 3); 859 free(cmd), cmd = NULL; 860 free(line), line = NULL; 861 } 859 862 } 860 } 861 free(ret1), ret1 = NULL; 862 free(tmpstr), tmpstr = NULL; 863 free(tmpstr1), tmpstr1 = NULL; 864 free(tmpstr2), tmpstr2 = NULL; 863 free(ret1), ret1 = NULL; 864 free(tmpstr), tmpstr = NULL; 865 free(tmpstr1), tmpstr1 = NULL; 866 free(tmpstr2), tmpstr2 = NULL; 867 } 868 869 line = readfiletomem(titheklocalfile, 1); 870 free(titheklocalfile), titheklocalfile = NULL; 871 writesys(tithekfile, line, 3); 872 865 873 clearscreen(load); 866 874 } 875 867 876 } 868 877
Note: See TracChangeset
for help on using the changeset viewer.