On Sat, Feb 22, 2003 at 10:47:44PM -0300, Joao Luis Meloni Assirati wrote:
> This is my preliminary patch for inverse (dvi) search in lyx. It relies on
> latex to insert 'source specials', so latex must support the option
> --src-specials. Also, xdvi must support 'source specials'. My versions
> are:

It doesn't compile:
g++ -DHAVE_CONFIG_H -I. -I. -I. -I../boost   -isystem /usr/X11R6/include  -O
-fno-exceptions -W -Wall -Winline -c -o bufferlist.o test -f bufferlist.C ||
echo './'bufferlist.C
bufferlist.C: In member function Buffer* 
   BufferList::getBufferFromTmppath(const std::string&)':
   bufferlist.C:424: no matching function for call to std::basic_string<char, 
      std::char_traits<char>, std::allocator<char> >::compare(std::string&, int, 
   size_t) const'

(and there is a similar problem in lyxfunc.C)

I suggest using prefixIs(), and changing BufferList::getBufferFromTmppath to:
   for (; it != end; ++it) {
       if (prefixIs(s, (*it)->tmppath))
          return *it;
   }
   return 0;

Also, try implementing forward search.

Reply via email to