[go: up one dir, main page]

Menu

[65d1b3]: / xp4d.inc  Maximize  Restore  History

Download this file

663 lines (597 with data), 25.5 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
{ $Id$
Copyright (C) 1991-2001 Peter Mandrella
Copyright (C) 2000-2002 OpenXP team (www.openxp.de)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
}
{ XP4.PAS - Anzeigeroutinen }
{ --- Zeile einlesen und anzeigen --- }
procedure brettform(var s:string; flags:byte; user:boolean);
var i : byte;
begin
case brettanzeige of
1 : s:=TopAllStr(s);
2 : for i:=iif(user,1,2) to length(s) do
s[i]:=LoCase(s[i]);
end;
if not user and (cpos('/',s)>0) and newsgroupdisp
and (((s[1]='A') and (flags and 16<>0)) or newsgroupdispall)
then begin
if newsgroupdispall and (s[2]='/') then delete(s,2,1);
if (s[1]='1') or (cpos(':',s)>0) then begin
i:=cpos('/',s);
if (i>2) and (cpos('@',s)=0) then s[i]:='@';
end else
for i:=3 to length(s) do if (s[i]='/') and not
(((i>6) and (UpperCase(copy(s,i-6,6))='OPENXP')) and
((i<length(s)-1) and ((copy(s,i+1,2)='16') or
(copy(s,i+1,2)='32')))) then
s[i]:='.';
end;
end;
procedure write_disp_line(y,p:shortint; show:boolean);
const
uv : array[0..13] of char = ' !*'#19'z23456789#';
ge : array[0..1] of char = '> ';
wv : array[0..5] of char = ' cwwss';
var
hf : array[0..4] of char;
taus : array[1..FelderMax] of string;
tausc : 0..FelderMax;
s,s0 : string;
dat,edat: longint;
sdat : string;
c : string;
s1 : string;
s2 : string;
size : longint;
typ : char;
hzeit : integer16; { Haltezeit }
pbox : string;
komm : string;
dadr,pw : char;
ab,flags: byte;
abc : string;
grnr : longint;
uflags : byte;
markc : char;
hd : Theader;
hds : longint;
pp : byte;
wvl : byte;
vert : boolean;
mnt : longint;
netztyp : byte;
_brett : string;
t,m,j : smallword;
tempd: integer;
fileatt : boolean;
dflags : string;
fidoqwk : boolean;
uv_anz : integer;
helpbyte,h1,h2,h3: byte;
hflags,gelesen,unvers : byte;
ulen,blen : byte;
over80 : integer;
Short_Realnames : boolean; { bei <Ctrl-N> Realname krzen }
function siz:string;
begin
if size<10000 then siz:=strsn(size,5)
else
if size<1024*1024 then
siz:=strsn(size div 1024,4)+'k'
else
if size<1024*1024*1024 then
siz:=strsn(size div (1024*1024),4)+'M'
else
siz:=strsn(size div (1024*1024*1024),4)+'G';
end;
function hz(i:integer):string;
begin
hz:=iifs(i=0,' ì',strsn(i,4));
end;
procedure msgtausch(c:char; const s:string);
begin
if cpos(c,MsgFeldTausch)=0 then exit;
taus[cpos(c,MsgFeldTausch)] := s;
end;
procedure usrtausch(c:char; const s:string);
begin
if cpos(c,UsrFeldTausch)=0 then exit;
taus[cpos(c,UsrFeldTausch)] := s;
end;
{ 23.09.2005 HJT: ehemalige eingebettete Assemblerzeilen }
{ auf Pascal umgeschrieben. }
{ Hintergrund: moeglicherweise erzeugt FP2 fehlerhaften }
{ code bei hoeheren Optimierungsstufen. }
{ Konkreter Anlass: in der Nachrichtenuebersicht wurden }
{ Nachrichten beim erstmaligen rueckwaertsblaettern mit }
{ der falschen Farbe (Prio) dargestellt. }
{ Dessweiteren wurden beim Bewegen des Scrollbalkens }
{ ueber eine rot-hinterlegte Nachricht anschliessend }
{ die Nachricht wieder 'normal', also nicht rot, ange- }
{ zeigt. Das Auslagern der Assemblezeilen scheint das }
{ Problem auch bei den hoeheren Optimierungsstufen zu }
{ beheben }
function getprio(const flag:byte; msgs:boolean):byte;
var
helpbyte: byte;
begin
{ codieren Prioritaet... Farbflag setzen: }
{ Nachrichten: Bit 3-5 }
{ User : Bit 5-7 }
{ 000=normal -> 0 100=niedrigste -> 5 }
{ 001=hoechste -> 2 101= ? -> 6 }
{ 010=hoch -> 3 110= ? -> 7 }
{ 011=niedrig -> 4 111= ? -> 8 }
if msgs then helpbyte:=flag DIV 8 { Nachrichten }
else helpbyte:=flag DIV 32; { User }
helpbyte:=helpbyte and 7;
if helpbyte > 0 then inc(helpbyte);
result:=helpbyte;
end;
var
hdp : THeader;
begin { __ Suchmarke }
over80:= ScreenWidth-80; { Bildschirm > Spalten }
case aktdispmode of
-1,0 : begin
s:= dbReadStrN(bbase,bb_brettname);
komm:= dbReadStr(bbase,'kommentar');
if LeftStr(s,3)='$/T' then begin { Trennzeile ? }
if komm='' then
dispbuf[y]:=' '+dup(ScreenWidth-4,s[4])+' ' { ohne Kommentar }
else
case trennkomm of
1 : dispbuf[y]:=' '+komm+' '+dup(ScreenWidth-5-length(komm),s[4])+' '; { links }
2 : begin { mitte }
dispbuf[y]:=' '+dup((ScreenWidth-6-length(komm))div 2,s[4])+' '+
komm+' ';
dispbuf[y]:=dispbuf[y]+dup(ScreenWidth-1-length(dispbuf[y]),s[4])+' ';
end;
3 : dispbuf[y]:=' '+dup(ScreenWidth-5-length(komm),s[4])+' '+komm+' '; { rechts }
end;
markflag[y]:=2;
end
else begin { keine Trennzeile }
dbReadN(bbase,bb_LDatum,dat);
dbReadN(bbase,bb_flags,flags);
pbox:= dbReadNStr(bbase,bb_pollbox);
markflag[y]:=iif(UBmarked(dbRecno(bbase)),1,0);
markc:=iifc(markflag[y]<>0,suchch,' ');
brettform(s,flags,false);
if (not NewsgroupDispall) and (not UserSlash) and (FirstChar(s)<'A') then delete(s,2,1);
if not dispext then begin { erweiterte Anzeige s ? }
case readmode of { s. auch XP4.BRETTOK() }
0 : c:=markc+iifs(showungelesen and (flags and 2<>0),#$af' ',' ');
1 : c:=markc+iifs(flags and 2<>0,#$af' ',' ');
else
if showungelesen and (flags and 2<>0)
then c:=markc+iifs(not smdl(dat,readdate),#$af' ',#$1a' ')
else c:=markc+iifs(not smdl(dat,readdate),#16' ',' ');
end;
if length(s)>43 then { Brettbersicht in Normal mode }
if ( length(komm) > 1 ) then { Kommentar vorhanden ?}
dispbuf[y]:=c { 4 }
+ forms(mid(s,2), 60 + (over80+1)div 2)+' ' {+ 60!! }
+ forms( komm , 16 + over80 div 2) {+ 16 }
else
dispbuf[y]:=c+forms(copy(s,2,76+over80),77+over80)
else { length(s)>43 then }
{ 3 + 44 + 33 = 80 }
dispbuf[y]:=c+forms(copy(s,2,43),44)+forms(komm,over80+33);
end {if not dispext then}
else begin { erweiterte Anzeige }
dbReadN(bbase,bb_haltezeit,hzeit);
dbReadN(bbase,bb_gruppe,grnr);
dispbuf[y]:=markc+ { 1}
iifc(dat<>0,' ','-') { +1}
+iifc(flags and 8<>0,'X',' ') { +1}
+iifc(dbReadStrN(bbase,bb_adresse)<>'',
iifc(flags and 32=0,'*','O'),' ') { +1}
+iifc(odd(flags),'N',' ') { +1}
+hz(hzeit) { +4}
+' ' { +1}
+forms(pbox,9) { +9}
+strsn(grnr,4) { +4}
+' ' { +1}
+forms(copy(s,2,37+(over80 div 2)),38+(over80+1)div 2){+38}
+forms(komm,17+ over80 div 2); {+17}
end;
end;
end;
1,2,
3,4 : begin { USERLISTE }
{ L„ngen:
FLAGS 4
ADRBUCH 2
PBOX 9
HZEIT 4
ADRESSE 44,32,24
KOMMENTAR 30,22
}
for tausc := 1 to UsrFelderMax do taus[tausc]:='';
s:= dbReadNStr(ubase,ub_username);
komm:= dbReadNStr(ubase,ub_kommentar);
{ Trennzeilenerkennung }
if LeftStr(s,4)=#0+'$/T' then
begin
if komm='' then { Trennzeile ohne Kommentar }
dispbuf[y]:=' '+dup(74+over80,s[5])+' '
else
case trennkomm of
1 : dispbuf[y]:=' '+komm+' '+dup(73-length(komm)+over80,s[5])+' '; { links -ungetestet }
2 : begin { mitte -ungetestet}
dispbuf[y]:=' '+dup((72-length(komm)+over80)div 2,s[5])+' '+
komm+' ';
dispbuf[y]:=dispbuf[y]+dup(79+over80-length(dispbuf[y]),s[5])+' ';
end;
3 : dispbuf[y]:=' '+dup(73-length(komm)+over80,s[5])+' '+komm+' '; { rechts }
end;
markflag[y]:=2;
end
else begin { User bersicht keine Trennzeile }
dbReadN(ubase,ub_adrbuch,ab);
dbReadN(ubase,ub_userflags,uflags);
abc:=iifc(ab<>0,'û',' ')+iifc(odd(uflags),' ','#');
dadr:=iifc(dbXsize(ubase,'adresse')>0,'*',' ');
pw:=iifc((dbXsize(ubase,'passwort')>0) or
(dbReadInt(ubase,'codierer') in [8,9]),'P',' ');
vert:=(uflags and 4<>0);
dbReadN(ubase,ub_haltezeit,hzeit);
if vert then { Verteiler }
begin
s := vert_name(s);
abc:='V ';
end;
usrtausch('F',abc+pw+dadr); { (F)lags }
markflag[y]:=iif(UBmarked(dbRecno(ubase)),1,0);
brettform(s,0,true);
if dispext then begin { Anzeige/Spezial }
pbox:= dbReadNStr(ubase,ub_pollbox);
brettform(s,0,true);
usrtausch('H',' '+hz(hzeit)); { (H)altezeit }
usrtausch('B',forms(pbox,9)); { (B)OX }
usrtausch('G',strsn(ab,2)); { Adressbuch-(G)ruppe }
end;
Helpbyte:=cpos('A',Usrfeldtausch);
h3:=cpos('K',Usrfeldtausch);
if (komm='') or (h3=0) then h1:=75 else h1:=44;
h2:=30;
if dispext and (h3<>0) then { Falls (S)pezial EIN, dann Resttext krzen }
if h3 > helpbyte then
dec(h1,12) { Adresse nach Kommentar: nur Adresse krzen }
else begin
h1:=44-20;
h2:=30-8; { Kommentar nur krzen, wenn er hinter der Adresse steht }
end;
usrtausch('A',forms(s,h1)); { Verteilername bzw. (A)dresse }
usrtausch('K',forms(komm,h2)); { (K)ommentar }
tausc:=0; dispbuf[y]:=''; { Felder zusammenkopieren }
while (tausc<UsrFelderMax) do begin
inc(tausc);
if (taus[tausc]='') then continue; { Leere Felder bergehen }
abc:=' ';
if (dispbuf[y]='') then abc:='';
dispbuf[y]:=dispbuf[y]+abc+taus[tausc];
end;
dispbuf[y]:=forms(dispbuf[y], ScreenWidth); { Sicherheitshalber nochmal krzen }
{ HJT 23.09.2005 asm durch Pascal ersetzt wg. Optimierer, siehe getprio }
userflag[y]:=getprio(uflags, false);
end;
end;
10..12: begin { NACHRICHTENLISTE }
if auswahlcursor and blind then hf := ' +-A.'
else hf := ' +-';
for tausc := 1 to MsgFelderMax do taus[tausc]:='';
_brett := dbReadNStr(mbase,mb_brett);
s0:= dbReadNStr(mbase,mb_absender);
dbReadN(mbase,mb_netztyp,mnt);
fileatt:=(mnt and $200<>0);
netztyp:=mnt and $ff;
uv_anz:=(mnt shr 16) and $ff;
pp:=cpos('@',s0);
fidoqwk:=(netztyp=nt_Fido) or (netztyp=nt_QWK);
Short_Realnames:=Showrealos and not ((netztyp=nt_Maus) or fidoqwk);
{-------}
h2:=0; h3:=0;
if cpos('A',MsgFeldTausch)=0 then inc(h2,19) else inc(h3);
if cpos('E',MsgFeldTausch)=0 then inc(h2,19) else inc(h3);
if cpos('B',MsgFeldTausch)=0 then inc(h2,21) else inc(h3);
if cpos('D',MsgFeldTausch)=0 then inc(h2,6);
if cpos('G',MsgFeldTausch)=0 then inc(h2,6);
if cpos('F',MsgFeldTausch)=0 then inc(h2,7);
if not (fidoqwk and (dispmode=10) and dispfto and (FirstChar(_brett)='A'){})
then begin
if cpos('E',MsgFeldTausch)=0 then dec(h2,19)
else dec(h3);
end;
if h3>0 then h3:=h2 div h3;
{-------}
if ((netztyp=nt_Maus) or fidoqwk) and (pp>0) then
s:=LeftStr(s0,pp-1)+' @ '+mid(s0,pp+1)
else
if showrealos and (dbReadStrN(mbase,mb_name)<>'') and
((dispmode<>11) or not markunversandt) then
s:= dbReadNStr(mbase,mb_name)
else begin
s:=s0;
if sabsender<>0 then begin
if RightStr(s,4)='.ZER' then delete(s, length(s)+1-4, 4); {dec(byte(s[0]),4);}
case sabsender of
1 : if pp=0 then s:=TopAllStr(s)
else s:=TopAllStr(LeftStr(s,pp-1))+'@'+copy(s,pp+1,length(s)-pp);
2 : if pp=0 then s:=TopAllStr(s)
else s:=TopAllStr(LeftStr(s,pp-1))+' @ '+copy(s,pp+1,length(s)-pp);
3 : if pp>0 then s:=LeftStr(s,pp-1);
4 : s:=TopAllStr(LeftStr(s,iif(pp>0,pp-1,length(s))));
5 : if pp>0 then s:=forms(LeftStr(s,pp-1),16)+' '+copy(s,pp+1,length(s)-pp);
6 : if pp=0 then s:=TopAllStr(s)
else s:=TopAllStr(forms(LeftStr(s,pp-1),16))+' '+copy(s,pp+1,length(s)-pp);
end;
end;
end;
s1:= dbReadNStr(mbase,mb_betreff);
// if maximum subject length in database was used
// the subject may be longer, so get it direct from the message
if Length(s1) = 40 then
begin
hdp := THeader.Create;
ReadHeader(hdp,hds,false);
s1 := hdp.Betreff;
hdp.Free;
end;
if dispmode<>12 then
begin
(* if (netztyp=nt_Maus) and (mnt and $100<>0) then
s1:=LeftStr('-'+s1,40) else
if ntKomkette(netztyp) and (mnt and $100<>0) and
(LowerCase(LeftStr(s1,3))<>'re:') and (LeftStr(s1,3)<>'Re^') then
s1:=LeftStr('-'+s1,40);
*)
if ((netztyp=nt_Maus) and (mnt and $100<>0)) or
(ntKomkette(netztyp) and (mnt and $100<>0) and
(LowerCase(leftStr(s1,3))<>'re:') and (LeftStr(s1,3)<>'Re^'))
then s1:='-'+s1
end;
dbReadN(mbase,mb_OrigDatum,dat);
if dispmode=10 then { 10=Nachrichten in DispBrett (auch To-Brett!)}
dbReadN(mbase,mb_EmpfDatum,edat)
else
edat:=ixdat('6912310000');
{ Datum anzeigen }
if showmsgdatum then begin
s2:=fdat(longdat(dat));
decodedate(now,j,m,t);
tempd := ival(copy(s2,7,2));
if tempd < 70 then inc(tempd, 2000) else inc(tempd, 1900);
if abs(tempd*12+ival(copy(s2,4,2))-1-(j*12+m-1)) > 11 then
sdat:=copy(s2,4,2)+'/'+copy(s2,7,2)
else
sdat:=LeftStr(s2,5);
ulen:=iif(over80>2,27,25); { wenn Platz fr vollen Username }
blen:=iif(over80>6,40+Over80,36+Over80); { auch noch Platz fr den Betreff }
{ kein Datum anzeigen }
end
else begin
sdat:='';
ulen:=27;
blen:=40+Over80;
end;
if (dispmode=11) and MarkUnversandt then
begin {11=markierte Nachrichten}
inc(ulen,5); dec(blen,5);
hd := THeader.Create;
readheader(hd,hds,true);
if hd.wab<>'' then s:=hd.wab;
pp:=cpos('@',s);
s:=copy(s,pp+1,length(s)-pp);
pp:=cpos('.',s);
if pp>0 then s:=LeftStr(s,pp-1);
if hd.real_box<>'' then s:=hd.real_box;
if LeftStr(hd.Firstempfaenger,length(TO_ID))=TO_ID then
s:=forms(mid(hd.Firstempfaenger,length(TO_ID)+1),ulen-length(s)-1)+' '+s
else
s:=forms(hd.Firstempfaenger,ulen-length(s)-1)+' '+s;
Hd.Free;
end;
_brett:= dbReadNStr(mbase,mb_brett);
pp:=iif(netztyp=nt_Maus,35,iif(fidoqwk,35,0));
if (pp<>0) and (FirstChar(_brett)<>'$') and (blen>pp) then
begin
inc(ulen,blen-pp);
blen:=pp;
end;
dbReadN(mbase,mb_Groesse,size);
dbReadN(mbase,mb_unversandt,unvers);
dbReadN(mbase,mb_Typ,typ);
dbReadN(mbase,mb_flags,flags);
case typ of
'T': typ := iifc((flags and 64<>0) and (size=0),'H',
iifc((flags and 128<>0) and (size=0),'R',
iifc(fileatt,'F',
iifc(flags and 4<>0,'M',' '))));
'B': If Size = 0 then
Typ := iifc(flags and 64<>0,'H',
iifc(flags and 128<>0,'R','B'));
end;
wvl:=(unvers and 12) div 4;
if (wvl=0) and (mnt and $4000<>0) then
wvl:=5;
dbReadN(mbase,mb_Halteflags,hflags);
dbReadN(mbase,mb_gelesen,gelesen);
if unvers and 32<>0 then
unvers:=4
else
unvers:=unvers and 1 + (unvers and 16) div 8;
if (unvers=1) and (uv_anz>1) then unvers:=min(uv_anz,10)+3;
if (hflags=0) and (unvers=0) and (abhdatum<>0) and
smdl(edat,abhdatum)
then
hflags:=4;
if dispmode=11 then
markflag[y]:=1
else
markflag[y]:=iif(msgmarked,1,0);
dflags:=iifc(markflag[y]<>0,suchch,' ')+ge[gelesen]+hf[hflags]+
iifc(unvers<>0,uv[unvers],
iifc(flags and 1024<>0,iifc(flags and 512<>0,'S','H'),
iifc(flags and 512<>0,'s',' ')))
+wv[wvl]+typ;
if fidoqwk and (dispmode=10) and
dispfto and (FirstChar(_brett)='A') then
begin
if cpos('@',s)>0 then SetLength(s, cpos('@',s)-1); {s[0]:=chr(cpos('@',s)-1);}
s0:= dbReadNStr(mbase,mb_name);
ulen:=19; {Absender-laenge}
msgtausch('E',forms(s0,19+h3)); { (E)mpfaenger }
msgtausch('B',forms(s1,iif(showmsgdatum,21+over80,27+over80)+h3+
iif(Short_Realnames and not (MarkUnversandt and (Dispmode=11)),5,0))); { (B)etreff }
userflag[y]:=IIf((HighlightName=UpperCase(s0)) or (mnt and $1000<>0),1,0);
end
else { Nicht-Fido bzw. Dispmode 11,12 }
begin
if dispmode=12 then { Kommentarbaum }
begin
s:=' '+BaumBlatt(ReplyTreeOfs,bezpos,s,s1);
if (sdat<>'') then sdat:=' '+sdat;
dispbuf[y]:=forms(dflags+siz+sdat+' '+s,ScreenWidth);
end
else msgtausch('B',forms(s1,blen-1+h3+
iif(Short_Realnames and not (MarkUnversandt and (Dispmode=11)),5,0))); { (B)etreff }
{ HJT 23.09.2005 asm durch Pascal ersetzt wg. Optimierer, siehe getprio }
userflag[y]:=getprio(flags, true);
if (fidoqwk and (FirstChar(_brett)='A') and
(HighlightName=UpperCase(dbReadStr(mbase,'name'))))
OR
((cpos('@',dispspec)>0) and
(UpperCase(leftStr(s0,40))=UpperCase(copy(dispspec,2,min(40,length(s0))))))
OR
(mnt and $1000<>0)
then userflag[y]:=1
end; {-*- Ab hier wieder alle Netze/Dispmodes -*-}
msgtausch('F',dflags); { (F)lags }
msgtausch('G',siz); { (G)roesse }
msgtausch('D',iifs(showmsgdatum,sdat,'')); { (D)atum }
msgtausch('A',forms(s,ulen+h3-
iif(Short_Realnames and not (MarkUnversandt and (Dispmode=11)),5,0))); { (A)bsender }
if (dispmode<>12) then begin { Kommentarbaum-Ausgabe ist fertig }
tausc:=0; dispbuf[y] :=''; { Ansonsten Felder zusammenkopieren }
while (tausc<MsgFelderMax) do begin
inc(tausc);
if (taus[tausc]='') then continue; { Leere Felder bergehen }
if (dispbuf[y]<>'') then dispbuf[y]:=dispbuf[y]+' ';
dispbuf[y]:=dispbuf[y]+taus[tausc];
end;
// Sicherheitshalber nochmal auf ScreenWidth Zeichen krzen
dispbuf[y]:=forms(dispbuf[y],ScreenWidth);
end;
end;
20 : dispbuf[y]:=AutoShow;
end;
if show then begin
lcol(y,p);
moff;
fwrt(1,3+y+ya,dispbuf[y]);
mon;
end;
disprec[y]:=dbRecNo(dispdat);
end;
procedure RedispLine;
begin
write_disp_line(p,p,true);
end;
procedure display(p:shortint);
var i,j : integer;
mi : shortint;
begin
i:=1;
fillchar(disprec,sizeof(disprec),0);
mi:=dbGetIndex(mbase);
if (dispmode=11) or (dispmode=12) then dbSetIndex(mbase,0);
repeat
write_disp_line(i,p,true);
inc(i);
until (i > gl) or not Forth; // !!! Achtung: Seiteneffekt von Forth
dbSetIndex(mbase,mi);
if i<=gl then begin
if dispmode<10 then attrtxt(col.colbretter)
else attrtxt(col.colmsgs);
clwin(1,screenwidth,3+i+ya,3+ya+gl);
for j:=i to gl do dispbuf[j]:='';
end;
aufbau:=false;
if dispmode=12 then xaufbau:=false;
mdisplay:=false;
end;
procedure redisplay(p:shortint);
var i,bp : integer;
begin
i:=1;
bp:=bezpos;
while (i<=gl) and (disprec[i]<>0) do begin
dbGo(mbase,disprec[i]);
bezpos:=i;
write_disp_line(i,p,true);
inc(i);
end;
bezpos:=bp;
if i<=gl then begin
if dispmode<10 then attrtxt(col.colbretter)
else attrtxt(col.colmsgs);
clwin(1,screenwidth,3+i+ya,3+ya+gl);
end;
mdisplay:=false;
end;
procedure scrollup(show:boolean);
var
i : integer;
s : string;
begin
s:=dispbuf[1];
for i:= 2 to maxgl do
dispbuf[i-1]:= dispbuf[i];
dispbuf[maxgl]:= s;
Move(disprec[2],disprec[1],sizeof(disprec)-4);
disprec[maxgl]:=0;
Move(markflag[2],markflag[1],sizeof(markflag)-1);
Move(userflag[2],userflag[1],sizeof(userflag)-1);
if show then begin
moff;
for i:=1 to gl-1 do begin
lcol(i,0);
fwrt(1,i+3+ya,dispbuf[i]);
end;
mon;
end;
end;
procedure scrolldown(show:boolean);
var
i : integer;
s : string;
begin
s:= dispbuf[maxgl];
for i:= maxgl downto 2 do
dispbuf[i]:= dispbuf[i-1];
dispbuf[1]:= s;
Move(disprec[1],disprec[2],sizeof(disprec)-4);
Move(markflag[1],markflag[2],sizeof(markflag)-1);
Move(userflag[1],userflag[2],sizeof(userflag)-1);
if show then begin
moff;
for i:=2 to gl do begin
lcol(i,0);
fwrt(1,i+3+ya,dispbuf[i]);
end;
mon;
end;
end;