]> granicus.if.org Git - fortune-mod/blob - fortune-mod/ChangeLog
refactoringgot rid of == NULL
[fortune-mod] / fortune-mod / ChangeLog
1 (Note: this file has been re-arranged to be in reverse chronological
2 order, which is The Right Thing for ChangeLogs - DLC)
3
4 April 29, 2020 (fortune-mod 2.22.0)
5
6         SECURITY: Avoid some hypothetical buffer overflows in unstr, and randstr.
7
8         Modernize and refactor the code.
9
10         Avoid build targets' proliferation in CMake.
11
12 April 04, 2020 (fortune-mod 2.20.0)
13
14         Further avoid double traversal if FORTDIR == LOCFORTDIR.
15
16         Using clang-format to format the code.
17
18         Eliminate -D_FORTIFY_SOURCE warnings.
19
20         Modernize and refactor the code.
21
22 March 30, 2020 (fortune-mod 2.18.0)
23
24         Avoid double traversal if FORTDIR == LOCFORTDIR.
25
26         Typos' corrections and a new quote.
27
28 February 26, 2020 (fortune-mod 2.16.0)
29
30         Better portability to Microsoft Windows and other OSes
31         Thanks to AppVeyor (done by Shlomi Fish).
32
33         Add the -u flag [from debian]
34
35         Add fortune.desktop [from debian]
36
37         Remove backspaces in a cookie [from debian]
38
39         Complete the lyrics of a Leonard Cohen song [from debian]
40
41         Correct a misattribution.
42
43 February 23, 2020 (fortune-mod 2.14.0)
44
45         Correct some typos and add some new cookies.
46
47         Better Win32/Win64 Portability (AppVeyor is still failing.)
48
49         Code cleanups.
50
51 December 18, 2019 (fortune-mod 2.12.0)
52
53         Extract rinutils as a package and require it as a dep:
54         https://github.com/shlomif/rinutils/ .
55
56         Move some jokes to the offensive collection:
57         https://github.com/shlomif/fortune-mod/pull/38 - thanks
58         to @s0nata .
59
60 June 30, 2019 (fortune-mod 2.10.0)
61
62         Move strfile and unstr to /usr/bin :
63         https://github.com/shlomif/fortune-mod/issues/35
64
65         Code cleanups: warnings and portability.
66
67         Better porting to windows / appveyor-CI
68         (still not perfect)
69
70 June 07, 2019 (fortune-mod 2.8.0)
71
72         Add some quotes by amigojapan.
73
74         Some improvements for spelling, punctuation and grammar.
75
76         Extract a common C header.
77
78         Add TidyAll tests.
79
80 December 19, 2018 (fortune-mod 2.6.2)
81
82         Fix the cmake files installation paths. See
83         https://github.com/shlomif/fortune-mod/pull/29 .
84
85         Some improvements for spelling, punctuation and grammar.
86
87         Normalize the numbering of "Great Moments in History":
88         https://github.com/shlomif/fortune-mod/issues/28 .
89
90 July 10, 2018 (fortune-mod 2.6.1)
91
92         Fix the previously rotated display of offensive fortunes (using the "-o"
93         or "-a" flags). See https://github.com/shlomif/fortune-mod/issues/26 .
94
95         Incorporate several more minor patches from Debian.
96
97 June 26, 2018 (fortune-mod 2.6.0)
98
99         Incorporate patches from the Debian package.
100
101         Add the "tao", "pratchett" and many individual cookies.
102
103 March 22, 2018 (fortune-mod 2.4.1)
104
105         Add the missing cmake/Shlomif_Common.cmake file.
106
107 March 22, 2018 (fortune-mod 2.4.0)
108
109         Fix issue #24 reported by @pouar of an underflow error in strfile.
110
111         Fix some GCC warnings with the Recode flags.
112
113         Remove some trailing empty lines in fortunes
114
115 February 15, 2018 (fortune-mod 2.2.1)
116
117         Fix some mispellings.
118
119         Remove some duplicates.
120
121         Thanks to bug reporters on the bug trackers of Linux distributions.
122
123 January 31, 2018 (fortune-mod 2.2.0)
124
125         Add the "disclaimer" cookie file (thanks to mathew).
126
127         Correct some problems in the documentation.
128
129         Fix some memory leaks (thanks to valgrind).
130
131         Reenable the valgrind tests (requires Recode 3.7).
132
133 January 11, 2018 (fortune-mod-2.0.0)
134
135         Correct typos.
136
137         Deprecate the BSD_REGEX - we now use only POSIX ones.
138
139         Various build fixes.
140
141 March 25, 2017 (fortune-mod-1.99.5)
142
143         Add a new cmake-based configuration/build/install system.
144
145         Converted the source files to UTF-8.
146
147         Added automated tests.
148
149         Removed trailing whitespace.
150
151         Reformatted long (> 80 chars) lines.
152
153         Fixed many typos.
154
155         Fixed some compiler warnings.
156
157         Added a build-time option to remove the “-o” (= “offensive”) flag.
158
159         Incorporated some downstream patches from Linux distributions.
160
161
162 March 05, 2004 (fortune-mod-1.99.1)
163
164         Most of the changes have occurred at some point in time in the last
165         5 years.
166
167         A high number of spelling, punctuation, formatting and grammar
168         fixes.
169
170         Internationalisation support.
171
172         New -c option to see which file a fortune came from.
173
174 August 29, 1997
175
176   Incorporated a couple of minor changes made in the (old) Debian
177   fortune-mod package, including the addition of an extra data file
178   called 'cookie'.  Renamed some documentation files, and included some
179   install information for non-Linux users.  Added a "-v" option to
180   report the program version.
181
182   I intend to submit this distribution to SunSITE RSN.
183
184     -- Dennis L. Clark <dbugger@progsoc.uts.edu.au>
185
186 May, 1997
187
188   This release fixes many of the portability problems with the
189   fortune-mod program released by Amy Lewis in October, 1995.  The
190   previous version had many Linux-isms in it, which left it unworkable
191   on any other platform.  This version replaces most of these with more
192   standard calls, making it more likely to work under other platforms.
193   The Makefiles have been modified so that GNU's gcc and make are no
194   longer required: any standard make and ANSI-compatible C compiler
195   should work.  Sorry, pre-ANSI compilers are not supported (c'mon, this
196   is the 90's, darn it!)
197
198   This version has been tested to work on SunOS 4.1.x as well as Linux.
199   All changes made to the sources were as platform-independant as
200   possible.  Therefore, no "#ifdef LINUX" or "#ifdef SUNOS4" directives
201   appear in the code.  An effect of this is that a number of 'implicit
202   declaration' warnings are emitted by gcc under SunOS 4.1.x, but this a
203   problem with SunOS's standard headers, not with the program or the
204   compiler.  The benefit of this approach is that it eases the work of
205   expanding the port to include other platforms. Bug reports and fixes
206   for other platforms are most welcome!
207
208   A few "standard" C function calls were replaced with more standard
209   counterparts at various points.  Generally, when there was a choice
210   between a BSD version of a function and a POSIX version, the POSIX
211   version was favoured (even though fortune originated on BSD).  An
212   exception to this was the regex functions: either POSIX or BSD
213   versions can be used, with selection made via the top-level Makefile.
214
215   Fortune and strfile also compiles on Solaris 2.5, but a discrepency
216   between the declaration and implementation of 'struct dirent' on the
217   test platform caused fortune to execute incorrectly there.  It is not
218   certain whether this is a bug in the header file, the C library, or
219   the test platform.
220
221   While the making of this release was not meant to become a bug
222   search-and-destroy mission, some bugs were inadvertently discovered
223   and fixed. including the known bug of using -a with a file that occurs
224   in both the offensive and inoffensive directories.  Fixing this
225   particular bug required a way to be able to separately identify two
226   fortune files with the same name, with one in the inoffensive
227   directory, the other one in the offensive directory.  Now, such a name
228   will be taken to be the inoffensive file by default.  However, you can
229   now append '-o' to a fortune name, and the '-o' will be removed and
230   the offensive directory will be searched.  Thus you can say (assuming
231   you use the distributed datfiles):
232
233         fortune 80% politics politics-o
234
235   Which has an 80% change of giving an "inoffensive" political fortune,
236   and a 20% change of giving an "offensive" political one.  Note that
237   this makes fortune-mod backwards-compatible with BSD fortune, but only
238   for users, not fortune database maintainers.
239
240   Of course, this solution only passes the buck: with the above example
241   again, if you have a 'politics-o' file in your inoffensive directory,
242   you are back to square one.  OTOH, seeing that '-o' originally was
243   meant for offensive fortunes, using it for inoffensive ones is simply
244   asking for trouble.
245
246   Bug fixed: Fortune's definition of a fortune length (for -s and -l)
247   was inconsistent.  Unordered fortunes counted the 2 delimiting
248   characters (as hinted in the man page), but sorted or randomized
249   fortunes did not.  Now the delimiting characters are _NEVER_ counted,
250   so you will always get the length limit you expect.
251
252   Another bug fix: -l and -s can now work together with -m.  Previously
253   -l and -s were ignored when -m was in effect.  The new behaviour helps
254   me count how many long or short fortunes there are in a file.
255
256   Ansify has been removed from the package, as well as some filter
257   scripts from NetBSD that no longer appear useful.  Randstr has been
258   kept, but has not been improved in any way.  It at least has a man
259   page: maybe somebody will find it useful.
260
261   Some of the documentation (including the man pages) has been improved
262   and updated, and some files have been renamed so that the package
263   looks less Linux-specific.
264
265     -- Dennis L. Clark <dbugger@progsoc.uts.edu.au>
266
267 Late October 1995
268   Ansify has been abandoned.  I'm going to distribute this working version
269   of fortune, and then see how difficult it would be to add termcap/terminfo
270   enhancements to fortune itself--I don't anticipate serious problems, but
271   I'd rather go ahead and get this on the net.
272
273   A last-minute change was made to the way that percentages are displayed
274   with -f; it is now in the format nnn.nn%.  The reason for this is that
275   with the multiplication of small files, fortune -af displayed a large
276   number of "0%"s--no worse than the old version, but not helpful.
277
278   The fortunes database was finally cleaned up, and this version is now
279   being distributed (at least, I hope it is).  I don't consider the current
280   division of fortunes among files absolutely canonical; some are certainly
281   in the wrong places.  But things are *better*.
282
283 Amy A. Lewis    alewis@email.unc.edu
284
285 Mid-October '95
286   Another utility, ansify, now compiles; it has not been tested at all, so
287   it may not work even slightly.
288
289   Ansify is a rather stupid program, all things considered, but the work on
290   it does raise an interesting possibility for an enhanced fortune.  At
291   present, the fortune databases contain x^Hy sequences for underline and
292   special characters (and this can be extended to include bold, = x^Hx).
293   Ansify is stupid because it doesn't use the proper tools, ie termcap or
294   terminfo (hmmm ... since it works on files, that may not be so stupid);
295   it appears that if that can be done, then a termcap/terminfo enhanced
296   fortune could be produced, which would recognize the existence of ^H in
297   a string and attempt to display using appropriate control sequences.
298   This sort of modification would be of greater interest to casual users,
299   I think, than even the bug fixes, and since it would not force changes
300   in the storage of fortunes, it is eminently portable.  Consider this a
301   'todo' announcement.
302
303 Added (early October 95):
304   A new executable, rot, which is a rot13 filter (a caesar cipher). Most
305   probably have caesar, but on the other hand, if you compile this mess
306   as root, caesar probably isn't in the path.
307
308   A new parameter to fortune, -n, which permits you to specify the length
309   at which to break between long (-l) and short (-s) fortunes.
310
311   fortune -f now shows probabilities.
312
313   A bug: fortune -a nn% filename filename ... now fails without an error
314   message, if the filename named following the percentage exists in both
315   the inoffensive and the offensive directories (that is, if you have two
316   files containing definitions, one called fortunes/definitions and one
317   called fortunes/off/definitions, and call fortune as: fortune -a 10%
318   definitions religion politics ..., then fortune simply fails).  This
319   appears to be an artifact of the changes that were made in storage/
320   naming of offensive fortunes.  It only happens with the combination of
321   a percentage with -a and inoffensive/offensive files that share a name.
322   Temporary workaround: rename one or the other of the files (*sigh*  I
323   don't like that as a solution).
324
325   The man pages have been updated.  The old man pages are also available,
326   but are not installed unless you do it yourself (the new ones are).  The
327   new man pages have the extension .man; the old ones have numeric
328   extensions.
329
330   A place has been created for fortune files containing HTML tags (the
331   reason I started playing with this mess was because I wanted to be
332   able to format fortunes nicely for the web without having to run an
333   enormously complex script to figure out from formatting how best to
334   display things, a particular problem since the formatting isn't
335   consistent).  Tagged fortunes don't exist yet, and I'm seriously
336   considering creating a slightly different fortune binary that would
337   output the necessary headers and trailers (reducing the CGI script
338   to complete triviality) (-f isn't really needed for a webfortune).
339
340 Todo: I'm thinking of adding a -x to unstr, to rot13 the output.  This
341 would have the effect of putting all the necessary tools in one package.
342 It further breaks compatibility with BSD tools (which has *mostly* been
343 maintained, merely enhanced slightly, although the change in how
344 offensive files are distinguished from inoffensive might be regarded as
345 breaking compatibility) by adding yet another parameter to unstr, which
346 didn't have any, before.  So I haven't decided, yet.
347
348 Todo: KOI8 encoded fortunes?  They couldn't be rotated without a great
349 deal of trouble, of course.
350
351 More minor fixes:
352
353   The way that fortune -m prints its output has been slightly changed.  It
354   used to print the delimiter first, then, if this were the first fortune
355   from a particular file, it printed the name of the file in parentheses.
356   It now prints the first fortune without an initial delimiter; if the
357   fortune is the first from a particular file, it then prints
358   (filename), newline, delimiter, newline *to stderr*.  Redirect stderr to
359   stdout to get something *similar to* (but not the same as) the old
360   behavior.  The new behavior, if stderr is redirected to stdout, and
361   both are then redirected to a file, produces fictitious entries, one
362   per file in which a match was found.  However, whether stderr is
363   redirected or not, the new format produces files that strfile can
364   parse without choking (the old format, since it placed the filename
365   on the same line as the delimiter character, effectively forced editing
366   of the file in order to make it usable by strfile, unless the option of
367   concatenating two fortunes with an ugly "% (filename)" line separating
368   them was considered acceptable output).  Under the new display format,
369   if stderr is redirected into the file, you end up with filenames marking
370   the separation between files (as before), but they are now valid text
371   strings (which should probably, therefore, be deleted).
372
373   In other words, if you don't care what files the original text came from,
374   and want a new file containing (let us say), quotes from Mark Twain,
375   you might do:
376   fortune -am '-- Mark Twain' >twain
377   The files accessed would march down the screen; the fortunes would be
378   stored in parsable format into the file twain.  If, however, you planned
379   to edit (perhaps to remove the quotes from the original file, you might
380   then wish to redirect stderr to stdout.  Using bash:
381   fortune -am '-- Mark Twain' &>twain
382     or
383   fortune -am '-- Mark Twain' >twain 2>&1
384
385   [The above is now in the man page, more or less]
386
387 Late September, 1995
388   Too many changes to mention, really.  Look at the source code for
389   comments on individual files.  LINUX.DIF has been removed.
390
391   It is worth noting that strfile was completely broken as distributed,
392   and fortune had code to make it report a different file list than the
393   one it used to retrieve fortunes.  There's some rather strong language
394   on the subject in strfile.c; if it offends you, tough.
395
396   Bugs were fixed, and some enhancements were added.  Unstr, in
397   particular, has had its command line considerably enhanced.  Strfile
398   now *really does* sort, instead of merely setting the 'sorted' flag.
399   Ditto for randomizing.
400
401   Noteworthy: the way to distinguish between offensive and non-offensive
402   files has changed for fortune.  A second directory (which may be a
403   subdirectory of the main fortune directory; the program doesn't
404   add files recursively down a directory tree) has been added to
405   pathnames.h.  Offensive files should be placed there.  There is no
406   longer any need to add the -o suffix to file names, and the problems
407   with finding files (especially offensive ones) seem to have
408   disappeared in the process.
409
410   Currently, I'm working on breaking the fortune files themselves into
411   smaller, more manageable pieces, checking spelling, punctuation, and
412   grammar, and trying to reduce redundancy.  The eventual goal, after
413   the files are cleaned up, is another set of files carrying HTML tags,
414   which would then massively simplify a CGI script that calls fortune.
415
416   New Makefiles.
417
418   A 'randstr' (I want to call it 'lottery,' but I won't) utility, which
419   amounts to a poor woman's stripped-down fortune, to illustrate some
420   other possible uses of strfile-type random-access strings files.
421
422   Amy A. Lewis   alewis@email.unc.edu
423