AKVELD@HROEUR51.BITNET (Ton Akveld --- E R C ---) (06/09/87)
Hi all,
I recently came across the next problem;
 1070    1       mvgetstr(10, 20, pword);
%CC-W-TOOMANYMACARGS, Argument list for macro "mvgetstr" contains
                too many arguments;  excess arguments ignored.
%CC-W-TOOFEWMACARGS, Argument list for macro "mvwgetstr" contains
                too few arguments;  missing arguments assumed to be null.
%CC-W-IGNORED, Unexpected "," ignored.
pword is declared as char[10]
I am using the right libraries and included curses (mvaddstr DOES work)
VAX C bug ??
please help
(VAX C V2.1-007 under VAX VMS V4.5)
Ton Akveld
Erasmus Universiteit Rotterdam
Holland
AKVELD @ HROEUR51 . BITNETLEICHTER-JERRY@YALE.ARPA.UUCP (06/11/87)
    I recently came across the next problem;
     1070    1       mvgetstr(10, 20, pword);
    %CC-W-TOOMANYMACARGS, Argument list for macro "mvgetstr" contains
                    too many arguments;  excess arguments ignored.
    
    %CC-W-TOOFEWMACARGS, Argument list for macro "mvwgetstr" contains
                    too few arguments;  missing arguments assumed to be null.
    
    %CC-W-IGNORED, Unexpected "," ignored.
    ...
    VAX C bug ??
    
    (VAX C V2.1-007 under VAX VMS V4.5)
A quick look at SYS$LIBRARY:CURSES.H reveals:
# define mvwgetstr(win,y,x,str)	(wmove(win,y,x)==ERR)?ERR:wgetstr(win,str)
# define mvgetstr(y,x)		mvwgetstr (stdscr, y, x)
mvgetstr() has been erroneously defined as taking only two parameters - the
str parameter is missing.  It, in turn, proceeds to call mvwgetstr() without
the str parameter - but mvwgetstr() is defined WITH the str parameter.  Hence,
the error messages you saw.
Congratulations!  You've found a genuine VAX C bug!
You should SPR this.  In the meantime, there's an easy work-around:  Make a
private copy of CURSES.H, correct the error, and use it.  Note:  If you find
that there is no file named SYS$LIBRARY:CURSES.H, your system manager has
installed VAX C using just the text libraries for the system include files.
In that case, to get your own copy of CURSES.H, do:
	$ LIBRARY SYS$LIBRARY:VAXCDEF/TEXT/EXTRACT:CURSES/OUTPUT:CURSES.H
BTW, version 2.2 of VAX C has been out for quite some time - V2.3 is almost
here - so you are dealing with old software.  However, the same problem appears
on my VMS 4.5/VAX C 2.2 system, so the problem MAY still be current.
							-- Jerry
-------rankin@EQL.Caltech.EDU (Pat Rankin) (06/12/87)
>> 1070 1 mvgetstr(10, 20, pword); >> %CC-W-TOOMANYMACARGS, Argument list for macro "mvgetstr" contains >> too many arguments; excess arguments ignored. >> %CC-W-TOOFEWMACARGS, Argument list for macro "mvwgetstr" contains >> too few arguments; missing arguments assumed to be null. >> (VAX C V2.1-007 under VAX VMS V4.5) > mvgetstr() has been erroneously defined as taking only two parameters - the > str parameter is missing. It, in turn, proceeds to call mvwgetstr() without > the str parameter - but mvwgetstr() is defined WITH the str parameter. > Congratulations! You've found a genuine VAX C bug! No need to SPR, it's fixed in the latest release: VAX C version V2.3-024.