*** - Tue Nov 8 15:58:09 1994 --- unsupported/programs/ixx/generator.h Tue Nov 8 15:58:21 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XConsortium: generator.h,v 1.4 94/11/08 20:57:08 matt Exp $ */ /* * Copyright (c) 1992-1993 Silicon Graphics, Inc. * Copyright (c) 1993 Fujitsu, Ltd. *************** *** 142,148 **** const char* trail ); Boolean emit_scope(Scope*); ! Boolean emit_extern_stubs(Expr* type); void emit_put(Expr* type, char* format, Expr* value); void emit_array_setup(Declarator* d, Expr* t, Boolean is_put); --- 143,150 ---- const char* trail ); Boolean emit_scope(Scope*); ! Boolean need_ifndef(); ! Boolean emit_extern_stubs(Expr* type); void emit_put(Expr* type, char* format, Expr* value); void emit_array_setup(Declarator* d, Expr* t, Boolean is_put); *************** *** 196,201 **** --- 198,204 ---- Boolean cstubs_; const char* ptr_; Boolean source_; + Boolean need_ifndef_; Boolean qualify_; Boolean concat_; Boolean need_sep_; *** - Tue Nov 8 15:58:10 1994 --- unsupported/programs/ixx/generator.cxx Tue Nov 8 15:58:23 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XConsortium: generator.cxx,v 1.5 94/11/08 20:57:08 matt Exp $ */ /* * Copyright (c) 1992-1993 Silicon Graphics, Inc. * Copyright (c) 1993 Fujitsu, Ltd. *************** *** 80,85 **** --- 81,87 ---- cstubs_ = i.cstubs; ptr_ = nil; source_ = true; + need_ifndef_ = true; qualify_ = true; concat_ = false; varying_ = do_varying(); *************** *** 156,161 **** --- 158,166 ---- Boolean Generator::is_source() { return source_; } + Boolean Generator::need_ifndef() { return need_ifndef_; } + + Boolean Generator::begin_file(FILE* f) { if (f != nil) { fflush(out_); *************** *** 677,682 **** --- 682,688 ---- emit_filename(filename); emit("\n\n"); files_->prepend(new CopyString(*filename)); + need_ifndef_ = false; } void Generator::emit_endif(String* filename) { *** - Tue Nov 8 15:58:11 1994 --- unsupported/programs/ixx/gen-hdr.cxx Tue Nov 8 15:58:25 1994 *************** *** 1,3 **** --- 1,4 ---- + /* $XConsortium: gen-hdr.cxx,v 1.5 94/11/08 20:57:08 matt Exp $ */ /* * Copyright (c) 1992-1993 Silicon Graphics, Inc. * Copyright (c) 1993 Fujitsu, Ltd. *************** *** 840,846 **** FileName name = p->filename(); LineNumber n = p->lineno(); if (g->is_source()) { ! if (n == 1) { g->emit_ifndef(name); g->emit_includes(); } else { --- 841,847 ---- FileName name = p->filename(); LineNumber n = p->lineno(); if (g->is_source()) { ! if (g->need_ifndef()) { g->emit_ifndef(name); g->emit_includes(); } else {