summaryrefslogtreecommitdiff
path: root/tex/context/base/core-sys.mkiv
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2012-10-19 01:20:13 +0300
committerMarius <mariausol@gmail.com>2012-10-19 01:20:13 +0300
commit69d2352af4b60929b37fc49f3bdb263977016244 (patch)
treedb5eb11398e345dfa23b4c4500fb93575d2afb7c /tex/context/base/core-sys.mkiv
parentc18f7cbe51449a611ea1819fedd9a4ff18529b7d (diff)
downloadcontext-69d2352af4b60929b37fc49f3bdb263977016244.tar.gz
stable 2012.05.30 11:26
Diffstat (limited to 'tex/context/base/core-sys.mkiv')
-rw-r--r--tex/context/base/core-sys.mkiv80
1 files changed, 23 insertions, 57 deletions
diff --git a/tex/context/base/core-sys.mkiv b/tex/context/base/core-sys.mkiv
index 249500e0a..66f2a4380 100644
--- a/tex/context/base/core-sys.mkiv
+++ b/tex/context/base/core-sys.mkiv
@@ -36,31 +36,21 @@
%D line ending. I hate this mess.
\edef\operatingsystem {\cldcontext{os.platform}}
-
-%D The jobname is what gets loaded by the cont-yes stub file. This name
-%D also determines the name of tuc etc files.
-
-\def \jobfilename {\cldcontext{environment.jobfilename or ""}}
-\def \jobfilesuffix {\cldcontext{environment.jobfilesuffix or ""}}
-
-%D However, that one can itself load another file.
-
-\def \inputfilebarename {\cldcontext{environment.inputfilebarename or ""}}
-\def \inputfilerealsuffix{\cldcontext{environment.inputfilerealsuffix or ""}}
-\def \inputfilesuffix {\cldcontext{environment.inputfilesuffix or ""}}
-\def \inputfilename {\cldcontext{environment.inputfilename or ""}}
-
-%D The output name is only used for some checking.
-
-\def \outputfilename {\cldcontext{environment.outputfilename or ""}}
+\def \jobfilename {\cldcontext{environment.jobfilename or ""}}
+\def \jobfilesuffix {\cldcontext{environment.jobfilesuffix or ""}}
+\def \inputfilebarename{\cldcontext{environment.inputfilebarename or ""}}
+\def \inputfilesuffix {\cldcontext{environment.inputfilesuffix or ""}}
+\def \inputfilename {\cldcontext{environment.inputfilename or ""}}
+\def \outputfilename {\cldcontext{environment.outputfilename or ""}}
\installcorenamespace{system}
\installdirectcommandhandler \??system {system}
\appendtoks
-% \edef\outputfilename {\directsystemparameter\c!file }%
-% \edef\inputfilename {\directsystemparameter\c!inputfile }%
+ \edef\outputresolution{\directsystemparameter\c!resolution}%
+ \edef\outputfilename {\directsystemparameter\c!file }%
+ \edef\inputfilename {\directsystemparameter\c!inputfile }%
\to \everysetupsystem
\appendtoks
@@ -85,9 +75,9 @@
\setsystemmode{suffix-\m_system_job_suffix}%
\to \everysetupsystem
-% \appendtoks
-% \ctxcommand{updatefilenames("\jobame","\inputfilename","\outputfilename")}%
-% \to \everysetupsystem
+\appendtoks
+ \ctxcommand{updatefilenames("\inputfilename","\outputfilename")}%
+\to \everysetupsystem
% Some mechanisms (see x-res-01) use either \jobfilename or
% \jobfilename.somesuffix, in which case we need to use the
@@ -114,10 +104,6 @@
%D \NC \type{\operatingsystem} \NC \operatingsystem \NC \NR
%D \stoptabulate
-\appendtoks
- \edef\outputresolution{\directsystemparameter\c!resolution}%
-\to \everysetupsystem
-
%D The system modes set by the setup command can be used in
%D situations like:
%D
@@ -152,9 +138,9 @@
[\c!directory=,
\c!n=0, % 0:unknown 1: one run 2: first 3: successive 4: final run
\c!resolution=600,% in dpi, no unit in mkiv
- % \c!random=, % obsolete here
- % \c!file=\jobname,
- % \c!inputfile=\outputfilename,
+ %c!random=, % obsolete here
+ \c!file=\jobname,
+ \c!inputfile=\outputfilename,
\c!type=unix, % windows is normally less sensitive to handle
\c!bodyfont=\normalizedlocalbodyfontsize] % of iets anders
@@ -164,34 +150,14 @@
%D But anyway, in \MKIV\ we avoid most of the complications anyway as we
%D deal with much at the \LUA\ end.
-\unexpanded\def\start
- {\dosingleempty\syst_start}
-
-\def\syst_start
- {\bgroup
- \iffirstargument
- \expandafter\syst_start_yes
- \else
- \expandafter\syst_start_nop
- \fi}
-
-\def\syst_start_yes[#1]%
- {\edef\m_syst_start_stop{#1}%
- \ifx\m_syst_start_stop\empty
- \let\syst_stop_indeed\donothing
- \else\ifcsname\e!start\m_syst_start_stop\endcsname
- \let\expandafter\syst_stop_indeed\csname\e!stop\m_syst_start_stop\endcsname
- \csname\e!start\currentstartstop\expandafter\expandafter\expandafter\endcsname
- \else
- \let\syst_stop_indeed\donothing
- \fi\fi}
-
-\def\syst_start_nop[#1]%
- {\let\syst_stop_indeed\donothing}
-
-\unexpanded\def\stop
- {\syst_stop_indeed
- \egroup}
+\def\complexstart[#1]{\bgroup\getvalue{\e!start#1}}
+\def\complexstop [#1]{\getvalue{\e!stop #1}\egroup}
+
+\let\simplestart\bgroup
+\let\simplestop \egroup
+
+\definecomplexorsimple\start
+\definecomplexorsimple\stop
% \c!before \c!after \c!inbetween \c!commands \c!style \c!color