Titor8115 / mandown

man-page inspired Markdown viewer
GNU General Public License v3.0
246 stars 13 forks source link

Fails while compiling #10

Open 097115 opened 4 years ago

097115 commented 4 years ago

macOS 10.11:

gcc -c -g -O3 -fPIC -Wall -Wsign-compare -Iparser -Iblender -Iinclude -I/usr/include/libxml2   -c -o src/mandown.o src/mandown.c
gcc -c -g -O3 -fPIC -Wall -Wsign-compare -Iparser -Iblender -Iinclude -I/usr/include/libxml2   -c -o src/view.o src/view.c
src/view.c:104:19: error: use of undeclared identifier
      'A_ITALIC'
        attr[1] = A_ITALIC;
                  ^
1 error generated.
make: *** [src/view.o] Error 1
Titor8115 commented 4 years ago

Interesting, would you mind sharing your Ncurses version? I read somewhere that Homebrew has a new version of Ncursesw that links to the older Ncurses. I’ll do some search as well.

097115 commented 4 years ago

Interesting, would you mind sharing your Ncurses version?

Was 6.1, upgraded with Homebrew to 6.2 (via downloading this file), same error :)

Titor8115 commented 4 years ago

Interesting, would you mind sharing your Ncurses version?

Was 6.1, upgraded with Homebrew to 6.2 (via downloading this file), same error :)

Titor8115 commented 4 years ago

Interesting, would you mind sharing your Ncurses version?

Was 6.1, upgraded with Homebrew to 6.2 (via downloading this file), same error :)

That is strange... I did find A_ITALIC macro in the tar file you uploaded. Would you mind try one more thing by changing A_ITALIC to A_NORMAL and see if it would compile.

097115 commented 4 years ago

Yeah, it compiles[1] but doesn't display italics as a consequence :)

-- [1]: I also had to change Makefile:30 from this:

LDFLAGS=-g -O3 -Wl,--copy-dt-needed-entries -lncursesw -lxml2 -Wall -Werror

to this:

LDFLAGS=-g -O3 -Wl,-lncurses -lxml2 -Wall -Werror
Titor8115 commented 4 years ago

I’ll see what can be done.

The Makefile is under makeover. I didn’t expect the sudden increase in community and system at the beginning.

097115 commented 4 years ago

No problem :)

lucamot commented 4 years ago

On macOS, as a temporary fix, you could replace A_ITALIC with NCURSES_BITS(1U,23), which is the original definition in ncurses.h. Also, remove --copy-dt-needed-entries from LDFLAGS as already stated above.

097115 commented 4 years ago

you could replace A_ITALIC with NCURSES_BITS(1U,23)

@lucamot, the resulting file, compiled with these changes still doesn't display italics for me, though.

Titor8115 commented 4 years ago

@097115 I uploaded a new Makefile and view.h to fix the compile issue and A_ITALIC issue. It just hit my mind that the terminal emulator might be the reason ITALIC isn't rendered. What emulator are you using?

097115 commented 4 years ago

It just hit my mind that the terminal emulator might be the reason ITALIC isn't rendered

No :). I've tried iTerm and Alacritty, they both support italics.

(On this nw Makefile: it compiles now but italics indeed aren't rendered.)

Titor8115 commented 4 years ago

No :). I've tried iTerm and Alacritty, they both support italics.

(On this nw Makefile: it compiles now but italics indeed aren't rendered.)

Alright, I'll test it out if it is an issue across Mac OS. And I'll try to implement ANSI for the italics.

And thanks for the feedback!!!!