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 (commitmasterbe77c611
), and rewrote it in January 2001 (commit2c2c5f21
). 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.
parent
290b250141
commit
3ff524821c
31
src/files.c
31
src/files.c
|
@ -2362,23 +2362,6 @@ bool is_dir(const char *path)
|
||||||
return retval;
|
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
|
/* We consider the first buf_len characters of buf for ~username tab
|
||||||
* completion. */
|
* completion. */
|
||||||
char **username_tab_completion(const char *buf, size_t *num_matches,
|
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;
|
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
|
/* We consider the first buf_len characters of buf for filename tab
|
||||||
* completion. */
|
* completion. */
|
||||||
char **cwd_tab_completion(const char *buf, bool allow_files,
|
char **cwd_tab_completion(const char *buf, bool allow_files,
|
||||||
|
|
Loading…
Reference in New Issue