Vladimír Šeděnka
unread,Apr 6, 2011, 2:45:02 PM4/6/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Amelet-HDF
Hello,
I would like to open a discussion about constants
ABSOLUTE_PATH_NAME_LENGTH and ELEMENT_NAME_LENGTH in the Amelet-HDF
library (they set maximal allowed lengths of strings). In r271, Didier
changed ELEMENT_NAME_LENGTH to 51, but ABSOLUTE_PATH_NAME_LENGTH
remained at 101. That means max. 50 characters per item and max. 100
characters per each path in Amelet. In this case you have to check
both the limits.
As I told Cyril before, in order to make input checks easier, it would
be better to set ELEMENT_NAME_LENGTH and derive
ABSOLUTE_PATH_NAME_LENGTH from it as the worst case scenario. Then you
should care only about the first one. Here is the worst scenario I
found:
/mesh/<mesh_group_name>/<mesh_name>/selectorOnMesh/<SOM_name>
where the names enclosed in brackets are user-defined ...so the C
constants would be in this case (number 1 means space for the null
terminator):
ELEMENT_NAME_LENGTH = max_item_length + 1
ABSOLUTE_PATH_NAME_LENGTH = 3*max_item_length + 23 + 1
I think that the maximum length of a string attribute should be also
specified.
Any suggestions?
Regards,
Vladimir