From 1e357b22dc2088b1e2e6ae2b31169e36b204ae81 Mon Sep 17 00:00:00 2001 From: Erwan Jahier <jahier@imag.fr> Date: Fri, 6 Jul 2018 17:30:39 +0200 Subject: [PATCH] Rewrite the read_pragma that was wrong/unfinished/untested/commited by mistake --- Makefile.dev | 1 + _oasis | 2 +- doc/version.tex | 6 +++--- setup.ml | 6 +++--- src/META | 4 ++-- src/luciole.ml | 36 +++++++++--------------------------- src/lutilsVersion.ml | 4 ++-- 7 files changed, 21 insertions(+), 38 deletions(-) diff --git a/Makefile.dev b/Makefile.dev index 89bbb65..3c5a9f1 100644 --- a/Makefile.dev +++ b/Makefile.dev @@ -80,6 +80,7 @@ HTTPTEST=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/test OPAM_FILE=$(shell find $(WWW)/opam-repository/packages -name opam -cmin -1 | sed -e 's/^./\U&/') +OPAM_FILE_TEST=$(shell find $(WWW)/test/opam-repository/packages -name opam -cmin -1 | sed -e 's/^./\U&/') OPAM_DIR=$(shell dirname $(OPAM_FILE)) OFFICIAL_OPAM_DIR=/home/jahier/local/opam-repository/packages/lutils diff --git a/_oasis b/_oasis index ced2374..a490fa8 100644 --- a/_oasis +++ b/_oasis @@ -1,6 +1,6 @@ OASISFormat: 0.4 Name: lutils -Version: 1.46 +Version: 1.47 Authors: Erwan Jahier Maintainers: erwan.jahier@imag.fr License: CeCILL diff --git a/doc/version.tex b/doc/version.tex index 7c83d82..78ce4e3 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1,4 +1,4 @@ -\newcommand{\version}{1.46} -\newcommand{\sha}{d01c84d} +\newcommand{\version}{1.47} +\newcommand{\sha}{5ccef6c} \newcommand{\versionname}{none} -\newcommand{\versiondate}{02-07-18} +\newcommand{\versiondate}{06-07-18} diff --git a/setup.ml b/setup.ml index e001bbe..7127ad3 100644 --- a/setup.ml +++ b/setup.ml @@ -1,7 +1,7 @@ (* setup.ml generated for the first time by OASIS v0.4.10 *) (* OASIS_START *) -(* DO NOT EDIT (digest: 2ae3819f5977d694e4bf88427233327d) *) +(* DO NOT EDIT (digest: 47b927d7c777c07448135f2fda8d07e9) *) (* Regenerated by OASIS v0.4.10 Visit http://oasis.forge.ocamlcore.org for more information and @@ -6855,7 +6855,7 @@ let setup_t = { oasis_version = "0.4"; ocaml_version = Some (OASISVersion.VGreaterEqual "4.02"); - version = "1.46"; + version = "1.47"; license = OASISLicense.DEP5License (OASISLicense.DEP5Unit @@ -7256,7 +7256,7 @@ let setup_t = }; oasis_fn = Some "_oasis"; oasis_version = "0.4.10"; - oasis_digest = Some "ixQ]\168D\n\210I\234D\245\169[\179\146"; + oasis_digest = Some "\235\021\204\007>\\j\2124C\251\165RWP\238"; oasis_exec = None; oasis_setup_args = []; setup_update = false diff --git a/src/META b/src/META index 0880383..11e3d62 100644 --- a/src/META +++ b/src/META @@ -1,6 +1,6 @@ # OASIS_START -# DO NOT EDIT (digest: 356fdf934b612fa848f703df2b2f071f) -version = "1.46" +# DO NOT EDIT (digest: bf8172c86adedb3828b5e12fde134b83) +version = "1.47" description = "shared by Verimag/synchronous tools (lustre, lutin, rdbg)." requires = "unix str camlp4 num" archive(byte) = "lutils.cma" diff --git a/src/luciole.ml b/src/luciole.ml index 99377d0..9a1c0cc 100644 --- a/src/luciole.ml +++ b/src/luciole.ml @@ -1,4 +1,4 @@ -(* Time-stamp: <modified the 02/07/2018 (at 17:35) by Erwan Jahier> *) +(* Time-stamp: <modified the 06/07/2018 (at 15:47) by Erwan Jahier> *) (*----------------------------------------------------------------------- ** This file may only be copied under the terms of the GNU Library General ** Public License @@ -165,36 +165,18 @@ struct dro_desc_t { pn "}"; pn " -void _read_pragma(char b[512]) { +void _read_pragma(char b[]) { int s = 1; - char c; - int i = 0; - - char reset [5]=\"reset\"; - int resetl=5; - _bool reco_reset=1; - char quit [4]=\"quit\"; - int quitl=4; - _bool reco_quit=1; - if(scanf(\"%s\", b)==EOF) exit(0); - while (1) - { - s = sscanf(b, \"%c\", &c); - if (c == '\\n') return; - reco_reset = reco_reset && i < resetl && c == reset[i]; - reco_quit = reco_quit && i < quitl && c == quit[i]; - i++; - if (reco_reset && i == resetl) __do_reset(); - if (reco_quit && i == quitl) exit(0); - return 0; - } + if (!strcmp(b,\"#quit\")) exit(0); + if (!strcmp(b,\"#q\")) exit(0); + if (!strcmp(b,\"#reset\")) __do_reset(); + return; } - /* Standard Input procedures **************/ _bool _get_bool(){ - char b[512]; + char b[]; _bool r = 0; int s = 1; char c; @@ -210,7 +192,7 @@ _bool _get_bool(){ return r; } _int _get_int(){ - char b[512]; + char b[]; _int r; int s = 1; char c; @@ -227,7 +209,7 @@ _int _get_int(){ return r; } _real _get_real(){ - char b[512]; + char b[]; _real r; int s = 1; char c; diff --git a/src/lutilsVersion.ml b/src/lutilsVersion.ml index 30b2bff..b8a117a 100644 --- a/src/lutilsVersion.ml +++ b/src/lutilsVersion.ml @@ -1,2 +1,2 @@ -let str="1.46" -let sha="d01c84d" +let str="1.47" +let sha="5ccef6c" -- GitLab