OSDN Git Service

white space
authorcgf <cgf>
Sun, 13 Feb 2005 18:17:28 +0000 (18:17 +0000)
committercgf <cgf>
Sun, 13 Feb 2005 18:17:28 +0000 (18:17 +0000)
17 files changed:
winsup/cygwin/cygheap.h
winsup/cygwin/cygthread.cc
winsup/cygwin/fhandler.h
winsup/cygwin/fhandler_process.cc
winsup/cygwin/gendevices
winsup/cygwin/gentls_offsets
winsup/cygwin/miscfuncs.cc
winsup/cygwin/path.cc
winsup/cygwin/path.h
winsup/cygwin/pinfo.cc
winsup/cygwin/registry.cc
winsup/cygwin/security.h
winsup/cygwin/select.cc
winsup/cygwin/shared_info.h
winsup/cygwin/sigproc.cc
winsup/cygwin/syscalls.cc
winsup/cygwin/winsup.h

index e75afe9..0c0bff1 100644 (file)
@@ -213,7 +213,7 @@ public:
     else
       return strcpy (buf, name ());
   }
-         
+
   const char *cygheap_user::test_uid (char *&, const char *, size_t)
     __attribute__ ((regparm (3)));
 };
@@ -231,10 +231,10 @@ struct cwdstuff
   muto *cwd_lock;
   char *get (char *, int = 1, int = 0, unsigned = CYG_MAX_PATH);
   DWORD get_hash ();
-  DWORD get_drive (char * dst) 
+  DWORD get_drive (char * dst)
   {
-    get_initial (); 
-    memcpy (dst, win32, drive_length); 
+    get_initial ();
+    memcpy (dst, win32, drive_length);
     cwd_lock->release ();
     return drive_length;
   }
index a5e52be..93b5cff 100644 (file)
@@ -255,7 +255,7 @@ cygthread::terminate_thread ()
 
   if (!inuse)
     goto force_notterminated;
-    
+
   (void) TerminateThread (h, 0);
   (void) WaitForSingleObject (h, INFINITE);
   CloseHandle (h);
@@ -285,7 +285,7 @@ cygthread::terminate_thread ()
 #endif
       release (true);
     }
-  
+
   goto out;
 
 force_notterminated:
index 8a871cb..2d9c621 100644 (file)
@@ -88,7 +88,7 @@ class fhandler_base
                                        beyond EOF, zero filling or making
                                        file sparse if so. */
     unsigned query_open         : 2; /* open file without requesting either
-                                       read or write access */
+                                       read or write access */
     unsigned close_on_exec      : 1; /* close-on-exec */
     unsigned need_fork_fixup    : 1; /* Set if need to fixup after fork. */
     unsigned has_changed       : 1; /* Flag used to set ctime on close. */
@@ -507,7 +507,7 @@ class fhandler_dev_raw: public fhandler_base
       eom_detected (0), eof_detected (0), lastblk_to_read (0)
       {}
   } status;
+
   IMPLEMENT_STATUS_FLAG (bool, eom_detected)
   IMPLEMENT_STATUS_FLAG (bool, eof_detected)
   IMPLEMENT_STATUS_FLAG (bool, lastblk_to_read)
