ansification: remove _DEFUN

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This commit is contained in:
Yaakov Selkowitz 2017-12-03 21:43:30 -06:00
parent 44276afe2a
commit 9087163804
729 changed files with 1338 additions and 2605 deletions

View File

@ -17,8 +17,7 @@
#include <_ansi.h> #include <_ansi.h>
void void
_DEFUN (_exit, (rc), _exit (int rc)
int rc)
{ {
while (1) while (1)
asm volatile ("EXCPT 0;"); asm volatile ("EXCPT 0;");

View File

@ -18,8 +18,7 @@
* close -- We don't need to do anything, but pretend we did. * close -- We don't need to do anything, but pretend we did.
*/ */
int int
_DEFUN (close ,(fd), close (int fd)
int fd)
{ {
return (0); return (0);
} }

View File

@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error. * fstat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (_fstat, (fd, buf), _fstat (int fd,
int fd,
struct stat *buf) struct stat *buf)
{ {
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ buf->st_mode = S_IFCHR; /* Always pretend to be a tty */

View File

@ -19,8 +19,7 @@
* getpid -- only one process, so just return 1. * getpid -- only one process, so just return 1.
*/ */
int int
_DEFUN (_getpid, (), _getpid (void)
)
{ {
return __MYPID; return __MYPID;
} }

View File

@ -20,8 +20,7 @@
* serial port, we'll say yes and return a 1. * serial port, we'll say yes and return a 1.
*/ */
int int
_DEFUN (_isatty, (fd), _isatty (int fd)
int fd)
{ {
return (1); return (1);
} }

View File

@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__));
* kill -- go out via exit... * kill -- go out via exit...
*/ */
int int
_DEFUN (_kill, (pid, sig), _kill (int pid,
int pid,
int sig) int sig)
{ {
if(pid == __MYPID) if(pid == __MYPID)

View File

@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex * putnum -- print a 32 bit number in hex
*/ */
void void
_DEFUN (putnum, (num), putnum (unsigned int num)
unsigned int num)
{ {
char buf[9]; char buf[9];
int cnt; int cnt;

View File

@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error. * stat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (_stat, (path, buf), _stat (const char *path,
const char *path,
struct stat *buf) struct stat *buf)
{ {
errno = EIO; errno = EIO;

View File

@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error. * fstat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (fstat, (fd, buf), fstat (int fd,
int fd,
struct stat *buf) struct stat *buf)
{ {
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ buf->st_mode = S_IFCHR; /* Always pretend to be a tty */

View File

@ -19,8 +19,7 @@
* getpid -- only one process, so just return 1. * getpid -- only one process, so just return 1.
*/ */
int int
_DEFUN (getpid, (), getpid (void)
)
{ {
return __MYPID; return __MYPID;
} }

View File

@ -20,8 +20,7 @@
* serial port, we'll say yes and return a 1. * serial port, we'll say yes and return a 1.
*/ */
int int
_DEFUN (isatty, (fd), isatty (int fd)
int fd)
{ {
return (1); return (1);
} }

View File

@ -19,8 +19,7 @@
* kill -- go out via exit... * kill -- go out via exit...
*/ */
int int
_DEFUN (kill, (pid, sig), kill (int pid,
int pid,
int sig) int sig)
{ {
if(pid == __MYPID) if(pid == __MYPID)

View File

@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex * putnum -- print a 32 bit number in hex
*/ */
void void
_DEFUN (putnum, (num), putnum (unsigned int num)
unsigned int num)
{ {
char buf[9]; char buf[9];
int cnt; int cnt;

View File

@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error. * stat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (stat, (path, buf), stat (const char *path,
const char *path,
struct stat *buf) struct stat *buf)
{ {
errno = EIO; errno = EIO;

View File

@ -20,7 +20,7 @@
#include <errno.h> #include <errno.h>
int int
_DEFUN(_isatty, (fd), int fd) _isatty (int fd)
{ {
struct stat buf; struct stat buf;

View File

@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error. * fstat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (_fstat, (fd, buf), _fstat (int fd,
int fd,
struct stat *buf) struct stat *buf)
{ {
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ buf->st_mode = S_IFCHR; /* Always pretend to be a tty */

View File

@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1. * getpid -- only one process, so just return 1.
*/ */
int int
_DEFUN (_getpid, (), _getpid (void)
)
{ {
return __MYPID; return __MYPID;
} }

View File

@ -20,8 +20,7 @@
* serial port, we'll say yes and return a 1. * serial port, we'll say yes and return a 1.
*/ */
int int
_DEFUN (_isatty, (fd), _isatty (int fd)
int fd)
{ {
return (1); return (1);
} }

View File

@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__));
* kill -- go out via exit... * kill -- go out via exit...
*/ */
int int
_DEFUN (_kill, (pid, sig), _kill (int pid,
int pid,
int sig) int sig)
{ {
if(pid == __MYPID) if(pid == __MYPID)

View File

@ -18,8 +18,7 @@
* print -- do a raw print of a string * print -- do a raw print of a string
*/ */
void void
_DEFUN (_print, (ptr), _print (char *ptr)
char *ptr)
{ {
while (*ptr) { while (*ptr) {
outbyte (*ptr++); outbyte (*ptr++);

View File

@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex * putnum -- print a 32 bit number in hex
*/ */
void void
_DEFUN (_putnum, (num), _putnum (unsigned int num)
unsigned int num)
{ {
char buf[9]; char buf[9];
int cnt; int cnt;

View File

@ -38,8 +38,7 @@ extern time_t _sim_time (void) __asm__("_sim_time");
* time -- return current time in seconds. * time -- return current time in seconds.
*/ */
time_t time_t
_DEFUN (time, time (t), time (time_t *t)
time_t *t)
{ {
time_t ret = _sim_time (); time_t ret = _sim_time ();
@ -53,8 +52,7 @@ _DEFUN (time, time (t),
* _times -- no clock, so return an error. * _times -- no clock, so return an error.
*/ */
int int
_DEFUN (_times, _times (buf), _times (struct tms *buf)
struct tms *buf)
{ {
errno = EINVAL; errno = EINVAL;
return (-1); return (-1);
@ -65,8 +63,7 @@ _DEFUN (_times, _times (buf),
* microseconds. * microseconds.
*/ */
int int
_DEFUN (_gettimeofday, _gettimeofday (tv, tz), _gettimeofday (struct timeval *tv,
struct timeval *tv,
void *tzvp) void *tzvp)
{ {
struct timezone *tz = tzvp; struct timezone *tz = tzvp;

View File

@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error. * stat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (_stat, (path, buf), _stat (const char *path,
const char *path,
struct stat *buf) struct stat *buf)
{ {
errno = EIO; errno = EIO;

View File

@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error. * fstat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (fstat, (fd, buf), fstat (int fd,
int fd,
struct stat *buf) struct stat *buf)
{ {
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ buf->st_mode = S_IFCHR; /* Always pretend to be a tty */

View File

@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error. * fstat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (_fstat, (fd, buf), _fstat (int fd,
int fd,
struct stat *buf) struct stat *buf)
{ {
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ buf->st_mode = S_IFCHR; /* Always pretend to be a tty */

View File

@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1. * getpid -- only one process, so just return 1.
*/ */
int int
_DEFUN (_getpid, (), _getpid (void)
)
{ {
return __MYPID; return __MYPID;
} }

View File

@ -20,8 +20,7 @@
* serial port, we'll say yes and return a 1. * serial port, we'll say yes and return a 1.
*/ */
int int
_DEFUN (_isatty, (fd), _isatty (int fd)
int fd)
{ {
return (1); return (1);
} }

View File

@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__));
* kill -- go out via exit... * kill -- go out via exit...
*/ */
int int
_DEFUN (_kill, (pid, sig), _kill (int pid,
int pid,
int sig) int sig)
{ {
if(pid == __MYPID) if(pid == __MYPID)

View File

@ -22,8 +22,7 @@
* an error. * an error.
*/ */
off_t off_t
_DEFUN (_lseek, (fd, offset, whence), _lseek (int fd,
int fd,
off_t offset, off_t offset,
int whence) int whence)
{ {

View File

@ -22,8 +22,7 @@
* an error. * an error.
*/ */
off_t off_t
_DEFUN (_lseek, (fd, offset, whence), _lseek (int fd,
int fd,
off_t offset, off_t offset,
int whence) int whence)
{ {

View File

@ -21,8 +21,7 @@
* _times -- no clock, so return an error. * _times -- no clock, so return an error.
*/ */
int int
_DEFUN (_times, _times (buf), _times (struct tms *buf)
struct tms *buf)
{ {
errno = EINVAL; errno = EINVAL;
return (-1); return (-1);
@ -33,8 +32,7 @@ _DEFUN (_times, _times (buf),
* microseconds. * microseconds.
*/ */
int int
_DEFUN (_gettimeofday, _gettimeofday (tv, tz), _gettimeofday (struct timeval *tv,
struct timeval *tv,
void *tzvp) void *tzvp)
{ {
struct timezone *tz = tzvp; struct timezone *tz = tzvp;

View File

@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error. * stat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (_stat, (path, buf), _stat (const char *path,
const char *path,
struct stat *buf) struct stat *buf)
{ {
errno = EIO; errno = EIO;

View File

@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1. * getpid -- only one process, so just return 1.
*/ */
int int
_DEFUN (getpid, (), getpid (void)
)
{ {
return __MYPID; return __MYPID;
} }

View File

@ -20,8 +20,7 @@
* serial port, we'll say yes, return a 1. * serial port, we'll say yes, return a 1.
*/ */
int int
_DEFUN (isatty, (fd), isatty (int fd)
int fd)
{ {
return (1); return (1);
} }

View File

@ -18,8 +18,7 @@
* kill -- go out via exit... * kill -- go out via exit...
*/ */
int int
_DEFUN (kill, (pid, sig), kill (int pid,
int pid,
int sig) int sig)
{ {
if(pid == __MYPID) if(pid == __MYPID)

View File

@ -6,8 +6,7 @@
#include <_syslist.h> #include <_syslist.h>
void void
_DEFUN (_exit, (rc), _exit (int rc)
int rc)
{ {
/* Default stub just causes a divide by 0 exception. */ /* Default stub just causes a divide by 0 exception. */
int x = rc / INT_MAX; int x = rc / INT_MAX;

View File

@ -12,8 +12,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_chown, (path, owner, group), _chown (const char *path,
const char *path,
uid_t owner, uid_t owner,
gid_t group) gid_t group)
{ {

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_close, (fildes), _close (int fildes)
int fildes)
{ {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_execve, (name, argv, env), _execve (char *name,
char *name,
char **argv, char **argv,
char **env) char **env)
{ {

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_fork, (), _fork (void)
void)
{ {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;

View File

@ -13,8 +13,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_fstat, (fildes, st), _fstat (int fildes,
int fildes,
struct stat *st) struct stat *st)
{ {
errno = ENOSYS; errno = ENOSYS;

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_getpid, (), _getpid (void)
void)
{ {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;

View File

@ -15,8 +15,7 @@ extern int errno;
struct timeval; struct timeval;
int int
_DEFUN (_gettimeofday, (ptimeval, ptimezone), _gettimeofday (struct timeval *ptimeval,
struct timeval *ptimeval,
void *ptimezone) void *ptimezone)
{ {
errno = ENOSYS; errno = ENOSYS;

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_isatty, (file), _isatty (int file)
int file)
{ {
errno = ENOSYS; errno = ENOSYS;
return 0; return 0;

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_kill, (pid, sig), _kill (int pid,
int pid,
int sig) int sig)
{ {
errno = ENOSYS; errno = ENOSYS;

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_link, (existing, new), _link (char *existing,
char *existing,
char *new) char *new)
{ {
errno = ENOSYS; errno = ENOSYS;

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_lseek, (file, ptr, dir), _lseek (int file,
int file,
int ptr, int ptr,
int dir) int dir)
{ {

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_open, (file, flags, mode), _open (char *file,
char *file,
int flags, int flags,
int mode) int mode)
{ {

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_read, (file, ptr, len), _read (int file,
int file,
char *ptr, char *ptr,
int len) int len)
{ {

View File

@ -12,8 +12,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_readlink, (path, buf, bufsize), _readlink (const char *path,
const char *path,
char *buf, char *buf,
size_t bufsize) size_t bufsize)
{ {

View File

@ -13,8 +13,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_stat, (file, st), _stat (const char *file,
const char *file,
struct stat *st) struct stat *st)
{ {
errno = ENOSYS; errno = ENOSYS;

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_symlink, (path1, path2), _symlink (const char *path1,
const char *path1,
const char *path2) const char *path2)
{ {
errno = ENOSYS; errno = ENOSYS;

View File

@ -12,8 +12,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
clock_t clock_t
_DEFUN (_times, (buf), _times (struct tms *buf)
struct tms *buf)
{ {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_unlink, (name), _unlink (char *name)
char *name)
{ {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_wait, (status), _wait (int *status)
int *status)
{ {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;

View File

@ -11,8 +11,7 @@ extern int errno;
#include "warning.h" #include "warning.h"
int int
_DEFUN (_write, (file, ptr, len), _write (int file,
int file,
char *ptr, char *ptr,
int len) int len)
{ {

View File

@ -33,8 +33,7 @@
* other files are not. * other files are not.
*/ */
int int
_DEFUN (_isatty, (fd), _isatty (int fd)
int fd)
{ {
if ((fd == 0) || (fd == 1) || (fd == 2)) if ((fd == 0) || (fd == 1) || (fd == 2))
return 1; return 1;

View File

@ -20,8 +20,7 @@
* lseek -- Since a serial port is non-seekable, we return an error. * lseek -- Since a serial port is non-seekable, we return an error.
*/ */
off_t off_t
_DEFUN (lseek, (fd, offset, whence), lseek (int fd,
int fd,
off_t offset, off_t offset,
int whence) int whence)
{ {

View File

@ -32,8 +32,7 @@
* to channel A. * to channel A.
*/ */
static void static void
_DEFUN (raw_outbyte, (byte), raw_outbyte (char byte)
char byte)
{ {
/* First, wait for the UART to finish clocking out the last /* First, wait for the UART to finish clocking out the last
character we sent, if any. Then, give it the next character to character we sent, if any. Then, give it the next character to
@ -64,8 +63,7 @@ _DEFUN (raw_outbyte, (byte),
* latter we put in libidp.a, which is selected by idp.ld. * latter we put in libidp.a, which is selected by idp.ld.
*/ */
void void
_DEFUN (outbyte, (byte), outbyte (char byte)
char byte)
{ {
#ifdef GDB_MONITOR_OUTPUT #ifdef GDB_MONITOR_OUTPUT
raw_outbyte (0x0f); raw_outbyte (0x0f);

View File

@ -25,8 +25,7 @@
* prompt. It can be restarted from there. * prompt. It can be restarted from there.
*/ */
void void
_DEFUN (_exit, (status), _exit (int_status)
int_status)
{ {
/* Use `i' constraint to get proper immediate-operand syntax for /* Use `i' constraint to get proper immediate-operand syntax for
target assembler configuration. */ target assembler configuration. */
@ -38,8 +37,7 @@ _DEFUN (_exit, (status),
* use the timer, but I'm waiting for docs. (sigh) * use the timer, but I'm waiting for docs. (sigh)
*/ */
void void
_DEFUN (delay, (num), delay (int num)
int num)
{ {
while (num--) while (num--)
{ {

View File

@ -18,8 +18,7 @@
* close -- We don't need to do anything, but pretend we did. * close -- We don't need to do anything, but pretend we did.
*/ */
int int
_DEFUN (_close ,(fd), _close (int fd)
int fd)
{ {
return (0); return (0);
} }

View File

@ -18,8 +18,7 @@
* _exit -- Just cause a breakpoint so user can see why we exited. * _exit -- Just cause a breakpoint so user can see why we exited.
*/ */
void void
_DEFUN (_exit, (val), _exit (int val)
int val)
{ {
while (1) { while (1) {
asm("bkpt"); asm("bkpt");

View File

@ -15,8 +15,7 @@
#include <_ansi.h> #include <_ansi.h>
int int
_DEFUN (inbyte, (), inbyte (void)
void)
{ {
return -1; return -1;

View File

@ -33,8 +33,7 @@
* outbyte -- send a byte to the UART. * outbyte -- send a byte to the UART.
*/ */
void void
_DEFUN (outbyte, (ch), outbyte (char ch)
char ch)
{ {
while (!(*SRREG & TRDY)) while (!(*SRREG & TRDY))
; ;

View File

@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error. * fstat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (_fstat, (fd, buf), _fstat (int fd,
int fd,
struct stat *buf) struct stat *buf)
{ {
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ buf->st_mode = S_IFCHR; /* Always pretend to be a tty */

View File

@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1. * getpid -- only one process, so just return 1.
*/ */
int int
_DEFUN (_getpid, (), _getpid (void)
)
{ {
return __MYPID; return __MYPID;
} }

View File

@ -18,8 +18,7 @@
* kill -- go out via exit... * kill -- go out via exit...
*/ */
int int
_DEFUN (_kill, (pid, sig), _kill (int pid,
int pid,
int sig) int sig)
{ {
if(pid == __MYPID) if(pid == __MYPID)

View File

@ -20,8 +20,7 @@
* lseek -- Since a serial port is non-seekable, we return an error. * lseek -- Since a serial port is non-seekable, we return an error.
*/ */
off_t off_t
_DEFUN (_lseek, (fd, offset, whence), _lseek (int fd,
int fd,
off_t offset, off_t offset,
int whence) int whence)
{ {

View File

@ -20,8 +20,7 @@
* we return an error. * we return an error.
*/ */
int int
_DEFUN (_open, (buf, flags, mode), _open (const char *buf,
const char *buf,
int flags, int flags,
int mode) int mode)
{ {

View File

@ -18,8 +18,7 @@
* print -- do a raw print of a string * print -- do a raw print of a string
*/ */
void void
_DEFUN (_print, (ptr), _print (char *ptr)
char *ptr)
{ {
while (*ptr) { while (*ptr) {
outbyte (*ptr++); outbyte (*ptr++);

View File

@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex * putnum -- print a 32 bit number in hex
*/ */
void void
_DEFUN (_putnum, (num), _putnum (unsigned int num)
unsigned int num)
{ {
char buf[9]; char buf[9];
int cnt; int cnt;

View File

@ -15,8 +15,7 @@
#include "glue.h" #include "glue.h"
int int
_DEFUN (_raise, (sig), _raise (int sig)
int sig)
{ {
return _kill (_getpid (), sig); return _kill (_getpid (), sig);
} }

View File

@ -21,8 +21,7 @@ extern char inbyte (void);
* we only have stdin. * we only have stdin.
*/ */
int int
_DEFUN (_read, (fd, buf, nbytes), _read (int fd,
int fd,
char *buf, char *buf,
int nbytes) int nbytes)
{ {

View File

@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error. * stat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (_stat, (path, buf), _stat (const char *path,
const char *path,
struct stat *buf) struct stat *buf)
{ {
errno = EIO; errno = EIO;

View File

@ -20,8 +20,7 @@
* we just return an error. * we just return an error.
*/ */
int int
_DEFUN (_unlink, (path), _unlink (char * path)
char * path)
{ {
errno = EIO; errno = EIO;
return (-1); return (-1);

View File

@ -22,8 +22,7 @@ extern int _EXFUN (outbyte, (char x));
* open will only return an error. * open will only return an error.
*/ */
int int
_DEFUN (_write, (fd, buf, nbytes), _write (int fd,
int fd,
char *buf, char *buf,
int nbytes) int nbytes)
{ {

View File

@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error. * fstat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (_fstat, (fd, buf), _fstat (int fd,
int fd,
struct stat *buf) struct stat *buf)
{ {
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ buf->st_mode = S_IFCHR; /* Always pretend to be a tty */

View File

@ -18,8 +18,7 @@
* getpid -- only one process, so just return 1. * getpid -- only one process, so just return 1.
*/ */
int int
_DEFUN (_getpid, (), _getpid (void)
)
{ {
return __MYPID; return __MYPID;
} }

View File

@ -20,8 +20,7 @@
* serial port, we'll say yes and return a 1. * serial port, we'll say yes and return a 1.
*/ */
int int
_DEFUN (_isatty, (fd), _isatty (int fd)
int fd)
{ {
return (1); return (1);
} }

View File

@ -20,8 +20,7 @@ extern void _exit (int) __attribute__((__noreturn__));
* kill -- go out via exit... * kill -- go out via exit...
*/ */
int int
_DEFUN (_kill, (pid, sig), _kill (int pid,
int pid,
int sig) int sig)
{ {
if(pid == __MYPID) if(pid == __MYPID)

View File

@ -18,8 +18,7 @@
* print -- do a raw print of a string * print -- do a raw print of a string
*/ */
void void
_DEFUN (_print, (ptr), _print (char *ptr)
char *ptr)
{ {
while (*ptr) { while (*ptr) {
outbyte (*ptr++); outbyte (*ptr++);

View File

@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex * putnum -- print a 32 bit number in hex
*/ */
void void
_DEFUN (_putnum, (num), _putnum (unsigned int num)
unsigned int num)
{ {
char buf[9]; char buf[9];
int cnt; int cnt;

View File

@ -40,8 +40,7 @@
* _times -- FIXME * _times -- FIXME
*/ */
int int
_DEFUN (_times, _times (buf), _times (struct tms *buf)
struct tms *buf)
{ {
errno = EINVAL; errno = EINVAL;
return (-1); return (-1);
@ -70,8 +69,7 @@ rtc_write (unsigned char reg, unsigned char val)
* time -- return current time in seconds. * time -- return current time in seconds.
*/ */
time_t time_t
_DEFUN (time, time (t), time (time_t *t)
time_t *t)
{ {
struct tm tm; struct tm tm;
time_t ret; time_t ret;
@ -100,8 +98,7 @@ _DEFUN (time, time (t),
* return the microseconds. * return the microseconds.
*/ */
int int
_DEFUN (_gettimeofday, _gettimeofday (tv, tz), _gettimeofday (struct timeval *tv,
struct timeval *tv,
void *tzvp) void *tzvp)
{ {
struct timezone *tz = tzvp; struct timezone *tz = tzvp;

View File

@ -22,8 +22,7 @@
* an error. * an error.
*/ */
off_t off_t
_DEFUN (_lseek, (fd, offset, whence), _lseek (int fd,
int fd,
off_t offset, off_t offset,
int whence) int whence)
{ {

View File

@ -22,8 +22,7 @@
* an error. * an error.
*/ */
off_t off_t
_DEFUN (_lseek, (fd, offset, whence), _lseek (int fd,
int fd,
off_t offset, off_t offset,
int whence) int whence)
{ {

View File

@ -37,8 +37,7 @@ extern time_t _sim_time (void) __asm__("_sim_time");
* time -- return current time in seconds. * time -- return current time in seconds.
*/ */
time_t time_t
_DEFUN (time, time (t), time (time_t *t)
time_t *t)
{ {
time_t ret = _sim_time (); time_t ret = _sim_time ();
@ -52,8 +51,7 @@ _DEFUN (time, time (t),
* _times -- no clock, so return an error. * _times -- no clock, so return an error.
*/ */
int int
_DEFUN (_times, _times (buf), _times (struct tms *buf)
struct tms *buf)
{ {
errno = EINVAL; errno = EINVAL;
return (-1); return (-1);
@ -64,8 +62,7 @@ _DEFUN (_times, _times (buf),
* microseconds. * microseconds.
*/ */
int int
_DEFUN (_gettimeofday, _gettimeofday (tv, tz), _gettimeofday (struct timeval *tv,
struct timeval *tv,
void *tzvp) void *tzvp)
{ {
struct timezone *tz = tzvp; struct timezone *tz = tzvp;

View File

@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error. * stat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (_stat, (path, buf), _stat (const char *path,
const char *path,
struct stat *buf) struct stat *buf)
{ {
errno = EIO; errno = EIO;

View File

@ -20,8 +20,7 @@
* we return an error. * we return an error.
*/ */
int int
_DEFUN (open, (buf, flags, mode), open (const char *buf,
const char *buf,
int flags, int flags,
int mode) int mode)
{ {

View File

@ -18,8 +18,7 @@
* print -- do a raw print of a string * print -- do a raw print of a string
*/ */
void void
_DEFUN (print, (ptr), print (char *ptr)
char *ptr)
{ {
while (*ptr) { while (*ptr) {
outbyte (*ptr++); outbyte (*ptr++);

View File

@ -18,8 +18,7 @@
* putnum -- print a 32 bit number in hex * putnum -- print a 32 bit number in hex
*/ */
void void
_DEFUN (putnum, (num), putnum (unsigned int num)
unsigned int num)
{ {
char buf[9]; char buf[9];
int cnt; int cnt;

View File

@ -21,8 +21,7 @@ extern char inbyte (void);
* we only have stdin. * we only have stdin.
*/ */
int int
_DEFUN (read, (fd, buf, nbytes), read (int fd,
int fd,
char *buf, char *buf,
int nbytes) int nbytes)
{ {

View File

@ -31,7 +31,7 @@ Author: Andreas Neukoetter (ti95neuk@de.ibm.com)
*/ */
int int
getpid () getpid (void)
{ {
return (1); return (1);
} }

View File

@ -20,8 +20,7 @@
* stat -- Since we have no file system, we just return an error. * stat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (stat, (path, buf), stat (const char *path,
const char *path,
struct stat *buf) struct stat *buf)
{ {
errno = EIO; errno = EIO;

View File

@ -19,8 +19,7 @@
* getpid -- only one process, so just return 1. * getpid -- only one process, so just return 1.
*/ */
int int
_DEFUN (getpid, (), getpid (void)
)
{ {
return __MYPID; return __MYPID;
} }

View File

@ -19,8 +19,7 @@
* kill -- go out via exit... * kill -- go out via exit...
*/ */
int int
_DEFUN (kill, (pid, sig), kill (int pid,
int pid,
int sig) int sig)
{ {
if(pid == __MYPID) if(pid == __MYPID)

View File

@ -20,8 +20,7 @@
* we just return an error. * we just return an error.
*/ */
int int
_DEFUN (unlink, (path), unlink (char * path)
char * path)
{ {
errno = EIO; errno = EIO;
return (-1); return (-1);

View File

@ -22,8 +22,7 @@ extern int _EXFUN (outbyte, (char x));
* open will only return an error. * open will only return an error.
*/ */
int int
_DEFUN (write, (fd, buf, nbytes), write (int fd,
int fd,
char *buf, char *buf,
int nbytes) int nbytes)
{ {

View File

@ -17,21 +17,19 @@
/* _raise(), getpid(), and kill() are required by abort(). /* _raise(), getpid(), and kill() are required by abort().
getpid/kill are prefixed with '_' because of MISSING_SYSCALL_NAMES. */ getpid/kill are prefixed with '_' because of MISSING_SYSCALL_NAMES. */
int _DEFUN(_raise,(sig), int _raise (int sig)
int sig)
{ {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;
} }
int _DEFUN(_getpid,(),) int _getpid (void)
{ {
errno = ENOSYS; errno = ENOSYS;
return -1; return -1;
} }
int _DEFUN(_kill,(pid, sig), int _kill (int pid,
int pid,
int sig) int sig)
{ {
errno = ENOSYS; errno = ENOSYS;

View File

@ -18,8 +18,7 @@
* close -- We don't need to do anything, but pretend we did. * close -- We don't need to do anything, but pretend we did.
*/ */
int int
_DEFUN (_close ,(fd), _close (int fd)
int fd)
{ {
return (0); return (0);
} }

View File

@ -19,8 +19,7 @@
* fstat -- Since we have no file system, we just return an error. * fstat -- Since we have no file system, we just return an error.
*/ */
int int
_DEFUN (_fstat, (fd, buf), _fstat (int fd,
int fd,
struct stat *buf) struct stat *buf)
{ {
buf->st_mode = S_IFCHR; /* Always pretend to be a tty */ buf->st_mode = S_IFCHR; /* Always pretend to be a tty */

Some files were not shown because too many files have changed in this diff Show More