erkyrath / cheapglk Goto Github PK
View Code? Open in Web Editor NEWCheapass implementation of the Glk API
Home Page: http://eblong.com/zarf/glk/
License: MIT License
Cheapass implementation of the Glk API
Home Page: http://eblong.com/zarf/glk/
License: MIT License
In cgdate.c
, there is this:
#ifdef WIN32
#define mktime gli_mktime
Then later on:
#ifdef WIN32
time_t gli_mktime (struct tm * timeptr)
{
...
time_t ret = mktime(timeptr) - offset;
}
But since mktime
has been defined as gli_mktime
, this will call itself instead of calling the standard library function.
The simplest fix may be:
#define mktime(tm) gli_mktime(tm)
...
time_t ret = (mktime)(timeptr) - offset;
to avoid macro expansion inside of gli_mktime
.
As noted here: iftechfoundation/ifarchive-if-specs#2
Client code can, of course, wrap the include in extern "C", but it would be very convenient if instead glk.h itself had such a declaration, wrapped in #ifdef __cplusplus.
filemode_Read: The file must already exist; the player will be asked to select from existing files which match the usage.
If you type the name of a nonexistent file, return NULL.
gettimeofday() has been deprecated for a while.
glk_stream_open_resource() only works when running from a blorb file. We would like a way to support this call in a non-blorb context.
Proposal (from discussion with Graham):
./terp -dataresource 3:FILENAME ...
This means that when calling glk_stream_open_resource() or glk_stream_open_resource_uni() with argument 3, the given filename will be opened. Multiple -dataresource
arguments may be given. When running from a blorb, an argument overrides the blorb contents if the number matches.
(Glk library arguments are single-dash, interpreter arguments are double-dash. Sorry, it seemed clever when I was thirty.)
This feature will go into remglk also.
EDIT: -dataresource 3:FILENAME
, no equals sign.
This change will apply to all my interpreters. Keeping this open until they're all fixed. (Unless I decide to post duplicate bugs, but we'll see how long it takes me.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.