I thought the same thing when I saw the previous mod from Bob.   
bu_fgets() is already taking care of the line ending portably so it  
shouldn't matter if there's a newline.  If it does matter, that's  
certainly not sufficient.  Maybe when it was just fgets() that was  
some hack to help looping on Windows.  Dunno.  Probably can go away.

Cheers!
Sean



On Nov 20, 2009, at 10:50 AM, [email protected] wrote:

> Revision: 36571
>           http://brlcad.svn.sourceforge.net/brlcad/?rev=36571&view=rev
> Author:   d_rossberg
> Date:     2009-11-20 15:50:16 +0000 (Fri, 20 Nov 2009)
>
> Log Message:
> -----------
> replaced index() by strchr() as recommended by POSIX.1-2008 and MSVC
> however, i can't see the reason to determine the location of  
> newline at all, it won't be used in the code below
>
> Modified Paths:
> --------------
>     brlcad/trunk/src/nirt/showshot.c
>
> Modified: brlcad/trunk/src/nirt/showshot.c
> ===================================================================
> --- brlcad/trunk/src/nirt/showshot.c  2009-11-20 15:49:54 UTC (rev  
> 36570)
> +++ brlcad/trunk/src/nirt/showshot.c  2009-11-20 15:50:16 UTC (rev  
> 36571)
> @@ -106,7 +106,7 @@
>      while (bu_fgets(buf, BUF_LEN, stdin) != NULL) {
>       ++line_nm;
>       bp = buf;
> -     if ((nlp = index(bp, '\n')) != 0)
> +     if ((nlp = strchr(bp, '\n')) != 0)
>           *nlp = '\0';
>
>       /* Skip initial white space */
>
>
> This was sent by the SourceForge.net collaborative development  
> platform, the world's largest Open Source development site.
>
> ---------------------------------------------------------------------- 
> --------
> Let Crystal Reports handle the reporting - Free Crystal Reports  
> 2008 30-Day
> trial. Simplify your report design, integration and deployment -  
> and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> BRL-CAD Source Commits mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/brlcad-commits


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to