Commit 10f4ea83 authored by John van Groningen's avatar John van Groningen
Browse files

remove unused function PatchABCDates

parent 23e66381
......@@ -68,16 +68,6 @@ ParseABCDependencies` ::
), !Files // The new filesystem
);
PatchABCDates ::
!Pathname //
!*DirCache //
!*Files // Input filesystem
->
((Bool //
, *DirCache //
),*Files // The new filesystem
)
PatchSystemABC ::
!Int //
!Bool //
......
......@@ -413,93 +413,6 @@ where
ms = toInt (s%(10,11)) //(s%(11,12))
ss = toInt (s%(12,13)) //(s%(13,14))
//--
PatchABCDates :: !Pathname !*DirCache !*Files -> ((Bool,*DirCache),*Files)
PatchABCDates abcpath dircache files
#! (opened,file,files) = fopen abcpath FReadData files
| not opened
= ((False, dircache),files)
# (file, lines,dircache) = Patch_lines False file Nil dircache
# (closed,files) = fclose file files
| not closed
= ((False, dircache),files)
#! (opened,file,files) = fopen abcpath FWriteData files
| not opened
= ((False, dircache),files)
#! (written,file) = Write_lines file lines
#! (closed,files) = fclose file files
= ((written && closed, dircache),files)
where
modname = RemovePath (MakeImpPathname abcpath)
dateline modname dircache
# (_,_,moddate,dircache) = DC_Search modname dircache
= ("|| .module "+++ modname +++ " \"" +++ modname+++ "\" "+++DT2S moddate+++"\n",dircache)
// = ("|| .date "+++DT2S moddate+++"\n",dircache)
dependline depname dircache
# (_,_,depdate,dircache) = DC_Search (MakeDefPathname depname) dircache
= (".depend \""+++depname+++"\" || "+++DT2S depdate+++"\n",dircache)
Patch_lines datedone file lines dircache
# (eof, file) = fend file
| eof
| datedone
# lines = Reverse lines
= (file, lines,dircache)
# (dl,dircache) = dateline modname dircache
# lines = dl :! lines
# lines = Reverse lines
= (file, lines,dircache)
# (line, file) = readLine file
(end_of_info,datedone,line,dircache) = Patch_line datedone line dircache
| end_of_info
| datedone
# lines = line :! lines
= Copy_lines file lines dircache
# (dl,dircache) = dateline modname dircache
# lines = dl :! lines
# lines = line :! lines
= Copy_lines file lines dircache
= Patch_lines datedone file (line :! lines) dircache
Copy_lines file lines dircache
# (eof, file) = fend file
| eof
# lines = Reverse lines
= (file, lines,dircache)
# (line, file) = readLine file
= Copy_lines file (line :! lines) dircache
Write_lines file Nil
= (True,file)
Write_lines file (line :! lines)
# file = file <<< line
= Write_lines file lines
Patch_line datedone str dircache
| match_endinfo < len_str
= (True,datedone,str,dircache)
| match_depend < len_str && last_q_depend < len_str
# (line,dircache) = dependline modname dircache
= (False,datedone,line,dircache) // patch on mod date
| match_date < len_str && last_q_date < len_str
# (line,dircache) = dateline modname dircache
= (False,True,line,dircache)
= (False,datedone,str,dircache)
where
len_str = size str
start = SkipSpaces 0 len_str str
stop_endinfo = start + 7; // dec (size ".endinfo")
stop_depend = start + 6; // dec (size ".depend")
stop_date = start + 4; // dec (size ".date")
match_endinfo = MatchS start stop_endinfo 8 len_str ".endinfo" str
match_depend = MatchS start stop_depend 7 len_str ".depend" str
match_date = MatchS start stop_date 5 len_str ".date" str
(last_q_depend, modname)
= characters_between_apostrophes match_depend len_str str
(last_q_date, _/*date*/)
= characters_between_apostrophes match_date len_str str
// patch abc file of system module for change in profiling settings
PatchSystemABC :: !Int !Bool !Pathname /*!Bool*/ !Bool !*Files -> (!Bool, !*Files)
......
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