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
51 Sun, Sun Microsystems and the Sun logo are trademarks or registered
52 trademarks of Sun Microsystems, Inc.
56 Mountain View, California 94043
60 SunOS, SunSoft, Sun, Solaris, Sun Microsystems or the Sun logo are
61 trademarks or registered trademarks of Sun Microsystems, Inc.
65 // Initialization for IDL compiler driver program
68 #include "idl_extern.h"
69 #include "drv_private_ifr.h"
70 #include "be_extern.h"
74 const size_t LOCAL_ESCAPES_BUFFER_SIZE
= 1024;
79 // Initialize FE global data object.
83 // Initialize some of its data.
84 idl_global
->set_root (0);
85 idl_global
->set_gen (0);
86 idl_global
->set_err (FE_new_UTL_Error ());
87 idl_global
->set_err_count (0);
88 idl_global
->set_indent (FE_new_UTL_Indenter ());
89 idl_global
->set_filename (0);
90 idl_global
->set_main_filename (0);
91 idl_global
->set_real_filename (0);
92 idl_global
->set_stripped_filename (0);
93 idl_global
->set_import (I_TRUE
);
94 idl_global
->set_in_main_file (I_FALSE
);
95 idl_global
->set_lineno (-1);
96 idl_global
->set_prog_name (0);
98 #if defined (TAO_IDL_PREPROCESSOR)
99 idl_global
->set_cpp_location (TAO_IDL_PREPROCESSOR
);
100 #elif defined (ACE_CC_PREPROCESSOR)
101 idl_global
->set_cpp_location (ACE_CC_PREPROCESSOR
);
103 // Just default to cc.
104 idl_global
->set_cpp_location ("cc");
105 #endif /* TAO_IDL_PREPROCESSOR */
107 char local_escapes
[LOCAL_ESCAPES_BUFFER_SIZE
];
108 ACE_OS::memset (&local_escapes
,
110 LOCAL_ESCAPES_BUFFER_SIZE
);
112 idl_global
->set_local_escapes (local_escapes
);
113 idl_global
->set_be ("");
114 idl_global
->set_compile_flags (0);
115 idl_global
->set_read_from_stdin (I_FALSE
);
116 idl_global
->set_include_file_names (0);
117 idl_global
->set_n_include_file_names (0);
118 idl_global
->set_parse_state (IDL_GlobalData::PS_NoState
);
120 // Initialize BE global data object.
124 // Initialize driver private data.