Re: using local buffers.

From: Ron Poulton (ron@res.com)
Date: 09/14/95


For me, I use local buffers in many sections of Chrysalis instead of the 
global buffers provided.  Often I don't know what other parts of 
CircleMUD's using these buffers unless a routine specifically uses them 
and frees them, so if I don't know, I just define a buffer of a said 
number of bytes (depending on the circumstances; ANSI color strings won't 
take up more than 15 characters if I'm using all attributes, prompts 
don't take up more than 255 bytes in my game including colors, etc).

Btw, I know I can 'return "string"' in order to return a string from a 
char* function, but if I have a local buffer, how would I return a string 
in the same manner without returning the address of the local buffer?



This archive was generated by hypermail 2b30 : 12/07/00 PST