From 3c9b7073f95db84c234524e743dc5900bd30fa9b Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 24 Nov 2017 15:07:20 +0100 Subject: bequemere Reihenfolge der %dirname% Parameter: Quelle, von, bis --- Make.1.in | 6 +++--- dateibeziehungen.pas | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Make.1.in b/Make.1.in index 1060668..08e8e54 100644 --- a/Make.1.in +++ b/Make.1.in @@ -81,9 +81,9 @@ file name of \fIn\fP-th source file file name of \fIn\fP-th source file without extension(s) .TP .B "%dirname\fIn1\fP,\fIn2\fP,\fIn3\fP%" (*) -components \fIn1\fP upto \fIn2\fP of path to \fIn3\fP-th source file. -Negative numbers \fIn1\fP or \fIn2\fP are counted from the back - e.g. \fB-1\fP is the last path component, etc. -If omitted, \fIn2\fP defaults to \fI-1\fP. +components \fIn2\fP upto \fIn3\fP of path to \fIn1\fP-th source file. +Negative numbers \fIn2\fP or \fIn3\fP are counted from the back - e.g. \fB-1\fP is the last path component, etc. +If omitted, \fIn3\fP defaults to \fI-1\fP. .TP .B "%DIRNAME%" path to \fIMachdatei\fP diff --git a/dateibeziehungen.pas b/dateibeziehungen.pas index 764ff9e..a27b0e4 100644 --- a/dateibeziehungen.pas +++ b/dateibeziehungen.pas @@ -347,6 +347,10 @@ begin while pos('%dirname',worin)>0 do begin // %dirname% anfang:=erstesArgument(worin,'%dirname',false); mitte:=erstesArgument(worin,'%',false); + if mitte='' then + qNum:=0 + else + qNum:=strtoint(erstesArgument(mitte,',',true)); if mitte='' then li:=0 else @@ -355,10 +359,6 @@ begin re:=-1 else re:=strtoint(erstesArgument(mitte,',',true)); - if mitte='' then - qNum:=0 - else - qNum:=strtoint(erstesArgument(mitte,',',true)); if qNum>=momentanePosition then fehler('Quellersetzung sieht ''%dirname%'' für Quelle Nummer '+inttostr(qNum)+' an Position '+inttostr(momentanePosition)+'.'); -- cgit v1.2.3-54-g00ecf