// /usr/libexec/gcc/x86_64-pc-linux-gnu/4.1.2/cc1plus -fpreprocessed /var/tmp/ccache/nsDependen.tmp.hcompneu.13883.ii -quiet -dumpbase nsDependen.tmp.hcompneu.13883.ii -march=athlon64 -auxbase-strip /var/tmp/ccache/tmp.hash.hcompneu.13883.o -ggdb -O2 -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -Wno-return-type -w -fvisibility=hidden -fPIC -fno-rtti -fno-handle-exceptions -fPIC -fshort-wchar -ffunction-sections -o - -frandom-seed=0 # 1 "nsDependentSubstring.cpp" # 1 "/var/tmp/portage/net-libs/xulrunner-1.8.1.14/work/mozilla/xpcom/string/src//" # 1 "" # 1 "" # 1 "./../../../mozilla-config.h" 1 # 1 "" 2 # 1 "nsDependentSubstring.cpp" # 39 "nsDependentSubstring.cpp" # 1 "../../../dist/include/string/nsDependentSubstring.h" 1 # 43 "../../../dist/include/string/nsDependentSubstring.h" # 1 "../../../dist/include/string/nsSubstring.h" 1 # 43 "../../../dist/include/string/nsSubstring.h" # 1 "../../../dist/include/string/nsAString.h" 1 # 43 "../../../dist/include/string/nsAString.h" # 1 "../../../dist/include/string/nsStringFwd.h" 1 # 45 "../../../dist/include/string/nsStringFwd.h" # 1 "../../../dist/include/xpcom/nscore.h" 1 # 45 "../../../dist/include/xpcom/nscore.h" # 1 "../../../dist/include/xpcom/xpcom-config.h" 1 # 46 "../../../dist/include/xpcom/nscore.h" 2 # 1 "/usr/include/nspr/prtypes.h" 1 # 58 "/usr/include/nspr/prtypes.h" # 1 "/usr/include/nspr/prcpucfg.h" 1 # 59 "/usr/include/nspr/prtypes.h" 2 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 152 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 typedef long int ptrdiff_t; # 214 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 3 4 typedef long unsigned int size_t; # 62 "/usr/include/nspr/prtypes.h" 2 # 258 "/usr/include/nspr/prtypes.h" extern "C" { # 268 "/usr/include/nspr/prtypes.h" typedef unsigned char PRUint8; # 282 "/usr/include/nspr/prtypes.h" typedef signed char PRInt8; # 307 "/usr/include/nspr/prtypes.h" typedef unsigned short PRUint16; typedef short PRInt16; # 332 "/usr/include/nspr/prtypes.h" typedef unsigned int PRUint32; typedef int PRInt32; # 369 "/usr/include/nspr/prtypes.h" typedef long PRInt64; typedef unsigned long PRUint64; # 402 "/usr/include/nspr/prtypes.h" typedef int PRIntn; typedef unsigned int PRUintn; # 413 "/usr/include/nspr/prtypes.h" typedef double PRFloat64; typedef size_t PRSize; typedef PRInt32 PROffset32; typedef PRInt64 PROffset64; typedef ptrdiff_t PRPtrdiff; typedef unsigned long PRUptrdiff; # 455 "/usr/include/nspr/prtypes.h" typedef PRIntn PRBool; # 465 "/usr/include/nspr/prtypes.h" typedef PRUint8 PRPackedBool; typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus; typedef PRUint16 PRUnichar; # 493 "/usr/include/nspr/prtypes.h" typedef long PRWord; typedef unsigned long PRUword; # 535 "/usr/include/nspr/prtypes.h" # 1 "/usr/include/nspr/obsolete/protypes.h" 1 # 48 "/usr/include/nspr/obsolete/protypes.h" typedef PRUintn uintn; typedef PRIntn intn; # 86 "/usr/include/nspr/obsolete/protypes.h" # 1 "/usr/include/sys/types.h" 1 3 4 # 9 "/usr/include/sys/types.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/sys/types.h" 1 3 4 # 27 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 9 "/usr/include/features.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/features.h" 1 3 4 # 322 "/usr/include/gentoo-multilib/amd64/features.h" 3 4 # 1 "/usr/include/sys/cdefs.h" 1 3 4 # 9 "/usr/include/sys/cdefs.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 1 3 4 # 324 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 9 "/usr/include/bits/wordsize.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 # 9 "/usr/include/bits/wordsize.h" 2 3 4 # 325 "/usr/include/gentoo-multilib/amd64/sys/cdefs.h" 2 3 4 # 9 "/usr/include/sys/cdefs.h" 2 3 4 # 323 "/usr/include/gentoo-multilib/amd64/features.h" 2 3 4 # 345 "/usr/include/gentoo-multilib/amd64/features.h" 3 4 # 1 "/usr/include/gnu/stubs.h" 1 3 4 # 9 "/usr/include/gnu/stubs.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 1 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 9 "/usr/include/bits/wordsize.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 # 9 "/usr/include/bits/wordsize.h" 2 3 4 # 5 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 2 3 4 # 1 "/usr/include/gnu/stubs-64.h" 1 3 4 # 1 "/usr/include/gentoo-multilib/amd64/gnu/stubs-64.h" 1 3 4 # 5 "/usr/include/gnu/stubs-64.h" 2 3 4 # 10 "/usr/include/gentoo-multilib/amd64/gnu/stubs.h" 2 3 4 # 9 "/usr/include/gnu/stubs.h" 2 3 4 # 346 "/usr/include/gentoo-multilib/amd64/features.h" 2 3 4 # 9 "/usr/include/features.h" 2 3 4 # 28 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 extern "C" { # 1 "/usr/include/bits/types.h" 1 3 4 # 9 "/usr/include/bits/types.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/bits/types.h" 1 3 4 # 27 "/usr/include/gentoo-multilib/amd64/bits/types.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 28 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 9 "/usr/include/bits/wordsize.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 # 9 "/usr/include/bits/wordsize.h" 2 3 4 # 29 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4 # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 32 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4 typedef unsigned char __u_char; typedef unsigned short int __u_short; typedef unsigned int __u_int; typedef unsigned long int __u_long; typedef signed char __int8_t; typedef unsigned char __uint8_t; typedef signed short int __int16_t; typedef unsigned short int __uint16_t; typedef signed int __int32_t; typedef unsigned int __uint32_t; typedef signed long int __int64_t; typedef unsigned long int __uint64_t; typedef long int __quad_t; typedef unsigned long int __u_quad_t; # 134 "/usr/include/gentoo-multilib/amd64/bits/types.h" 3 4 # 1 "/usr/include/bits/typesizes.h" 1 3 4 # 9 "/usr/include/bits/typesizes.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/bits/typesizes.h" 1 3 4 # 9 "/usr/include/bits/typesizes.h" 2 3 4 # 135 "/usr/include/gentoo-multilib/amd64/bits/types.h" 2 3 4 typedef unsigned long int __dev_t; typedef unsigned int __uid_t; typedef unsigned int __gid_t; typedef unsigned long int __ino_t; typedef unsigned long int __ino64_t; typedef unsigned int __mode_t; typedef unsigned long int __nlink_t; typedef long int __off_t; typedef long int __off64_t; typedef int __pid_t; typedef struct { int __val[2]; } __fsid_t; typedef long int __clock_t; typedef unsigned long int __rlim_t; typedef unsigned long int __rlim64_t; typedef unsigned int __id_t; typedef long int __time_t; typedef unsigned int __useconds_t; typedef long int __suseconds_t; typedef int __daddr_t; typedef long int __swblk_t; typedef int __key_t; typedef int __clockid_t; typedef void * __timer_t; typedef long int __blksize_t; typedef long int __blkcnt_t; typedef long int __blkcnt64_t; typedef unsigned long int __fsblkcnt_t; typedef unsigned long int __fsblkcnt64_t; typedef unsigned long int __fsfilcnt_t; typedef unsigned long int __fsfilcnt64_t; typedef long int __ssize_t; typedef __off64_t __loff_t; typedef __quad_t *__qaddr_t; typedef char *__caddr_t; typedef long int __intptr_t; typedef unsigned int __socklen_t; # 9 "/usr/include/bits/types.h" 2 3 4 # 32 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 typedef __u_char u_char; typedef __u_short u_short; typedef __u_int u_int; typedef __u_long u_long; typedef __quad_t quad_t; typedef __u_quad_t u_quad_t; typedef __fsid_t fsid_t; typedef __loff_t loff_t; typedef __ino_t ino_t; typedef __ino64_t ino64_t; typedef __dev_t dev_t; typedef __gid_t gid_t; typedef __mode_t mode_t; typedef __nlink_t nlink_t; typedef __uid_t uid_t; typedef __off_t off_t; typedef __off64_t off64_t; typedef __pid_t pid_t; typedef __id_t id_t; typedef __ssize_t ssize_t; typedef __daddr_t daddr_t; typedef __caddr_t caddr_t; typedef __key_t key_t; # 133 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4 # 1 "/usr/include/time.h" 1 3 4 # 9 "/usr/include/time.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4 # 57 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 58 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 typedef __clock_t clock_t; # 73 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 74 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 typedef __time_t time_t; # 90 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 91 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 typedef __clockid_t clockid_t; # 102 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 103 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 typedef __timer_t timer_t; # 9 "/usr/include/time.h" 2 3 4 # 134 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 typedef __useconds_t useconds_t; typedef __suseconds_t suseconds_t; # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 148 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 typedef unsigned long int ulong; typedef unsigned short int ushort; typedef unsigned int uint; # 195 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4 typedef int int8_t __attribute__ ((__mode__ (__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__ ((__mode__ (__DI__))); typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__))); typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__))); typedef int register_t __attribute__ ((__mode__ (__word__))); # 217 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 9 "/usr/include/endian.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/endian.h" 1 3 4 # 22 "/usr/include/gentoo-multilib/amd64/endian.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 23 "/usr/include/gentoo-multilib/amd64/endian.h" 2 3 4 # 37 "/usr/include/gentoo-multilib/amd64/endian.h" 3 4 # 1 "/usr/include/bits/endian.h" 1 3 4 # 9 "/usr/include/bits/endian.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/bits/endian.h" 1 3 4 # 9 "/usr/include/bits/endian.h" 2 3 4 # 38 "/usr/include/gentoo-multilib/amd64/endian.h" 2 3 4 # 9 "/usr/include/endian.h" 2 3 4 # 218 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 # 1 "/usr/include/sys/select.h" 1 3 4 # 9 "/usr/include/sys/select.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/sys/select.h" 1 3 4 # 25 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 26 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 29 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 # 1 "/usr/include/bits/select.h" 1 3 4 # 9 "/usr/include/bits/select.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/bits/select.h" 1 3 4 # 9 "/usr/include/bits/select.h" 2 3 4 # 32 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 # 1 "/usr/include/bits/sigset.h" 1 3 4 # 9 "/usr/include/bits/sigset.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/bits/sigset.h" 1 3 4 # 24 "/usr/include/gentoo-multilib/amd64/bits/sigset.h" 3 4 typedef int __sig_atomic_t; typedef struct { unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))]; } __sigset_t; # 9 "/usr/include/bits/sigset.h" 2 3 4 # 35 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 typedef __sigset_t sigset_t; # 1 "/usr/include/time.h" 1 3 4 # 9 "/usr/include/time.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/time.h" 1 3 4 # 117 "/usr/include/gentoo-multilib/amd64/time.h" 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 118 "/usr/include/gentoo-multilib/amd64/time.h" 2 3 4 struct timespec { __time_t tv_sec; long int tv_nsec; }; # 9 "/usr/include/time.h" 2 3 4 # 45 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 # 1 "/usr/include/bits/time.h" 1 3 4 # 9 "/usr/include/bits/time.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/bits/time.h" 1 3 4 # 65 "/usr/include/gentoo-multilib/amd64/bits/time.h" 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 66 "/usr/include/gentoo-multilib/amd64/bits/time.h" 2 3 4 struct timeval { __time_t tv_sec; __suseconds_t tv_usec; }; # 9 "/usr/include/bits/time.h" 2 3 4 # 47 "/usr/include/gentoo-multilib/amd64/sys/select.h" 2 3 4 # 55 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 typedef long int __fd_mask; # 67 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 typedef struct { __fd_mask fds_bits[1024 / (8 * sizeof (__fd_mask))]; } fd_set; typedef __fd_mask fd_mask; # 99 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 extern "C" { # 109 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 extern int select (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, struct timeval *__restrict __timeout); # 121 "/usr/include/gentoo-multilib/amd64/sys/select.h" 3 4 extern int pselect (int __nfds, fd_set *__restrict __readfds, fd_set *__restrict __writefds, fd_set *__restrict __exceptfds, const struct timespec *__restrict __timeout, const __sigset_t *__restrict __sigmask); } # 9 "/usr/include/sys/select.h" 2 3 4 # 221 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 # 1 "/usr/include/sys/sysmacros.h" 1 3 4 # 9 "/usr/include/sys/sysmacros.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 1 3 4 # 24 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 25 "/usr/include/gentoo-multilib/amd64/sys/sysmacros.h" 2 3 4 __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw (); __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw (); __extension__ extern __inline unsigned int gnu_dev_major (unsigned long long int __dev) throw () { return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff); } __extension__ extern __inline unsigned int gnu_dev_minor (unsigned long long int __dev) throw () { return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff); } __extension__ extern __inline unsigned long long int gnu_dev_makedev (unsigned int __major, unsigned int __minor) throw () { return ((__minor & 0xff) | ((__major & 0xfff) << 8) | (((unsigned long long int) (__minor & ~0xff)) << 12) | (((unsigned long long int) (__major & ~0xfff)) << 32)); } # 9 "/usr/include/sys/sysmacros.h" 2 3 4 # 224 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 typedef __blksize_t blksize_t; typedef __blkcnt_t blkcnt_t; typedef __fsblkcnt_t fsblkcnt_t; typedef __fsfilcnt_t fsfilcnt_t; # 262 "/usr/include/gentoo-multilib/amd64/sys/types.h" 3 4 typedef __blkcnt64_t blkcnt64_t; typedef __fsblkcnt64_t fsblkcnt64_t; typedef __fsfilcnt64_t fsfilcnt64_t; # 1 "/usr/include/bits/pthreadtypes.h" 1 3 4 # 9 "/usr/include/bits/pthreadtypes.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 1 3 4 # 23 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4 # 1 "/usr/include/bits/wordsize.h" 1 3 4 # 9 "/usr/include/bits/wordsize.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/bits/wordsize.h" 1 3 4 # 9 "/usr/include/bits/wordsize.h" 2 3 4 # 24 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 2 3 4 # 50 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4 typedef unsigned long int pthread_t; typedef union { char __size[56]; long int __align; } pthread_attr_t; typedef struct __pthread_internal_list { struct __pthread_internal_list *__prev; struct __pthread_internal_list *__next; } __pthread_list_t; # 76 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4 typedef union { struct __pthread_mutex_s { int __lock; unsigned int __count; int __owner; unsigned int __nusers; int __kind; int __spins; __pthread_list_t __list; # 101 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4 } __data; char __size[40]; long int __align; } pthread_mutex_t; typedef union { char __size[4]; int __align; } pthread_mutexattr_t; typedef union { struct { int __lock; unsigned int __futex; __extension__ unsigned long long int __total_seq; __extension__ unsigned long long int __wakeup_seq; __extension__ unsigned long long int __woken_seq; void *__mutex; unsigned int __nwaiters; unsigned int __broadcast_seq; } __data; char __size[48]; __extension__ long long int __align; } pthread_cond_t; typedef union { char __size[4]; int __align; } pthread_condattr_t; typedef unsigned int pthread_key_t; typedef int pthread_once_t; typedef union { struct { int __lock; unsigned int __nr_readers; unsigned int __readers_wakeup; unsigned int __writer_wakeup; unsigned int __nr_readers_queued; unsigned int __nr_writers_queued; int __writer; int __pad1; unsigned long int __pad2; unsigned long int __pad3; unsigned int __flags; } __data; # 184 "/usr/include/gentoo-multilib/amd64/bits/pthreadtypes.h" 3 4 char __size[56]; long int __align; } pthread_rwlock_t; typedef union { char __size[8]; long int __align; } pthread_rwlockattr_t; typedef volatile int pthread_spinlock_t; typedef union { char __size[32]; long int __align; } pthread_barrier_t; typedef union { char __size[4]; int __align; } pthread_barrierattr_t; # 9 "/usr/include/bits/pthreadtypes.h" 2 3 4 # 271 "/usr/include/gentoo-multilib/amd64/sys/types.h" 2 3 4 } # 9 "/usr/include/sys/types.h" 2 3 4 # 87 "/usr/include/nspr/obsolete/protypes.h" 2 # 108 "/usr/include/nspr/obsolete/protypes.h" typedef PRUint64 uint64; # 117 "/usr/include/nspr/obsolete/protypes.h" typedef PRUint32 uint32; # 128 "/usr/include/nspr/obsolete/protypes.h" typedef PRUint16 uint16; typedef PRUint8 uint8; # 145 "/usr/include/nspr/obsolete/protypes.h" typedef PRInt64 int64; # 156 "/usr/include/nspr/obsolete/protypes.h" typedef PRInt32 int32; # 169 "/usr/include/nspr/obsolete/protypes.h" typedef PRInt16 int16; # 179 "/usr/include/nspr/obsolete/protypes.h" typedef PRInt8 int8; typedef PRFloat64 float64; typedef PRUptrdiff uptrdiff_t; typedef PRUword uprword_t; typedef PRWord prword_t; # 536 "/usr/include/nspr/prtypes.h" 2 } # 52 "../../../dist/include/xpcom/nscore.h" 2 # 280 "../../../dist/include/xpcom/nscore.h" typedef PRUint32 nsresult; # 1 "../../../dist/include/xpcom/nsError.h" 1 # 307 "../../../dist/include/xpcom/nsError.h" extern __attribute__ ((visibility ("default"))) nsresult NS_ErrorAccordingToNSPR(); # 288 "../../../dist/include/xpcom/nscore.h" 2 # 46 "../../../dist/include/string/nsStringFwd.h" 2 class nsAString_internal; class nsObsoleteAString; class nsSubstring; class nsSubstringTuple; class nsString; class nsAutoString; class nsDependentString; class nsDependentSubstring; class nsPromiseFlatString; class nsStringComparator; class nsDefaultStringComparator; class nsXPIDLString; class nsACString_internal; class nsObsoleteACString; class nsCSubstring; class nsCSubstringTuple; class nsCString; class nsCAutoString; class nsDependentCString; class nsDependentCSubstring; class nsPromiseFlatCString; class nsCStringComparator; class nsDefaultCStringComparator; class nsXPIDLCString; # 98 "../../../dist/include/string/nsStringFwd.h" typedef nsString nsAFlatString; typedef nsSubstring nsASingleFragmentString; typedef nsCString nsAFlatCString; typedef nsCSubstring nsASingleFragmentCString; # 44 "../../../dist/include/string/nsAString.h" 2 # 1 "../../../dist/include/string/nsStringIterator.h" 1 # 43 "../../../dist/include/string/nsStringIterator.h" # 1 "../../../dist/include/string/nsCharTraits.h" 1 # 42 "../../../dist/include/string/nsCharTraits.h" # 1 "/usr/include/ctype.h" 1 3 4 # 9 "/usr/include/ctype.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/ctype.h" 1 3 4 # 27 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 28 "/usr/include/gentoo-multilib/amd64/ctype.h" 2 3 4 # 1 "/usr/include/bits/types.h" 1 3 4 # 29 "/usr/include/gentoo-multilib/amd64/ctype.h" 2 3 4 extern "C" { # 41 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 # 1 "/usr/include/endian.h" 1 3 4 # 42 "/usr/include/gentoo-multilib/amd64/ctype.h" 2 3 4 enum { _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)), _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)), _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)), _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)), _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)), _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)), _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)), _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)), _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)), _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)), _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)), _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8)) }; # 81 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 extern __const unsigned short int **__ctype_b_loc (void) __attribute__ ((__const)); extern __const __int32_t **__ctype_tolower_loc (void) __attribute__ ((__const)); extern __const __int32_t **__ctype_toupper_loc (void) __attribute__ ((__const)); # 96 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 extern int isalnum (int) throw (); extern int isalpha (int) throw (); extern int iscntrl (int) throw (); extern int isdigit (int) throw (); extern int islower (int) throw (); extern int isgraph (int) throw (); extern int isprint (int) throw (); extern int ispunct (int) throw (); extern int isspace (int) throw (); extern int isupper (int) throw (); extern int isxdigit (int) throw (); extern int tolower (int __c) throw (); extern int toupper (int __c) throw (); # 128 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 extern int isblank (int) throw (); extern int isctype (int __c, int __mask) throw (); extern int isascii (int __c) throw (); extern int toascii (int __c) throw (); extern int _toupper (int) throw (); extern int _tolower (int) throw (); # 233 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 # 1 "/usr/include/xlocale.h" 1 3 4 # 9 "/usr/include/xlocale.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/xlocale.h" 1 3 4 # 28 "/usr/include/gentoo-multilib/amd64/xlocale.h" 3 4 typedef struct __locale_struct { struct locale_data *__locales[13]; const unsigned short int *__ctype_b; const int *__ctype_tolower; const int *__ctype_toupper; const char *__names[13]; } *__locale_t; # 9 "/usr/include/xlocale.h" 2 3 4 # 234 "/usr/include/gentoo-multilib/amd64/ctype.h" 2 3 4 # 247 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 extern int isalnum_l (int, __locale_t) throw (); extern int isalpha_l (int, __locale_t) throw (); extern int iscntrl_l (int, __locale_t) throw (); extern int isdigit_l (int, __locale_t) throw (); extern int islower_l (int, __locale_t) throw (); extern int isgraph_l (int, __locale_t) throw (); extern int isprint_l (int, __locale_t) throw (); extern int ispunct_l (int, __locale_t) throw (); extern int isspace_l (int, __locale_t) throw (); extern int isupper_l (int, __locale_t) throw (); extern int isxdigit_l (int, __locale_t) throw (); extern int isblank_l (int, __locale_t) throw (); extern int __tolower_l (int __c, __locale_t __l) throw (); extern int tolower_l (int __c, __locale_t __l) throw (); extern int __toupper_l (int __c, __locale_t __l) throw (); extern int toupper_l (int __c, __locale_t __l) throw (); # 323 "/usr/include/gentoo-multilib/amd64/ctype.h" 3 4 } # 9 "/usr/include/ctype.h" 2 3 4 # 43 "../../../dist/include/string/nsCharTraits.h" 2 # 57 "../../../dist/include/string/nsCharTraits.h" # 1 "/usr/include/string.h" 1 3 4 # 9 "/usr/include/string.h" 3 4 # 1 "/usr/include/gentoo-multilib/amd64/string.h" 1 3 4 # 26 "/usr/include/gentoo-multilib/amd64/string.h" 3 4 # 1 "/usr/include/features.h" 1 3 4 # 27 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4 extern "C" { # 1 "/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/stddef.h" 1 3 4 # 34 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4 extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memmove (void *__dest, __const void *__src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memccpy (void *__restrict __dest, __const void *__restrict __src, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *memset (void *__s, int __c, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int memcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *rawmemchr (__const void *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern void *memrchr (__const void *__s, int __c, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strcat (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strncat (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strcmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcoll (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strxfrm (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (2))); # 1 "/usr/include/xlocale.h" 1 3 4 # 119 "/usr/include/gentoo-multilib/amd64/string.h" 2 3 4 extern int strcoll_l (__const char *__s1, __const char *__s2, __locale_t __l) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern size_t strxfrm_l (char *__dest, __const char *__src, size_t __n, __locale_t __l) throw () __attribute__ ((__nonnull__ (2, 4))); extern char *strdup (__const char *__s) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); extern char *strndup (__const char *__string, size_t __n) throw () __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1))); # 165 "/usr/include/gentoo-multilib/amd64/string.h" 3 4 extern char *strchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strrchr (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strchrnul (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strcspn (__const char *__s, __const char *__reject) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern size_t strspn (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strpbrk (__const char *__s, __const char *__accept) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strstr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strtok (char *__restrict __s, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (2))); extern char *__strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strtok_r (char *__restrict __s, __const char *__restrict __delim, char **__restrict __save_ptr) throw () __attribute__ ((__nonnull__ (2, 3))); extern char *strcasestr (__const char *__haystack, __const char *__needle) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern void *memmem (__const void *__haystack, size_t __haystacklen, __const void *__needle, size_t __needlelen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3))); extern void *__mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void *mempcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern size_t strlen (__const char *__s) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern size_t strnlen (__const char *__string, size_t __maxlen) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *strerror (int __errnum) throw (); # 281 "/usr/include/gentoo-multilib/amd64/string.h" 3 4 extern char *strerror_r (int __errnum, char *__buf, size_t __buflen) throw () __attribute__ ((__nonnull__ (2))); extern char *strerror_l (int __errnum, __locale_t __l) throw (); extern void __bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern void bcopy (__const void *__src, void *__dest, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern void bzero (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern int bcmp (__const void *__s1, __const void *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *index (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern char *rindex (__const char *__s, int __c) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))); extern int ffs (int __i) throw () __attribute__ ((__const__)); extern int ffsl (long int __l) throw () __attribute__ ((__const__)); __extension__ extern int ffsll (long long int __ll) throw () __attribute__ ((__const__)); extern int strcasecmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strncasecmp (__const char *__s1, __const char *__s2, size_t __n) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern int strcasecmp_l (__const char *__s1, __const char *__s2, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3))); extern int strncasecmp_l (__const char *__s1, __const char *__s2, size_t __n, __locale_t __loc) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4))); extern char *strsep (char **__restrict __stringp, __const char *__restrict __delim) throw () __attribute__ ((__nonnull__ (1, 2))); extern int strverscmp (__const char *__s1, __const char *__s2) throw () __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2))); extern char *strsignal (int __sig) throw (); extern char *__stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpcpy (char *__restrict __dest, __const char *__restrict __src) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *__stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *stpncpy (char *__restrict __dest, __const char *__restrict __src, size_t __n) throw () __attribute__ ((__nonnull__ (1, 2))); extern char *strfry (char *__string) throw () __attribute__ ((__nonnull__ (1))); extern void *memfrob (void *__s, size_t __n) throw () __attribute__ ((__nonnull__ (1))); extern char *basename (__const char *__filename) throw () __attribute__ ((__nonnull__ (1))); # 432 "/usr/include/gentoo-multilib/amd64/string.h" 3 4 } # 9 "/usr/include/string.h" 2 3 4 # 58 "../../../dist/include/string/nsCharTraits.h" 2 # 66 "../../../dist/include/string/nsCharTraits.h" # 1 "../../../dist/include/nsDebug.h" 1 # 59 "../../../dist/include/nsDebug.h" extern "C" { __attribute__ ((visibility ("default"))) void NSGlue_Warning(const char *aMessage, const char *aFile, PRIntn aLine); __attribute__ ((visibility ("default"))) void NSGlue_Abort(const char *aFile, PRIntn aLine); __attribute__ ((visibility ("default"))) void NSGlue_Break(const char* aFile, PRIntn aLine); __attribute__ ((visibility ("default"))) void NSGlue_Assertion(const char* aStr, const char* aExpr, const char* aFile, PRIntn aLine); } # 67 "../../../dist/include/string/nsCharTraits.h" 2 typedef PRBool nsCharTraits_bool; template struct nsCharTraits {}; template <> struct nsCharTraits { typedef PRUnichar char_type; typedef PRUint16 unsigned_char_type; typedef char incompatible_char_type; __attribute__ ((visibility ("default"))) static const char_type *sEmptyBuffer; static void assign( char_type& lhs, char_type rhs ) { lhs = rhs; } typedef int int_type; static char_type to_char_type( int_type c ) { return char_type(c); } static int_type to_int_type( char_type c ) { return int_type( static_cast< unsigned_char_type >(c) ); } static nsCharTraits_bool eq_int_type( int_type lhs, int_type rhs ) { return lhs == rhs; } static nsCharTraits_bool eq( char_type lhs, char_type rhs ) { return lhs == rhs; } static nsCharTraits_bool lt( char_type lhs, char_type rhs ) { return lhs < rhs; } static char_type* move( char_type* s1, const char_type* s2, size_t n ) { return static_cast< char_type* >(memmove(s1, s2, n * sizeof(char_type))); } static char_type* copy( char_type* s1, const char_type* s2, size_t n ) { return static_cast< char_type* >(memcpy(s1, s2, n * sizeof(char_type))); } static char_type* copyASCII( char_type* s1, const char* s2, size_t n ) { for (char_type* s = s1; n--; ++s, ++s2) { do { } while (0); *s = *s2; } return s1; } static char_type* assign( char_type* s, size_t n, char_type c ) { char_type* result = s; while ( n-- ) assign(*s++, c); return result; } static int compare( const char_type* s1, const char_type* s2, size_t n ) { for ( ; n--; ++s1, ++s2 ) { if ( !eq(*s1, *s2) ) return to_int_type(*s1) - to_int_type(*s2); } return 0; } static int compareASCII( const char_type* s1, const char* s2, size_t n ) { for ( ; n--; ++s1, ++s2 ) { do { } while (0); if ( !eq_int_type(to_int_type(*s1), to_int_type(*s2)) ) return to_int_type(*s1) - to_int_type(*s2); } return 0; } static int compareASCIINullTerminated( const char_type* s1, size_t n, const char* s2 ) { for ( ; n--; ++s1, ++s2 ) { if ( !*s2 ) return 1; do { } while (0); if ( !eq_int_type(to_int_type(*s1), to_int_type(*s2)) ) return to_int_type(*s1) - to_int_type(*s2); } if ( *s2 ) return -1; return 0; } # 244 "../../../dist/include/string/nsCharTraits.h" static char_type ASCIIToLower( char_type c ) { if (c < 0x100) return (c >= 'A' && c <= 'Z') ? c + ('a' - 'A') : c; else { if (c == 0x212A) return 'k'; if (c == 0x0130) return 'i'; return c; } } static int compareLowerCaseToASCII( const char_type* s1, const char* s2, size_t n ) { for ( ; n--; ++s1, ++s2 ) { do { } while (0); do { } while (0); char_type lower_s1 = ASCIIToLower(*s1); if ( lower_s1 != to_char_type(*s2) ) return to_int_type(lower_s1) - to_int_type(*s2); } return 0; } static int compareLowerCaseToASCIINullTerminated( const char_type* s1, size_t n, const char* s2 ) { for ( ; n--; ++s1, ++s2 ) { if ( !*s2 ) return 1; do { } while (0); do { } while (0); char_type lower_s1 = ASCIIToLower(*s1); if ( lower_s1 != to_char_type(*s2) ) return to_int_type(lower_s1) - to_int_type(*s2); } if ( *s2 ) return -1; return 0; } static size_t length( const char_type* s ) { size_t result = 0; while ( !eq(*s++, char_type(0)) ) ++result; return result; } static const char_type* find( const char_type* s, size_t n, char_type c ) { while ( n-- ) { if ( eq(*s, c) ) return s; ++s; } return 0; } # 361 "../../../dist/include/string/nsCharTraits.h" }; template <> struct nsCharTraits { typedef char char_type; typedef unsigned char unsigned_char_type; typedef PRUnichar incompatible_char_type; __attribute__ ((visibility ("default"))) static const char_type *sEmptyBuffer; static void assign( char_type& lhs, char_type rhs ) { lhs = rhs; } typedef int int_type; static char_type to_char_type( int_type c ) { return char_type(c); } static int_type to_int_type( char_type c ) { return int_type( static_cast< unsigned_char_type >(c) ); } static nsCharTraits_bool eq_int_type( int_type lhs, int_type rhs ) { return lhs == rhs; } static nsCharTraits_bool eq( char_type lhs, char_type rhs ) { return lhs == rhs; } static nsCharTraits_bool lt( char_type lhs, char_type rhs ) { return lhs < rhs; } static char_type* move( char_type* s1, const char_type* s2, size_t n ) { return static_cast< char_type* >(memmove(s1, s2, n * sizeof(char_type))); } static char_type* copy( char_type* s1, const char_type* s2, size_t n ) { return static_cast< char_type* >(memcpy(s1, s2, n * sizeof(char_type))); } static char_type* copyASCII( char_type* s1, const char* s2, size_t n ) { return copy(s1, s2, n); } static char_type* assign( char_type* s, size_t n, char_type c ) { return static_cast< char_type* >(memset(s, to_int_type(c), n)); } static int compare( const char_type* s1, const char_type* s2, size_t n ) { return memcmp(s1, s2, n); } static int compareASCII( const char_type* s1, const char* s2, size_t n ) { return compare(s1, s2, n); } static int compareASCIINullTerminated( const char_type* s1, size_t n, const char* s2 ) { for ( ; n--; ++s1, ++s2 ) { if ( !*s2 ) return 1; do { } while (0); if ( *s1 != *s2 ) return to_int_type(*s1) - to_int_type(*s2); } if ( *s2 ) return -1; return 0; } static char_type ASCIIToLower( char_type c ) { return (c >= 'A' && c <= 'Z') ? (c + ('a' - 'A')) : c; } static int compareLowerCaseToASCII( const char_type* s1, const char* s2, size_t n ) { for ( ; n--; ++s1, ++s2 ) { do { } while (0); do { } while (0); char_type lower_s1 = ASCIIToLower(*s1); if ( lower_s1 != *s2 ) return to_int_type(lower_s1) - to_int_type(*s2); } return 0; } static int compareLowerCaseToASCIINullTerminated( const char_type* s1, size_t n, const char* s2 ) { for ( ; n--; ++s1, ++s2 ) { if ( !*s2 ) return 1; do { } while (0); do { } while (0); char_type lower_s1 = ASCIIToLower(*s1); if ( lower_s1 != *s2 ) return to_int_type(lower_s1) - to_int_type(*s2); } if ( *s2 ) return -1; return 0; } static size_t length( const char_type* s ) { return strlen(s); } static const char_type* find( const char_type* s, size_t n, char_type c ) { return reinterpret_cast< const char_type* >(memchr(s, to_int_type(c), n)); } # 585 "../../../dist/include/string/nsCharTraits.h" }; template struct nsCharSourceTraits { typedef typename InputIterator::difference_type difference_type; static PRUint32 readable_distance( const InputIterator& first, const InputIterator& last ) { return last.get() - first.get(); } static const typename InputIterator::value_type* read( const InputIterator& iter ) { return iter.get(); } static void advance( InputIterator& s, difference_type n ) { s.advance(n); } }; template struct nsCharSourceTraits { typedef ptrdiff_t difference_type; static PRUint32 readable_distance( CharT* s ) { return PRUint32(nsCharTraits::length(s)); } static PRUint32 readable_distance( CharT* first, CharT* last ) { return PRUint32(last-first); } static const CharT* read( CharT* s ) { return s; } static void advance( CharT*& s, difference_type n ) { s += n; } }; # 728 "../../../dist/include/string/nsCharTraits.h" template struct nsCharSinkTraits { static PRUint32 write( OutputIterator& iter, const typename OutputIterator::value_type* s, PRUint32 n ) { return iter.write(s, n); } }; template struct nsCharSinkTraits { static PRUint32 write( CharT*& iter, const CharT* s, PRUint32 n ) { nsCharTraits::move(iter, s, n); iter += n; return n; } }; # 44 "../../../dist/include/string/nsStringIterator.h" 2 # 1 "../../../dist/include/string/nsAlgorithm.h" 1 # 57 "../../../dist/include/string/nsAlgorithm.h" template inline const T& NS_MIN( const T& a, const T& b ) { return b < a ? b : a; } template inline const T& NS_MAX( const T& a, const T& b ) { return a > b ? a : b; } template inline PRUint32 NS_COUNT( InputIterator& first, const InputIterator& last, const T& value ) { PRUint32 result = 0; for ( ; first != last; ++first ) if ( *first == value ) ++result; return result; } template inline OutputIterator& copy_string( InputIterator& first, const InputIterator& last, OutputIterator& result ) { typedef nsCharSourceTraits source_traits; typedef nsCharSinkTraits sink_traits; while ( first != last ) { PRInt32 count_copied = PRInt32(sink_traits::write(result, source_traits::read(first), source_traits::readable_distance(first, last))); do { } while (0); source_traits::advance(first, count_copied); } return result; } template OutputIterator& copy_string_backward( const InputIterator& first, InputIterator& last, OutputIterator& result ) { while ( first != last ) { last.normalize_backward(); result.normalize_backward(); PRUint32 lengthToCopy = PRUint32( NS_MIN(last.size_backward(), result.size_backward()) ); if ( first.fragment().mStart == last.fragment().mStart ) lengthToCopy = NS_MIN(lengthToCopy, PRUint32(last.get() - first.get())); do { } while (0); nsCharTraits::move(result.get()-lengthToCopy, last.get()-lengthToCopy, lengthToCopy); last.advance( -PRInt32(lengthToCopy) ); result.advance( -PRInt32(lengthToCopy) ); } return result; } # 48 "../../../dist/include/string/nsStringIterator.h" 2 # 58 "../../../dist/include/string/nsStringIterator.h" template class nsReadingIterator { public: typedef nsReadingIterator self_type; typedef ptrdiff_t difference_type; typedef CharT value_type; typedef const CharT* pointer; typedef const CharT& reference; private: friend class nsAString_internal; friend class nsACString_internal; friend class nsSubstring; friend class nsCSubstring; const CharT* mStart; const CharT* mEnd; const CharT* mPosition; public: nsReadingIterator() { } inline void normalize_forward() {} inline void normalize_backward() {} pointer start() const { return mStart; } pointer end() const { return mEnd; } pointer get() const { return mPosition; } CharT operator*() const { return *get(); } # 127 "../../../dist/include/string/nsStringIterator.h" self_type& operator++() { ++mPosition; return *this; } self_type operator++( int ) { self_type result(*this); ++mPosition; return result; } self_type& operator--() { --mPosition; return *this; } self_type operator--( int ) { self_type result(*this); --mPosition; return result; } difference_type size_forward() const { return mEnd - mPosition; } difference_type size_backward() const { return mPosition - mStart; } self_type& advance( difference_type n ) { if (n > 0) { difference_type step = NS_MIN(n, size_forward()); do { } while (0); mPosition += step; } else if (n < 0) { difference_type step = NS_MAX(n, -size_backward()); do { } while (0); mPosition += step; } return *this; } }; template class nsWritingIterator { public: typedef nsWritingIterator self_type; typedef ptrdiff_t difference_type; typedef CharT value_type; typedef CharT* pointer; typedef CharT& reference; private: friend class nsAString_internal; friend class nsACString_internal; friend class nsSubstring; friend class nsCSubstring; CharT* mStart; CharT* mEnd; CharT* mPosition; public: nsWritingIterator() { } inline void normalize_forward() {} inline void normalize_backward() {} pointer start() const { return mStart; } pointer end() const { return mEnd; } pointer get() const { return mPosition; } reference operator*() const { return *get(); } # 265 "../../../dist/include/string/nsStringIterator.h" self_type& operator++() { ++mPosition; return *this; } self_type operator++( int ) { self_type result(*this); ++mPosition; return result; } self_type& operator--() { --mPosition; return *this; } self_type operator--( int ) { self_type result(*this); --mPosition; return result; } difference_type size_forward() const { return mEnd - mPosition; } difference_type size_backward() const { return mPosition - mStart; } self_type& advance( difference_type n ) { if (n > 0) { difference_type step = NS_MIN(n, size_forward()); do { } while (0); mPosition += step; } else if (n < 0) { difference_type step = NS_MAX(n, -size_backward()); do { } while (0); mPosition += step; } return *this; } PRUint32 write( const value_type* s, PRUint32 n ) { do { } while (0); nsCharTraits::move(mPosition, s, n); advance( difference_type(n) ); return n; } }; template inline PRBool operator==( const nsReadingIterator& lhs, const nsReadingIterator& rhs ) { return lhs.get() == rhs.get(); } template inline PRBool operator!=( const nsReadingIterator& lhs, const nsReadingIterator& rhs ) { return lhs.get() != rhs.get(); } template inline PRBool operator==( const nsWritingIterator& lhs, const nsWritingIterator& rhs ) { return lhs.get() == rhs.get(); } template inline PRBool operator!=( const nsWritingIterator& lhs, const nsWritingIterator& rhs ) { return lhs.get() != rhs.get(); } # 48 "../../../dist/include/string/nsAString.h" 2 # 1 "../../../dist/include/string/nsObsoleteAString.h" 1 # 93 "../../../dist/include/string/nsObsoleteAString.h" # 1 "../../../dist/include/string/string-template-def-unichar.h" 1 # 94 "../../../dist/include/string/nsObsoleteAString.h" 2 # 1 "../../../dist/include/string/nsTObsoleteAString.h" 1 # 45 "../../../dist/include/string/nsTObsoleteAString.h" class nsObsoleteAString { public: __attribute__ ((visibility ("default"))) static const void *sCanonicalVTable; enum nsFragmentRequest { kPrevFragment, kFirstFragment, kLastFragment, kNextFragment, kFragmentAt }; # 74 "../../../dist/include/string/nsTObsoleteAString.h" struct nsReadableFragment { const PRUnichar* mStart; const PRUnichar* mEnd; const void* mFragmentIdentifier; nsReadableFragment() : mStart(0), mEnd(0), mFragmentIdentifier(0) {} }; # 96 "../../../dist/include/string/nsTObsoleteAString.h" struct nsWritableFragment { PRUnichar* mStart; PRUnichar* mEnd; void* mFragmentIdentifier; nsWritableFragment() : mStart(0), mEnd(0), mFragmentIdentifier(0) {} }; protected: typedef PRUnichar char_type; typedef void buffer_handle_type; typedef void shared_buffer_handle_type; typedef nsReadableFragment const_fragment_type; typedef nsWritableFragment fragment_type; typedef nsAString_internal abstract_string_type; typedef PRUint32 size_type; typedef PRUint32 index_type; protected: friend class nsAString_internal; friend class nsSubstring; virtual ~nsObsoleteAString() { } virtual PRUint32 GetImplementationFlags() const = 0; virtual const buffer_handle_type* GetFlatBufferHandle() const = 0; virtual const buffer_handle_type* GetBufferHandle() const = 0; virtual const shared_buffer_handle_type* GetSharedBufferHandle() const = 0; virtual size_type Length() const = 0; virtual PRBool IsVoid() const = 0; virtual void SetIsVoid( PRBool ) = 0; virtual void SetCapacity( size_type ) = 0; virtual void SetLength( size_type ) = 0; virtual void Cut( index_type cutStart, size_type cutLength ) = 0; virtual void do_AssignFromReadable( const abstract_string_type& ) = 0; virtual void do_AssignFromElementPtr( const char_type* ) = 0; virtual void do_AssignFromElementPtrLength( const char_type*, size_type ) = 0; virtual void do_AssignFromElement( char_type ) = 0; virtual void do_AppendFromReadable( const abstract_string_type& ) = 0; virtual void do_AppendFromElementPtr( const char_type* ) = 0; virtual void do_AppendFromElementPtrLength( const char_type*, size_type ) = 0; virtual void do_AppendFromElement( char_type ) = 0; virtual void do_InsertFromReadable( const abstract_string_type&, index_type ) = 0; virtual void do_InsertFromElementPtr( const char_type*, index_type ) = 0; virtual void do_InsertFromElementPtrLength( const char_type*, index_type, size_type ) = 0; virtual void do_InsertFromElement( char_type, index_type ) = 0; virtual void do_ReplaceFromReadable( index_type, size_type, const abstract_string_type& ) = 0; virtual const char_type* GetReadableFragment( const_fragment_type&, nsFragmentRequest, PRUint32 = 0 ) const = 0; virtual char_type* GetWritableFragment( fragment_type&, nsFragmentRequest, PRUint32 = 0 ) = 0; }; class nsObsoleteAStringThunk; # 95 "../../../dist/include/string/nsObsoleteAString.h" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 96 "../../../dist/include/string/nsObsoleteAString.h" 2 # 1 "../../../dist/include/string/string-template-def-char.h" 1 # 99 "../../../dist/include/string/nsObsoleteAString.h" 2 # 1 "../../../dist/include/string/nsTObsoleteAString.h" 1 # 45 "../../../dist/include/string/nsTObsoleteAString.h" class nsObsoleteACString { public: __attribute__ ((visibility ("default"))) static const void *sCanonicalVTable; enum nsFragmentRequest { kPrevFragment, kFirstFragment, kLastFragment, kNextFragment, kFragmentAt }; # 74 "../../../dist/include/string/nsTObsoleteAString.h" struct nsReadableFragment { const char* mStart; const char* mEnd; const void* mFragmentIdentifier; nsReadableFragment() : mStart(0), mEnd(0), mFragmentIdentifier(0) {} }; # 96 "../../../dist/include/string/nsTObsoleteAString.h" struct nsWritableFragment { char* mStart; char* mEnd; void* mFragmentIdentifier; nsWritableFragment() : mStart(0), mEnd(0), mFragmentIdentifier(0) {} }; protected: typedef char char_type; typedef void buffer_handle_type; typedef void shared_buffer_handle_type; typedef nsReadableFragment const_fragment_type; typedef nsWritableFragment fragment_type; typedef nsACString_internal abstract_string_type; typedef PRUint32 size_type; typedef PRUint32 index_type; protected: friend class nsACString_internal; friend class nsCSubstring; virtual ~nsObsoleteACString() { } virtual PRUint32 GetImplementationFlags() const = 0; virtual const buffer_handle_type* GetFlatBufferHandle() const = 0; virtual const buffer_handle_type* GetBufferHandle() const = 0; virtual const shared_buffer_handle_type* GetSharedBufferHandle() const = 0; virtual size_type Length() const = 0; virtual PRBool IsVoid() const = 0; virtual void SetIsVoid( PRBool ) = 0; virtual void SetCapacity( size_type ) = 0; virtual void SetLength( size_type ) = 0; virtual void Cut( index_type cutStart, size_type cutLength ) = 0; virtual void do_AssignFromReadable( const abstract_string_type& ) = 0; virtual void do_AssignFromElementPtr( const char_type* ) = 0; virtual void do_AssignFromElementPtrLength( const char_type*, size_type ) = 0; virtual void do_AssignFromElement( char_type ) = 0; virtual void do_AppendFromReadable( const abstract_string_type& ) = 0; virtual void do_AppendFromElementPtr( const char_type* ) = 0; virtual void do_AppendFromElementPtrLength( const char_type*, size_type ) = 0; virtual void do_AppendFromElement( char_type ) = 0; virtual void do_InsertFromReadable( const abstract_string_type&, index_type ) = 0; virtual void do_InsertFromElementPtr( const char_type*, index_type ) = 0; virtual void do_InsertFromElementPtrLength( const char_type*, index_type, size_type ) = 0; virtual void do_InsertFromElement( char_type, index_type ) = 0; virtual void do_ReplaceFromReadable( index_type, size_type, const abstract_string_type& ) = 0; virtual const char_type* GetReadableFragment( const_fragment_type&, nsFragmentRequest, PRUint32 = 0 ) const = 0; virtual char_type* GetWritableFragment( fragment_type&, nsFragmentRequest, PRUint32 = 0 ) = 0; }; class nsObsoleteACStringThunk; # 100 "../../../dist/include/string/nsObsoleteAString.h" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 101 "../../../dist/include/string/nsObsoleteAString.h" 2 # 53 "../../../dist/include/string/nsAString.h" 2 # 64 "../../../dist/include/string/nsAString.h" # 1 "/usr/include/string.h" 1 3 4 # 65 "../../../dist/include/string/nsAString.h" 2 # 1 "../../../dist/include/string/string-template-def-unichar.h" 1 # 68 "../../../dist/include/string/nsAString.h" 2 # 1 "../../../dist/include/string/nsTAString.h" 1 # 47 "../../../dist/include/string/nsTAString.h" class __attribute__ ((visibility ("default"))) nsStringComparator { public: typedef PRUnichar char_type; nsStringComparator() {} virtual int operator()( const char_type*, const char_type*, PRUint32 length ) const = 0; virtual int operator()( char_type, char_type ) const = 0; }; class __attribute__ ((visibility ("default"))) nsDefaultStringComparator : public nsStringComparator { public: typedef PRUnichar char_type; nsDefaultStringComparator() {} virtual int operator()( const char_type*, const char_type*, PRUint32 length ) const; virtual int operator()( char_type, char_type ) const; }; # 106 "../../../dist/include/string/nsTAString.h" class nsAString_internal { public: typedef PRUnichar char_type; typedef nsCharTraits char_traits; typedef char_traits::incompatible_char_type incompatible_char_type; typedef nsAString_internal self_type; typedef nsAString_internal abstract_string_type; typedef nsObsoleteAString obsolete_string_type; typedef nsSubstring substring_type; typedef nsSubstringTuple substring_tuple_type; typedef nsReadingIterator const_iterator; typedef nsWritingIterator iterator; typedef nsStringComparator comparator_type; typedef PRUint32 size_type; typedef PRUint32 index_type; public: __attribute__ ((visibility ("default"))) ~nsAString_internal(); # 143 "../../../dist/include/string/nsTAString.h" inline const_iterator& BeginReading( const_iterator& iter ) const { size_type len = GetReadableBuffer(&iter.mStart); iter.mEnd = iter.mStart + len; iter.mPosition = iter.mStart; return iter; } inline const_iterator& EndReading( const_iterator& iter ) const { size_type len = GetReadableBuffer(&iter.mStart); iter.mEnd = iter.mStart + len; iter.mPosition = iter.mEnd; return iter; } inline const char_type* BeginReading() const { const char_type *b; GetReadableBuffer(&b); return b; } inline const char_type* EndReading() const { const char_type *b; size_type len = GetReadableBuffer(&b); return b + len; } # 181 "../../../dist/include/string/nsTAString.h" inline iterator& BeginWriting( iterator& iter ) { size_type len = GetWritableBuffer(&iter.mStart); iter.mEnd = iter.mStart + len; iter.mPosition = iter.mStart; return iter; } inline iterator& EndWriting( iterator& iter ) { size_type len = GetWritableBuffer(&iter.mStart); iter.mEnd = iter.mStart + len; iter.mPosition = iter.mEnd; return iter; } inline char_type* BeginWriting() { char_type *b; GetWritableBuffer(&b); return b; } inline char_type* EndWriting() { char_type *b; size_type len = GetWritableBuffer(&b); return b + len; } __attribute__ ((visibility ("default"))) size_type Length() const; PRBool IsEmpty() const { return Length() == 0; } # 226 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) PRBool Equals( const self_type& ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const self_type&, const comparator_type& ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const char_type* ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const char_type*, const comparator_type& ) const; __attribute__ ((visibility ("default"))) PRBool EqualsASCII( const char* data, size_type len ) const; __attribute__ ((visibility ("default"))) PRBool EqualsASCII( const char* data ) const; # 255 "../../../dist/include/string/nsTAString.h" template inline PRBool EqualsLiteral( const char (&str)[N] ) const { return EqualsASCII(str, N-1); } template inline PRBool EqualsLiteral( char (&str)[N] ) const { const char* s = str; return EqualsASCII(s, N-1); } __attribute__ ((visibility ("default"))) PRBool LowerCaseEqualsASCII( const char* data, size_type len ) const; __attribute__ ((visibility ("default"))) PRBool LowerCaseEqualsASCII( const char* data ) const; # 286 "../../../dist/include/string/nsTAString.h" template inline PRBool LowerCaseEqualsLiteral( const char (&str)[N] ) const { return LowerCaseEqualsASCII(str, N-1); } template inline PRBool LowerCaseEqualsLiteral( char (&str)[N] ) const { const char* s = str; return LowerCaseEqualsASCII(s, N-1); } # 307 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) PRBool IsVoid() const; __attribute__ ((visibility ("default"))) void SetIsVoid( PRBool ); # 318 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) PRBool IsTerminated() const; __attribute__ ((visibility ("default"))) char_type First() const; __attribute__ ((visibility ("default"))) char_type Last() const; __attribute__ ((visibility ("default"))) size_type CountChar( char_type ) const; __attribute__ ((visibility ("default"))) PRInt32 FindChar( char_type, index_type offset = 0 ) const; # 348 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) void SetCapacity( size_type ); # 371 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) void SetLength( size_type ); void Truncate( size_type aNewLength=0 ) { do { } while (0); SetLength(aNewLength); } # 391 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) void Assign( const self_type& readable ); __attribute__ ((visibility ("default"))) void Assign( const substring_tuple_type& tuple ); __attribute__ ((visibility ("default"))) void Assign( const char_type* data ); __attribute__ ((visibility ("default"))) void Assign( const char_type* data, size_type length ); __attribute__ ((visibility ("default"))) void Assign( char_type c ); __attribute__ ((visibility ("default"))) void AssignASCII( const char* data, size_type length ); __attribute__ ((visibility ("default"))) void AssignASCII( const char* data ); # 407 "../../../dist/include/string/nsTAString.h" template void AssignLiteral( const char (&str)[N] ) { AssignASCII(str, N-1); } template void AssignLiteral( char (&str)[N] ) { AssignASCII(str, N-1); } self_type& operator=( const self_type& readable ) { Assign(readable); return *this; } self_type& operator=( const substring_tuple_type& tuple ) { Assign(tuple); return *this; } self_type& operator=( const char_type* data ) { Assign(data); return *this; } self_type& operator=( char_type c ) { Assign(c); return *this; } __attribute__ ((visibility ("default"))) void Append( const self_type& readable ); __attribute__ ((visibility ("default"))) void Append( const substring_tuple_type& tuple ); __attribute__ ((visibility ("default"))) void Append( const char_type* data ); __attribute__ ((visibility ("default"))) void Append( const char_type* data, size_type length ); __attribute__ ((visibility ("default"))) void Append( char_type c ); __attribute__ ((visibility ("default"))) void AppendASCII( const char* data, size_type length ); __attribute__ ((visibility ("default"))) void AppendASCII( const char* data ); # 443 "../../../dist/include/string/nsTAString.h" template void AppendLiteral( const char (&str)[N] ) { AppendASCII(str, N-1); } template void AppendLiteral( char (&str)[N] ) { AppendASCII(str, N-1); } self_type& operator+=( const self_type& readable ) { Append(readable); return *this; } self_type& operator+=( const substring_tuple_type& tuple ) { Append(tuple); return *this; } self_type& operator+=( const char_type* data ) { Append(data); return *this; } self_type& operator+=( char_type c ) { Append(c); return *this; } __attribute__ ((visibility ("default"))) void Insert( const self_type& readable, index_type pos ); __attribute__ ((visibility ("default"))) void Insert( const substring_tuple_type& tuple, index_type pos ); __attribute__ ((visibility ("default"))) void Insert( const char_type* data, index_type pos ); __attribute__ ((visibility ("default"))) void Insert( const char_type* data, index_type pos, size_type length ); __attribute__ ((visibility ("default"))) void Insert( char_type c, index_type pos ); __attribute__ ((visibility ("default"))) void Cut( index_type cutStart, size_type cutLength ); __attribute__ ((visibility ("default"))) void Replace( index_type cutStart, size_type cutLength, const self_type& readable ); __attribute__ ((visibility ("default"))) void Replace( index_type cutStart, size_type cutLength, const substring_tuple_type& readable ); nsAString_internal(const substring_tuple_type& tuple) : mVTable(obsolete_string_type::sCanonicalVTable) , mData(0) , mLength(0) , mFlags(0) { Assign(tuple); } protected: friend class nsSubstringTuple; friend class nsSubstring; friend class nsDependentSubstring; friend class nsPromiseFlatString; const void* mVTable; char_type* mData; size_type mLength; PRUint32 mFlags; nsAString_internal(char_type* data, size_type length, PRUint32 flags) : mVTable(obsolete_string_type::sCanonicalVTable) , mData(data) , mLength(length) , mFlags(flags) {} explicit nsAString_internal(PRUint32 flags) : mVTable(obsolete_string_type::sCanonicalVTable) , mFlags(flags) {} __attribute__ ((visibility ("default"))) size_type GetReadableBuffer( const char_type **data ) const; __attribute__ ((visibility ("default"))) size_type GetWritableBuffer( char_type **data ); PRBool IsDependentOn(const char_type *start, const char_type *end) const; const substring_type ToSubstring() const; const obsolete_string_type* AsObsoleteString() const { return reinterpret_cast< const obsolete_string_type* >(this); } obsolete_string_type* AsObsoleteString() { return reinterpret_cast< obsolete_string_type* >(this); } const substring_type* AsSubstring() const { return reinterpret_cast< const substring_type* >(this); } substring_type* AsSubstring() { return reinterpret_cast< substring_type* >(this); } private: # 598 "../../../dist/include/string/nsTAString.h" nsAString_internal( const self_type& ); void operator= ( incompatible_char_type ); void Assign ( incompatible_char_type ); void operator+= ( incompatible_char_type ); void Append ( incompatible_char_type ); void Insert ( incompatible_char_type, index_type ); }; # 69 "../../../dist/include/string/nsAString.h" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 70 "../../../dist/include/string/nsAString.h" 2 # 1 "../../../dist/include/string/string-template-def-char.h" 1 # 74 "../../../dist/include/string/nsAString.h" 2 # 1 "../../../dist/include/string/nsTAString.h" 1 # 47 "../../../dist/include/string/nsTAString.h" class __attribute__ ((visibility ("default"))) nsCStringComparator { public: typedef char char_type; nsCStringComparator() {} virtual int operator()( const char_type*, const char_type*, PRUint32 length ) const = 0; virtual int operator()( char_type, char_type ) const = 0; }; class __attribute__ ((visibility ("default"))) nsDefaultCStringComparator : public nsCStringComparator { public: typedef char char_type; nsDefaultCStringComparator() {} virtual int operator()( const char_type*, const char_type*, PRUint32 length ) const; virtual int operator()( char_type, char_type ) const; }; # 106 "../../../dist/include/string/nsTAString.h" class nsACString_internal { public: typedef char char_type; typedef nsCharTraits char_traits; typedef char_traits::incompatible_char_type incompatible_char_type; typedef nsACString_internal self_type; typedef nsACString_internal abstract_string_type; typedef nsObsoleteACString obsolete_string_type; typedef nsCSubstring substring_type; typedef nsCSubstringTuple substring_tuple_type; typedef nsReadingIterator const_iterator; typedef nsWritingIterator iterator; typedef nsCStringComparator comparator_type; typedef PRUint32 size_type; typedef PRUint32 index_type; public: __attribute__ ((visibility ("default"))) ~nsACString_internal(); # 143 "../../../dist/include/string/nsTAString.h" inline const_iterator& BeginReading( const_iterator& iter ) const { size_type len = GetReadableBuffer(&iter.mStart); iter.mEnd = iter.mStart + len; iter.mPosition = iter.mStart; return iter; } inline const_iterator& EndReading( const_iterator& iter ) const { size_type len = GetReadableBuffer(&iter.mStart); iter.mEnd = iter.mStart + len; iter.mPosition = iter.mEnd; return iter; } inline const char_type* BeginReading() const { const char_type *b; GetReadableBuffer(&b); return b; } inline const char_type* EndReading() const { const char_type *b; size_type len = GetReadableBuffer(&b); return b + len; } # 181 "../../../dist/include/string/nsTAString.h" inline iterator& BeginWriting( iterator& iter ) { size_type len = GetWritableBuffer(&iter.mStart); iter.mEnd = iter.mStart + len; iter.mPosition = iter.mStart; return iter; } inline iterator& EndWriting( iterator& iter ) { size_type len = GetWritableBuffer(&iter.mStart); iter.mEnd = iter.mStart + len; iter.mPosition = iter.mEnd; return iter; } inline char_type* BeginWriting() { char_type *b; GetWritableBuffer(&b); return b; } inline char_type* EndWriting() { char_type *b; size_type len = GetWritableBuffer(&b); return b + len; } __attribute__ ((visibility ("default"))) size_type Length() const; PRBool IsEmpty() const { return Length() == 0; } # 226 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) PRBool Equals( const self_type& ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const self_type&, const comparator_type& ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const char_type* ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const char_type*, const comparator_type& ) const; __attribute__ ((visibility ("default"))) PRBool EqualsASCII( const char* data, size_type len ) const; __attribute__ ((visibility ("default"))) PRBool EqualsASCII( const char* data ) const; # 255 "../../../dist/include/string/nsTAString.h" template inline PRBool EqualsLiteral( const char (&str)[N] ) const { return EqualsASCII(str, N-1); } template inline PRBool EqualsLiteral( char (&str)[N] ) const { const char* s = str; return EqualsASCII(s, N-1); } __attribute__ ((visibility ("default"))) PRBool LowerCaseEqualsASCII( const char* data, size_type len ) const; __attribute__ ((visibility ("default"))) PRBool LowerCaseEqualsASCII( const char* data ) const; # 286 "../../../dist/include/string/nsTAString.h" template inline PRBool LowerCaseEqualsLiteral( const char (&str)[N] ) const { return LowerCaseEqualsASCII(str, N-1); } template inline PRBool LowerCaseEqualsLiteral( char (&str)[N] ) const { const char* s = str; return LowerCaseEqualsASCII(s, N-1); } # 307 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) PRBool IsVoid() const; __attribute__ ((visibility ("default"))) void SetIsVoid( PRBool ); # 318 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) PRBool IsTerminated() const; __attribute__ ((visibility ("default"))) char_type First() const; __attribute__ ((visibility ("default"))) char_type Last() const; __attribute__ ((visibility ("default"))) size_type CountChar( char_type ) const; __attribute__ ((visibility ("default"))) PRInt32 FindChar( char_type, index_type offset = 0 ) const; # 348 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) void SetCapacity( size_type ); # 371 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) void SetLength( size_type ); void Truncate( size_type aNewLength=0 ) { do { } while (0); SetLength(aNewLength); } # 391 "../../../dist/include/string/nsTAString.h" __attribute__ ((visibility ("default"))) void Assign( const self_type& readable ); __attribute__ ((visibility ("default"))) void Assign( const substring_tuple_type& tuple ); __attribute__ ((visibility ("default"))) void Assign( const char_type* data ); __attribute__ ((visibility ("default"))) void Assign( const char_type* data, size_type length ); __attribute__ ((visibility ("default"))) void Assign( char_type c ); __attribute__ ((visibility ("default"))) void AssignASCII( const char* data, size_type length ); __attribute__ ((visibility ("default"))) void AssignASCII( const char* data ); # 407 "../../../dist/include/string/nsTAString.h" template void AssignLiteral( const char (&str)[N] ) { AssignASCII(str, N-1); } template void AssignLiteral( char (&str)[N] ) { AssignASCII(str, N-1); } self_type& operator=( const self_type& readable ) { Assign(readable); return *this; } self_type& operator=( const substring_tuple_type& tuple ) { Assign(tuple); return *this; } self_type& operator=( const char_type* data ) { Assign(data); return *this; } self_type& operator=( char_type c ) { Assign(c); return *this; } __attribute__ ((visibility ("default"))) void Append( const self_type& readable ); __attribute__ ((visibility ("default"))) void Append( const substring_tuple_type& tuple ); __attribute__ ((visibility ("default"))) void Append( const char_type* data ); __attribute__ ((visibility ("default"))) void Append( const char_type* data, size_type length ); __attribute__ ((visibility ("default"))) void Append( char_type c ); __attribute__ ((visibility ("default"))) void AppendASCII( const char* data, size_type length ); __attribute__ ((visibility ("default"))) void AppendASCII( const char* data ); # 443 "../../../dist/include/string/nsTAString.h" template void AppendLiteral( const char (&str)[N] ) { AppendASCII(str, N-1); } template void AppendLiteral( char (&str)[N] ) { AppendASCII(str, N-1); } self_type& operator+=( const self_type& readable ) { Append(readable); return *this; } self_type& operator+=( const substring_tuple_type& tuple ) { Append(tuple); return *this; } self_type& operator+=( const char_type* data ) { Append(data); return *this; } self_type& operator+=( char_type c ) { Append(c); return *this; } __attribute__ ((visibility ("default"))) void Insert( const self_type& readable, index_type pos ); __attribute__ ((visibility ("default"))) void Insert( const substring_tuple_type& tuple, index_type pos ); __attribute__ ((visibility ("default"))) void Insert( const char_type* data, index_type pos ); __attribute__ ((visibility ("default"))) void Insert( const char_type* data, index_type pos, size_type length ); __attribute__ ((visibility ("default"))) void Insert( char_type c, index_type pos ); __attribute__ ((visibility ("default"))) void Cut( index_type cutStart, size_type cutLength ); __attribute__ ((visibility ("default"))) void Replace( index_type cutStart, size_type cutLength, const self_type& readable ); __attribute__ ((visibility ("default"))) void Replace( index_type cutStart, size_type cutLength, const substring_tuple_type& readable ); nsACString_internal(const substring_tuple_type& tuple) : mVTable(obsolete_string_type::sCanonicalVTable) , mData(0) , mLength(0) , mFlags(0) { Assign(tuple); } protected: friend class nsCSubstringTuple; friend class nsCSubstring; friend class nsDependentCSubstring; friend class nsPromiseFlatCString; const void* mVTable; char_type* mData; size_type mLength; PRUint32 mFlags; nsACString_internal(char_type* data, size_type length, PRUint32 flags) : mVTable(obsolete_string_type::sCanonicalVTable) , mData(data) , mLength(length) , mFlags(flags) {} explicit nsACString_internal(PRUint32 flags) : mVTable(obsolete_string_type::sCanonicalVTable) , mFlags(flags) {} __attribute__ ((visibility ("default"))) size_type GetReadableBuffer( const char_type **data ) const; __attribute__ ((visibility ("default"))) size_type GetWritableBuffer( char_type **data ); PRBool IsDependentOn(const char_type *start, const char_type *end) const; const substring_type ToSubstring() const; const obsolete_string_type* AsObsoleteString() const { return reinterpret_cast< const obsolete_string_type* >(this); } obsolete_string_type* AsObsoleteString() { return reinterpret_cast< obsolete_string_type* >(this); } const substring_type* AsSubstring() const { return reinterpret_cast< const substring_type* >(this); } substring_type* AsSubstring() { return reinterpret_cast< substring_type* >(this); } private: # 598 "../../../dist/include/string/nsTAString.h" nsACString_internal( const self_type& ); void operator= ( incompatible_char_type ); void Assign ( incompatible_char_type ); void operator+= ( incompatible_char_type ); void Append ( incompatible_char_type ); void Insert ( incompatible_char_type, index_type ); }; # 75 "../../../dist/include/string/nsAString.h" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 76 "../../../dist/include/string/nsAString.h" 2 class __attribute__ ((visibility ("default"))) nsCaseInsensitiveCStringComparator : public nsCStringComparator { public: typedef char char_type; virtual int operator()( const char_type*, const char_type*, PRUint32 length ) const; virtual int operator()( char_type, char_type ) const; }; # 1 "../../../dist/include/string/nsSubstringTuple.h" 1 # 47 "../../../dist/include/string/nsSubstringTuple.h" # 1 "../../../dist/include/string/string-template-def-unichar.h" 1 # 48 "../../../dist/include/string/nsSubstringTuple.h" 2 # 1 "../../../dist/include/string/nsTSubstringTuple.h" 1 # 49 "../../../dist/include/string/nsTSubstringTuple.h" class nsSubstringTuple { public: typedef PRUnichar char_type; typedef nsCharTraits char_traits; typedef nsSubstringTuple self_type; typedef nsSubstring substring_type; typedef nsAString_internal base_string_type; typedef nsObsoleteAString obsolete_string_type; typedef PRUint32 size_type; public: nsSubstringTuple(const base_string_type* a, const base_string_type* b) : mHead(0) , mFragA(a) , mFragB(b) {} nsSubstringTuple(const self_type& head, const base_string_type* b) : mHead(&head) , mFragA(0) , mFragB(b) {} __attribute__ ((visibility ("default"))) size_type Length() const; __attribute__ ((visibility ("default"))) void WriteTo(char_type *buf, PRUint32 bufLen) const; __attribute__ ((visibility ("default"))) PRBool IsDependentOn(const char_type *start, const char_type *end) const; private: const self_type* mHead; const base_string_type* mFragA; const base_string_type* mFragB; }; inline const nsSubstringTuple operator+(const nsSubstringTuple::base_string_type& a, const nsSubstringTuple::base_string_type& b) { return nsSubstringTuple(&a, &b); } inline const nsSubstringTuple operator+(const nsSubstringTuple& head, const nsSubstringTuple::base_string_type& b) { return nsSubstringTuple(head, &b); } # 49 "../../../dist/include/string/nsSubstringTuple.h" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 50 "../../../dist/include/string/nsSubstringTuple.h" 2 # 1 "../../../dist/include/string/string-template-def-char.h" 1 # 53 "../../../dist/include/string/nsSubstringTuple.h" 2 # 1 "../../../dist/include/string/nsTSubstringTuple.h" 1 # 49 "../../../dist/include/string/nsTSubstringTuple.h" class nsCSubstringTuple { public: typedef char char_type; typedef nsCharTraits char_traits; typedef nsCSubstringTuple self_type; typedef nsCSubstring substring_type; typedef nsACString_internal base_string_type; typedef nsObsoleteACString obsolete_string_type; typedef PRUint32 size_type; public: nsCSubstringTuple(const base_string_type* a, const base_string_type* b) : mHead(0) , mFragA(a) , mFragB(b) {} nsCSubstringTuple(const self_type& head, const base_string_type* b) : mHead(&head) , mFragA(0) , mFragB(b) {} __attribute__ ((visibility ("default"))) size_type Length() const; __attribute__ ((visibility ("default"))) void WriteTo(char_type *buf, PRUint32 bufLen) const; __attribute__ ((visibility ("default"))) PRBool IsDependentOn(const char_type *start, const char_type *end) const; private: const self_type* mHead; const base_string_type* mFragA; const base_string_type* mFragB; }; inline const nsCSubstringTuple operator+(const nsCSubstringTuple::base_string_type& a, const nsCSubstringTuple::base_string_type& b) { return nsCSubstringTuple(&a, &b); } inline const nsCSubstringTuple operator+(const nsCSubstringTuple& head, const nsCSubstringTuple::base_string_type& b) { return nsCSubstringTuple(head, &b); } # 54 "../../../dist/include/string/nsSubstringTuple.h" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 55 "../../../dist/include/string/nsSubstringTuple.h" 2 # 96 "../../../dist/include/string/nsAString.h" 2 # 44 "../../../dist/include/string/nsSubstring.h" 2 # 56 "../../../dist/include/string/nsSubstring.h" # 1 "/usr/include/string.h" 1 3 4 # 57 "../../../dist/include/string/nsSubstring.h" 2 # 1 "../../../dist/include/string/string-template-def-unichar.h" 1 # 60 "../../../dist/include/string/nsSubstring.h" 2 # 1 "../../../dist/include/string/nsTSubstring.h" 1 # 55 "../../../dist/include/string/nsTSubstring.h" class nsSubstring : public nsAString_internal { public: typedef nsSubstring self_type; typedef nsString string_type; typedef char_type* char_iterator; typedef const char_type* const_char_iterator; typedef nsAString_internal base_string_type; public: # 82 "../../../dist/include/string/nsTSubstring.h" const_char_iterator BeginReading() const { return mData; } const_char_iterator EndReading() const { return mData + mLength; } const_iterator& BeginReading( const_iterator& iter ) const { iter.mStart = mData; iter.mEnd = mData + mLength; iter.mPosition = iter.mStart; return iter; } const_iterator& EndReading( const_iterator& iter ) const { iter.mStart = mData; iter.mEnd = mData + mLength; iter.mPosition = iter.mEnd; return iter; } const_char_iterator& BeginReading( const_char_iterator& iter ) const { return iter = mData; } const_char_iterator& EndReading( const_char_iterator& iter ) const { return iter = mData + mLength; } char_iterator BeginWriting() { EnsureMutable(); return mData; } char_iterator EndWriting() { EnsureMutable(); return mData + mLength; } iterator& BeginWriting( iterator& iter ) { EnsureMutable(); iter.mStart = mData; iter.mEnd = mData + mLength; iter.mPosition = iter.mStart; return iter; } iterator& EndWriting( iterator& iter ) { EnsureMutable(); iter.mStart = mData; iter.mEnd = mData + mLength; iter.mPosition = iter.mEnd; return iter; } char_iterator& BeginWriting( char_iterator& iter ) { EnsureMutable(); return iter = mData; } char_iterator& EndWriting( char_iterator& iter ) { EnsureMutable(); return iter = mData + mLength; } const char_type *Data() const { return mData; } size_type Length() const { return mLength; } PRBool IsEmpty() const { return mLength == 0; } PRBool IsVoid() const { return mFlags & F_VOIDED; } PRBool IsTerminated() const { return mFlags & F_TERMINATED; } char_type CharAt( index_type i ) const { do { } while (0); return mData[i]; } char_type operator[]( index_type i ) const { return CharAt(i); } char_type First() const { do { } while (0); return mData[0]; } inline char_type Last() const { do { } while (0); return mData[mLength - 1]; } __attribute__ ((visibility ("default"))) size_type CountChar( char_type ) const; __attribute__ ((visibility ("default"))) PRInt32 FindChar( char_type, index_type offset = 0 ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const self_type& ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const self_type&, const comparator_type& ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const abstract_string_type& readable ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const abstract_string_type& readable, const comparator_type& comp ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const char_type* data ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const char_type* data, const comparator_type& comp ) const; __attribute__ ((visibility ("default"))) PRBool EqualsASCII( const char* data, size_type len ) const; __attribute__ ((visibility ("default"))) PRBool EqualsASCII( const char* data ) const; # 255 "../../../dist/include/string/nsTSubstring.h" template inline PRBool EqualsLiteral( const char (&str)[N] ) const { return EqualsASCII(str, N-1); } template inline PRBool EqualsLiteral( char (&str)[N] ) const { const char* s = str; return EqualsASCII(s, N-1); } __attribute__ ((visibility ("default"))) PRBool LowerCaseEqualsASCII( const char* data, size_type len ) const; __attribute__ ((visibility ("default"))) PRBool LowerCaseEqualsASCII( const char* data ) const; # 286 "../../../dist/include/string/nsTSubstring.h" template inline PRBool LowerCaseEqualsLiteral( const char (&str)[N] ) const { return LowerCaseEqualsASCII(str, N-1); } template inline PRBool LowerCaseEqualsLiteral( char (&str)[N] ) const { const char* s = str; return LowerCaseEqualsASCII(s, N-1); } void Assign( char_type c ) { Assign(&c, 1); } __attribute__ ((visibility ("default"))) void Assign( const char_type* data, size_type length = size_type(-1) ); __attribute__ ((visibility ("default"))) void Assign( const self_type& ); __attribute__ ((visibility ("default"))) void Assign( const substring_tuple_type& ); __attribute__ ((visibility ("default"))) void Assign( const abstract_string_type& ); __attribute__ ((visibility ("default"))) void AssignASCII( const char* data, size_type length ); __attribute__ ((visibility ("default"))) void AssignASCII( const char* data ); # 321 "../../../dist/include/string/nsTSubstring.h" template void AssignLiteral( const char (&str)[N] ) { AssignASCII(str, N-1); } template void AssignLiteral( char (&str)[N] ) { AssignASCII(str, N-1); } self_type& operator=( char_type c ) { Assign(c); return *this; } self_type& operator=( const char_type* data ) { Assign(data); return *this; } self_type& operator=( const self_type& str ) { Assign(str); return *this; } self_type& operator=( const substring_tuple_type& tuple ) { Assign(tuple); return *this; } self_type& operator=( const abstract_string_type& readable ) { Assign(readable); return *this; } __attribute__ ((visibility ("default"))) void Adopt( char_type* data, size_type length = size_type(-1) ); void Replace( index_type cutStart, size_type cutLength, char_type c ) { Replace(cutStart, cutLength, &c, 1); } __attribute__ ((visibility ("default"))) void Replace( index_type cutStart, size_type cutLength, const char_type* data, size_type length = size_type(-1) ); void Replace( index_type cutStart, size_type cutLength, const self_type& str ) { Replace(cutStart, cutLength, str.Data(), str.Length()); } __attribute__ ((visibility ("default"))) void Replace( index_type cutStart, size_type cutLength, const substring_tuple_type& tuple ); __attribute__ ((visibility ("default"))) void Replace( index_type cutStart, size_type cutLength, const abstract_string_type& readable ); __attribute__ ((visibility ("default"))) void ReplaceASCII( index_type cutStart, size_type cutLength, const char* data, size_type length = size_type(-1) ); void Append( char_type c ) { Replace(mLength, 0, c); } void Append( const char_type* data, size_type length = size_type(-1) ) { Replace(mLength, 0, data, length); } void Append( const self_type& str ) { Replace(mLength, 0, str); } void Append( const substring_tuple_type& tuple ) { Replace(mLength, 0, tuple); } void Append( const abstract_string_type& readable ) { Replace(mLength, 0, readable); } void AppendASCII( const char* data, size_type length = size_type(-1) ) { ReplaceASCII(mLength, 0, data, length); } # 371 "../../../dist/include/string/nsTSubstring.h" template void AppendLiteral( const char (&str)[N] ) { AppendASCII(str, N-1); } template void AppendLiteral( char (&str)[N] ) { AppendASCII(str, N-1); } self_type& operator+=( char_type c ) { Append(c); return *this; } self_type& operator+=( const char_type* data ) { Append(data); return *this; } self_type& operator+=( const self_type& str ) { Append(str); return *this; } self_type& operator+=( const substring_tuple_type& tuple ) { Append(tuple); return *this; } self_type& operator+=( const abstract_string_type& readable ) { Append(readable); return *this; } void Insert( char_type c, index_type pos ) { Replace(pos, 0, c); } void Insert( const char_type* data, index_type pos, size_type length = size_type(-1) ) { Replace(pos, 0, data, length); } void Insert( const self_type& str, index_type pos ) { Replace(pos, 0, str); } void Insert( const substring_tuple_type& tuple, index_type pos ) { Replace(pos, 0, tuple); } void Insert( const abstract_string_type& readable, index_type pos ) { Replace(pos, 0, readable); } void Cut( index_type cutStart, size_type cutLength ) { Replace(cutStart, cutLength, char_traits::sEmptyBuffer, 0); } __attribute__ ((visibility ("default"))) void SetCapacity( size_type capacity ); __attribute__ ((visibility ("default"))) void SetLength( size_type ); void Truncate( size_type newLength = 0 ) { do { } while (0); SetLength(newLength); } __attribute__ ((visibility ("default"))) void SetIsVoid( PRBool ); # 428 "../../../dist/include/string/nsTSubstring.h" __attribute__ ((visibility ("default"))) void StripChar( char_type aChar, PRInt32 aOffset=0 ); public: nsSubstring(const substring_tuple_type& tuple) : abstract_string_type(0, 0, F_NONE) { Assign(tuple); } nsSubstring( char_type *data, size_type length, PRUint32 flags ) : abstract_string_type(data, length, flags) {} protected: friend class nsObsoleteAStringThunk; friend class nsAString_internal; friend class nsSubstringTuple; friend class nsPromiseFlatString; # 481 "../../../dist/include/string/nsTSubstring.h" nsSubstring() : abstract_string_type( const_cast< char_type* >(char_traits::sEmptyBuffer), 0, F_TERMINATED) {} explicit nsSubstring( PRUint32 flags ) : abstract_string_type(flags) {} nsSubstring( const self_type& str ) : abstract_string_type(str.mData, str.mLength, str.mFlags & (F_TERMINATED | F_VOIDED)) {} # 516 "../../../dist/include/string/nsTSubstring.h" void Finalize(); # 536 "../../../dist/include/string/nsTSubstring.h" PRBool MutatePrep( size_type capacity, char_type** old_data, PRUint32* old_flags ); # 558 "../../../dist/include/string/nsTSubstring.h" PRBool ReplacePrep( index_type cutStart, size_type cutLength, size_type newLength ); size_type Capacity() const; __attribute__ ((visibility ("default"))) void EnsureMutable(); PRBool IsDependentOn( const char_type *start, const char_type *end ) const { # 587 "../../../dist/include/string/nsTSubstring.h" return ( start < (mData + mLength) && end > mData ); } void SetDataFlags(PRUint32 dataFlags) { do { } while (0); mFlags = dataFlags | (mFlags & 0xFFFF0000); } public: enum { F_NONE = 0, F_TERMINATED = 1 << 0, F_VOIDED = 1 << 1, F_SHARED = 1 << 2, F_OWNED = 1 << 3, F_FIXED = 1 << 4, F_CLASS_FIXED = 1 << 16 }; # 655 "../../../dist/include/string/nsTSubstring.h" }; __attribute__ ((visibility ("default"))) int Compare( const nsSubstring::base_string_type& lhs, const nsSubstring::base_string_type& rhs, const nsStringComparator& = nsDefaultStringComparator() ); inline PRBool operator!=( const nsSubstring::base_string_type& lhs, const nsSubstring::base_string_type& rhs ) { return !lhs.Equals(rhs); } inline PRBool operator< ( const nsSubstring::base_string_type& lhs, const nsSubstring::base_string_type& rhs ) { return Compare(lhs, rhs)< 0; } inline PRBool operator<=( const nsSubstring::base_string_type& lhs, const nsSubstring::base_string_type& rhs ) { return Compare(lhs, rhs)<=0; } inline PRBool operator==( const nsSubstring::base_string_type& lhs, const nsSubstring::base_string_type& rhs ) { return lhs.Equals(rhs); } inline PRBool operator>=( const nsSubstring::base_string_type& lhs, const nsSubstring::base_string_type& rhs ) { return Compare(lhs, rhs)>=0; } inline PRBool operator> ( const nsSubstring::base_string_type& lhs, const nsSubstring::base_string_type& rhs ) { return Compare(lhs, rhs)> 0; } # 61 "../../../dist/include/string/nsSubstring.h" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 62 "../../../dist/include/string/nsSubstring.h" 2 # 1 "../../../dist/include/string/string-template-def-char.h" 1 # 66 "../../../dist/include/string/nsSubstring.h" 2 # 1 "../../../dist/include/string/nsTSubstring.h" 1 # 55 "../../../dist/include/string/nsTSubstring.h" class nsCSubstring : public nsACString_internal { public: typedef nsCSubstring self_type; typedef nsCString string_type; typedef char_type* char_iterator; typedef const char_type* const_char_iterator; typedef nsACString_internal base_string_type; public: # 82 "../../../dist/include/string/nsTSubstring.h" const_char_iterator BeginReading() const { return mData; } const_char_iterator EndReading() const { return mData + mLength; } const_iterator& BeginReading( const_iterator& iter ) const { iter.mStart = mData; iter.mEnd = mData + mLength; iter.mPosition = iter.mStart; return iter; } const_iterator& EndReading( const_iterator& iter ) const { iter.mStart = mData; iter.mEnd = mData + mLength; iter.mPosition = iter.mEnd; return iter; } const_char_iterator& BeginReading( const_char_iterator& iter ) const { return iter = mData; } const_char_iterator& EndReading( const_char_iterator& iter ) const { return iter = mData + mLength; } char_iterator BeginWriting() { EnsureMutable(); return mData; } char_iterator EndWriting() { EnsureMutable(); return mData + mLength; } iterator& BeginWriting( iterator& iter ) { EnsureMutable(); iter.mStart = mData; iter.mEnd = mData + mLength; iter.mPosition = iter.mStart; return iter; } iterator& EndWriting( iterator& iter ) { EnsureMutable(); iter.mStart = mData; iter.mEnd = mData + mLength; iter.mPosition = iter.mEnd; return iter; } char_iterator& BeginWriting( char_iterator& iter ) { EnsureMutable(); return iter = mData; } char_iterator& EndWriting( char_iterator& iter ) { EnsureMutable(); return iter = mData + mLength; } const char_type *Data() const { return mData; } size_type Length() const { return mLength; } PRBool IsEmpty() const { return mLength == 0; } PRBool IsVoid() const { return mFlags & F_VOIDED; } PRBool IsTerminated() const { return mFlags & F_TERMINATED; } char_type CharAt( index_type i ) const { do { } while (0); return mData[i]; } char_type operator[]( index_type i ) const { return CharAt(i); } char_type First() const { do { } while (0); return mData[0]; } inline char_type Last() const { do { } while (0); return mData[mLength - 1]; } __attribute__ ((visibility ("default"))) size_type CountChar( char_type ) const; __attribute__ ((visibility ("default"))) PRInt32 FindChar( char_type, index_type offset = 0 ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const self_type& ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const self_type&, const comparator_type& ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const abstract_string_type& readable ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const abstract_string_type& readable, const comparator_type& comp ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const char_type* data ) const; __attribute__ ((visibility ("default"))) PRBool Equals( const char_type* data, const comparator_type& comp ) const; __attribute__ ((visibility ("default"))) PRBool EqualsASCII( const char* data, size_type len ) const; __attribute__ ((visibility ("default"))) PRBool EqualsASCII( const char* data ) const; # 255 "../../../dist/include/string/nsTSubstring.h" template inline PRBool EqualsLiteral( const char (&str)[N] ) const { return EqualsASCII(str, N-1); } template inline PRBool EqualsLiteral( char (&str)[N] ) const { const char* s = str; return EqualsASCII(s, N-1); } __attribute__ ((visibility ("default"))) PRBool LowerCaseEqualsASCII( const char* data, size_type len ) const; __attribute__ ((visibility ("default"))) PRBool LowerCaseEqualsASCII( const char* data ) const; # 286 "../../../dist/include/string/nsTSubstring.h" template inline PRBool LowerCaseEqualsLiteral( const char (&str)[N] ) const { return LowerCaseEqualsASCII(str, N-1); } template inline PRBool LowerCaseEqualsLiteral( char (&str)[N] ) const { const char* s = str; return LowerCaseEqualsASCII(s, N-1); } void Assign( char_type c ) { Assign(&c, 1); } __attribute__ ((visibility ("default"))) void Assign( const char_type* data, size_type length = size_type(-1) ); __attribute__ ((visibility ("default"))) void Assign( const self_type& ); __attribute__ ((visibility ("default"))) void Assign( const substring_tuple_type& ); __attribute__ ((visibility ("default"))) void Assign( const abstract_string_type& ); __attribute__ ((visibility ("default"))) void AssignASCII( const char* data, size_type length ); __attribute__ ((visibility ("default"))) void AssignASCII( const char* data ); # 321 "../../../dist/include/string/nsTSubstring.h" template void AssignLiteral( const char (&str)[N] ) { AssignASCII(str, N-1); } template void AssignLiteral( char (&str)[N] ) { AssignASCII(str, N-1); } self_type& operator=( char_type c ) { Assign(c); return *this; } self_type& operator=( const char_type* data ) { Assign(data); return *this; } self_type& operator=( const self_type& str ) { Assign(str); return *this; } self_type& operator=( const substring_tuple_type& tuple ) { Assign(tuple); return *this; } self_type& operator=( const abstract_string_type& readable ) { Assign(readable); return *this; } __attribute__ ((visibility ("default"))) void Adopt( char_type* data, size_type length = size_type(-1) ); void Replace( index_type cutStart, size_type cutLength, char_type c ) { Replace(cutStart, cutLength, &c, 1); } __attribute__ ((visibility ("default"))) void Replace( index_type cutStart, size_type cutLength, const char_type* data, size_type length = size_type(-1) ); void Replace( index_type cutStart, size_type cutLength, const self_type& str ) { Replace(cutStart, cutLength, str.Data(), str.Length()); } __attribute__ ((visibility ("default"))) void Replace( index_type cutStart, size_type cutLength, const substring_tuple_type& tuple ); __attribute__ ((visibility ("default"))) void Replace( index_type cutStart, size_type cutLength, const abstract_string_type& readable ); __attribute__ ((visibility ("default"))) void ReplaceASCII( index_type cutStart, size_type cutLength, const char* data, size_type length = size_type(-1) ); void Append( char_type c ) { Replace(mLength, 0, c); } void Append( const char_type* data, size_type length = size_type(-1) ) { Replace(mLength, 0, data, length); } void Append( const self_type& str ) { Replace(mLength, 0, str); } void Append( const substring_tuple_type& tuple ) { Replace(mLength, 0, tuple); } void Append( const abstract_string_type& readable ) { Replace(mLength, 0, readable); } void AppendASCII( const char* data, size_type length = size_type(-1) ) { ReplaceASCII(mLength, 0, data, length); } # 371 "../../../dist/include/string/nsTSubstring.h" template void AppendLiteral( const char (&str)[N] ) { AppendASCII(str, N-1); } template void AppendLiteral( char (&str)[N] ) { AppendASCII(str, N-1); } self_type& operator+=( char_type c ) { Append(c); return *this; } self_type& operator+=( const char_type* data ) { Append(data); return *this; } self_type& operator+=( const self_type& str ) { Append(str); return *this; } self_type& operator+=( const substring_tuple_type& tuple ) { Append(tuple); return *this; } self_type& operator+=( const abstract_string_type& readable ) { Append(readable); return *this; } void Insert( char_type c, index_type pos ) { Replace(pos, 0, c); } void Insert( const char_type* data, index_type pos, size_type length = size_type(-1) ) { Replace(pos, 0, data, length); } void Insert( const self_type& str, index_type pos ) { Replace(pos, 0, str); } void Insert( const substring_tuple_type& tuple, index_type pos ) { Replace(pos, 0, tuple); } void Insert( const abstract_string_type& readable, index_type pos ) { Replace(pos, 0, readable); } void Cut( index_type cutStart, size_type cutLength ) { Replace(cutStart, cutLength, char_traits::sEmptyBuffer, 0); } __attribute__ ((visibility ("default"))) void SetCapacity( size_type capacity ); __attribute__ ((visibility ("default"))) void SetLength( size_type ); void Truncate( size_type newLength = 0 ) { do { } while (0); SetLength(newLength); } __attribute__ ((visibility ("default"))) void SetIsVoid( PRBool ); # 428 "../../../dist/include/string/nsTSubstring.h" __attribute__ ((visibility ("default"))) void StripChar( char_type aChar, PRInt32 aOffset=0 ); public: nsCSubstring(const substring_tuple_type& tuple) : abstract_string_type(0, 0, F_NONE) { Assign(tuple); } nsCSubstring( char_type *data, size_type length, PRUint32 flags ) : abstract_string_type(data, length, flags) {} protected: friend class nsObsoleteACStringThunk; friend class nsACString_internal; friend class nsCSubstringTuple; friend class nsPromiseFlatCString; # 481 "../../../dist/include/string/nsTSubstring.h" nsCSubstring() : abstract_string_type( const_cast< char_type* >(char_traits::sEmptyBuffer), 0, F_TERMINATED) {} explicit nsCSubstring( PRUint32 flags ) : abstract_string_type(flags) {} nsCSubstring( const self_type& str ) : abstract_string_type(str.mData, str.mLength, str.mFlags & (F_TERMINATED | F_VOIDED)) {} # 516 "../../../dist/include/string/nsTSubstring.h" void Finalize(); # 536 "../../../dist/include/string/nsTSubstring.h" PRBool MutatePrep( size_type capacity, char_type** old_data, PRUint32* old_flags ); # 558 "../../../dist/include/string/nsTSubstring.h" PRBool ReplacePrep( index_type cutStart, size_type cutLength, size_type newLength ); size_type Capacity() const; __attribute__ ((visibility ("default"))) void EnsureMutable(); PRBool IsDependentOn( const char_type *start, const char_type *end ) const { # 587 "../../../dist/include/string/nsTSubstring.h" return ( start < (mData + mLength) && end > mData ); } void SetDataFlags(PRUint32 dataFlags) { do { } while (0); mFlags = dataFlags | (mFlags & 0xFFFF0000); } public: enum { F_NONE = 0, F_TERMINATED = 1 << 0, F_VOIDED = 1 << 1, F_SHARED = 1 << 2, F_OWNED = 1 << 3, F_FIXED = 1 << 4, F_CLASS_FIXED = 1 << 16 }; # 655 "../../../dist/include/string/nsTSubstring.h" }; __attribute__ ((visibility ("default"))) int Compare( const nsCSubstring::base_string_type& lhs, const nsCSubstring::base_string_type& rhs, const nsCStringComparator& = nsDefaultCStringComparator() ); inline PRBool operator!=( const nsCSubstring::base_string_type& lhs, const nsCSubstring::base_string_type& rhs ) { return !lhs.Equals(rhs); } inline PRBool operator< ( const nsCSubstring::base_string_type& lhs, const nsCSubstring::base_string_type& rhs ) { return Compare(lhs, rhs)< 0; } inline PRBool operator<=( const nsCSubstring::base_string_type& lhs, const nsCSubstring::base_string_type& rhs ) { return Compare(lhs, rhs)<=0; } inline PRBool operator==( const nsCSubstring::base_string_type& lhs, const nsCSubstring::base_string_type& rhs ) { return lhs.Equals(rhs); } inline PRBool operator>=( const nsCSubstring::base_string_type& lhs, const nsCSubstring::base_string_type& rhs ) { return Compare(lhs, rhs)>=0; } inline PRBool operator> ( const nsCSubstring::base_string_type& lhs, const nsCSubstring::base_string_type& rhs ) { return Compare(lhs, rhs)> 0; } # 67 "../../../dist/include/string/nsSubstring.h" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 68 "../../../dist/include/string/nsSubstring.h" 2 # 44 "../../../dist/include/string/nsDependentSubstring.h" 2 # 1 "../../../dist/include/string/string-template-def-unichar.h" 1 # 48 "../../../dist/include/string/nsDependentSubstring.h" 2 # 1 "../../../dist/include/string/nsTDependentSubstring.h" 1 # 44 "../../../dist/include/string/nsTDependentSubstring.h" class nsDependentSubstring : public nsSubstring { public: typedef nsDependentSubstring self_type; public: __attribute__ ((visibility ("default"))) void Rebind( const abstract_string_type&, PRUint32 startPos, PRUint32 length = size_type(-1) ); __attribute__ ((visibility ("default"))) void Rebind( const substring_type&, PRUint32 startPos, PRUint32 length = size_type(-1) ); __attribute__ ((visibility ("default"))) void Rebind( const char_type* start, const char_type* end ); nsDependentSubstring( const abstract_string_type& str, PRUint32 startPos, PRUint32 length = size_type(-1) ) : substring_type() { Rebind(str, startPos, length); } nsDependentSubstring( const substring_type& str, PRUint32 startPos, PRUint32 length = size_type(-1) ) : substring_type() { Rebind(str, startPos, length); } nsDependentSubstring( const char_type* start, const char_type* end ) : substring_type(const_cast< char_type* >(start), end - start, F_NONE) {} nsDependentSubstring( const const_iterator& start, const const_iterator& end ) : substring_type(const_cast< char_type* >(start.get()), end.get() - start.get(), F_NONE) {} nsDependentSubstring() : substring_type() {} private: void operator=( const self_type& ); }; inline const nsDependentSubstring Substring( const nsAString_internal& str, PRUint32 startPos, PRUint32 length = PRUint32(-1) ) { return nsDependentSubstring(str, startPos, length); } inline const nsDependentSubstring Substring( const nsSubstring& str, PRUint32 startPos, PRUint32 length = PRUint32(-1) ) { return nsDependentSubstring(str, startPos, length); } inline const nsDependentSubstring Substring( const nsReadingIterator& start, const nsReadingIterator& end ) { return nsDependentSubstring(start.get(), end.get()); } inline const nsDependentSubstring Substring( const PRUnichar* start, const PRUnichar* end ) { return nsDependentSubstring(start, end); } inline const nsDependentSubstring StringHead( const nsAString_internal& str, PRUint32 count ) { return nsDependentSubstring(str, 0, count); } inline const nsDependentSubstring StringHead( const nsSubstring& str, PRUint32 count ) { return nsDependentSubstring(str, 0, count); } inline const nsDependentSubstring StringTail( const nsAString_internal& str, PRUint32 count ) { return nsDependentSubstring(str, str.Length() - count, count); } inline const nsDependentSubstring StringTail( const nsSubstring& str, PRUint32 count ) { return nsDependentSubstring(str, str.Length() - count, count); } # 49 "../../../dist/include/string/nsDependentSubstring.h" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 50 "../../../dist/include/string/nsDependentSubstring.h" 2 # 1 "../../../dist/include/string/string-template-def-char.h" 1 # 53 "../../../dist/include/string/nsDependentSubstring.h" 2 # 1 "../../../dist/include/string/nsTDependentSubstring.h" 1 # 44 "../../../dist/include/string/nsTDependentSubstring.h" class nsDependentCSubstring : public nsCSubstring { public: typedef nsDependentCSubstring self_type; public: __attribute__ ((visibility ("default"))) void Rebind( const abstract_string_type&, PRUint32 startPos, PRUint32 length = size_type(-1) ); __attribute__ ((visibility ("default"))) void Rebind( const substring_type&, PRUint32 startPos, PRUint32 length = size_type(-1) ); __attribute__ ((visibility ("default"))) void Rebind( const char_type* start, const char_type* end ); nsDependentCSubstring( const abstract_string_type& str, PRUint32 startPos, PRUint32 length = size_type(-1) ) : substring_type() { Rebind(str, startPos, length); } nsDependentCSubstring( const substring_type& str, PRUint32 startPos, PRUint32 length = size_type(-1) ) : substring_type() { Rebind(str, startPos, length); } nsDependentCSubstring( const char_type* start, const char_type* end ) : substring_type(const_cast< char_type* >(start), end - start, F_NONE) {} nsDependentCSubstring( const const_iterator& start, const const_iterator& end ) : substring_type(const_cast< char_type* >(start.get()), end.get() - start.get(), F_NONE) {} nsDependentCSubstring() : substring_type() {} private: void operator=( const self_type& ); }; inline const nsDependentCSubstring Substring( const nsACString_internal& str, PRUint32 startPos, PRUint32 length = PRUint32(-1) ) { return nsDependentCSubstring(str, startPos, length); } inline const nsDependentCSubstring Substring( const nsCSubstring& str, PRUint32 startPos, PRUint32 length = PRUint32(-1) ) { return nsDependentCSubstring(str, startPos, length); } inline const nsDependentCSubstring Substring( const nsReadingIterator& start, const nsReadingIterator& end ) { return nsDependentCSubstring(start.get(), end.get()); } inline const nsDependentCSubstring Substring( const char* start, const char* end ) { return nsDependentCSubstring(start, end); } inline const nsDependentCSubstring StringHead( const nsACString_internal& str, PRUint32 count ) { return nsDependentCSubstring(str, 0, count); } inline const nsDependentCSubstring StringHead( const nsCSubstring& str, PRUint32 count ) { return nsDependentCSubstring(str, 0, count); } inline const nsDependentCSubstring StringTail( const nsACString_internal& str, PRUint32 count ) { return nsDependentCSubstring(str, str.Length() - count, count); } inline const nsDependentCSubstring StringTail( const nsCSubstring& str, PRUint32 count ) { return nsDependentCSubstring(str, str.Length() - count, count); } # 54 "../../../dist/include/string/nsDependentSubstring.h" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 55 "../../../dist/include/string/nsDependentSubstring.h" 2 # 40 "nsDependentSubstring.cpp" 2 # 1 "../../../dist/include/string/nsAlgorithm.h" 1 # 41 "nsDependentSubstring.cpp" 2 # 1 "../../../dist/include/string/string-template-def-unichar.h" 1 # 44 "nsDependentSubstring.cpp" 2 # 1 "nsTDependentSubstring.cpp" 1 # 40 "nsTDependentSubstring.cpp" void nsDependentSubstring::Rebind( const abstract_string_type& readable, PRUint32 startPos, PRUint32 length ) { Finalize(); size_type strLength = readable.GetReadableBuffer((const char_type**) &mData); if (startPos > strLength) startPos = strLength; mData += startPos; mLength = NS_MIN(length, strLength - startPos); SetDataFlags(F_NONE); } void nsDependentSubstring::Rebind( const substring_type& str, PRUint32 startPos, PRUint32 length ) { Finalize(); size_type strLength = str.Length(); if (startPos > strLength) startPos = strLength; mData = const_cast< char_type* >(str.Data()) + startPos; mLength = NS_MIN(length, strLength - startPos); SetDataFlags(F_NONE); } void nsDependentSubstring::Rebind( const char_type* start, const char_type* end ) { do { } while (0); Finalize(); mData = const_cast< char_type* >(start); mLength = end - start; SetDataFlags(F_NONE); } # 45 "nsDependentSubstring.cpp" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 46 "nsDependentSubstring.cpp" 2 # 1 "../../../dist/include/string/string-template-def-char.h" 1 # 49 "nsDependentSubstring.cpp" 2 # 1 "nsTDependentSubstring.cpp" 1 # 40 "nsTDependentSubstring.cpp" void nsDependentCSubstring::Rebind( const abstract_string_type& readable, PRUint32 startPos, PRUint32 length ) { Finalize(); size_type strLength = readable.GetReadableBuffer((const char_type**) &mData); if (startPos > strLength) startPos = strLength; mData += startPos; mLength = NS_MIN(length, strLength - startPos); SetDataFlags(F_NONE); } void nsDependentCSubstring::Rebind( const substring_type& str, PRUint32 startPos, PRUint32 length ) { Finalize(); size_type strLength = str.Length(); if (startPos > strLength) startPos = strLength; mData = const_cast< char_type* >(str.Data()) + startPos; mLength = NS_MIN(length, strLength - startPos); SetDataFlags(F_NONE); } void nsDependentCSubstring::Rebind( const char_type* start, const char_type* end ) { do { } while (0); Finalize(); mData = const_cast< char_type* >(start); mLength = end - start; SetDataFlags(F_NONE); } # 50 "nsDependentSubstring.cpp" 2 # 1 "../../../dist/include/string/string-template-undef.h" 1 # 50 "nsDependentSubstring.cpp" 2