X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/462fca95471224f85b85be911e72faee16cd1597..c04c86951e9b1e852ef67779de06e401fadae0b8:/ppt/ppt.c diff --git a/ppt/ppt.c b/ppt/ppt.c index 67b41f21..a69a7b27 100644 --- a/ppt/ppt.c +++ b/ppt/ppt.c @@ -1,6 +1,8 @@ +/* $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 @@ -31,33 +33,46 @@ * SUCH DAMAGE. */ +#include #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 +#include +#include -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("___________"); @@ -66,9 +81,9 @@ main(argc, argv) static void putppt(c) - register int c; + int c; { - register int i; + int i; (void) putchar('|'); for (i = 7; i >= 0; i--) {