[llvm-commits] CVS: llvm/lib/System/Win32/Path.cpp

Jeff Cohen jeffc at jolt-lang.org
Thu Dec 30 21:07:37 PST 2004



Changes in directory llvm/lib/System/Win32:

Path.cpp updated: 1.24 -> 1.25
---
Log message:

Get rid of those nasty tabs...

---
Diffs of the changes:  (+18 -18)

Index: llvm/lib/System/Win32/Path.cpp
diff -u llvm/lib/System/Win32/Path.cpp:1.24 llvm/lib/System/Win32/Path.cpp:1.25
--- llvm/lib/System/Win32/Path.cpp:1.24	Thu Dec 30 22:39:07 2004
+++ llvm/lib/System/Win32/Path.cpp	Thu Dec 30 23:07:26 2004
@@ -308,7 +308,7 @@
   // the owner writable bit.
   if ((attr & FILE_ATTRIBUTE_READONLY) && (bits & 0200)) {
     if (!SetFileAttributes(Filename.c_str(), attr & ~FILE_ATTRIBUTE_READONLY))
-	  ThrowError(Filename + ": SetFileAttributes: ");
+      ThrowError(Filename + ": SetFileAttributes: ");
   }
   return true;
 }
@@ -343,23 +343,23 @@
   WIN32_FIND_DATA fd;
   HANDLE h = FindFirstFile(path.c_str(), &fd);
   if (h == INVALID_HANDLE_VALUE) {
-	if (GetLastError() == ERROR_NO_MORE_FILES)
+    if (GetLastError() == ERROR_NO_MORE_FILES)
       return true; // not really an error, now is it?
-	ThrowError(path + ": Can't read directory: ");
+    ThrowError(path + ": Can't read directory: ");
   }
 
   do {
-	if (fd.cFileName[0] == '.')
-	  continue;
-	Path aPath(path + &fd.cFileName[0]);
-	if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
-	  aPath.path += "/";
+    if (fd.cFileName[0] == '.')
+      continue;
+    Path aPath(path + &fd.cFileName[0]);
+    if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+      aPath.path += "/";
     result.insert(aPath);
   } while (FindNextFile(h, &fd));
 
   CloseHandle(h);
   if (GetLastError() != ERROR_NO_MORE_FILES)
-	ThrowError(path + ": Can't read directory: ");
+    ThrowError(path + ": Can't read directory: ");
   return true;
 }
 
@@ -620,7 +620,7 @@
   if (!isFile()) return false;
   if (!MoveFile(path.c_str(), newName.c_str()))
     ThrowError("Can't move '" + path + 
-	           "' to '" + newName.path + "': ");
+               "' to '" + newName.path + "': ");
   return true;
 }
 
@@ -631,17 +631,17 @@
   HANDLE h = CreateFile(path.c_str(),
                         FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES,
                         FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
-						NULL,
-						OPEN_EXISTING,
-						FILE_ATTRIBUTE_NORMAL,
-						NULL);
+                        NULL,
+                        OPEN_EXISTING,
+                        FILE_ATTRIBUTE_NORMAL,
+                        NULL);
   if (h == INVALID_HANDLE_VALUE)
     return false;
 
   BY_HANDLE_FILE_INFORMATION bhfi;
   if (!GetFileInformationByHandle(h, &bhfi)) {
     CloseHandle(h);
-	ThrowError(path + ": GetFileInformationByHandle: ");
+    ThrowError(path + ": GetFileInformationByHandle: ");
   }
 
   FILETIME ft;
@@ -656,13 +656,13 @@
   if (si.mode & 0200) {
     if (bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY) {
       if (!SetFileAttributes(path.c_str(),
-		      bhfi.dwFileAttributes & ~FILE_ATTRIBUTE_READONLY))
+              bhfi.dwFileAttributes & ~FILE_ATTRIBUTE_READONLY))
         ThrowError(path + ": SetFileAttributes: ");
     }
   } else {
     if (!(bhfi.dwFileAttributes & FILE_ATTRIBUTE_READONLY)) {
       if (!SetFileAttributes(path.c_str(),
-		      bhfi.dwFileAttributes | FILE_ATTRIBUTE_READONLY))
+              bhfi.dwFileAttributes | FILE_ATTRIBUTE_READONLY))
         ThrowError(path + ": SetFileAttributes: ");
     }
   }
@@ -676,7 +676,7 @@
   // above line.  We use the expansion it would have in a non-UNICODE build.
   if (!::CopyFileA(Src.c_str(), Dest.c_str(), false))
     ThrowError("Can't copy '" + Src.toString() + 
-	           "' to '" + Dest.toString() + "': ");
+               "' to '" + Dest.toString() + "': ");
 }
 
 void 






More information about the llvm-commits mailing list