[MPlayer-dev-eng] ctype.h functions on win32
Rich Felker
dalias at aerifal.cx
Sun Oct 14 17:26:18 CEST 2007
On Sun, Oct 14, 2007 at 03:08:10PM +0200, Reimar Döffinger wrote:
> > Index: libvo/gl_common.c
> > ===================================================================
> > --- libvo/gl_common.c (revision 24775)
> > +++ libvo/gl_common.c (working copy)
> > @@ -389,7 +389,7 @@
> > */
> > int glCreatePPMTex(GLenum target, GLenum fmt, GLint filter,
> > FILE *f, int *width, int *height, int *maxval) {
> > - unsigned w, h, m, val, bpp;
> > + unsigned w, h, m, bpp;
> > char *data;
> > ppm_skip(f);
> > if (fgetc(f) != 'P' || fgetc(f) != '6')
> > @@ -403,8 +403,7 @@
> > ppm_skip(f);
> > if (fscanf(f, "%u", &m) != 1)
> > return 0;
> > - val = fgetc(f);
> > - if (!isspace(val))
> > + if (!isspace(fgetc(f)))
> > return 0;
> > if (w > MAXDIM || h > MAXDIM)
> > return 0;
>
> This is an unrelated (and IMO purely cosmetic) change.
Well, okay, the automatic cast back to int when calling isspace fixed
the bogus cast to unsigned in the assignment.
>
> > Index: libmenu/menu_console.c
> > ===================================================================
> > --- libmenu/menu_console.c (revision 24775)
> > +++ libmenu/menu_console.c (working copy)
> > @@ -444,7 +444,7 @@
> > return;
> > }
> >
> > - if(isascii(c)) {
> > + if(isascii((uint8_t) c)) {
> > int l = strlen(mpriv->cur_history->buffer);
> > if(l >= mpriv->cur_history->size) {
> > mpriv->cur_history->size += 255;
>
> I doubt this is correct.
> I actually doubt the original code makes much sense, but that is a
> different point.
Hm, I'd need more context to judge and don't have time to check it
now..
Rich
More information about the MPlayer-dev-eng
mailing list