#include <sys/stat.h>
#endif
+#include <stdbool.h>
#include <sys/select.h>
#include <math.h>
#include <stdio.h>
int init(char *);
void term(void);
- char *buildpath(char *, int);
+ char *buildpath(char *, bool);
char *buildcommand(char *, char *, int, int, char *);
void warning(char *, int, char *, char *, ...);
#else
if (!strchr (aout, PATHDEL)) {
leftypath = "";
- if ((s1 = buildpath (aout, TRUE)))
+ if ((s1 = buildpath (aout, true)))
aout = strdup (s1);
} else
aout = strdup (aout);
returns the first occurance of that file or NULL
*/
-char *buildpath (char *file, int flag) {
+char *buildpath (char *file, bool flag) {
struct stat statbuf;
char *s1, *s2;
int mode, pathi, i;
#ifdef FEATURE_NETSCAPE
- if (flag == FALSE && innetscape) {
+ if (!flag && innetscape) {
#ifdef FEATURE_WIN32
HWND hwnd;
char *s;
#define FEATURE_X11 1
#endif
+#include <stdbool.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
int init (char *);
void term (void);
-char *buildpath (char *, int);
+char *buildpath (char *, bool);
char *buildcommand (char *, char *, int, int, char *);
void warning (char *, int, char *, char *, ...);
#include "gmap2l.h"
#endif
#include "internal.h"
+#include <stdbool.h>
#include <string.h>
#ifndef FEATURE_MS
#include <sys/time.h>
fp = stdin;
else {
fp = NULL;
- if ((fn = buildpath (fn, FALSE)))
+ if ((fn = buildpath (fn, false)))
fp = fopen (fn, "r");
}
if (fp) {
#include "g.h"
#include "leftyio.h"
#include "mem.h"
+#include <stdbool.h>
io_t *iop;
int ion;
switch (type) {
case IO_FILE:
if (!(p->ifp = p->ofp = fopen (name, mode))) {
- path = buildpath (name, FALSE);
+ path = buildpath (name, false);
if (!path || !(p->ifp = p->ofp = fopen (path, mode)))
return -1;
}
if (!fmt)
fmt = "%e";
if (
- !(path = buildpath (name, TRUE)) ||
+ !(path = buildpath (name, true)) ||
!(command = buildcommand (path, NULL, -1, -1, fmt))
)
return -1;
#include "mem.h"
#include <fcntl.h>
#include <signal.h>
+#include <stdbool.h>
#include <string.h>
#include <sys/wait.h>
#ifndef HAVE_TERMIOS_H
if (!(shell = getenv ("SHELL")))
shell = "/bin/sh";
if (shell[0] != '/' && shell[0] != '.') {
- if (!(shell = buildpath (shell, TRUE)))
+ if (!(shell = buildpath (shell, true)))
shell = "/bin/sh";
else
shell = strdup (shell);
return -1;
break;
}
- path = buildpath (name, FALSE);
+ path = buildpath (name, false);
if (!path || !(p->ifp = p->ofp = fopen (path, mode)))
return -1;
}
if (!fmt)
fmt = "%e";
if (
- !(path = buildpath (name, TRUE)) ||
+ !(path = buildpath (name, true)) ||
!(command = buildcommand (path, NULL, -1, -1, fmt))
)
return -1;
if (!fmt)
fmt = "%e";
if (
- !(path = buildpath (name, TRUE)) ||
+ !(path = buildpath (name, true)) ||
!(command = buildcommand (path, NULL, -1, -1, fmt))
)
return -1;
if (listen (sfd, 5) < 0)
return -1;
gethostname (hname, sizeof (hname));
- if (!(path = buildpath (name, TRUE)) || !(command = buildcommand (
+ if (!(path = buildpath (name, true)) || !(command = buildcommand (
path, hname, (int) ntohs (sname.sin_port),
(int) ntohs (sname.sin_port), fmt
)))
#include "gcommon.h"
#include "mem.h"
#include <math.h>
+#include <stdbool.h>
#include <string.h>
#define PSDPI 300.0
int color, lflag, ai, i, x, y, w, h, r, g, b;
if (
- !(path = buildpath ("lefty.psp", 0)) ||
+ !(path = buildpath ("lefty.psp", false)) ||
!(pfp = fopen (path, "r"))
) {
Gerr (POS, G_ERRCANNOTOPENFILE, "lefty.psp");