From 5d2d7d278a2fabd52a252676c6e5b1bb9be630c7 Mon Sep 17 00:00:00 2001 From: Martin Baute Date: Sun, 13 Mar 2016 07:38:33 +0100 Subject: [PATCH] Comment reformatting for consistency. --- functions/stdio/_PDCLIB_fvopen.c | 2 +- functions/stdio/_cbprintf.c | 2 +- functions/stdio/_vcbprintf.c | 2 +- functions/stdio/fseek.c | 2 +- functions/stdio/ftrylockfile.c | 2 +- functions/stdio/funlockfile.c | 2 +- functions/stdio/vprintf.c | 2 +- functions/stdio/vscanf.c | 2 +- functions/stdio/vsnprintf.c | 2 +- functions/stdio/vsprintf.c | 2 +- functions/stdio/vsscanf.c | 2 +- functions/string/strdup.c | 2 +- functions/string/strlcat.c | 5 +---- functions/string/strlcpy.c | 5 +---- functions/string/strndup.c | 2 +- functions/time/clock.c | 28 ++++++++++++++++++++++++++++ functions/uchar/_PDCLIB_c32srtombs.c | 6 +----- functions/uchar/_PDCLIB_mbsrtoc32s.c | 6 +----- functions/uchar/c16rtomb.c | 5 +---- functions/uchar/c32rtomb.c | 5 +---- functions/uchar/mbrtoc16.c | 6 +----- functions/uchar/mbrtoc32.c | 6 +----- functions/wchar/mbrtowc.c | 6 +----- functions/wchar/mbsinit.c | 2 +- functions/wchar/wcrtomb.c | 5 +---- functions/wchar/wcscpy.c | 2 +- functions/wchar/wcsncpy.c | 2 +- 27 files changed, 54 insertions(+), 61 deletions(-) create mode 100644 functions/time/clock.c diff --git a/functions/stdio/_PDCLIB_fvopen.c b/functions/stdio/_PDCLIB_fvopen.c index 18d820d..1f089cb 100644 --- a/functions/stdio/_PDCLIB_fvopen.c +++ b/functions/stdio/_PDCLIB_fvopen.c @@ -1,4 +1,4 @@ -/* _PDCLIB_fvopen( _PDCLIB_fd_t fd, _PDCLIB_fileops_t * ) +/* _PDCLIB_fvopen( _PDCLIB_fd_t, _PDCLIB_fileops_t * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/stdio/_cbprintf.c b/functions/stdio/_cbprintf.c index dedf84e..38e3333 100644 --- a/functions/stdio/_cbprintf.c +++ b/functions/stdio/_cbprintf.c @@ -1,4 +1,4 @@ -/* _cbprintf( void *, size_t (*)( void*, const char *, size_t ), const char *, ... ) +/* _cbprintf( void *, size_t (*)( void *, const char *, size_t ), const char *, ... ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/stdio/_vcbprintf.c b/functions/stdio/_vcbprintf.c index 0c950d5..4aa8532 100644 --- a/functions/stdio/_vcbprintf.c +++ b/functions/stdio/_vcbprintf.c @@ -1,4 +1,4 @@ -/* vsnprintf( char *, size_t, const char *, va_list ap ) +/* vsnprintf( char *, size_t, const char *, va_list ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/stdio/fseek.c b/functions/stdio/fseek.c index 72fe951..fafeeb9 100644 --- a/functions/stdio/fseek.c +++ b/functions/stdio/fseek.c @@ -1,4 +1,4 @@ -/* fseek( FILE *, long offset, int ) +/* fseek( FILE *, long, int ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/stdio/ftrylockfile.c b/functions/stdio/ftrylockfile.c index 994b51e..a06dc57 100644 --- a/functions/stdio/ftrylockfile.c +++ b/functions/stdio/ftrylockfile.c @@ -1,4 +1,4 @@ -/* ftrylockfile(FILE * ) +/* ftrylockfile( FILE * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/stdio/funlockfile.c b/functions/stdio/funlockfile.c index 0113390..7435607 100644 --- a/functions/stdio/funlockfile.c +++ b/functions/stdio/funlockfile.c @@ -1,4 +1,4 @@ -/* funlockfile(FILE * ) +/* funlockfile( FILE * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/stdio/vprintf.c b/functions/stdio/vprintf.c index ef08ac8..9c56df1 100644 --- a/functions/stdio/vprintf.c +++ b/functions/stdio/vprintf.c @@ -1,4 +1,4 @@ -/* vprintf( const char *, va_list arg ) +/* vprintf( const char *, va_list ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/stdio/vscanf.c b/functions/stdio/vscanf.c index 654f5bf..3a161f3 100644 --- a/functions/stdio/vscanf.c +++ b/functions/stdio/vscanf.c @@ -1,4 +1,4 @@ -/* vscanf( const char *, va_list arg ) +/* vscanf( const char *, va_list ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/stdio/vsnprintf.c b/functions/stdio/vsnprintf.c index a8f5684..92aef76 100644 --- a/functions/stdio/vsnprintf.c +++ b/functions/stdio/vsnprintf.c @@ -1,4 +1,4 @@ -/* vsnprintf( char *, size_t, const char *, va_list ap ) +/* vsnprintf( char *, size_t, const char *, va_list ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/stdio/vsprintf.c b/functions/stdio/vsprintf.c index 410e485..661b2aa 100644 --- a/functions/stdio/vsprintf.c +++ b/functions/stdio/vsprintf.c @@ -1,4 +1,4 @@ -/* vsprintf( char *, const char *, va_list ap ) +/* vsprintf( char *, const char *, va_list ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/stdio/vsscanf.c b/functions/stdio/vsscanf.c index 51b49e5..e6c9157 100644 --- a/functions/stdio/vsscanf.c +++ b/functions/stdio/vsscanf.c @@ -1,4 +1,4 @@ -/* vsscanf( const char *, const char *, va_list arg ) +/* vsscanf( const char *, const char *, va_list ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/string/strdup.c b/functions/string/strdup.c index 9be484a..41df104 100644 --- a/functions/string/strdup.c +++ b/functions/string/strdup.c @@ -1,4 +1,4 @@ -/* [XSI] char* strdup(const char *) +/* [XSI] char * strdup( const char * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/string/strlcat.c b/functions/string/strlcat.c index 34a47d4..b81bf7d 100644 --- a/functions/string/strlcat.c +++ b/functions/string/strlcat.c @@ -1,7 +1,4 @@ -/* strlcat( - char *_PDCLIB_restrict _Dst, - const char *_PDCLIB_restict _Src, - size_t _DstSize) +/* strlcat( char *, const char *, size_t ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/string/strlcpy.c b/functions/string/strlcpy.c index 7a73f8c..6739f85 100644 --- a/functions/string/strlcpy.c +++ b/functions/string/strlcpy.c @@ -1,7 +1,4 @@ -/* strlcpy( - char *_PDCLIB_restrict _Dst, - const char *_PDCLIB_restrict _Src, - size_t _DstSize) +/* strlcpy( char *, const char *, size_t ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/string/strndup.c b/functions/string/strndup.c index 15c44be..2967bbb 100644 --- a/functions/string/strndup.c +++ b/functions/string/strndup.c @@ -1,4 +1,4 @@ -/* [XSI] char* strndup(const char *, size_t) +/* [XSI] char * strndup( const char *, size_t ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/time/clock.c b/functions/time/clock.c new file mode 100644 index 0000000..b3fb840 --- /dev/null +++ b/functions/time/clock.c @@ -0,0 +1,28 @@ +/* clock( void ) + + This file is part of the Public Domain C Library (PDCLib). + Permission is granted to use, modify, and / or redistribute at will. +*/ + +#include + +#ifndef REGTEST + +clock_t clock( void ) +{ + /* TODO: Placeholder implementation (valid but useless) */ + return -1; +} + +#endif + +#ifdef TEST +#include <_PDCLIB_test.h> + +int main( void ) +{ + TESTCASE( NO_TESTDRIVER ); + return TEST_RESULTS; +} + +#endif diff --git a/functions/uchar/_PDCLIB_c32srtombs.c b/functions/uchar/_PDCLIB_c32srtombs.c index eda8ab5..5a3a297 100644 --- a/functions/uchar/_PDCLIB_c32srtombs.c +++ b/functions/uchar/_PDCLIB_c32srtombs.c @@ -1,8 +1,4 @@ -/* _PDCLIB_c32srtombs( - char *_PDCLIB_restrict dst, - const char32_t **_PDCLIB_restrict src, - size_t len, - mbstate_t *_PDCLIB_restrict ps); +/* _PDCLIB_c32srtombs( char *, const char32_t * *, size_t, mbstate_t * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/uchar/_PDCLIB_mbsrtoc32s.c b/functions/uchar/_PDCLIB_mbsrtoc32s.c index 0e672e6..6339a9e 100644 --- a/functions/uchar/_PDCLIB_mbsrtoc32s.c +++ b/functions/uchar/_PDCLIB_mbsrtoc32s.c @@ -1,8 +1,4 @@ -/* _PDCLIB_mbsrtoc32s( - char32_t *restrict dst, - const char **restrict src, - size_t len, - mbstate_t *restrict ps); +/* _PDCLIB_mbsrtoc32s( char32_t *, const char * *, size_t, mbstate_t * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/uchar/c16rtomb.c b/functions/uchar/c16rtomb.c index ac8c629..f78c0d8 100644 --- a/functions/uchar/c16rtomb.c +++ b/functions/uchar/c16rtomb.c @@ -1,7 +1,4 @@ -/* c16rtomb( - char *restrict s, - char16_t c16, - mbstate_t *restrict ps); +/* c16rtomb( char *, char16_t, mbstate_t * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/uchar/c32rtomb.c b/functions/uchar/c32rtomb.c index d9f016d..3b32e52 100644 --- a/functions/uchar/c32rtomb.c +++ b/functions/uchar/c32rtomb.c @@ -1,7 +1,4 @@ -/* c32rtomb( - char *restrict s, - char32_t c32, - mbstate_t *restrict ps); +/* c32rtomb( char *, char32_t, mbstate_t * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/uchar/mbrtoc16.c b/functions/uchar/mbrtoc16.c index 60b9f41..2aacf29 100644 --- a/functions/uchar/mbrtoc16.c +++ b/functions/uchar/mbrtoc16.c @@ -1,8 +1,4 @@ -/* size_t mbrtoc16( - char16_t *restrict pc16, - const char *restrict s, - size_t n, - mbstate_t *restrict ps); +/* size_t mbrtoc16( char16_t *, const char *, size_t, mbstate_t * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/uchar/mbrtoc32.c b/functions/uchar/mbrtoc32.c index 7e0eb1d..326d6b5 100644 --- a/functions/uchar/mbrtoc32.c +++ b/functions/uchar/mbrtoc32.c @@ -1,8 +1,4 @@ -/* size_t mbrtoc32( - char32_t *restrict pc32, - const char *restrict s, - size_t n, - mbstate_t *restrict ps); +/* size_t mbrtoc32( char32_t *, const char *, size_t, mbstate_t * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/wchar/mbrtowc.c b/functions/wchar/mbrtowc.c index b2912ba..56c16ab 100644 --- a/functions/wchar/mbrtowc.c +++ b/functions/wchar/mbrtowc.c @@ -1,8 +1,4 @@ -/* mbrtowc( - wchar_t *restrict pwc, - const char *restrict s, - size_t n, - mbstate_t *restrict ps); +/* mbrtowc( wchar_t * pwc, const char * s, size_t n, mbstate_t * ps ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/wchar/mbsinit.c b/functions/wchar/mbsinit.c index 0734711..90c2c2f 100644 --- a/functions/wchar/mbsinit.c +++ b/functions/wchar/mbsinit.c @@ -1,4 +1,4 @@ -/* mbsinit(mbstate_t *ps); +/* mbsinit( mbstate_t * ps ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/wchar/wcrtomb.c b/functions/wchar/wcrtomb.c index 3fddc1f..287ff1d 100644 --- a/functions/wchar/wcrtomb.c +++ b/functions/wchar/wcrtomb.c @@ -1,7 +1,4 @@ -/* wcrtomb( - char *restrict s, - wchar_t wc, - mbstate_t *restrict ps); +/* wcrtomb( char * s, wchar_t wc, mbstate_t * ps ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/wchar/wcscpy.c b/functions/wchar/wcscpy.c index 02394ee..5b18f99 100644 --- a/functions/wchar/wcscpy.c +++ b/functions/wchar/wcscpy.c @@ -1,4 +1,4 @@ -/* wchar_t * wcscpy( wchar_t restrict *, const wchar_t restrict * ); +/* wchar_t * wcscpy( wchar_t *, const wchar_t * ); This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. diff --git a/functions/wchar/wcsncpy.c b/functions/wchar/wcsncpy.c index 6d0e4d2..5f4329f 100644 --- a/functions/wchar/wcsncpy.c +++ b/functions/wchar/wcsncpy.c @@ -1,4 +1,4 @@ -/* wchar_t * wcsncpy( wchar_t restrict *, const wchar_t restrict * , size_t ); +/* wchar_t * wcsncpy( wchar_t *, const wchar_t * , size_t ); This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. -- 2.40.0