[XForms] Discussion concerning development

Jason Cipriani jason.cipriani at gmail.com
Mon Mar 17 15:17:22 EDT 2008

To subscribers of the xforms list

On Fri, Mar 14, 2008 at 7:16 AM, Jens Thoms Toerring <jt at toerring.de> wrote:
> To subscribers of the xforms list
>  Hello,
>    going through parts of the code of XForms some things
>  got me puzzled and I would like to ask about your opinion:
>  a) It seems to be assumed that the compiler used to comile
>    XForms isn't even ANSI C89 compatible. This might have
>    been a problem at the time the XForms project was star-
>    ted, but nearly 19 years after this standard came out
>    is this something we still have to care about? Is there
>    anybody out there still using a pre-C89 compiler and
>    where for example realloc() called with a NULL pointer
>    as the first argument isn't the same as a call of
>    malloc() (i.e. the libc isn't ANSI C89 compliant)?

I think at this point it may even be save to assume C99 compliance,
which is now almost a decade in the past.

It seems reasonable to me to assume that anybody using a machine that
can run XForms is also using a compiler and libc that is less than 20
years old at this point. It also seems reasonable to assume that
anybody using a compiler and libc that is *more* than 20 years old has
more issues to worry about than compiling XForms.

>  b) In lots of places fixed upper limits exist, starting with
>    the maximum number of forms (a limitation I already have
>    removed), the number of popup menus and there entries,
>    number of file selectors, line lengths in text browsers
>    etc. etc. I don't know if these "arbitrary limits" were
>    introduced because the original authors didn't feel too
>    comfortable with dynamic memory allocation or if it was
>    assumed that having fixed sized arrays would simply be
>    faster (especially in the "old times" when memory allo-
>    cation handling wasn't that optimized as it tends to be
>    today).

Probably a little bit of both.

>    I am rather strongly opposed to arbitrary limits where-
>    ever they can be avoided since todays reasonable limits
>    can be a headache tomorrow ("Who will ever need more than
>    600kB of memory?") and would try to change the code as far
>    as possible to abvoid them. On the other hand I may not
>    be seeing the complete picture and these limits may have
>    some beneficial effects I am not aware of. Does anybody
>    see some good reasons for keeping them?

If they are causing problems, no. If they are not causing problems,
even though it *would* be better to have dynamic upper limits, there
is also the question of how much work it is to change it. I do not
know where all the fixed limits are, it has been some time since I dug
into XForms source.

>    Another point I am not too happy about some of the default
>  looks of XForms. For example I find that the default border
>  width of 3 pixels looks plain ugly - ten years ago pronounced
>  3D effects may have been the the rage, but nowadays it looks
>  to me pretty old-fashioned. Would anybody mind if I would re-
>  duce the default border width from 3 to 2 (I personally would
>  prefer 1, but that might be a bit too extreme a change)? You
>  can have kind of a preview of the effects if you start your
>  application with the "-bw 2" option, which changes the default
>  from 3 to 2.

I nearly always fl_set_border_width(1) anyway. I also think the
default look is pretty ugly. The default colors are a little mirky as
well, but that may just be a personal preference (and also in contrast
to gnome's brighter default colors) -- I almost always override the
defaults with fl_set_icm_color() to something brighter. I seem to have
settled on the following:

#define UI_COLOR_LIGHT       255, 255, 255
#define UI_COLOR_LTMID       224, 224, 224
#define UI_COLOR_MID         202, 202, 202
#define UI_COLOR_DARK        128, 128, 128
#define UI_COLOR_DARKER       96,  96,  96
#define UI_COLOR_INACTIVE     96,  96,  96

  fl_set_icm_color(FL_TOP_BCOL,    UI_COLOR_LIGHT);
  fl_set_icm_color(FL_LEFT_BCOL,   UI_COLOR_LIGHT);
  fl_set_icm_color(FL_MCOL,        UI_COLOR_LTMID);
  fl_set_icm_color(FL_COL1,        UI_COLOR_MID);
  fl_set_icm_color(FL_BOTTOM_BCOL, UI_COLOR_DARK);
  fl_set_icm_color(FL_RIGHT_BCOL,  UI_COLOR_DARK);
  fl_set_icm_color(FL_DARKER_COL1, UI_COLOR_DARKER);
  fl_set_icm_color(FL_INACTIVE,    UI_COLOR_INACTIVE);

>  The same question also arises for the use of bold, italic fonts
>  in popups and menus. Again I find them rather ugly and would
>  propose to use normal, non-italic fonts as the default...

Personally, I have no opinion about that. I think the italics are a
little harsh so I usually turn them off, otherwise I don't know.

To unsubscribe, send any message to
xforms-leave at bob.usuhs.mil or see: 
List Archive: http://bob.usuhs.mil/pipermail/xforms and
Development: http://savannah.nongnu.org/files/?group=xforms

More information about the Xforms mailing list