Paul Eggert <[email protected]> ha escrit: > Instead of returning one boolean and passing a bool * to return the > other, how about if we return two booleans? That would be a bit more > functional. One way to do this would be to return an enum that I > suppose could have two bits (four values).
That's what I thought of initially. Something along the lines of: #define EXCLUDE_NO 0x00 /* File should be included. */ #define EXCLUDE_OK 0x01 /* File should be excluded. */ #define EXCLUDE_FOUND 0x10 /* A matching entry was found. */ For some reason, it appeared to me that just adding an additional argument is less disruptive. But I'm OK with it either way, the most important thing is being able to tell how excluded_file_name took the decision: using a matching entry or because nothing matched the file name. Best regards, Sergey
