+/* $NetBSD: ppt.c,v 1.9 2000/07/03 03:57:43 matt Exp $ */
+
/*
- * Copyright (c) 1988 Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1988, 1993
+ * The Regents of the University of California. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* SUCH DAMAGE.
*/
+#include <sys/cdefs.h>
#ifndef lint
-char copyright[] =
-"@(#) Copyright (c) 1988 Regents of the University of California.\n\
- All rights reserved.\n";
+__COPYRIGHT("@(#) Copyright (c) 1988, 1993\n\
+ The Regents of the University of California. All rights reserved.\n");
#endif /* not lint */
#ifndef lint
-/*static char sccsid[] = "from: @(#)ppt.c 5.4 (Berkeley) 6/1/90";*/
-static char rcsid[] = "$Id: ppt.c,v 1.3 1993/08/01 18:53:13 mycroft Exp $";
+#if 0
+static char sccsid[] = "@(#)ppt.c 8.1 (Berkeley) 5/31/93";
+#else
+__RCSID("$NetBSD: ppt.c,v 1.9 2000/07/03 03:57:43 matt Exp $");
+#endif
#endif /* not lint */
#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
-static void putppt();
+ int main __P((int, char *[]));
+static void putppt __P((int));
+int
main(argc, argv)
int argc;
char **argv;
{
- register int c;
- register char *p;
+ int c;
+ char *p;
+
+ /* Revoke setgid privileges */
+ setgid(getgid());
(void) puts("___________");
if (argc > 1)
- while (p = *++argv)
+ while ((p = *++argv) != NULL) {
for (; *p; ++p)
putppt((int)*p);
+ if ((*(argv + 1)))
+ putppt((int)' ');
+ }
else while ((c = getchar()) != EOF)
putppt(c);
(void) puts("___________");
static void
putppt(c)
- register int c;
+ int c;
{
- register int i;
+ int i;
(void) putchar('|');
for (i = 7; i >= 0; i--) {