aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1995-10-18 23:30:32 +0000
committerRichard M. Stallman1995-10-18 23:30:32 +0000
commitb1428bd860169c42e03bebd119d3be9fb0be1309 (patch)
tree2fcd83dc312d88701b2b705182ef77246811e2af /src
parent999de24679443c095dd074ce7f380d4b97e91f98 (diff)
downloademacs-b1428bd860169c42e03bebd119d3be9fb0be1309.tar.gz
emacs-b1428bd860169c42e03bebd119d3be9fb0be1309.zip
(compile_pattern_1, compile_pattern, search_buffer):
Case tables are char-tables now.
Diffstat (limited to 'src')
-rw-r--r--src/search.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/search.c b/src/search.c
index 44795bd1dad..7813ca67ec5 100644
--- a/src/search.c
+++ b/src/search.c
@@ -109,7 +109,7 @@ static void
109compile_pattern_1 (cp, pattern, translate, regp, posix) 109compile_pattern_1 (cp, pattern, translate, regp, posix)
110 struct regexp_cache *cp; 110 struct regexp_cache *cp;
111 Lisp_Object pattern; 111 Lisp_Object pattern;
112 char *translate; 112 Lisp_Object *translate;
113 struct re_registers *regp; 113 struct re_registers *regp;
114 int posix; 114 int posix;
115{ 115{
@@ -147,7 +147,7 @@ struct re_pattern_buffer *
147compile_pattern (pattern, regp, translate, posix) 147compile_pattern (pattern, regp, translate, posix)
148 Lisp_Object pattern; 148 Lisp_Object pattern;
149 struct re_registers *regp; 149 struct re_registers *regp;
150 char *translate; 150 Lisp_Object *translate;
151 int posix; 151 int posix;
152{ 152{
153 struct regexp_cache *cp, **cpp; 153 struct regexp_cache *cp, **cpp;
@@ -835,9 +835,11 @@ search_command (string, bound, noerror, count, direction, RE, posix)
835 835
836 np = search_buffer (string, point, lim, n, RE, 836 np = search_buffer (string, point, lim, n, RE,
837 (!NILP (current_buffer->case_fold_search) 837 (!NILP (current_buffer->case_fold_search)
838 ? XSTRING (current_buffer->case_canon_table)->data : 0), 838 ? XCHAR_TABLE (current_buffer->case_canon_table)->contents
839 : 0),
839 (!NILP (current_buffer->case_fold_search) 840 (!NILP (current_buffer->case_fold_search)
840 ? XSTRING (current_buffer->case_eqv_table)->data : 0), 841 ? XCHAR_TABLE (current_buffer->case_eqv_table)->contents
842 : 0),
841 posix); 843 posix);
842 if (np <= 0) 844 if (np <= 0)
843 { 845 {
@@ -918,8 +920,8 @@ search_buffer (string, pos, lim, n, RE, trt, inverse_trt, posix)
918 int lim; 920 int lim;
919 int n; 921 int n;
920 int RE; 922 int RE;
921 register unsigned char *trt; 923 Lisp_Object *trt;
922 register unsigned char *inverse_trt; 924 Lisp_Object *inverse_trt;
923 int posix; 925 int posix;
924{ 926{
925 int len = XSTRING (string)->size; 927 int len = XSTRING (string)->size;
@@ -952,7 +954,7 @@ search_buffer (string, pos, lim, n, RE, trt, inverse_trt, posix)
952 { 954 {
953 struct re_pattern_buffer *bufp; 955 struct re_pattern_buffer *bufp;
954 956
955 bufp = compile_pattern (string, &search_regs, (char *) trt, posix); 957 bufp = compile_pattern (string, &search_regs, trt, posix);
956 958
957 immediate_quit = 1; /* Quit immediately if user types ^G, 959 immediate_quit = 1; /* Quit immediately if user types ^G,
958 because letting this function finish 960 because letting this function finish
@@ -1122,7 +1124,7 @@ search_buffer (string, pos, lim, n, RE, trt, inverse_trt, posix)
1122 BM_tab[j] = dirlen - i; 1124 BM_tab[j] = dirlen - i;
1123 /* A translation table is accompanied by its inverse -- see */ 1125 /* A translation table is accompanied by its inverse -- see */
1124 /* comment following downcase_table for details */ 1126 /* comment following downcase_table for details */
1125 while ((j = inverse_trt[j]) != k) 1127 while ((j = (unsigned char) inverse_trt[j]) != k)
1126 BM_tab[j] = dirlen - i; 1128 BM_tab[j] = dirlen - i;
1127 } 1129 }
1128 else 1130 else