comparison src/fns.c @ 10114:6f6db8f5b8a0

(internal_equal): Call compare_string_intervals. (Fstring_equal): Doc fix.
author Richard M. Stallman <rms@gnu.org>
date Sun, 04 Dec 1994 21:07:21 +0000
parents c1b138be512e
children 9dd21ecf6b0f
comparison
equal deleted inserted replaced
10113:9d72d79329c3 10114:6f6db8f5b8a0
125 return val; 125 return val;
126 } 126 }
127 127
128 DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0, 128 DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0,
129 "T if two strings have identical contents.\n\ 129 "T if two strings have identical contents.\n\
130 Case is significant.\n\ 130 Case is significant, but text properties are ignored.\n\
131 Symbols are also allowed; their print names are used instead.") 131 Symbols are also allowed; their print names are used instead.")
132 (s1, s2) 132 (s1, s2)
133 register Lisp_Object s1, s2; 133 register Lisp_Object s1, s2;
134 { 134 {
135 if (SYMBOLP (s1)) 135 if (SYMBOLP (s1))
928 { 928 {
929 if (XSTRING (o1)->size != XSTRING (o2)->size) 929 if (XSTRING (o1)->size != XSTRING (o2)->size)
930 return 0; 930 return 0;
931 if (bcmp (XSTRING (o1)->data, XSTRING (o2)->data, XSTRING (o1)->size)) 931 if (bcmp (XSTRING (o1)->data, XSTRING (o2)->data, XSTRING (o1)->size))
932 return 0; 932 return 0;
933 #ifdef USE_TEXT_PROPERTIES
934 /* If the strings have intervals, verify they match;
935 if not, they are unequal. */
936 if ((XSTRING (o1)->intervals != 0 || XSTRING (o2)->intervals != 0)
937 && ! compare_string_intervals (o1, o2))
938 return 0;
939 #endif
933 return 1; 940 return 1;
934 } 941 }
935 return 0; 942 return 0;
936 } 943 }
937 944