diff options
author | Mike Pechkin <mpech@cvs.openbsd.org> | 2002-06-12 06:07:18 +0000 |
---|---|---|
committer | Mike Pechkin <mpech@cvs.openbsd.org> | 2002-06-12 06:07:18 +0000 |
commit | 2c5359ee4336522c89649a8e017da3fdf87fa8bd (patch) | |
tree | 60aa07e4178dd0840349fe830f118d2cb64a1c6c /usr.bin/vi | |
parent | c22dc40df755f025740d14e001bb8599cf4a72c5 (diff) |
a real pid_t cleanup.
espie@ ok for make/,
deraadt@ one extra eye,
millert@ ok
Diffstat (limited to 'usr.bin/vi')
-rw-r--r-- | usr.bin/vi/common/main.c | 6 | ||||
-rw-r--r-- | usr.bin/vi/common/msg.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_argv.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_cscope.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_filter.c | 6 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_script.c | 4 | ||||
-rw-r--r-- | usr.bin/vi/ex/ex_shell.c | 10 | ||||
-rw-r--r-- | usr.bin/vi/include/ex_extern.h | 4 |
8 files changed, 21 insertions, 21 deletions
diff --git a/usr.bin/vi/common/main.c b/usr.bin/vi/common/main.c index 55d52fb7196..a54d97c2a61 100644 --- a/usr.bin/vi/common/main.c +++ b/usr.bin/vi/common/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.8 2002/02/16 21:27:57 millert Exp $ */ +/* $OpenBSD: main.c,v 1.9 2002/06/12 06:07:16 mpech Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -591,8 +591,8 @@ attach(gp) return; } - (void)printf("process %lu waiting, enter <CR> to continue: ", - (u_long)getpid()); + (void)printf("process %ld waiting, enter <CR> to continue: ", + (long)getpid()); (void)fflush(stdout); do { diff --git a/usr.bin/vi/common/msg.c b/usr.bin/vi/common/msg.c index 197c9769f2e..bae7bdbc85b 100644 --- a/usr.bin/vi/common/msg.c +++ b/usr.bin/vi/common/msg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: msg.c,v 1.10 2002/02/19 19:39:39 millert Exp $ */ +/* $OpenBSD: msg.c,v 1.11 2002/06/12 06:07:16 mpech Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -611,7 +611,7 @@ msgq_status(sp, lno, flags) p += strlen(p); } #ifdef DEBUG - (void)sprintf(p, " (pid %lu)", (u_long)getpid()); + (void)sprintf(p, " (pid %ld)", (long)getpid()); p += strlen(p); #endif *p++ = '\n'; diff --git a/usr.bin/vi/ex/ex_argv.c b/usr.bin/vi/ex/ex_argv.c index 27dd8022429..160fd0011f8 100644 --- a/usr.bin/vi/ex/ex_argv.c +++ b/usr.bin/vi/ex/ex_argv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_argv.c,v 1.10 2002/02/17 19:42:34 millert Exp $ */ +/* $OpenBSD: ex_argv.c,v 1.11 2002/06/12 06:07:16 mpech Exp $ */ /*- * Copyright (c) 1993, 1994 @@ -742,7 +742,7 @@ alloc_err: rval = SEXP_ERR; * This won't catch "echo foo_$5", but that's not a common error and * historic vi didn't catch it either. */ - if (proc_wait(sp, (long)pid, sh, 1, 0)) + if (proc_wait(sp, pid, sh, 1, 0)) rval = SEXP_EXPANSION_ERR; for (p = bp; len; ++p, --len) diff --git a/usr.bin/vi/ex/ex_cscope.c b/usr.bin/vi/ex/ex_cscope.c index 3abcfc4e41a..4ae8095a0c2 100644 --- a/usr.bin/vi/ex/ex_cscope.c +++ b/usr.bin/vi/ex/ex_cscope.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_cscope.c,v 1.8 2002/02/17 19:42:34 millert Exp $ */ +/* $OpenBSD: ex_cscope.c,v 1.9 2002/06/12 06:07:16 mpech Exp $ */ /*- * Copyright (c) 1994, 1996 @@ -953,7 +953,7 @@ cscope_display(sp) for (i = 1, csc = exp->cscq.lh_first; csc != NULL; ++i, csc = csc->q.le_next) ex_printf(sp, - "%2d %s (process %lu)\n", i, csc->dname, (u_long)csc->pid); + "%2d %s (process %ld)\n", i, csc->dname, (long)csc->pid); return (0); } diff --git a/usr.bin/vi/ex/ex_filter.c b/usr.bin/vi/ex/ex_filter.c index 61505204348..89d610efa39 100644 --- a/usr.bin/vi/ex/ex_filter.c +++ b/usr.bin/vi/ex/ex_filter.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_filter.c,v 1.6 2002/02/17 19:42:34 millert Exp $ */ +/* $OpenBSD: ex_filter.c,v 1.7 2002/06/12 06:07:17 mpech Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -260,7 +260,7 @@ err: if (input[0] != -1) /* Wait for the parent-writer. */ if (proc_wait(sp, - (long)parent_writer_pid, "parent-writer", 0, 1)) + parent_writer_pid, "parent-writer", 0, 1)) rval = 1; /* Delete any lines written to the utility. */ @@ -287,7 +287,7 @@ err: if (input[0] != -1) * Ignore errors on vi file reads, to make reads prettier. It's * completely inconsistent, and historic practice. */ -uwait: return (proc_wait(sp, (long)utility_pid, cmd, +uwait: return (proc_wait(sp, utility_pid, cmd, ftype == FILTER_READ && F_ISSET(sp, SC_VI) ? 1 : 0, 0) || rval); } diff --git a/usr.bin/vi/ex/ex_script.c b/usr.bin/vi/ex/ex_script.c index c7f1f887e76..6d8a11813f7 100644 --- a/usr.bin/vi/ex/ex_script.c +++ b/usr.bin/vi/ex/ex_script.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_script.c,v 1.8 2002/02/16 21:27:57 millert Exp $ */ +/* $OpenBSD: ex_script.c,v 1.9 2002/06/12 06:07:17 mpech Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -599,7 +599,7 @@ sscr_end(sp) (void)close(sc->sh_slave); /* This should have killed the child. */ - (void)proc_wait(sp, (long)sc->sh_pid, "script-shell", 0, 0); + (void)proc_wait(sp, sc->sh_pid, "script-shell", 0, 0); /* Free memory. */ free(sc->sh_prompt); diff --git a/usr.bin/vi/ex/ex_shell.c b/usr.bin/vi/ex/ex_shell.c index 0ae30bc9cd4..e5ce2832654 100644 --- a/usr.bin/vi/ex/ex_shell.c +++ b/usr.bin/vi/ex/ex_shell.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_shell.c,v 1.8 2002/02/16 21:27:57 millert Exp $ */ +/* $OpenBSD: ex_shell.c,v 1.9 2002/06/12 06:07:17 mpech Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -133,7 +133,7 @@ ex_exec_proc(sp, cmdp, cmd, msg, need_newline) _exit(127); /* NOTREACHED */ default: /* Parent. */ - return (proc_wait(sp, (long)pid, cmd, 0, 0)); + return (proc_wait(sp, pid, cmd, 0, 0)); } /* NOTREACHED */ } @@ -148,12 +148,12 @@ ex_exec_proc(sp, cmdp, cmd, msg, need_newline) * rules get you. I'm using a long based on the belief that nobody is * going to make it unsigned and it's unlikely to be a quad. * - * PUBLIC: int proc_wait(SCR *, long, const char *, int, int); + * PUBLIC: int proc_wait(SCR *, pid_t, const char *, int, int); */ int proc_wait(sp, pid, cmd, silent, okpipe) SCR *sp; - long pid; + pid_t pid; const char *cmd; int silent, okpipe; { @@ -164,7 +164,7 @@ proc_wait(sp, pid, cmd, silent, okpipe) /* Wait for the utility, ignoring interruptions. */ for (;;) { errno = 0; - if (waitpid((pid_t)pid, &pstat, 0) != -1) + if (waitpid(pid, &pstat, 0) != -1) break; if (errno != EINTR) { msgq(sp, M_SYSERR, "waitpid"); diff --git a/usr.bin/vi/include/ex_extern.h b/usr.bin/vi/include/ex_extern.h index e787ed1ae9a..51141e8d208 100644 --- a/usr.bin/vi/include/ex_extern.h +++ b/usr.bin/vi/include/ex_extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ex_extern.h,v 1.7 2002/02/17 19:42:34 millert Exp $ */ +/* $OpenBSD: ex_extern.h,v 1.8 2002/06/12 06:07:17 mpech Exp $ */ int ex(SCR **); int ex_cmd(SCR *); @@ -78,7 +78,7 @@ int sscr_end(SCR *); int ex_set(SCR *, EXCMD *); int ex_shell(SCR *, EXCMD *); int ex_exec_proc(SCR *, EXCMD *, char *, const char *, int); -int proc_wait(SCR *, long, const char *, int, int); +int proc_wait(SCR *, pid_t, const char *, int, int); int ex_shiftl(SCR *, EXCMD *); int ex_shiftr(SCR *, EXCMD *); int ex_source(SCR *, EXCMD *); |