-/* $OpenBSD: factor.c,v 1.28 2016/07/11 18:30:21 tb Exp $ */
+/* $OpenBSD: factor.c,v 1.29 2016/08/14 18:34:48 guenther Exp $ */
/* $NetBSD: factor.c,v 1.5 1995/03/23 08:28:07 cgd Exp $ */
/*
if (*p == '-')
errx(1, "negative numbers aren't permitted.");
errno = 0;
- val = strtouq(buf, &p, 10);
+ val = strtoull(buf, &p, 10);
if (errno)
err(1, "%s", buf);
for (; isblank((unsigned char)*p); ++p)
if (argv[0][0] == '-')
errx(1, "negative numbers aren't permitted.");
errno = 0;
- val = strtouq(argv[0], &p, 10);
+ val = strtoull(argv[0], &p, 10);
if (errno)
err(1, "%s", argv[0]);
if (*p != '\0')
-/* $OpenBSD: cmp.c,v 1.14 2015/12/29 19:04:46 gsoares Exp $ */
+/* $OpenBSD: cmp.c,v 1.15 2016/08/14 18:34:48 guenther Exp $ */
/* $NetBSD: cmp.c,v 1.7 1995/09/08 03:22:56 tls Exp $ */
/*
if (pledge("stdio", NULL) == -1)
err(ERR_EXIT, "pledge");
- skip1 = argc > 2 ? strtoq(argv[2], NULL, 0) : 0;
- skip2 = argc == 4 ? strtoq(argv[3], NULL, 0) : 0;
+ skip1 = argc > 2 ? strtoll(argv[2], NULL, 0) : 0;
+ skip2 = argc == 4 ? strtoll(argv[3], NULL, 0) : 0;
if (!special) {
if (fstat(fd1, &sb1)) {
-/* $OpenBSD: cmds.c,v 1.77 2016/05/25 15:36:01 krw Exp $ */
+/* $OpenBSD: cmds.c,v 1.78 2016/08/14 18:34:48 guenther Exp $ */
/* $NetBSD: cmds.c,v 1.27 1997/08/18 10:20:15 lukem Exp $ */
/*
void
restart(int argc, char *argv[])
{
- quad_t nrestart_point;
+ off_t nrestart_point;
char *ep;
if (argc != 2)
fputs("restart: offset not specified.\n", ttyout);
else {
- nrestart_point = strtoq(argv[1], &ep, 10);
- if (nrestart_point == QUAD_MAX || *ep != '\0')
+ nrestart_point = strtoll(argv[1], &ep, 10);
+ if (nrestart_point == LLONG_MAX || *ep != '\0')
fputs("restart: invalid offset.\n", ttyout);
else {
fprintf(ttyout, "Restarting at %lld. Execute get, put "
void
page(int argc, char *argv[])
{
- int orestart_point, ohash, overbose;
+ off_t orestart_point;
+ int ohash, overbose;
char *p, *pager, *oldargv1;
if ((argc < 2 && !another(&argc, &argv, "file")) || argc > 2) {
-/* $OpenBSD: util.c,v 1.78 2016/07/28 21:37:45 tedu Exp $ */
+/* $OpenBSD: util.c,v 1.79 2016/08/14 18:34:48 guenther Exp $ */
/* $NetBSD: util.c,v 1.12 1997/08/18 10:20:27 lukem Exp $ */
/*-
cp = strchr(reply_string, ' ');
if (cp != NULL) {
cp++;
- size = strtoq(cp, &ep, 10);
+ size = strtoll(cp, &ep, 10);
if (*ep != '\0' && !isspace((unsigned char)*ep))
size = -1;
}
-/* $OpenBSD: memconfig.c,v 1.17 2015/12/21 21:37:09 mmcc Exp $ */
+/* $OpenBSD: memconfig.c,v 1.18 2016/08/14 18:34:48 guenther Exp $ */
/*-
* Copyright (c) 1999 Michael Smith <msmith@freebsd.org>
continue;
if (owner && strcmp(mrd[i].mr_owner, owner))
continue;
- printf("%qx/%qx %.8s ", mrd[i].mr_base, mrd[i].mr_len,
+ printf("%llx/%llx %.8s ", mrd[i].mr_base, mrd[i].mr_len,
mrd[i].mr_owner[0] ? mrd[i].mr_owner : "-");
for (j = 0; j < 32; j++) {
if ( ((1<<j) & mrd[i].mr_flags) == 0)
while ((ch = getopt(argc, argv, "b:l:o:")) != -1)
switch(ch) {
case 'b':
- mrd.mr_base = strtouq(optarg, &ep, 0);
+ mrd.mr_base = strtoull(optarg, &ep, 0);
if ((ep == optarg) || (*ep != 0))
help("set");
break;
case 'l':
- mrd.mr_len = strtouq(optarg, &ep, 0);
+ mrd.mr_len = strtoull(optarg, &ep, 0);
if ((ep == optarg) || (*ep != 0))
help("set");
break;
while ((ch = getopt(argc, argv, "b:l:o:")) != -1)
switch(ch) {
case 'b':
- mrd.mr_base = strtouq(optarg, &ep, 0);
+ mrd.mr_base = strtoull(optarg, &ep, 0);
if ((ep == optarg) || (*ep != 0))
help("clear");
else
got_base = 1;
break;
case 'l':
- mrd.mr_len = strtouq(optarg, &ep, 0);
+ mrd.mr_len = strtoull(optarg, &ep, 0);
if ((ep == optarg) || (*ep != 0))
help("clear");
break;
/* $NetBSD: spec.c,v 1.6 1995/03/07 21:12:12 cgd Exp $ */
-/* $OpenBSD: spec.c,v 1.26 2012/07/08 21:19:42 naddy Exp $ */
+/* $OpenBSD: spec.c,v 1.27 2016/08/14 18:34:48 guenther Exp $ */
/*-
* Copyright (c) 1989, 1993
error("%s", strerror(errno));
break;
case F_SIZE:
- ip->st_size = strtouq(val, &ep, 10);
+ ip->st_size = strtoll(val, &ep, 10);
if (*ep)
error("invalid size %s", val);
break;
-/* $OpenBSD: rmt.c,v 1.19 2015/11/04 21:27:03 tedu Exp $ */
+/* $OpenBSD: rmt.c,v 1.20 2016/08/14 18:34:48 guenther Exp $ */
/*
* Copyright (c) 1983 Regents of the University of California.
getstring(count, sizeof(count));
getstring(pos, sizeof(pos));
DEBUG2("rmtd: L %s %s\n", count, pos);
- orval = lseek(tape, strtoq(count, NULL, 0), atoi(pos));
+ orval = lseek(tape, strtoll(count, NULL, 0), atoi(pos));
if (orval == -1)
goto ioerror;
goto respond;