Comments (7)
For me the same.
$ make
cc -std=c99 -Wall -Wextra -pedantic -Os -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=600 -D_XOPEN_SOURCE_EXTENDED -o mtm vtparser.c mtm.c -lncursesw -lutil
/tmp/ccnurCA8.o: In function `sgr':
mtm.c:(.text+0x187c): undefined reference to `alloc_pair'
/tmp/ccnurCA8.o: In function `rc':
mtm.c:(.text+0x19f7): undefined reference to `alloc_pair'
collect2: error: ld returned 1 exit status
Makefile:14: recipe for target 'mtm' failed
make: *** [mtm] Error 1
from mtm.
It works on 19.04, fwiw.
from mtm.
I was able to install ncurses 6.1 on Ubuntu 18.04 by following the instructions at https://www.osetc.com/en/how-to-install-ncurse-library-in-ubuntu-debian-centos-fedora-linux.html, however, I don't know how to build mtm
using that specific library. If I can figure that out, it will hopefully compile.
from mtm.
I have Ubuntu 18.04 and want to try mtm. Is this making any progress? Can I help?
from mtm.
Never mind: I upgraded to Focal, and it compiles.
from mtm.
The following patch compiles it on 18.04 (but I don't see any colors):
diff --git a/mtm.c b/mtm.c
index 70011a2..c9c08e7 100644
--- a/mtm.c
+++ b/mtm.c
@@ -309,7 +309,12 @@ HANDLER(rc) /* RC - Restore Cursor */
n->gc = n->sgc; n->gs = n->sgs; /* save character sets */
/* restore colors */
+#if NCURSES_VERSION_PATCH <= 20180127
+ int cp = 1;
+ init_pair(cp, s->fg, s->bg);
+#else
int cp = alloc_pair(s->fg, s->bg);
+#endif
wcolor_set(win, cp, NULL);
cchar_t c;
setcchar(&c, L" ", A_NORMAL, cp, NULL);
@@ -330,7 +335,12 @@ ENDHANDLER
HANDLER(el) /* EL - Erase in Line */
cchar_t b;
+#if NCURSES_VERSION_PATCH <= 20180127
+ init_pair(1, s->fg, s->bg);
+ setcchar(&b, L" ", A_NORMAL, 1, NULL);
+#else
setcchar(&b, L" ", A_NORMAL, alloc_pair(s->fg, s->bg), NULL);
+#endif
switch (P0(0)){
case 0: wclrtoeol(win); break;
case 1: for (int i = 0; i <= x; i++) mvwadd_wchnstr(win, py, i, &b, 1); break;
@@ -359,7 +369,12 @@ ENDHANDLER
HANDLER(ech) /* ECH - Erase Character */
cchar_t c;
+#if NCURSES_VERSION_PATCH <= 20180127
+ init_pair(1, s->fg, s->bg);
+ setcchar(&c, L" ", A_NORMAL, 1, NULL);
+#else
setcchar(&c, L" ", A_NORMAL, alloc_pair(s->fg, s->bg), NULL);
+#endif
for (int i = 0; i < P1(0); i++)
mvwadd_wchnstr(win, py, x + i, &c, 1);
wmove(win, py, px);
@@ -506,7 +521,12 @@ HANDLER(sgr) /* SGR - Select Graphic Rendition */
#endif
}
if (doc){
+#if NCURSES_VERSION_PATCH <= 20180127
+ int p = 1;
+ init_pair(p, s->fg = fg, s->bg = bg);
+#else
int p = alloc_pair(s->fg = fg, s->bg = bg);
+#endif
wcolor_set(win, p, NULL);
cchar_t c;
setcchar(&c, L" ", A_NORMAL, p, NULL);
from mtm.
Closing the defect with the above patch.
from mtm.
Related Issues (20)
- Compiling in Alpine and Arch linux HOT 4
- Add `make uninstall` HOT 2
- Arrow Keys not working under Termion HOT 2
- /usr/lib/libncursesw.so.6: no version information available
- no cursor in emacs HOT 3
- Homebrew formula HOT 1
- Doesn't transmite mouse event
- Any plans for resizing screens? HOT 3
- Cursor flickers between virtual terminals while typing
- Strange behavior with Vim over SSH when using mtm in TTY
- Add LICENSE file
- Doesn't work on st and urxvt HOT 2
- xterm -e does not work correctly
- UTF-8 characters in PS1 issue in st HOT 2
- Use .POSIX as first line in makefile HOT 1
- Question on 24bit color support
- Arcane bug when using with a session manager (ie. abduco/tmux) HOT 2
- Allow us to add a wiki here for patches HOT 1
- invalid character input after ctrl+g input HOT 1
- Garbled colors in Kakoune HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mtm.