On Thu, Dec 14, 2000 at 07:10:49PM -0600, Craig A. Berry wrote:
> At 3:33 PM -0600 12/14/00, Jarkko Hietaniemi wrote:
> >*cough*
> >Changing a nice symbolic value to a naughty hardcoded value?
> >*cough* :-)
>
> Get something for that cough :-).
The below patch is exactly what my cough needed :-)
> >(I do understand what's the bug but I dislike naked numbers without
> > explanations...)
>
> Yes, I suppose the fact that the vendor supplied a confusing symbolic
> name for the value we didn't want (leading us to believe we wanted
> it) and none at all for the one we did want is no excuse, though
> laziness can be contagious (clearly you've never been exposed) :-).
> Thanks to Peter for testing. This against 8102 puts clothes on the
> naked number:
>
> --- vms/vms.c;-0 Fri Dec 8 14:28:19 2000
> +++ vms/vms.c Thu Dec 14 17:07:01 2000
> @@ -98,6 +98,9 @@
> #define expand_wild_cards(a,b,c,d) mp_expand_wild_cards(aTHX_ a,b,c,d)
> #define getredirection(a,b) mp_getredirection(aTHX_ a,b)
>
> +/* see system service docs for $TRNLNM -- NOT the same as LNM$_MAX_INDEX */
> +#define PERL_LNM_MAX_ALLOWED_INDEX 127
> +
> static char *__mystrtolower(char *str)
> {
> if (str) for (; *str; ++str) *str= tolower(*str);
> @@ -152,7 +155,7 @@
> }
> #endif
>
> - if (!lnm || !eqv || idx > LNM$_MAX_INDEX) {
> + if (!lnm || !eqv || idx > PERL_LNM_MAX_ALLOWED_INDEX) {
> set_errno(EINVAL); set_vaxc_errno(SS$_BADPARAM); return 0;
> }
> for (cp1 = (char *)lnm, cp2 = uplnm; *cp1; cp1++, cp2++) {
> [end of patch]
> --
> ____________________________________________
> Craig A. Berry
> mailto:[EMAIL PROTECTED]
--
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen