|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: ┃ T c ┃
Length: 1273 (0x4f9) Types: TextFile Names: »cmd.c«
└─⟦87ddcff64⟧ Bits:30001253 CPHDIST85 Tape, 1985 Autumn Conference Copenhagen └─ ⟦this⟧ »cph85dist/rman/daemon/cmd.c«
#ifndef lint static char *RCSid = "$Header: cmd.c,v 1.6 85/08/27 15:16:18 broome Exp $"; #endif /* * $Log: cmd.c,v $ * Revision 1.6 85/08/27 15:16:18 broome * Last cleanup before release. * * Revision 1.5 85/07/16 11:06:58 broome * Added new "path" and "list" commands, makes debugging easier. * * Revision 1.4 85/07/06 16:55:44 broome * * Revision 1.3 85/07/03 17:34:15 broome * * Revision 1.2 85/07/02 21:05:40 broome * * Revision 1.1 85/06/25 11:23:31 broome * Initial revision */ #include "response.h" #include "cmd.h" #include <stdio.h> /* * Do the actual function calls here. */ funcall (argc, argv) int argc; char **argv; { register struct cmd *cmd; for (cmd = cmdtab; cmd < cmdtab + cmdtabsize; cmd++) { if (streql (cmd->name, *argv) == 0) { /* names match */ if (argc >= cmd->min && argc <= cmd->max) /* right # args */ (*cmd->func)(argc, argv); else /* bad arg count */ printf ("%d Usage: %s\r\n", ERR_SYNTAX, cmd->usage); (void) fflush (stdout); return; } } printf ("%d Command not recognized.\r\n", ERR_COMMAND); (void) fflush (stdout); }