Enhanced GlkTerm

#1

I made Enhanced GlkTerm with many enhancements. The enhancements are explained in the file called “enhanced-readme”.

Download: http://zzo38computer.org/misc2/glkterm.zip

Here is a list of some of the new features:

  • Can use a .glktermrc file to store user preferences
  • Can display “More” when paging
  • Support paging when glk_exit() is called
  • Colours are supported
  • Can set read-only mode; most files opened by Glk fileref functions are read-only
  • You can also prohibit all file access entirely
  • Filename mapping
  • User-definable styles
  • Can disable mangling of filenames entered by glk_fileref_create_by_prompt()
  • Can set clock skew for the Glk date/time functions
  • VT100 line graphics for window borders
  • New command-line option – which makes it to treat further arguments as plain arguments (so filenames can have - at first)
0 Likes

#2

Please submit these as pull requests at github.com/erkyrath/glkterm

Obviously you’ve put in a lot of effort, so please ensure the changes get put in for consideration for merging into the official code.

0 Likes

#3

I don’t use git. However, anyone else is free to do if you like to do. If you do include some or all of my changes (possibly further modified, if you wish, for any reason), you are free to convert them to MIT license, or even to release to public domain if you prefer; you have my permission for these things.

However, I have looked at the most recent commits in that repository. One recent change is the use of mkstemp() instead of tmpnam(); I have already did that, before I saw this repository (my code is also a bit different; it checks for errors, and supports a user preference to change the template for the filename). The other is a minor change to gli_date_to_tm(), which I have just fixed now (and is now available for downloading).

0 Likes

(Petter Sjölund) #4

FYI, i just upped zzo38’s Enhanced GlkTerm source code to Github here, mostly to make the changes more readable.

0 Likes

(David Griffith) #5

I’ll have some good coding time soon and I’d like to get all this ready to merge with Zarf’s standard. @zzo38, would you please pm or email me with the email address you want inserted into the glkterm git repo so that everyone will know who made the changes?

0 Likes

#6

I have sent it to you by private message on this forums. However, I have fixed a few bugs having to do with the implementation of gestalt selector 0x14FE, so if you want to merge the coding having to do with that gestalt selector then you should redownload it.

0 Likes

(David Griffith) #7

Thanks. I’m going over your changes and testing them. I found one oddity, the following lines were missing from the “readme” file:

1.0.5###:
Fixed a struct initialization bug in gli_date_to_tm(). (I think this
caused no problems in practice.)
Replaced tmpnam() with mkstemp() (thanks David Griffith).

Were did you get the code upon which you made your changes?

0 Likes

#8

It was the previous version (from zarf’s webpage) that I got the code from to make my changes (although I independently had the same idea about mkstemp(), and after seeing the GitHub I also fixed the other bug).

0 Likes

(David Griffith) #9

It would be best if you could fork Zarf’s latest code at Github, apply your changes, and submit a pull request.

0 Likes

#10

As explained before, I do not use Git and do not really intend to get a GitHub account. However, I have now made the only correction I was missing (C++ style comments giving compiler warnings in glk.h, now changed to C style comments).

0 Likes

(David Griffith) #11

I’ve successfully merged Enhanced GlkTerm with a fork I took from @zarf’s repository. Now I’ll be poking at it to make sure it behaves as described.

2 Likes