Lines Matching refs:buff
22 buff_addc (char* buff, char* buffEnd, int c)
24 int avail = buffEnd - buff;
27 return buff;
30 buff[0] = 0;
31 return buff + 1;
34 buff[0] = (char) c; /* add char and terminating zero */
35 buff[1] = 0;
36 return buff + 1;
40 buff_adds (char* buff, char* buffEnd, const char* s)
44 return buff_addb(buff, buffEnd, s, slen);
48 buff_addb (char* buff, char* buffEnd, const void* data, int len)
50 int avail = (buffEnd - buff);
53 return buff;
58 memcpy(buff, data, len);
60 buff += len;
63 if (buff >= buffEnd) { /* overflow */
64 buff[-1] = 0;
66 buff[0] = 0;
68 return buff;
72 buff_add (char* buff, char* buffEnd, const char* format, ... )
76 avail = (buffEnd - buff);
83 nn = vsnprintf( buff, avail, format, args);
97 buff += nn;
100 if (buff >= buffEnd)
101 buff[-1] = 0;
103 buff[0] = 0;
105 return buff;