projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gdb, gdbserver: remove ARM regdat files
[deliverable/binutils-gdb.git]
/
libiberty
/
sort.c
diff --git
a/libiberty/sort.c
b/libiberty/sort.c
index da2d660b6f5d743655dc1876a442af38bae46cd9..fd8f926a8deed83aa574f20b978fa799b5ff74da 100644
(file)
--- a/
libiberty/sort.c
+++ b/
libiberty/sort.c
@@
-1,5
+1,5
@@
/* Sorting algorithms.
/* Sorting algorithms.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000
-2020
Free Software Foundation, Inc.
Contributed by Mark Mitchell <mark@codesourcery.com>.
This file is part of GNU CC.
Contributed by Mark Mitchell <mark@codesourcery.com>.
This file is part of GNU CC.
@@
-16,15
+16,20
@@
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING. If not, write to
-the Free Software Foundation, 5
9 Temple Place - Suite 330
,
-Boston, MA 0211
1-1307
, USA. */
+the Free Software Foundation, 5
1 Franklin Street - Fifth Floor
,
+Boston, MA 0211
0-1301
, USA. */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "libiberty.h"
#include "sort.h"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "libiberty.h"
#include "sort.h"
+#ifdef HAVE_LIMITS_H
#include <limits.h>
#include <limits.h>
+#endif
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
@@
-39,10
+44,7
@@
Boston, MA 02111-1307, USA. */
/* POINTERS and WORK are both arrays of N pointers. When this
function returns POINTERS will be sorted in ascending order. */
/* POINTERS and WORK are both arrays of N pointers. When this
function returns POINTERS will be sorted in ascending order. */
-void sort_pointers (n, pointers, work)
- size_t n;
- void **pointers;
- void **work;
+void sort_pointers (size_t n, void **pointers, void **work)
{
/* The type of a single digit. This can be any unsigned integral
type. When changing this, DIGIT_MAX should be changed as
{
/* The type of a single digit. This can be any unsigned integral
type. When changing this, DIGIT_MAX should be changed as
@@
-135,8
+137,7
@@
void sort_pointers (n, pointers, work)
#include <stdio.h>
#include <stdio.h>
-void *xmalloc (n)
- size_t n;
+void *xmalloc (size_t n)
{
return malloc (n);
}
{
return malloc (n);
}
@@
-154,8
+155,8
@@
int main (int argc, char **argv)
else
k = 10;
else
k = 10;
- pointers =
xmalloc (k * sizeof (void *)
);
- work =
xmalloc (k * sizeof (void *)
);
+ pointers =
XNEWVEC (void*, k
);
+ work =
XNEWVEC (void*, k
);
for (i = 0; i < k; ++i)
{
for (i = 0; i < k; ++i)
{
This page took
0.023537 seconds
and
4
git commands to generate.