Hi,
I'm revising the patches in the Debian ncurses package. Thought you
might be interested in this one, created in version 5.5-2 by Daniel
Jacobowitz:
,----
| ncurses (5.5-2) unstable; urgency=low
| [...]
| * Use shorter symlinks within terminfo directories when possible
| (e.g. xx -> xy instead of xx -> ../x/xy).
|
| -- Daniel Jacobowitz <
dan@...> Sun, 30 Apr 2006 16:35:05 -0400
`----
---
ncurses/tinfo/write_entry.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/ncurses/tinfo/write_entry.c
+++ b/ncurses/tinfo/write_entry.c
@@ -418,8 +418,13 @@
{
int code;
#if USE_SYMLINKS
- strcpy(symlinkname, "../");
- strncat(symlinkname, filename, sizeof(symlinkname) - 4);
+ if (first_name[0] == linkname[0])
+ strncpy (symlinkname, first_name, sizeof (symlinkname) - 1);
+ else
+ {
+ strcpy(symlinkname, "../");
+ strncat(symlinkname, filename, sizeof(symlinkname) - 4);
+ }
symlinkname[sizeof(symlinkname) - 1] = '\0';
#endif /* USE_SYMLINKS */
#if HAVE_REMOVE
(Of course, the indentation does not match your style.)
Cheers,
Sven
_______________________________________________
Bug-ncurses mailing list
Bug-ncurses@...
http://lists.gnu.org/mailman/listinfo/bug-ncurses