From: Daniel J S. <dan...@ie...> - 2004-07-25 02:19:36
|
Hans-Bernhard Broeker wrote: >On Sat, 24 Jul 2004, Daniel J Sebald wrote: > > > >>typedef enum en_key_stack_direction { >> VERTICAL, >> HORIZONTAL >>} t_key_stack_direction; >> >> > >[...] > >I would strongly recommend to prefix these enum labels with the word KEY_ >or even GPKEY_, to reduce the risk of namespace pollution. > Okay. GPKEY_ it is. >>/* Horizontal positions of the key box: (left, right, center) */ >> >> > >Why not just use the existing JUSTIFY and VERT_JUSTIFY enums from the >terminal layer for these? > Because the current code has its own versions of those and that is where I started from. Also, I didn't pay close attention to JUSTIFY/VERT_JUSTIFY. If you want to reuse those, which isn't a bad idea, I might suggest changing what is in term_api.h to typedef enum H_JUSTIFY { H_LEFT, H_CENTRE, H_RIGHT } H_JUSTIFY; typedef enum V_JUSTIFY { V_TOP, V_CENTRE, V_BOT } V_JUSTIFY; because typedef enum JUSTIFY { LEFT, CENTRE, RIGHT } JUSTIFY; typedef enum VERT_JUSTIFY { JUST_TOP, JUST_CENTRE, JUST_BOT } VERT_JUSTIFY; is one egregious example of lack of consistency. There really aren't too many occurrences to do a fast group replace on all the files. I'm sure it would mess up some patches, but those should be easy fixes from the compilation errors. Dan |