version 1.13, 2017/07/28 17:16:35 |
version 1.14, 2019/03/10 20:45:11 |
|
|
#include <errno.h> |
#include <errno.h> |
#include <fcntl.h> |
#include <fcntl.h> |
#include <limits.h> |
#include <limits.h> |
#include <locale.h> |
|
#include <stdint.h> |
#include <stdint.h> |
#include <stdio.h> |
#include <stdio.h> |
#include <stdlib.h> |
#include <stdlib.h> |
|
|
void ise(void); |
void ise(void); |
void print_word(FILE *); |
void print_word(FILE *); |
void ztos(char *); |
void ztos(char *); |
__dead void usage(void); |
static void __dead usage(void); |
|
|
/* from look.c */ |
/* from look.c */ |
int look(unsigned char *, unsigned char *, unsigned char *); |
int look(unsigned char *, unsigned char *, unsigned char *); |
|
|
struct stat sb; |
struct stat sb; |
FILE *file, *found; |
FILE *file, *found; |
|
|
setlocale(LC_ALL, ""); |
|
|
|
if (pledge("stdio rpath wpath cpath", NULL) == -1) |
if (pledge("stdio rpath wpath cpath", NULL) == -1) |
err(1, "pledge"); |
err(1, "pledge"); |
|
|
|
|
if (ch == EOF) { |
if (ch == EOF) { |
if (found != NULL) |
if (found != NULL) |
fclose(found); |
fclose(found); |
exit(0); |
return (0); |
} |
} |
} |
} |
for (cp = word, dp = original; cp < ep; ) |
for (cp = word, dp = original; cp < ep; ) |
|
|
file = stdout; |
file = stdout; |
} |
} |
|
|
exit(0); |
return (0); |
} |
} |
|
|
void |
void |
|
|
return (rval); |
return (rval); |
} |
} |
|
|
__dead void |
static void __dead |
usage(void) |
usage(void) |
{ |
{ |
extern char *__progname; |
extern char *__progname; |