Commit 1e357b22 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Rewrite the read_pragma that was wrong/unfinished/untested/commited by mistake

parent 5ccef6ca
Pipeline #9628 passed with stages
in 4 minutes and 11 seconds
......@@ -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
......
OASISFormat: 0.4
Name: lutils
Version: 1.46
Version: 1.47
Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr
License: CeCILL
......
\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}
(* 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
......
# 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"
......
(* 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;
......
let str="1.46"
let sha="d01c84d"
let str="1.47"
let sha="5ccef6c"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment