IMG_pnm.c
changeset 481 e77ad79ab3e0
parent 451 48116d511e5d
child 486 7bb8af91e887
equal deleted inserted replaced
480:a27e1662d61a 481:e77ad79ab3e0
    86                 if ( ! SDL_RWread(src, &ch, 1, 1) ) {
    86                 if ( ! SDL_RWread(src, &ch, 1, 1) ) {
    87                     return -1;
    87                     return -1;
    88                 }
    88                 }
    89             } while ( (ch != '\r') && (ch != '\n') );
    89             } while ( (ch != '\r') && (ch != '\n') );
    90         }
    90         }
    91     } while ( isspace(ch) );
    91     } while ( SDL_isspace(ch) );
    92 
    92 
    93     /* Add up the number */
    93     /* Add up the number */
    94     do {
    94     do {
    95         number *= 10;
    95         number *= 10;
    96         number += ch-'0';
    96         number += ch-'0';
    97 
    97 
    98         if ( !SDL_RWread(src, &ch, 1, 1) ) {
    98         if ( !SDL_RWread(src, &ch, 1, 1) ) {
    99             return -1;
    99             return -1;
   100         }
   100         }
   101     } while ( isdigit(ch) );
   101     } while ( SDL_isdigit(ch) );
   102 
   102 
   103     return(number);
   103     return(number);
   104 }
   104 }
   105 
   105 
   106 SDL_Surface *IMG_LoadPNM_RW(SDL_RWops *src)
   106 SDL_Surface *IMG_LoadPNM_RW(SDL_RWops *src)