You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/06/21 11:49:37 UTC

svn commit: r786974 - in /commons/sandbox/runtime/trunk/src/main/native: os/linux/ os/unix/ os/win32/ shared/ test/

Author: mturk
Date: Sun Jun 21 09:49:36 2009
New Revision: 786974

URL: http://svn.apache.org/viewvc?rev=786974&view=rev
Log:
Tab police

Modified:
    commons/sandbox/runtime/trunk/src/main/native/os/linux/execmem.c
    commons/sandbox/runtime/trunk/src/main/native/os/unix/execmem.c
    commons/sandbox/runtime/trunk/src/main/native/os/unix/file.c
    commons/sandbox/runtime/trunk/src/main/native/os/unix/main.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/file.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/ios.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c
    commons/sandbox/runtime/trunk/src/main/native/os/win32/os.c
    commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c
    commons/sandbox/runtime/trunk/src/main/native/shared/error.c
    commons/sandbox/runtime/trunk/src/main/native/shared/structure.c
    commons/sandbox/runtime/trunk/src/main/native/shared/tables.c
    commons/sandbox/runtime/trunk/src/main/native/test/testcase.c

Modified: commons/sandbox/runtime/trunk/src/main/native/os/linux/execmem.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/linux/execmem.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/linux/execmem.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/linux/execmem.c Sun Jun 21 09:49:36 2009
@@ -154,7 +154,7 @@
     }
     else
         ACR_ThrowException(_E, THROW_NMARK, ACR_EX_ENOMEM, ACR_GET_OS_ERROR());
-    
+
     return ptr;
 }
 

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/execmem.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/execmem.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/execmem.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/execmem.c Sun Jun 21 09:49:36 2009
@@ -65,7 +65,7 @@
     mem = mmap(0, ass, PROT_READ | PROT_WRITE | PROT_EXEC,
                MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
     if (mem == NULL)
-        ACR_ThrowException(_E, THROW_NMARK, ACR_EX_ENOMEM, ACR_GET_OS_ERROR());    
+        ACR_ThrowException(_E, THROW_NMARK, ACR_EX_ENOMEM, ACR_GET_OS_ERROR());
 #else
     mem = ACR_Malloc(_E, THROW_NMARK, ass);
 #endif

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/file.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/file.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/file.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/file.c Sun Jun 21 09:49:36 2009
@@ -65,18 +65,18 @@
 #endif
 
             default:
-        	/* Work around missing S_IFxxx values above
+            /* Work around missing S_IFxxx values above
              * for Linux et al.
              */
 #if !defined(S_IFFIFO) && defined(S_ISFIFO)
-            	if (S_ISFIFO(info.st_mode)) {
+                if (S_ISFIFO(info.st_mode)) {
                     type = ACR_FT_PIPE;
-            	} else
+                } else
 #endif
 #if !defined(S_IFSOCK) && defined(S_ISSOCK)
-            	if (S_ISSOCK(info.st_mode)) {
+                if (S_ISSOCK(info.st_mode)) {
                     type = ACR_FT_SOCK;
-        	    } else
+                } else
 #endif
                 type = ACR_FT_UNKFILE;
             break;
@@ -371,8 +371,8 @@
     UNREFERENCED_O;
 
     WITH_CSTR(pathname) {
-		int protection = ACR_FileProtectionGet(_E, J2S(pathname));
-		if (protection >= 0) {
+        int protection = ACR_FileProtectionGet(_E, J2S(pathname));
+        if (protection >= 0) {
             if (mask & ACR_FILE_ATTR_READONLY) {
                 if (attr & ACR_FILE_ATTR_READONLY) {
                     protection &= ~ACR_FPROT_UWRITE;
@@ -399,8 +399,8 @@
                     protection &= ~ACR_FPROT_WEXECUTE;
                 }
             }
-        	rc = ACR_FileProtectionSet(_E, J2S(pathname), protection);
-		}
+            rc = ACR_FileProtectionSet(_E, J2S(pathname), protection);
+        }
     } END_WITH_CSTR(pathname);
 
     if (rc)

Modified: commons/sandbox/runtime/trunk/src/main/native/os/unix/main.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/unix/main.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/unix/main.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/unix/main.c Sun Jun 21 09:49:36 2009
@@ -95,7 +95,7 @@
                                JNI_VERSION_1_4) == JNI_EDETACHED) {
             char tn[32];
             JavaVMAttachArgs aa;
-            
+
             sprintf(tn, "NativeThread-%u", (unsigned int)pthread_self());
             aa.version = JNI_VERSION_1_4;
             aa.name    = tn;

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/file.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/file.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/file.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/file.c Sun Jun 21 09:49:36 2009
@@ -669,7 +669,7 @@
         else
             ACR_ThrowException(_E, THROW_NMARK, ACR_EX_EIO, rc);
         return JNI_FALSE;
-	}
+    }
 }
 
 ACR_IO_EXPORT_DECLARE(jboolean, File, attrs0)(ACR_JNISTDARGS, jstring pathname,
@@ -686,23 +686,23 @@
 
     WITH_WSTR(pathname) {
         flags = GetFileAttributesW(J2W(pathname));
-	    if (flags != 0xFFFFFFFF)
-        	rc = GetLastError();
-		else {
-		    if (mask & ACR_FILE_ATTR_READONLY) {
-		        if (attr & ACR_FILE_ATTR_READONLY)
-        	    	flags |= FILE_ATTRIBUTE_READONLY;
-        		else
-            		flags &= ~FILE_ATTRIBUTE_READONLY;
-    		}
-        	if (mask & ACR_FILE_ATTR_HIDDEN) {
-    	        if (attr & ACR_FILE_ATTR_HIDDEN)
-    	            flags |= FILE_ATTRIBUTE_HIDDEN;
-        	    else
-            	    flags &= ~FILE_ATTRIBUTE_HIDDEN;
-        	}
+        if (flags != 0xFFFFFFFF)
+            rc = GetLastError();
+        else {
+            if (mask & ACR_FILE_ATTR_READONLY) {
+                if (attr & ACR_FILE_ATTR_READONLY)
+                    flags |= FILE_ATTRIBUTE_READONLY;
+                else
+                    flags &= ~FILE_ATTRIBUTE_READONLY;
+            }
+            if (mask & ACR_FILE_ATTR_HIDDEN) {
+                if (attr & ACR_FILE_ATTR_HIDDEN)
+                    flags |= FILE_ATTRIBUTE_HIDDEN;
+                else
+                    flags &= ~FILE_ATTRIBUTE_HIDDEN;
+            }
             rc = SetFileAttributesW(J2W(pathname), flags);
-		}
+        }
     } END_WITH_WSTR(pathname);
 
     if (rc == ERROR_SUCCESS)
@@ -714,6 +714,6 @@
         else
             ACR_ThrowException(_E, THROW_NMARK, ACR_EX_EIO, rc);
         return JNI_FALSE;
-	}
+    }
 }
 

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/ios.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/ios.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/ios.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/ios.c Sun Jun 21 09:49:36 2009
@@ -193,8 +193,8 @@
 {
     int i;
 
-	if (!__bitmap)
-		return;
+    if (!__bitmap)
+        return;
     EnterCriticalSection(&ios_lock);
     for (i = 0;  i < acr_ioh_mask; i++) {
         if (acr_ioh_tab[i].h) {

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/main.c Sun Jun 21 09:49:36 2009
@@ -134,8 +134,8 @@
 };
 
 static HMODULE late_dll_handles[SYSDLL_defined] = {
- 	NULL, NULL, NULL, NULL, NULL, NULL,
-	NULL, NULL, NULL, NULL
+     NULL, NULL, NULL, NULL, NULL, NULL,
+    NULL, NULL, NULL, NULL
 };
 
 FARPROC acr_load_dll_func(acr_dlltoken_e fnLib, const char* fnName, int ordinal)
@@ -182,9 +182,9 @@
                 SetErrorMode(em);
             }
             if (!late_dll_handles[fnLib] && (fnLib < SYSDLL_KTMW32)) {
-				/* Unable to load required library */
+                /* Unable to load required library */
                 return rc;
-			}
+            }
         }
     }
     return ERROR_SUCCESS;
