Commit 75adcf68 authored by Pascal J. Bourguignon's avatar Pascal J. Bourguignon

Corrected parsing of script header. Moved scripts/ to servers/; moved lse scripts to scripts/.

parent 40328790
......@@ -6,7 +6,7 @@
# Un script LSE moderne sur systeme unix:
--mode-moderne --fleches-ascii --affichage-mixte --sans-bip
# --debogue-sur-erreur
# --deboguer-sur-erreur
# Ce script affiche quelques variables d'environnement et
# les arguments.
......
#!/usr/local/bin/lse --
# -*- mode:lse;coding:utf-8 -*-
--mode-moderne --fleches-ascii --affichage-mixte --sans-bip
--debogue-sur-erreur
# --deboguer-sur-erreur
# Ce script termine avec comme status son argument.
1 STATU_0
4 SI NARG()<1 ALORS DEBUT &E('Il manque un argument.');&U(ARG(0));STATU_1;TERMINER FIN
6 SI LGR(ARG(1))=0 ALORS DEBUT &E('L''argument ne doit pas être une chaîne vide.');&U(ARG(0));STATUS_2;TERMINER FIN
8 STATU_CNB(ARG(1),1)
10 AFFICHER['status=',U,/]STATU
12 AFFICHER 'HI'
14 AFFICHER LISP('(command-status *task*)',1,1)
16 TERMINER
2 SI NARG()<1 ALORS DEBUT &E('Il manque un argument.');&U(ARG(0));STATU_1;TERMINER FIN
3 SI LGR(ARG(1))=0 ALORS DEBUT &E('L''argument ne doit pas être une chaîne vide.');&U(ARG(0));STATUS_2;TERMINER FIN
4 STATU_CNB(ARG(1),1)
5 AFFICHER['status=',U,/]STATU
6 TERMINER
100 PROCEDURE &E(MSG) LOCAL MSG
101 AFFICHER['Erreur: ',U,/]MSG
102 RETOUR
......
0.9998789000000045
\ No newline at end of file
0.9998729000000043
\ No newline at end of file
......@@ -182,14 +182,14 @@ DO: Parse a script file at the given PATH.
:for ch = (peek-char nil stream nil nil)
:do (case ch
((#\space)
(setf state :inline)
(read-char stream))
(read-char stream)
(setf state :inline))
((#\newline)
(setf state :newline)
(read-char stream))
(read-char stream)
(setf state :newline))
((#\#)
(setf state :inline)
(read-line stream))
(read-line stream)
(setf state :newline))
((#\-)
(setf state :inline)
(push (coerce (loop
......@@ -359,11 +359,9 @@ RETURN: EX-OK
#-(and) (*trace-output* (make-broadcast-stream)))
(setf *task* task) ; to help debugging, we keep the task in the global binding.
(or (parse-options (or args (arguments)) nil (function process-argument) nil)
(progn
(if (options-script-stream *options*)
(script *options* task terminal)
(interactive *options* task terminal))
ex-ok)))))
(if (options-script-stream *options*)
(script *options* task terminal)
(interactive *options* task terminal))))))
(error (err)
(format *error-output* "~&ERREUR: ~A~%" err)
(finish-output *error-output*)
......
1.0.0-0.999879-CCL-LINUX
\ No newline at end of file
1.0.0-0.999873-CCL-DARWIN
\ No newline at end of file
1.0.0-0.999879-CCL-LINUX,
commit 72e34704dbf663ecc36add8a78479dfad75c0375,
compiled 2014-06-29 14:43:25,
on kuiper
\ No newline at end of file
1.0.0-0.999873-CCL-DARWIN,
commit 403287903cf2b709cb5e2d6c7a3c7905be2833ed,
compiled 2014-06-29 15:06:51,
on larissa.local
\ No newline at end of file
1.0.0-0.999879
\ No newline at end of file
1.0.0-0.999873
\ No newline at end of file
Markdown is supported
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