*
*/
/*
- Bacula® - The Network Backup Solution
+ Bacula\81Â\81® - The Network Backup Solution
Copyright (C) 2006-2006 Free Software Foundation Europe e.V.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula\81Â\81® is a registered trademark of John Walker.
The licensor of Bacula is the Free Software Foundation Europe
- (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Z\81Ã\81¼rich,
Switzerland, email:ftf@fsfeurope.org.
*/
* add_prefix = !^!add_prefix! 5 bytes
* add_suffix = !([^/])$!$1add_suffix! 13 bytes
*/
- int str_size = (strip_prefix?strlen(strip_prefix)+4:0 +
- add_prefix?strlen(add_prefix)+5:0 + /* escape + 3*, + \0 */
- add_suffix?strlen(add_suffix)+14:0 ) * 2 + 3 + 1;
+ int str_size = ((strip_prefix?strlen(strip_prefix)+4:0) +
+ (add_prefix?strlen(add_prefix)+5 :0) + /* escape + 3*, + \0 */
+ (add_suffix?strlen(add_suffix)+14 :0) ) * 2 + 3 + 1;
+ Dmsg1(1, "bregexp_get_build_where_size = %i\n", str_size);
return str_size;
}
free_pool_memory(str_tmp);
- return ret;
+ return dest;
}
*
*/
/*
- Bacula® - The Network Backup Solution
+ Bacula\81Â\81® - The Network Backup Solution
Copyright (C) 2006-2006 Free Software Foundation Europe e.V.
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- Bacula® is a registered trademark of John Walker.
+ Bacula\81Â\81® is a registered trademark of John Walker.
The licensor of Bacula is the Free Software Foundation Europe
- (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+ (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Z\81Ã\81¼rich,
Switzerland, email:ftf@fsfeurope.org.
*/
int main(int argc, char *const *argv)
{
- printf("%s\n", bregexp_build_where("/tmp", NULL, ".old"));
- exit(0);
+ char tab[500];
+ int len = bregexp_get_build_where_size("/tmp", "/tmp/toto", ".old");
+
+ printf("%s\n", bregexp_build_where(tab, len, "/tmp", "/tmp/toto!", ".old"));
+ exit(0);
regex_t preg;