Commit e8f5ccab authored by Stefan Behnel's avatar Stefan Behnel

convert function argument names in libc declarations to lower case to make...

convert function argument names in libc declarations to lower case to make their use as keyword arguments more natural
parent ff1c8833
...@@ -40,7 +40,7 @@ cdef extern from "locale.h" nogil: ...@@ -40,7 +40,7 @@ cdef extern from "locale.h" nogil:
enum: LC_TIME enum: LC_TIME
# 7.11.1 Locale control # 7.11.1 Locale control
char *setlocale (int CATEGORY, const char *LOCALE) char *setlocale (int category, const char *locale)
# 7.11.2 Numeric formatting convention inquiry # 7.11.2 Numeric formatting convention inquiry
lconv *localeconv () lconv *localeconv ()
cdef extern from "setjmp.h" nogil: cdef extern from "setjmp.h" nogil:
ctypedef struct jmp_buf: ctypedef struct jmp_buf:
pass pass
int setjmp(jmp_buf STATE) int setjmp(jmp_buf state)
void longjmp(jmp_buf STATE, int VALUE) void longjmp(jmp_buf state, int value)
...@@ -17,8 +17,8 @@ cdef extern from "signal.h" nogil: ...@@ -17,8 +17,8 @@ cdef extern from "signal.h" nogil:
sighandler_t SIG_IGN sighandler_t SIG_IGN
sighandler_t SIG_ERR sighandler_t SIG_ERR
sighandler_t signal (int SIGNUM, sighandler_t ACTION) sighandler_t signal (int signum, sighandler_t action)
int raise_"raise" (int SIGNUM) int raise_"raise" (int signum)
cdef extern from "signal.h" nogil: cdef extern from "signal.h" nogil:
......
...@@ -14,53 +14,53 @@ cdef extern from "stdio.h" nogil: ...@@ -14,53 +14,53 @@ cdef extern from "stdio.h" nogil:
enum: FOPEN_MAX enum: FOPEN_MAX
enum: FILENAME_MAX enum: FILENAME_MAX
FILE *fopen (const char *FILENAME, const char *OPENTYPE) FILE *fopen (const char *filename, const char *opentype)
FILE *freopen (const char *FILENAME, const char *OPENTYPE, FILE *STREAM) FILE *freopen (const char *filename, const char *opentype, FILE *stream)
int fclose (FILE *STREAM) int fclose (FILE *stream)
int remove (const char *FILENAME) int remove (const char *filename)
int rename (const char *OLDNAME, const char *NEWNAME) int rename (const char *oldname, const char *newname)
FILE *tmpfile () FILE *tmpfile ()
enum: _IOFBF enum: _IOFBF
enum: _IOLBF enum: _IOLBF
enum: _IONBF enum: _IONBF
int setvbuf (FILE *STREAM, char *BUF, int MODE, size_t SIZE) int setvbuf (FILE *stream, char *buf, int mode, size_t size)
enum: BUFSIZ enum: BUFSIZ
void setbuf (FILE *STREAM, char *BUF) void setbuf (FILE *stream, char *buf)
size_t fread (void *DATA, size_t SIZE, size_t COUNT, FILE *STREAM) size_t fread (void *data, size_t size, size_t count, FILE *stream)
size_t fwrite (const void *DATA, size_t SIZE, size_t COUNT, FILE *STREAM) size_t fwrite (const void *data, size_t size, size_t count, FILE *stream)
int fflush (FILE *STREAM) int fflush (FILE *stream)
enum: EOF enum: EOF
int feof (FILE *STREAM) int feof (FILE *stream)
int ferror (FILE *STREAM) int ferror (FILE *stream)
enum: SEEK_SET enum: SEEK_SET
enum: SEEK_CUR enum: SEEK_CUR
enum: SEEK_END enum: SEEK_END
int fseek (FILE *STREAM, long int OFFSET, int WHENCE) int fseek (FILE *stream, long int offset, int whence)
void rewind (FILE *STREAM) void rewind (FILE *stream)
long int ftell (FILE *STREAM) long int ftell (FILE *stream)
ctypedef long long int fpos_t ctypedef long long int fpos_t
ctypedef const fpos_t const_fpos_t "const fpos_t" ctypedef const fpos_t const_fpos_t "const fpos_t"
int fgetpos (FILE *STREAM, fpos_t *POSITION) int fgetpos (FILE *stream, fpos_t *position)
int fsetpos (FILE *STREAM, const fpos_t *POSITION) int fsetpos (FILE *stream, const fpos_t *position)
int scanf (const char *TEMPLATE, ...) int scanf (const char *template, ...)
int sscanf (const char *S, const char *TEMPLATE, ...) int sscanf (const char *s, const char *template, ...)
int fscanf (FILE *STREAM, const char *TEMPLATE, ...) int fscanf (FILE *stream, const char *template, ...)
int printf (const char *TEMPLATE, ...) int printf (const char *template, ...)
int sprintf (char *S, const char *TEMPLATE, ...) int sprintf (char *s, const char *template, ...)
int snprintf (char *S, size_t SIZE, const char *TEMPLATE, ...) int snprintf (char *s, size_t size, const char *template, ...)
int fprintf (FILE *STREAM, const char *TEMPLATE, ...) int fprintf (FILE *stream, const char *template, ...)
void perror (const char *MESSAGE) void perror (const char *message)
char *gets (char *S) char *gets (char *s)
char *fgets (char *S, int COUNT, FILE *STREAM) char *fgets (char *s, int count, FILE *stream)
int puts (const char *S) int puts (const char *s)
int fputs (const char *S, FILE *STREAM) int fputs (const char *s, FILE *stream)
...@@ -7,62 +7,62 @@ from libc.string cimport const_char, const_void ...@@ -7,62 +7,62 @@ from libc.string cimport const_char, const_void
cdef extern from "stdlib.h" nogil: cdef extern from "stdlib.h" nogil:
# 7.20.1 Numeric conversion functions # 7.20.1 Numeric conversion functions
int atoi (const char *STRING) int atoi (const char *string)
long atol (const char *STRING) long atol (const char *string)
long long atoll (const char *STRING) long long atoll (const char *string)
double atof (const char *STRING) double atof (const char *string)
long strtol (const char *STRING, char **TAILPTR, int BASE) long strtol (const char *string, char **tailptr, int base)
unsigned long int strtoul (const char *STRING, char **TAILPTR, int BASE) unsigned long int strtoul (const char *string, char **tailptr, int base)
long long int strtoll (const char *STRING, char **TAILPTR, int BASE) long long int strtoll (const char *string, char **tailptr, int base)
unsigned long long int strtoull (const char *STRING, char **TAILPTR, int BASE) unsigned long long int strtoull (const char *string, char **tailptr, int base)
float strtof (const char *STRING, char **TAILPTR) float strtof (const char *string, char **tailptr)
double strtod (const char *STRING, char **TAILPTR) double strtod (const char *string, char **tailptr)
long double strtold (const char *STRING, char **TAILPTR) long double strtold (const char *string, char **tailptr)
# 7.20.2 Pseudo-random sequence generation functions # 7.20.2 Pseudo-random sequence generation functions
enum: RAND_MAX enum: RAND_MAX
int rand () int rand ()
void srand (unsigned int SEED) void srand (unsigned int seed)
# 7.20.3 Memory management functions # 7.20.3 Memory management functions
void *calloc (size_t COUNT, size_t ELTSIZE) void *calloc (size_t count, size_t eltsize)
void free (void *PTR) void free (void *ptr)
void *malloc (size_t SIZE) void *malloc (size_t size)
void *realloc (void *PTR, size_t NEWSIZE) void *realloc (void *ptr, size_t newsize)
# 7.20.4 Communication with the environment # 7.20.4 Communication with the environment
enum: EXIT_FAILURE enum: EXIT_FAILURE
enum: EXIT_SUCCESS enum: EXIT_SUCCESS
void exit (int STATUS) void exit (int status)
void _Exit (int STATUS) void _exit (int status)
int atexit (void (*FUNCTION) ()) int atexit (void (*function) ())
void abort () void abort ()
char *getenv (const char *NAME) char *getenv (const char *name)
int system (const char *COMMAND) int system (const char *command)
#7.20.5 Searching and sorting utilities #7.20.5 Searching and sorting utilities
void *bsearch (const void *KEY, const void *ARRAY, void *bsearch (const void *key, const void *array,
size_t COUNT, size_t SIZE, size_t count, size_t size,
int (*COMPARE)(const void *, const void *)) int (*compare)(const void *, const void *))
void qsort (void *ARRAY, size_t COUNT, size_t SIZE, void qsort (void *array, size_t count, size_t size,
int (*COMPARE)(const void *, const void *)) int (*compare)(const void *, const void *))
# 7.20.6 Integer arithmetic functions # 7.20.6 Integer arithmetic functions
int abs (int NUMBER) int abs (int number)
long int labs (long int NUMBER) long int labs (long int number)
long long int llabs (long long int NUMBER) long long int llabs (long long int number)
ctypedef struct div_t: ctypedef struct div_t:
int quot int quot
int rem int rem
div_t div (int NUMERATOR, int DENOMINATOR) div_t div (int numerator, int denominator)
ctypedef struct ldiv_t: ctypedef struct ldiv_t:
long int quot long int quot
long int rem long int rem
ldiv_t ldiv (long int NUMERATOR, long int DENOMINATOR) ldiv_t ldiv (long int numerator, long int denominator)
ctypedef struct lldiv_t: ctypedef struct lldiv_t:
long long int quot long long int quot
long long int rem long long int rem
lldiv_t lldiv (long long int NUMERATOR, long long int DENOMINATOR) lldiv_t lldiv (long long int numerator, long long int denominator)
# 7.20.7 Multibyte/wide character conversion functions # 7.20.7 Multibyte/wide character conversion functions
......
...@@ -9,41 +9,41 @@ cdef extern from *: ...@@ -9,41 +9,41 @@ cdef extern from *:
cdef extern from "string.h" nogil: cdef extern from "string.h" nogil:
void *memcpy (void *TO, const void *FROM, size_t SIZE) void *memcpy (void *to, const void *from, size_t size)
void *memmove (void *TO, const void *FROM, size_t SIZE) void *memmove (void *to, const void *from, size_t size)
void *memset (void *BLOCK, int C, size_t SIZE) void *memset (void *block, int c, size_t size)
int memcmp (const void *A1, const void *A2, size_t SIZE) int memcmp (const void *a1, const void *a2, size_t size)
void *memchr (const void *BLOCK, int C, size_t SIZE) void *memchr (const void *block, int c, size_t size)
void *memchr (const void *BLOCK, int C, size_t SIZE) void *memchr (const void *block, int c, size_t size)
void *memrchr (const void *BLOCK, int C, size_t SIZE) void *memrchr (const void *block, int c, size_t size)
size_t strlen (const char *S) size_t strlen (const char *s)
char *strcpy (char *TO, const char *FROM) char *strcpy (char *to, const char *from)
char *strncpy (char *TO, const char *FROM, size_t SIZE) char *strncpy (char *to, const char *from, size_t size)
char *strdup (const char *S) char *strdup (const char *s)
char *strndup (const char *S, size_t SIZE) char *strndup (const char *s, size_t size)
char *strcat (char *TO, const char *FROM) char *strcat (char *to, const char *from)
char *strncat (char *TO, const char *FROM, size_t SIZE) char *strncat (char *to, const char *from, size_t size)
int strcmp (const char *S1, const char *S2) int strcmp (const char *s1, const char *s2)
int strcasecmp (const char *S1, const char *S2) int strcasecmp (const char *s1, const char *s2)
int strncmp (const char *S1, const char *S2, size_t SIZE) int strncmp (const char *s1, const char *s2, size_t size)
int strncasecmp (const char *S1, const char *S2, size_t N) int strncasecmp (const char *s1, const char *s2, size_t n)
int strcoll (const char *S1, const char *S2) int strcoll (const char *s1, const char *s2)
size_t strxfrm (char *TO, const char *FROM, size_t SIZE) size_t strxfrm (char *to, const char *from, size_t size)
char *strerror (int ERRNUM) char *strerror (int errnum)
char *strchr (const char *STRING, int C) char *strchr (const char *string, int c)
char *strrchr (const char *STRING, int C) char *strrchr (const char *string, int c)
char *strstr (const char *HAYSTACK, const char *NEEDLE) char *strstr (const char *haystack, const char *needle)
char *strcasestr (const char *HAYSTACK, const char *NEEDLE) char *strcasestr (const char *haystack, const char *needle)
size_t strcspn (const char *STRING, const char *STOPSET) size_t strcspn (const char *string, const char *stopset)
char * strpbrk (const char *STRING, const char *STOPSET) char * strpbrk (const char *string, const char *stopset)
char *strtok (char *NEWSTRING, const char *DELIMITERS) char *strtok (char *newstring, const char *delimiters)
char *strsep (char **STRING_PTR, const char *DELIMITER) char *strsep (char **string_ptr, const char *delimiter)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment