diff options
author | Jim Meyering <meyering@redhat.com> | 2007-10-08 10:34:04 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2007-10-08 10:47:40 +0200 |
commit | e6f4b28275316895ad8808a9d0abcc468df8780b (patch) | |
tree | 7bd4c3e13a773b3dfd074077f22ec75bbe1c7a22 /src/c99-to-c89.diff | |
parent | 689186b88ccf025664ca24ac8efa68699f12d85d (diff) | |
download | coreutils-e6f4b28275316895ad8808a9d0abcc468df8780b.tar.xz |
When forming a truncated name, use the "[...]" prefix even for
an extremely long name in the current directory.
* src/remove.c (full_filename_): Rename a local variable.
Use two separate "truncated" variables, in case the second
call to right_justify does not indicate any truncation -- which
would happen only if the single component FILENAME were longer
than 511 bytes and DIR_NAME were empty.
Diffstat (limited to 'src/c99-to-c89.diff')
-rw-r--r-- | src/c99-to-c89.diff | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/c99-to-c89.diff b/src/c99-to-c89.diff index f6c7664ed..76ecad28c 100644 --- a/src/c99-to-c89.diff +++ b/src/c99-to-c89.diff @@ -13,7 +13,7 @@ diff -upr src/remove.c src/remove.c assert (top_len >= 2); /* Pop the specified length of file name. */ -@@ -419,10 +420,11 @@ AD_stack_top (Dirstack_state const *ds) +@@ -422,10 +423,11 @@ AD_stack_top (Dirstack_state const *ds) static void AD_stack_pop (Dirstack_state *ds) { @@ -26,7 +26,7 @@ diff -upr src/remove.c src/remove.c if (top->unremovable) hash_free (top->unremovable); obstack_blank (&ds->Active_dir, -(int) sizeof (struct AD_ent)); -@@ -904,6 +906,7 @@ prompt (int fd_cwd, Dirstack_state const +@@ -907,6 +909,7 @@ prompt (int fd_cwd, Dirstack_state const break; } @@ -34,7 +34,7 @@ diff -upr src/remove.c src/remove.c char const *quoted_name = quote (full_filename (filename)); if (0 < write_protected) -@@ -943,6 +946,7 @@ prompt (int fd_cwd, Dirstack_state const +@@ -946,6 +949,7 @@ prompt (int fd_cwd, Dirstack_state const : _("%s: remove %s %s? ")), program_name, file_type (sbuf), quoted_name); } @@ -42,7 +42,7 @@ diff -upr src/remove.c src/remove.c if (!yesno ()) return RM_USER_DECLINED; -@@ -1562,6 +1566,7 @@ rm_1 (Dirstack_state *ds, char const *fi +@@ -1565,6 +1569,7 @@ rm_1 (Dirstack_state *ds, char const *fi return RM_ERROR; } @@ -50,7 +50,7 @@ diff -upr src/remove.c src/remove.c struct stat st; cache_stat_init (&st); cycle_check_init (&ds->cycle_check_state); -@@ -1584,6 +1589,7 @@ rm_1 (Dirstack_state *ds, char const *fi +@@ -1587,6 +1592,7 @@ rm_1 (Dirstack_state *ds, char const *fi AD_push_initial (ds); AD_INIT_OTHER_MEMBERS (); @@ -58,7 +58,7 @@ diff -upr src/remove.c src/remove.c enum RM_status status = remove_entry (AT_FDCWD, ds, filename, DT_UNKNOWN, &st, x); if (status == RM_NONEMPTY_DIR) -@@ -1602,6 +1608,8 @@ rm_1 (Dirstack_state *ds, char const *fi +@@ -1605,6 +1611,8 @@ rm_1 (Dirstack_state *ds, char const *fi ds_clear (ds); return status; } |