@@ -287,7 +287,7 @@
                                JNI_VERSION_1_4) == JNI_EDETACHED) {
             char tn[32];
             JavaVMAttachArgs aa;
-            
+
             sprintf(tn, "NativeThread-%u", GetCurrentThreadId());
             aa.version = JNI_VERSION_1_4;
             aa.name    = tn;

Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/os.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/os.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/os.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/os.c Sun Jun 21 09:49:36 2009
@@ -96,11 +96,11 @@
             }
         break;
     }
-	if (!buf[0]) {
-		/* Use the genric number format */
+    if (!buf[0]) {
+        /* Use the genric number format */
         sprintf(buf, "%d.%d", acr_osver->dwMajorVersion,
                               acr_osver->dwMinorVersion);
-	}
+    }
     if (acr_osver->szCSDVersion[0]) {
         strcat(buf, " (");
         strncat(buf, acr_osver->szCSDVersion, ACR_SBUFF_LEN - 32);
@@ -152,11 +152,11 @@
         case PROCESSOR_ARCHITECTURE_INTEL:
 #if !defined(_WIN64)
             if (acr_osinf->wProcessorLevel > 2 &&
- 				acr_osinf->wProcessorLevel < 7)
+                 acr_osinf->wProcessorLevel < 7)
                 sprintf(buf, "i%d86", acr_osinf->wProcessorLevel);
             else
 #endif
