commit 3ff524821cdb4a194f41b97952cb93745f477961
parent 290b25014198aa51aad95803cde2b1e1c28428d4
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Thu, 18 Jun 2020 12:31:22 +0200
tweaks: move a copyright notice to a better place, and improve it
The username_tab_completion() function taken from busybox-0.46 was
just a stub, it contained basically nothing. Chris himself wrote
the function in November 2000 (commit be77c611), and rewrote it in
January 2001 (commit 2c2c5f21).
The version of username_tab_completion() in that latter commit looks
somewhat like the version of Vladimir N. Oleynik <dzo@simtreas.ru>
(busybox commit 4e338757). That commit comes three days after Chris'
commit, but Vladimir's original email is from a week earlier:
http://lists.busybox.net/pipermail/busybox/2001-January/035687.html.
So... it is quite possible that Rocco saw that email and suggested
to Chris to rewrite username_tab_completion() using getpwent().
Anyway, the version that was taken from busybox-0.46 was just four
lines and thus not worthy of copyright. The two other functions
that were copied were heavily modified in 2000, so it's better to
add that year in the copyright notice. It is fine to tweak the
notice: it just says that the original authors must be attributed,
not that the exact text must remain unchanged.
Diffstat:
1 file changed, 14 insertions(+), 17 deletions(-)
diff --git a/src/files.c b/src/files.c
@@ -2362,23 +2362,6 @@ bool is_dir(const char *path)
return retval;
}
-/* These functions, username_tab_completion(), cwd_tab_completion(), and
- * input_tab(), were adapted from busybox 0.46 (cmdedit.c). Here is the
- * notice from that file, with the copyright years updated:
- *
- * Termios command-line History and Editing,
- * originally intended for NetBSD sh (ash)
- * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
- * Main code: Adam Rogoyski <rogoyski@cs.utexas.edu>
- * Etc: Dave Cinege <dcinege@psychosis.com>
- * Majorly adjusted/re-written for busybox:
- * Erik Andersen <andersee@debian.org>
- *
- * You may use this code as you wish, so long as the original author(s)
- * are attributed in any redistributions of the source code.
- * This code is 'as is' with no warranty.
- * This code may safely be consumed by a BSD or GPL license. */
-
/* We consider the first buf_len characters of buf for ~username tab
* completion. */
char **username_tab_completion(const char *buf, size_t *num_matches,
@@ -2411,6 +2394,20 @@ char **username_tab_completion(const char *buf, size_t *num_matches,
return matches;
}
+/* The next two functions, cwd_tab_completion() and input_tab(), were adapted
+ * from busybox 0.46 (cmdedit.c). Here is the tweaked notice from that file:
+ *
+ * Termios command-line History and Editing, originally intended for NetBSD.
+ * Copyright (C) 1999, 2000
+ * Main code: Adam Rogoyski <rogoyski@cs.utexas.edu>
+ * Etc: Dave Cinege <dcinege@psychosis.com>
+ * Adjusted/rewritten: Erik Andersen <andersee@debian.org>
+ *
+ * You may use this code as you wish, so long as the original author(s)
+ * are attributed in any redistributions of the source code.
+ * This code is 'as is' with no warranty.
+ * This code may safely be consumed by a BSD or GPL license. */
+
/* We consider the first buf_len characters of buf for filename tab
* completion. */
char **cwd_tab_completion(const char *buf, bool allow_files,