Support for the most recent TADS

53 views
Skip to first unread message

Chris Spiegel

unread,
Feb 12, 2016, 9:22:29 PM2/12/16
to gargl...@googlegroups.com
I just pushed a branch (tads3) which has experimental support for the
latest TADS release (2.5.17/3.1.3). There have been rumblings about a
new Gargoyle release, and it'd be rather embarrassing to release with an
outdated TADS interpreter.

The OS-specific layer is now a mixture of the old osansi*.c files and
osportable.cc pulled from FrobTADS. Ideally the osansi*.c files will be
completely replaced with FrobTADS versions (since those are modern and
maintained), but for the first cut I wanted to be as non-intrusive as
possible.

There is a lot of POSIX stuff in the FrobTADS layer, which theoretically
makes it less portable than the osansi*.c stuff, but osansi1.c includes
unistd.h, so portability beyond POSIX doesn't exist currently anyway. I
assume this is because, on Windows, MinGW is used, but I'm not sure.

On that note, I've only tested on Linux because that's all I have access
to. I'd be grateful if Windows/Mac developers could give the branch a
try and report any issues. In addition, any other comments are welcome.

There are deliberate warnings I've added in areas where I've replaced
osansi* routines with osportable ones. Obviously these will be removed
if things look good.

Brad Town

unread,
Mar 30, 2016, 7:55:35 PM3/30/16
to garglk-dev
That branch failed to build on my Mac with both MacPorts and Homebrew. I get the following errors:

tads/osportable.cc:215:19: error: use of undeclared identifier 'NGROUPS_MAX'
    if (grpSize NGROUPS_MAX or grpSize < 0)
                  ^
tads/osportable.cc:273:18: error: unknown type name 'clockid_t'; did you
mean 'clock_t'?
    static const clockid_t clockType = CLOCK_REALTIME;
                 ^~~~~~~~~
                 clock_t
/usr/include/sys/_types/_clock_t.h:30:33: note: 'clock_t' declared here
typedef __darwin_clock_t        clock_t;
                                ^
tads/osportable.cc:273:40: error: use of undeclared identifier
'CLOCK_REALTIME'
    static const clockid_t clockType = CLOCK_REALTIME;
                                       ^
3 errors generated.

I also got a lot of these warnings:

#warning Testing noui version

And the following warnings:

tads/tads3/vmrun.cpp:2555:21: warning: logical not is only applied to the
left hand side of this comparison [-Wlogical-not-parentheses]
                if (true_for_cond(valp))
                    ^~~~~~~~~~~~~~~~~~~
tads/tads3/vmrun.cpp:1103:32: note: expanded from macro 'true_for_cond'
     || ((v)->typ == VM_INT && !(v)->val.intval == 0))
                               ^                ~~
tads/tads3/vmrun.cpp:2555:21: note: add parentheses after the '!' to
evaluate the comparison first
tads/tads3/vmrun.cpp:1103:32: note: expanded from macro 'true_for_cond'
     || ((v)->typ == VM_INT && !(v)->val.intval == 0))
                               ^
tads/tads3/vmrun.cpp:2555:21: note: add parentheses around left hand side
expression to silence this warning
tads/tads3/vmrun.cpp:1103:32: note: expanded from macro 'true_for_cond'
     || ((v)->typ == VM_INT && !(v)->val.intval == 0))

Brad
 

Chris Spiegel

unread,
Mar 31, 2016, 11:17:09 PM3/31/16
to Brad Town, gargl...@googlegroups.com
On 03/30/2016 04:28 PM, Brad Town wrote:
> That branch failed to build on my Mac with both MacPorts and Homebrew. I
> get the following errors:
>
> [...]

Thanks for testing! I'll add fixes for these errors.

> I also got a lot of these warnings:
>
> #warning Testing noui version

I added these warnings during testing; I'll be sure they get removed.

> And the following warnings:
>
> tads/tads3/vmrun.cpp:2555:21: warning: logical not is only applied
> to the left hand side of this comparison [-Wlogical-not-parentheses]
> if (true_for_cond(valp))
> ^~~~~~~~~~~~~~~~~~~
> tads/tads3/vmrun.cpp:1103:32: note: expanded from macro 'true_for_cond'
> || ((v)->typ == VM_INT && !(v)->val.intval == 0))
> ^ ~~
> tads/tads3/vmrun.cpp:2555:21: note: add parentheses after the '!' to
> evaluate the comparison first
> tads/tads3/vmrun.cpp:1103:32: note: expanded from macro 'true_for_cond'
> || ((v)->typ == VM_INT && !(v)->val.intval == 0))
> ^
> tads/tads3/vmrun.cpp:2555:21: note: add parentheses around left hand
> side expression to silence this warning
> tads/tads3/vmrun.cpp:1103:32: note: expanded from macro 'true_for_cond'
> || ((v)->typ == VM_INT && !(v)->val.intval == 0))

This is unmodified TADS source; it looks like the compiler's just being
overly cautious, as the code appears fine.

I've got a more complete branch locally here that I've been doing some
testing on since pushing the previous branch. It brings in more
functionality from FrobTADS. Once I get it pushed, would you be willing
to do another build test to ensure it gets working on OS X?

Thank you again for the feedback, I appreciate it.

Chris

Nikos Chantziaras

unread,
Apr 1, 2016, 12:52:35 AM4/1/16
to gargl...@googlegroups.com
On 01/04/16 06:17, Chris Spiegel wrote:
>> And the following warnings:
>>
>> tads/tads3/vmrun.cpp:2555:21: warning: logical not is only applied
>> to the left hand side of this comparison [-Wlogical-not-parentheses]
>> if (true_for_cond(valp))
>> ^~~~~~~~~~~~~~~~~~~
>> tads/tads3/vmrun.cpp:1103:32: note: expanded from macro 'true_for_cond'
>> || ((v)->typ == VM_INT && !(v)->val.intval == 0))
>> ^ ~~
>> tads/tads3/vmrun.cpp:2555:21: note: add parentheses after the '!' to
>> evaluate the comparison first
>> tads/tads3/vmrun.cpp:1103:32: note: expanded from macro 'true_for_cond'
>> || ((v)->typ == VM_INT && !(v)->val.intval == 0))
>> ^
>> tads/tads3/vmrun.cpp:2555:21: note: add parentheses around left hand
>> side expression to silence this warning
>> tads/tads3/vmrun.cpp:1103:32: note: expanded from macro 'true_for_cond'
>> || ((v)->typ == VM_INT && !(v)->val.intval == 0))
>
> This is unmodified TADS source; it looks like the compiler's just being
> overly cautious, as the code appears fine.

I fixed most of these already (in QTads though, not in FrobTADS) and
upstreamed them to Mike Roberts, so the fixes should be included in the
next base code release.

The warnings are indeed harmless; you can ignore them.

Nikos Chantziaras

unread,
Apr 2, 2016, 2:39:51 PM4/2/16
to gargl...@googlegroups.com
On 01/04/16 07:52, Nikos Chantziaras wrote:
> I fixed most of these already (in QTads though, not in FrobTADS) and
> upstreamed them to Mike Roberts, so the fixes should be included in the
> next base code release.

I pushed the latest sources to the "next" branch:

https://github.com/realnc/frobtads/tree/next

Reply all
Reply to author
Forward
0 new messages