-			{
+            {
                 /* TODO: Figure out the proper names for
                  * other Intel processors
                  */

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/dbb.c Sun Jun 21 09:49:36 2009
@@ -416,7 +416,7 @@
         ACR_TRY {
             free(mem);
         } ACR_CATCH() {
-            /* XXX: Unstable. 
+            /* XXX: Unstable.
              * On linux this works only if MALLOC_CHECK_=1 envvar is set
              */
             ACR_ThrowException(_E, THROW_NMARK, ACR_EX_ERUNTIME, EFAULT);

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/error.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/error.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/error.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/error.c Sun Jun 21 09:49:36 2009
@@ -489,12 +489,12 @@
 
 ACR_DECLARE(void) ACR_SetExceptionHandlerMode(acr_seh_e mode)
 {
-	acr_seh_mode = mode;
+    acr_seh_mode = mode;
 }
 
 ACR_DECLARE(acr_seh_e) ACR_GetExceptionHandlerMode()
 {
-	return acr_seh_mode;
+    return acr_seh_mode;
 }
 
 ACR_JNI_EXPORT_DECLARE(void, io_Status, init0)(ACR_JNISTDARGS,

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/structure.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/structure.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/structure.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/structure.c Sun Jun 21 09:49:36 2009
@@ -123,10 +123,10 @@
 
 ACR_STR_EXPORT_DECLARE(jobject, get0)(ACR_JNISTDARGS, jniptr a)
 {
-	jniptr p;
+    jniptr p;
     UNREFERENCED_O;
 
-	p = *(N2P(a, jniptr *));
+    p = *(N2P(a, jniptr *));
     return ACR_PointerCreate(_E, (void *)p, sizeof(void *), NULL);
 }
 

Modified: commons/sandbox/runtime/trunk/src/main/native/shared/tables.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/shared/tables.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/shared/tables.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/shared/tables.c Sun Jun 21 09:49:36 2009
@@ -334,7 +334,7 @@
 ACR_DECLARE(void) ACR_TableForEach(acr_table_t *t, void *opaque,
                                    acr_table_callback_fn_t *callback)
 {
-    
+
     if (t && t->a.elts) {
         acr_size_t i;
         table_entry_t *e = (table_entry_t *)t->a.elts;

Modified: commons/sandbox/runtime/trunk/src/main/native/test/testcase.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/test/testcase.c?rev=786974&r1=786973&r2=786974&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/test/testcase.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/test/testcase.c Sun Jun 21 09:49:36 2009
@@ -114,13 +114,13 @@
     void *d;
     acr_size_t l;
     jint rc = 0;
-    
+
     WITH_CSTR(s) {
 
     t = ACR_TableMake(_E, THROW_FMARK, 1);
     ACR_TableSet(_E, THROW_FMARK, t, J2S(s), J2S(s), 0);
     ACR_TableSet(_E, THROW_FMARK, t, J2S(s), J2S(s), 1);
-    
+
     if (ACR_TableGet(t, J2S(s), &d, &l) == ACR_SUCCESS) {
         if (!strcmp(J2S(s), (const char *)d) && l == 1)
             rc = 1;
@@ -186,7 +186,7 @@
 ACR_JNI_EXPORT_DECLARE(jint, TestPrivate, test013)(ACR_JNISTDARGS, jint d)
 {
     jint rc = 0;
-    
+
     if (d) {
         rc = ACR_DestroyClazzCache(_E);
     }
@@ -222,13 +222,13 @@
 
 ACR_JNI_EXPORT_DECLARE(jobject, TestPrivate, test017)(ACR_JNISTDARGS, jint d)
 {
-    
+
     return  ACR_PointerCreate(_E, I2P(d, void *), 0, callback);
 }
 
 ACR_JNI_EXPORT_DECLARE(jint, TestPrivate, test018)(ACR_JNISTDARGS, jobject p)
 {
-    
+
     return  ACR_PointerCleanup(_E, p);
 }
 
@@ -255,13 +255,13 @@
 
 ACR_JNI_EXPORT_DECLARE(jobject, TestPrivate, test021)(ACR_JNISTDARGS, jint i, jint d)
 {
-    
+
     return  ACR_DescriptorCreate(_E, ACR_DT_SOCKET, i, I2P(d, void *), dhandler);
 }
 
 ACR_JNI_EXPORT_DECLARE(jint, TestPrivate, test022)(ACR_JNISTDARGS, jobject d)
 {
-    
+
     return  ACR_DescriptorCleanup(_E, d);
 }
 
@@ -318,12 +318,12 @@
 
 ACR_JNI_EXPORT_DECLARE(void, TestPrivate, test030)(ACR_JNISTDARGS, int d)
 {
-	ACR_TRY {	
-		void *p = NULL;
-		memset(p, 1, 100);
-	} ACR_CATCH() {
-	    ACR_ThrowException(_E, THROW_NMARK, ACR_EX_ERUNTIME, EFAULT);
-	}
+    ACR_TRY {
+        void *p = NULL;
+        memset(p, 1, 100);
+    } ACR_CATCH() {
+        ACR_ThrowException(_E, THROW_NMARK, ACR_EX_ERUNTIME, EFAULT);
+    }
 }