Shubham, > The struct bu_vls defines the char * before the string length. While writing > the import function for the annotation primitive, one has to > initialize(calloc) the char array to a corresponding size but the size is > defined later. I checked out the case for other primitives for other structs > as well. In every case the length is defined before the array, hence the > exact space is alloted(malloc or calloc). How to deal with this ? Can the > organisation of the vls_struct be changed?
I don't get it. The order of members in a struct is usually unimportant. Do you have a code example? However, what i can say is that you should deal with a bu_vls only via the bu_vls_~() functions. Never touch the member variables directly. E.g. use bu_vls_cstr() to retrieve the string. And, as an example of how to import and export strings you could look at extrude's sketch_name. > Currently there exists no directory for the annotations in librt/primitives, > hence no .patch . How should I submit the functions in annotation.c for > review? Add it first (svn add). BTW, could you please send me the link to your development log? Regards, Daniel ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ BRL-CAD Developer mailing list brlcad-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/brlcad-devel