diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-11-23 01:19:15 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-11-23 01:19:15 +0000 |
commit | 4aa5e79cdf2435d9b53898130e63811e3a2a013c (patch) | |
tree | 42a2a96445c49501b086e23516aa3e7b94bb4da2 /src/utils.h | |
parent | fd3b313e9f11a298fe709246c34983438df02029 (diff) |
Added the chomp() function (to replace the trim() function reqs.c)
Diffstat (limited to 'src/utils.h')
-rw-r--r-- | src/utils.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/utils.h b/src/utils.h index 5979064..0fdf312 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1,4 +1,4 @@ -/* $Id: utils.h,v 1.11 2001-11-22 00:31:10 rjkaes Exp $ +/* $Id: utils.h,v 1.12 2001-11-23 01:19:15 rjkaes Exp $ * * See 'utils.h' for a detailed description. * @@ -23,6 +23,12 @@ #include "conns.h" +/* + * Error codes used within the utility functions. + */ +#define EERROR 1 /* Generic error */ +#define ENOMEMORY 2 /* Out of memory (or allocation error) */ + extern int send_http_message(struct conn_s *connptr, int http_code, const char *error_title, const char *message); extern int httperr(struct conn_s *connptr, int err, const char *msg); @@ -40,6 +46,8 @@ extern size_t strlcat(char *dst, const char *src, size_t size); extern size_t strlcpy(char *dst, const char *src, size_t size); #endif /* HAVE_STRLCPY */ +extern size_t chomp(char *buffer, size_t length); + /* * The following is to allow for better memory checking. */ |