B. Bogart wrote:
Hey all,
I searched the archives and looked at some of the code in SVN, but I'm still unsure how to do this.
I have a nested for loop that grabs the config options from the PTP camera. The length depends on the camera and its mode.
How can I append each name to a list suitable to be used by outlet_list?
choice 1 (if maximum length is known):
allocate t_atom out[MAX_LENGTH] on the stack (as a normal variable). set argc to the actual length.
choice 2 (if maximum length is not known):
loop through once to get the length malloc() sufficient space loop through again to copy the data send to outlet free() the space
choice 3 (an alternative):
send each config option to the outlet separately (may be more useful than having to parse a list later?)
Claude