From 9f03bcd4f1494225138d49d3f4fa8832b2b9528b Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 1 Jul 2005 19:54:21 +0000 Subject: [PATCH] added some license info and comments git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@378 9efc2488-bf62-4759-914b-345cdb29e865 --- src/utils/utils.c | 16 ++++++++++++++++ src/utils/utils.h | 28 +++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/src/utils/utils.c b/src/utils/utils.c index 1e2f773..606aaf6 100644 --- a/src/utils/utils.c +++ b/src/utils/utils.c @@ -1,3 +1,19 @@ +/* +Copyright (C) 2005 Georgia Public Library Service +Bill Erickson +Mike Rylander + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +*/ + #include #include #include diff --git a/src/utils/utils.h b/src/utils/utils.h index faa31ca..ff12580 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -1,3 +1,19 @@ +/* +Copyright (C) 2005 Georgia Public Library Service +Bill Erickson +Mike Rylander + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +*/ + #ifndef UTILS_H #define UTILS_H @@ -32,8 +48,18 @@ int buffer_free( growing_buffer* gb ); int buffer_add_char(growing_buffer* gb, char c); +/* string escape utility method. escapes unicode embeded characters. + escapes the usual \n, \t, etc. + for example, if you provide a string like so: + + hello, + you + + you would get back: + hello,\n\tyou + + */ char* uescape( const char* string, int size, int full_escape ); -double get_timestamp_millis(); /* utility methods */ int set_fl( int fd, int flags ); -- 2.11.0