Category : Files from Magazines
Archive   : PCTV1N1.ZIP
Filename : UFORMGEN.PAS

 
Output of file : UFORMGEN.PAS contained in archive : PCTV1N1.ZIP
(*
** File: uformgen.pas
** Purpose: Routines for generating new CARDFILE forms.
** Author: (c) 1989 by Tom Swan. All rights reserved.
*)

unit UFormGen;

interface

uses Crt, Objects, Cards, Forms, Sliders, UNewType;

const SIGNATURE : Longint = $44524143; { Do not change! }

type NewFormProc = procedure;

var
theForm: Form;
theCards: CardList;
theStream: FStream;

procedure makeFile( formp : NewFormProc; filename : FNameStr );


implementation

{---- Create a new card file }

procedure makeFile( formp : NewFormProc; filename : FNameStr );
begin
formp; { Create the new form in memory }
theCards.init( theForm.size );
theStream.init( filename, SCREATE, 1024 );
theStream.write( SIGNATURE, sizeof(Longint) );
theForm.store( theStream );
theCards.store( theStream );
theStream.flush;
if theStream.status <> 0
then writeln( 'Error creating file ', filename );
theStream.done;
theCards.done;
theForm.done;
end; { makeFile }

end. { UFormGen }


  3 Responses to “Category : Files from Magazines
Archive   : PCTV1N1.ZIP
Filename : UFORMGEN.PAS

  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/