The naked_itemflags struct in library/include/dfhack/DFTypes.h appears to have some flags in the wrong positions - it claims to be the same as what's in 40d, yet in_inventory is the 3rd bit instead of the 4th bit (Rick's table skips 0x4 entirely).
Also, I'm fairly certain that Rick's assessment of 0x100000 being "item shows wear" is incorrect (item wear is actually an integer value stored elsewhere, 1 for "x", 2 for "X", 3 for "XX") - nearly all of these flags match exactly what I've personally reverse-engineered from version 0.23.130.23a (for some retro-tools I wrote), and in that version said flag indicated that the object was owned by a dwarf and thus shouldn't be touched by anyone else (except when clearing away debris for constructing a building). A quick check against 0.31.12 confirms that this is still the case - while clearing the flag won't clear the "Owned by:" in the item description (that's stored in a vector within the item object, the same vector that keeps track of where the item is physically located), clearing the flag does allow the item to be picked up by other dwarves and stored in a stockpile or taken to a garbage dump zone (which would have been ideal back in 40d for removing clothing from the floors of cluttered barracks) or possibly even to be claimed by another dwarf.
Similarly, the "narrow" flag (0x4000) doesn't actually mean "narrow" - it means "produced offsite" (i.e. shows up with parentheses around the name), while 0x8000 was (and probably still is) used for items being sold by a caravan (never completely figured out that flag).
Another side note - the dfhack sources come with batch files to generate project files for MSVC 2002 and 2003, but it won't actually compile with them because they don't have "intrin.h".