*/
%{
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifdef HAVE_RUSAGE
#include <sys/resource.h>
#else
#include <ctime>
#endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_UNISTD_H
#include <sys/types.h>
#include <unistd.h>
#endif
%%
// Error print routine
-int yyerror(char *s)
+int yyerror(const char *s)
{
cerr << s << " at " << yytext << endl;
return 0;
// All registered GiNaC functions
namespace GiNaC {
-void ginsh_get_ginac_functions(void)
+static void ginsh_get_ginac_functions(void)
{
- vector<function_options>::const_iterator i = function::registered_functions().begin(), end = function::registered_functions().end();
+ vector<function_options> gfv = function::get_registered_functions();
+ vector<function_options>::const_iterator i = gfv.begin(), end = gfv.end();
unsigned serial = 0;
while (i != end) {
fcns.insert(make_pair(i->get_name(), fcn_desc(f_ginac_function, i->get_nparams(), serial)));
void greeting(void)
{
- cout << "ginsh - GiNaC Interactive Shell (" << PACKAGE << " V" << VERSION << ")" << endl;
+ cout << "ginsh - GiNaC Interactive Shell (GiNaC V" << GINACLIB_VERSION << ")" << endl;
cout << " __, _______ Copyright (C) 1999-2011 Johannes Gutenberg University Mainz,\n"
<< " (__) * | Germany. This is free software with ABSOLUTELY NO WARRANTY.\n"
<< " ._) i N a C | You are welcome to redistribute it under certain conditions.\n"