help
@language:simplified_chinese
//例str="my_func,myf"⇒默认的mfps文件夹"/storage/emulated/0/AnMath/scripts/"
@end
endh
function add_all_mfps_to_cs(str)
variable str_path="/storage/emulated/0/AnMath/scripts/"
variable path=str_path+split(str,",")[0]
variable new_path=str_path+"cs_"+split(str,",")[0]
variable csname=split(str,",")[1]
if(ls("temp")==1)
f_qk("temp")
else
f_xj("temp")
endif
variable list=list_files(path)
for variable k=0 to size(list)[0]-1
if(strsub(list[k],strlen(list[k])-5,strlen(list[k]))==".mfps")
f_storage_f("temp",list[k])
endif
next
variable fp=fopen("temp","r","utf_8")
do
variable str=freadline(fp)
variable fo=fopen(path+"/"+str,"r","utf_8")
variable fo1=fopen(new_path+"/"+str,"w","utf_8")
//fprintf(fo1,"%s\n\n","citingspace ::func")
fprintf(fo1,"%s\n\n","citingspace ::"+csname)
do
variable st=freadline(fo)
fprintf(fo1,"%s\n",st)
until(feof(fo))
fprintf(fo1,"\n%s","endcs")
fclose(fo1)
fclose(fo)
until(feof(fp))
fclose(fp)
//f_gm(new_path,path)
endf


