#ifndef lint
static const char rcsid[] =
- "$Id: interactive.c,v 1.22 2002/02/04 12:07:38 stelian Exp $";
+ "$Id: interactive.c,v 1.25 2002/07/19 14:57:39 stelian Exp $";
#endif /* not lint */
#include <config.h>
goto bad;
createfiles();
createlinks();
- setdirmodes(0);
+ setdirmodes(oflag ? FORCE : 0);
if (dflag)
checkrestore();
volno = 0;
(void) strcpy(canonname, ".");
else
(void) strcpy(canonname, "./");
- if (strlen(canonname) + strlen(rawname) >= len)
+ if (strlen(canonname) + strlen(rawname) >= (unsigned)len)
errx(1, "canonname: not enough buffer space");
(void) strcat(canonname, rawname);
list = &single;
mkentry(name, dp, list);
len = strlen(basename) + 1;
- if (strlen(name) - len > single.len) {
+ if (strlen(name) - len > (unsigned)single.len) {
freename(single.fname);
single.fname = savename(&name[len]);
single.len = strlen(single.fname);
entries = 0;
listp = list;
namelen = snprintf(locname, sizeof(locname), "%s/", name);
- if (namelen >= sizeof(locname))
+ if (namelen >= (int)sizeof(locname))
namelen = sizeof(locname) - 1;
while ((dp = rst_readdir(dirp))) {
if (dp == NULL)
bigino = ROOTINO;
endlist = &list[nentry];
for (fp = &list[0]; fp < endlist; fp++) {
- if (bigino < fp->fnum)
+ if (bigino < (int)fp->fnum)
bigino = fp->fnum;
if (width < fp->len)
width = fp->len;
* respond to interrupts
*/
void
-onintr(int signo)
+onintr(UNUSED(int signo))
{
int save_errno = errno;
#if HAVE_READLINE
+#if !HAVE_READLINE_RLCM
+#define rl_completion_matches completion_matches
+#endif
+
/* A static variable for holding the line. */
static char *line_read = NULL;
}
static char **
-restore_completion (const char *text, int start, int end)
+restore_completion (const char *text, int start, UNUSED(int end))
{
char **matches;
rl_readline_name = "dump";
rl_attempted_completion_function = restore_completion;
rl_completion_entry_function = NULL;
+#if HAVE_READLINE_CAC /* compile with readline 2.0 */
rl_completion_append_character = '\0';
+#endif
rl_instream = terminal;
}