VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/Etherboot-src/include/string.h@ 2564

最後變更 在這個檔案從2564是 1,由 vboxsync 提交於 55 年 前

import

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 2.0 KB
 
1/*
2 * Copyright (C) 1991, 1992 Linus Torvalds
3 * Copyright (C) 2004 Tobias Lorenz
4 *
5 * string handling functions
6 * based on linux/include/linux/ctype.h
7 * and linux/include/linux/string.h
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef ETHERBOOT_STRING_H
15#define ETHERBOOT_STRING_H
16
17#include "bits/string.h"
18
19
20/* *** FROM ctype.h *** */
21
22#define isdigit(c) ((c & 0x04) != 0)
23#define islower(c) ((c & 0x02) != 0)
24//#define isspace(c) ((c & 0x20) != 0)
25#define isupper(c) ((c & 0x01) != 0)
26
27static inline unsigned char tolower(unsigned char c)
28{
29 if (isupper(c))
30 c -= 'A'-'a';
31 return c;
32}
33
34static inline unsigned char toupper(unsigned char c)
35{
36 if (islower(c))
37 c -= 'a'-'A';
38 return c;
39}
40
41
42/* *** FROM string.h *** */
43
44int strnicmp(const char *s1, const char *s2, size_t len);
45char * strcpy(char * dest,const char *src);
46char * strncpy(char * dest,const char *src,size_t count);
47char * strcat(char * dest, const char * src);
48char * strncat(char *dest, const char *src, size_t count);
49int strcmp(const char * cs,const char * ct);
50int strncmp(const char * cs,const char * ct,size_t count);
51char * strchr(const char * s, int c);
52char * strrchr(const char * s, int c);
53size_t strlen(const char * s);
54size_t strnlen(const char * s, size_t count);
55size_t strspn(const char *s, const char *accept);
56char * strpbrk(const char * cs,const char * ct);
57char * strtok(char * s,const char * ct);
58char * strsep(char **s, const char *ct);
59void * memset(void * s,int c,size_t count);
60char * bcopy(const char * src, char * dest, int count);
61void * memcpy(void * dest,const void *src,size_t count);
62void * memmove(void * dest,const void *src,size_t count);
63int memcmp(const void * cs,const void * ct,size_t count);
64void * memscan(void * addr, int c, size_t size);
65char * strstr(const char * s1,const char * s2);
66void * memchr(const void *s, int c, size_t n);
67
68#endif /* ETHERBOOT_STRING */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette