Program MsgExprt;
{$IFDEF WINDOWS}
{$M 16384, 8196}
{$ELSE}
{$M 16384, 0, 655360}
{$ENDIF}
{$I MKB.Def}
{$X+}
{$IFDEF WINDOWS}
Uses MKWCrt,
{$ELSE}
{$IFDEF OPRO}
Uses OpCrt,
{$ELSE}
Uses Crt,
{$ENDIF}
{$ENDIF}
MKMsgAbs, MKOpen, MKDos, MKstring,
MKGlobT { voor AddrType };
Var
MsgOut: AbsMsgPtr;
TmpStr: String;
AreaId: String;
OutFile: Text;
OutName: String;
Addr : AddrType;
Const
StLen = 78;
Begin
If (ParamCount < 2) or (ParamStr(1) = '/?') Then
Begin
WriteLn('Proper syntax is:');
WriteLn('MsgExprt OutPut.Txt MsgAreaId');
WriteLn;
WriteLn(' Squish MsgAreaId Example = SC:\Max\Msg\Muffin');
WriteLn(' Hudson MsgAreaId Example = H042C:\MK\MsgBase');
WriteLn(' *.Msg MsgAreaId Example = FC:\Mail');
WriteLn(' Ezy MsgAreaId Example = E0001C:\Ezy\MsgBase');
WriteLn(' Jam MsgAreaId Example = JC:\Msg\General');
WriteLn;
Halt(1);
End;
AreaId := Upper(ParamStr(2));
OutName := Upper(ParamStr(1));
WriteLn('Exporting to ', OutName);
Assign(OutFile, OutName);
ReWrite(OutFile);
If IoResult 0 Then
Begin
WriteLn('Unable to create output file');
Halt(3);
End;
If Not OpenMsgArea(MsgOut, AreaId) Then
Begin
WriteLn('Unable to open message base');
Halt(4);
End;
WriteLn;
WriteLn;
MsgOut^.SeekFirst(1);
While MsgOut^.SeekFound Do
Begin
MsgOut^.MsgStartUp;
Clrscr;
Write(MsgOut^.GetMsgNum);
MsgOut^.GetOrig(Addr);
Write(Outfile, Addr.zone,':',Addr.net,'/',Addr.node,'.',Addr.point);
Write(OutFile, ' ',MsgOut^.GetFrom,' ');
Writeln(OutFile);
If IoResult 0 Then;
MsgOut^.SeekNext;
End;
Close(OutFile);
If IoResult 0 Then
Begin
WriteLn('Error in output file');
Halt(3);
End;
If Not CloseMsgArea(MsgOut) Then;
End.
-----------8< Output.Txt ---------------------
2:292/881.10 Steven Leeman
2:292/881.10 Patrick Cornelis
2:292/881.10 Patrick Cornelis
2:292/881.10 Pros Robaer
2:292/881.10 Els Ergo
2:292/881.10 Rik Timpen
2:292/881.10 Rudi Scheers
2:292/881.10 Tom Torfs
2:292/881.10 Erwin Sterk
2:292/881.10 Guillaume Maes
2:292/881.10 Claesen Guido
2:292/881.10 Johan Zwiekhorst
2:292/854.19 Steven Leeman
2:292/854.19 Rik Timpen
2:292/854.19 Els Ergo
2:292/854.19 Els Ergo
2:292/854.19 Rik Timpen
2:292/854.19 Steven Van Impe
2:292/854.19 Steven Van Impe
2:292/854.19 Ruben Provoost
2:292/854.19 Rob Vandeweyer
2:292/854.19 Tristan Vingerhoets
2:292/854.19 Rob Vandeweyer
2:292/854.19 Jef Meynendonckx
2:292/854.19 Hendrik Desmet
2:292/854.19 Dirk Teunis
2:292/854.19 Jef Meynendonckx
2:292/854.19 Marleen Scheers
2:292/854.19 Pascal Beuselinck
2:292/854.19 Pascal Beuselinck
2:292/854.19 Pascal Beuselinck
2:292/854.19 Marcel Van den Dries
2:292/854.19 Jan Derieuw
2:292/506.0 Steven Leeman
2:292/506.0 Christoph Lowagie
2:292/506.0 Jeroen Allegaert
-----------8< Output.Txt ---------------------
as you can see the orig adresses don't match!
why? does anyone have the JAM fix of mkmsg? I only found the fix for .MSG
messagetypes...
o zwaai, zwaai,
)/\,[_) Steven Leeman
`T7 ]=[ Sysop SkyNET Bbs
... Kop op, het ergste moet nog komen.
--- SkyNetMail
---------------
* Origin: SkyNet Bbs ®32-(0)16-580862¯ (2:292/624)
|