1 /* This file is part of the program psim.
3 Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, see <http://www.gnu.org/licenses/>.
29 lf_print__c_code(lf
*file
,
33 const char *chp
= code
;
35 while (*chp
!= '\0') {
39 lf_indent_suppress(file
);
40 while (*chp
!= '\0' && *chp
!= '\n') {
41 if (chp
[0] == '{' && !isspace(chp
[1])) {
43 nr
+= lf_putchr(file
, '_');
45 else if (in_bit_field
&& chp
[0] == ':') {
46 nr
+= lf_putchr(file
, '_');
48 else if (in_bit_field
&& *chp
== '}') {
49 nr
+= lf_putchr(file
, '_');
53 nr
+= lf_putchr(file
, *chp
);
58 ERROR("bit field paren miss match some where\n");
60 nr
+= lf_putchr(file
, '\n');
64 nr
+= lf_putchr(file
, '\n');