[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

Re: [zzdev] PATCH (0.55 bug): Subroutine args incorrectly propagated to curscr



Thanks again!

Ted


At 11:02 PM 10/27/98 -0500, you wrote:
>
>If you use the
>
>	&function
>
>syntax, with no explicit argument list, Perl propagates the current
>contents of @_ to the function as its argument list..
>
>This caused failures in ZigZag 0.55 when I pressed the control-R key.
>For some reason, @_ was not empty, and was propagated to the curses
>function `curscr', which would die with the message:
>
>	Curses function 'curscr' called with too many arguments at (eval 21) line 1.
>	        ...propagated at ./zigzag line 1888.
>	        ...propagated at ./zigzag line 1903.
>
>This patch fixes the bug.  I suggest that in the future the & syntax
>be avoided.
>
>--- zigzag.55	Tue Oct 27 22:55:17 1998
>+++ zigzag	Tue Oct 27 22:55:50 1998
>@@ -177,7 +177,7 @@
>    "q"                => 'view_quadrant_toggle(1);',
>    "R"		      => 'view_reset(0);',
>    "r"		      => 'view_reset(1);',
>-   "\cR"	      => 'display_refresh(&curscr); $@ = "";',
>+   "\cR"	      => 'display_refresh(curscr()); $@ = "";',
>    "T"                => 'atcursor_clone(0);',
>    "t"                => 'atcursor_clone(1);',
>    "V"                => 'view_raster_toggle(0);',
>
>
>Mark-Jason Dominus 	  			               mjd@xxxxxxxxxx
>
>
>
>
____________________________________________________
Theodor Holm Nelson, Visiting Professor of Environmental Information
 Keio University, Shonan Fujisawa Campus, Fujisawa, Japan
 Home Fax from USA: 011-81-466-46-7368  (If in Japan, 0466-46-7368)
Professorial home page http://www.sfc.keio.ac.jp/~ted/ 
_____________________________________________________
Permanent: Project Xanadu, 3020 Bridgeway #295, Sausalito CA 94965
 Tel. 415/ 331-4422, fax 415/332-0136  
http://www.xanadu.net
PERMANENT E-MAIL: ted@xxxxxxxxxx
_____________________________________________________
Quotation of the day, 98.10.28:
"The most incomprehensible thing about the universe is that it is
comprehensible."  Albert Einstein