-/* $OpenBSD: main.c,v 1.30 2016/09/11 14:21:17 tb Exp $ */
+/* $OpenBSD: main.c,v 1.31 2021/10/23 11:22:48 mestre Exp $ */
/* $NetBSD: main.c,v 1.4 1995/04/27 21:22:25 mycroft Exp $ */
/*-
struct sigaction sa;
struct itimerval itv;
- if (pledge("stdio rpath wpath cpath flock tty", NULL) == -1)
- err(1, "pledge");
open_score_file();
start_time = time(0);
setup_screen(sp);
+ if (pledge("stdio rpath wpath cpath flock tty", NULL) == -1)
+ err(1, "pledge");
+
addplane();
signal(SIGINT, quit);
-/* $OpenBSD: main.c,v 1.24 2017/07/11 14:32:16 fcambus Exp $ */
+/* $OpenBSD: main.c,v 1.25 2021/10/23 11:22:48 mestre Exp $ */
/*
* Copyright (c) 1980, 1993
int i,l; /* non-descript indices */
char c; /* non-descript character storage */
- if (pledge("stdio rpath wpath cpath tty exec", NULL) == -1)
- err(1, "pledge");
-
signal(SIGINT, getout); /* trap interrupts */
/* use whole screen for text */
if (cturn == 0)
rflag = 0;
} else {
+ if (pledge("stdio rpath wpath cpath tty exec", NULL) == -1)
+ err(1, "pledge");
+
rscore = wscore = 0; /* zero score */
if (aflag) { /* print rules */
-/* $OpenBSD: battlestar.c,v 1.22 2018/02/07 20:22:23 tedu Exp $ */
+/* $OpenBSD: battlestar.c,v 1.23 2021/10/23 11:22:48 mestre Exp $ */
/* $NetBSD: battlestar.c,v 1.3 1995/03/21 15:06:47 cgd Exp $ */
/*
char mainbuf[LINELENGTH];
char *next;
- if (pledge("stdio rpath wpath cpath tty", NULL) == -1)
- err(1, "pledge");
-
open_score_file();
if (argc < 2)
initialize(argv[1]);
newlocation();
+
+ if (pledge("stdio rpath wpath cpath tty", NULL) == -1)
+ err(1, "pledge");
+
for (;;) {
stop_cypher = 0;
next = getcom(mainbuf, sizeof mainbuf, ">-: ",
-/* $OpenBSD: bog.c,v 1.33 2016/09/12 20:11:10 tb Exp $ */
+/* $OpenBSD: bog.c,v 1.34 2021/10/23 11:22:48 mestre Exp $ */
/* $NetBSD: bog.c,v 1.5 1995/04/24 12:22:32 cgd Exp $ */
/*-
int ch, done;
char *bspec, *p;
- if (pledge("stdio rpath tty", NULL) == -1)
- err(1, "pledge");
-
batch = debug = reuse = selfuse;
bspec = NULL;
minlength = -1;
return 0;
}
setup();
+
+ if (pledge("stdio rpath tty", NULL) == -1)
+ err(1, "pledge");
+
prompt("Loading the dictionary...");
if ((dictfp = opendict(DICT)) == NULL) {
warn("%s", DICT);
-/* $OpenBSD: bs.c,v 1.41 2018/08/24 11:14:49 mestre Exp $ */
+/* $OpenBSD: bs.c,v 1.42 2021/10/23 11:22:48 mestre Exp $ */
/*
* Copyright (c) 1986, Bruce Holloway
* All rights reserved.
int
main(int argc, char *argv[])
{
- if (pledge("stdio rpath tty", NULL) == -1)
- err(1, "pledge");
-
do_options(argc, argv);
intro();
-/* $OpenBSD: crib.c,v 1.23 2016/03/07 12:07:56 mestre Exp $ */
+/* $OpenBSD: crib.c,v 1.24 2021/10/23 11:22:48 mestre Exp $ */
/* $NetBSD: crib.c,v 1.7 1997/07/10 06:47:29 mikel Exp $ */
/*-
bool playing;
int ch;
- if (pledge("stdio rpath tty proc exec", NULL) == -1)
- err(1, "pledge");
-
while ((ch = getopt(argc, argv, "ehmqr")) != -1)
switch (ch) {
case 'e':
-/* $OpenBSD: main.c,v 1.32 2016/01/08 21:38:33 mestre Exp $ */
+/* $OpenBSD: main.c,v 1.33 2021/10/23 11:22:48 mestre Exp $ */
/*
* Copyright (c) 1994
* The Regents of the University of California. All rights reserved.
};
char *tmpname;
- if (pledge("stdio rpath wpath cpath tty", NULL) == -1)
- err(1, "pledge");
-
if ((tmpname = getlogin()) != NULL)
strlcpy(you, tmpname, sizeof(you));
else
if (interactive)
cursinit(); /* initialize curses */
+
+ if (pledge("stdio rpath wpath cpath tty", NULL) == -1)
+ err(1, "pledge");
+
again:
bdinit(board); /* initialize board contents */
-/* $OpenBSD: grdc.c,v 1.33 2020/06/06 17:03:16 cheloha Exp $ */
+/* $OpenBSD: grdc.c,v 1.34 2021/10/23 11:22:49 mestre Exp $ */
/*
*
* Copyright 2002 Amos Shapir. Public domain.
int ybase;
int wintoosmall;
- if (pledge("stdio rpath tty", NULL) == -1)
- err(1, "pledge");
-
scrol = wintoosmall = 0;
while ((i = getopt(argc, argv, "sh")) != -1) {
switch (i) {
-/* $OpenBSD: main.c,v 1.19 2016/02/28 06:24:06 tb Exp $ */
+/* $OpenBSD: main.c,v 1.20 2021/10/23 11:22:49 mestre Exp $ */
/* $NetBSD: main.c,v 1.3 1995/03/23 08:32:50 cgd Exp $ */
/*
{
int ch;
- if (pledge("stdio rpath tty", NULL) == -1)
- err(1, "pledge");
-
while ((ch = getopt(argc, argv, "d:hk")) != -1) {
switch (ch) {
case 'd':
-/* $OpenBSD: mille.c,v 1.25 2016/01/08 18:09:59 mestre Exp $ */
+/* $OpenBSD: mille.c,v 1.26 2021/10/23 11:22:49 mestre Exp $ */
/* $NetBSD: mille.c,v 1.4 1995/03/24 05:01:48 cgd Exp $ */
/*
bool restore;
extern char *__progname;
- if (pledge("stdio rpath wpath cpath tty", NULL) == -1)
- err(1, "pledge");
-
#ifdef DEBUG
if (strcmp(av[0], "a.out") == 0) {
outf = fopen("q", "w");
}
Play = PLAYER;
initscr();
+
+ if (pledge("stdio rpath wpath cpath tty", NULL) == -1)
+ err(1, "pledge");
+
if ((LINES < 24) || (COLS < 80)) {
endwin();
fprintf(stderr, "Screen must be at least 24x80\n");
-/* $OpenBSD: rain.c,v 1.21 2016/01/07 16:00:33 tb Exp $ */
+/* $OpenBSD: rain.c,v 1.22 2021/10/23 11:22:49 mestre Exp $ */
/*
* Copyright (c) 1980, 1993
int ch;
int xpos[5], ypos[5];
- if (pledge("stdio rpath tty", NULL) == -1)
- err(1, "pledge");
-
/* set default delay based on terminal baud rate */
if (tcgetattr(STDOUT_FILENO, &term) == 0 &&
(speed = cfgetospeed(&term)) > B9600)
-/* $OpenBSD: main.c,v 1.29 2020/02/14 19:17:33 schwarze Exp $ */
+/* $OpenBSD: main.c,v 1.30 2021/10/23 11:22:49 mestre Exp $ */
/* $NetBSD: main.c,v 1.5 1995/04/22 10:08:54 cgd Exp $ */
/*
char *sp;
#endif
- if (pledge("stdio rpath wpath cpath tty", NULL) == -1)
- err(1, "pledge");
-
home = getenv("HOME");
if (home == NULL || *home == '\0')
err(1, "getenv");
-/* $OpenBSD: worms.c,v 1.29 2018/08/06 06:27:32 mestre Exp $ */
+/* $OpenBSD: worms.c,v 1.30 2021/10/23 11:22:49 mestre Exp $ */
/*
* Copyright (c) 1980, 1993
speed_t speed;
time_t delay = 0;
- if (pledge("stdio rpath tty", NULL) == -1)
- err(1, "pledge");
-
/* set default delay based on terminal baud rate */
if (tcgetattr(STDOUT_FILENO, &term) == 0 &&
(speed = cfgetospeed(&term)) > B9600)