+Tue Apr 4 15:28:40 WST 2006 John Darrington <john@darrington.wattle.id.au>
+
+ * filename.ch (fn_interp_vars): Fixed small buglet.
+
Tue Mar 28 13:47:16 WST 2006 John Darrington <john@darrington.wattle.id.au>
* filename.[ch] (fn_interp_vars): Changed the signature and semantics
*/
void
fn_interp_vars (struct string *target,
- const char *(*getenv) (const char *))
+ const char *(*getenv) (const char *))
{
+ char *input ;
+ char *s ;
+
assert (target);
- char *input = xmalloc(ds_length(target) + 1);
- char *s = input;
+ input = xmalloc(ds_length(target) + 1);
+ s = input;
strcpy(input, ds_c_str(target));
if (stop && *s == stop)
s++;
}
+ break;
default:
ds_putc (target, *s++);
int size = 2;
char *buffer = xmalloc (size);
if ( buffer)
- {
- buffer[0]='.';
- buffer[1]='\0';
- }
+ {
+ buffer[0]='.';
+ buffer[1]='\0';
+ }
return buffer;
#ifdef unix
/* A file's identity. */
struct file_identity
- {
- dev_t device; /* Device number. */
- ino_t inode; /* Inode number. */
- };
+{
+ dev_t device; /* Device number. */
+ ino_t inode; /* Inode number. */
+};
/* Returns a pointer to a dynamically allocated structure whose
value can be used to tell whether two files are actually the
#else /* not unix */
/* A file's identity. */
struct file_identity
- {
- char *normalized_filename; /* File's normalized name. */
- };
+{
+ char *normalized_filename; /* File's normalized name. */
+};
/* Returns a pointer to a dynamically allocated structure whose
value can be used to tell whether two files are actually the