Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-14 Thread Paul B Mahol
On 11/12/18, Paul B Mahol wrote: > Copied and adopted from musl implementation. > * converted all 'long double' to 'double' > * removed %m support > > Signed-off-by: Paul B Mahol > --- > libavutil/Makefile | 1 + > libavutil/avsscanf.c | 971 +++ > l

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-13 Thread Tomas Härdin
tis 2018-11-13 klockan 12:47 +0100 skrev Paul B Mahol: > On 11/13/18, Tomas Härdin wrote: > > mån 2018-11-12 klockan 21:41 +0100 skrev Nicolas George: > > > Tomas Härdin (2018-11-12): > > > > Why not set locale instead? > > > > > > That would conflict with the wishes of the application. A library

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-13 Thread Paul B Mahol
On 11/13/18, Tomas Härdin wrote: > mån 2018-11-12 klockan 21:41 +0100 skrev Nicolas George: >> Tomas Härdin (2018-11-12): >> > Why not set locale instead? >> >> That would conflict with the wishes of the application. A library >> should >> never change global state. >> >> (Of course, the core of t

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-13 Thread Tomas Härdin
mån 2018-11-12 klockan 21:41 +0100 skrev Nicolas George: > Tomas Härdin (2018-11-12): > > Why not set locale instead? > > That would conflict with the wishes of the application. A library > should > never change global state. > > (Of course, the core of the problem is that locales are global stat

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Nicolas George
Tomas Härdin (2018-11-12): > Why not set locale instead? That would conflict with the wishes of the application. A library should never change global state. (Of course, the core of the problem is that locales are global state, this is braindead design.) Regards, -- Nicolas George signature

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Tomas Härdin
mån 2018-11-12 klockan 19:46 +0100 skrev Paul B Mahol: > Copied and adopted from musl implementation. >  * converted all 'long double' to 'double' > > Signed-off-by: Paul B Mahol > --- >  libavutil/avstring.c | 961 > Why not set locale instead? /Tomas __

[FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Paul B Mahol
Copied and adopted from musl implementation. * converted all 'long double' to 'double' * removed %m support Signed-off-by: Paul B Mahol --- libavutil/Makefile | 1 + libavutil/avsscanf.c | 971 +++ libavutil/avstring.c | 1 + libavutil/avstring.h |

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread James Almer
On 11/12/2018 3:46 PM, Paul B Mahol wrote: > Copied and adopted from musl implementation. > * converted all 'long double' to 'double' > > Signed-off-by: Paul B Mahol > --- > libavutil/avstring.c | 961 +++ > libavutil/avstring.h | 6 + > 2 files changed

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Michael Niedermayer
On Mon, Nov 12, 2018 at 07:46:45PM +0100, Paul B Mahol wrote: > Copied and adopted from musl implementation. > * converted all 'long double' to 'double' > > Signed-off-by: Paul B Mahol > --- > libavutil/avstring.c | 961 +++ > libavutil/avstring.h | 6 +

[FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Paul B Mahol
Copied and adopted from musl implementation. * converted all 'long double' to 'double' Signed-off-by: Paul B Mahol --- libavutil/avstring.c | 961 +++ libavutil/avstring.h | 6 + 2 files changed, 967 insertions(+) diff --git a/libavutil/avstring.c b/li

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Nicolas George
Paul B Mahol (2018-11-12): > How to document copyright of multiple authors? What is the issue? libavcodec/j2kenc.c does it quite well. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-dev

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Paul B Mahol
On 11/12/18, Nicolas George wrote: > Paul B Mahol (2018-11-12): >> Its origin is musl libc. Multiple authors. > > The mailing-list is not the proper place to document that. > > Do you realize you just did an unintentional copyright infringement? If > you were to commit as is, you would cause the p

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Nicolas George
Paul B Mahol (2018-11-12): > Its origin is musl libc. Multiple authors. The mailing-list is not the proper place to document that. Do you realize you just did an unintentional copyright infringement? If you were to commit as is, you would cause the project to make one more severe. Regards, --

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Paul B Mahol
On 11/12/18, Nicolas George wrote: > Paul B Mahol (2018-11-12): >> > Did you write this function? >> No > > Then the authorship and origin need to be documented. Its origin is musl libc. Multiple authors. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpe

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Nicolas George
Paul B Mahol (2018-11-12): > > Did you write this function? > No Then the authorship and origin need to be documented. Regards, -- Nicolas George ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Paul B Mahol
On 11/12/18, Carl Eugen Hoyos wrote: > 2018-11-11 17:41 GMT+01:00, Paul B Mahol : > >> +static long long scanexp(FFFILE *f, int pok) >> +{ >> +int c; >> +int x; >> +long long y; >> +int neg = 0; >> + >> +c = shgetc(f); >> +if (c=='+' || c=='-') { >> +neg = (c=='-');

Re: [FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-12 Thread Carl Eugen Hoyos
2018-11-11 17:41 GMT+01:00, Paul B Mahol : > +static long long scanexp(FFFILE *f, int pok) > +{ > +int c; > +int x; > +long long y; > +int neg = 0; > + > +c = shgetc(f); > +if (c=='+' || c=='-') { > +neg = (c=='-'); > +c = shgetc(f); > +if (c-'0'>=10

[FFmpeg-devel] [PATCH 1/2] lavu: add locale-independent sscanf implementation

2018-11-11 Thread Paul B Mahol
Signed-off-by: Paul B Mahol --- libavutil/avstring.c | 938 +++ libavutil/avstring.h | 6 + 2 files changed, 944 insertions(+) diff --git a/libavutil/avstring.c b/libavutil/avstring.c index f03dd25141..d33153a8f3 100644 --- a/libavutil/avstring.c +++ b/l