Changeset 1241 in MondoRescue for branches/stable/mondo/src/common
- Timestamp:
- Mar 12, 2007, 2:22:55 AM (18 years ago)
- Location:
- branches/stable/mondo/src/common
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/mondo/src/common/libmondo-filelist.c
r1224 r1241 451 451 mr_msg(8, "Analyzing %s", file_to_analyze); 452 452 /* BERLIOS : to be checked */ 453 mr_asprintf(&strtmp, syscall_sprintf, mr_stresc(file_to_analyze, "`$\\\"", '\\'));453 mr_asprintf(&strtmp, syscall_sprintf, mr_stresc(file_to_analyze, "`$\\\"", BACKSLASH)); 454 454 mr_asprintf(&sys_call, "%s 2>> /dev/null", strtmp); 455 455 mr_free(strtmp); … … 1709 1709 { 1710 1710 int retval = 0; 1711 struct s_node *found_node ;1712 FILE *fin ;1713 FILE *fout ;1711 struct s_node *found_node = NULL; 1712 FILE *fin = NULL; 1713 FILE *fout = NULL; 1714 1714 char *fname = NULL; 1715 char *tmp ;1715 char *tmp = NULL; 1716 1716 size_t len = 0; // Scrub's patch doesn't work without that 1717 1717 … … 1750 1750 } 1751 1751 mr_msg(5, "Found '%s'", fname); 1752 t urn_wildcard_chars_into_literal_chars(tmp, fname);1752 tmp = mr_stresc(fname, WILDCHARS, BACKSLASH); 1753 1753 fprintf(fout, "%s\n", tmp); 1754 1754 mr_free(tmp); -
branches/stable/mondo/src/common/libmondo-string-EXT.h
r1178 r1241 39 39 40 40 extern char *media_descriptor_string(t_bkptype); 41 42 extern inline void turn_wildcard_chars_into_literal_chars(char *out,43 char *in); -
branches/stable/mondo/src/common/libmondo-string.c
r1195 r1241 103 103 } 104 104 in_out[i] = '\0'; 105 }106 107 108 inline void turn_wildcard_chars_into_literal_chars(char *strout, char *strin)109 {110 char *p, *q;111 112 for (p = strin, q = strout; *p != '\0'; *(q++) = *(p++)) {113 if (strchr("[]*?", *p)) {114 *(q++) = '\\';115 }116 }117 *q = *p; // for the final '\0'118 105 } 119 106 -
branches/stable/mondo/src/common/libmondo-string.h
r1168 r1241 32 32 char *percent_media_full_comment(struct s_bkpinfo *bkpinfo); 33 33 char *media_descriptor_string(t_bkptype); 34 inline void turn_wildcard_chars_into_literal_chars(char *out, char *in);
Note:
See TracChangeset
for help on using the changeset viewer.