26 lines
699 B
Plaintext
26 lines
699 B
Plaintext
void TreeSub(Ltf *l,LTDirEntry *tempm)
|
|
{
|
|
LTDirEntry *tempm1;
|
|
while (tempm) {
|
|
tempm1=tempm->next;
|
|
if (tempm->attr & LT_ATTR_DIR) {
|
|
LtfPutSExt(l,"$$TR,\"\"$$");
|
|
LtfPrintF(l,"$$MA+A,\"%s\",\"Cd(\\\"%s\\\");Dir;\r\"$$\r\n",
|
|
tempm->name,tempm->full_name);
|
|
if (tempm->sub) {
|
|
LtfPutSExt(l,"$$ID,+2$$");
|
|
TreeSub(l,tempm->sub);
|
|
LtfPutSExt(l,"$$ID,-2$$");
|
|
}
|
|
} else {
|
|
LtfPrintF(l,"$$LK,\"%12s\",\"FI:%s\"$$\r\n",
|
|
tempm->name,tempm->full_name);
|
|
}
|
|
//Note there is also a routine
|
|
//to delete an entire LTDirEntry tree.
|
|
//See $LK,"DelLTDirList","MN:DelLTDirList"$().
|
|
DelLTDirEntry(tempm);
|
|
tempm=tempm1;
|
|
}
|
|
}
|