#if UNIX
-void main(int argc, char **argv)
+int main(int argc, char **argv)
/* Do not load or start anything, just edit parameters. */
{
int i;
monitor();
}
exit(0);
+ return 0;
}
reset() { }
/* Save a copy of the header for the kernel, with a_syms
* misused as the address where the process is loaded at.
*/
- DEBUGEXTRA(("raw_copy(0x%x, 0x%lx, 0x%x)... ",
+ DEBUGEXTRA(("raw_copy(0x%lx, 0x%lx, 0x%x)... ",
aout + i * A_MINHDR, mon2abs(&hdr.process), A_MINHDR));
hdr.process.a_syms= addr;
raw_copy(aout + i * A_MINHDR, mon2abs(&hdr.process), A_MINHDR);
}
if (verboseboot < VERBOSEBOOT_BASIC)
- printf("(%dk)\n", totalmem/1024);
+ printf("(%luk)\n", totalmem/1024);
if ((n_procs= i) == 0) {
printf("There are no programs in %s\n", image);
printf("Not enough memory to load %s\n", image);
break;
case EIO:
- printf("Unsuspected EOF on %s\n", image);
+ printf("Unexpected EOF on %s\n", image);
case 0:
/* No error or error already reported. */;
}
/*===========================================================================*
* printer_task *
*===========================================================================*/
-PUBLIC void main(void)
+PUBLIC int main(int argc, char *argv[])
{
/* Main routine of the printer task. */
message pr_mess; /* buffer for all incoming messages */
#include "sb16.h"
-_PROTOTYPE(void main, (void));
FORWARD _PROTOTYPE( int dsp_open, (void) );
FORWARD _PROTOTYPE( int dsp_close, (void) );
FORWARD _PROTOTYPE( int dsp_ioctl, (const message *m_ptr) );
/*===========================================================================*
* main
*===========================================================================*/
-PUBLIC void main()
+PUBLIC int main(int argc, char *argv[])
{
int r;
endpoint_t caller;
#include "sb16.h"
-_PROTOTYPE(void main, (void));
FORWARD _PROTOTYPE( int mixer_init, (void));
FORWARD _PROTOTYPE( int mixer_open, (const message *m_ptr));
FORWARD _PROTOTYPE( int mixer_close, (const message *m_ptr));
/*===========================================================================*
* main
*===========================================================================*/
-PUBLIC void main() {
+PUBLIC int main(int argc, char *argv[])
+{
message mess;
int ipc_status;
int err, caller, proc_nr;
/*===========================================================================*
* main *
*===========================================================================*/
-PUBLIC void main(void)
+PUBLIC int main(int argc, char *argv[])
{
/* Start the ball rolling. */
struct boot_image *ip; /* boot image pointer */
switch_to_user();
NOT_REACHABLE;
+ return 1;
}
/*===========================================================================*
#define NUMBER 12
-void main(void) {
+int main(int argc, char *argv[])
+{
char *udp_device;
int fd[NUMBER];
fd_set fds_write;
for (i = 0; i < NUMBER; i++) {
close(fd[i]);
}
+ return 0;
}
printf("\n");
}
-void main(void) {
+int main(int argc, char *argv[])
+{
int fd1, fd2, fd3, fd4, fd5, fd6; /* file descriptors of files */
fd_set fds_read, fds_write;
int retval;
unlink("dummy4.txt");
unlink("dummy5.txt");
unlink("dummy6.txt");
+ return 0;
}
/*
- * Test name: test02.c
+ * Test name: test03.c
*
* Objetive: The purpose of this test is to make sure that select works
* when working with files.
printf("\n");
}
-void main(void) {
+int main(int argc, char *argv[])
+{
int fd1, fd2, fd3, fd4, fd5, fd6; /* file descriptors of files */
fd_set fds_read, fds_write; /* bit maps */
struct timeval timeout; /* timeout */
unlink("dummy4.txt");
unlink("dummy5.txt");
unlink("dummy6.txt");
+ return 0;
}
#include <limits.h>
#include <string.h>
-void main(void) {
+int main(int argc, char *argv[])
+{
fd_set fds_read, fds_write;
int retval;
char data[1024];
}
printf("Data: %s\n", data);
}
+ return 1;
}
exit(0);
}
-void main(void) {
+int main(int argc, char *argv[])
+{
int pipes[2];
int retval;
int pid;
do_child(pipes);
else
do_parent(pipes);
+ return 0;
}
void nlcr()
{
- printf("\n");
+ fputs("\n",stdout);
}
-void str(s)
-char *s;
+void str(char *s)
{
- printf(s);
+ fputs(s,stdout);
}
/*****************************************************************************
void nlcr()
{
- printf("\n");
+ fputs("\n",stdout);
}
-void str(s)
-char *s;
+void str(char *s)
{
- printf(s);
+ fputs(s,stdout);
}
/*****************************************************************************
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test20a, (void));
_PROTOTYPE(void test20b, (void));
_PROTOTYPE(void test20c, (void));
char executable[1024];
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
int errct = 0; /* Total error counter. */
int subtest = 1;
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test22a, (void));
_PROTOTYPE(int mode, (char *filename));
_PROTOTYPE(int umode, (char *filename));
_PROTOTYPE(void e, (int number));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test23a, (void));
_PROTOTYPE(void test23b, (void));
_PROTOTYPE(void test23c, (void));
_PROTOTYPE(void e, (int number));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
}
quit();
+ return 1;
}
void test23a()
#include <time.h>
#include <stdio.h>
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void chk_dir, (DIR * dirpntr));
_PROTOTYPE(void test24a, (void));
_PROTOTYPE(void test24b, (void));
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test25a, (void));
_PROTOTYPE(void test25b, (void));
_PROTOTYPE(void test25c, (void));
_PROTOTYPE(void e, (int number));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
char buffer[PATH_MAX + 1];
int i, m = 0xFFFF;
if (m & 020) test25e();
}
quit();
+ return 1;
}
void test25a()
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test26a, (void));
_PROTOTYPE(void test26b, (void));
_PROTOTYPE(void test26c, (void));
_PROTOTYPE(void e, (int number));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1];
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test27a, (void));
_PROTOTYPE(void test27b, (void));
_PROTOTYPE(void test27c, (void));
_PROTOTYPE(void e, (int __n));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1];
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test28a, (void));
_PROTOTYPE(void test28c, (void));
_PROTOTYPE(void test28b, (void));
_PROTOTYPE(void e, (int n));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
if (m & 0004) test28c();
}
quit();
+ return 1;
}
void test28a()
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test29a, (void));
_PROTOTYPE(void test29b, (void));
_PROTOTYPE(void test29c, (void));
_PROTOTYPE(void e, (int number));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test30a, (void));
_PROTOTYPE(void test30b, (void));
_PROTOTYPE(void test30c, (void));
_PROTOTYPE(void e, (int number));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
if (st.st_gid != getegid()) e(10);
#endif /* defined(NGROUPS_MAX) && NGROUPS_MAX == 0 */
if (!S_ISREG(st.st_mode)) e(11);
- if (st.st_mode & 0777 != 0644) e(12);
+ if ((st.st_mode & 0777) != 0644) e(12);
if (st.st_nlink != 1) e(13);
if (st.st_ctime != time1) e(14); /* All time fields should be updated */
if (st.st_atime != time1) e(15);
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test31a, (void));
_PROTOTYPE(void test31b, (void));
_PROTOTYPE(void test31c, (void));
_PROTOTYPE(void e, (int number));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
if (m & 0004) test31c();
}
quit();
+ return 1;
}
void test31a()
if (st.st_gid != getegid()) e(4);
#endif /* defined(NGROUPS_MAX) && NGROUPS_MAX == 0 */
if (!S_ISFIFO(st.st_mode)) e(5);
- if (st.st_mode & 0777 != 0644) e(6);
+ if ((st.st_mode & 0777) != 0644) e(6);
if (st.st_nlink != 1) e(7);
if (st.st_ctime != time1) e(8);
if (st.st_atime != time1) e(9);
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test32a, (void));
_PROTOTYPE(void test32b, (void));
_PROTOTYPE(void test32c, (void));
_PROTOTYPE(void e, (int number));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
if (m & 0004) test32c();
}
quit();
+ return 1;
}
#define BUF_SIZE 1024
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test33a, (void));
_PROTOTYPE(void test33b, (void));
_PROTOTYPE(void test33c, (void));
_PROTOTYPE(void e, (int number));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
if (m & 0010) test33d();
}
quit();
+ return 1;
}
void test33a()
char NameTooLong[NAME_MAX + 2]; /* Name of maximum +1 length */
char PathTooLong[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test34a, (void));
_PROTOTYPE(void test34b, (void));
_PROTOTYPE(void test34c, (void));
_PROTOTYPE(void quit, (void));
_PROTOTYPE(void getids, (uid_t * uid, gid_t * gid));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
char NameTooLong[NAME_MAX + 2]; /* Name of maximum +1 length */
char PathTooLong[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test35a, (void));
_PROTOTYPE(void test35b, (void));
_PROTOTYPE(void test35c, (void));
_PROTOTYPE(void quit, (void));
_PROTOTYPE(void getids, (uid_t * uid, gid_t * gid));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
if (m & 0004) test35c();
}
quit();
+ return 1;
}
void test35a()
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test36a, (void));
_PROTOTYPE(void test36b, (void));
_PROTOTYPE(void test36c, (void));
NULL
};
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
if (m & 0010) test36d();
}
quit();
+ return 1;
}
void test36a()
int superuser;
int signumber = 0;
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test38a, (void));
_PROTOTYPE(void test38b, (void));
_PROTOTYPE(void test38c, (void));
_PROTOTYPE(void e, (int number));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
if (m & 0004) test38c();
}
quit();
+ return 1;
}
void test38a()
#define TIMED 0
static volatile int errct;
-static volatile expect_SIGFPE;
+static volatile int expect_SIGFPE;
static u64_t i, j, k;
static jmp_buf jmpbuf_SIGFPE, jmpbuf_main;
char ToLongName[NAME_MAX + 2]; /* Name of maximum +1 length */
char ToLongPath[PATH_MAX + 1]; /* Same for path, both too long */
-_PROTOTYPE(void main, (int argc, char *argv[]));
_PROTOTYPE(void test8a, (void));
_PROTOTYPE(void test8b, (void));
_PROTOTYPE(void e, (int number));
_PROTOTYPE(void quit, (void));
-void main(argc, argv)
-int argc;
-char *argv[];
+int main(int argc, char *argv[])
{
int i, m = 0xFFFF;
if (m & 0002) test8b();
}
quit();
+ return 1;
}
void test8a()
void test9a()
{
- register p;
+ register int p;
subtest = 1;
p = 200;
void test9b()
{
- register p, q;
+ register int p, q;
subtest = 2;
p = 200;
void test9c()
{
- register p, q, r;
+ register int p, q, r;
subtest = 3;
p = 200;
void garbage()
{
- register i, j, k;
+ register int i, j, k;
register char *p, *q, *r;
char *a;
void level1()
{
register char *p;
- register i;
+ register int i;
i = 1000;
p = &buf[10];
void level2()
{
register char *p;
- register i;
+ register int i;
i = 0200;
p = &buf[2];
void dolev()
{
register char *p;
- register i;
+ register int i;
i = 010;
p = &buf[3];