зеркало из https://github.com/mozilla/gecko-dev.git
Obsoleting xp_str.h:
* Move XP_IS_ macros into nsCRT.h & rename them to NS_IS_ * Make local XP_IS_ macros use the nsCRT ones * Remove NOT_NULL defines Bug #199920 r=alecf sr=bryner
This commit is contained in:
Родитель
66eee275cc
Коммит
4957953e70
|
@ -39,6 +39,7 @@
|
|||
|
||||
#include "pratom.h"
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCRT.h"
|
||||
#include "nsIModule.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
@ -98,9 +99,9 @@ static NS_DEFINE_IID(kIDocumentLoaderObserverIID, NS_IDOCUMENTLOADEROBSERVER_IID
|
|||
#define PICS_TO_UPPER(x) ((((PRUint32) (x)) > 0x7f) ? x : toupper(x))
|
||||
#define PICS_TO_LOWER(x) ((((PRUint32) (x)) > 0x7f) ? x : tolower(x))
|
||||
|
||||
#define PICS_IS_ALPHA(x) ((((PRUint32) (x)) > 0x7f) ? 0 : isalpha(x))
|
||||
#define PICS_IS_DIGIT(x) ((((PRUint32) (x)) > 0x7f) ? 0 : isdigit(x))
|
||||
#define PICS_IS_SPACE(x) ((((PRUint32) (x)) > 0x7f) ? 0 : isspace(x))
|
||||
#define PICS_IS_ALPHA(x) NS_IS_ALPHA(x)
|
||||
#define PICS_IS_DIGIT(x) NS_IS_DIGIT(x)
|
||||
#define PICS_IS_SPACE(x) NS_IS_SPACE(x)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,4 @@
|
|||
# This is a list of local files which get copied to the mozilla:dist directory
|
||||
#
|
||||
|
||||
xp_mcom.h
|
||||
xp_path.h
|
||||
xp_str.h
|
||||
|
|
|
@ -26,7 +26,6 @@ VPATH = @srcdir@
|
|||
|
||||
EXPORTS = \
|
||||
xp_path.h \
|
||||
xp_str.h \
|
||||
$(NULL)
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsCRT.h" // to get NS_IS_SPACE
|
||||
#include "nsFrame.h"
|
||||
#include "nsIPresContext.h"
|
||||
#include "nsUnitConversion.h"
|
||||
|
@ -32,8 +33,6 @@
|
|||
|
||||
#include "nsMathMLmpaddedFrame.h"
|
||||
|
||||
#include "xp_str.h" // to get XP_IS_SPACE
|
||||
|
||||
//
|
||||
// <mpadded> -- adjust space around content - implementation
|
||||
//
|
||||
|
@ -174,7 +173,7 @@ nsMathMLmpaddedFrame::ParseAttribute(nsString& aString,
|
|||
aSign = NS_MATHML_SIGN_UNSPECIFIED;
|
||||
|
||||
// skip any space after the sign
|
||||
if (i < stringLength && XP_IS_SPACE(aString[i]))
|
||||
if (i < stringLength && NS_IS_SPACE(aString[i]))
|
||||
i++;
|
||||
|
||||
// get the number
|
||||
|
@ -215,7 +214,7 @@ nsMathMLmpaddedFrame::ParseAttribute(nsString& aString,
|
|||
}
|
||||
|
||||
// skip any space after the number
|
||||
if (i < stringLength && XP_IS_SPACE(aString[i]))
|
||||
if (i < stringLength && NS_IS_SPACE(aString[i]))
|
||||
i++;
|
||||
|
||||
// see if this is a percentage-based value
|
||||
|
@ -224,7 +223,7 @@ nsMathMLmpaddedFrame::ParseAttribute(nsString& aString,
|
|||
gotPercent = PR_TRUE;
|
||||
|
||||
// skip any space after the '%' sign
|
||||
if (i < stringLength && XP_IS_SPACE(aString[i]))
|
||||
if (i < stringLength && NS_IS_SPACE(aString[i]))
|
||||
i++;
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
#include "prlog.h"
|
||||
#include "plstr.h"
|
||||
#include "prmem.h"
|
||||
#include "xp_str.h"
|
||||
#include "prprf.h"
|
||||
|
||||
#define LDAP_PORT 389
|
||||
|
|
|
@ -81,16 +81,13 @@ NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_MAILNEWS, value)
|
|||
#define NS_MSG_SUCCESS NS_MSG_GENERATE_SUCCESS(0)
|
||||
#define NS_MSG_FAILURE NS_MSG_GENERATE_FAILURE(0)
|
||||
|
||||
// mscott I should look into moving this into raptor base so everyone can use it...
|
||||
#define IS_SPACE(VAL) \
|
||||
(((((intn)(VAL)) & 0x7f) == ((intn)(VAL))) && isspace((intn)(VAL)) )
|
||||
|
||||
#define IS_DIGIT(i) ((((unsigned int) (i)) > 0x7f) ? (int) 0 : isdigit(i))
|
||||
#define IS_SPACE(VAL) NS_IS_SPACE(VAL)
|
||||
#define IS_DIGIT(i) NS_IS_DIGIT(i)
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
#define IS_ALPHA(VAL) (isascii((int)(VAL)) && isalpha((int)(VAL)))
|
||||
#define IS_ALPHA(VAL) NS_IS_ALPHA(VAL)
|
||||
#else
|
||||
#define IS_ALPHA(VAL) ((((unsigned int) (VAL)) > 0x7f) ? FALSE : isalpha((int)(VAL)))
|
||||
#define IS_ALPHA(VAL) NS_IS_ALPHA(VAL)
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ DecodingDone( appledouble_decode_object* p_ap_decode_obj )
|
|||
fspec.vRefNum = p_ap_decode_obj->vRefNum;
|
||||
fspec.parID = p_ap_decode_obj->dirId;
|
||||
fspec.name[0] = nsCRT::strlen(p_ap_decode_obj->fname);
|
||||
XP_STRCPY((char*)fspec.name+1, p_ap_decode_obj->fname);
|
||||
strcpy((char*)fspec.name+1, p_ap_decode_obj->fname);
|
||||
CMimeMapper * mapper = CPrefs::sMimeTypes.FindMimeType(fspec);
|
||||
if( mapper && (mapper->GetLoadAction() == CMimeMapper::Launch ) )
|
||||
{
|
||||
|
|
|
@ -365,7 +365,7 @@ void nsMailDatabase::UpdateFolderFlag(nsIMsgDBHdr *mailHdr, PRBool bSet,
|
|||
// mac file system only has one handle, and they compete for the file position.
|
||||
// Prevent closing the file from under the incorporate stuff. #82785.
|
||||
int32 savedPosition = -1;
|
||||
if (!fid && gIncorporatePath && !XP_STRCMP(m_folderSpec, gIncorporatePath))
|
||||
if (!fid && gIncorporatePath && !strcmp(m_folderSpec, gIncorporatePath))
|
||||
{
|
||||
fid = gIncorporateFID;
|
||||
savedPosition = ftell(gIncorporateFID); // so we can restore it.
|
||||
|
|
|
@ -146,8 +146,6 @@ char yysccsid[] = "@(#)yaccpar 1.4 (Berkeley) 02/25/90";
|
|||
|
||||
#include "prmem.h"
|
||||
#include "plstr.h"
|
||||
# define NOT_NULL(X) X
|
||||
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE 0
|
||||
|
|
|
@ -85,7 +85,6 @@ DFARS 252.227-7013 or 48 CFR 52.227-19, as applicable.
|
|||
#include "plstr.h"
|
||||
#include "msgCore.h"
|
||||
#include "prprf.h"
|
||||
#define NOT_NULL(X) X
|
||||
|
||||
/* debugging utilities */
|
||||
#define DBG_(x)
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include "plstr.h"
|
||||
#include "nscore.h"
|
||||
#include "prtypes.h"
|
||||
|
@ -284,5 +285,16 @@ public:
|
|||
#error need_to_define_your_file_path_separator_and_illegal_characters
|
||||
#endif
|
||||
|
||||
#define NS_IS_SPACE(VAL) \
|
||||
(((((intn)(VAL)) & 0x7f) == ((intn)(VAL))) && isspace((intn)(VAL)) )
|
||||
|
||||
#define NS_IS_CNTRL(i) ((((unsigned int) (i)) > 0x7f) ? (int) 0 : iscntrl(i))
|
||||
#define NS_IS_DIGIT(i) ((((unsigned int) (i)) > 0x7f) ? (int) 0 : isdigit(i))
|
||||
#ifdef XP_WIN
|
||||
#define NS_IS_ALPHA(VAL) (isascii((int)(VAL)) && isalpha((int)(VAL)))
|
||||
#else
|
||||
#define NS_IS_ALPHA(VAL) ((((unsigned int) (VAL)) > 0x7f) ? (int) 0 : isalpha((int)(VAL)))
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* nsCRT_h___ */
|
||||
|
|
Загрузка…
Ссылка в новой задаче