mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-16 06:52:27 +00:00
Assume __STDC__, remove non-__STDC__ code.
Submitted by: keramida
This commit is contained in:
parent
6ba807ae3a
commit
a82bbc730e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=97407
|
@ -96,11 +96,7 @@ static const char rcsid[] =
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <termcap.h>
|
#include <termcap.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -399,46 +395,25 @@ pch(c)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
apr(struct point *ps, const char *fmt, ...)
|
apr(struct point *ps, const char *fmt, ...)
|
||||||
#else
|
|
||||||
apr(ps, fmt, va_alist)
|
|
||||||
struct point *ps;
|
|
||||||
char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
struct point p;
|
struct point p;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
p.line = ps->line+1; p.col = ps->col+1;
|
p.line = ps->line+1; p.col = ps->col+1;
|
||||||
move(&p);
|
move(&p);
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
(void)vsprintf(str, fmt, ap);
|
(void)vsprintf(str, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
pstring(str);
|
pstring(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
pr(const char *fmt, ...)
|
pr(const char *fmt, ...)
|
||||||
#else
|
|
||||||
pr(fmt, va_alist)
|
|
||||||
char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
(void)vsprintf(str, fmt, ap);
|
(void)vsprintf(str, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
pstring(str);
|
pstring(str);
|
||||||
|
|
|
@ -77,12 +77,7 @@ struct sgttyb orig, new;
|
||||||
struct ltchars olttyc, nlttyc;
|
struct ltchars olttyc, nlttyc;
|
||||||
#endif
|
#endif
|
||||||
struct point *point();
|
struct point *point();
|
||||||
#if __STDC__
|
|
||||||
void apr(struct point *, const char *, ...) __printflike(2, 3);
|
void apr(struct point *, const char *, ...) __printflike(2, 3);
|
||||||
void pr(const char *, ...) __printflike(1, 2);
|
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)
|
#define same(s1, s2) ((s1)->line == (s2)->line && (s1)->col == (s2)->col)
|
||||||
|
|
|
@ -40,13 +40,8 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
long
|
long
|
||||||
gethostid(void)
|
gethostid(void)
|
||||||
#else
|
|
||||||
long
|
|
||||||
gethostid()
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int mib[2];
|
int mib[2];
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
|
@ -45,13 +45,7 @@ __FBSDID("$FreeBSD$");
|
||||||
* Backwards-compatible killpg().
|
* Backwards-compatible killpg().
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
killpg(pid_t pgid, int sig)
|
killpg(pid_t pgid, int sig)
|
||||||
#else
|
|
||||||
killpg(pgid, sig)
|
|
||||||
pid_t pgid;
|
|
||||||
int sig;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (pgid == 1) {
|
if (pgid == 1) {
|
||||||
errno = ESRCH;
|
errno = ESRCH;
|
||||||
|
|
|
@ -40,14 +40,8 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
long
|
long
|
||||||
sethostid(long hostid)
|
sethostid(long hostid)
|
||||||
#else
|
|
||||||
long
|
|
||||||
sethostid(hostid)
|
|
||||||
long hostid;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int mib[2];
|
int mib[2];
|
||||||
|
|
||||||
|
|
|
@ -41,12 +41,7 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
setpgrp(pid_t pid, pid_t pgid)
|
setpgrp(pid_t pid, pid_t pgid)
|
||||||
#else
|
|
||||||
setpgrp(pid, pgid)
|
|
||||||
pid_t pid, pgid;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
return(setpgid(pid, pgid));
|
return(setpgid(pid, pgid));
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,12 +40,7 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
#ifdef __STDC__
|
|
||||||
setrgid(gid_t rgid)
|
setrgid(gid_t rgid)
|
||||||
#else
|
|
||||||
setrgid(rgid)
|
|
||||||
int rgid;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
|
|
||||||
return (setregid(rgid, -1));
|
return (setregid(rgid, -1));
|
||||||
|
|
|
@ -40,12 +40,7 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
#ifdef __STDC__
|
|
||||||
setruid(uid_t ruid)
|
setruid(uid_t ruid)
|
||||||
#else
|
|
||||||
setruid(ruid)
|
|
||||||
int ruid;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
|
|
||||||
return (setreuid(ruid, -1));
|
return (setreuid(ruid, -1));
|
||||||
|
|
|
@ -725,27 +725,14 @@ usage()
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
err(const char *fmt, ...)
|
err(const char *fmt, ...)
|
||||||
#else
|
|
||||||
err(fmt, va_alist)
|
|
||||||
char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
(void)fprintf(stderr, "dbtest: ");
|
(void)fprintf(stderr, "dbtest: ");
|
||||||
(void)vfprintf(stderr, fmt, ap);
|
(void)vfprintf(stderr, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
|
@ -48,34 +48,19 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <paths.h>
|
#include <paths.h>
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include "un-namespace.h"
|
#include "un-namespace.h"
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
execl(const char *name, const char *arg, ...)
|
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;
|
va_list ap;
|
||||||
char **argv;
|
char **argv;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, arg);
|
va_start(ap, arg);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
n = 1;
|
n = 1;
|
||||||
while (va_arg(ap, char *) != NULL)
|
while (va_arg(ap, char *) != NULL)
|
||||||
n++;
|
n++;
|
||||||
|
@ -85,11 +70,7 @@ execl(name, arg, va_alist)
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, arg);
|
va_start(ap, arg);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
n = 1;
|
n = 1;
|
||||||
argv[0] = (char *)arg;
|
argv[0] = (char *)arg;
|
||||||
while ((argv[n] = va_arg(ap, char *)) != NULL)
|
while ((argv[n] = va_arg(ap, char *)) != NULL)
|
||||||
|
@ -99,24 +80,13 @@ execl(name, arg, va_alist)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
execle(const char *name, const char *arg, ...)
|
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;
|
va_list ap;
|
||||||
char **argv, **envp;
|
char **argv, **envp;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, arg);
|
va_start(ap, arg);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
n = 1;
|
n = 1;
|
||||||
while (va_arg(ap, char *) != NULL)
|
while (va_arg(ap, char *) != NULL)
|
||||||
n++;
|
n++;
|
||||||
|
@ -126,11 +96,7 @@ execle(name, arg, va_alist)
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, arg);
|
va_start(ap, arg);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
n = 1;
|
n = 1;
|
||||||
argv[0] = (char *)arg;
|
argv[0] = (char *)arg;
|
||||||
while ((argv[n] = va_arg(ap, char *)) != NULL)
|
while ((argv[n] = va_arg(ap, char *)) != NULL)
|
||||||
|
@ -141,25 +107,14 @@ execle(name, arg, va_alist)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
execlp(const char *name, const char *arg, ...)
|
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;
|
va_list ap;
|
||||||
int sverrno;
|
int sverrno;
|
||||||
char **argv;
|
char **argv;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, arg);
|
va_start(ap, arg);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
n = 1;
|
n = 1;
|
||||||
while (va_arg(ap, char *) != NULL)
|
while (va_arg(ap, char *) != NULL)
|
||||||
n++;
|
n++;
|
||||||
|
@ -169,11 +124,7 @@ execlp(name, arg, va_alist)
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, arg);
|
va_start(ap, arg);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
n = 1;
|
n = 1;
|
||||||
argv[0] = (char *)arg;
|
argv[0] = (char *)arg;
|
||||||
while ((argv[n] = va_arg(ap, char *)) != NULL)
|
while ((argv[n] = va_arg(ap, char *)) != NULL)
|
||||||
|
|
|
@ -40,13 +40,8 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
int
|
int
|
||||||
getosreldate(void)
|
getosreldate(void)
|
||||||
#else
|
|
||||||
int
|
|
||||||
getosreldate()
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int mib[2];
|
int mib[2];
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
|
@ -4,30 +4,16 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/sem.h>
|
#include <sys/sem.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
int semctl(int semid, int semnum, int cmd, ...)
|
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;
|
va_list ap;
|
||||||
union semun semun;
|
union semun semun;
|
||||||
union semun *semun_ptr;
|
union semun *semun_ptr;
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, cmd);
|
va_start(ap, cmd);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
if (cmd == IPC_SET || cmd == IPC_STAT || cmd == GETALL
|
if (cmd == IPC_SET || cmd == IPC_STAT || cmd == GETALL
|
||||||
|| cmd == SETVAL || cmd == SETALL) {
|
|| cmd == SETVAL || cmd == SETALL) {
|
||||||
semun = va_arg(ap, union semun);
|
semun = va_arg(ap, union semun);
|
||||||
|
|
|
@ -40,15 +40,8 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/sysctl.h>
|
#include <sys/sysctl.h>
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
int
|
int
|
||||||
sethostname(const char *name, int namelen)
|
sethostname(const char *name, int namelen)
|
||||||
#else
|
|
||||||
int
|
|
||||||
sethostname(name, namelen)
|
|
||||||
char *name;
|
|
||||||
int namelen;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int mib[2];
|
int mib[2];
|
||||||
|
|
||||||
|
|
|
@ -54,11 +54,7 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include "un-namespace.h"
|
#include "un-namespace.h"
|
||||||
|
|
||||||
#include "libc_private.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).
|
* print message on log file; output is intended for syslogd(8).
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
syslog(int pri, const char *fmt, ...)
|
syslog(int pri, const char *fmt, ...)
|
||||||
#else
|
|
||||||
syslog(pri, fmt, va_alist)
|
|
||||||
int pri;
|
|
||||||
char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
vsyslog(pri, fmt, ap);
|
vsyslog(pri, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,13 +83,7 @@ tcsetattr(fd, opt, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
tcsetpgrp(int fd, pid_t pgrp)
|
tcsetpgrp(int fd, pid_t pgrp)
|
||||||
#else
|
|
||||||
tcsetpgrp(fd, pgrp)
|
|
||||||
int fd;
|
|
||||||
pid_t pgrp;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
|
|
|
@ -97,11 +97,7 @@ vis(dst, c, flag, nextc)
|
||||||
*dst++ = '\\';
|
*dst++ = '\\';
|
||||||
*dst++ = 'b';
|
*dst++ = 'b';
|
||||||
goto done;
|
goto done;
|
||||||
#if __STDC__
|
|
||||||
case '\a':
|
case '\a':
|
||||||
#else
|
|
||||||
case '\007':
|
|
||||||
#endif
|
|
||||||
*dst++ = '\\';
|
*dst++ = '\\';
|
||||||
*dst++ = 'a';
|
*dst++ = 'a';
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
@ -212,18 +212,8 @@ _nsdbtput(dbt)
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
nsdispatch(void *retval, const ns_dtab disp_tab[], const char *database,
|
nsdispatch(void *retval, const ns_dtab disp_tab[], const char *database,
|
||||||
const char *method, const ns_src defaults[], ...)
|
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;
|
va_list ap;
|
||||||
int i, curdisp, result;
|
int i, curdisp, result;
|
||||||
|
@ -250,11 +240,7 @@ nsdispatch(retval, disp_tab, database, method, defaults, va_alist)
|
||||||
break;
|
break;
|
||||||
result = 0;
|
result = 0;
|
||||||
if (disp_tab[curdisp].callback) {
|
if (disp_tab[curdisp].callback) {
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, defaults);
|
va_start(ap, defaults);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
result = disp_tab[curdisp].callback(retval,
|
result = disp_tab[curdisp].callback(retval,
|
||||||
disp_tab[curdisp].cb_data, ap);
|
disp_tab[curdisp].cb_data, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
|
@ -33,33 +33,18 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
asprintf(char **str, char const *fmt, ...)
|
asprintf(char **str, char const *fmt, ...)
|
||||||
#else
|
|
||||||
asprintf(str, fmt, va_alist)
|
|
||||||
char **str;
|
|
||||||
const char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
FILE f;
|
FILE f;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
f._file = -1;
|
f._file = -1;
|
||||||
f._flags = __SWR | __SSTR | __SALC;
|
f._flags = __SWR | __SSTR | __SALC;
|
||||||
f._bf._base = f._p = (unsigned char *)malloc(128);
|
f._bf._base = f._p = (unsigned char *)malloc(128);
|
||||||
|
|
|
@ -41,30 +41,15 @@ static char sccsid[] = "@(#)fprintf.c 8.1 (Berkeley) 6/4/93";
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
fprintf(FILE *fp, const char *fmt, ...)
|
fprintf(FILE *fp, const char *fmt, ...)
|
||||||
#else
|
|
||||||
fprintf(fp, fmt, va_alist)
|
|
||||||
FILE *fp;
|
|
||||||
char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
ret = vfprintf(fp, fmt, ap);
|
ret = vfprintf(fp, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|
|
@ -42,33 +42,17 @@ __FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include "un-namespace.h"
|
#include "un-namespace.h"
|
||||||
#include "libc_private.h"
|
#include "libc_private.h"
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
int
|
int
|
||||||
fscanf(FILE *fp, char const *fmt, ...) {
|
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
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap);
|
va_start(ap, fmt);
|
||||||
#endif
|
|
||||||
FLOCKFILE(fp);
|
FLOCKFILE(fp);
|
||||||
ret = __svfscanf(fp, fmt, ap);
|
ret = __svfscanf(fp, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
|
@ -49,11 +49,7 @@ FILE *
|
||||||
funopen(cookie, readfn, writefn, seekfn, closefn)
|
funopen(cookie, readfn, writefn, seekfn, closefn)
|
||||||
const void *cookie;
|
const void *cookie;
|
||||||
int (*readfn)(), (*writefn)();
|
int (*readfn)(), (*writefn)();
|
||||||
#if __STDC__
|
|
||||||
fpos_t (*seekfn)(void *cookie, fpos_t off, int whence);
|
fpos_t (*seekfn)(void *cookie, fpos_t off, int whence);
|
||||||
#else
|
|
||||||
fpos_t (*seekfn)();
|
|
||||||
#endif
|
|
||||||
int (*closefn)();
|
int (*closefn)();
|
||||||
{
|
{
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
|
|
|
@ -50,8 +50,4 @@ struct __suio {
|
||||||
int uio_resid;
|
int uio_resid;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if __STDC__ || c_plusplus
|
|
||||||
extern int __sfvwrite(FILE *, struct __suio *);
|
extern int __sfvwrite(FILE *, struct __suio *);
|
||||||
#else
|
|
||||||
extern int __sfvwrite();
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -41,29 +41,15 @@ static char sccsid[] = "@(#)printf.c 8.1 (Berkeley) 6/4/93";
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
printf(char const *fmt, ...)
|
printf(char const *fmt, ...)
|
||||||
#else
|
|
||||||
printf(fmt, va_alist)
|
|
||||||
char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
ret = vfprintf(stdout, fmt, ap);
|
ret = vfprintf(stdout, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|
|
@ -42,32 +42,17 @@ __FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include "namespace.h"
|
#include "namespace.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include "un-namespace.h"
|
#include "un-namespace.h"
|
||||||
#include "libc_private.h"
|
#include "libc_private.h"
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
int
|
int
|
||||||
scanf(char const *fmt, ...)
|
scanf(char const *fmt, ...)
|
||||||
#else
|
|
||||||
int
|
|
||||||
scanf(fmt, va_alist)
|
|
||||||
char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
FLOCKFILE(stdin);
|
FLOCKFILE(stdin);
|
||||||
ret = __svfscanf(stdin, fmt, ap);
|
ret = __svfscanf(stdin, fmt, ap);
|
||||||
FUNLOCKFILE(stdin);
|
FUNLOCKFILE(stdin);
|
||||||
|
|
|
@ -42,25 +42,12 @@ __FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
int
|
int
|
||||||
snprintf(char *str, size_t n, char const *fmt, ...)
|
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;
|
size_t on;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -72,11 +59,7 @@ snprintf(str, n, fmt, va_alist)
|
||||||
n--;
|
n--;
|
||||||
if (n > INT_MAX)
|
if (n > INT_MAX)
|
||||||
n = INT_MAX;
|
n = INT_MAX;
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
f._file = -1;
|
f._file = -1;
|
||||||
f._flags = __SWR | __SSTR;
|
f._flags = __SWR | __SSTR;
|
||||||
f._bf._base = f._p = (unsigned char *)str;
|
f._bf._base = f._p = (unsigned char *)str;
|
||||||
|
|
|
@ -41,23 +41,12 @@ static char sccsid[] = "@(#)sprintf.c 8.1 (Berkeley) 6/4/93";
|
||||||
__FBSDID("$FreeBSD$");
|
__FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
sprintf(char *str, char const *fmt, ...)
|
sprintf(char *str, char const *fmt, ...)
|
||||||
#else
|
|
||||||
sprintf(str, fmt, va_alist)
|
|
||||||
char *str;
|
|
||||||
char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -67,11 +56,7 @@ sprintf(str, fmt, va_alist)
|
||||||
f._flags = __SWR | __SSTR;
|
f._flags = __SWR | __SSTR;
|
||||||
f._bf._base = f._p = (unsigned char *)str;
|
f._bf._base = f._p = (unsigned char *)str;
|
||||||
f._bf._size = f._w = INT_MAX;
|
f._bf._size = f._w = INT_MAX;
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
ret = __vfprintf(&f, fmt, ap);
|
ret = __vfprintf(&f, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
*f._p = 0;
|
*f._p = 0;
|
||||||
|
|
|
@ -42,11 +42,7 @@ __FBSDID("$FreeBSD$");
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include "local.h"
|
#include "local.h"
|
||||||
|
|
||||||
static int eofread(void *, char *, int);
|
static int eofread(void *, char *, int);
|
||||||
|
@ -62,16 +58,8 @@ eofread(cookie, buf, len)
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
int
|
int
|
||||||
sscanf(const char *str, char const *fmt, ...)
|
sscanf(const char *str, char const *fmt, ...)
|
||||||
#else
|
|
||||||
int
|
|
||||||
sscanf(str, fmt, va_alist)
|
|
||||||
char *str;
|
|
||||||
char *fmt;
|
|
||||||
va_dcl
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -87,11 +75,7 @@ sscanf(str, fmt, va_alist)
|
||||||
f._lb._base = NULL;
|
f._lb._base = NULL;
|
||||||
f._extra = &extra;
|
f._extra = &extra;
|
||||||
INITEXTRA(&f);
|
INITEXTRA(&f);
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
ret = __svfscanf(&f, fmt, ap);
|
ret = __svfscanf(&f, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return (ret);
|
return (ret);
|
||||||
|
|
|
@ -58,11 +58,7 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include "un-namespace.h"
|
#include "un-namespace.h"
|
||||||
|
|
||||||
#include "libc_private.h"
|
#include "libc_private.h"
|
||||||
|
|
|
@ -46,11 +46,7 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "un-namespace.h"
|
#include "un-namespace.h"
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,7 @@ __FBSDID("$FreeBSD$");
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.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 int __calc_left_pad(int, char *);
|
||||||
static char *__format_grouped_double(double, int *, int, int, int);
|
static char *__format_grouped_double(double, int *, int, int, int);
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
ssize_t
|
ssize_t
|
||||||
strfmon(char *s, size_t maxsize, const char *format, ...)
|
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;
|
va_list ap;
|
||||||
char *dst; /* output destination pointer */
|
char *dst; /* output destination pointer */
|
||||||
|
@ -127,11 +114,7 @@ strfmon(s, maxsize, format, va_alist)
|
||||||
char *tmpptr; /* temporary vars */
|
char *tmpptr; /* temporary vars */
|
||||||
int *ntmp;
|
int *ntmp;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, format);
|
va_start(ap, format);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lc = localeconv();
|
lc = localeconv();
|
||||||
dst = s;
|
dst = s;
|
||||||
|
|
|
@ -1378,18 +1378,7 @@ strtod
|
||||||
if (e1 > DBL_MAX_10_EXP) {
|
if (e1 > DBL_MAX_10_EXP) {
|
||||||
ovfl:
|
ovfl:
|
||||||
errno = ERANGE;
|
errno = ERANGE;
|
||||||
#ifdef __STDC__
|
|
||||||
rv = HUGE_VAL;
|
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;
|
goto ret;
|
||||||
}
|
}
|
||||||
if (e1 >>= 4) {
|
if (e1 >>= 4) {
|
||||||
|
|
|
@ -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. */
|
/* Unlike <ctype.h>'s isdigit, this also works if c < 0 | c > UCHAR_MAX. */
|
||||||
#define is_digit(c) ((unsigned)(c) - '0' <= 9)
|
#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.
|
** SunOS 4.1.1 headers lack FILENAME_MAX.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -39,14 +39,7 @@
|
||||||
#define MAXLEN 1000 /* just a guess, only the user knows... */
|
#define MAXLEN 1000 /* just a guess, only the user knows... */
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
ascftime(char *s, const char *format, const struct tm *tmptr)
|
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);
|
return strftime(s, MAXLEN, format? format: "%C", tmptr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,14 +39,7 @@
|
||||||
#define MAXLEN 1000 /* just a guess, only the user knows... */
|
#define MAXLEN 1000 /* just a guess, only the user knows... */
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
cftime(char *s, char *format, const time_t *clock)
|
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));
|
return strftime(s, MAXLEN, format? format: "%C", localtime(clock));
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,13 +38,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int
|
int
|
||||||
#if __STDC__
|
|
||||||
getpw(uid_t uid, char *buf)
|
getpw(uid_t uid, char *buf)
|
||||||
#else
|
|
||||||
getpw(uid, buf)
|
|
||||||
uid_t uid;
|
|
||||||
char *buf;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
|
|
||||||
|
|
|
@ -81,11 +81,7 @@ kvm_geterr(kd)
|
||||||
return (kd->errbuf);
|
return (kd->errbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Report an error using printf style arguments. "program" is kd->program
|
* 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).
|
* generate tons of error messages when trying to access bogus pointers).
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
_kvm_err(kvm_t *kd, const char *program, const char *fmt, ...)
|
_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;
|
va_list ap;
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
if (program != NULL) {
|
if (program != NULL) {
|
||||||
(void)fprintf(stderr, "%s: ", program);
|
(void)fprintf(stderr, "%s: ", program);
|
||||||
(void)vfprintf(stderr, fmt, ap);
|
(void)vfprintf(stderr, fmt, ap);
|
||||||
|
@ -122,23 +107,12 @@ _kvm_err(kd, program, fmt, va_alist)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
#if __STDC__
|
|
||||||
_kvm_syserr(kvm_t *kd, const char *program, const char *fmt, ...)
|
_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;
|
va_list ap;
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
#if __STDC__
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
#else
|
|
||||||
va_start(ap);
|
|
||||||
#endif
|
|
||||||
if (program != NULL) {
|
if (program != NULL) {
|
||||||
(void)fprintf(stderr, "%s: ", program);
|
(void)fprintf(stderr, "%s: ", program);
|
||||||
(void)vfprintf(stderr, fmt, ap);
|
(void)vfprintf(stderr, fmt, ap);
|
||||||
|
|
|
@ -40,11 +40,7 @@
|
||||||
#if defined(vax)||defined(tahoe)
|
#if defined(vax)||defined(tahoe)
|
||||||
|
|
||||||
/* Deal with different ways to concatenate in cpp */
|
/* Deal with different ways to concatenate in cpp */
|
||||||
# ifdef __STDC__
|
|
||||||
# define cat3(a,b,c) a ## b ## c
|
# 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 */
|
/* Deal with vax/tahoe byte order issues */
|
||||||
# ifdef vax
|
# ifdef vax
|
||||||
|
|
|
@ -41,11 +41,7 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const double
|
static const double
|
||||||
#else
|
|
||||||
static double
|
|
||||||
#endif
|
|
||||||
one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
|
one= 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
|
||||||
pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */
|
pi = 3.14159265358979311600e+00, /* 0x400921FB, 0x54442D18 */
|
||||||
pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */
|
pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */
|
||||||
|
@ -61,12 +57,8 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
|
||||||
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
|
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
|
||||||
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
|
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
|
||||||
|
|
||||||
#ifdef __STDC__
|
double
|
||||||
double __generic___ieee754_acos(double x)
|
__generic___ieee754_acos(double x)
|
||||||
#else
|
|
||||||
double __generic___ieee754_acos(x)
|
|
||||||
double x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
double z,p,q,r,w,s,c,df;
|
double z,p,q,r,w,s,c,df;
|
||||||
int32_t hx,ix;
|
int32_t hx,ix;
|
||||||
|
|
|
@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const float
|
static const float
|
||||||
#else
|
|
||||||
static float
|
|
||||||
#endif
|
|
||||||
one = 1.0000000000e+00, /* 0x3F800000 */
|
one = 1.0000000000e+00, /* 0x3F800000 */
|
||||||
pi = 3.1415925026e+00, /* 0x40490fda */
|
pi = 3.1415925026e+00, /* 0x40490fda */
|
||||||
pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */
|
pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */
|
||||||
|
@ -40,12 +36,8 @@ qS2 = 2.0209457874e+00, /* 0x4001572d */
|
||||||
qS3 = -6.8828397989e-01, /* 0xbf303361 */
|
qS3 = -6.8828397989e-01, /* 0xbf303361 */
|
||||||
qS4 = 7.7038154006e-02; /* 0x3d9dc62e */
|
qS4 = 7.7038154006e-02; /* 0x3d9dc62e */
|
||||||
|
|
||||||
#ifdef __STDC__
|
float
|
||||||
float __ieee754_acosf(float x)
|
__ieee754_acosf(float x)
|
||||||
#else
|
|
||||||
float __ieee754_acosf(x)
|
|
||||||
float x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
float z,p,q,r,w,s,c,df;
|
float z,p,q,r,w,s,c,df;
|
||||||
int32_t hx,ix;
|
int32_t hx,ix;
|
||||||
|
|
|
@ -31,20 +31,12 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const double
|
static const double
|
||||||
#else
|
|
||||||
static double
|
|
||||||
#endif
|
|
||||||
one = 1.0,
|
one = 1.0,
|
||||||
ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
|
ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
|
||||||
|
|
||||||
#ifdef __STDC__
|
double
|
||||||
double __ieee754_acosh(double x)
|
__ieee754_acosh(double x)
|
||||||
#else
|
|
||||||
double __ieee754_acosh(x)
|
|
||||||
double x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
double t;
|
double t;
|
||||||
int32_t hx;
|
int32_t hx;
|
||||||
|
|
|
@ -20,20 +20,12 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const float
|
static const float
|
||||||
#else
|
|
||||||
static float
|
|
||||||
#endif
|
|
||||||
one = 1.0,
|
one = 1.0,
|
||||||
ln2 = 6.9314718246e-01; /* 0x3f317218 */
|
ln2 = 6.9314718246e-01; /* 0x3f317218 */
|
||||||
|
|
||||||
#ifdef __STDC__
|
float
|
||||||
float __ieee754_acoshf(float x)
|
__ieee754_acoshf(float x)
|
||||||
#else
|
|
||||||
float __ieee754_acoshf(x)
|
|
||||||
float x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
float t;
|
float t;
|
||||||
int32_t hx;
|
int32_t hx;
|
||||||
|
|
|
@ -48,11 +48,7 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const double
|
static const double
|
||||||
#else
|
|
||||||
static double
|
|
||||||
#endif
|
|
||||||
one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
|
one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
|
||||||
huge = 1.000e+300,
|
huge = 1.000e+300,
|
||||||
pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */
|
pio2_hi = 1.57079632679489655800e+00, /* 0x3FF921FB, 0x54442D18 */
|
||||||
|
@ -70,12 +66,8 @@ qS2 = 2.02094576023350569471e+00, /* 0x40002AE5, 0x9C598AC8 */
|
||||||
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
|
qS3 = -6.88283971605453293030e-01, /* 0xBFE6066C, 0x1B8D0159 */
|
||||||
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
|
qS4 = 7.70381505559019352791e-02; /* 0x3FB3B8C5, 0xB12E9282 */
|
||||||
|
|
||||||
#ifdef __STDC__
|
double
|
||||||
double __generic___ieee754_asin(double x)
|
__generic___ieee754_asin(double x)
|
||||||
#else
|
|
||||||
double __generic___ieee754_asin(x)
|
|
||||||
double x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
double t=0.0,w,p,q,c,r,s;
|
double t=0.0,w,p,q,c,r,s;
|
||||||
int32_t hx,ix;
|
int32_t hx,ix;
|
||||||
|
|
|
@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const float
|
static const float
|
||||||
#else
|
|
||||||
static float
|
|
||||||
#endif
|
|
||||||
one = 1.0000000000e+00, /* 0x3F800000 */
|
one = 1.0000000000e+00, /* 0x3F800000 */
|
||||||
huge = 1.000e+30,
|
huge = 1.000e+30,
|
||||||
pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */
|
pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */
|
||||||
|
@ -42,12 +38,8 @@ qS2 = 2.0209457874e+00, /* 0x4001572d */
|
||||||
qS3 = -6.8828397989e-01, /* 0xbf303361 */
|
qS3 = -6.8828397989e-01, /* 0xbf303361 */
|
||||||
qS4 = 7.7038154006e-02; /* 0x3d9dc62e */
|
qS4 = 7.7038154006e-02; /* 0x3d9dc62e */
|
||||||
|
|
||||||
#ifdef __STDC__
|
float
|
||||||
float __ieee754_asinf(float x)
|
__ieee754_asinf(float x)
|
||||||
#else
|
|
||||||
float __ieee754_asinf(x)
|
|
||||||
float x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
float t=0.0,w,p,q,c,r,s;
|
float t=0.0,w,p,q,c,r,s;
|
||||||
int32_t hx,ix;
|
int32_t hx,ix;
|
||||||
|
|
|
@ -44,11 +44,7 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const double
|
static const double
|
||||||
#else
|
|
||||||
static double
|
|
||||||
#endif
|
|
||||||
tiny = 1.0e-300,
|
tiny = 1.0e-300,
|
||||||
zero = 0.0,
|
zero = 0.0,
|
||||||
pi_o_4 = 7.8539816339744827900E-01, /* 0x3FE921FB, 0x54442D18 */
|
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 = 3.1415926535897931160E+00, /* 0x400921FB, 0x54442D18 */
|
||||||
pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
|
pi_lo = 1.2246467991473531772E-16; /* 0x3CA1A626, 0x33145C07 */
|
||||||
|
|
||||||
#ifdef __STDC__
|
double
|
||||||
double __generic___ieee754_atan2(double y, double x)
|
__generic___ieee754_atan2(double y, double x)
|
||||||
#else
|
|
||||||
double __generic___ieee754_atan2(y,x)
|
|
||||||
double y,x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
double z;
|
double z;
|
||||||
int32_t k,m,hx,hy,ix,iy;
|
int32_t k,m,hx,hy,ix,iy;
|
||||||
|
|
|
@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const float
|
static const float
|
||||||
#else
|
|
||||||
static float
|
|
||||||
#endif
|
|
||||||
tiny = 1.0e-30,
|
tiny = 1.0e-30,
|
||||||
zero = 0.0,
|
zero = 0.0,
|
||||||
pi_o_4 = 7.8539818525e-01, /* 0x3f490fdb */
|
pi_o_4 = 7.8539818525e-01, /* 0x3f490fdb */
|
||||||
|
@ -32,12 +28,8 @@ pi_o_2 = 1.5707963705e+00, /* 0x3fc90fdb */
|
||||||
pi = 3.1415925026e+00, /* 0x40490fda */
|
pi = 3.1415925026e+00, /* 0x40490fda */
|
||||||
pi_lo = 1.5099578832e-07; /* 0x34222168 */
|
pi_lo = 1.5099578832e-07; /* 0x34222168 */
|
||||||
|
|
||||||
#ifdef __STDC__
|
float
|
||||||
float __ieee754_atan2f(float y, float x)
|
__ieee754_atan2f(float y, float x)
|
||||||
#else
|
|
||||||
float __ieee754_atan2f(y,x)
|
|
||||||
float y,x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
float z;
|
float z;
|
||||||
int32_t k,m,hx,hy,ix,iy;
|
int32_t k,m,hx,hy,ix,iy;
|
||||||
|
|
|
@ -35,24 +35,11 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const double one = 1.0, huge = 1e300;
|
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;
|
static const double zero = 0.0;
|
||||||
#else
|
|
||||||
static double zero = 0.0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __STDC__
|
double
|
||||||
double __ieee754_atanh(double x)
|
__ieee754_atanh(double x)
|
||||||
#else
|
|
||||||
double __ieee754_atanh(x)
|
|
||||||
double x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
double t;
|
double t;
|
||||||
int32_t hx,ix;
|
int32_t hx,ix;
|
||||||
|
|
|
@ -20,24 +20,12 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const float one = 1.0, huge = 1e30;
|
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;
|
static const float zero = 0.0;
|
||||||
#else
|
|
||||||
static float zero = 0.0;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __STDC__
|
float
|
||||||
float __ieee754_atanhf(float x)
|
__ieee754_atanhf(float x)
|
||||||
#else
|
|
||||||
float __ieee754_atanhf(x)
|
|
||||||
float x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
float t;
|
float t;
|
||||||
int32_t hx,ix;
|
int32_t hx,ix;
|
||||||
|
|
|
@ -38,18 +38,10 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const double one = 1.0, half=0.5, huge = 1.0e300;
|
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
|
||||||
double __ieee754_cosh(double x)
|
__ieee754_cosh(double x)
|
||||||
#else
|
|
||||||
double __ieee754_cosh(x)
|
|
||||||
double x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
double t,w;
|
double t,w;
|
||||||
int32_t ix;
|
int32_t ix;
|
||||||
|
|
|
@ -20,18 +20,10 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const float one = 1.0, half=0.5, huge = 1.0e30;
|
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
|
||||||
float __ieee754_coshf(float x)
|
__ieee754_coshf(float x)
|
||||||
#else
|
|
||||||
float __ieee754_coshf(x)
|
|
||||||
float x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
float t,w;
|
float t,w;
|
||||||
int32_t ix;
|
int32_t ix;
|
||||||
|
|
|
@ -80,11 +80,7 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const double
|
static const double
|
||||||
#else
|
|
||||||
static double
|
|
||||||
#endif
|
|
||||||
one = 1.0,
|
one = 1.0,
|
||||||
halF[2] = {0.5,-0.5,},
|
halF[2] = {0.5,-0.5,},
|
||||||
huge = 1.0e+300,
|
huge = 1.0e+300,
|
||||||
|
@ -103,12 +99,8 @@ P4 = -1.65339022054652515390e-06, /* 0xBEBBBD41, 0xC5D26BF1 */
|
||||||
P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
|
P5 = 4.13813679705723846039e-08; /* 0x3E663769, 0x72BEA4D0 */
|
||||||
|
|
||||||
|
|
||||||
#ifdef __STDC__
|
double
|
||||||
double __generic___ieee754_exp(double x) /* default IEEE double exp */
|
__generic___ieee754_exp(double x) /* default IEEE double exp */
|
||||||
#else
|
|
||||||
double __generic___ieee754_exp(x) /* default IEEE double exp */
|
|
||||||
double x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
double y,hi=0.0,lo=0.0,c,t;
|
double y,hi=0.0,lo=0.0,c,t;
|
||||||
int32_t k=0,xsb;
|
int32_t k=0,xsb;
|
||||||
|
|
|
@ -20,11 +20,7 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const float
|
static const float
|
||||||
#else
|
|
||||||
static float
|
|
||||||
#endif
|
|
||||||
one = 1.0,
|
one = 1.0,
|
||||||
halF[2] = {0.5,-0.5,},
|
halF[2] = {0.5,-0.5,},
|
||||||
huge = 1.0e+30,
|
huge = 1.0e+30,
|
||||||
|
@ -42,12 +38,8 @@ P3 = 6.6137559770e-05, /* 0x388ab355 */
|
||||||
P4 = -1.6533901999e-06, /* 0xb5ddea0e */
|
P4 = -1.6533901999e-06, /* 0xb5ddea0e */
|
||||||
P5 = 4.1381369442e-08; /* 0x3331bb4c */
|
P5 = 4.1381369442e-08; /* 0x3331bb4c */
|
||||||
|
|
||||||
#ifdef __STDC__
|
float
|
||||||
float __ieee754_expf(float x) /* default IEEE double exp */
|
__ieee754_expf(float x) /* default IEEE double exp */
|
||||||
#else
|
|
||||||
float __ieee754_expf(x) /* default IEEE double exp */
|
|
||||||
float x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
float y,hi=0.0,lo=0.0,c,t;
|
float y,hi=0.0,lo=0.0,c,t;
|
||||||
int32_t k=0,xsb;
|
int32_t k=0,xsb;
|
||||||
|
|
|
@ -23,18 +23,10 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const double one = 1.0, Zero[] = {0.0, -0.0,};
|
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
|
||||||
double __generic___ieee754_fmod(double x, double y)
|
__generic___ieee754_fmod(double x, double y)
|
||||||
#else
|
|
||||||
double __generic___ieee754_fmod(x,y)
|
|
||||||
double x,y ;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int32_t n,hx,hy,hz,ix,iy,sx,i;
|
int32_t n,hx,hy,hz,ix,iy,sx,i;
|
||||||
u_int32_t lx,ly,lz;
|
u_int32_t lx,ly,lz;
|
||||||
|
|
|
@ -26,18 +26,10 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
|
||||||
static const float one = 1.0, Zero[] = {0.0, -0.0,};
|
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
|
||||||
float __ieee754_fmodf(float x, float y)
|
__ieee754_fmodf(float x, float y)
|
||||||
#else
|
|
||||||
float __ieee754_fmodf(x,y)
|
|
||||||
float x,y ;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
int32_t n,hx,hy,hz,ix,iy,sx,i;
|
int32_t n,hx,hy,hz,ix,iy,sx,i;
|
||||||
|
|
||||||
|
|
|
@ -26,12 +26,8 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
|
|
||||||
extern int signgam;
|
extern int signgam;
|
||||||
|
|
||||||
#ifdef __STDC__
|
double
|
||||||
double __ieee754_gamma(double x)
|
__ieee754_gamma(double x)
|
||||||
#else
|
|
||||||
double __ieee754_gamma(x)
|
|
||||||
double x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
return __ieee754_gamma_r(x,&signgam);
|
return __ieee754_gamma_r(x,&signgam);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,12 +24,8 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include "math_private.h"
|
#include "math_private.h"
|
||||||
|
|
||||||
#ifdef __STDC__
|
double
|
||||||
double __ieee754_gamma_r(double x, int *signgamp)
|
__ieee754_gamma_r(double x, int *signgamp)
|
||||||
#else
|
|
||||||
double __ieee754_gamma_r(x,signgamp)
|
|
||||||
double x; int *signgamp;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
return __ieee754_lgamma_r(x,signgamp);
|
return __ieee754_lgamma_r(x,signgamp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,12 +28,8 @@ static char rcsid[] = "$FreeBSD$";
|
||||||
|
|
||||||
extern int signgam;
|
extern int signgam;
|
||||||
|
|
||||||
#ifdef __STDC__
|
float
|
||||||
float __ieee754_gammaf(float x)
|
__ieee754_gammaf(float x)
|
||||||
#else
|
|
||||||
float __ieee754_gammaf(x)
|
|
||||||
float x;
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
return __ieee754_gammaf_r(x,&signgam);
|
return __ieee754_gammaf_r(x,&signgam);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue