From: Stefan Behnel Date: Thu, 7 Feb 2013 22:25:38 +0000 (+0100) Subject: convert function argument names in libc declarations to lower case to make their... X-Git-Tag: 0.19b1~220 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8f5ccab73e19377ecaf6a90a0ad953b93012901;p=platform%2Fupstream%2Fpython-cython.git convert function argument names in libc declarations to lower case to make their use as keyword arguments more natural --- diff --git a/Cython/Includes/libc/locale.pxd b/Cython/Includes/libc/locale.pxd index ffd0845..c7e0a51 100644 --- a/Cython/Includes/libc/locale.pxd +++ b/Cython/Includes/libc/locale.pxd @@ -40,7 +40,7 @@ cdef extern from "locale.h" nogil: enum: LC_TIME # 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 lconv *localeconv () diff --git a/Cython/Includes/libc/setjmp.pxd b/Cython/Includes/libc/setjmp.pxd index 467280d..74d1c59 100644 --- a/Cython/Includes/libc/setjmp.pxd +++ b/Cython/Includes/libc/setjmp.pxd @@ -1,5 +1,5 @@ cdef extern from "setjmp.h" nogil: ctypedef struct jmp_buf: pass - int setjmp(jmp_buf STATE) - void longjmp(jmp_buf STATE, int VALUE) + int setjmp(jmp_buf state) + void longjmp(jmp_buf state, int value) diff --git a/Cython/Includes/libc/signal.pxd b/Cython/Includes/libc/signal.pxd index 4d3c4fa..08d2ebf 100644 --- a/Cython/Includes/libc/signal.pxd +++ b/Cython/Includes/libc/signal.pxd @@ -17,8 +17,8 @@ cdef extern from "signal.h" nogil: sighandler_t SIG_IGN sighandler_t SIG_ERR - sighandler_t signal (int SIGNUM, sighandler_t ACTION) - int raise_"raise" (int SIGNUM) + sighandler_t signal (int signum, sighandler_t action) + int raise_"raise" (int signum) cdef extern from "signal.h" nogil: diff --git a/Cython/Includes/libc/stdio.pxd b/Cython/Includes/libc/stdio.pxd index bc29cfc..d640c0b 100644 --- a/Cython/Includes/libc/stdio.pxd +++ b/Cython/Includes/libc/stdio.pxd @@ -14,53 +14,53 @@ cdef extern from "stdio.h" nogil: enum: FOPEN_MAX enum: FILENAME_MAX - FILE *fopen (const char *FILENAME, const char *OPENTYPE) - FILE *freopen (const char *FILENAME, const char *OPENTYPE, FILE *STREAM) - int fclose (FILE *STREAM) - int remove (const char *FILENAME) - int rename (const char *OLDNAME, const char *NEWNAME) + FILE *fopen (const char *filename, const char *opentype) + FILE *freopen (const char *filename, const char *opentype, FILE *stream) + int fclose (FILE *stream) + int remove (const char *filename) + int rename (const char *oldname, const char *newname) FILE *tmpfile () enum: _IOFBF enum: _IOLBF 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 - 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 fwrite (const void *DATA, size_t SIZE, size_t COUNT, FILE *STREAM) - int fflush (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) + int fflush (FILE *stream) enum: EOF - int feof (FILE *STREAM) - int ferror (FILE *STREAM) + int feof (FILE *stream) + int ferror (FILE *stream) enum: SEEK_SET enum: SEEK_CUR enum: SEEK_END - int fseek (FILE *STREAM, long int OFFSET, int WHENCE) - void rewind (FILE *STREAM) - long int ftell (FILE *STREAM) + int fseek (FILE *stream, long int offset, int whence) + void rewind (FILE *stream) + long int ftell (FILE *stream) ctypedef long long int fpos_t ctypedef const fpos_t const_fpos_t "const fpos_t" - int fgetpos (FILE *STREAM, fpos_t *POSITION) - int fsetpos (FILE *STREAM, const fpos_t *POSITION) + int fgetpos (FILE *stream, fpos_t *position) + int fsetpos (FILE *stream, const fpos_t *position) - int scanf (const char *TEMPLATE, ...) - int sscanf (const char *S, const char *TEMPLATE, ...) - int fscanf (FILE *STREAM, const char *TEMPLATE, ...) + int scanf (const char *template, ...) + int sscanf (const char *s, const char *template, ...) + int fscanf (FILE *stream, const char *template, ...) - int printf (const char *TEMPLATE, ...) - int sprintf (char *S, const char *TEMPLATE, ...) - int snprintf (char *S, size_t SIZE, const char *TEMPLATE, ...) - int fprintf (FILE *STREAM, const char *TEMPLATE, ...) + int printf (const char *template, ...) + int sprintf (char *s, const char *template, ...) + int snprintf (char *s, size_t size, 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 *fgets (char *S, int COUNT, FILE *STREAM) + char *gets (char *s) + char *fgets (char *s, int count, FILE *stream) - int puts (const char *S) - int fputs (const char *S, FILE *STREAM) + int puts (const char *s) + int fputs (const char *s, FILE *stream) diff --git a/Cython/Includes/libc/stdlib.pxd b/Cython/Includes/libc/stdlib.pxd index 0e4766b..8719e9a 100644 --- a/Cython/Includes/libc/stdlib.pxd +++ b/Cython/Includes/libc/stdlib.pxd @@ -7,62 +7,62 @@ from libc.string cimport const_char, const_void cdef extern from "stdlib.h" nogil: # 7.20.1 Numeric conversion functions - int atoi (const char *STRING) - long atol (const char *STRING) - long long atoll (const char *STRING) - double atof (const char *STRING) - long strtol (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) - unsigned long long int strtoull (const char *STRING, char **TAILPTR, int BASE) - float strtof (const char *STRING, char **TAILPTR) - double strtod (const char *STRING, char **TAILPTR) - long double strtold (const char *STRING, char **TAILPTR) + int atoi (const char *string) + long atol (const char *string) + long long atoll (const char *string) + double atof (const char *string) + long strtol (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) + unsigned long long int strtoull (const char *string, char **tailptr, int base) + float strtof (const char *string, char **tailptr) + double strtod (const char *string, char **tailptr) + long double strtold (const char *string, char **tailptr) # 7.20.2 Pseudo-random sequence generation functions enum: RAND_MAX int rand () - void srand (unsigned int SEED) + void srand (unsigned int seed) # 7.20.3 Memory management functions - void *calloc (size_t COUNT, size_t ELTSIZE) - void free (void *PTR) - void *malloc (size_t SIZE) - void *realloc (void *PTR, size_t NEWSIZE) + void *calloc (size_t count, size_t eltsize) + void free (void *ptr) + void *malloc (size_t size) + void *realloc (void *ptr, size_t newsize) # 7.20.4 Communication with the environment enum: EXIT_FAILURE enum: EXIT_SUCCESS - void exit (int STATUS) - void _Exit (int STATUS) - int atexit (void (*FUNCTION) ()) + void exit (int status) + void _exit (int status) + int atexit (void (*function) ()) void abort () - char *getenv (const char *NAME) - int system (const char *COMMAND) + char *getenv (const char *name) + int system (const char *command) #7.20.5 Searching and sorting utilities - void *bsearch (const void *KEY, const void *ARRAY, - size_t COUNT, size_t SIZE, - int (*COMPARE)(const void *, const void *)) - void qsort (void *ARRAY, size_t COUNT, size_t SIZE, - int (*COMPARE)(const void *, const void *)) + void *bsearch (const void *key, const void *array, + size_t count, size_t size, + int (*compare)(const void *, const void *)) + void qsort (void *array, size_t count, size_t size, + int (*compare)(const void *, const void *)) # 7.20.6 Integer arithmetic functions - int abs (int NUMBER) - long int labs (long int NUMBER) - long long int llabs (long long int NUMBER) + int abs (int number) + long int labs (long int number) + long long int llabs (long long int number) ctypedef struct div_t: int quot int rem - div_t div (int NUMERATOR, int DENOMINATOR) + div_t div (int numerator, int denominator) ctypedef struct ldiv_t: long int quot 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: long long int quot 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 diff --git a/Cython/Includes/libc/string.pxd b/Cython/Includes/libc/string.pxd index 8d06227..5ca8948 100644 --- a/Cython/Includes/libc/string.pxd +++ b/Cython/Includes/libc/string.pxd @@ -9,41 +9,41 @@ cdef extern from *: cdef extern from "string.h" nogil: - void *memcpy (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) - int memcmp (const void *A1, const void *A2, size_t SIZE) - void *memchr (const void *BLOCK, int C, size_t SIZE) + void *memcpy (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) + 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 *memrchr (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) - size_t strlen (const char *S) - char *strcpy (char *TO, const char *FROM) - char *strncpy (char *TO, const char *FROM, size_t SIZE) - char *strdup (const char *S) - char *strndup (const char *S, size_t SIZE) - char *strcat (char *TO, const char *FROM) - char *strncat (char *TO, const char *FROM, size_t SIZE) + size_t strlen (const char *s) + char *strcpy (char *to, const char *from) + char *strncpy (char *to, const char *from, size_t size) + char *strdup (const char *s) + char *strndup (const char *s, size_t size) + char *strcat (char *to, const char *from) + char *strncat (char *to, const char *from, size_t size) - int strcmp (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 strncasecmp (const char *S1, const char *S2, size_t N) + int strcmp (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 strncasecmp (const char *s1, const char *s2, size_t n) - int strcoll (const char *S1, const char *S2) - size_t strxfrm (char *TO, const char *FROM, size_t SIZE) + int strcoll (const char *s1, const char *s2) + 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 *strrchr (const char *STRING, int C) + char *strchr (const char *string, int c) + char *strrchr (const char *string, int c) - char *strstr (const char *HAYSTACK, const char *NEEDLE) - char *strcasestr (const char *HAYSTACK, const char *NEEDLE) + char *strstr (const char *haystack, const char *needle) + char *strcasestr (const char *haystack, const char *needle) - size_t strcspn (const char *STRING, const char *STOPSET) - char * strpbrk (const char *STRING, const char *STOPSET) + size_t strcspn (const char *string, const char *stopset) + char * strpbrk (const char *string, const char *stopset) - char *strtok (char *NEWSTRING, const char *DELIMITERS) - char *strsep (char **STRING_PTR, const char *DELIMITER) + char *strtok (char *newstring, const char *delimiters) + char *strsep (char **string_ptr, const char *delimiter)