Category : Files from Magazines
Archive   : DBMS9104.ZIP
Filename : TECHTIP2.APR

 
Output of file : TECHTIP2.APR contained in archive : DBMS9104.ZIP
LISTING 2

/***
*
* INSERT A CONTROL-Z AT EOFO
*
***/

** test.prg

if add_eof(ÒGLENTRY.TXTÓ)
use getdata
append from (ÒGLENTRY.TXTÓ) SDF
else
error(ÒThere has been a problem adding an EOF to GLENTRY.TXTÓ)
RETURN
endif

#include ÒFileio.chÓ

FUNCTION add_eof (filename)
local error

error := ( fhandle := FOPEN(filename,FO_READWRITE) ) <= 0

FSEEK(fhandle,1,FS_END)
error = error .OR. FERROR() <> 0

error = error .OR. (FWRITE(fhandle,chr(26),1) <> 1)

FCLOSE(fhandle)

RETURN error .OR. FERROR() <> 0


  3 Responses to “Category : Files from Magazines
Archive   : DBMS9104.ZIP
Filename : TECHTIP2.APR

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/