History

new subdirs: include, lib, tests

grischka committed 17 years ago

Commit ea5e81b1 parent e8a52a816 files · +0 −6Browse files

Showing the changes to tcclib.h (1 of 16 files). Show all

Unified · Split

tcclib.h+0−77
@@ -1,77 +0,0 @@
1/* Simple libc header for TCC
2 *
3 * Add any function you want from the libc there. This file is here
4 * only for your convenience so that you do not need to put the whole
5 * glibc include files on your floppy disk
6 */
7#ifndef _TCCLIB_H
8#define _TCCLIB_H
9
10#include <stddef.h>
11#include <stdarg.h>
12
13/* stdlib.h */
14void *calloc(size_t nmemb, size_t size);
15void *malloc(size_t size);
16void free(void *ptr);
17void *realloc(void *ptr, size_t size);
18int atoi(const char *nptr);
19long int strtol(const char *nptr, char **endptr, int base);
20unsigned long int strtoul(const char *nptr, char **endptr, int base);
21
22/* stdio.h */
23typedef struct __FILE FILE;
24#define EOF (-1)
25extern FILE *stdin;
26extern FILE *stdout;
27extern FILE *stderr;
28FILE *fopen(const char *path, const char *mode);
29FILE *fdopen(int fildes, const char *mode);
30FILE *freopen(const char *path, const char *mode, FILE *stream);
31int fclose(FILE *stream);
32size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
33size_t fwrite(void *ptr, size_t size, size_t nmemb, FILE *stream);
34int fgetc(FILE *stream);
35char *fgets(char *s, int size, FILE *stream);
36int getc(FILE *stream);
37int getchar(void);
38char *gets(char *s);
39int ungetc(int c, FILE *stream);
40int fflush(FILE *stream);
41
42int printf(const char *format, ...);
43int fprintf(FILE *stream, const char *format, ...);
44int sprintf(char *str, const char *format, ...);
45int snprintf(char *str, size_t size, const char *format, ...);
46int asprintf(char **strp, const char *format, ...);
47int dprintf(int fd, const char *format, ...);
48int vprintf(const char *format, va_list ap);
49int vfprintf(FILE *stream, const char *format, va_list ap);
50int vsprintf(char *str, const char *format, va_list ap);
51int vsnprintf(char *str, size_t size, const char *format, va_list ap);
52int vasprintf(char **strp, const char *format, va_list ap);
53int vdprintf(int fd, const char *format, va_list ap);
54
55void perror(const char *s);
56
57/* string.h */
58char *strcat(char *dest, const char *src);
59char *strchr(const char *s, int c);
60char *strrchr(const char *s, int c);
61char *strcpy(char *dest, const char *src);
62void *memcpy(void *dest, const void *src, size_t n);
63void *memmove(void *dest, const void *src, size_t n);
64void *memset(void *s, int c, size_t n);
65char *strdup(const char *s);
66
67/* dlfcn.h */
68#define RTLD_LAZY 0x001
69#define RTLD_NOW 0x002
70#define RTLD_GLOBAL 0x100
71
72void *dlopen(const char *filename, int flag);
73const char *dlerror(void);
74void *dlsym(void *handle, char *symbol);
75int dlclose(void *handle);
76
77#endif /* _TCCLIB_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t