diff --git a/src/system/libroot/posix/locale/localeconv.c b/src/system/libroot/posix/locale/localeconv.c index 9c4be82bdd..ed32f76169 100644 --- a/src/system/libroot/posix/locale/localeconv.c +++ b/src/system/libroot/posix/locale/localeconv.c @@ -1,19 +1,12 @@ /* - * Copyright (c) 2002, OpenBeOS Project. - * All rights reserved. - * Distributed under the terms of the OpenBeOS license. - * - * - * localeconv.c: - * defines the structure containing the current locale - * and the single access function 'localeconv()' - * - * - * Author(s): - * Daniel Reinhold (danielre@users.sf.net) + * Copyright 2002-2007, Haiku Inc. All rights reserved. + * Distributed under the terms of the MIT License. * + * Author: + * Daniel Reinhold, danielre@users.sf.net */ - + + #include #include @@ -48,10 +41,9 @@ struct lconv _Locale = { -struct lconv * +struct lconv* localeconv(void) { // return pointer to the current locale return &_Locale; } - diff --git a/src/system/libroot/posix/poll.c b/src/system/libroot/posix/poll.c index aaea2fbaf5..e55b3efef1 100644 --- a/src/system/libroot/posix/poll.c +++ b/src/system/libroot/posix/poll.c @@ -1,6 +1,6 @@ /* * Copyright 2002-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved. - * Distributed under the terms of the OpenBeOS License. + * Distributed under the terms of the MIT License. */ diff --git a/src/system/libroot/posix/stdlib/abs.c b/src/system/libroot/posix/stdlib/abs.c index 8290940cd3..eb5aa66bea 100644 --- a/src/system/libroot/posix/stdlib/abs.c +++ b/src/system/libroot/posix/stdlib/abs.c @@ -1,19 +1,12 @@ /* - * Copyright (c) 2002, OpenBeOS Project. - * All rights reserved. - * Distributed under the terms of the OpenBeOS license. - * - * - * abs.c: - * implements the standard C library functions: - * abs, labs, llabs - * - * - * Author(s): - * Daniel Reinhold (danielre@users.sf.net) + * Copyright 2002-2007, Haiku Inc. All rights reserved. + * Distributed under the terms of the MIT License. * + * Author: + * Daniel Reinhold, danielre@users.sf.net */ + #include @@ -36,4 +29,3 @@ llabs(long long i) { return (i < 0) ? -i : i; } - diff --git a/src/system/libroot/posix/stdlib/atof.c b/src/system/libroot/posix/stdlib/atof.c index 1b5b62b15a..bae0918133 100644 --- a/src/system/libroot/posix/stdlib/atof.c +++ b/src/system/libroot/posix/stdlib/atof.c @@ -1,26 +1,17 @@ /* - * Copyright (c) 2002, OpenBeOS Project. - * All rights reserved. - * Distributed under the terms of the OpenBeOS license. - * - * - * atof.c: - * implements the standard C library function atof() - * (merely a wrapper for strtod(), actually) - * - * - * Author(s): - * Daniel Reinhold (danielre@users.sf.net) + * Copyright 2002-2007, Haiku Inc. All rights reserved. + * Distributed under the terms of the MIT License. * + * Author: + * Daniel Reinhold, danielre@users.sf.net */ - + + #include double -atof(const char *num) +atof(const char* num) { return strtod(num, NULL); } - - diff --git a/src/system/libroot/posix/stdlib/atoi.c b/src/system/libroot/posix/stdlib/atoi.c index 66eac93af0..a97a68fe64 100644 --- a/src/system/libroot/posix/stdlib/atoi.c +++ b/src/system/libroot/posix/stdlib/atoi.c @@ -1,54 +1,45 @@ /* - * Copyright (c) 2002, OpenBeOS Project. - * All rights reserved. - * Distributed under the terms of the OpenBeOS license. - * - * - * atoi.c: - * implements the standard C library functions: - * atoi, atoui, atol, atoul, atoll - * (these are all just wrappers around calls to the strto[u]l[l] functions) - * - * - * Author(s): - * Daniel Reinhold (danielre@users.sf.net) + * Copyright 2002-2007, Haiku Inc. All rights reserved. + * Distributed under the terms of the MIT License. * + * Author: + * Daniel Reinhold, danielre@users.sf.net */ + #include int -atoi(const char *num) +atoi(const char* num) { return (int) strtol(num, NULL, 10); } unsigned int -atoui(const char *num) +atoui(const char* num) { return (unsigned int) strtoul(num, NULL, 10); } long -atol(const char *num) +atol(const char* num) { return strtol(num, NULL, 10); } unsigned long -atoul(const char *num) +atoul(const char* num) { return strtoul(num, NULL, 10); } long long int -atoll(const char *num) +atoll(const char* num) { return strtoll(num, NULL, 10); } - diff --git a/src/system/libroot/posix/stdlib/div.c b/src/system/libroot/posix/stdlib/div.c index 2d49b39f46..a9ba10c8dd 100644 --- a/src/system/libroot/posix/stdlib/div.c +++ b/src/system/libroot/posix/stdlib/div.c @@ -1,19 +1,12 @@ /* - * Copyright (c) 2002, OpenBeOS Project. - * All rights reserved. - * Distributed under the terms of the OpenBeOS license. - * - * - * div.c: - * implements the standard C library functions: - * div, ldiv - * - * - * Author(s): - * Daniel Reinhold (danielre@users.sf.net) + * Copyright 2002-2007, Haiku Inc. All rights reserved. + * Distributed under the terms of the MIT License. * + * Author: + * Daniel Reinhold, danielre@users.sf.net */ + #include @@ -25,7 +18,7 @@ div(int numerator, int denominator) val.quot = numerator / denominator; val.rem = numerator - denominator * val.quot; - if ((val.rem > 0) && (val.quot < 0)) { + if (val.rem > 0 && val.quot < 0) { val.rem -= denominator; ++val.quot; } @@ -42,11 +35,10 @@ ldiv(long numerator, long denominator) val.quot = numerator / denominator; val.rem = numerator - denominator * val.quot; - if ((val.rem > 0) && (val.quot < 0)) { + if (val.rem > 0 && val.quot < 0) { val.rem -= denominator; ++val.quot; } return val; } -