comparison src/share/bin/jli_util.h @ 4338:9b8c96f96a0f

Added tag jdk7-b147 for changeset f097ca2434b1
author schien
date Mon, 27 Jun 2011 13:21:34 -0700
parents d3fa95d0710c
children
comparison
equal deleted inserted replaced
2:ec73ea2422f3 3:0e46880d6d39
1 /* 1 /*
2 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
33 void *JLI_MemRealloc(void *ptr, size_t size); 33 void *JLI_MemRealloc(void *ptr, size_t size);
34 char *JLI_StringDup(const char *s1); 34 char *JLI_StringDup(const char *s1);
35 void JLI_MemFree(void *ptr); 35 void JLI_MemFree(void *ptr);
36 int JLI_StrCCmp(const char *s1, const char* s2); 36 int JLI_StrCCmp(const char *s1, const char* s2);
37 37
38
39 #define JLI_StrLen(p1) strlen((p1)) 38 #define JLI_StrLen(p1) strlen((p1))
40 #define JLI_StrChr(p1, p2) strchr((p1), (p2)) 39 #define JLI_StrChr(p1, p2) strchr((p1), (p2))
41 #define JLI_StrRChr(p1, p2) strrchr((p1), (p2)) 40 #define JLI_StrRChr(p1, p2) strrchr((p1), (p2))
42 #define JLI_StrCmp(p1, p2) strcmp((p1), (p2)) 41 #define JLI_StrCmp(p1, p2) strcmp((p1), (p2))
43 #define JLI_StrNCmp(p1, p2, p3) strncmp((p1), (p2), (p3)) 42 #define JLI_StrNCmp(p1, p2, p3) strncmp((p1), (p2), (p3))
46 #define JLI_StrNCpy(p1, p2, p3) strncpy((p1), (p2), (p3)) 45 #define JLI_StrNCpy(p1, p2, p3) strncpy((p1), (p2), (p3))
47 #define JLI_StrStr(p1, p2) strstr((p1), (p2)) 46 #define JLI_StrStr(p1, p2) strstr((p1), (p2))
48 #define JLI_StrSpn(p1, p2) strspn((p1), (p2)) 47 #define JLI_StrSpn(p1, p2) strspn((p1), (p2))
49 #define JLI_StrCSpn(p1, p2) strcspn((p1), (p2)) 48 #define JLI_StrCSpn(p1, p2) strcspn((p1), (p2))
50 #define JLI_StrPBrk(p1, p2) strpbrk((p1), (p2)) 49 #define JLI_StrPBrk(p1, p2) strpbrk((p1), (p2))
50 #define JLI_StrTok(p1, p2) strtok((p1), (p2))
51 51
52 /* On Windows lseek() is in io.h rather than the location dictated by POSIX. */ 52 /* On Windows lseek() is in io.h rather than the location dictated by POSIX. */
53 #ifdef _WIN32 53 #ifdef _WIN32
54 #include <windows.h> 54 #include <windows.h>
55 #include <io.h> 55 #include <io.h>