a pedantic ctype macro fix: move the unsigned cast inside i can think of one case where it matters: if EOF was defined as INT_MIN then (unsigned)(a - 'c') can overflow while ((unsigned)a - 'c') is ok (i know this is pathological and EOF is actually defined as -1)