diff options
author | Hans Hagen <pragma@wxs.nl> | 2005-01-12 00:00:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2005-01-12 00:00:00 +0100 |
commit | 0fece0253ad71930dc23890d1ae3e1f76b296acb (patch) | |
tree | ee4101915a66616c98023bf6456d5615817b0766 /tex/context/base/supp-fil.tex | |
parent | 5604cb0a875f6114b67391fd279060678a9b7937 (diff) | |
download | context-0fece0253ad71930dc23890d1ae3e1f76b296acb.tar.gz |
stable 2005.01.12
Diffstat (limited to 'tex/context/base/supp-fil.tex')
-rw-r--r-- | tex/context/base/supp-fil.tex | 53 |
1 files changed, 36 insertions, 17 deletions
diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex index 9d54663af..37910dc4f 100644 --- a/tex/context/base/supp-fil.tex +++ b/tex/context/base/supp-fil.tex @@ -287,22 +287,6 @@ \def\maxreadlevel{3} -% \def\doreadfile#1#2#3#4% -% {\sanitizefilename#2\to\readfilename -% \checkfilename\readfilename -% \ifcase\kindoffile -% \iftracefiles\writestatus\m!systems{searching for \readfilename\space on #1}\fi -% % not a full path or url, check for existence -% \doifelsenothing{#1} -% {\def\next{\redoreadfile\readfilename{#3}{#4}}}% -% {\def\next{\redoreadfile{\pathplusfile{#1}{\readfilename}}{#3}{#4}}}% -% \else -% % a full path or url, no further checking done -% \iftracefiles\writestatus\m!systems{assuming present \readfilename}\fi -% \def\next{#3\dodoreadfile}% -% \fi -% \next} - \newconditional\trackfilenames % We need to postpone loading, else we got frozen type-* files and so when @@ -613,10 +597,45 @@ \catcode`\}=\@@endgroup \catcode`\%=\@@comment} -\def\stopreadingfile% +\def\stopreadingfile {\getvalue{\string\readingfilelevel::\readingfilelevel}% \doglobal\decrement\readingfilelevel} +%D \macros +%D {splitfilename} +%D +%D I should have made this one sooner. This macro was first needed when +%D ran into graphic with a period in the pathpart. +%D +%D \startbuffer +%D \def\showfilesplit +%D {\bgroup \tttf +%D \hbox{(full: \splitofffull)}\space +%D \hbox{(path: \splitoffpath)}\space +%D \hbox{(base: \splitoffbase)}\space +%D \hbox{(name: \splitoffname)}\space +%D \hbox{(type: \splitofftype)}\space +%D \egroup} +%D +%D \splitfilename{c:/aa/bb/cc/dd.ee.ff} \showfilesplit \endgraf +%D \splitfilename{c:/aa/bb/cc/dd.ee} \showfilesplit \endgraf +%D \splitfilename{c:/aa/bb/cc/dd} \showfilesplit \endgraf +%D +%D \splitfilename{dd.ee.ff} \showfilesplit \endgraf +%D \splitfilename{dd.ee} \showfilesplit \endgraf +%D \splitfilename{dd} \showfilesplit \endgraf +%D \stopbuffer +%D +%D \start \typebuffer \getbuffer \stop + +\def\splitfilename#1% + {\edef\splitofffull{#1}% normally outside this call: \sanitizefilename#1\to\sanitizedfilename + \greedysplitstring\splitofffull\at/\to\splitoffpath\and\splitoffbase + \ifx\splitoffbase\empty\let\splitoffbase\splitofffull\fi + \greedysplitstring\splitoffbase\at.\to\splitoffname\and\splitofftype + \ifx\splitoffpath\empty\def\splitoffpath{.}\fi + \ifx\splitoffname\empty\let\splitoffname\splitoffbase\fi} + %% % gebruikt voor normale (!) files, will change to proper %% % installer maybe combined with verb module push/popper %% |