On Mon, May 25, 2015 at 04:49:06PM +0200, Jochen Sprickerhof wrote:
* Ivan Tham <ivanthamjun...@gmail.com> [2015-05-25 19:57]:
I cannot patch it, when ``git apply st-scrollback.diff``::
error: patch failed: config.def.h:7
error: config.def.h: patch does not apply
error: patch failed: st.c:83
error: st.c: patch does not apply
$ git rev-parse HEAD
c03548750b2527a6ddb5edfd945c5799066a6224
$ sha256sum st-scrollback.diff
250681d44ba4c89cdaf358d89bab67f215826f84b04199427d174113f1484c06
st-scrollback.diff
$ git apply st-scrollback.diff
Now ``git apply`` does work, but:
$ git rev-parse HEAD
c03548750b2527a6ddb5edfd945c5799066a6224
$ sha256sum st-scrollback.diff
250681d44ba4c89cdaf358d89bab67f215826f84b04199427d174113f1484c06
st-scrollback.diff
$ git apply st-scrollback.diff
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: config.def.h
modified: st.c
Untracked files:
(use "git add <file>..." to include in what will be committed)
config.h
log
st-scrollback.diff
no changes added to commit (use "git add" and/or "git commit -a")
$ sudo make clean install
Does it works too when compiling with musl-gcc?
Should be no problem.
--
_____________________________________
< Do what you like, like what you do. >
-------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
cleaning
st build options:
CFLAGS = -g -std=c99 -pedantic -Wall -Wvariadic-macros -Os -I. -I/usr/include
-I/usr/X11R6/include -I/usr/include/freetype2 -I/usr/include/libpng16
-I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16
-I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16
-I/usr/include/harfbuzz -DVERSION="0.5" -D_XOPEN_SOURCE=600
LDFLAGS = -g -L/usr/lib -lc -L/usr/X11R6/lib -lm -lrt -lX11 -lutil -lXext
-lXft -lfontconfig -lfreetype -lfreetype
CC = cc
CC st.c
st.c: In function ‘tlinelen’:
st.c:87:6: error: ‘histsize’ undeclared (first use in this function)
+ histsize + 1) % histsize] : term.line[(y) - term.scr])
^
st.c:692:5: note: in expansion of macro ‘TLINE’
if(TLINE(y)[i - 1].mode & ATTR_WRAP)
^
st.c:87:6: note: each undeclared identifier is reported only once for each
function it appears in
+ histsize + 1) % histsize] : term.line[(y) - term.scr])
^
st.c:692:5: note: in expansion of macro ‘TLINE’
if(TLINE(y)[i - 1].mode & ATTR_WRAP)
^
st.c: In function ‘selsnap’:
st.c:87:6: error: ‘histsize’ undeclared (first use in this function)
+ histsize + 1) % histsize] : term.line[(y) - term.scr])
^
st.c:754:13: note: in expansion of macro ‘TLINE’
prevgp = &TLINE(*y)[*x];
^
st.c:744:18: warning: variable ‘xt’ set but not used [-Wunused-but-set-variable]
int newx, newy, xt, yt;
^
st.c: In function ‘getsel’:
st.c:87:6: error: ‘histsize’ undeclared (first use in this function)
+ histsize + 1) % histsize] : term.line[(y) - term.scr])
^
st.c:963:10: note: in expansion of macro ‘TLINE’
gp = &TLINE(y)[sel.nb.x];
^
st.c: In function ‘ttyread’:
st.c:1372:32: error: ‘histsize’ undeclared (first use in this function)
if(term.scr > 0 && term.scr < histsize-1)
^
st.c: In function ‘kscrollup’:
st.c:1539:17: error: ‘histsize’ undeclared (first use in this function)
if(term.scr <= histsize - n) {
^
st.c: In function ‘tscrolldown’:
st.c:1554:34: error: ‘histsize’ undeclared (first use in this function)
term.histi = (term.histi - 1 + histsize) % histsize;
^
st.c: In function ‘tscrollup’:
st.c:1581:35: error: ‘histsize’ undeclared (first use in this function)
term.histi = (term.histi + 1) % histsize;
^
st.c: In function ‘tresize’:
st.c:2890:36: error: ‘histsize’ undeclared (first use in this function)
term.hist = xrealloc(term.hist, histsize * sizeof(Line));
^
st.c: In function ‘drawregion’:
st.c:87:6: error: ‘histsize’ undeclared (first use in this function)
+ histsize + 1) % histsize] : term.line[(y) - term.scr])
^
st.c:3735:42: note: in expansion of macro ‘TLINE’
numspecs = xmakeglyphfontspecs(specs, &TLINE(y)[x1], x2 - x1, x1, y);
^
st.c: At top level:
st.c:1533:1: warning: ‘kscrollup’ defined but not used [-Wunused-function]
kscrollup(const Arg* a) {
^
Makefile:21: recipe for target 'st.o' failed
make: *** [st.o] Error 1