getdelim: wrong specs

A

ais523

Ben said:
I think that this kind of dodge would consistently avoid EOF and
positive values:

enum {
MY_ERR_MIN = EOF ^ 0x100,

MY_ERR_FIRSTERR = MY_ERR_MIN,
MY_ERR_SECONDERR,
MY_ERR_ANOTHERERR,
...etc...

MY_ERR_SENTINEL,
MY_ERR_MAX = MY_ERR_SENTINEL - 1
};
Not if EOF is 0x100. There's also the risk that you might end up with
more than 256 error messages...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top