[MPlayer-cvslog] r36765 - trunk/help/help_check.sh

Alexander Strasser eclipse7 at gmx.net
Fri Jan 31 13:29:39 CET 2014


Hi Ingo!

On 2014-01-30 13:05 +0100, ib wrote:
> Author: ib
> Date: Thu Jan 30 13:05:35 2014
> New Revision: 36765
> 
> Log:
> Improve testing of the help message text headers.
> 
> It will detect now #define statements without replacement text.
> 
> Modified:
>    trunk/help/help_check.sh
> 
> Modified: trunk/help/help_check.sh
> ==============================================================================
> --- trunk/help/help_check.sh	Mon Jan 27 15:22:30 2014	(r36764)
> +++ trunk/help/help_check.sh	Thu Jan 30 13:05:35 2014	(r36765)
> @@ -16,7 +16,7 @@ for h in "$@"; do
>  #include "$h"
>  void $CHECK () {
>  EOF
> -  sed -n "s:^[ \t]*#define[ \t]\+\([0-9A-Za-z_]\+\)[ \t].*:strdup(\1);:p" "$h" >> ${CHECK}.c
> +  sed -n "s:^[ \t]*#define[ \t]\+\([0-9A-Za-z_]\+\)\(.*\):strdup(\1);:p" "$h" >> ${CHECK}.c

  Pardon me, but I wonder why you added the 2nd pair of parens?

  I mean why not instead:

-  sed -n "s:^[ \t]*#define[ \t]\+\([0-9A-Za-z_]\+\)[ \t].*:strdup(\1);:p" "$h" >> ${CHECK}.c
+  sed -n "s:^[ \t]*#define[ \t]\+\([0-9A-Za-z_]\+\).*:strdup(\1);:p" "$h" >> ${CHECK}.c

  Doesn't hurt the way it is, just consider me nitpicking about readability.

  Alexander

>    echo "}" >> ${CHECK}.c
>    $CC -Werror -c -o ${CHECK}.o ${CHECK}.c || exit
>  done
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-cvslog/attachments/20140131/d617dd98/attachment.asc>


More information about the MPlayer-cvslog mailing list