projects
/
debian
/
tar
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Import upstream version 1.29
[debian/tar]
/
gnu
/
xstrtol.c
diff --git
a/gnu/xstrtol.c
b/gnu/xstrtol.c
index c8d68af0b0ab1aef54da7721b3dd7a8eed3907ff..bd3ffeb27f82ddcb7e98e6b54dbedae61589bf35 100644
(file)
--- a/
gnu/xstrtol.c
+++ b/
gnu/xstrtol.c
@@
-1,8
+1,6
@@
-/* -*- buffer-read-only: t -*- vi: set ro: */
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* A more useful interface to strtol.
/* A more useful interface to strtol.
- Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-201
4
Free Software
+ Copyright (C) 1995-1996, 1998-2001, 2003-2007, 2009-201
5
Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@
-36,13
+34,13
@@
need stderr defined if assertion checking is enabled. */
#include <stdio.h>
need stderr defined if assertion checking is enabled. */
#include <stdio.h>
-#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
+#include "assure.h"
#include "intprops.h"
/* xstrtoll.c and xstrtoull.c, which include this file, require that
#include "intprops.h"
/* xstrtoll.c and xstrtoull.c, which include this file, require that
@@
-95,10
+93,12
@@
__xstrtol (const char *s, char **ptr, int strtol_base,
__strtol_t tmp;
strtol_error err = LONGINT_OK;
__strtol_t tmp;
strtol_error err = LONGINT_OK;
- ass
ert
(0 <= strtol_base && strtol_base <= 36);
+ ass
ure
(0 <= strtol_base && strtol_base <= 36);
p = (ptr ? ptr : &t_ptr);
p = (ptr ? ptr : &t_ptr);
+ errno = 0;
+
if (! TYPE_SIGNED (__strtol_t))
{
const char *q = s;
if (! TYPE_SIGNED (__strtol_t))
{
const char *q = s;
@@
-109,7
+109,6
@@
__xstrtol (const char *s, char **ptr, int strtol_base,
return LONGINT_INVALID;
}
return LONGINT_INVALID;
}
- errno = 0;
tmp = __strtol (s, p, strtol_base);
if (*p == s)
tmp = __strtol (s, p, strtol_base);
if (*p == s)
@@
-184,7
+183,7
@@
__xstrtol (const char *s, char **ptr, int strtol_base,
break;
case 'c':
break;
case 'c':
- overflow =
0
;
+ overflow =
LONGINT_OK
;
break;
case 'E': /* exa or exbi */
break;
case 'E': /* exa or exbi */