is there anyway to use gets(); but have it terminate at a set ammount of data coming in rather than at a RETURN.
I would like to be able to send an ASCII character, say 'M' followed by 60bytes of data. So far i can do this fine with gets() but i need to follow it up with RETURN
thanks for any help,
Matt
Ttelmah Guest
Posted: Fri Jan 23, 2009 6:10 am
Don't use 'gets'. Look in the include file "input.c", and use the function 'get_string' instead. This behaves like 'gets', except that it allows you to set an upper length limit as well. It is by far the 'better' function to use, since gets, is so dangerous if a string arrives that is longer than expected....
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum