Trivial Solutions
                    The LoseThos 64-bit PC Operating System
File:/LT/Demo/Dsk/FPrintF.CPZ
This, and all LoseThos files, are public domain.  Do whatever you like.
God is watching; God is just; God is never out-done in generosity.  He talks!

LoseThos code compiles with the 64-bit LoseThos compiler/assembler I wrote.
Boot the LoseThos CD and you can compile it.  Not in Kansas anymore!

Click here for preliminary compiler information you need.

/* There is no FPrintF type function and no
way to grow files. Therefore, use mem to
hold the file until you are done.  The Ltf
framework is convenient for this.
*/

#include "/LT/Demo/Shared/TreeDemoJoin"

U0 FPrintFDemo(U8 *output_filename=NULL)
{
  U64 fuf_flags=0;
  Ltf *l=LtfNew;
  GetFFlags(&fuf_flags,Define("ST_FILE_UTIL_FLAGS"),"+r");
  LtfPutS(l,"$TR-C+AL,\"\"$\n");
  LtfPutS(l,"$ID,+2$");
  TreeSub(l,FilesFind("/LT/*",fuf_flags));
  LtfPutS(l,"$ID,-2$");
  LtfRecalc(l);
  if (output_filename) {
    StrCpy(l->filename.name,output_filename);
    LtfWrite(l,FALSE);
  } else
    LtfWrite(l,TRUE);
  LtfDel(l);
}

FPrintFDemo;
Historical capture: 2012-03-09. Home | Power on LoseThos | Sources and changes