This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: gcc 3.0 & backward compatibility for libstdc++


On Sat, 23 Jun 2001, Laurent Pinchart wrote:

> > I cannot believe, though I don't know it, that ncurses really insists on
> > vscan.
>
>  From cursew.cc :
>
> int
> NCursesWindow::scanw(int y, int x, const char* fmt, ...)
> {
> #if defined(__GNUG__)
>      va_list args;
>      va_start(args, fmt);
>      char buf[BUFSIZ];
>      int result = wmove(w, y, x);
>      if (result == OK) {
> 	result = wgetstr(w, buf);
> 	if (result == OK) {
> 	    strstreambuf ss(buf, sizeof(buf));
> 	    result = ss.vscan(fmt, (_IO_va_list)args);
> 	}
>      }
>      va_end(args);
>      return result;
> #else
>      return ERR;
> #endif
> }
>

Ahh, now I can see the problem: Of course this doesn't belongs to the core
part of the ncurses library and it is up to you if you want to use the c++
interface of ncurses. When you plan to use that it is of course very
usefull to have such a function. But it is not very hard work to implement
this function with the libc vscanf functions.

Finally I found the definition of this symbol in the internal specs of the
c++ source of the gnu compiler. I don't know how to tune the internal
implementation of the __GNUG__ flag but you can see that it is
	__GNUG__=3
which can be checked:

> #if defined(__GNUG__)
	change toB
#if (__GNUG__ <= 2)

Since this only belongs to the c++ interface part of ncurses it should not
effect more features in the library.

CU INGO



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]