Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
progseq-stack_sort
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
dario.genga
progseq-stack_sort
Commits
c5315913
Commit
c5315913
authored
3 years ago
by
dario.genga
Browse files
Options
Downloads
Patches
Plain Diff
Add stack's methods signature
Also fixed some typos in comments or define.
parent
96796f92
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
README.md
+1
-1
1 addition, 1 deletion
README.md
main.c
+2
-2
2 additions, 2 deletions
main.c
stack.c
+1
-1
1 addition, 1 deletion
stack.c
stack.h
+15
-3
15 additions, 3 deletions
stack.h
test.c
+2
-2
2 additions, 2 deletions
test.c
with
21 additions
and
9 deletions
README.md
+
1
−
1
View file @
c5315913
...
@@ -17,6 +17,6 @@ Use this command to compile the project.
...
@@ -17,6 +17,6 @@ Use this command to compile the project.
Use this command to clean the project.
Use this command to clean the project.
### Run the tests
### Run the tests
> `make
run_
test
s
`
> `make test`
Use this command to start the tests.
Use this command to start the tests.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
main.c
+
2
−
2
View file @
c5315913
/* Author : Dario GENGA
/* Author : Dario GENGA
* Date :
16
.11.2021
* Date :
23
.11.2021
* Description : Library to manipulate the
pile
* Description : Library to manipulate the
stack
*/
*/
#include
<stdio.h>
#include
<stdio.h>
...
...
This diff is collapsed.
Click to expand it.
stack.c
+
1
−
1
View file @
c5315913
/* Author : Dario GENGA
/* Author : Dario GENGA
* Date :
16
.11.2021
* Date :
23
.11.2021
* Description : Library to manipulate the stack
* Description : Library to manipulate the stack
*/
*/
...
...
This diff is collapsed.
Click to expand it.
stack.h
+
15
−
3
View file @
c5315913
/* Author : Dario GENGA
/* Author : Dario GENGA
* Date :
16
.11.2021
* Date :
23
.11.2021
* Description : Library to manipulate the stack
* Description : Library to manipulate the stack
*/
*/
#ifndef _
PILE
_H
#ifndef _
STACK
_H
#define _
PILE
_H
#define _
STACK
_H
#include
<stdio.h>
#include
<stdio.h>
#include
<stdlib.h>
#include
<stdlib.h>
#include
<stdbool.h>
#include
<stdbool.h>
typedef
struct
_stack
{
int
size
;
int
top
;
int
*
data
;
}
stack
;
void
stack_init
(
stack
*
s
,
int
size
);
bool
stack_is_empty
(
stack
s
);
void
stack_push
(
stack
*
s
,
int
val
);
void
stack_pop
(
stack
*
s
,
int
*
val
);
void
stack_peek
(
stack
s
,
int
*
val
);
void
stack_destroy
(
stack
*
s
);
#endif
#endif
\ No newline at end of file
This diff is collapsed.
Click to expand it.
test.c
+
2
−
2
View file @
c5315913
/* Author : Dario GENGA
/* Author : Dario GENGA
* Date :
16
.11.2021
* Date :
23
.11.2021
* Description :
M
anipulate
matrix
* Description :
Library to m
anipulate
the stack
*/
*/
#include
"stack.h"
#include
"stack.h"
#include
<assert.h>
#include
<assert.h>
...
...
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