TempleOSTS_140317.ISO

This commit is contained in:
Terry A. Davis authored and minexew committed 2018-09-08 21:46:02 +02:00
1 parent 2d2a65d572
commit 7ef616a20e
1416 files changed
+223873 -53917

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
/*
We use the internal routines from the text editor
to cut and paste lines to reverse the order of
lines in a text file.
*/
U0 Reverse(U8 *in_name,U8 *out_name)
{
CDoc *doc_in =DocRead(in_name),
*doc_out=DocNew(out_name);
DocTop(doc_in);
while (doc_in->root.next!=doc_in) {
EdLineDown(doc_in,SC_CURSOR_DOWN|SCF_SHIFT);
ClipboardDel;
EdCutToClipboard(doc_in);
DocTop(doc_out);
EdPasteClipboard(doc_out);
}
DocWrite(doc_out);
}
Reverse("::/Demo/ReverseFileExample/PoemBackward.TXT.Z",
"::/Demo/ReverseFileExample/PoemForeward.TXT.Z");