summaryrefslogtreecommitdiff
path: root/system/net/1.7.5/src/net report-M
blob: 3ce67fff6ea1d71c930174624704796abf40c58d (plain)
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
PACKET net report DEFINES report: 

LET reportcode = 99;

PROC report (TEXT CONST x):
  report(x,"") 
END PROC report;

PROC report (TEXT CONST txt, info): 
  IF storage (old("report")) > 20 THEN forget ("report",quiet) FI;
  reportfile := sequential file (output, "report");
  put (reportfile, date);
  put (reportfile, time of day);
  put (reportfile, txt); 
  INT VAR i; 
  FOR i FROM 1 UPTO length (info) REP 
    INT VAR z :=  code (infoSUBi)  ;
    IF z < 32 OR z > 126 
      THEN put (reportfile,"%"+text(z)) 
      ELSE put (reportfile,infoSUBi)
    FI
  PER; 
  line (reportfile); 
  DATASPACE VAR net report := old ("report"); 
  send (father, report code , net report)
END PROC report; 
FILE VAR reportfile; 
 
END PACKET net report;