Patch by Vasilis Kaoutsis: Style and copyright header cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22671 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
568bb32385
commit
56a63c3b2a
@ -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 <locale.h>
|
||||
#include <limits.h>
|
||||
|
||||
@ -48,10 +41,9 @@ struct lconv _Locale = {
|
||||
|
||||
|
||||
|
||||
struct lconv *
|
||||
struct lconv*
|
||||
localeconv(void)
|
||||
{
|
||||
// return pointer to the current locale
|
||||
return &_Locale;
|
||||
}
|
||||
|
||||
|
@ -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.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -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 <stdlib.h>
|
||||
|
||||
|
||||
@ -36,4 +29,3 @@ llabs(long long i)
|
||||
{
|
||||
return (i < 0) ? -i : i;
|
||||
}
|
||||
|
||||
|
@ -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 <stdlib.h>
|
||||
|
||||
|
||||
double
|
||||
atof(const char *num)
|
||||
atof(const char* num)
|
||||
{
|
||||
return strtod(num, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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 <stdlib.h>
|
||||
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -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 <stdlib.h>
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user