[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src/data ChangeLog filename.c
From: |
John Darrington |
Subject: |
[Pspp-cvs] pspp/src/data ChangeLog filename.c |
Date: |
Tue, 04 Apr 2006 07:30:46 +0000 |
CVSROOT: /sources/pspp
Module name: pspp
Branch:
Changes by: John Darrington <address@hidden> 06/04/04 07:30:46
Modified files:
src/data : ChangeLog filename.c
Log message:
Fixed bug in fn_interp_vars
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/data/ChangeLog.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/data/filename.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
Patches:
Index: pspp/src/data/ChangeLog
diff -u pspp/src/data/ChangeLog:1.8 pspp/src/data/ChangeLog:1.9
--- pspp/src/data/ChangeLog:1.8 Tue Mar 28 06:05:06 2006
+++ pspp/src/data/ChangeLog Tue Apr 4 07:30:46 2006
@@ -1,3 +1,7 @@
+Tue Apr 4 15:28:40 WST 2006 John Darrington <address@hidden>
+
+ * filename.ch (fn_interp_vars): Fixed small buglet.
+
Tue Mar 28 13:47:16 WST 2006 John Darrington <address@hidden>
* filename.[ch] (fn_interp_vars): Changed the signature and semantics
Index: pspp/src/data/filename.c
diff -u pspp/src/data/filename.c:1.5 pspp/src/data/filename.c:1.6
--- pspp/src/data/filename.c:1.5 Tue Mar 28 06:05:06 2006
+++ pspp/src/data/filename.c Tue Apr 4 07:30:46 2006
@@ -78,12 +78,15 @@
*/
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));
@@ -141,6 +144,7 @@
if (stop && *s == stop)
s++;
}
+ break;
default:
ds_putc (target, *s++);
@@ -592,10 +596,10 @@
int size = 2;
char *buffer = xmalloc (size);
if ( buffer)
- {
- buffer[0]='.';
- buffer[1]='\0';
- }
+ {
+ buffer[0]='.';
+ buffer[1]='\0';
+ }
return buffer;
@@ -889,10 +893,10 @@
#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
@@ -938,9 +942,9 @@
#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
- [Pspp-cvs] pspp/src/data ChangeLog filename.c,
John Darrington <=