Assume __STDC__, remove non-__STDC__ code.

Submitted by: keramida
This commit is contained in:
Alfred Perlstein 2002-05-28 17:03:12 +00:00
parent 6ba807ae3a
commit a82bbc730e
56 changed files with 42 additions and 610 deletions

View File

@ -96,11 +96,7 @@ static const char rcsid[] =
******************************************************************************/
#include <errno.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <string.h>
#include <termcap.h>
#include <unistd.h>
@ -399,46 +395,25 @@ pch(c)
}
void
#if __STDC__
apr(struct point *ps, const char *fmt, ...)
#else
apr(ps, fmt, va_alist)
struct point *ps;
char *fmt;
va_dcl
#endif
{
struct point p;
va_list ap;
p.line = ps->line+1; p.col = ps->col+1;
move(&p);
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
(void)vsprintf(str, fmt, ap);
va_end(ap);
pstring(str);
}
void
#if __STDC__
pr(const char *fmt, ...)
#else
pr(fmt, va_alist)
char *fmt;
va_dcl
#endif
{
va_list ap;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
(void)vsprintf(str, fmt, ap);
va_end(ap);
pstring(str);

View File

@ -77,12 +77,7 @@ struct sgttyb orig, new;
struct ltchars olttyc, nlttyc;
#endif
struct point *point();
#if __STDC__
void apr(struct point *, const char *, ...) __printflike(2, 3);
void pr(const char *, ...) __printflike(1, 2);
#else
void apr();
void pr();
#endif
#define same(s1, s2) ((s1)->line == (s2)->line && (s1)->col == (s2)->col)

View File

@ -40,13 +40,8 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/sysctl.h>
#if __STDC__
long
gethostid(void)
#else
long
gethostid()
#endif
{
int mib[2];
size_t size;

View File

@ -45,13 +45,7 @@ __FBSDID("$FreeBSD$");
* Backwards-compatible killpg().
*/
int
#if __STDC__
killpg(pid_t pgid, int sig)
#else
killpg(pgid, sig)
pid_t pgid;
int sig;
#endif
{
if (pgid == 1) {
errno = ESRCH;

View File

@ -40,14 +40,8 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/sysctl.h>
#if __STDC__
long
sethostid(long hostid)
#else
long
sethostid(hostid)
long hostid;
#endif
{
int mib[2];

View File

@ -41,12 +41,7 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
int
#if __STDC__
setpgrp(pid_t pid, pid_t pgid)
#else
setpgrp(pid, pgid)
pid_t pid, pgid;
#endif
{
return(setpgid(pid, pgid));
}

View File

@ -40,12 +40,7 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
int
#ifdef __STDC__
setrgid(gid_t rgid)
#else
setrgid(rgid)
int rgid;
#endif
{
return (setregid(rgid, -1));

View File

@ -40,12 +40,7 @@ __FBSDID("$FreeBSD$");
#include <unistd.h>
int
#ifdef __STDC__
setruid(uid_t ruid)
#else
setruid(ruid)
int ruid;
#endif
{
return (setreuid(ruid, -1));

View File

@ -725,27 +725,14 @@ usage()
exit(1);
}
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
void
#if __STDC__
err(const char *fmt, ...)
#else
err(fmt, va_alist)
char *fmt;
va_dcl
#endif
{
va_list ap;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
(void)fprintf(stderr, "dbtest: ");
(void)vfprintf(stderr, fmt, ap);
va_end(ap);

View File

@ -48,34 +48,19 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <paths.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include "un-namespace.h"
extern char **environ;
int
#if __STDC__
execl(const char *name, const char *arg, ...)
#else
execl(name, arg, va_alist)
const char *name;
const char *arg;
va_dcl
#endif
{
va_list ap;
char **argv;
int n;
#if __STDC__
va_start(ap, arg);
#else
va_start(ap);
#endif
n = 1;
while (va_arg(ap, char *) != NULL)
n++;
@ -85,11 +70,7 @@ execl(name, arg, va_alist)
errno = ENOMEM;
return (-1);
}
#if __STDC__
va_start(ap, arg);
#else
va_start(ap);
#endif
n = 1;
argv[0] = (char *)arg;
while ((argv[n] = va_arg(ap, char *)) != NULL)
@ -99,24 +80,13 @@ execl(name, arg, va_alist)
}
int
#if __STDC__
execle(const char *name, const char *arg, ...)
#else
execle(name, arg, va_alist)
const char *name;
const char *arg;
va_dcl
#endif
{
va_list ap;
char **argv, **envp;
int n;
#if __STDC__
va_start(ap, arg);
#else
va_start(ap);
#endif
n = 1;
while (va_arg(ap, char *) != NULL)
n++;
@ -126,11 +96,7 @@ execle(name, arg, va_alist)
errno = ENOMEM;
return (-1);
}
#if __STDC__
va_start(ap, arg);
#else
va_start(ap);
#endif
n = 1;
argv[0] = (char *)arg;
while ((argv[n] = va_arg(ap, char *)) != NULL)
@ -141,25 +107,14 @@ execle(name, arg, va_alist)
}
int
#if __STDC__
execlp(const char *name, const char *arg, ...)
#else
execlp(name, arg, va_alist)
const char *name;
const char *arg;
va_dcl
#endif
{
va_list ap;
int sverrno;
char **argv;
int n;
#if __STDC__
va_start(ap, arg);
#else
va_start(ap);
#endif
n = 1;
while (va_arg(ap, char *) != NULL)
n++;
@ -169,11 +124,7 @@ execlp(name, arg, va_alist)
errno = ENOMEM;
return (-1);
}
#if __STDC__
va_start(ap, arg);
#else
va_start(ap);
#endif
n = 1;
argv[0] = (char *)arg;
while ((argv[n] = va_arg(ap, char *)) != NULL)

View File

@ -40,13 +40,8 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/sysctl.h>
#if __STDC__
int
getosreldate(void)
#else
int
getosreldate()
#endif
{
int mib[2];
size_t size;

View File

@ -4,30 +4,16 @@ __FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <stdlib.h>
#if __STDC__
int semctl(int semid, int semnum, int cmd, ...)
#else
int semctl(semid, semnum, cmd, va_alist)
int semid, semnum;
int cmd;
va_dcl
#endif
{
va_list ap;
union semun semun;
union semun *semun_ptr;
#if __STDC__
va_start(ap, cmd);
#else
va_start(ap);
#endif
if (cmd == IPC_SET || cmd == IPC_STAT || cmd == GETALL
|| cmd == SETVAL || cmd == SETALL) {
semun = va_arg(ap, union semun);

View File

@ -40,15 +40,8 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/sysctl.h>
#if __STDC__
int
sethostname(const char *name, int namelen)
#else
int
sethostname(name, namelen)
char *name;
int namelen;
#endif
{
int mib[2];

View File

@ -54,11 +54,7 @@ __FBSDID("$FreeBSD$");
#include <time.h>
#include <unistd.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include "un-namespace.h"
#include "libc_private.h"
@ -113,22 +109,11 @@ int writehook(cookie, buf, len)
* print message on log file; output is intended for syslogd(8).
*/
void
#if __STDC__
syslog(int pri, const char *fmt, ...)
#else
syslog(pri, fmt, va_alist)
int pri;
char *fmt;
va_dcl
#endif
{
va_list ap;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
vsyslog(pri, fmt, ap);
va_end(ap);
}

View File

@ -83,13 +83,7 @@ tcsetattr(fd, opt, t)
}
int
#if __STDC__
tcsetpgrp(int fd, pid_t pgrp)
#else
tcsetpgrp(fd, pgrp)
int fd;
pid_t pgrp;
#endif
{
int s;

View File

@ -97,11 +97,7 @@ vis(dst, c, flag, nextc)
*dst++ = '\\';
*dst++ = 'b';
goto done;
#if __STDC__
case '\a':
#else
case '\007':
#endif
*dst++ = '\\';
*dst++ = 'a';
goto done;

View File

@ -212,18 +212,8 @@ _nsdbtput(dbt)
int
#if __STDC__
nsdispatch(void *retval, const ns_dtab disp_tab[], const char *database,
const char *method, const ns_src defaults[], ...)
#else
nsdispatch(retval, disp_tab, database, method, defaults, va_alist)
void *retval;
const ns_dtab disp_tab[];
const char *database;
const char *method;
const ns_src defaults[];
va_dcl
#endif
{
va_list ap;
int i, curdisp, result;
@ -250,11 +240,7 @@ nsdispatch(retval, disp_tab, database, method, defaults, va_alist)
break;
result = 0;
if (disp_tab[curdisp].callback) {
#if __STDC__
va_start(ap, defaults);
#else
va_start(ap);
#endif
result = disp_tab[curdisp].callback(retval,
disp_tab[curdisp].cb_data, ap);
va_end(ap);

View File

@ -33,33 +33,18 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include "local.h"
int
#if __STDC__
asprintf(char **str, char const *fmt, ...)
#else
asprintf(str, fmt, va_alist)
char **str;
const char *fmt;
va_dcl
#endif
{
int ret;
va_list ap;
FILE f;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
f._file = -1;
f._flags = __SWR | __SSTR | __SALC;
f._bf._base = f._p = (unsigned char *)malloc(128);

View File

@ -41,30 +41,15 @@ static char sccsid[] = "@(#)fprintf.c 8.1 (Berkeley) 6/4/93";
__FBSDID("$FreeBSD$");
#include <stdio.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
int
#if __STDC__
fprintf(FILE *fp, const char *fmt, ...)
#else
fprintf(fp, fmt, va_alist)
FILE *fp;
char *fmt;
va_dcl
#endif
{
int ret;
va_list ap;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
ret = vfprintf(fp, fmt, ap);
va_end(ap);
return (ret);

View File

@ -42,33 +42,17 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
#include <stdio.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include "un-namespace.h"
#include "libc_private.h"
#if __STDC__
int
fscanf(FILE *fp, char const *fmt, ...) {
int ret;
va_list ap;
va_start(ap, fmt);
#else
int
fscanf(fp, fmt, va_alist)
FILE *fp;
char *fmt;
va_dcl
fscanf(FILE *fp, char const *fmt, ...)
{
int ret;
va_list ap;
va_start(ap);
#endif
va_start(ap, fmt);
FLOCKFILE(fp);
ret = __svfscanf(fp, fmt, ap);
va_end(ap);

View File

@ -49,11 +49,7 @@ FILE *
funopen(cookie, readfn, writefn, seekfn, closefn)
const void *cookie;
int (*readfn)(), (*writefn)();
#if __STDC__
fpos_t (*seekfn)(void *cookie, fpos_t off, int whence);
#else
fpos_t (*seekfn)();
#endif
int (*closefn)();
{
FILE *fp;

View File

@ -50,8 +50,4 @@ struct __suio {
int uio_resid;
};
#if __STDC__ || c_plusplus
extern int __sfvwrite(FILE *, struct __suio *);
#else
extern int __sfvwrite();
#endif

View File

@ -41,29 +41,15 @@ static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 6/4/93";
__FBSDID("$FreeBSD$");
#include <stdio.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
int
#if __STDC__
printf(char const *fmt, ...)
#else
printf(fmt, va_alist)
char *fmt;
va_dcl
#endif
{
int ret;
va_list ap;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
ret = vfprintf(stdout, fmt, ap);
va_end(ap);
return (ret);

View File

@ -42,32 +42,17 @@ __FBSDID("$FreeBSD$");
#include "namespace.h"
#include <stdio.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include "un-namespace.h"
#include "libc_private.h"
#if __STDC__
int
scanf(char const *fmt, ...)
#else
int
scanf(fmt, va_alist)
char *fmt;
va_dcl
#endif
{
int ret;
va_list ap;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
FLOCKFILE(stdin);
ret = __svfscanf(stdin, fmt, ap);
FUNLOCKFILE(stdin);

View File

@ -42,25 +42,12 @@ __FBSDID("$FreeBSD$");
#include <limits.h>
#include <stdio.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include "local.h"
#if __STDC__
int
snprintf(char *str, size_t n, char const *fmt, ...)
#else
int
snprintf(str, n, fmt, va_alist)
char *str;
size_t n;
char *fmt;
va_dcl
#endif
{
size_t on;
int ret;
@ -72,11 +59,7 @@ snprintf(str, n, fmt, va_alist)
n--;
if (n > INT_MAX)
n = INT_MAX;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
f._file = -1;
f._flags = __SWR | __SSTR;
f._bf._base = f._p = (unsigned char *)str;

View File

@ -41,23 +41,12 @@ static char sccsid[] = "@(#)sprintf.c 8.1 (Berkeley) 6/4/93";
__FBSDID("$FreeBSD$");
#include <stdio.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <limits.h>
#include "local.h"
int
#if __STDC__
sprintf(char *str, char const *fmt, ...)
#else
sprintf(str, fmt, va_alist)
char *str;
char *fmt;
va_dcl
#endif
{
int ret;
va_list ap;
@ -67,11 +56,7 @@ sprintf(str, fmt, va_alist)
f._flags = __SWR | __SSTR;
f._bf._base = f._p = (unsigned char *)str;
f._bf._size = f._w = INT_MAX;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
ret = __vfprintf(&f, fmt, ap);
va_end(ap);
*f._p = 0;

View File

@ -42,11 +42,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <string.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include "local.h"
static int eofread(void *, char *, int);
@ -62,16 +58,8 @@ eofread(cookie, buf, len)
return (0);
}
#if __STDC__
int
sscanf(const char *str, char const *fmt, ...)
#else
int
sscanf(str, fmt, va_alist)
char *str;
char *fmt;
va_dcl
#endif
{
int ret;
va_list ap;
@ -87,11 +75,7 @@ sscanf(str, fmt, va_alist)
f._lb._base = NULL;
f._extra = &extra;
INITEXTRA(&f);
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
ret = __svfscanf(&f, fmt, ap);
va_end(ap);
return (ret);

View File

@ -58,11 +58,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include "un-namespace.h"
#include "libc_private.h"

View File

@ -46,11 +46,7 @@ __FBSDID("$FreeBSD$");
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <string.h>
#include "un-namespace.h"

View File

@ -33,11 +33,7 @@ __FBSDID("$FreeBSD$");
#include <errno.h>
#include <limits.h>
#include <locale.h>
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -91,17 +87,8 @@ static void __setup_vars(int, char *, char *, char *, char **);
static int __calc_left_pad(int, char *);
static char *__format_grouped_double(double, int *, int, int, int);
#if __STDC__
ssize_t
strfmon(char *s, size_t maxsize, const char *format, ...)
#else
ssize_t
strfmon(s, maxsize, format, va_alist)
char *s;
size_t maxsize;
const char *format;
va_dcl
#endif
{
va_list ap;
char *dst; /* output destination pointer */
@ -127,11 +114,7 @@ strfmon(s, maxsize, format, va_alist)
char *tmpptr; /* temporary vars */
int *ntmp;
#if __STDC__
va_start(ap, format);
#else
va_start(ap);
#endif
lc = localeconv();
dst = s;

View File

@ -1378,18 +1378,7 @@ strtod
if (e1 > DBL_MAX_10_EXP) {
ovfl:
errno = ERANGE;
#ifdef __STDC__
rv = HUGE_VAL;
#else
/* Can't trust HUGE_VAL */
#ifdef IEEE_Arith
word0(rv) = Exp_mask;
word1(rv) = 0;
#else
word0(rv) = Big0;
word1(rv) = Big1;
#endif
#endif
goto ret;
}
if (e1 >>= 4) {

View File

@ -106,19 +106,6 @@ static char privatehid[] = "@(#)private.h 7.43";
/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
/*
** Workarounds for compilers/systems.
*/
#ifndef P
#ifdef __STDC__
#define P(x) x
#endif /* defined __STDC__ */
#ifndef __STDC__
#define P(x) ()
#endif /* !defined __STDC__ */
#endif /* !defined P */
/*
** SunOS 4.1.1 headers lack FILENAME_MAX.
*/

View File

@ -39,14 +39,7 @@
#define MAXLEN 1000 /* just a guess, only the user knows... */
int
#if __STDC__
ascftime(char *s, const char *format, const struct tm *tmptr)
#else
ascftime(s, format, tmptr)
char *s;
char *format;
struct tm *tmptr;
#endif
{
return strftime(s, MAXLEN, format? format: "%C", tmptr);
}

View File

@ -39,14 +39,7 @@
#define MAXLEN 1000 /* just a guess, only the user knows... */
int
#if __STDC__
cftime(char *s, char *format, const time_t *clock)
#else
cftime(s, format, clock)
char *s;
char *format;
time_t *clock;
#endif
{
return strftime(s, MAXLEN, format? format: "%C", localtime(clock));
}

View File

@ -38,13 +38,7 @@
#include <stdio.h>
int
#if __STDC__
getpw(uid_t uid, char *buf)
#else
getpw(uid, buf)
uid_t uid;
char *buf;
#endif
{
struct passwd *pw;

View File

@ -81,11 +81,7 @@ kvm_geterr(kd)
return (kd->errbuf);
}
#if __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
/*
* Report an error using printf style arguments. "program" is kd->program
@ -94,22 +90,11 @@ kvm_geterr(kd)
* generate tons of error messages when trying to access bogus pointers).
*/
void
#if __STDC__
_kvm_err(kvm_t *kd, const char *program, const char *fmt, ...)
#else
_kvm_err(kd, program, fmt, va_alist)
kvm_t *kd;
char *program, *fmt;
va_dcl
#endif
{
va_list ap;
#ifdef __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
if (program != NULL) {
(void)fprintf(stderr, "%s: ", program);
(void)vfprintf(stderr, fmt, ap);
@ -122,23 +107,12 @@ _kvm_err(kd, program, fmt, va_alist)
}
void
#if __STDC__
_kvm_syserr(kvm_t *kd, const char *program, const char *fmt, ...)
#else
_kvm_syserr(kd, program, fmt, va_alist)
kvm_t *kd;
char *program, *fmt;
va_dcl
#endif
{
va_list ap;
int n;
#if __STDC__
va_start(ap, fmt);
#else
va_start(ap);
#endif
if (program != NULL) {
(void)fprintf(stderr, "%s: ", program);
(void)vfprintf(stderr, fmt, ap);

View File

@ -40,11 +40,7 @@
#if defined(vax)||defined(tahoe)
/* Deal with different ways to concatenate in cpp */
# ifdef __STDC__
# define cat3(a,b,c) a ## b ## c
# else
# define cat3(a,b,c) a/**/b/**/c
# endif
/* Deal with vax/tahoe byte order issues */
# ifdef vax

View File

@ -41,11 +41,7 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double
#else
static double
#endif
one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */
pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */
@ -61,12 +57,8 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
#ifdef __STDC__
double __generic___ieee754_acos(double x)
#else
double __generic___ieee754_acos(x)
double x;
#endif
double
__generic___ieee754_acos(double x)
{
double z,p,q,r,w,s,c,df;
int32_t hx,ix;

View File

@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
one = 1.0000000000e+00, /* 0x3F800000 */
pi = 3.1415925026e+00, /* 0x40490fda */
pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */
@ -40,12 +36,8 @@ qS2 = 2.0209457874e+00, /* 0x4001572d */
qS3 = -6.8828397989e-01, /* 0xbf303361 */
qS4 = 7.7038154006e-02; /* 0x3d9dc62e */
#ifdef __STDC__
float __ieee754_acosf(float x)
#else
float __ieee754_acosf(x)
float x;
#endif
float
__ieee754_acosf(float x)
{
float z,p,q,r,w,s,c,df;
int32_t hx,ix;

View File

@ -31,20 +31,12 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double
#else
static double
#endif
one = 1.0,
ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
#ifdef __STDC__
double __ieee754_acosh(double x)
#else
double __ieee754_acosh(x)
double x;
#endif
double
__ieee754_acosh(double x)
{
double t;
int32_t hx;

View File

@ -20,20 +20,12 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
one = 1.0,
ln2 = 6.9314718246e-01; /* 0x3f317218 */
#ifdef __STDC__
float __ieee754_acoshf(float x)
#else
float __ieee754_acoshf(x)
float x;
#endif
float
__ieee754_acoshf(float x)
{
float t;
int32_t hx;

View File

@ -48,11 +48,7 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double
#else
static double
#endif
one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
huge = 1.000e+300,
pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */
@ -70,12 +66,8 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
#ifdef __STDC__
double __generic___ieee754_asin(double x)
#else
double __generic___ieee754_asin(x)
double x;
#endif
double
__generic___ieee754_asin(double x)
{
double t=0.0,w,p,q,c,r,s;
int32_t hx,ix;

View File

@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
one = 1.0000000000e+00, /* 0x3F800000 */
huge = 1.000e+30,
pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */
@ -42,12 +38,8 @@ qS2 = 2.0209457874e+00, /* 0x4001572d */
qS3 = -6.8828397989e-01, /* 0xbf303361 */
qS4 = 7.7038154006e-02; /* 0x3d9dc62e */
#ifdef __STDC__
float __ieee754_asinf(float x)
#else
float __ieee754_asinf(x)
float x;
#endif
float
__ieee754_asinf(float x)
{
float t=0.0,w,p,q,c,r,s;
int32_t hx,ix;

View File

@ -44,11 +44,7 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double
#else
static double
#endif
tiny = 1.0e-300,
zero = 0.0,
pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */
@ -56,12 +52,8 @@ pi_o_2 = 1.5707963267948965580E+00, /* 0x3FF921FB, 0x54442D18 */
pi = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */
pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
#ifdef __STDC__
double __generic___ieee754_atan2(double y, double x)
#else
double __generic___ieee754_atan2(y,x)
double y,x;
#endif
double
__generic___ieee754_atan2(double y, double x)
{
double z;
int32_t k,m,hx,hy,ix,iy;

View File

@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
tiny = 1.0e-30,
zero = 0.0,
pi_o_4 = 7.8539818525e-01, /* 0x3f490fdb */
@ -32,12 +28,8 @@ pi_o_2 = 1.5707963705e+00, /* 0x3fc90fdb */
pi = 3.1415925026e+00, /* 0x40490fda */
pi_lo = 1.5099578832e-07; /* 0x34222168 */
#ifdef __STDC__
float __ieee754_atan2f(float y, float x)
#else
float __ieee754_atan2f(y,x)
float y,x;
#endif
float
__ieee754_atan2f(float y, float x)
{
float z;
int32_t k,m,hx,hy,ix,iy;

View File

@ -35,24 +35,11 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double one = 1.0, huge = 1e300;
#else
static double one = 1.0, huge = 1e300;
#endif
#ifdef __STDC__
static const double zero = 0.0;
#else
static double zero = 0.0;
#endif
#ifdef __STDC__
double __ieee754_atanh(double x)
#else
double __ieee754_atanh(x)
double x;
#endif
double
__ieee754_atanh(double x)
{
double t;
int32_t hx,ix;

View File

@ -20,24 +20,12 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float one = 1.0, huge = 1e30;
#else
static float one = 1.0, huge = 1e30;
#endif
#ifdef __STDC__
static const float zero = 0.0;
#else
static float zero = 0.0;
#endif
#ifdef __STDC__
float __ieee754_atanhf(float x)
#else
float __ieee754_atanhf(x)
float x;
#endif
float
__ieee754_atanhf(float x)
{
float t;
int32_t hx,ix;

View File

@ -38,18 +38,10 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double one = 1.0, half=0.5, huge = 1.0e300;
#else
static double one = 1.0, half=0.5, huge = 1.0e300;
#endif
#ifdef __STDC__
double __ieee754_cosh(double x)
#else
double __ieee754_cosh(x)
double x;
#endif
double
__ieee754_cosh(double x)
{
double t,w;
int32_t ix;

View File

@ -20,18 +20,10 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float one = 1.0, half=0.5, huge = 1.0e30;
#else
static float one = 1.0, half=0.5, huge = 1.0e30;
#endif
#ifdef __STDC__
float __ieee754_coshf(float x)
#else
float __ieee754_coshf(x)
float x;
#endif
float
__ieee754_coshf(float x)
{
float t,w;
int32_t ix;

View File

@ -80,11 +80,7 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double
#else
static double
#endif
one = 1.0,
halF[2] = {0.5,-0.5,},
huge = 1.0e+300,
@ -103,12 +99,8 @@ P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */
P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
#ifdef __STDC__
double __generic___ieee754_exp(double x) /* default IEEE double exp */
#else
double __generic___ieee754_exp(x) /* default IEEE double exp */
double x;
#endif
double
__generic___ieee754_exp(double x) /* default IEEE double exp */
{
double y,hi=0.0,lo=0.0,c,t;
int32_t k=0,xsb;

View File

@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float
#else
static float
#endif
one = 1.0,
halF[2] = {0.5,-0.5,},
huge = 1.0e+30,
@ -42,12 +38,8 @@ P3 = 6.6137559770e-05, /* 0x388ab355 */
P4 = -1.6533901999e-06, /* 0xb5ddea0e */
P5 = 4.1381369442e-08; /* 0x3331bb4c */
#ifdef __STDC__
float __ieee754_expf(float x) /* default IEEE double exp */
#else
float __ieee754_expf(x) /* default IEEE double exp */
float x;
#endif
float
__ieee754_expf(float x) /* default IEEE double exp */
{
float y,hi=0.0,lo=0.0,c,t;
int32_t k=0,xsb;

View File

@ -23,18 +23,10 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const double one = 1.0, Zero[] = {0.0, -0.0,};
#else
static double one = 1.0, Zero[] = {0.0, -0.0,};
#endif
#ifdef __STDC__
double __generic___ieee754_fmod(double x, double y)
#else
double __generic___ieee754_fmod(x,y)
double x,y ;
#endif
double
__generic___ieee754_fmod(double x, double y)
{
int32_t n,hx,hy,hz,ix,iy,sx,i;
u_int32_t lx,ly,lz;

View File

@ -26,18 +26,10 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
static const float one = 1.0, Zero[] = {0.0, -0.0,};
#else
static float one = 1.0, Zero[] = {0.0, -0.0,};
#endif
#ifdef __STDC__
float __ieee754_fmodf(float x, float y)
#else
float __ieee754_fmodf(x,y)
float x,y ;
#endif
float
__ieee754_fmodf(float x, float y)
{
int32_t n,hx,hy,hz,ix,iy,sx,i;

View File

@ -26,12 +26,8 @@ static char rcsid[] = "$FreeBSD$";
extern int signgam;
#ifdef __STDC__
double __ieee754_gamma(double x)
#else
double __ieee754_gamma(x)
double x;
#endif
double
__ieee754_gamma(double x)
{
return __ieee754_gamma_r(x,&signgam);
}

View File

@ -24,12 +24,8 @@ static char rcsid[] = "$FreeBSD$";
#include "math.h"
#include "math_private.h"
#ifdef __STDC__
double __ieee754_gamma_r(double x, int *signgamp)
#else
double __ieee754_gamma_r(x,signgamp)
double x; int *signgamp;
#endif
double
__ieee754_gamma_r(double x, int *signgamp)
{
return __ieee754_lgamma_r(x,signgamp);
}

View File

@ -28,12 +28,8 @@ static char rcsid[] = "$FreeBSD$";
extern int signgam;
#ifdef __STDC__
float __ieee754_gammaf(float x)
#else
float __ieee754_gammaf(x)
float x;
#endif
float
__ieee754_gammaf(float x)
{
return __ieee754_gammaf_r(x,&signgam);
}