+2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
+
+ * source.c (openp): Expand tilde in path entries.
+
2012-05-29 Doug Evans <dje@google.com>
* buildsym.c (block_compar): Fix comment.
}
strcpy (filename, current_directory);
}
+ else if (strchr(dir, '~'))
+ {
+ /* See whether we need to expand the tilde. */
+ int newlen;
+ char *tilde_expanded;
+
+ tilde_expanded = tilde_expand (dir);
+
+ /* First, realloc the filename buffer if too short. */
+ len = strlen (tilde_expanded);
+ newlen = len + strlen (string) + 2;
+ if (newlen > alloclen)
+ {
+ alloclen = newlen;
+ filename = alloca (alloclen);
+ }
+ strcpy (filename, tilde_expanded);
+ xfree (tilde_expanded);
+ }
else
{
/* Normal file name in path -- just use it. */