diff src/fileio.c @ 5198:bc3ede8f29a8

fix spacing in some files -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-04-09 Ben Wing <ben@xemacs.org> * fileio.c (check_writable): * fileio.c (Fdo_auto_save): * redisplay-xlike-inc.c (separate_textual_runs_nomule): * redisplay-xlike-inc.c (separate_textual_runs_xft_nomule): * redisplay-xlike-inc.c (separate_textual_runs_xft_mule): * redisplay-xlike-inc.c (separate_textual_runs_mule): * redisplay-xlike-inc.c (XLIKE_output_string): * redisplay-xlike-inc.c (XLIKE_output_vertical_divider): * redisplay.c (create_text_block): * redisplay.c (regenerate_window): * redisplay.c (redisplay_window): * redisplay.c (redisplay_device): * redisplay.c (window_line_number): * redisplay.c (point_would_be_visible): * redisplay.c (compute_display_line_dynarr_usage): * specifier.c (prune_specifiers): * specifier.c (finalize_specifier): * specifier.c (make_magic_specifier): * specifier.c (charset_matches_specifier_tag_set_p): * specifier.c (Fdefine_specifier_tag): * specifier.c (setup_device_initial_specifier_tags): * specifier.c (bodily_specifier): * specifier.c (add_spec_to_ghost_specifier): * specifier.c (remove_ghost_specifier): * specifier.c (set_specifier_fallback): * specifier.c (specifier_instance_from_inst_list): * specifier.c (set_specifier_caching): Fix coding style to correspond to GNU standard.
author Ben Wing <ben@xemacs.org>
date Fri, 09 Apr 2010 23:38:02 -0500
parents 2e528066e2fc
children cdca98f2d36f
line wrap: on
line diff
--- a/src/fileio.c	Fri Apr 09 02:33:11 2010 -0500
+++ b/src/fileio.c	Fri Apr 09 23:38:02 2010 -0500
@@ -2322,7 +2322,7 @@
   GENERIC_MAPPING genericMapping;
   DWORD accessMask;
   PRIVILEGE_SET PrivilegeSet;
-  DWORD dwPrivSetSize = sizeof( PRIVILEGE_SET );
+  DWORD dwPrivSetSize = sizeof ( PRIVILEGE_SET );
   BOOL fAccessGranted = FALSE;
   DWORD dwAccessAllowed;
   Extbyte *fnameext;
@@ -2330,48 +2330,57 @@
   LOCAL_FILE_FORMAT_TO_TSTR (filename, fnameext);
 
   // First check for a normal file with the old-style readonly bit
-  attributes = qxeGetFileAttributes(fnameext);
-  if (FILE_ATTRIBUTE_READONLY == (attributes & (FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_READONLY)))
+  attributes = qxeGetFileAttributes (fnameext);
+  if (FILE_ATTRIBUTE_READONLY ==
+      (attributes & (FILE_ATTRIBUTE_DIRECTORY|FILE_ATTRIBUTE_READONLY)))
     return 0;
 
   /* Win32 prototype lacks const. */
-  error = qxeGetNamedSecurityInfo(fnameext, SE_FILE_OBJECT, 
-				  DACL_SECURITY_INFORMATION|GROUP_SECURITY_INFORMATION|OWNER_SECURITY_INFORMATION,
-				  &psidOwner, &psidGroup, &pDacl, &pSacl, &pDesc);
-  if(error != ERROR_SUCCESS) { // FAT?
-    attributes = qxeGetFileAttributes(fnameext);
-    return (attributes & FILE_ATTRIBUTE_DIRECTORY) || (0 == (attributes & FILE_ATTRIBUTE_READONLY));
-  }
+  error = qxeGetNamedSecurityInfo (fnameext, SE_FILE_OBJECT, 
+				   DACL_SECURITY_INFORMATION|
+				   GROUP_SECURITY_INFORMATION|
+				   OWNER_SECURITY_INFORMATION,
+				  &psidOwner, &psidGroup, &pDacl, &pSacl,
+				   &pDesc);
+  if (error != ERROR_SUCCESS)
+    { // FAT?
+      attributes = qxeGetFileAttributes (fnameext);
+      return (attributes & FILE_ATTRIBUTE_DIRECTORY) ||
+	(0 == (attributes & FILE_ATTRIBUTE_READONLY));
+    }
 
   genericMapping.GenericRead = FILE_GENERIC_READ;
   genericMapping.GenericWrite = FILE_GENERIC_WRITE;
   genericMapping.GenericExecute = FILE_GENERIC_EXECUTE;
   genericMapping.GenericAll = FILE_ALL_ACCESS;
 
-  if(!ImpersonateSelf(SecurityDelegation)) {
-    return 0;
-  }
-  if(!OpenThreadToken(GetCurrentThread(), TOKEN_ALL_ACCESS, TRUE, &tokenHandle)) {
-    return 0;
-  }
+  if (!ImpersonateSelf (SecurityDelegation))
+    {
+      return 0;
+    }
+  if (!OpenThreadToken (GetCurrentThread(), TOKEN_ALL_ACCESS, TRUE,
+		       &tokenHandle))
+    {
+      return 0;
+    }
 
   accessMask = GENERIC_WRITE;
-  MapGenericMask(&accessMask, &genericMapping);
-
-  if(!AccessCheck(pDesc, tokenHandle, accessMask, &genericMapping,
+  MapGenericMask (&accessMask, &genericMapping);
+
+  if (!AccessCheck(pDesc, tokenHandle, accessMask, &genericMapping,
 		  &PrivilegeSet,       // receives privileges used in check
 		  &dwPrivSetSize,      // size of PrivilegeSet buffer
 		  &dwAccessAllowed,    // receives mask of allowed access rights
 		  &fAccessGranted)) 
     {
-      CloseHandle(tokenHandle);
+      CloseHandle (tokenHandle);
       RevertToSelf();
-      LocalFree(pDesc);
+      LocalFree (pDesc);
       return 0;
     }
-  CloseHandle(tokenHandle);
+  CloseHandle (tokenHandle);
   RevertToSelf();
-  LocalFree(pDesc);
+  LocalFree (pDesc);
   return fAccessGranted == TRUE;
 #elif defined (HAVE_EACCESS)
   return (qxe_eaccess (filename, W_OK) >= 0);
@@ -2959,7 +2968,7 @@
 
 	  RETURN_UNGCPRO
 	    (Fsignal (Qfile_error,
-		      list2 (build_msg_string("not a regular file"),
+		      list2 (build_msg_string ("not a regular file"),
 			     filename)));
 	}
     }
@@ -4261,7 +4270,7 @@
 	      auto_saved++;
 
 	      /* Handler killed their own buffer! */
-	      if (!BUFFER_LIVE_P(b))
+	      if (!BUFFER_LIVE_P (b))
 		continue;
 
 	      b->auto_save_modified = BUF_MODIFF (b);