n-t-roff / heirloom-ex-vi

The Traditional Vi (vi with many enhancements from Gunnar Ritter)
Other
70 stars 16 forks source link

Can't use tags file #1

Closed larryhynes closed 8 years ago

larryhynes commented 8 years ago

Hi

I've compiled this fine on my local (OSX) machine, but I can't get it to work with tags.

(local)~/src/exvi $ ./configure
Checking for make(1) ... yes
Checking for strlcpy(3) ... yes
Checking for strlcat(3) ... yes
Checking for -ltinfo ... no
Checking for -lncurses ... yes
(local)~/src/exvi $ make
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c exrecover.c
exrecover.c:227:22: warning: 'sbrk' is deprecated [-Wdeprecated-declarations]
        fendcore = (line *) sbrk(0);
                            ^
/usr/include/unistd.h:582:7: note: 'sbrk' has been explicitly marked deprecated here
void    *sbrk(int);
         ^
exrecover.c:266:15: warning: 'sbrk' is deprecated [-Wdeprecated-declarations]
        if ((char *) sbrk(H.Flines * sizeof (line)) == (char *) -1)
                     ^
/usr/include/unistd.h:582:7: note: 'sbrk' has been explicitly marked deprecated here
void    *sbrk(int);
         ^
2 warnings generated.
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c mapmalloc.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c compat.c
cc -o exrecover  -Wall -Wextra   exrecover.o mapmalloc.o compat.o 
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c expreserve.c
cc -o expreserve  -Wall -Wextra   expreserve.o compat.o 
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex.c
ex.c:530:22: warning: 'sbrk' is deprecated [-Wdeprecated-declarations]
        fendcore = (line *) sbrk(0);
                            ^
/usr/include/unistd.h:582:7: note: 'sbrk' has been explicitly marked deprecated here
void    *sbrk(int);
         ^
1 warning generated.
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_addr.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_cmds.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_cmds2.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_cmdsub.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_data.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_extern.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_get.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_io.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_put.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_re.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_set.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_subr.c
ex_subr.c:529:14: warning: 'sbrk' is deprecated [-Wdeprecated-declarations]
        if ((char *)sbrk(pg * sizeof (line)) == (char *)-1)
                    ^
/usr/include/unistd.h:582:7: note: 'sbrk' has been explicitly marked deprecated here
void    *sbrk(int);
         ^
