You are not logged in. Login Now
 0-24   25         
 
Author Message
popcorn
Looking for the format for the "fortune" database Mark Unseen   Mar 24 15:44 UTC 1994

This item has been erased.

25 responses total.
kami
response 1 of 25: Mark Unseen   Mar 24 19:03 UTC 1994

I didn't know about he "fortune" program.  How does it work?
remmers
response 2 of 25: Mark Unseen   Mar 24 19:09 UTC 1994

If it uses the same format as the fortune program on my linux system,
the fortune data file has a header structure that's a table of offsets
for the various fortune strings.  This is to enable random access to
the strings.

There is a program called "strfile" that creates such a data file from
a plain ascii file containing the strings.  The program doesn't seem to
be on grex, and I don't have source, but I imagine it can be ftp'd from
somewhere.
remmers
response 3 of 25: Mark Unseen   Mar 24 19:09 UTC 1994

(kami slipped in.  Type  !fortune  at the next prompt.)
popcorn
response 4 of 25: Mark Unseen   Mar 25 12:20 UTC 1994

This response has been erased.

popcorn
response 5 of 25: Mark Unseen   Mar 25 12:21 UTC 1994

This response has been erased.

popcorn
response 6 of 25: Mark Unseen   Mar 25 12:28 UTC 1994

This response has been erased.

rcurl
response 7 of 25: Mark Unseen   Mar 25 14:40 UTC 1994

I've always tried to live by that prescription.
popcorn
response 8 of 25: Mark Unseen   May 7 22:53 UTC 1994

This response has been erased.

remmers
response 9 of 25: Mark Unseen   May 9 00:26 UTC 1994

Re-read my response #2.
popcorn
response 10 of 25: Mark Unseen   May 9 11:05 UTC 1994

This response has been erased.

remmers
response 11 of 25: Mark Unseen   May 9 15:01 UTC 1994

An archie search turned up gatekeeper.dec.com:
/contrib/src/dco/fortune/src/strfile.
popcorn
response 12 of 25: Mark Unseen   May 10 02:09 UTC 1994

This response has been erased.

orinoco
response 13 of 25: Mark Unseen   Apr 12 23:54 UTC 1995

if you're still looking, popcorn, i *finally* got it compiled (thanx to remmers
for help) .... try !/u/orinoco/strfile to run it....
orinoco
response 14 of 25: Mark Unseen   Apr 12 23:59 UTC 1995

...just a few questions......one, what do you use as a delimiter between
strings, and two, how do you *run* the durn thing after you've changed your
file into 1's and 0's?
orinoco
response 15 of 25: Mark Unseen   Apr 13 00:28 UTC 1995

Ok, i'm back again, answering my own questions.
According to a comment in the uncompiled program, you use two consecutive
linesconsisting of just a % as a delimiter.   But i tried that, and it diedn't
work.  Rather, when I tried to run !fortune using my file, it just gave me the
whole file in one chunck, %'s and all.
scg
response 16 of 25: Mark Unseen   Apr 13 00:58 UTC 1995

What does strfile do?
davel
response 17 of 25: Mark Unseen   Apr 13 01:43 UTC 1995

(Valerie's conscientious about FWing, & I'm pretty sure she reads *everything*
here.)

I took a glance at that comment, & I think you've got it wrong.  The
delimiter is any line beginning with two %s, if I understand it.
anemone
response 18 of 25: Mark Unseen   Apr 13 17:29 UTC 1995

yeah, what *does* strfile do?
popcorn
response 19 of 25: Mark Unseen   Apr 14 05:02 UTC 1995

This response has been erased.

orinoco
response 20 of 25: Mark Unseen   Apr 15 19:41 UTC 1995

no, a line beginning w/two %'s doesn't work either.
davel
response 21 of 25: Mark Unseen   Apr 16 21:38 UTC 1995

Daniel, I tried compiling, setting up a test file, & running.  The
message from strfile appears to indicate that it did in fact use
lines beginning %% as delimiters (the string count & that "shortest string"
message fits this).  I tried running fortune on my file, & got the
results you report, though.  I suspect that fortune expects some kind
of format for the strings it uses, since its options include things like
"offensive fortunes only" etc., but I don't have any inside info.
popcorn
response 22 of 25: Mark Unseen   Apr 17 13:40 UTC 1995

This response has been erased.

davel
response 23 of 25: Mark Unseen   Apr 18 01:36 UTC 1995

There seems to be just one, according to the man & according to what
seems to be in the games/lib dir - but the others could be hidden.
However, I really do think that this is likely given what happens.  I
could well be wrong.

Somewhere we must have the source for fortune, surely?  Not that *I*
want to go digging through it!
orinoco
response 24 of 25: Mark Unseen   Apr 20 01:40 UTC 1995

yeah..source file is /usr/local/grexsrc/strfile/strfile.c....compiled version
is /home/orinoco/strfile
 0-24   25         
Response Not Possible: You are Not Logged In
 

- Backtalk version 1.3.30 - Copyright 1996-2006, Jan Wolter and Steve Weiss