Mercurial > hg > octave-nkf
changeset 487:b7539a7224cc
[project @ 1994-07-06 14:26:10 by jwe]
Initial revision
author | jwe |
---|---|
date | Wed, 06 Jul 1994 14:26:10 +0000 |
parents | dd927583cc41 |
children | 4481fdfb01b4 |
files | src/Stack.cc |
diffstat | 1 files changed, 71 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/src/Stack.cc @@ -0,0 +1,71 @@ +// Template stack class -*- C++ -*- +/* + +Copyright (C) 1993, 1994 John W. Eaton + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, write to the Free +Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +// Maybe this will work with 2.6.x and beyond? + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#if defined (__GNUG__) && defined (USE_EXTERNAL_TEMPLATES) +#pragma implementation +#endif + +#include <iostream.h> + +#include "Stack.h" + +template <class T> +void +Stack<T>::error (const char *msg) +{ + cerr << msg; +} + +#ifdef __GNUG__ +#if defined (OCTAVE_SOURCE) && defined (USE_EXTERNAL_TEMPLATES) + +typedef Stack<int> stack_type_int; +typedef Stack<char *> stack_type_p_char; + +#include "symtab.h" +typedef Stack<symbol_def *> stack_type_p_symbol_def; + +#include "token.h" +typedef Stack<token *> stack_type_p_token; + +#include "tree.h" +typedef Stack<tree_matrix *> stack_type_p_tree_matrix; + +#include "unwind-prot.h" +typedef Stack<unwind_elem> stack_type_unwind_elem; + +#endif +#endif + +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; page-delimiter: "^/\\*" *** +;;; End: *** +*/