Commit bb088058 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(main): Die with an error message if an unsupported output format

version is requested.
parent 167c742f
/* /*
* $Id: dbck.c,v 0.31 1996/06/09 13:54:24 byers Exp $ * $Id: dbck.c,v 0.32 1996/07/24 23:38:52 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995 Lysator Academic Computer Association. * Copyright (C) 1991, 1992, 1993, 1994, 1995 Lysator Academic Computer Association.
* *
* This file is part of the LysKOM server. * This file is part of the LysKOM server.
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
* Author: Per Cederqvist. * Author: Per Cederqvist.
*/ */
static char *rcsid = "$Id: dbck.c,v 0.31 1996/06/09 13:54:24 byers Exp $"; static char *rcsid = "$Id: dbck.c,v 0.32 1996/07/24 23:38:52 ceder Exp $";
#include "rcs.h" #include "rcs.h"
USE(rcsid); USE(rcsid);
...@@ -1485,6 +1485,15 @@ main (int argc, ...@@ -1485,6 +1485,15 @@ main (int argc,
oformat = atoi(optarg); oformat = atoi(optarg);
if (oformat == 0 && *optarg != '0') if (oformat == 0 && *optarg != '0')
restart_kom("%s: bad output format %s", argv[0], optarg); restart_kom("%s: bad output format %s", argv[0], optarg);
/* Enumerate all supported output formats here. */
switch (oformat)
{
case 0: /* Traditional. */
case 1: /* Introduced spring 1996 by David Byers. */
break;
default:
restart_kom("%s: unknown output format %ld", argv[0], oformat);
}
break; break;
default: default:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment