Changeset 103458 in vbox
- Timestamp:
- Feb 19, 2024 5:00:08 PM (9 months ago)
- Location:
- trunk/src/libs/xpcom18a4
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/nsprpub/pr/src/pthreads/ptsynch.c
r102470 r103458 410 410 } /* PR_WaitCondVar */ 411 411 412 static PRStatus PR_NotifyCondVar(PRCondVar *cvar)413 {414 Assert(cvar != NULL);415 pt_PostNotifyToCvar(cvar, PR_FALSE);416 return PR_SUCCESS;417 } /* PR_NotifyCondVar */418 419 static PRStatus PR_NotifyAllCondVar(PRCondVar *cvar)420 {421 Assert(cvar != NULL);422 pt_PostNotifyToCvar(cvar, PR_TRUE);423 return PR_SUCCESS;424 } /* PR_NotifyAllCondVar */425 426 412 /**************************************************************/ 427 413 /**************************************************************/ -
trunk/src/libs/xpcom18a4/xpcom/reflect/xptcall/tests/TestXPTCInvoke.cpp
r102506 r103458 49 49 static int DoMultipleInheritenceTest(int rcExit); 50 50 static int DoMultipleInheritenceTest2(int rcExit); 51 #if 0 /*unused*/ 51 52 static void DoSpeedTest(); 53 #endif 52 54 53 55 … … 1413 1415 } 1414 1416 1417 #if 0 /*unused*/ 1415 1418 static void DoSpeedTest() 1416 1419 { … … 1464 1467 (double)(interval_invoke-interval_direct)/(double)interval_invoke*100); 1465 1468 } 1469 #endif -
trunk/src/libs/xpcom18a4/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
r102457 r103458 1812 1812 } 1813 1813 1814 #ifdef VBOX1815 /*1816 * From nsprpub, only caller below.1817 *1818 * @todo r=aeichner Implement an IPRT equivalent and replace.1819 */1820 static char *PL_strnstr(const char *big, const char *little, PRUint32 max)1821 {1822 size_t ll;1823 1824 if( ((const char *)0 == big) || ((const char *)0 == little) ) return (char *)0;1825 if( ((char)0 == *big) || ((char)0 == *little) ) return (char *)0;1826 1827 ll = strlen(little);1828 if( ll > (size_t)max ) return (char *)0;1829 max -= (PRUint32)ll;1830 max++;1831 1832 for( ; max && *big; big++, max-- )1833 if( *little == *big )1834 if( 0 == strncmp(big, little, ll) )1835 return (char *)big;1836 1837 return (char *)0;1838 }1839 #endif1840 1841 struct ArrayAndPrefix1842 {1843 nsISupportsArray* array;1844 const char* prefix;1845 PRUint32 length;1846 };1847 1848 PR_STATIC_CALLBACK(PLDHashOperator)1849 xpti_ArrayPrefixAppender(PLDHashTable *table, PLDHashEntryHdr *hdr,1850 PRUint32 number, void *arg)1851 {1852 xptiInterfaceEntry* entry = ((xptiHashEntry*)hdr)->value;1853 ArrayAndPrefix* args = (ArrayAndPrefix*) arg;1854 1855 const char* name = entry->GetTheName();1856 if(name != PL_strnstr(name, args->prefix, args->length))1857 return PL_DHASH_NEXT;1858 1859 nsCOMPtr<nsIInterfaceInfo> ii;1860 if(NS_SUCCEEDED(EntryToInfo(entry, getter_AddRefs(ii))))1861 args->array->AppendElement(ii);1862 return PL_DHASH_NEXT;1863 }1864 1865 1814 /* void autoRegisterInterfaces (); */ 1866 1815 NS_IMETHODIMP xptiInterfaceInfoManager::AutoRegisterInterfaces() -
trunk/src/libs/xpcom18a4/xpcom/tests/TestCRT.cpp
r103140 r103458 41 41 #include <stdlib.h> 42 42 43 #ifdef DEBUG 43 44 // The return from strcmp etc is only defined to be postive, zero or 44 45 // negative. The magnitude of a non-zero return is irrelevant. … … 53 54 } 54 55 } 55 56 #endif 56 57 57 58 // Verify that nsCRT versions of string comparison routines get the -
trunk/src/libs/xpcom18a4/xpcom/tests/nsIFileTest.cpp
r103140 r103458 15 15 #include "nsCOMPtr.h" 16 16 17 static void Passed();18 17 static void Failed(const char* explanation = nsnull); 19 static void Inspect();20 18 static void Banner(const char* bannerString); 21 19 … … 38 36 39 37 //---------------------------------------------------------------------------- 40 static void Passed()41 //----------------------------------------------------------------------------42 {43 printf("Test passed.");44 }45 46 //----------------------------------------------------------------------------47 38 static void Failed(const char* explanation) 48 39 //---------------------------------------------------------------------------- … … 50 41 printf("ERROR : Test failed.\n"); 51 42 printf("REASON: %s.\n", explanation); 52 }53 54 //----------------------------------------------------------------------------55 static void Inspect()56 //----------------------------------------------------------------------------57 {58 printf("^^^^^^^^^^ PLEASE INSPECT OUTPUT FOR ERRORS\n");59 43 } 60 44 … … 171 155 172 156 } 173 174 static void CreateUniqueTest(const char* creationPath, const char* appendPath,175 PRInt32 whatToCreate, PRInt32 perm)176 {177 nsresult rv;178 nsCOMPtr<nsILocalFile> file =179 do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);180 181 if (NS_FAILED(rv) || (!file))182 {183 printf("create nsILocalFile failed\n");184 return;185 }186 187 Banner("Creation Test");188 printf("creationPath == %s\nappendPath == %s\n", creationPath, appendPath);189 190 rv = file->InitWithNativePath(nsDependentCString(creationPath));191 VerifyResult(rv);192 193 printf("Appending %s\n", appendPath);194 rv = file->AppendNative(nsDependentCString(appendPath));195 VerifyResult(rv);196 197 printf("Check For Existence\n");198 199 PRBool exists;200 file->Exists(&exists);201 202 if (exists)203 printf("Yup!\n");204 else205 printf("no.\n");206 207 208 rv = file->CreateUnique(whatToCreate, perm);209 VerifyResult(rv);210 211 rv = file->Exists(&exists);212 VerifyResult(rv);213 214 215 if (!exists)216 {217 Failed("Did not create file system object!");218 return;219 }220 221 }222 223 157 224 158 static void CopyTest(const char *testFile, const char *targetDir) … … 423 357 registrar->AutoRegister(nsnull); 424 358 425 #if defined(XP_WIN) || defined(XP_OS2)426 InitTest("c:\\temp\\", "sub1/sub2/"); // expect failure427 InitTest("d:\\temp\\", "sub1\\sub2\\"); // expect failure428 429 CreationTest("c:\\temp\\", "file.txt", nsIFile::NORMAL_FILE_TYPE, 0644);430 DeletionTest("c:\\temp\\", "file.txt", PR_FALSE);431 432 MoveTest("c:\\newtemp\\", "d:");433 434 CreationTest("c:\\temp\\", "mumble\\a\\b\\c\\d\\e\\f\\g\\h\\i\\j\\k\\", nsIFile::DIRECTORY_TYPE, 0644);435 DeletionTest("c:\\temp\\", "mumble", PR_TRUE);436 437 CreateUniqueTest("c:\\temp\\", "foo", nsIFile::NORMAL_FILE_TYPE, 0644);438 CreateUniqueTest("c:\\temp\\", "foo", nsIFile::NORMAL_FILE_TYPE, 0644);439 CreateUniqueTest("c:\\temp\\", "bar.xx", nsIFile::DIRECTORY_TYPE, 0644);440 CreateUniqueTest("c:\\temp\\", "bar.xx", nsIFile::DIRECTORY_TYPE, 0644);441 DeletionTest("c:\\temp\\", "foo", PR_TRUE);442 DeletionTest("c:\\temp\\", "foo-1", PR_TRUE);443 DeletionTest("c:\\temp\\", "bar.xx", PR_TRUE);444 DeletionTest("c:\\temp\\", "bar-1.xx", PR_TRUE);445 446 #else447 #ifdef XP_UNIX448 359 InitTest("/tmp/", "sub1/sub2/"); // expect failure 449 360 … … 465 376 DeletionTest("/tmp", "foo", PR_TRUE); 466 377 467 #endif /* XP_UNIX */468 #endif /* XP_WIN || XP_OS2 */469 378 return 0; 470 379 } -
trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_header.c
r62449 r103458 281 281 fputs("#define NS_DECL_", state->file); 282 282 classNameUpper = xpidl_strdup(className); 283 if (!classNameUpper) 284 FAIL; 285 283 286 for (cp = classNameUpper; *cp != '\0'; cp++) 284 287 *cp = toupper(*cp);
Note:
See TracChangeset
for help on using the changeset viewer.