version 1.1, 1995/10/18 08:46:10 |
version 1.2, 1996/05/22 11:35:30 |
|
|
/* $NetBSD: cmds.c,v 1.3 1995/08/31 22:20:18 jtc Exp $ */ |
/* $NetBSD: cmds.c,v 1.4 1996/05/10 23:16:32 thorpej Exp $ */ |
|
|
/*- |
/*- |
* Copyright (c) 1980, 1992, 1993 |
* Copyright (c) 1980, 1992, 1993 |
|
|
#if 0 |
#if 0 |
static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/29/95"; |
static char sccsid[] = "@(#)cmds.c 8.2 (Berkeley) 4/29/95"; |
#endif |
#endif |
static char rcsid[] = "$NetBSD: cmds.c,v 1.3 1995/08/31 22:20:18 jtc Exp $"; |
static char rcsid[] = "$NetBSD: cmds.c,v 1.4 1996/05/10 23:16:32 thorpej Exp $"; |
#endif /* not lint */ |
#endif /* not lint */ |
|
|
#include <stdlib.h> |
#include <stdlib.h> |
|
|
} |
} |
p = lookup(cmd); |
p = lookup(cmd); |
if (p == (struct cmdtab *)-1) { |
if (p == (struct cmdtab *)-1) { |
error("%s: Ambiguous command.", cmd); |
/* if not a primary command, try a display specific one */ |
|
if (curcmd->c_cmd == 0 || !(*curcmd->c_cmd)(cmd, cp)) |
|
error("%s: Ambiguous command.", cmd); |
goto done; |
goto done; |
} |
} |
if (p) { |
if (p) { |
|
|
status(); |
status(); |
goto done; |
goto done; |
} |
} |
if (curcmd->c_cmd == 0 || !(*curcmd->c_cmd)(cmd, cp)) |
|
error("%s: Unknown command.", cmd); |
|
done: |
done: |
sigsetmask(omask); |
sigsetmask(omask); |
} |
} |