/*-----------------------------------------------------------------------*/ static void PutListLev1(t_LL list) { void * elem; Putt_LLsize(0); Putt_LLsize(SizeLL(list)); ForeachLL_M(list,elem) PutElem(elem); }
void LL2File(t_LL list, char * name) { FILE *file = (strcmp("-",name)) ? fopen(name,"w") : stdout ; char * str; if (NULL==file) AbortLL_M("LL2File","can't open file for write"); ForeachLL_M(list,str) fputs(str,file); fclose(file); }
/*-----------------------------------------------------------------------*/ static void PutListLevN(t_LL list, int level) { if(1==level) PutListLev1(list); else { t_LL * pList; Putt_LLsize(0); Putt_LLsize(SizeLL(list)); ForeachLL_M(list,pList) PutListLevN(*pList,level-1); } }