[FFmpeg-devel] [PATCH] compat/cuda/ptx2c: strip CR from each line

Timo Rothenpieler timo at rothenpieler.org
Tue Aug 29 11:49:49 EEST 2017


Am 29.08.2017 um 02:46 schrieb Ricardo Constantino:
> Windows nvcc + cl.exe produce a .ctx file with CR+LF newlines which
> need to be stripped to work with gcc.
> ---
>   compat/cuda/ptx2c.sh | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/compat/cuda/ptx2c.sh b/compat/cuda/ptx2c.sh
> index 1f37023290..44b08b6ea2 100755
> --- a/compat/cuda/ptx2c.sh
> +++ b/compat/cuda/ptx2c.sh
> @@ -29,7 +29,7 @@ NAME="$(basename "$IN" | sed 's/\..*//')"
>   printf "const char %s_ptx[] = \\" "$NAME" > "$OUT"
>   while read LINE
>   do
> -    printf "\n\t\"%s\\\n\"" "$(printf "%s" "$LINE" | sed 's/["\\]/\\&/g')" >> "$OUT"
> +    printf "\n\t\"%s\\\n\"" "$(printf "%s" "$LINE"  | sed -e 's/\r//g' -e 's/["\\]/\\&/g')" >> "$OUT"
>   done < "$IN"
>   printf ";\n" >> "$OUT"
>   
> 

seems fine to me.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3994 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170829/729ee0f3/attachment.bin>


More information about the ffmpeg-devel mailing list