1 warning generated.
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_tagio.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_temp.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_tty.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_unix.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_v.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_vadj.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_vget.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_vmain.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_voper.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_vops.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_vops2.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_vops3.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_vput.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_vwind.c
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c printf.c
printf.c:347:15: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare]
        while (value >= BIG && (lval = value - BIG) >= 0) {
               ~~~~~ ^  ~~~
1 warning generated.
cc  -Wall -Wextra    -DLISPCODE -DCHDIR -DFASTTAG -DUCVISUAL -DMB -DBIT8  -DVMUNIX  -DEXRECOVER=\"/usr/local/libexec/exrecover\" -DEXPRESERVE=\"/usr/local/libexec/expreserve\" -DPRESERVEDIR=\"/var/preserve\"  -I./libuxre -DUXRE  -DHAVE_STRLCPY -DHAVE_STRLCAT -c ex_version.c
cd libuxre && /Applications/Xcode.app/Contents/Developer/usr/bin/make CC="cc" \
        COPT=" -Wall -Wextra    -DVMUNIX"
cc     -Wall -Wextra    -DVMUNIX -I. -c onefile.c
cc     -Wall -Wextra    -DVMUNIX -I. -c regfree.c
cc     -Wall -Wextra    -DVMUNIX -I. -c regerror.c
ar crs libuxre.a onefile.o regfree.o regerror.o
cd libterm && /Applications/Xcode.app/Contents/Developer/usr/bin/make CC="cc" \
        COPT=" -Wall -Wextra    -DVMUNIX"
# COPT comes from ex
cc  -DCM_N -DCM_GT -DCM_B -DCM_D -Wall -Wextra    -DVMUNIX -c termcap.c
# COPT comes from ex
cc  -DCM_N -DCM_GT -DCM_B -DCM_D -Wall -Wextra    -DVMUNIX -c tgoto.c
# COPT comes from ex
cc  -DCM_N -DCM_GT -DCM_B -DCM_D -Wall -Wextra    -DVMUNIX -c tputs.c
ar crs libtermlib.a termcap.o tgoto.o tputs.o
cc -o ex  -DHAVE_STRLCPY -DHAVE_STRLCAT ex.o ex_addr.o ex_cmds.o ex_cmds2.o ex_cmdsub.o ex_data.o ex_extern.o ex_get.o ex_io.o ex_put.o ex_re.o ex_set.o ex_subr.o ex_tagio.o ex_temp.o ex_tty.o ex_unix.o ex_v.o ex_vadj.o ex_vget.o ex_vmain.o ex_voper.o ex_vops.o ex_vops2.o ex_vops3.o ex_vput.o ex_vwind.o printf.o ex_version.o mapmalloc.o  -Wall -Wextra   -lncurses \
        -L./libuxre -luxre
size ex
__TEXT  __DATA  __OBJC  others  dec hex
278528  143360  0   4295012352  4295434240  100072000
sed 's"BINDIR"/usr/local/bin"g' wvi >wvi.out
(local %)~/src/exvi $ ctags ex.c
(local %)~/src/exvi $ tail tags
Mex ex.c    /^main(register int ac, register char *av[])$/
erropen ex.c    /^erropen(void)$/
init    ex.c    /^init(void)$/
invopt  ex.c    /^invopt(int c)$/
iownit  ex.c    /^iownit(char *file)$/
needarg ex.c    /^needarg(int c)$/
setsig  ex.c    /^setsig(int signum, shand handler)$/
tailpath    ex.c    /^tailpath(register char *p)$/
usage   ex.c    /^usage(void)$/

Running :ta Mex, for instance, in vi gives Mex: Bad tags file entry. Running :ta foo, where foo is any of the tags in the tags file in the current dir returns the same error, foo: Bad tags file entry.

As a very minimal example, if I run vi with only set tags=tags in .exrc, and make a simple tags file with just the following in it

$ cat tags
exrc    $HOME/.exrc /^/

then running :ta exrc returns the same error.

I can use tag files and tags no problem with a 'stock' heirloom ex-vi (Version 4.0 (gritter) 3/25/05), but not with the one I build from this repo (Version 4.1.2 (gritter) 9/5/16).

What am I missing?

n-t-roff commented 8 years ago

With 'stock' heirloom vi you maybe refering to the latest release 050325. But repo here is using the very latest commit from gunnar, which he did nearly two years later on 2/25/2007. Already in this commit (which contains only changes done by Gunnar) tags don't work.

I did use tags long ago, now I simply use grep -r or git grep. Not superior--just a personal preference to get the work done in time. So I didn't test tags for Gunnar's vi--sorry. (... I did test tags for the original vi ports--there it works.)

So I thank you very much for reporting the issue--I'll have a look and try to fix it ASAP.

n-t-roff commented 8 years ago

GitHub closes an issue if the issue number appears in the commit message--sorry. Please test and reopen if it still fails.

larryhynes commented 8 years ago

Working so far - thank you! I'll let you know if there are any issues once I've used it for a while.

n-t-roff commented 7 years ago

Hi Larry,

I don't intent to do development to Gunnars vi (except for good reason), this repo is just for fixing bugs. Since you've found a substantial bug it is worth to generate a new release (even if the code change is less than insignificant...). Have you found further issues? If not I prepare the release next weeks (or start of next year, there's no hurry).

larryhynes commented 7 years ago

That's great - thanks for your work. I haven't had any further issues with tags, and nothing else comes to mind at the moment. If I do find anything at any stage I'll report it here.