[gradsusr] gsfpath bug?

Jennifer Adams jma at cola.iges.org
Mon Mar 30 15:53:09 EDT 2015


Yes, that is a bug, and your patch is all that is needed to fix it. Thank you very much for pointing this out! 
—Jennifer

On Mar 30, 2015, at 5:06 AM, KODAMA Chihiro <kodamac at jamstec.go.jp> wrote:

> Dear GrADS developers,
> 
> I encountered an trouble of gsfpath() function, and may found a bug in
> the (nearly) latest GrADS.
> 
> GrADS script which includes gsfpath(), say,
>  ...
>  rc = gsfallow('on')
>  rc = gsfpath('dir1 dir2')
>  ...
> never stops (I found it with GrADS ver. 2.1.a2).
> 
> It seems that the following line around line 3065 in gscrpt.c,
>  while (j<i) *(pcmn->ppath+j) = *(pvar->strng+j);
> , should be replaced with
>  while (j<i) { *(pcmn->ppath+j) = *(pvar->strng+j); j++; }
> to avoid infinite loop. I did not carefully read the whole source code,
> and my understanding may be wrong. (if so, please teach me!)
> 
> I hope it may help improve GrADS.
> 
> Sincerely,
> 
> Chihiro Kodama
> 
> -- 
> =====================================================
> KODAMA Chihiro, Ph.D.
> Dept. Seamless Environmental Prediction Research
> Japan Agency for Marine-Earth Science and Technology
> PHONE: +81-45-778-5623 (direct)
> URL:   http://kodama.fubuki.info/
> =====================================================
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr

--
Jennifer M. Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
111 Research Hall, Mail Stop 2B3
George Mason University
4400 University Drive
Fairfax, VA 22030 





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20150330/0b91f804/attachment.html 


More information about the gradsusr mailing list