Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / TAO_IDL / fe / fe_extern.cpp
blob8ac504dda9e78a25f1f3db4e49bed7b430fff1ab
1 /*
3 COPYRIGHT
5 Copyright 1992, 1993, 1994 Sun Microsystems, Inc. Printed in the United
6 States of America. All Rights Reserved.
8 This product is protected by copyright and distributed under the following
9 license restricting its use.
11 The Interface Definition Language Compiler Front End (CFE) is made
12 available for your use provided that you include this license and copyright
13 notice on all media and documentation and the software program in which
14 this product is incorporated in whole or part. You may copy and extend
15 functionality (but may not remove functionality) of the Interface
16 Definition Language CFE without charge, but you are not authorized to
17 license or distribute it to anyone else except as part of a product or
18 program developed by you or with the express written consent of Sun
19 Microsystems, Inc. ("Sun").
21 The names of Sun Microsystems, Inc. and any of its subsidiaries or
22 affiliates may not be used in advertising or publicity pertaining to
23 distribution of Interface Definition Language CFE as permitted herein.
25 This license is effective until terminated by Sun for failure to comply
26 with this license. Upon termination, you shall destroy or return all code
27 and documentation for the Interface Definition Language CFE.
29 INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED AS IS WITH NO WARRANTIES OF
30 ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS
31 FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR ARISING FROM A COURSE OF
32 DEALING, USAGE OR TRADE PRACTICE.
34 INTERFACE DEFINITION LANGUAGE CFE IS PROVIDED WITH NO SUPPORT AND WITHOUT
35 ANY OBLIGATION ON THE PART OF Sun OR ANY OF ITS SUBSIDIARIES OR AFFILIATES
36 TO ASSIST IN ITS USE, CORRECTION, MODIFICATION OR ENHANCEMENT.
38 SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES SHALL HAVE NO LIABILITY WITH
39 RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY
40 INTERFACE DEFINITION LANGUAGE CFE OR ANY PART THEREOF.
42 IN NO EVENT WILL SUN OR ANY OF ITS SUBSIDIARIES OR AFFILIATES BE LIABLE FOR
43 ANY LOST REVENUE OR PROFITS OR OTHER SPECIAL, INDIRECT AND CONSEQUENTIAL
44 DAMAGES, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
46 Use, duplication, or disclosure by the government is subject to
47 restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in
48 Technical Data and Computer Software clause at DFARS 252.227-7013 and FAR
49 52.227-19.
51 Sun, Sun Microsystems and the Sun logo are trademarks or registered
52 trademarks of Sun Microsystems, Inc.
54 SunSoft, Inc.
55 2550 Garcia Avenue
56 Mountain View, California 94043
58 NOTE:
60 SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
61 trademarks or registered trademarks of Sun Microsystems, Inc.
66 * fe_extern.cc - export FE interfaces to driver
69 #include "fe_extern.h"
71 #include "global_extern.h"
72 #include "utl_err.h"
73 #include "utl_indenter.h"
75 #include "ast_root.h"
77 #include "ace/OS_NS_stdio.h"
79 extern int tao_yyparse ();
81 #ifdef USE_MCPP_BUFFER_LEXING
82 char *tao_preproc_buffer = 0;
83 int tao_preproc_buffer_length = 0;
84 int tao_preproc_buffer_pos = 0;
85 #else
86 extern FILE *tao_yyin;
87 #endif /* USE_MCPP_BUFFER_LEXING */
89 int
90 FE_yyparse ()
92 int const result = tao_yyparse ();
94 #ifdef USE_MCPP_BUFFER_LEXING
95 ACE_OS::free (tao_preproc_buffer);
96 tao_preproc_buffer_length = 0;
97 tao_preproc_buffer_pos = 0;
98 #else
99 if (tao_yyin)
101 ACE_OS::fclose (tao_yyin);
103 #endif /* USE_MCPP_BUFFER_LEXING */
105 return result;
108 extern int tao_yydebug;
109 void FE_yydebug (bool value)
111 tao_yydebug = value;
114 #ifdef USE_MCPP_BUFFER_LEXING
115 void
116 FE_set_yyin (char * f)
118 tao_preproc_buffer = f;
119 tao_preproc_buffer_length = ACE_OS::strlen (f);
121 #else
122 void
123 FE_set_yyin (FILE * f)
125 tao_yyin = f;
127 #endif /* USE_MCPP_BUFFER_LEXING */
129 // Constructor interfaces.
131 UTL_Error *
132 FE_new_UTL_Error ()
134 UTL_Error *retval = nullptr;
135 ACE_NEW_RETURN (retval,
136 UTL_Error,
137 nullptr);
139 return retval;
142 UTL_Indenter *
143 FE_new_UTL_Indenter ()
145 UTL_Indenter *retval = nullptr;
146 ACE_NEW_RETURN (retval,
147 UTL_Indenter,
148 nullptr);
150 return retval;