Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Prog_C
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
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
thibault.chatillo
Prog_C
Commits
4daea9f7
Commit
4daea9f7
authored
4 years ago
by
thib
Browse files
Options
Downloads
Patches
Plain Diff
init
parent
cd37ff04
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
lst-vector/Makefile
+12
-0
12 additions, 0 deletions
lst-vector/Makefile
lst-vector/lst_vec.c
+8
-0
8 additions, 0 deletions
lst-vector/lst_vec.c
lst-vector/lst_vec.h
+33
-0
33 additions, 0 deletions
lst-vector/lst_vec.h
with
54 additions
and
0 deletions
.gitignore
+
1
−
0
View file @
4daea9f7
...
@@ -2,4 +2,5 @@
...
@@ -2,4 +2,5 @@
*.o
*.o
*/*.o
*/*.o
*/*.x
*/*.x
*.gch
This diff is collapsed.
Click to expand it.
lst-vector/Makefile
0 → 100644
+
12
−
0
View file @
4daea9f7
cc
=
gcc
LIBS
=
-Wextra
-Wall
-g
-fsanitize
=
address
-fsanitize
=
leak
-lm
lst_vec.x
:
lst_vec.o
$(
cc
)
-o
$@
$^
$(
LIBS
)
lst_vec.o
:
lst_vec.c lst_vec.h
$(
cc
)
-c
$^
$(
LIBS
)
clean
:
rm
-f
*
.o
*
.x
*
.gch
This diff is collapsed.
Click to expand it.
lst-vector/lst_vec.c
0 → 100644
+
8
−
0
View file @
4daea9f7
#include
"lst_vec.h"
#include
<stdio.h>
#include
<stdlib.h>
int
main
()
{
return
EXIT_SUCCESS
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
lst-vector/lst_vec.h
0 → 100644
+
33
−
0
View file @
4daea9f7
#ifndef _LST_VEC_H_
#define _LST_VEC_H_
#include
<math.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<stdbool.h>
#include
<assert.h>
typedef
struct
_element
{
void
*
data
;
struct
_element
*
next
;
}
element
;
typedef
element
*
lst_vector
;
lst_vector
lst_vector_init
();
int
lst_vector_length
(
lst_vector
*
v
);
element
lst_vector_push
(
lst_vector
*
v
,
void
*
element
);
element
lst_vector_pop
(
lst_vector
*
v
);
lst_vector
lst_vector_set
(
lst_vector
*
v
,
int
index
,
void
*
element
);
element
lst_vector_get
(
lst_vector
*
v
,
int
index
);
element
lst_vector_remove
(
lst_vector
*
v
,
int
index
);
lst_vector
lst_vector_insert
(
lst_vector
*
v
,
void
*
element
,
int
index
);
void
lst_vector_empty
(
lst_vector
**
v
);
lst_vector
lst_vector_map
(
lst_vector
*
v
,
void
*
(
*
f
)(
void
*
));
lst_vector
lst_vector_filter
(
lst_vector
*
v
,
bool
(
*
f
)(
void
*
));
#endif
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