From: erickson Date: Fri, 1 Jul 2005 19:54:21 +0000 (+0000) Subject: added some license info and comments X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=38c7b072bbccf4f35f9e609cec1c437c06cfde40;p=Evergreen.git added some license info and comments git-svn-id: svn://svn.open-ils.org/ILS/trunk@1028 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/OpenSRF/src/utils/utils.c b/OpenSRF/src/utils/utils.c index 1e2f773a3e..606aaf6110 100644 --- a/OpenSRF/src/utils/utils.c +++ b/OpenSRF/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/OpenSRF/src/utils/utils.h b/OpenSRF/src/utils/utils.h index faa31ca584..ff125801af 100644 --- a/OpenSRF/src/utils/utils.h +++ b/OpenSRF/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 );