Welcome to Geoffrey Swift's βlog. Please subscribe to the Atom feed.


Tinyfugue 4 patched for GCC 4

The CHANGES file in Tinyfugue 5 explains that the user interface has changed: New screen handling. See "/help windows". What this means is that when changing between worlds, the whole screen is replaced to show only output from the selected world. Previously messages from each world would all appear in succession on screen.

As I multi-spod and hold conversations across several talkers at the same time, this new interface is not my personal preference. I would rather be using the time honoured classic, which is Tinyfugue 4. However I discovered recently that this older version no longer compiles on modern Linux distributions.

I had a look into this problem, and fixed the source code by retro fitting the relevant fixes already done in Tinyfugue 5. The changes were minimal, so it didn't take long to get this compiling for GCC 4 on Linux. I made a unified diff of these changes. This has come in handy twice for me now, so I hope this proves useful to someone else.

--- history.c.orig 2008-03-04 00:49:30.000000000 +0000 +++ history.c 2008-03-04 00:47:01.000000000 +0000 @@ -66,7 +66,9 @@ static struct History input[1]; static int wnmatch = 4, wnlines = 5, wdmatch = 2, wdlines = 5; -struct History globalhist[1], localhist[1]; +struct History globalhist_buf, localhist_buf; +struct History * const globalhist = &globalhist_buf; +struct History * const localhist = &localhist_buf; int log_count = 0; int norecord = 0; /* supress history (but not log) recording */ int nolog = 0; /* supress log (but not history) recording */ --- history.h.orig 2008-03-04 00:49:37.000000000 +0000 +++ history.h 2008-03-04 00:46:51.000000000 +0000 @@ -13,7 +13,7 @@ # ifndef NO_HISTORY extern void NDECL(init_histories); -extern struct History *FDECL(init_history,(struct History *hist, int maxsize)); +extern struct History *init_history(struct History *hist, int maxsize); extern void FDECL(free_history,(struct History *hist)); extern void FDECL(recordline,(struct History *hist, Aline *aline)); extern void FDECL(record_input,(CONST char *line, struct timeval *tv)); @@ -31,7 +31,7 @@ #define record_global(aline) recordline(globalhist, (aline)) #define record_local(aline) recordline(localhist, (aline)) -extern struct History globalhist[], localhist[]; +extern struct History * const globalhist, * const localhist; extern int log_count, norecord, nolog; # else /* NO_HISTORY */
Download: http://www.trollied.org/~blimey/tf4.diff (1 KB)

Comments for this post are now closed.