Debian Codegraph @

gcc/testsuite/gm2/pim/run/pass/varparam3.mod

raw
1 (* Copyright (C) 2005, 2006 Free Software Foundation, Inc. *)
2 (* This file is part of GNU Modula-2.
3
4 GNU Modula-2 is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
7 version.
8
9 GNU Modula-2 is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 for more details.
13
14 You should have received a copy of the GNU General Public License along
15 with gm2; see the file COPYING. If not, write to the Free Software
16 Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *)
17
18 MODULE varparam3 ;
19
20 TYPE
21 InputModes = BITSET;
22 OutputModes = BITSET;
23 ControlModes = BITSET;
24 LineModes = BITSET;
25 TermIO =
26 RECORD
27 inputmodes: InputModes;
28 outputmodes: OutputModes;
29 controlmodes: ControlModes;
30 linemodes: LineModes;
31 linedisc: CHAR;
32 END;
33
34 CTermIO =
35 RECORD
36 iflag1, iflag2: CHAR;
37 oflag1, oflag2: CHAR;
38 cflag1, cflag2: CHAR;
39 lflag1, lflag2: CHAR;
40 line: CHAR;
41 c1, c2, c3, c4, c5, c6, c7, c8: CHAR;
42 END;
43
44 PROCEDURE GetTermIO(fd: CARDINAL; VAR termio: TermIO) : BOOLEAN;
45 VAR
46 ctermio: CTermIO;
47
48 PROCEDURE Convert(flag1, flag2: CHAR; VAR bs: BITSET);
49 BEGIN
50 bs := BITSET( ORD(flag1)*100H + ORD(flag2) );
51 END Convert;
52
53 BEGIN
54 WITH termio DO
55 WITH ctermio DO
56 Convert(iflag1, iflag2, inputmodes);
57 END;
58 END;
59 RETURN TRUE
60 END GetTermIO;
61
62 VAR
63 t: TermIO ;
64 BEGIN
65 IF GetTermIO(0, t)
66 THEN
67 END
68 END varparam3.