avoids problems when the desired input string is const.
/* agxbput_n:
* Append string s of length n onto xb
*/
-int agxbput_n(agxbuf * xb, char *s, unsigned int ssz)
+int agxbput_n(agxbuf * xb, const char *s, unsigned int ssz)
{
if (xb->ptr + ssz > xb->eptr)
agxbmore(xb, ssz);
/* agxbput:
* Append string s into xb
*/
-int agxbput(agxbuf * xb, char *s)
+int agxbput(agxbuf * xb, const char *s)
{
unsigned int ssz = strlen(s);
/* agxbput_n:
* Append string s of length n into xb
*/
- extern int agxbput_n(agxbuf * xb, char *s, unsigned int n);
+ extern int agxbput_n(agxbuf * xb, const char *s, unsigned int n);
/* agxbput:
* Append string s into xb
*/
- extern int agxbput(agxbuf * xb, char *s);
+ extern int agxbput(agxbuf * xb, const char *s);
/* agxbfree:
* Free any malloced resources.
/* agxbput_n:
* Append string s of length n onto xb
*/
-int agxbput_n(agxbuf * xb, char *s, unsigned int ssz)
+int agxbput_n(agxbuf * xb, const char *s, unsigned int ssz)
{
if (xb->ptr + ssz > xb->eptr)
agxbmore(xb, ssz);
/* agxbput:
* Append string s into xb
*/
-int agxbput(agxbuf * xb, char *s)
+int agxbput(agxbuf * xb, const char *s)
{
unsigned int ssz = strlen(s);
/* agxbput_n:
* Append string s of length n into xb
*/
- extern int agxbput_n(agxbuf * xb, char *s, unsigned int n);
+ extern int agxbput_n(agxbuf * xb, const char *s, unsigned int n);
/* agxbput:
* Append string s into xb
*/
- extern int agxbput(agxbuf * xb, char *s);
+ extern int agxbput(agxbuf * xb, const char *s);
/* agxbfree:
* Free any malloced resources.