summaryrefslogtreecommitdiffstats
path: root/bin/sh/main.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2002-02-02 06:50:57 +0000
committerimp <imp@FreeBSD.org>2002-02-02 06:50:57 +0000
commit5ef5088ac4e038d0a147a08377ef087fd6edf527 (patch)
tree01a827446e9ba4f34cf1e754fcac691f6c9eb1cf /bin/sh/main.c
parent50014e35418ca00d25ea852fc4f94acf80be4df3 (diff)
downloadFreeBSD-src-5ef5088ac4e038d0a147a08377ef087fd6edf527.zip
FreeBSD-src-5ef5088ac4e038d0a147a08377ef087fd6edf527.tar.gz
o __P has been reoved
o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. o Change int foo() { ... to int foo(void) { ...
Diffstat (limited to 'bin/sh/main.c')
-rw-r--r--bin/sh/main.c42
1 files changed, 10 insertions, 32 deletions
diff --git a/bin/sh/main.c b/bin/sh/main.c
index 7d00586..595c212 100644
--- a/bin/sh/main.c
+++ b/bin/sh/main.c
@@ -86,8 +86,8 @@ short profile_buf[16384];
extern int etext();
#endif
-STATIC void read_profile __P((char *));
-STATIC char *find_dot_file __P((char *));
+STATIC void read_profile(char *);
+STATIC char *find_dot_file(char *);
/*
* Main routine. We initialize things, parse the arguments, execute
@@ -98,9 +98,7 @@ STATIC char *find_dot_file __P((char *));
*/
int
-main(argc, argv)
- int argc;
- char **argv;
+main(int argc, char *argv[])
{
struct jmploc jmploc;
struct stackmark smark;
@@ -216,8 +214,7 @@ state4: /* XXX ??? - why isn't this before the "if" statement */
*/
void
-cmdloop(top)
- int top;
+cmdloop(int top)
{
union node *n;
struct stackmark smark;
@@ -269,9 +266,8 @@ cmdloop(top)
*/
STATIC void
-read_profile(name)
- char *name;
- {
+read_profile(char *name)
+{
int fd;
INTOFF;
@@ -291,8 +287,7 @@ read_profile(name)
*/
void
-readcmdfile(name)
- char *name;
+readcmdfile(char *name)
{
int fd;
@@ -315,8 +310,7 @@ readcmdfile(name)
STATIC char *
-find_dot_file(basename)
- char *basename;
+find_dot_file(char *basename)
{
static char localname[FILENAME_MAX+1];
char *fullname;
@@ -337,9 +331,7 @@ find_dot_file(basename)
}
int
-dotcmd(argc, argv)
- int argc;
- char **argv;
+dotcmd(int argc, char **argv)
{
struct strlist *sp;
exitstatus = 0;
@@ -360,9 +352,7 @@ dotcmd(argc, argv)
int
-exitcmd(argc, argv)
- int argc;
- char **argv;
+exitcmd(int argc, char **argv)
{
extern int oexitstatus;
@@ -376,15 +366,3 @@ exitcmd(argc, argv)
/*NOTREACHED*/
return 0;
}
-
-
-#ifdef notdef
-/*
- * Should never be called.
- */
-
-void
-exit(exitstatus) {
- _exit(exitstatus);
-}
-#endif
OpenPOWER on IntegriCloud