about summary refs log tree commit diff
path: root/db2/clib/getlong.c
diff options
context:
space:
mode:
Diffstat (limited to 'db2/clib/getlong.c')
-rw-r--r--db2/clib/getlong.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/db2/clib/getlong.c b/db2/clib/getlong.c
deleted file mode 100644
index 4e144b14dc..0000000000
--- a/db2/clib/getlong.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*-
- * See the file LICENSE for redistribution information.
- *
- * Copyright (c) 1996, 1997, 1998
- *	Sleepycat Software.  All rights reserved.
- */
-
-#include "config.h"
-
-#ifndef lint
-static const char sccsid[] = "@(#)getlong.c	10.3 (Sleepycat) 4/10/98";
-#endif /* not lint */
-
-#ifndef NO_SYSTEM_INCLUDES
-#include <errno.h>
-#include <limits.h>
-#include <stdlib.h>
-#endif
-
-#include "db.h"
-#include "clib_ext.h"
-
-/*
- * get_long --
- *	Return a long value inside of basic parameters.
- *
- * PUBLIC: void get_long __P((char *, long, long, long *));
- */
-void
-get_long(p, min, max, storep)
-	char *p;
-	long min, max, *storep;
-{
-	long val;
-	char *end;
-
-	__set_errno(0);
-	val = strtol(p, &end, 10);
-	if ((val == LONG_MIN || val == LONG_MAX) && errno == ERANGE)
-		err(1, "%s", p);
-	if (p[0] == '\0' || end[0] != '\0')
-		errx(1, "%s: Invalid numeric argument", p);
-	if (val < min)
-		errx(1, "%s: Less than minimum value (%ld)", p, min);
-	if (val > max)
-		errx(1, "%s: Greater than maximum value (%ld)", p, max);
-	*storep = val;
-}