Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
5cd83dc2
Commit
5cd83dc2
authored
24 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
List_Pointer_Test
parent
7fb01159
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
DataStr/List.cpp
+10
-1
10 additions, 1 deletion
DataStr/List.cpp
DataStr/List.h
+2
-1
2 additions, 1 deletion
DataStr/List.h
with
12 additions
and
2 deletions
DataStr/List.cpp
+
10
−
1
View file @
5cd83dc2
/* $Id: List.cpp,v 1.
9
2000-1
1-28 08:19:28
geuzaine Exp $ */
/* $Id: List.cpp,v 1.
10
2000-1
2-11 16:22:43
geuzaine Exp $ */
#include
<stdlib.h>
#include
<stdlib.h>
#include
<stdio.h>
#include
<stdio.h>
...
@@ -154,6 +154,15 @@ void *List_Pointer_Fast(List_T *liste, int index)
...
@@ -154,6 +154,15 @@ void *List_Pointer_Fast(List_T *liste, int index)
return
(
&
liste
->
array
[
index
*
liste
->
size
]);
return
(
&
liste
->
array
[
index
*
liste
->
size
]);
}
}
void
*
List_Pointer_Test
(
List_T
*
liste
,
int
index
)
{
if
((
index
<
0
)
||
(
index
>=
liste
->
n
))
return
NULL
;
liste
->
isorder
=
0
;
/* getdp: a examiner... */
return
(
&
liste
->
array
[
index
*
liste
->
size
]);
}
void
List_Sort
(
List_T
*
liste
,
int
(
*
fcmp
)(
const
void
*
a
,
const
void
*
b
))
void
List_Sort
(
List_T
*
liste
,
int
(
*
fcmp
)(
const
void
*
a
,
const
void
*
b
))
{
{
qsort
(
liste
->
array
,
liste
->
n
,
liste
->
size
,
fcmp
);
qsort
(
liste
->
array
,
liste
->
n
,
liste
->
size
,
fcmp
);
...
...
This diff is collapsed.
Click to expand it.
DataStr/List.h
+
2
−
1
View file @
5cd83dc2
/* $Id: List.h,v 1.
6
2000-1
1-27 17:13
:4
2
geuzaine Exp $ */
/* $Id: List.h,v 1.
7
2000-1
2-11 16:22
:4
3
geuzaine Exp $ */
#ifndef _LIST_H_
#ifndef _LIST_H_
#define _LIST_H_
#define _LIST_H_
...
@@ -30,6 +30,7 @@ void List_Pop(List_T *liste);
...
@@ -30,6 +30,7 @@ void List_Pop(List_T *liste);
void
*
List_Pointer
(
List_T
*
liste
,
int
index
);
void
*
List_Pointer
(
List_T
*
liste
,
int
index
);
void
*
List_Pointer_NoChange
(
List_T
*
liste
,
int
index
);
void
*
List_Pointer_NoChange
(
List_T
*
liste
,
int
index
);
void
*
List_Pointer_Fast
(
List_T
*
liste
,
int
index
);
void
*
List_Pointer_Fast
(
List_T
*
liste
,
int
index
);
void
*
List_Pointer_Test
(
List_T
*
liste
,
int
index
);
void
List_Sort
(
List_T
*
liste
,
int
(
*
fcmp
)(
const
void
*
a
,
const
void
*
b
));
void
List_Sort
(
List_T
*
liste
,
int
(
*
fcmp
)(
const
void
*
a
,
const
void
*
b
));
int
List_Search
(
List_T
*
liste
,
void
*
data
,
int
(
*
fcmp
)(
const
void
*
a
,
const
void
*
b
));
int
List_Search
(
List_T
*
liste
,
void
*
data
,
int
(
*
fcmp
)(
const
void
*
a
,
const
void
*
b
));
int
List_ISearch
(
List_T
*
liste
,
void
*
data
,
int
(
*
fcmp
)(
const
void
*
a
,
const
void
*
b
));
int
List_ISearch
(
List_T
*
liste
,
void
*
data
,
int
(
*
fcmp
)(
const
void
*
a
,
const
void
*
b
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment