The code involving the posfile member of the FILEDESC struct is
effectively dead for a long time and also cannot be enabled anymore
since semarie unifdef'ed OK_TO_WRITE_DISK in revision 1.43.
Index: games/fortune/fortune/fortune.c
===================================================================
RCS file: /var/cvs/src/games/fortune/fortune/fortune.c,v
retrieving revision 1.52
diff -u -p -r1.52 fortune.c
--- games/fortune/fortune/fortune.c 5 Mar 2016 11:06:43 -0000 1.52
+++ games/fortune/fortune/fortune.c 5 Mar 2016 11:20:09 -0000
@@ -74,7 +74,7 @@ typedef struct fd {
FILE *inf;
char *name;
char *path;
- char *datfile, *posfile;
+ char *datfile;
bool read_tbl;
bool was_pos_file;
STRFILE tbl;
@@ -124,7 +124,7 @@ void get_tbl(FILEDESC *);
void getargs(int, char *[]);
void init_prob(void);
int is_dir(char *);
-int is_fortfile(char *, char **, char **, int);
+int is_fortfile(char *, char **, int);
int is_off_name(char *);
int max(int, int);
FILEDESC *
@@ -452,7 +452,7 @@ over:
if ((isdir && !add_dir(fp)) ||
(!isdir &&
- !is_fortfile(path, &fp->datfile, &fp->posfile, (parent != NULL))))
+ !is_fortfile(path, &fp->datfile, (parent != NULL))))
{
if (parent == NULL)
fprintf(stderr,
@@ -461,7 +461,6 @@ over:
if (was_malloc)
free(path);
do_free(fp->datfile);
- do_free(fp->posfile);
free((char *) fp);
do_free(offensive);
return 0;
@@ -511,7 +510,6 @@ new_fp(void)
fp->child = NULL;
fp->parent = NULL;
fp->datfile = NULL;
- fp->posfile = NULL;
return fp;
}
@@ -549,11 +547,11 @@ all_forts(FILEDESC *fp, char *offensive)
char *sp;
FILEDESC *scene, *obscene;
int fd;
- char *datfile, *posfile;
+ char *datfile;
if (fp->child != NULL) /* this is a directory, not a file */
return;
- if (!is_fortfile(offensive, &datfile, &posfile, 0))
+ if (!is_fortfile(offensive, &datfile, 0))
return;
if ((fd = open(offensive, O_RDONLY)) < 0)
return;
@@ -580,7 +578,6 @@ all_forts(FILEDESC *fp, char *offensive)
else
obscene->name = ++sp;
obscene->datfile = datfile;
- obscene->posfile = posfile;
obscene->read_tbl = 0;
}
@@ -646,7 +643,7 @@ is_dir(char *file)
* suffixes, as contained in suflist[], are ruled out.
*/
int
-is_fortfile(char *file, char **datp, char **posp, int check_for_offend)
+is_fortfile(char *file, char **datp, int check_for_offend)
{
int i;
char *sp;
@@ -1111,8 +1108,8 @@ print_list(FILEDESC *list, int lev)
else
fprintf(stderr, "%3d%%", list->percent);
fprintf(stderr, " %s", STR(list->name));
- DPRINTF(1, (stderr, " (%s, %s, %s)\n", STR(list->path),
- STR(list->datfile), STR(list->posfile)));
+ DPRINTF(1, (stderr, " (%s, %s)\n", STR(list->path),
+ STR(list->datfile)));
putc('\n', stderr);
if (list->child != NULL)
print_list(list->child, lev + 1);