intfiction.org

The Interactive Fiction Community Forum
It is currently Mon Sep 24, 2018 5:33 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
PostPosted: Sun Aug 19, 2018 3:55 am 
Offline

Joined: Mon Dec 30, 2013 4:55 am
Posts: 109
I have a bug : without new line, the word is not displayed ; with new line, the word is displayed.
FROTZ V2.45pre Audio output disabled.
LUbuntu 16.04.5 LTS

Code:
[ Main;
   print "Hello";
];
The word is not displayed.
Quote:
[Hit any key to exit.]
Code:
[ Main;
   print "Hello^";
];
The word is displayed.
Quote:
Hello


Last edited by auraes on Sun Aug 19, 2018 7:20 am, edited 8 times in total.

Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Aug 19, 2018 4:33 am 
Offline

Joined: Wed Nov 12, 2014 5:20 pm
Posts: 158
Very late to the party, but if anyone is still wondering, Dumb Frotz builds just fine with the current GitLab code on my computer with macOS 10.12.6.

One warning:
Code:
$ make dfrotz
** Generating src/common/defs.h
** Generating src/common/version.c
** Generating src/common/git_hash.h
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: frotz_common.a(missing.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: frotz_common.a(missing.o) has no symbols
dumb_input.c:147:39: warning: implicit conversion from 'int' to 'char' changes value from 142 to -114 [-Wconstant-conversion]
      case '0': *dest++ = ZC_FKEY_MIN + 9; break;


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Aug 19, 2018 6:14 pm 
Offline
User avatar

Joined: Mon Dec 12, 2011 7:03 pm
Posts: 554
Location: Washington
auraes wrote:
I have a bug : without new line, the word is not displayed ; with new line, the word is displayed.
FROTZ V2.45pre Audio output disabled.
LUbuntu 16.04.5 LTS

Code:
[ Main;
   print "Hello";
];
The word is not displayed.
Quote:
[Hit any key to exit.]
Code:
[ Main;
   print "Hello^";
];
The word is displayed.
Quote:
Hello


Bug issue filed at https://gitlab.com/DavidGriffith/frotz/issues/84
It appears to affect the Frotz core. Windows Frotz behaves the same way.

[edit]
Fixed.

The problem is that the Frotz core usually won't flush the buffer until a newline (ZC_RETURN) is encountered. When the test program that provokes bad behavior ends, there are still characters in the buffer and then Frotz happily exits without those characters being flushed out. I suspect nobody found this bug until now because the final character has usually been a newline. Once I worked out what was going wrong, the fix was simple. I recommend all maintainers of the other Frotz ports to adopt this fix.

_________________
David Griffith


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Aug 20, 2018 10:33 am 
Offline
User avatar

Joined: Mon Dec 12, 2011 7:03 pm
Posts: 554
Location: Washington
Angstsmurf wrote:
Very late to the party, but if anyone is still wondering, Dumb Frotz builds just fine with the current GitLab code on my computer with macOS 10.12.6.

One warning:
Code:
$ make dfrotz
** Generating src/common/defs.h
** Generating src/common/version.c
** Generating src/common/git_hash.h
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: frotz_common.a(missing.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: frotz_common.a(missing.o) has no symbols
dumb_input.c:147:39: warning: implicit conversion from 'int' to 'char' changes value from 142 to -114 [-Wconstant-conversion]
      case '0': *dest++ = ZC_FKEY_MIN + 9; break;


What compiler are you using? I'm guessing Clang, because GCC doesn't have a "-Wconstant-conversion" flag. If I specify Clang on Linux, I don't get that warning, but instead this:
Code:
dumb_output.c:301:38: warning: data argument not used by format string [-Wformat-extra-args]
        printf((row == -1) ? ".." : "%02d", (row + 1) % 100);
                             ~~~~           ^
1 warning generated.

which is caused by a funky, though legal, use of the ternary operator.

Anyhow, I've pushed fixes for both of these complaints to the Gitlab repo.

_________________
David Griffith


Top
 Profile Send private message  
Reply with quote  
PostPosted: Mon Aug 20, 2018 11:59 am 
Offline

Joined: Wed Nov 12, 2014 5:20 pm
Posts: 158
DavidG wrote:
What compiler are you using? I'm guessing Clang, because GCC doesn't have a "-Wconstant-conversion" flag.

Yes, this is with the built-in Clang of Xcode 9.2 on macOS 10.12.6. Apple is notorious for using older versions of Clang in Xcode, so it is possible that the difference you see is due to using a more up-to-date Clang.


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Sep 08, 2018 1:24 am 
Offline

Joined: Mon Dec 30, 2013 4:55 am
Posts: 109
I recompiled the latest version of Frotz and it shows me as version name: none.
Quote:
FROTZ Vnone Curses interface. Audio output disabled.
An interpreter for all Infocom and other Z-Machine games.

And it looks like you're using the sdl2 library, but for the images it's sdl1.2; I don't know if this matters?


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Sep 08, 2018 9:24 pm 
Offline
User avatar

Joined: Mon Dec 12, 2011 7:03 pm
Posts: 554
Location: Washington
auraes wrote:
I recompiled the latest version of Frotz and it shows me as version name: none.
Quote:
FROTZ Vnone Curses interface. Audio output disabled.
An interpreter for all Infocom and other Z-Machine games.

And it looks like you're using the sdl2 library, but for the images it's sdl1.2; I don't know if this matters?


How did you download and build Frotz? What happens when you type "frotz -v"? Two ways I'm aware that that "none" will show up are 1) you try to build from a Git repository without the Git binary being in your path or 2) try to make a distribution tarball the wrong way. The proper way to make a distribution tarball is to do "make dist", which will alter the Makefile to replace those "none" strings with appropriate data provided by Git.

Code:
$ ldd sfrotz | grep -i sdl
        libSDL2_mixer-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libSDL2_mixer-2.0.so.0 (0x00007ff50e9bd000)
        libSDL2-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 (0x00007ff50e6a1000)


My machine is just pulling in SDL2. What does "ldd sfrotz" give you?

_________________
David Griffith


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sat Sep 08, 2018 11:45 pm 
Offline

Joined: Mon Dec 30, 2013 4:55 am
Posts: 109
DavidG wrote:
How did you download and build Frotz?
I downloaded from GitLab frotz-master.tar.gz
https://gitlab.com/DavidGriffith/frotz/ ... ter.tar.gz
I extract frotz-master directory to my Desk
I'm going in this one and type make.
DavidG wrote:
What happens when you type "frotz -v"?
Code:
FROTZ Vnone   Curses interface.  Audio output enabled.
Build:      20180909.62452
Git commit:   none
Git tag:   none
Git branch:   none
  Frotz was originally written by Stefan Jokisch.
  It complies with standard 1.0 of Graham Nelson's specification.
  It was ported to Unix by Galen Hazelwood.
  The core and Unix port are currently maintained by David Griffith.
  Frotz's homepage is https://661.org/proj/if/frotz/

DavidG wrote:
What does "ldd sfrotz" give you?
Code:
libSDL2_mixer-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libSDL2_mixer-2.0.so.0 (0x00007f420b7b3000)
libSDL2-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 (0x00007f420b4a0000)
For SDL I must have been wrong, it seemed to me that he refused to compile without libsdl-image1.2-dev. But not!


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Sep 09, 2018 6:03 am 
Offline
User avatar

Joined: Mon Dec 12, 2011 7:03 pm
Posts: 554
Location: Washington
auraes wrote:
DavidG wrote:
How did you download and build Frotz?
I downloaded from GitLab frotz-master.tar.gz
https://gitlab.com/DavidGriffith/frotz/ ... ter.tar.gz
I extract frotz-master directory to my Desk
I'm going in this one and type make.
DavidG wrote:
What happens when you type "frotz -v"?
Code:
FROTZ Vnone   Curses interface.  Audio output enabled.
Build:      20180909.62452
Git commit:   none
Git tag:   none
Git branch:   none
  Frotz was originally written by Stefan Jokisch.
  It complies with standard 1.0 of Graham Nelson's specification.
  It was ported to Unix by Galen Hazelwood.
  The core and Unix port are currently maintained by David Griffith.
  Frotz's homepage is https://661.org/proj/if/frotz/

DavidG wrote:
What does "ldd sfrotz" give you?
Code:
libSDL2_mixer-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libSDL2_mixer-2.0.so.0 (0x00007f420b7b3000)
libSDL2-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so.0 (0x00007f420b4a0000)
For SDL I must have been wrong, it seemed to me that he refused to compile without libsdl-image1.2-dev. But not!


You'll need to clone the repository and build from there. The Git info is lost when you download a tarball. I've filed an issue with Gitlab asking if there's some way I can have the Gitlab server run a script to take care of this prior to gathering files into a tarball.

_________________
David Griffith


Top
 Profile Send private message  
Reply with quote  
PostPosted: Sun Sep 09, 2018 9:41 am 
Offline

Joined: Mon Dec 30, 2013 4:55 am
Posts: 109
About Constant NO_SCORE:
without Constant NO_SCORE, Frotz displays Score and Moves;
with Constant NO_SCORE, Frotz displays only Moves but Windows Frotz and Gargoyle Bocfel displays nothing.
Who is right?
ReleaseNotes.html for the compiler says:
Quote:
The scoring system is completely disabled if you define a constant NO_SCORE near the start of your game.
Constant NO_SCORE;


Top
 Profile Send private message  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 44 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group