annotate dynodump/i386/uninit.c @ 4407:4ee73bbe4f8e

Always use boyer_moore in ASCII or Latin-1 buffers with ASCII search strings. 2007-12-26 Aidan Kehoe <kehoea@parhasard.net> * casetab.c: Extend and correct some case table documentation. * search.c (search_buffer): Correct a bug where only the first entry for a character in the case equivalence table was examined in determining if the Boyer-Moore search algorithm is appropriate. If there are case mappings outside of the charset and row of the characters specified in the search string, those case mappings can be safely ignored (and Boyer-Moore search can be used) if we know from the buffer statistics that the corresponding characters cannot occur. * search.c (boyer_moore): Assert that we haven't been passed a string with varying characters sets or rows within character sets. That's what simple_search is for. In the very rare event that a character in the search string has a canonical case mapping that is not in the same character set and row, don't try to search for the canonical character, search for some other character that is in the the desired character set and row. Assert that the case table isn't corrupt. Do not search for any character case mappings that cannot possibly occur in the buffer, given the buffer metadata about its contents.
author Aidan Kehoe <kehoea@parhasard.net>
date Wed, 26 Dec 2007 17:30:16 +0100
parents 376386a54a3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 * Copyright (c) 1995 by Sun Microsystems, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 * All rights reserved.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 *
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 * This source code is a product of Sun Microsystems, Inc. and is provided
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 * for unrestricted use provided that this legend is included on all tape
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 * media and as a part of the software program in whole or part. Users
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 * may copy or modify this source code without charge, but are not authorized
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 * to license or distribute it to anyone else except as part of a product or
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 * program developed by the user.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 *
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 * OF SUCH SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 * EXPRESS OR IMPLIED WARRANTY OF ANY KIND. SUN MICROSYSTEMS, INC. DISCLAIMS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 *
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 * This source code is provided with no support and without any obligation on
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 * the part of Sun Microsystems, Inc. to assist in its use, correction,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 * modification or enhancement.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 *
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 * SOURCE CODE OR ANY PART THEREOF.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 *
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 * Sun Microsystems, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 * 2550 Garcia Avenue
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 * Mountain View, California 94043
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 /*
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 * This is where you put processor specific un-initialization things
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 * to deal with "initialization idempotency issues".
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 void
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 dynodump_uninit(void)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 {
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 return;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 }