index 565755c..0c42db9 100644 (file)
@@ -343,7 +343,7 @@ fhandler_process::fill_filebuf ()
     {
     case PROCESS_FD:
       {
-       size_t fs; 
+       size_t fs;
        char *fdp = strrchr (path, '/');
        if (!fdp || *++fdp == 'f') /* The "fd" directory itself. */
          {
@@ -414,7 +414,7 @@ fhandler_process::fill_filebuf ()
       {
         if (filebuf)
          free (filebuf);
-       size_t fs; 
+       size_t fs;
        switch (fileid)
          {
          case PROCESS_ROOT:
@@ -582,7 +582,7 @@ format_process_maps (_pinfo *p, char *&destbuf, size_t maxsize)
                                st.st_ino);
        while (written < 62)
          destbuf[len + written++] = ' ';
-        len += written;
+       len += written;
        len += __small_sprintf (destbuf + len, "%s\n", posix_modname);
       }
 out:
index d8a5a5d..27d4ed1 100755 (executable)
@@ -119,7 +119,7 @@ sub generate {
        $rest = "$fh, $rest" if $rest =~ /^"/o;
        $rest = fixup($rest, $vars);
        if ($rest =~ /^(.*), ([a-z_]*_dev)/) {
-           $pointers{$2} ||= "const device *$2 = $storage_loc;\n"; 
+           $pointers{$2} ||= "const device *$2 = $storage_loc;\n";
            $rest = $1;
        }
        push(@storage, "  {\"$dev\", " . $rest . "},\n");
index 1442927..561c775 100755 (executable)
@@ -22,7 +22,7 @@ foreach ($tls =~ /^.*\n/mg) {
     if (!s/;.*$//o) {
        if (!$struct && /^\s*(?:struct|class)\s*([a-z_0-9]+)/o) {
            $def .= $_;
-           $struct = $1 
+           $struct = $1
        }
        next;
     }
index 720c0bb..08b4352 100644 (file)
@@ -383,7 +383,7 @@ winprio_to_nice (DWORD prio)
 
 /* Get a Win32 priority matching the incoming nice factor.  The incoming
    nice is limited to the interval [-NZERO,NZERO-1]. */
-DWORD 
+DWORD
 nice_to_winprio (int &nice)
 {
   static const DWORD priority[] NO_COPY =
index 7294d22..d2cb556 100644 (file)
@@ -731,7 +731,7 @@ is_virtual_symlink:
                     {
                       error = ENOTDIR;
                      goto out;
-                    }  
+                    }
                  if (pcheck_case == PCHECK_RELAXED)
                    goto out;   // file found
                  /* Avoid further symlink evaluation. Only case checks are
@@ -1938,7 +1938,7 @@ mount_info::read_cygdrive_info_from_registry ()
   for (int i = 0; i < 2; i++)
     {
       if (i)
-       cygheap->user.deimpersonate (); 
+       cygheap->user.deimpersonate ();
       reg_key r (i, KEY_READ, CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME, NULL);
       if (i)
        cygheap->user.reimpersonate ();
@@ -1954,7 +1954,7 @@ mount_info::read_cygdrive_info_from_registry ()
       if (i == 0)
        cygdrive_flags &= ~MOUNT_SYSTEM;
       else
-       cygdrive_flags |= MOUNT_SYSTEM; 
+       cygdrive_flags |= MOUNT_SYSTEM;
       slashify (cygdrive, cygdrive, 1);
       cygdrive_len = strlen (cygdrive);
     }
index f9d2066..32dc713 100644 (file)
@@ -221,7 +221,7 @@ class path_conv
   void set_normalized_path (const char *, bool) __attribute__ ((regparm (3)));
   DWORD get_symlink_length () { return symlink_length; };
  private:
-  DWORD symlink_length;  
+  DWORD symlink_length;
   char path[CYG_MAX_PATH];
 };
 
index eedb69a..ce59d22 100644 (file)
@@ -160,7 +160,7 @@ pinfo::exit (DWORD n)
     }
   int exitcode = self->exitcode;
   release ();
-  
+
   _my_tls.stacklock = 0;
   _my_tls.stackptr = _my_tls.stack;
   sigproc_printf ("Calling ExitProcess hProcess %p, n %p, exitcode %p",
index 543f049..4f7203e 100644 (file)
@@ -30,7 +30,7 @@ reg_key::reg_key (HKEY top, REGSAM access, ...)
 
 /* Opens a key under the appropriate Cygwin key.
    Do not use HKCU per MS KB 199190  */
+
 reg_key::reg_key (bool isHKLM, REGSAM access, ...)
 {
   va_list av;
@@ -40,8 +40,8 @@ reg_key::reg_key (bool isHKLM, REGSAM access, ...)
     top = HKEY_LOCAL_MACHINE;
   else
     {
-      char name[128]; 
-      const char *names[2] = {cygheap->user.get_windows_id (name), ".DEFAULT"}; 
+      char name[128];
+      const char *names[2] = {cygheap->user.get_windows_id (name), ".DEFAULT"};
       for (int i = 0; i < 2; i++)
        {
          key_is_invalid = RegOpenKeyEx (HKEY_USERS, names[i], 0, access, &top);
@@ -52,14 +52,14 @@ reg_key::reg_key (bool isHKLM, REGSAM access, ...)
       return;
     }
 OK:
-  new (this) reg_key (top, access, "SOFTWARE", 
+  new (this) reg_key (top, access, "SOFTWARE",
                      CYGWIN_INFO_CYGNUS_REGISTRY_NAME,
                      CYGWIN_INFO_CYGWIN_REGISTRY_NAME, NULL);
   if (top != HKEY_LOCAL_MACHINE)
     RegCloseKey (top);
   if (key_is_invalid)
     return;
-    
+
   top = key;
   va_start (av, access);
   build_reg (top, access, av);
@@ -215,7 +215,7 @@ get_registry_hive_path (const char *name, char *path)
   if (!name || !path)
     return NULL;
   __small_sprintf (key, "SOFTWARE\\Microsoft\\Windows%s\\CurrentVersion\\ProfileList\\",
-                  wincap.is_winnt ()?" NT":""); 
+                  wincap.is_winnt ()?" NT":"");
   strcat (key, name);
   if (!RegOpenKeyExA (HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hkey))
     {
@@ -257,7 +257,7 @@ load_registry_hive (const char * name)
       if (wincap.is_winnt ())
        strcat (path, "\\NTUSER.DAT");
       else
-       strcat (path, "\\USER.DAT");    
+       strcat (path, "\\USER.DAT");
       if ((ret = RegLoadKeyA (HKEY_USERS, name, path)) != ERROR_SUCCESS)
        debug_printf ("Loading user registry hive for %s failed: %d", name, ret);
     }
index 77d913e..fc7d542 100644 (file)
@@ -300,10 +300,10 @@ SECURITY_DESCRIPTOR *__stdcall get_null_sd (void);
 
 /* Various types of security attributes for use in Create* functions. */
 extern SECURITY_ATTRIBUTES sec_none, sec_none_nih, sec_all, sec_all_nih;
-extern SECURITY_ATTRIBUTES *__stdcall __sec_user (PVOID sa_buf, PSID sid1, PSID sid2, 
+extern SECURITY_ATTRIBUTES *__stdcall __sec_user (PVOID sa_buf, PSID sid1, PSID sid2,
                                                  DWORD access2, BOOL inherit)
   __attribute__ ((regparm (3)));
-extern bool sec_acl (PACL acl, bool original, bool admins, PSID sid1 = NO_SID, 
+extern bool sec_acl (PACL acl, bool original, bool admins, PSID sid1 = NO_SID,
                     PSID sid2 = NO_SID, DWORD access2 = 0);
 
 int __stdcall NTReadEA (const char *file, const char *attrname, char *buf, int len);
index 105b723..36d2df0 100644 (file)
@@ -1346,7 +1346,7 @@ start_thread_socket (select_record *me, select_stuff *stuff)
 
   if (_my_tls.locals.exitsock != INVALID_SOCKET)
     si->exitsock = _my_tls.locals.exitsock;
-  else 
+  else
     {
       si->exitsock = _my_tls.locals.exitsock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP);
       if (_my_tls.locals.exitsock == INVALID_SOCKET)
index 7a9b0e0..e1cfc5d 100644 (file)
@@ -162,7 +162,7 @@ class shared_info
 };
 
 extern shared_info *cygwin_shared;
-extern user_info *user_shared; 
+extern user_info *user_shared;
 #define mount_table (&(user_shared->mountinfo))
 extern HANDLE cygwin_user_h;
 
@@ -193,7 +193,7 @@ struct console_state
 #endif
 
 char *__stdcall shared_name (char *, const char *, int);
-void *__stdcall open_shared (const char *name, int n, HANDLE &shared_h, DWORD size, 
+void *__stdcall open_shared (const char *name, int n, HANDLE &shared_h, DWORD size,
                             shared_locations, PSECURITY_ATTRIBUTES psa = &sec_all);
 extern void user_shared_initialize (bool reinit);
 
index b99a90c..7965a62 100644 (file)
@@ -872,10 +872,10 @@ remove_proc (int ci)
 }
 
 /* Check status of child process vs. waitq member.
-  
+
    parent_w is the pointer to the parent of the waitq member in question.
    child is the subprocess being considered.
-  
+
    Returns non-zero if waiting thread released.  */
 static bool __stdcall
 stopped_or_terminated (waitq *parent_w, _pinfo *child)
index d4f4972..18ef7ea 100644 (file)
@@ -181,12 +181,12 @@ unlink (const char *ourname)
      have open handles on a file and one of them calls unlink, then it
      happens that the file is remove from the remote share even though the
      other process still has an open handle.  This other process than gets
-     Win32 error 59, ERROR_UNEXP_NET_ERR when trying to access the file. 
+     Win32 error 59, ERROR_UNEXP_NET_ERR when trying to access the file.
 
      For some reason, that does not happen when using DeleteFile, which
-     nicely succeeds but still, the file is available for the other process. 
+     nicely succeeds but still, the file is available for the other process.
      To reproduce, mount /tmp on a remote share and call
-     
+
        bash -c "cat << EOF"
 
      Microsoft KB 837665 describes this problem as a bug in 2K3, but I have
@@ -1284,12 +1284,12 @@ rename (const char *oldpath, const char *newpath)
      existing file or directory real_new.  Otherwise we end up with a
      non-moved directory *and* a deleted read_new path.  Also this case
      has to generate an EINVAL in all circumstances,
-     
+
      NB: We could test this also before calling MoveFile but the idea is
      that this is a somewhat seldom case and we like to avoid expensive
      string comparison.  So we allow MoveFile to fail and test the error
-     code instead. 
-     
+     code instead.
+
      The order in the condition is (hopefully) trimmed for doing the least
      expensive stuff first.  Nevertheless it would be nice if 9x could
      generate the same error codes as NT.
index 9be8d67..87e7cec 100644 (file)
@@ -70,12 +70,12 @@ extern unsigned long cygwin_inet_addr (const char *cp);
 
    Thou shalt use CYG_MAX_PATH throughout.  It avoids the NUL vs no-NUL
    issue and is neither of the Unixy ones [so we can punt on which
-   one is the right one to use]. 
-   
+   one is the right one to use].
+
    Windows ANSI calls are limited to MAX_PATH in length. Cygwin calls that
    thunk through to Windows Wide calls are limited to 32K. We define
    CYG_MAX_PATH as a convenient, not to short, not too long 'happy medium'.
-   
+
    */
 
 #define CYG_MAX_PATH (MAX_PATH)