diff --git a/mozilla/embedding/tests/mfcembed/components/PrintProgressDialog.cpp b/mozilla/embedding/tests/mfcembed/components/PrintProgressDialog.cpp index 426cfc55cef..d86a2d1e05f 100644 --- a/mozilla/embedding/tests/mfcembed/components/PrintProgressDialog.cpp +++ b/mozilla/embedding/tests/mfcembed/components/PrintProgressDialog.cpp @@ -9,6 +9,8 @@ #include "nsIWebBrowserPrint.h" #include "nsIInterfaceRequestorUtils.h" +#include "nsMemory.h" + #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE diff --git a/mozilla/extensions/wallet/src/nsWalletService.cpp b/mozilla/extensions/wallet/src/nsWalletService.cpp index d1ea342d7ca..130247a8b0a 100644 --- a/mozilla/extensions/wallet/src/nsWalletService.cpp +++ b/mozilla/extensions/wallet/src/nsWalletService.cpp @@ -65,7 +65,6 @@ #include "nsUnicharUtils.h" #include "nsReadableUtils.h" #include "nsICategoryManager.h" -#include "nsComObsolete.h" // for making the leap from nsIDOMWindowInternal -> nsIPresShell #include "nsIScriptGlobalObject.h" @@ -292,7 +291,7 @@ nsWalletlibService::UnregisterProc(nsIComponentManager *aCompMgr, PRBool expireMasterPassword = PR_FALSE; #define expireMasterPasswordPref "signon.expireMasterPassword" -MODULE_PRIVATE int PR_CALLBACK +int PR_CALLBACK ExpireMasterPasswordPrefChanged(const char * newpref, void * data) { nsresult rv; nsCOMPtr prefs(do_GetService(NS_PREF_CONTRACTID, &rv)); diff --git a/mozilla/extensions/wallet/src/singsign.cpp b/mozilla/extensions/wallet/src/singsign.cpp index b565c651777..dd92c02f6ae 100644 --- a/mozilla/extensions/wallet/src/singsign.cpp +++ b/mozilla/extensions/wallet/src/singsign.cpp @@ -42,7 +42,6 @@ #include "singsign.h" #include "wallet.h" #include "nsNetUtil.h" -#include "nsComObsolete.h" #ifdef XP_MAC #include "prpriv.h" /* for NewNamedMonitor */ @@ -100,7 +99,7 @@ static PRInt32 si_LastFormForWhichUserHasBeenSelected = -1; #ifdef APPLE_KEYCHAIN static PRBool si_list_invalid = PR_FALSE; static KCCallbackUPP si_kcUPP = NULL; -PRIVATE int +static int si_SaveSignonDataInKeychain(); #endif @@ -120,7 +119,7 @@ static PRUint32 gSelectUserDialogCount = 0; * Locking the Signon List * ***************************/ -PRIVATE void +static void si_lock_signon_list(void) { if(!signon_lock_monitor) { signon_lock_monitor = PR_NewNamedMonitor("signon-lock"); @@ -142,7 +141,7 @@ si_lock_signon_list(void) { } } -PRIVATE void +static void si_unlock_signon_list(void) { PR_EnterMonitor(signon_lock_monitor); @@ -164,7 +163,7 @@ si_unlock_signon_list(void) { * Preference Utility Functions * ********************************/ -PUBLIC void +void SI_RegisterCallback(const char* domain, PrefChangedFunc callback, void* instance_data) { nsresult ret; nsCOMPtr pPrefService = do_GetService(NS_PREF_CONTRACTID, &ret); @@ -173,7 +172,7 @@ SI_RegisterCallback(const char* domain, PrefChangedFunc callback, void* instance } } -PUBLIC void +void SI_UnregisterCallback(const char* domain, PrefChangedFunc callback, void* instance_data) { nsresult ret; nsCOMPtr pPrefService = do_GetService(NS_PREF_CONTRACTID, &ret); @@ -182,7 +181,7 @@ SI_UnregisterCallback(const char* domain, PrefChangedFunc callback, void* instan } } -PUBLIC void +void SI_SetBoolPref(const char * prefname, PRBool prefvalue) { nsresult ret; nsCOMPtr pPrefService = do_GetService(NS_PREF_CONTRACTID, &ret); @@ -194,7 +193,7 @@ SI_SetBoolPref(const char * prefname, PRBool prefvalue) { } } -PUBLIC PRBool +PRBool SI_GetBoolPref(const char * prefname, PRBool defaultvalue) { nsresult ret; PRBool prefvalue = defaultvalue; @@ -205,7 +204,7 @@ SI_GetBoolPref(const char * prefname, PRBool defaultvalue) { return prefvalue; } -PUBLIC void +void SI_SetCharPref(const char * prefname, const char * prefvalue) { if (!prefvalue) { return; /* otherwise the SetCharPref routine called below will crash */ @@ -220,7 +219,7 @@ SI_SetCharPref(const char * prefname, const char * prefvalue) { } } -PUBLIC void +void SI_GetCharPref(const char * prefname, char** aPrefvalue) { nsresult ret; nsCOMPtr pPrefService = do_GetService(NS_PREF_CONTRACTID, &ret); @@ -234,7 +233,7 @@ SI_GetCharPref(const char * prefname, char** aPrefvalue) { } } -PUBLIC void +void SI_GetLocalizedUnicharPref(const char * prefname, PRUnichar** aPrefvalue) { nsresult ret; nsCOMPtr pPrefService = do_GetService(NS_PREF_CONTRACTID, &ret); @@ -259,34 +258,34 @@ static const char *pref_Notified = "signon.Notified"; #endif static const char *pref_SignonFileName = "signon.SignonFileName"; -PRIVATE PRBool si_RememberSignons = PR_FALSE; +static PRBool si_RememberSignons = PR_FALSE; #ifdef WALLET_PASSWORDMANAGER_DEFAULT_IS_OFF -PRIVATE PRBool si_Notified = PR_FALSE; +static PRBool si_Notified = PR_FALSE; #endif -PRIVATE int +static int si_SaveSignonDataLocked(char * state, PRBool notify); -PUBLIC int +int SI_LoadSignonData(); -PUBLIC void +void SI_RemoveAllSignonData(); #ifdef WALLET_PASSWORDMANAGER_DEFAULT_IS_OFF -PRIVATE PRBool +static PRBool si_GetNotificationPref(void) { return si_Notified; } -PRIVATE void +static void si_SetNotificationPref(PRBool x) { SI_SetBoolPref(pref_Notified, x); si_Notified = x; } #endif -PRIVATE void +static void si_SetSignonRememberingPref(PRBool x) { #ifdef APPLE_KEYCHAIN if (x == 0) { @@ -299,7 +298,7 @@ si_SetSignonRememberingPref(PRBool x) { si_RememberSignons = x; } -MODULE_PRIVATE int PR_CALLBACK +int PR_CALLBACK si_SignonRememberingPrefChanged(const char * newpref, void * data) { PRBool x; x = SI_GetBoolPref(pref_rememberSignons, PR_TRUE); @@ -307,7 +306,7 @@ si_SignonRememberingPrefChanged(const char * newpref, void * data) { return 0; /* this is PREF_NOERROR but we no longer include prefapi.h */ } -PRIVATE void +static void si_RegisterSignonPrefCallbacks(void) { PRBool x; static PRBool first_time = PR_TRUE; @@ -328,7 +327,7 @@ si_RegisterSignonPrefCallbacks(void) { } } -PRIVATE PRBool +static PRBool si_GetSignonRememberingPref(void) { #ifdef APPLE_KEYCHAIN /* If the Keychain has been locked or an item deleted or updated, @@ -363,7 +362,7 @@ si_GetSignonRememberingPref(void) { #endif } -PUBLIC void +void SI_InitSignonFileName() { SI_GetCharPref(pref_SignonFileName, &signonFileName); if (!signonFileName) { @@ -378,18 +377,18 @@ SI_InitSignonFileName() { ***********/ #ifdef WALLET_PASSWORDMANAGER_DEFAULT_IS_OFF -PRIVATE PRBool +static PRBool si_ConfirmYN(PRUnichar * szMessage, nsIDOMWindowInternal* window) { return Wallet_ConfirmYN(szMessage, window); } #endif -PRIVATE PRInt32 +static PRInt32 si_3ButtonConfirm(PRUnichar * szMessage, nsIDOMWindowInternal* window) { return Wallet_3ButtonConfirm(szMessage, window); } -PRIVATE PRBool +static PRBool si_SelectDialog(const PRUnichar* szMessage, nsIPrompt* dialog, PRUnichar** pList, PRInt32* pCount, PRUint32 formNumber) { if (si_LastFormForWhichUserHasBeenSelected == (PRInt32)formNumber) { /* a user was already selected for this form, use same one again */ @@ -590,7 +589,7 @@ si_CheckGetUsernamePassword #undef StrAllocCopy #define StrAllocCopy(dest, src) Local_SACopy (&(dest), src) -PRIVATE char * +static char * Local_SACopy(char **destination, const char *source) { if(*destination) { PL_strfree(*destination); @@ -600,14 +599,14 @@ Local_SACopy(char **destination, const char *source) { } /* remove terminating CRs or LFs */ -PRIVATE void +static void si_StripLF(nsAutoString buffer) { buffer.Trim("\n\r", PR_FALSE, PR_TRUE, PR_FALSE); } #ifdef WALLET_PASSWORDMANAGER_DEFAULT_IS_OFF /* If user-entered password is "********", then generate a random password */ -PRIVATE void +static void si_Randomize(nsString& password) { PRIntervalTime randomNumber; int i; @@ -769,17 +768,17 @@ public: // nsAutoString userName; //} si_Reject; -PRIVATE nsVoidArray * si_signon_list=0; -PRIVATE nsVoidArray * si_reject_list=0; +static nsVoidArray * si_signon_list=0; +static nsVoidArray * si_reject_list=0; #define LIST_COUNT(list) (list ? list->Count() : 0) -PRIVATE PRBool si_signon_list_changed = PR_FALSE; +static PRBool si_signon_list_changed = PR_FALSE; /* * Get the URL node for a given URL name * * This routine is called only when holding the signon lock!!! */ -PRIVATE si_SignonURLStruct * +static si_SignonURLStruct * si_GetURL(const char * passwordRealm) { si_SignonURLStruct * url; if (!passwordRealm) { @@ -819,10 +818,10 @@ public: si_SignonURLStruct *legacyUrl; }; -PRIVATE si_SignonCompositeURLStruct * si_composite_url=0; +static si_SignonCompositeURLStruct * si_composite_url=0; #if defined(SINGSIGN_LOGGING) -PRIVATE void +static void si_DumpUserList(nsVoidArray &list) { LOG(("dumping user list:\n")); @@ -841,7 +840,7 @@ si_DumpUserList(nsVoidArray &list) } #endif -PRIVATE si_SignonURLStruct * +static si_SignonURLStruct * si_GetCompositeURL(const char *primaryRealm, const char *legacyRealm) { si_SignonURLStruct *primaryUrl, *legacyUrl; @@ -910,7 +909,7 @@ si_GetCompositeURL(const char *primaryRealm, const char *legacyRealm) return legacyUrl; } -PRIVATE PRInt32 +static PRInt32 si_SetChosenUser(si_SignonURLStruct *url, si_SignonUserStruct *chosen_user) { PRInt32 index; @@ -925,7 +924,7 @@ si_SetChosenUser(si_SignonURLStruct *url, si_SignonUserStruct *chosen_user) return index; } -PRIVATE void +static void si_ReleaseCompositeURL(si_SignonURLStruct *url) { if (url == si_composite_url) { @@ -960,7 +959,7 @@ si_ReleaseCompositeURL(si_SignonURLStruct *url) } /* Remove a user node from a given URL node */ -PRIVATE PRBool +static PRBool si_RemoveUser(const char *passwordRealm, const nsString& userName, PRBool save, PRBool loginFailure, PRBool notify, PRBool first = PR_FALSE) { si_SignonURLStruct * url; si_SignonUserStruct * user; @@ -1023,22 +1022,22 @@ si_RemoveUser(const char *passwordRealm, const nsString& userName, PRBool save, return PR_TRUE; } -PUBLIC nsresult +nsresult SINGSIGN_RemoveUser(const char *host, const PRUnichar *user, PRBool notify) { PRBool rv = si_RemoveUser(host, nsAutoString(user), PR_TRUE, PR_FALSE, notify); return rv ? NS_OK : NS_ERROR_FAILURE; } -PUBLIC nsresult +nsresult SINGSIGN_RemoveUserAfterLoginFailure(const char *host, const PRUnichar *user, PRBool notify) { PRBool rv = si_RemoveUser(host, nsAutoString(user), PR_TRUE, PR_TRUE, notify); return rv ? NS_OK : NS_ERROR_FAILURE; } -PRIVATE void +static void si_FreeReject(si_Reject * reject); -PUBLIC nsresult +nsresult SINGSIGN_RemoveReject(const char *host) { si_Reject* reject; nsresult rv = NS_ERROR_FAILURE; @@ -1060,10 +1059,10 @@ SINGSIGN_RemoveReject(const char *host) { return rv; } -PRIVATE void +static void si_PutReject(const char * passwordRealm, const nsString& userName, PRBool save); -PUBLIC nsresult +nsresult SINGSIGN_AddReject(const char *host /*, const char *userName*/) { si_PutReject(host, nsString(/*thisParameter_isObsolete*/), PR_TRUE); // @see http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/extensions/wallet/src/singsign.cpp&rev=1.212&mark=1693#1650 @@ -1071,7 +1070,7 @@ SINGSIGN_AddReject(const char *host /*, const char *userName*/) { } /* Determine if a specified url/user exists */ -PRIVATE PRBool +static PRBool si_CheckForUser(const char *passwordRealm, const nsString& userName) { si_SignonURLStruct * url; si_SignonUserStruct * user; @@ -1113,7 +1112,7 @@ si_CheckForUser(const char *passwordRealm, const nsString& userName) { * Get first data node that is not a password */ -PRIVATE si_SignonDataStruct * +static si_SignonDataStruct * si_GetFirstNonPasswordData(si_SignonUserStruct* user) { PRInt32 dataCount = user->signonData_list.Count(); for (PRInt32 j=0; jCount(); } -PUBLIC PRInt32 +PRInt32 SINGSIGN_UserCount(PRInt32 host) { if (!si_signon_list) { return 0; @@ -2995,7 +2994,7 @@ SINGSIGN_UserCount(PRInt32 host) { return hostStruct->signonUser_list.Count(); } -PUBLIC nsresult +nsresult SINGSIGN_Enumerate (PRInt32 hostNumber, PRInt32 userNumber, char **host, PRUnichar ** user, PRUnichar ** pswd) { @@ -3064,7 +3063,7 @@ SINGSIGN_Enumerate return NS_OK; } -PUBLIC PRInt32 +PRInt32 SINGSIGN_RejectCount() { if (!si_reject_list) { return 0; @@ -3072,7 +3071,7 @@ SINGSIGN_RejectCount() { return si_reject_list->Count(); } -PUBLIC nsresult +nsresult SINGSIGN_RejectEnumerate (PRInt32 rejectNumber, char **host) { @@ -3110,7 +3109,7 @@ si_KeychainCallback( KCEvent keychainEvent, KCCallbackInfo *info, void *userCont * * This routine is called only if signon pref is enabled!!! */ -PRIVATE int +static int si_LoadSignonDataFromKeychain() { char * passwordRealm; si_FormSubmitData submit; @@ -3297,7 +3296,7 @@ si_LoadSignonDataFromKeychain() { * * This routine is called only if signon pref is enabled!!! */ -PRIVATE int +static int si_SaveSignonDataInKeychain() { char* account = nil; char* password = nil; diff --git a/mozilla/extensions/wallet/src/wallet.cpp b/mozilla/extensions/wallet/src/wallet.cpp index 1f973b50f20..c35efd96f1f 100644 --- a/mozilla/extensions/wallet/src/wallet.cpp +++ b/mozilla/extensions/wallet/src/wallet.cpp @@ -71,7 +71,6 @@ #include "nsIObserverService.h" #include "nsIWalletService.h" -#include "nsComObsolete.h" #include @@ -97,9 +96,9 @@ static const char *pref_captureForms = "wallet.captureForms"; static const char *pref_enabled = "wallet.enabled"; static const char *pref_WalletSchemaValueFileName = "wallet.SchemaValueFileName"; -PRIVATE PRBool wallet_captureForms = PR_FALSE; +static PRBool wallet_captureForms = PR_FALSE; -PRIVATE void +static void wallet_SetFormsCapturingPref(PRBool x) { /* do nothing if new value of pref is same as current value */ @@ -111,7 +110,7 @@ wallet_SetFormsCapturingPref(PRBool x) wallet_captureForms = x; } -MODULE_PRIVATE int PR_CALLBACK +int PR_CALLBACK wallet_FormsCapturingPrefChanged(const char * newpref, void * data) { PRBool x; @@ -135,14 +134,14 @@ wallet_RegisterCapturePrefCallbacks(void) } } -PRIVATE PRBool +static PRBool wallet_GetFormsCapturingPref(void) { wallet_RegisterCapturePrefCallbacks(); return wallet_captureForms; } -PRIVATE PRBool +static PRBool wallet_GetEnabledPref(void) { /* This pref is not in the prefs panel. It's purpose is to remove wallet from all UI */ @@ -248,15 +247,15 @@ public: }; wallet_HelpMac * helpMac; -PRIVATE nsVoidArray * wallet_FieldToSchema_list = 0; -PRIVATE nsVoidArray * wallet_VcardToSchema_list = 0; -PRIVATE nsVoidArray * wallet_SchemaToValue_list = 0; -PRIVATE nsVoidArray * wallet_SchemaConcat_list = 0; -PRIVATE nsVoidArray * wallet_SchemaStrings_list = 0; -PRIVATE nsVoidArray * wallet_PositionalSchema_list = 0; -PRIVATE nsVoidArray * wallet_StateSchema_list = 0; -PRIVATE nsVoidArray * wallet_URL_list = 0; -PRIVATE nsVoidArray * wallet_DistinguishedSchema_list = 0; +static nsVoidArray * wallet_FieldToSchema_list = 0; +static nsVoidArray * wallet_VcardToSchema_list = 0; +static nsVoidArray * wallet_SchemaToValue_list = 0; +static nsVoidArray * wallet_SchemaConcat_list = 0; +static nsVoidArray * wallet_SchemaStrings_list = 0; +static nsVoidArray * wallet_PositionalSchema_list = 0; +static nsVoidArray * wallet_StateSchema_list = 0; +static nsVoidArray * wallet_URL_list = 0; +static nsVoidArray * wallet_DistinguishedSchema_list = 0; #define NO_CAPTURE(x) x[0] #define NO_PREVIEW(x) x[1] @@ -428,7 +427,7 @@ wallet_DumpStopwatch() { #define PROPERTIES_URL "chrome://communicator/locale/wallet/wallet.properties" -PUBLIC PRUnichar * +PRUnichar * Wallet_Localize(const char* genericString) { nsresult ret; nsAutoString v; @@ -480,7 +479,7 @@ Wallet_Localize(const char* genericString) { /* Modal dialog boxes */ /**********************/ -PUBLIC PRBool +PRBool Wallet_Confirm(PRUnichar * szMessage, nsIDOMWindowInternal* window) { PRBool retval = PR_TRUE; /* default value */ @@ -498,7 +497,7 @@ Wallet_Confirm(PRUnichar * szMessage, nsIDOMWindowInternal* window) return retval; } -PUBLIC PRBool +PRBool Wallet_ConfirmYN(PRUnichar * szMessage, nsIDOMWindowInternal* window) { nsresult res; nsCOMPtr dialog; @@ -519,7 +518,7 @@ Wallet_ConfirmYN(PRUnichar * szMessage, nsIDOMWindowInternal* window) { return (buttonPressed == 0); } -PUBLIC PRInt32 +PRInt32 Wallet_3ButtonConfirm(PRUnichar * szMessage, nsIDOMWindowInternal* window) { nsresult res; @@ -545,7 +544,7 @@ Wallet_3ButtonConfirm(PRUnichar * szMessage, nsIDOMWindowInternal* window) return buttonPressed; } -PRIVATE void +static void wallet_Alert(PRUnichar * szMessage, nsIDOMWindowInternal* window) { nsresult res; @@ -562,7 +561,7 @@ wallet_Alert(PRUnichar * szMessage, nsIDOMWindowInternal* window) return; // XXX should return the error } -PRIVATE void +static void wallet_Alert(PRUnichar * szMessage, nsIPrompt* dialog) { nsresult res; @@ -573,7 +572,7 @@ wallet_Alert(PRUnichar * szMessage, nsIPrompt* dialog) return; // XXX should return the error } -PUBLIC PRBool +PRBool Wallet_CheckConfirmYN (PRUnichar * szMessage, PRUnichar * szCheckMessage, PRBool* checkValue, nsIDOMWindowInternal* window) { @@ -613,7 +612,7 @@ nsISecretDecoderRing* gSecretDecoderRing; PRBool gEncryptionFailure = PR_FALSE; PRInt32 gReencryptionLevel = 0; -PRIVATE nsresult +static nsresult wallet_CryptSetup() { if (!gSecretDecoderRing) { @@ -633,7 +632,7 @@ wallet_CryptSetup() { #define PREFIX "~" #include "plbase64.h" -PRIVATE nsresult EncryptString (const char * text, char *& crypt) { +static nsresult EncryptString (const char * text, char *& crypt) { /* use SecretDecoderRing if encryption pref is set */ nsresult rv; @@ -669,7 +668,7 @@ PRIVATE nsresult EncryptString (const char * text, char *& crypt) { return NS_OK; } -PRIVATE nsresult DecryptString (const char * crypt, char *& text) { +static nsresult DecryptString (const char * crypt, char *& text) { /* treat zero-length crypt string as a special case */ if (crypt[0] == '\0') { @@ -720,7 +719,7 @@ PRIVATE nsresult DecryptString (const char * crypt, char *& text) { return NS_OK; } -PUBLIC void +void WLLT_ExpirePassword(PRBool* status) { nsresult rv = wallet_CryptSetup(); if (NS_SUCCEEDED(rv)) { @@ -729,7 +728,7 @@ WLLT_ExpirePassword(PRBool* status) { *status = NS_SUCCEEDED(rv); } -PUBLIC void +void WLLT_ExpirePasswordOnly(PRBool* status) { nsresult rv = wallet_CryptSetup(); if (NS_SUCCEEDED(rv)) { @@ -740,7 +739,7 @@ WLLT_ExpirePasswordOnly(PRBool* status) { PRBool changingPassword = PR_FALSE; -PUBLIC void +void WLLT_ChangePassword(PRBool* status) { nsresult rv = wallet_CryptSetup(); if (NS_SUCCEEDED(rv)) { @@ -780,7 +779,7 @@ wallet_Decrypt(const nsCString& crypt, nsCString& text) { return NS_OK; } -PUBLIC nsresult +nsresult Wallet_Encrypt (const nsString& textUCS2, nsString& cryptUCS2) { nsCAutoString cryptUTF8; nsresult rv = wallet_Encrypt(NS_ConvertUCS2toUTF8(textUCS2), cryptUTF8); @@ -788,7 +787,7 @@ Wallet_Encrypt (const nsString& textUCS2, nsString& cryptUCS2) { return rv; } -PUBLIC nsresult +nsresult Wallet_Decrypt(const nsString& cryptUCS2, nsString& textUCS2) { nsCAutoString textUTF8; nsresult rv = wallet_Decrypt(NS_ConvertUCS2toUTF8(cryptUCS2), textUTF8); @@ -796,13 +795,13 @@ Wallet_Decrypt(const nsString& cryptUCS2, nsString& textUCS2) { return rv; } -PUBLIC nsresult +nsresult Wallet_Encrypt2(const nsString& text, nsString& crypt) { return Wallet_Encrypt (text, crypt); } -PUBLIC nsresult +nsresult Wallet_Decrypt2 (const nsString& crypt, nsString& text) { return Wallet_Decrypt (crypt, text); @@ -837,7 +836,7 @@ wallet_Clear(nsVoidArray ** list) { * element at a time was very inefficient on the mac */ -PRIVATE nsVoidArray * wallet_MapElementAllocations_list = 0; +static nsVoidArray * wallet_MapElementAllocations_list = 0; const PRInt32 kAllocBlockElems = 500; static PRInt32 wallet_NextAllocSlot = kAllocBlockElems; @@ -1121,7 +1120,7 @@ wallet_ReadFromList( * */ -PUBLIC void +void Wallet_UTF8Put(nsOutputFileStream& strm, PRUnichar c) { if (c <= 0x7F) { strm.put((char)c); @@ -1152,7 +1151,7 @@ wallet_Get(nsInputFileStream& strm) { return (buf[next++]); } -PUBLIC PRUnichar +PRUnichar Wallet_UTF8Get(nsInputFileStream& strm) { PRUnichar c = wallet_Get(strm); if ((c & 0x80) == 0x00) { @@ -1189,7 +1188,7 @@ Wallet_UTF8Get(nsInputFileStream& strm) { * */ -PUBLIC void +void Wallet_SimplePut(nsOutputFileStream& strm, PRUnichar c) { if (c < 0xFF) { strm.put((char)c); @@ -1200,7 +1199,7 @@ Wallet_SimplePut(nsOutputFileStream& strm, PRUnichar c) { } } -PUBLIC PRUnichar +PRUnichar Wallet_SimpleGet(nsInputFileStream& strm) { PRUnichar c = (strm.get() & 0xFF); if (c != 0xFF) { @@ -1232,7 +1231,7 @@ const char distinguishedSchemaFileName[] = "DistinguishedSchema.tbl"; /* The following routines are for accessing the files */ /******************************************************/ -PUBLIC nsresult Wallet_ProfileDirectory(nsFileSpec& dirSpec) { +nsresult Wallet_ProfileDirectory(nsFileSpec& dirSpec) { /* return the profile */ nsresult res; @@ -1254,7 +1253,7 @@ PUBLIC nsresult Wallet_ProfileDirectory(nsFileSpec& dirSpec) { return res; } -PUBLIC nsresult Wallet_DefaultsDirectory(nsFileSpec& dirSpec) { +nsresult Wallet_DefaultsDirectory(nsFileSpec& dirSpec) { nsresult res; nsCOMPtr aFile; @@ -1277,7 +1276,7 @@ PUBLIC nsresult Wallet_DefaultsDirectory(nsFileSpec& dirSpec) { return res; } -PUBLIC char * +char * Wallet_RandomName(char* suffix) { /* pick the current time as the random number */ @@ -1558,7 +1557,7 @@ wallet_ReadFromFile /* The following are utility routines for the main wallet processing */ /*********************************************************************/ -PUBLIC void +void Wallet_GiveCaveat(nsIDOMWindowInternal* window, nsIPrompt* dialog) { /* test for first capturing of data ever and give caveat if so */ if (!SI_GetBoolPref(pref_Caveat, PR_FALSE)) { @@ -2459,7 +2458,7 @@ wallet_GetPrefills( /* * termination for wallet session */ -PUBLIC void +void Wallet_ReleaseAllLists() { wallet_Clear(&wallet_FieldToSchema_list); /* otherwise we will duplicate the list */ wallet_Clear(&wallet_VcardToSchema_list); /* otherwise we will duplicate the list */ @@ -2680,7 +2679,7 @@ wallet_ReleasePrefillElementList(nsVoidArray * wallet_PrefillElement_list) { nsVoidArray * wallet_list; nsAutoString wallet_url; -PUBLIC void +void WLLT_GetPrefillListForViewer(nsString& aPrefillList) { wallet_Initialize(PR_FALSE); /* to initialize helpMac */ @@ -2702,7 +2701,7 @@ WLLT_GetPrefillListForViewer(nsString& aPrefillList) aPrefillList = buffer; } -PRIVATE void +static void wallet_FreeURL(wallet_MapElement *url) { if(!url) { @@ -2717,7 +2716,7 @@ const char* permission_NoCapture_Preview = "yn"; const char* permission_Capture_NoPreview = "ny"; const char* permission_Capture_Preview = "nn"; -PUBLIC void +void Wallet_SignonViewerReturn(const nsString& results) { wallet_MapElement *url; @@ -2776,7 +2775,7 @@ Wallet_SignonViewerReturn(const nsString& results) /* * see if user wants to capture data on current page */ -PRIVATE PRBool +static PRBool wallet_OKToCapture(const nsAFlatCString& url, nsIDOMWindowInternal* window) { /* exit if pref is not set */ @@ -2822,7 +2821,7 @@ wallet_OKToCapture(const nsAFlatCString& url, nsIDOMWindowInternal* window) { /* * capture the value of a form element */ -PRIVATE PRBool +static PRBool wallet_Capture(nsIDocument* doc, const nsString& field, const nsString& value, nsACString& schema) { /* do nothing if there is no value */ @@ -2946,7 +2945,7 @@ wallet_Capture(nsIDocument* doc, const nsString& field, const nsString& value, n /* The following are the interface routines seen by other dlls */ /***************************************************************/ -PUBLIC void +void WLLT_GetNopreviewListForViewer(nsString& aNopreviewList) { wallet_Initialize(PR_FALSE); /* to initialize helpMac */ @@ -2965,7 +2964,7 @@ WLLT_GetNopreviewListForViewer(nsString& aNopreviewList) aNopreviewList = buffer; } -PUBLIC void +void WLLT_GetNocaptureListForViewer(nsString& aNocaptureList) { nsAutoString buffer; @@ -2983,7 +2982,7 @@ WLLT_GetNocaptureListForViewer(nsString& aNocaptureList) aNocaptureList = buffer; } -PUBLIC void +void WLLT_PostEdit(const nsString& walletList) { nsFileSpec dirSpec; @@ -3037,7 +3036,7 @@ WLLT_PostEdit(const nsString& walletList) wallet_ReadFromFile(schemaValueFileName, wallet_SchemaToValue_list, PR_TRUE); } -PUBLIC void +void WLLT_PreEdit(nsString& walletList) { wallet_Initialize(); @@ -3065,7 +3064,7 @@ WLLT_PreEdit(nsString& walletList) } } -PUBLIC void +void WLLT_DeleteAll() { wallet_Initialize(); wallet_Clear(&wallet_SchemaToValue_list); @@ -3073,14 +3072,14 @@ WLLT_DeleteAll() { SI_DeleteAll(); } -PUBLIC void +void WLLT_ClearUserData() { wallet_ValuesReadIn = PR_FALSE; namesInitialized = PR_FALSE; wallet_URLListInitialized = PR_FALSE; } -PUBLIC void +void WLLT_DeletePersistentUserData() { if (schemaValueFileName && schemaValueFileName[0]) { @@ -3094,7 +3093,7 @@ WLLT_DeletePersistentUserData() { } } -MODULE_PRIVATE int PR_CALLBACK +int PR_CALLBACK wallet_ReencryptAll(const char * newpref, void* window) { PRUnichar * message; @@ -3181,7 +3180,7 @@ fail: return 1; } -PUBLIC void +void WLLT_InitReencryptCallback(nsIDOMWindowInternal* window) { static PRBool registered = PR_FALSE; static nsIDOMWindowInternal* lastWindow; @@ -3193,7 +3192,7 @@ WLLT_InitReencryptCallback(nsIDOMWindowInternal* window) { registered = PR_TRUE; } -PRIVATE void +static void wallet_DecodeVerticalBars(nsString& s) { s.ReplaceSubstring(NS_LITERAL_STRING("^2").get(), NS_LITERAL_STRING("|").get()); s.ReplaceSubstring(NS_LITERAL_STRING("^1").get(), NS_LITERAL_STRING("^").get()); @@ -3202,7 +3201,7 @@ wallet_DecodeVerticalBars(nsString& s) { /* * return after previewing a set of prefills */ -PUBLIC void +void WLLT_PrefillReturn(const nsString& results) { nsAutoString fillins; @@ -3344,7 +3343,7 @@ WLLT_PrefillReturn(const nsString& results) /* * get the form elements on the current page and prefill them if possible */ -PRIVATE void +static void wallet_TraversalForPrefill (nsIDOMWindow* win, nsVoidArray* wallet_PrefillElement_list, nsString& urlName) { @@ -3450,7 +3449,7 @@ wallet_TraversalForPrefill } } -PUBLIC nsresult +nsresult WLLT_PrefillOneElement (nsIDOMWindowInternal* win, nsIDOMNode* elementNode, nsString& compositeValue) { @@ -3487,7 +3486,7 @@ WLLT_PrefillOneElement return NS_OK; } -PUBLIC nsresult +nsresult WLLT_Prefill(nsIPresShell* shell, PRBool quick, nsIDOMWindowInternal* win) { /* do not prefill if preview window is open in some other browser window */ @@ -3565,7 +3564,7 @@ WLLT_Prefill(nsIPresShell* shell, PRBool quick, nsIDOMWindowInternal* win) } } -PRIVATE PRBool +static PRBool wallet_CaptureInputElement(nsIDOMNode* elementNode, nsIDocument* doc) { nsresult result; PRBool captured = PR_FALSE; @@ -3611,7 +3610,7 @@ wallet_CaptureInputElement(nsIDOMNode* elementNode, nsIDocument* doc) { return captured; } -PRIVATE PRBool +static PRBool wallet_CaptureSelectElement(nsIDOMNode* elementNode, nsIDocument* doc) { nsresult result; PRBool captured = PR_FALSE; @@ -3683,7 +3682,7 @@ wallet_CaptureSelectElement(nsIDOMNode* elementNode, nsIDocument* doc) { return captured; } -PRIVATE void +static void wallet_TraversalForRequestToCapture(nsIDOMWindow* win, PRInt32& captureCount) { nsresult result; @@ -3754,7 +3753,7 @@ wallet_TraversalForRequestToCapture(nsIDOMWindow* win, PRInt32& captureCount) { } } -PUBLIC void +void WLLT_RequestToCapture(nsIPresShell* shell, nsIDOMWindowInternal* win, PRUint32* status) { PRInt32 captureCount = 0; @@ -3796,7 +3795,7 @@ public: PRBool isPassword; }; -PRIVATE PRBool +static PRBool wallet_IsNewValue(nsIDOMNode* elementNode, nsString valueOnForm) { if (valueOnForm.Equals(EmptyString())) { return PR_FALSE; @@ -3816,7 +3815,7 @@ wallet_IsNewValue(nsIDOMNode* elementNode, nsString valueOnForm) { return PR_TRUE; } -PUBLIC void +void WLLT_OnSubmit(nsIContent* currentForm, nsIDOMWindowInternal* window) { nsCOMPtr currentFormNode(do_QueryInterface(currentForm)); diff --git a/mozilla/gfx/idl/nsIPrintSettings.idl b/mozilla/gfx/idl/nsIPrintSettings.idl index f1a4fcd81b0..08e0c71e20e 100644 --- a/mozilla/gfx/idl/nsIPrintSettings.idl +++ b/mozilla/gfx/idl/nsIPrintSettings.idl @@ -43,7 +43,6 @@ %{ C++ #include "nsMargin.h" -#include "nsFont.h" %} /** diff --git a/mozilla/gfx/public/Makefile.in b/mozilla/gfx/public/Makefile.in index ed718e08ad4..5b9f71cb260 100644 --- a/mozilla/gfx/public/Makefile.in +++ b/mozilla/gfx/public/Makefile.in @@ -45,6 +45,7 @@ include $(DEPTH)/config/autoconf.mk MODULE = gfx EXPORTS = \ + gfxCore.h \ nsColor.h \ nsColorNames.h \ nsColorNameList.h \ diff --git a/mozilla/xpcom/base/nsComObsolete.h b/mozilla/gfx/public/gfxCore.h similarity index 50% rename from mozilla/xpcom/base/nsComObsolete.h rename to mozilla/gfx/public/gfxCore.h index 631ff0effc3..e6ed033c1ac 100644 --- a/mozilla/xpcom/base/nsComObsolete.h +++ b/mozilla/gfx/public/gfxCore.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * @@ -11,17 +12,18 @@ * for the specific language governing rights and limitations under the * License. * - * The Original Code is XPCOM. + * The Original Code is mozilla.org code. * - * The Initial Developer of the Original Code is Netscape Communications Corp. - * Portions created by the Initial Developer are Copyright (C) 2001 + * The Initial Developer of the Original Code is + * Marco Pesenti Gritti + * Portions created by the Initial Developer are Copyright (C) 2004 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPL"), or - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to @@ -33,15 +35,10 @@ * * ***** END LICENSE BLOCK ***** */ -#ifndef nsComObsolete_h__ -#define nsComObsolete_h__ +#ifndef gfxCore_h__ +#define gfxCore_h__ -/* These _IMPL_NS_* defines should move into their own directories. */ -#ifdef _IMPL_NS_WIDGET -#define NS_WIDGET NS_EXPORT -#else -#define NS_WIDGET NS_IMPORT -#endif +#include "nscore.h" #ifdef _IMPL_NS_GFX #define NS_GFX NS_EXPORT @@ -51,41 +48,4 @@ #define NS_GFX_(type) NS_IMPORT_(type) #endif - -/* - * People who create their own Win32 MSDev projects to compile against mozilla - * code *often* neglect to define XP_WIN and XP_WIN32. Rather than force - * those definitions here - and risk having some code get compiled incorrectly - * before this code is reached - we #error here to let the programmers know - * that they must modify their build projects. - * We would *like* to reduce the usage of these roughly synonymous defines. - * But it is a big modular project with a lot of brainprint issues... - * See bug: http://bugzilla.mozilla.org/show_bug.cgi?id=65727 - */ -#if defined(_WIN32) && (!defined(XP_WIN) || !defined(XP_WIN32)) -#error Add defines for XP_WIN and XP_WIN32 to your Win32 build project. -#endif - - -/* Define brackets for protecting C code from C++ */ -#ifdef __cplusplus -#define NS_BEGIN_EXTERN_C extern "C" { -#define NS_END_EXTERN_C } -#else -#define NS_BEGIN_EXTERN_C -#define NS_END_EXTERN_C -#endif - -#define PUBLIC -#define MODULE_PRIVATE - -#ifdef PRIVATE -#undef PRIVATE -#endif -#define PRIVATE static - -#ifdef __cplusplus -#include "nsDebug.h" -#endif - #endif diff --git a/mozilla/gfx/public/nsColor.h b/mozilla/gfx/public/nsColor.h index b830e195b96..e121439f676 100644 --- a/mozilla/gfx/public/nsColor.h +++ b/mozilla/gfx/public/nsColor.h @@ -38,8 +38,7 @@ #ifndef nsColor_h___ #define nsColor_h___ -#include "nscore.h" -#include "nsComObsolete.h" +#include "gfxCore.h" class nsString; class nsAString; diff --git a/mozilla/gfx/public/nsColorNames.h b/mozilla/gfx/public/nsColorNames.h index 6d8e147de71..2a0540fd2a2 100644 --- a/mozilla/gfx/public/nsColorNames.h +++ b/mozilla/gfx/public/nsColorNames.h @@ -39,7 +39,7 @@ #define nsColorNames_h___ #include "nsColor.h" -#include "nsComObsolete.h" +#include "gfxCore.h" #include "nsStringFwd.h" /* diff --git a/mozilla/gfx/public/nsDeviceContext.h b/mozilla/gfx/public/nsDeviceContext.h index bc32b06acfd..59406e9c41d 100644 --- a/mozilla/gfx/public/nsDeviceContext.h +++ b/mozilla/gfx/public/nsDeviceContext.h @@ -47,7 +47,7 @@ #include "nsIObserver.h" #include "nsIObserverService.h" #include "nsWeakReference.h" -#include "nsComObsolete.h" +#include "gfxCore.h" class nsIImageRequest; class nsHashtable; diff --git a/mozilla/gfx/public/nsFont.h b/mozilla/gfx/public/nsFont.h index 5cfacda8a10..13b1c6af4fa 100644 --- a/mozilla/gfx/public/nsFont.h +++ b/mozilla/gfx/public/nsFont.h @@ -38,8 +38,7 @@ #ifndef nsFont_h___ #define nsFont_h___ -#include "nscore.h" -#include "nsComObsolete.h" +#include "gfxCore.h" #include "nsCoord.h" #include "nsString.h" diff --git a/mozilla/gfx/public/nsRect.h b/mozilla/gfx/public/nsRect.h index 87185545ee7..2a2f82f133f 100644 --- a/mozilla/gfx/public/nsRect.h +++ b/mozilla/gfx/public/nsRect.h @@ -45,7 +45,7 @@ #include "nsSize.h" #include "nsMargin.h" #include "nsUnitConversion.h" -#include "nsComObsolete.h" +#include "gfxCore.h" struct NS_GFX nsRect { nscoord x, y; diff --git a/mozilla/gfx/public/nsRepeater.h b/mozilla/gfx/public/nsRepeater.h index b223e3426a4..de81ed06050 100644 --- a/mozilla/gfx/public/nsRepeater.h +++ b/mozilla/gfx/public/nsRepeater.h @@ -39,7 +39,7 @@ #define nsRepeater_h___ #include "nscore.h" -#include "nsComObsolete.h" +#include "widgetCore.h" class EventRecord; diff --git a/mozilla/gfx/public/nsTransform2D.h b/mozilla/gfx/public/nsTransform2D.h index 6be5c532ed5..4c3d7b19818 100644 --- a/mozilla/gfx/public/nsTransform2D.h +++ b/mozilla/gfx/public/nsTransform2D.h @@ -38,10 +38,9 @@ #ifndef nsTransform2D_h___ #define nsTransform2D_h___ -#include "nscore.h" +#include "gfxCore.h" #include "nsCoord.h" #include "nsUnitConversion.h" -#include "nsComObsolete.h" #define MG_2DIDENTITY 0 #define MG_2DTRANSLATION 1 diff --git a/mozilla/gfx/public/nsWatchTask.h b/mozilla/gfx/public/nsWatchTask.h index de59afad057..16d80a7d77a 100644 --- a/mozilla/gfx/public/nsWatchTask.h +++ b/mozilla/gfx/public/nsWatchTask.h @@ -45,8 +45,7 @@ #endif #include #include "prtypes.h" -#include "nscore.h" -#include "nsComObsolete.h" +#include "gfxCore.h" // // class nsWatchTask diff --git a/mozilla/gfx/src/imgScaler.h b/mozilla/gfx/src/imgScaler.h index f6b1e8c3996..4c7c8e65a00 100644 --- a/mozilla/gfx/src/imgScaler.h +++ b/mozilla/gfx/src/imgScaler.h @@ -36,7 +36,7 @@ * * ***** END LICENSE BLOCK ***** */ -#include "nsComObsolete.h" +#include "gfxCore.h" NS_GFX_(void) RectStretch(unsigned aSrcWidth, unsigned aSrcHeight, diff --git a/mozilla/gfx/src/mac/nsFontUtils.h b/mozilla/gfx/src/mac/nsFontUtils.h index 650803c1b49..c8da97830bb 100644 --- a/mozilla/gfx/src/mac/nsFontUtils.h +++ b/mozilla/gfx/src/mac/nsFontUtils.h @@ -43,7 +43,7 @@ #include "nsIFontMetrics.h" #include "nsIDeviceContext.h" -#include "nsComObsolete.h" +#include "gfxCore.h" class NS_GFX nsFontUtils { diff --git a/mozilla/gfx/src/mac/nsWatchTask.h b/mozilla/gfx/src/mac/nsWatchTask.h index de59afad057..16d80a7d77a 100644 --- a/mozilla/gfx/src/mac/nsWatchTask.h +++ b/mozilla/gfx/src/mac/nsWatchTask.h @@ -45,8 +45,7 @@ #endif #include #include "prtypes.h" -#include "nscore.h" -#include "nsComObsolete.h" +#include "gfxCore.h" // // class nsWatchTask diff --git a/mozilla/gfx/src/nsFontList.h b/mozilla/gfx/src/nsFontList.h index 81bc5699b51..05c495adaa2 100644 --- a/mozilla/gfx/src/nsFontList.h +++ b/mozilla/gfx/src/nsFontList.h @@ -45,7 +45,7 @@ #define _nsFontList_H_ #include "nsIFontList.h" -#include "nsComObsolete.h" +#include "gfxCore.h" #define NS_FONTLIST_CONTRACTID "@mozilla.org/gfx/fontlist;1" diff --git a/mozilla/gfx/src/nsPrintSession.h b/mozilla/gfx/src/nsPrintSession.h index 22aa33fe78f..60303beefeb 100644 --- a/mozilla/gfx/src/nsPrintSession.h +++ b/mozilla/gfx/src/nsPrintSession.h @@ -41,7 +41,7 @@ #include "nsIPrintSession.h" #include "nsWeakReference.h" -#include "nsComObsolete.h" +#include "gfxCore.h" //***************************************************************************** //*** nsPrintSession diff --git a/mozilla/gfx/src/nsPrintSettingsImpl.h b/mozilla/gfx/src/nsPrintSettingsImpl.h index e4ca7b1269c..bc11bd229a9 100644 --- a/mozilla/gfx/src/nsPrintSettingsImpl.h +++ b/mozilla/gfx/src/nsPrintSettingsImpl.h @@ -40,6 +40,7 @@ #ifndef nsPrintSettingsImpl_h__ #define nsPrintSettingsImpl_h__ +#include "gfxCore.h" #include "nsIPrintSettings.h" #include "nsMargin.h" #include "nsString.h" diff --git a/mozilla/gfx/src/nsRenderingContextImpl.h b/mozilla/gfx/src/nsRenderingContextImpl.h index 63eb8cfe881..3e68a977541 100644 --- a/mozilla/gfx/src/nsRenderingContextImpl.h +++ b/mozilla/gfx/src/nsRenderingContextImpl.h @@ -38,7 +38,7 @@ #ifndef nsRenderingContextImpl_h___ #define nsRenderingContextImpl_h___ -#include "nsComObsolete.h" +#include "gfxCore.h" #include "nsIRenderingContext.h" #include "nsPoint.h" #include "nsSize.h" diff --git a/mozilla/gfx/src/nsScriptableRegion.h b/mozilla/gfx/src/nsScriptableRegion.h index 75669c87b98..28f9aaf8ea5 100755 --- a/mozilla/gfx/src/nsScriptableRegion.h +++ b/mozilla/gfx/src/nsScriptableRegion.h @@ -38,7 +38,7 @@ * ***** END LICENSE BLOCK ***** */ #include "nsIScriptableRegion.h" -#include "nsComObsolete.h" +#include "gfxCore.h" class nsIRegion; diff --git a/mozilla/intl/uconv/src/unicpriv.h b/mozilla/intl/uconv/src/unicpriv.h index 2f03bb4104b..d69e8f7c3df 100644 --- a/mozilla/intl/uconv/src/unicpriv.h +++ b/mozilla/intl/uconv/src/unicpriv.h @@ -40,7 +40,6 @@ #include "ubase.h" #include "umap.h" #include "uconvutil.h" -#include "nsComObsolete.h" #ifdef __cplusplus extern "C" { diff --git a/mozilla/mailnews/base/src/nsMsgCopyService.h b/mozilla/mailnews/base/src/nsMsgCopyService.h index 936e8d4152e..c4d877d50f4 100644 --- a/mozilla/mailnews/base/src/nsMsgCopyService.h +++ b/mozilla/mailnews/base/src/nsMsgCopyService.h @@ -44,7 +44,6 @@ #include "nsIMsgFolder.h" #include "nsIMsgHdr.h" #include "nsIMsgWindow.h" -#include "nsComObsolete.h" typedef enum _nsCopyRequestType { diff --git a/mozilla/mailnews/compose/src/nsMsgCompUtils.h b/mozilla/mailnews/compose/src/nsMsgCompUtils.h index 3bfc03abbb1..d9df0d3d548 100644 --- a/mozilla/mailnews/compose/src/nsMsgCompUtils.h +++ b/mozilla/mailnews/compose/src/nsMsgCompUtils.h @@ -44,7 +44,6 @@ #include "nsMsgCompFields.h" #include "nsIMsgSend.h" #include "nsIMsgCompUtils.h" -#include "nsComObsolete.h" class nsIPrompt; @@ -66,7 +65,7 @@ public: virtual ~nsMsgCompUtils(); }; -NS_BEGIN_EXTERN_C +PR_BEGIN_EXTERN_C // // Create a file spec or file name using the name passed @@ -171,7 +170,7 @@ nsresult ConvertBufToPlainText(nsString &aConBuf, PRBool formatflowed = PR_FALSE PRBool UseFormatFlowed(const char *charset); -NS_END_EXTERN_C +PR_END_EXTERN_C #endif /* _nsMsgCompUtils_H_ */ diff --git a/mozilla/mailnews/imap/src/nsImapStringBundle.h b/mozilla/mailnews/imap/src/nsImapStringBundle.h index c82de3c0e36..4087a809f99 100644 --- a/mozilla/mailnews/imap/src/nsImapStringBundle.h +++ b/mozilla/mailnews/imap/src/nsImapStringBundle.h @@ -39,14 +39,13 @@ #define _nsImapStringBundle_H__ #include "nsIStringBundle.h" -#include "nsComObsolete.h" -NS_BEGIN_EXTERN_C +PR_BEGIN_EXTERN_C nsresult IMAPGetStringByID(PRInt32 stringID, PRUnichar **aString); nsresult IMAPGetStringBundle(nsIStringBundle **aBundle); -NS_END_EXTERN_C +PR_END_EXTERN_C diff --git a/mozilla/widget/public/Makefile.in b/mozilla/widget/public/Makefile.in index 1505e87ba57..2b38cd31980 100644 --- a/mozilla/widget/public/Makefile.in +++ b/mozilla/widget/public/Makefile.in @@ -47,6 +47,7 @@ XPIDL_MODULE = widget GRE_MODULE = 1 EXPORTS = \ + widgetCore.h \ nsIMenuBar.h \ nsIMenu.h \ nsIMenuItem.h \ diff --git a/mozilla/widget/public/widgetCore.h b/mozilla/widget/public/widgetCore.h new file mode 100644 index 00000000000..d776f9062d0 --- /dev/null +++ b/mozilla/widget/public/widgetCore.h @@ -0,0 +1,49 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Marco Pesenti Gritti + * Portions created by the Initial Developer are Copyright (C) 2004 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef widgetCore_h__ +#define widgetCore_h__ + +#include "nscore.h" + +#ifdef _IMPL_NS_WIDGET +#define NS_WIDGET NS_EXPORT +#else +#define NS_WIDGET NS_IMPORT +#endif + +#endif diff --git a/mozilla/widget/src/build/nsWidgetSupport.cpp b/mozilla/widget/src/build/nsWidgetSupport.cpp index 709c4c0ea25..3cb3c5dcb81 100644 --- a/mozilla/widget/src/build/nsWidgetSupport.cpp +++ b/mozilla/widget/src/build/nsWidgetSupport.cpp @@ -36,6 +36,7 @@ * ***** END LICENSE BLOCK ***** */ +#include "widgetCore.h" #include "nsWidgetSupport.h" #include "nsRect.h" #include "nsIAppShell.h" diff --git a/mozilla/xpcom/base/Makefile.in b/mozilla/xpcom/base/Makefile.in index 1749beaadde..a897bca8961 100644 --- a/mozilla/xpcom/base/Makefile.in +++ b/mozilla/xpcom/base/Makefile.in @@ -72,7 +72,6 @@ EXPORTS = \ nsAgg.h \ nsAutoPtr.h \ nsCom.h \ - nsComObsolete.h \ nsDebugImpl.h \ nsIAllocator.h \ nsIID.h \ diff --git a/mozilla/xpcom/ds/nsQuickSort.cpp b/mozilla/xpcom/ds/nsQuickSort.cpp index f243258f085..e6953ac623b 100644 --- a/mozilla/xpcom/ds/nsQuickSort.cpp +++ b/mozilla/xpcom/ds/nsQuickSort.cpp @@ -39,10 +39,9 @@ #include #include "prtypes.h" -#include "nsComObsolete.h" #include "nsQuickSort.h" -NS_BEGIN_EXTERN_C +PR_BEGIN_EXTERN_C #if !defined(DEBUG) && (defined(__cplusplus) || defined(__gcc)) # ifndef INLINE @@ -184,4 +183,4 @@ loop: SWAPINIT(a, es); /* NS_QuickSort(pn - r, r / es, es, cmp, data);*/ } -NS_END_EXTERN_C +PR_END_EXTERN_C diff --git a/mozilla/xpcom/ds/nsQuickSort.h b/mozilla/xpcom/ds/nsQuickSort.h index f8e103ebf81..0172b1c6eef 100644 --- a/mozilla/xpcom/ds/nsQuickSort.h +++ b/mozilla/xpcom/ds/nsQuickSort.h @@ -44,8 +44,7 @@ #define nsQuickSort_h___ #include "prtypes.h" -#include "nsComObsolete.h" -NS_BEGIN_EXTERN_C +PR_BEGIN_EXTERN_C /** * Parameters: @@ -63,6 +62,6 @@ PR_EXTERN(void) NS_QuickSort(void *, unsigned int, unsigned int, int (*)(const void *, const void *, void *), void *); -NS_END_EXTERN_C +PR_END_EXTERN_C #endif /* nsQuickSort_h___ */ diff --git a/mozilla/xpfe/appshell/public/nsICmdLineService.idl b/mozilla/xpfe/appshell/public/nsICmdLineService.idl index ac5a578d1fa..94d1b8f2fba 100644 --- a/mozilla/xpfe/appshell/public/nsICmdLineService.idl +++ b/mozilla/xpfe/appshell/public/nsICmdLineService.idl @@ -40,8 +40,6 @@ #include "nsICmdLineHandler.idl" %{C++ -#include "nsComObsolete.h" //for NS_APPSHELL - // e34783f5-ac08-11d2-8d19-00805fc2500c #define NS_COMMANDLINE_SERVICE_CID \ { 0xe34783f5, 0xac08, 0x11d2, \ diff --git a/mozilla/xpfe/components/startup/public/nsICmdLineService.idl b/mozilla/xpfe/components/startup/public/nsICmdLineService.idl index ac5a578d1fa..94d1b8f2fba 100644 --- a/mozilla/xpfe/components/startup/public/nsICmdLineService.idl +++ b/mozilla/xpfe/components/startup/public/nsICmdLineService.idl @@ -40,8 +40,6 @@ #include "nsICmdLineHandler.idl" %{C++ -#include "nsComObsolete.h" //for NS_APPSHELL - // e34783f5-ac08-11d2-8d19-00805fc2500c #define NS_COMMANDLINE_SERVICE_CID \ { 0xe34783f5, 0xac08, 0x11d2, \