Team Ai
Datasetpublic

hschumann2/TempleOS-Source-Code

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes847downloads
Rev.txt24 linesDownload Raw Back to RevFileDemo
1 2/*We use the internal routines from the text editor3to cut and paste lines to rev the order of4lines in a text file.5*/6 7Cd(__DIR__);;8 9U0 Rev(U8 *in_name,U8 *out_name)10{11  CDoc  *doc_in =DocRead(in_name),12        *doc_out=DocNew(out_name);13  DocTop(doc_in);14  while (doc_in->head.next!=doc_in) {15    EdLineDown(doc_in,SC_CURSOR_DOWN|SCF_SHIFT);16    ClipCut(doc_in);17    DocTop(doc_out);18    ClipPaste(doc_out);19  }20  DocWrite(doc_out);21}22 23Rev("DemoPoemBwd.DD.Z","~/DemoPoemFwd.DD.Z");24