소스 검색

sync

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7895 8c9fc860-2736-0410-a75d-ab315db34111
eth.metacore 7 년 전
부모
커밋
a7c3dfb422
1개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 8 8
      source/FSTools64.Mod

+ 8 - 8
source/FSTools64.Mod

@@ -225,7 +225,7 @@ BEGIN
 END SetDefault;
 
 (* using the NIST standard for Kibi, Mebi & Gibi: http://physics.nist.gov/cuu/Units/binary.html *)
-PROCEDURE WriteK( k: HUGEINT; out : Streams.Writer);
+PROCEDURE WriteK( k: Files.TSize; out : Streams.Writer);
 VAR suffix: ARRAY 3 OF CHAR;
 BEGIN
 	IF k < 10*1024 THEN COPY("Ki", suffix)
@@ -289,8 +289,8 @@ VAR
 	string, pattern : ARRAY 256 OF CHAR;
 	enum : Files.Enumerator;
 	flags, fileflags : SET;
-	count: LONGINT; total : HUGEINT;
-	time, date: LONGINT; size : HUGEINT;
+	count: LONGINT; total : Files.TSize;
+	time, date: LONGINT; size : Files.TSize;
 	name : ARRAY MaxNameLen OF CHAR;
 	dt : Dates.DateTime;
 BEGIN
@@ -344,7 +344,7 @@ PROCEDURE EnumerateDirectory(
 	CONST arguments : ARRAY OF CHAR);
 VAR
 	name : Files.FileName;
-	flags : SET; time, date: LONGINT; size : HUGEINT;
+	flags : SET; time, date: LONGINT; size : Files.TSize;
 	subDirEnum : Files.Enumerator;
 
 	PROCEDURE PrepareContext(context : Commands.Context; CONST currentFile, arguments : ARRAY OF CHAR);
@@ -443,7 +443,7 @@ END Enumerate;
 PROCEDURE CreateFile*(context : Commands.Context); (** [Options] filename [content] ~ *)
 VAR
 	options : Options.Options; cr, removeWhitespace : BOOLEAN;
-	file : Files.File; filename : Files.FileName; writer : Files.Writer; ch : CHAR; pos: HUGEINT;
+	file : Files.File; filename : Files.FileName; writer : Files.Writer; ch : CHAR; pos: Files.TSize;
 BEGIN
 	NEW(options);
 	options.Add("c", "cr", Options.Flag);
@@ -856,7 +856,7 @@ PROCEDURE InsertFiles(CONST mask : ARRAY OF CHAR; VAR filelist : FileList; VAR i
 VAR
 	enum : Files.Enumerator;
 	fileflags : SET;
-	time, date: LONGINT; size : HUGEINT;
+	time, date: LONGINT; size : Files.TSize;
 	name : ARRAY MaxNameLen OF CHAR;
 BEGIN
 	NEW(enum); enum.Open(mask, {});
@@ -932,7 +932,7 @@ BEGIN
 	SplitFullName(sourceName, srcPrefix, srcPath, srcFilename, srcExtension);
 	index := 0;
 	FOR i := 0 TO LEN(targetMask)-1 DO
-		IF targetMask[i] = "." THEN
+		IF (targetMask[i] = ".") & (targetMask[i+1]#".") & (targetMask[i+1]#"/") THEN
 			isExtension := TRUE;
 			targetName[index] := targetMask[i];
 			INC(index);
@@ -955,7 +955,7 @@ PROCEDURE InsertFilesAndFixDestination(context : Commands.Context; CONST sourceM
 VAR
 	enum : Files.Enumerator;
 	fileflags : SET;
-	time, date: LONGINT; size : HUGEINT;
+	time, date: LONGINT; size : Files.TSize;
 	name : ARRAY MaxNameLen OF CHAR;
 BEGIN
 	IF ~IsValidTargetMask(context, targetMask) THEN RETURN FALSE; END;