-/* $OpenBSD: banner.c,v 1.17 2015/02/10 13:50:58 tedu Exp $ */
+/* $OpenBSD: banner.c,v 1.18 2015/10/14 08:12:12 doug Exp $ */
/* $NetBSD: banner.c,v 1.4 1995/04/22 11:55:15 cgd Exp $ */
/*
{
int ch;
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
while ((ch = getopt(argc, argv, "w:tdh")) != -1)
switch (ch) {
case 'd':
-/* $OpenBSD: bcd.c,v 1.20 2014/11/07 22:17:49 schwarze Exp $ */
+/* $OpenBSD: bcd.c,v 1.21 2015/10/14 08:12:12 doug Exp $ */
/* $NetBSD: bcd.c,v 1.6 1995/04/24 12:22:23 cgd Exp $ */
/*
int dflag = 0;
int ch;
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
while ((ch = getopt(argc, argv, "dl")) != -1) {
switch (ch) {
case 'd':
-/* $OpenBSD: caesar.c,v 1.16 2014/07/03 20:30:17 schwarze Exp $ */
+/* $OpenBSD: caesar.c,v 1.17 2015/10/14 08:12:12 doug Exp $ */
/*
* Copyright (c) 1989, 1993
int obs[26], try, winner;
double dot, winnerdot;
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
/* check to see if we were called as rot13 */
av = argv;
p = strrchr(*av, '/');
-/* $OpenBSD: factor.c,v 1.20 2015/09/07 00:49:20 tedu Exp $ */
+/* $OpenBSD: factor.c,v 1.21 2015/10/14 08:12:12 doug Exp $ */
/* $NetBSD: factor.c,v 1.5 1995/03/23 08:28:07 cgd Exp $ */
/*
int ch;
char *p, buf[100]; /* > max number of digits. */
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
while ((ch = getopt(argc, argv, "")) != -1) {
switch (ch) {
case '?':
-/* $OpenBSD: morse.c,v 1.15 2013/11/27 13:32:02 okan Exp $ */
+/* $OpenBSD: morse.c,v 1.16 2015/10/14 08:12:12 doug Exp $ */
/*
* Copyright (c) 1988, 1993
int ch;
char *p;
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
while ((ch = getopt(argc, argv, "dsh")) != -1)
switch(ch) {
case 'd':
-/* $OpenBSD: number.c,v 1.14 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: number.c,v 1.15 2015/10/14 08:12:12 doug Exp $ */
/*
* Copyright (c) 1988, 1993, 1994
int ch, first;
char line[LINELEN];
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
lflag = 0;
while ((ch = getopt(argc, argv, "hl")) != -1)
switch (ch) {
-/* $OpenBSD: pig.c,v 1.11 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: pig.c,v 1.12 2015/10/14 08:12:12 doug Exp $ */
/* $NetBSD: pig.c,v 1.2 1995/03/23 08:41:40 cgd Exp $ */
/*-
int ch;
char buf[1024];
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
while ((ch = getopt(argc, argv, "")) != -1)
switch(ch) {
case '?':
-/* $OpenBSD: pom.c,v 1.16 2015/03/17 19:31:30 millert Exp $ */
+/* $OpenBSD: pom.c,v 1.17 2015/10/14 08:12:12 doug Exp $ */
/* $NetBSD: pom.c,v 1.6 1996/02/06 22:47:29 jtc Exp $ */
/*
int cnt;
char buf[1024];
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
if (argc > 1) {
tmpt = parsetime(argv[1]);
strftime(buf, sizeof(buf), "%a %Y %b %e %H:%M:%S (%Z)",
-/* $OpenBSD: ppt.c,v 1.12 2014/11/07 22:17:49 schwarze Exp $ */
+/* $OpenBSD: ppt.c,v 1.13 2015/10/14 08:12:12 doug Exp $ */
/* $NetBSD: ppt.c,v 1.4 1995/03/23 08:35:40 cgd Exp $ */
/*
char *p, buf[132];
int c, start, seenl, dflag, bflag;
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
dflag = bflag = 0;
while ((c = getopt(argc, argv, "bdh")) != -1)
switch(c) {
-/* $OpenBSD: random.c,v 1.12 2009/10/27 23:59:26 deraadt Exp $ */
+/* $OpenBSD: random.c,v 1.13 2015/10/14 08:12:12 doug Exp $ */
/* $NetBSD: random.c,v 1.3 1995/04/22 07:44:05 cgd Exp $ */
/*
int ch, random_exit, selected, unbuffer_output;
char *ep;
+ if (pledge("stdio", NULL) == -1)
+ err(1, "pledge");
+
random_exit = unbuffer_output = 0;
while ((ch = getopt(argc, argv, "erh")) != -1)
switch (ch) {