use const qualifier for environment variables
fix typo
cleanup code replace while loop by for loop
correct error handling
correct prototypes for trap access functions
correct trap input data pointer prototypes
define return code properly
simplify code by using TrapSimpAccess function where appropriate
correct trap input data prototypes
correct trap input data prototype
rename trap input/outpup data structures to common shared names acc/ret