Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
APO_sem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Show more breadcrumbs
Pelech, Ondřej
APO_sem
Commits
27545311
Commit
27545311
authored
1 year ago
by
Pelech, Ondřej
Browse files
Options
Downloads
Patches
Plain Diff
Replace utils.h
parent
7d490e19
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/utils.h
+17
-6
17 additions, 6 deletions
main/utils.h
with
17 additions
and
6 deletions
main/utils.h
+
17
−
6
View file @
27545311
/*******************************************************************
Header for utils.c
File filled with utility methods
authors: Pelech Ondrej, Pham Thi Thien Trang
date: Mai 2023
*******************************************************************/
#ifndef __UTILS_H__
#define __UTILS_H__
#include
<stdlib.h>
#include
<stdbool.h>
#define INF 2147483647
#define INF 0Xffffffff
#define INF_SHORT 0xffff
// prints info messagse in format "INFO:'msg'"
// prints info messagse
to stderr
in format "INFO:'msg'"
void
info
(
const
char
*
str
);
// prints error messagse in format "ERROR:'msg'"
// prints error messagse
to stderr
in format "ERROR:'msg'"
void
error
(
const
char
*
str
);
// prints debug messagse in format "DEBUG:'msg'"
// prints debug messagse
to stderr
in format "DEBUG:'msg'"
void
debug
(
const
char
*
str
);
// prints warning messagse in format "WARN:'msg'"
// prints warning messagse
to stderr
in format "WARN:'msg'"
void
warn
(
const
char
*
str
);
// prints str with a new line to stdout
void
println
(
const
char
*
str
);
//prints error quote and exits program is r is false
void
my_assert
(
bool
r
,
const
char
*
fcname
,
const
int
line
,
const
char
*
flname
);
// allocates mem of the input size
// takes care of malloc failiure
// takes care of malloc failiure
by exiting program
void
*
my_malloc
(
const
size_t
size
);
// returns bigger value of inputed nunmbers
...
...
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