X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginsh%2Fginsh_lexer.lpp;h=4218193e1a563630a05fb616cfa3ccf0ed596910;hp=b33763b383276029b1e0dab266601d7bcdab9c4c;hb=69815a366be5ca81185386d94268d7e7dcce94e3;hpb=faf8c206bdcd01eee758103d56b83a634f787e7a diff --git a/ginsh/ginsh_lexer.lpp b/ginsh/ginsh_lexer.lpp index b33763b3..4218193e 100644 --- a/ginsh/ginsh_lexer.lpp +++ b/ginsh/ginsh_lexer.lpp @@ -4,7 +4,7 @@ * This file must be processed with flex. */ /* - * GiNaC Copyright (C) 1999-2015 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2020 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,6 +38,9 @@ #include "ginsh.h" #include "ginsh_parser.hpp" +using namespace std; +using namespace GiNaC; + #define YY_INPUT(buf, result, max_size) (result = ginsh_input(buf, max_size)) // Table of all used symbols @@ -144,7 +147,7 @@ real_symbols return T_REAL_SYMBOLS; */ static int line_length = 0; -static char *line_read = NULL; +static char *line_read = nullptr; static char *line_ptr; // Input function that uses libreadline for interactive input @@ -208,7 +211,7 @@ static int ginsh_input(char *buf, int max_size) // List of input files to be processed int num_files = 0; -char **file_list = NULL; +char **file_list = nullptr; // EOF encountered, connect to next file. If this was the last file, // connect to stdin. If this was stdin, terminate the scanner. @@ -220,7 +223,7 @@ int yywrap() fclose(yyin); if (num_files) { yyin = fopen(*file_list, "r"); - if (yyin == NULL) { + if (yyin == nullptr) { cerr << "Can't open " << *file_list << endl; return 1; }