Coder Social home page Coder Social logo

vidtex's People

Contributors

simonlaszcz avatar

Stargazers

 avatar  avatar

Watchers

 avatar

vidtex's Issues

[-Werror] Multiple errors when compiling under gcc on Linux

Hello,

Many thanks for fixing the issue I raised in #2! I've been able to confirm that issue is fixed.

However, I did need to edit the Makefile.am file to do so. As part of the changes in commit 3062c06, the -Werror CFLAG was added to transform all warnings into errors, and in so doing, the program no longer compiles without changes. The errors are:

gcc -DPACKAGE_NAME=\"vidtex\" -DPACKAGE_TARNAME=\"vidtex\" -DPACKAGE_VERSION=\"1.3.0\" -DPACKAGE_STRING=\"vidtex\ 1.3.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_NCURSESW=1 -DHAVE_CURSES=1 -DHAVE_CURSES_ENHANCED=1 -DHAVE_CURSES_COLOR=1 -DHAVE_CURSES_OBSOLETE=1 -DHAVE_NCURSESW_CURSES_H=1 -DHAVE_CURSES_ENHANCED=1 -DHAVE_CURSES_COLOR=1 -DHAVE_CURSES_OBSOLETE=1 -DHAVE_NCURSES_H=1 -DPACKAGE=\"vidtex\" -DVERSION=\"1.3.0\" -I.    -std=gnu99 -Werror -Wall -Wextra -g -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/usr/include/ncursesw  -DSYSCONFDIR=\"/usr/local/etc/vidtex\" -g -O2 -MT src/vidtex-telesoft.o -MD -MP -MF src/.deps/vidtex-telesoft.Tpo -c -o src/vidtex-telesoft.o `test -f 'src/telesoft.c' || echo './'`src/telesoft.c
src/telesoft.c: In function ‘vt_tele_decode_header’:
src/telesoft.c:23:56: error: the comparison will always evaluate as ‘true’ for the address of ‘filename’ will never be NULL [-Werror=address]
   23 |     return state->frame_number == 1 && state->filename != NULL;
      |                                                        ^~
In file included from src/telesoft.c:1:
src/telesoft.h:25:10: note: ‘filename’ declared here
   25 |     char filename[FILENAME_MAX + 1];
      |          ^~~~~~~~
src/telesoft.c: In function ‘vt_tele_decode’:
src/telesoft.c:68:25: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
   68 |                         write(fd_out, &c, 1);
      |                         ^~~~~~~~~~~~~~~~~~~~
src/telesoft.c:111:21: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
  111 |                     write(fd_out, &c, 1);
      |                     ^~~~~~~~~~~~~~~~~~~~
src/telesoft.c:127:21: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
  127 |                     write(fd_out, &c, 1);
      |                     ^~~~~~~~~~~~~~~~~~~~
src/telesoft.c:166:25: error: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
  166 |                         write(fd_out, &c, 1);
      |                         ^~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:537: src/vidtex-telesoft.o] Error 1

The ignoring return value of ‘write’ errors show up no matter which version of gcc I use (down to 6.5.0) but the the comparison will always evaluate as ‘true’ error only shows up when I use a recent version of gcc (to be precise, it doesn't show up when I use gcc 10, but does when I use gcc 12; I do not have a version of gcc 11 installed to test with).

There is a further warning that would be turned into an error once these are fixed, as well (this output is taken from a compile session without -Werror):

gcc -DPACKAGE_NAME=\"vidtex\" -DPACKAGE_TARNAME=\"vidtex\" -DPACKAGE_VERSION=\"1.3.0\" -DPACKAGE_STRING=\"vidtex\ 1.3.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DHAVE_NCURSESW=1 -DHAVE_CURSES=1 -DHAVE_CURSES_ENHANCED=1 -DHAVE_CURSES_COLOR=1 -DHAVE_CURSES_OBSOLETE=1 -DHAVE_NCURSESW_CURSES_H=1 -DHAVE_CURSES_ENHANCED=1 -DHAVE_CURSES_COLOR=1 -DHAVE_CURSES_OBSOLETE=1 -DHAVE_NCURSES_H=1 -DPACKAGE=\"vidtex\" -DVERSION=\"1.3.0\" -I.    -std=gnu99 -Wall -Wextra -g -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -I/usr/include/ncursesw  -DSYSCONFDIR=\"/usr/local/etc/vidtex\" -g -O2 -MT src/vidtex-rc.o -MD -MP -MF src/.deps/vidtex-rc.Tpo -c -o src/vidtex-rc.o `test -f 'src/rc.c' || echo './'`src/rc.c
src/rc.c: In function ‘vt_rc_show_menu’:
src/rc.c:113:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  113 |         scanf("%d", &choice);
      |         ^~~~~~~~~~~~~~~~~~~~

I'm compiling the latest commit (4f87e71) on Gentoo Linux using gcc 12.2.1, glibc 2.36, and ncurses 6.3_p20221203.

If there's any more information you need, please let me know!

Interesting behaviour regarding double-height text

First of all - thank you so much for creating this client! It's literally the only F/OSS videotex software available for Linux that I can find. I've only really gotten into Viewdata over TCP very recently but I love this client - it's made things a lot more accessible for me.

For some reason, vidtex (using the Galax font) sometimes appears to have trouble rendering double-height text. I'm not entirely sure why - I don't know enough about the protocol to know, yet, and most double-height text renders properly. However, I do have some ideas. (The following screenshots are taken using the Sakura terminal emulator, though I have observed the same happening on xterm as well.)

An example of the problem can be seen on the TEEFAX-to-Viewdata server at teletext.matrixnetwork.co.uk port 6502. Going to page 165 in vidtex using the Galax Mode 7 font and the --galax option renders the page as follows:

p165 rendered in vidtex

Going to the same page in the binary TELSTAR Linux client shows seems to be the correct rendering:

p165 rendered in TELSTAR

Another page which fails in a similar way is p163, which also has an interesting glitch which may be part of why this issue is occurring. In vidtex, it looks like this:

p163 rendered in vidtex

If you look closely, the topmost version of the line (the one that's cut off) actually has a typo - the "m" in "Batman" is an "n", so it doesn't match the bottom line. Rendering the same page in TELSTAR makes this clearer and shows that TELSTAR ignores the bottom line:

p163 rendered in TELSTAR

I do not know if this is the correct rendering or not, but I do wonder - is vidtex expecting the two lines to be exactly the same and restarting the double-height render process if they aren't?

I don't know enough about the Videotex standards to know whether it's the correct behaviour to do this or to ignore the second line as TELSTAR seems to, but since I couldn't find an issue about this here I thought it would be appropriate to make one.

Thank you again for this client!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.