Nugget
Loading...
Searching...
No Matches
libcmisc.h
Go to the documentation of this file.
1/*
2
3MIT License
4
5Copyright (c) 2020 PCSX-Redux authors
6
7Permission is hereby granted, free of charge, to any person obtaining a copy
8of this software and associated documentation files (the "Software"), to deal
9in the Software without restriction, including without limitation the rights
10to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11copies of the Software, and to permit persons to whom the Software is
12furnished to do so, subject to the following conditions:
13
14The above copyright notice and this permission notice shall be included in all
15copies or substantial portions of the Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23SOFTWARE.
24
25*/
26
27#pragma once
28
29#include <stddef.h>
30#include <stdint.h>
31
32int psxdummy();
33
34int psxtodigit(int c);
35void psxatof(const char *str);
36int psxabs(int j);
37char *psxatob(char *str, int *result);
38const char *psxstrpbrk(const char *s, const char *accepted);
39unsigned psxstrspn(const char *s, const char *accepted);
40unsigned psxstrcspn(const char *s, const char *rejected);
41char *psxstrtok(char *str, const char *delim);
42const char *psxbcopy(const void *src, void *dst, int n);
43const char *psxbzero(void *ptr, int n);
44int psxbcmp(const void *s1, const void *s2, int n);
46void psxsrand(uint32_t seed);
47const void *psxlsearch(const char *key, const char *base, int nmemb, size_t size,
48 int (*compar)(const char *, const char *));
49const void *psxbsearch(const char *key, const char *base, int nmemb, size_t size,
50 int (*compar)(const char *, const char *));
volatile uint32_t * ptr
Definition cop0.c:80
const void * psxlsearch(const char *key, const char *base, int nmemb, size_t size, int(*compar)(const char *, const char *))
Definition libcmisc.c:135
int psxbcmp(const void *s1, const void *s2, int n)
Definition libcmisc.c:122
const char * psxstrpbrk(const char *s, const char *accepted)
Definition libcmisc.c:53
const char * psxbcopy(const void *src, void *dst, int n)
Definition libcmisc.c:109
uint32_t psxrand()
Definition libcmisc.c:128
char * psxatob(char *str, int *result)
Definition libcmisc.c:47
unsigned psxstrspn(const char *s, const char *accepted)
Definition libcmisc.c:63
const char * psxbzero(void *ptr, int n)
Definition libcmisc.c:116
unsigned psxstrcspn(const char *s, const char *rejected)
Definition libcmisc.c:80
int psxtodigit(int c)
Definition libcmisc.c:36
void psxatof(const char *str)
const void * psxbsearch(const char *key, const char *base, int nmemb, size_t size, int(*compar)(const char *, const char *))
Definition libcmisc.c:142
int psxdummy()
Definition libcmisc.c:34
int psxabs(int j)
Definition libcmisc.c:42
char * psxstrtok(char *str, const char *delim)
Definition libcmisc.c:98
void psxsrand(uint32_t seed)
Definition libcmisc.c:133
void * result
Definition memcpy.c:47
char * s
Definition string.c:48
static int size
Definition string.h:32
static const char * s2
Definition syscalls.h:91
static int c
Definition syscalls.h:121
static size_t size_t int(* compar)(const void *, const void *))
Definition syscalls.h:158
static const char * src
Definition syscalls.h:79
void uint32_t(classId, spec)