Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: src/trusted/validator/x86/testing/enuminsts/str_utils.h

Issue 9861030: Modify enuminsts to be able to communicate matched instructions accross (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 * Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 /* 7 /*
8 * str_utils.h 8 * str_utils.h
9 * 9 *
10 * Defines support string routines for the instruction enumerator. 10 * Defines support string routines for the instruction enumerator.
11 */ 11 */
12 12
13 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_TESTING_STR_UTILS_H__ 13 #ifndef NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_TESTING_STR_UTILS_H__
14 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_TESTING_STR_UTILS_H__ 14 #define NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_TESTING_STR_UTILS_H__
15 15
16 #include "native_client/src/include/nacl_macros.h" 16 #include "native_client/src/include/nacl_macros.h"
17 17
18 /* If string s begins with string prefix, return a pointer to the 18 /* If string s begins with string prefix, return a pointer to the
19 * first byte after the prefix. Else return s. 19 * first byte after the prefix. Else return s.
20 */ 20 */
21 char *SkipPrefix(char *s, const char *prefix); 21 char *SkipPrefix(char *s, const char *prefix);
22 22
23 /* Return a pointer to s with leading spaces removed. */ 23 /* Return a pointer to s with leading spaces removed. */
24 char *strip(char *s); 24 const char *strip(const char *s);
25 25
26 /* Updates the string by removing trailing spaces/newlines. */ 26 /* Updates the string by removing trailing spaces/newlines. */
27 void rstrip(char *s); 27 void rstrip(char *s);
28 28
29 /* Find substring ss in string s. Returns a pointer to the substring 29 /* Find substring ss in string s. Returns a pointer to the substring
30 * on success, NULL on failure. 30 * on success, NULL on failure.
31 */ 31 */
32 const char *strfind(const char *s, const char *ss); 32 const char *strfind(const char *s, const char *ss);
33 33
34 /* If string ss appears in string s, return a pointer to the first byte 34 /* If string ss appears in string s, return a pointer to the first byte
(...skipping 10 matching lines...) Expand all
45 /* Copy src to dest, stoping at character c. */ 45 /* Copy src to dest, stoping at character c. */
46 void strncpyto(char *dest, const char *src, size_t n, char c); 46 void strncpyto(char *dest, const char *src, size_t n, char c);
47 47
48 /* Remove all instances of substring ss in string s, modifying s in place. */ 48 /* Remove all instances of substring ss in string s, modifying s in place. */
49 void CleanString(char *s, const char *ss); 49 void CleanString(char *s, const char *ss);
50 50
51 /* Remove all instances of character c in string s. */ 51 /* Remove all instances of character c in string s. */
52 void strnzapchar(char *s, const char c); 52 void strnzapchar(char *s, const char c);
53 53
54 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_TESTING_STR_UTILS_H__ */ 54 #endif /* NATIVE_CLIENT_SRC_TRUSTED_VALIDATOR_X86_TESTING_STR_UTILS_H__ */
OLDNEW
« no previous file with comments | « src/trusted/validator/x86/testing/enuminsts/nacl_tester.c ('k') | src/trusted/validator/x86/testing/enuminsts/str_utils.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698