> while (*p++ != 0x4D && p < pend); It is best to add a continue to the above. I remember one loop that ended up looking like: while (...) do { ... } while (...); David -- David Laight: david at l8s.co.uk