From f823ded57f24b2786e4dde68f4a7e9f2ac3afe17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Santos=20Costa?= Date: Fri, 26 Feb 2016 17:35:20 +0000 Subject: [PATCH] Avoid warning & fix compilation scripts --- H/generated/h0globals.h | 2 +- H/generated/hglobals.h | 2 +- misc/GLOBALS | 2 +- misc/buildlocalglobal | 10 +++------- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/H/generated/h0globals.h b/H/generated/h0globals.h index 59c00abb9..ff3fbf9bd 100644 --- a/H/generated/h0globals.h +++ b/H/generated/h0globals.h @@ -111,7 +111,7 @@ EXTERNAL char GLOBAL_pwd[YAP_FILENAME_MAX]; #endif //udi.c //struct udi_control_block RtreeCmd void -EXTERNAL char* GLOBAL_RestoreFile; +EXTERNAL const char* GLOBAL_RestoreFile; //gprof.c EXTERNAL Int GLOBAL_ProfCalls; EXTERNAL Int GLOBAL_ProfGCs; diff --git a/H/generated/hglobals.h b/H/generated/hglobals.h index 153b37d00..c24c3fd2a 100644 --- a/H/generated/hglobals.h +++ b/H/generated/hglobals.h @@ -111,7 +111,7 @@ typedef struct global_data { #endif //udi.c //struct udi_control_block RtreeCmd void - char* RestoreFile_; +const char* RestoreFile_; //gprof.c Int ProfCalls_; Int ProfGCs_; diff --git a/misc/GLOBALS b/misc/GLOBALS index 7c2842a13..5aae6e7fc 100755 --- a/misc/GLOBALS +++ b/misc/GLOBALS @@ -131,7 +131,7 @@ char pwd[YAP_FILENAME_MAX] void //udi.c //struct udi_control_block RtreeCmd void -char* RestoreFile void +const char* RestoreFile void //gprof.c Int ProfCalls void diff --git a/misc/buildlocalglobal b/misc/buildlocalglobal index 529c9d314..cc7f43a51 100644 --- a/misc/buildlocalglobal +++ b/misc/buildlocalglobal @@ -121,19 +121,19 @@ gen_0struct(Inp,Out) :- Inp = "ATOMS", !, Out = "#include \"tatoms.h\"". gen_0struct(Inp,Out) :- - split(Inp," ",["struct",Type, Field|L]), !, + split(Inp," ",["struct"|_L]), !, extract("struct", Inp, NInp), gen_0struct( NInp, NOut ), extract("EXTERNAL", NOut, IOut), append("EXTERNAL struct ", IOut, Out). gen_0struct(Inp,Out) :- - split(Inp," ",["const",Type, Field|L]), !, + split(Inp," ",["const"|_L]), !, extract("const", Inp, NInp), gen_0struct( NInp, NOut ), extract("EXTERNAL", NOut, IOut), append("EXTERNAL const ", IOut, Out). gen_0struct(Inp,Out) :- - split(Inp," ",["union",Type, Field|L]), !, + split(Inp," ",["union"|_L]), !, extract("union", Inp, NInp), gen_0struct( NInp, NOut ), extract("EXTERNAL", NOut, IOut), @@ -495,7 +495,3 @@ extract([0'\t |H], IF) :- !, extract( H, IF). extract(H,H). - - - -