From 0e16fec09402a4da125884902c61ef4166f7d052 Mon Sep 17 00:00:00 2001 From: Christoph Knote Date: Wed, 17 Nov 2021 23:34:41 +0100 Subject: [PATCH] Works --- src/.gitignore | 1 + src/code.h | 3 +++ src/configure.ac | 2 +- src/gen.c | 2 -- src/scan.h | 2 ++ src/scanner.c | 9 --------- src/yacc.l | 2 ++ 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index c226dec..763306e 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -6,3 +6,4 @@ depcomp install-sh missing ylwrap +*.o diff --git a/src/code.h b/src/code.h index 86c4c01..10bff7c 100755 --- a/src/code.h +++ b/src/code.h @@ -186,6 +186,9 @@ extern void (*FunctionPrototipe)( int f, ... ); extern void (*FunctionBegin)( int f, ... ); extern void (*FunctionEnd)( int f ); +void MATLAB_Inline( char *fmt, ... ); +void F90_Inline( char *fmt, ... ); + void WriteDelim(); #endif diff --git a/src/configure.ac b/src/configure.ac index c39c204..6e9aa45 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -7,6 +7,6 @@ dnl we use the build type foreign here instead of gnu because I do not have a NE AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_FILES([Makefile]) AC_PROG_CC -AC_PROG_LEX(yywrap) +AC_PROG_LEX(noyywrap) AC_PROG_YACC AC_OUTPUT diff --git a/src/gen.c b/src/gen.c index a086edc..488deed 100755 --- a/src/gen.c +++ b/src/gen.c @@ -35,8 +35,6 @@ #include "gdata.h" #include "code.h" #include "scan.h" -#include "code_matlab.c" -#include "code_f90.c" #define MAX_MONITOR 8 enum strutypes { PLAIN, LU }; diff --git a/src/scan.h b/src/scan.h index f5ba14f..350fb42 100755 --- a/src/scan.h +++ b/src/scan.h @@ -72,6 +72,8 @@ extern int nError; extern int nWarning; extern int crt_section; +int EqNoCase( char *s1, char *s2 ); + int ParseEquationFile( char * filename ); int Parser( char * filename ); diff --git a/src/scanner.c b/src/scanner.c index c21454e..7f96ff9 100755 --- a/src/scanner.c +++ b/src/scanner.c @@ -36,7 +36,6 @@ #include #include #include -#include int AtomNr = 0; int SpeciesNr = 0; @@ -172,14 +171,6 @@ int n; ScanError("Bad Z grid number <%s>", cmd); } -int EqNoCase( char *s1, char *s2 ) -{ - while( *s1 ) { - if ( toupper(*s1++) != toupper(*s2++) ) return 0; - } - return *s1 == *s2; -} - void CmdFunction( char *cmd ) { if( EqNoCase( cmd, "AGGREGATE" ) ) { diff --git a/src/yacc.l b/src/yacc.l index 53fddce..7b11d96 100755 --- a/src/yacc.l +++ b/src/yacc.l @@ -41,6 +41,8 @@ %s COMMENT COMMENT2 EQN_ID %x INL_CODE +%option noyywrap + %{ #include /* strcpy, strlen */ #include "gdata.h" -- GitLab