diff options
author | Steve Bennett <steveb@workware.net.au> | 2010-08-17 08:21:39 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2010-10-15 11:02:50 +1000 |
commit | cbc635e8f4de48408768053a976dc7bd7177ba7a (patch) | |
tree | bca1549fa15afc234868b5c46cd8a4a486f16b8f /jim-posix.c | |
parent | 75af5a8f20800977aabfd95fdfc403f851f8c459 (diff) | |
download | jimtcl-cbc635e8f4de48408768053a976dc7bd7177ba7a.zip jimtcl-cbc635e8f4de48408768053a976dc7bd7177ba7a.tar.gz jimtcl-cbc635e8f4de48408768053a976dc7bd7177ba7a.tar.bz2 |
Clean up the indentation mess
Use 'indent'. Not perfect, but at least consistent.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim-posix.c')
-rw-r--r-- | jim-posix.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/jim-posix.c b/jim-posix.c index 7aa266e..61f5af8 100644 --- a/jim-posix.c +++ b/jim-posix.c @@ -1,3 +1,4 @@ + /* Jim - POSIX extension * Copyright 2005 Salvatore Sanfilippo <antirez@invece.org> * @@ -37,12 +38,12 @@ static void Jim_PosixSetError(Jim_Interp *interp) } #ifdef HAVE_FORK -static int Jim_PosixForkCommand(Jim_Interp *interp, int argc, - Jim_Obj *const *argv) +static int Jim_PosixForkCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { pid_t pid; + JIM_NOTUSED(argv); - + if (argc != 1) { Jim_WrongNumArgs(interp, 1, argv, ""); return JIM_ERR; @@ -51,7 +52,7 @@ static int Jim_PosixForkCommand(Jim_Interp *interp, int argc, Jim_PosixSetError(interp); return JIM_ERR; } - Jim_SetResultInt(interp, (jim_wide)pid); + Jim_SetResultInt(interp, (jim_wide) pid); return JIM_OK; } #endif @@ -83,8 +84,7 @@ static int Jim_PosixForkCommand(Jim_Interp *interp, int argc, * * {<pid> other 0} */ -static int Jim_PosixWaitCommand(Jim_Interp *interp, int argc, - Jim_Obj *const *argv) +static int Jim_PosixWaitCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { int nohang = 0; long pid; @@ -139,10 +139,10 @@ static int Jim_PosixWaitCommand(Jim_Interp *interp, int argc, return JIM_OK; } -static int Jim_PosixGetidsCommand(Jim_Interp *interp, int argc, - Jim_Obj *const *argv) +static int Jim_PosixGetidsCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { Jim_Obj *objv[8]; + if (argc != 1) { Jim_WrongNumArgs(interp, 1, argv, ""); return JIM_ERR; @@ -160,8 +160,7 @@ static int Jim_PosixGetidsCommand(Jim_Interp *interp, int argc, } #define JIM_HOST_NAME_MAX 1024 -static int Jim_PosixGethostnameCommand(Jim_Interp *interp, int argc, - Jim_Obj *const *argv) +static int Jim_PosixGethostnameCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { char buf[JIM_HOST_NAME_MAX]; @@ -212,8 +211,6 @@ static int Jim_PosixPidCommand(Jim_Interp *interp, int argc, Jim_Obj *const *arg int Jim_posixInit(Jim_Interp *interp) { - if (Jim_PackageProvide(interp, "posix", "1.0", JIM_ERRMSG) != JIM_OK) - return JIM_ERR; #ifdef HAVE_FORK Jim_CreateCommand(interp, "os.fork", Jim_PosixForkCommand, NULL, NULL); #endif |