X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Flib%2Fbreg.c;h=a0a907f75314df51862088c6de05d7e4b41558f0;hb=d8628580f5e43ec26d4816ac521cf2b1675a129b;hp=0f742d66650743e5d477fad9027dee64b2c1f1d4;hpb=cf9897108cc8288ac4eb23d6d1ef67176c479726;p=bacula%2Fbacula diff --git a/bacula/src/lib/breg.c b/bacula/src/lib/breg.c index 0f742d6665..a0a907f753 100644 --- a/bacula/src/lib/breg.c +++ b/bacula/src/lib/breg.c @@ -1,15 +1,7 @@ -/* - * Manipulation routines for BREGEXP list - * - * Eric Bollengier, March 2007 - * - * Version $Id$ - * - */ /* Bacula® - The Network Backup Solution - Copyright (C) 2006-2006 Free Software Foundation Europe e.V. + Copyright (C) 2006-2008 Free Software Foundation Europe e.V. The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. @@ -28,11 +20,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - BaculaÂ® is a registered trademark of John Walker. + Bacula® is a registered trademark of Kern Sibbald. The licensor of Bacula is the Free Software Foundation Europe - (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 ZÃ¼rich, + (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zuerich, Switzerland, email:ftf@fsfeurope.org. */ +/* + * Manipulation routines for BREGEXP list + * + * Eric Bollengier, March 2007 + * + * Version $Id$ + * + */ #include "bacula.h" @@ -340,7 +340,7 @@ char *BREGEXP::edit_subst(const char *fname, regmatch_t regs[]) /* escape sep char and \ * dest must be long enough (src*2+1) * return end of the string */ -char *bregexp_escape_string(char *dest, char *src, char sep) +char *bregexp_escape_string(char *dest, const char *src, const char sep) { char *ret = dest; while (*src) @@ -357,10 +357,10 @@ char *bregexp_escape_string(char *dest, char *src, char sep) return ret; } -static char regexp_sep = '!'; -static char *str_strip_prefix = "!%s!!i"; -static char *str_add_prefix = "!^!%s!"; -static char *str_add_suffix = "!([^/])$!$1%s!"; +static const char regexp_sep = '!'; +static const char *str_strip_prefix = "!%s!!i"; +static const char *str_add_prefix = "!^!%s!"; +static const char *str_add_suffix = "!([^/])$!$1%s!"; int bregexp_get_build_where_size(char *strip_prefix, char *add_prefix,