Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
excit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
argo
excit
Commits
f4f4839e
Commit
f4f4839e
authored
Nov 09, 2018
by
Brice Videau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added introspection capabilities.
parent
11c8aed3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
src/excit.c
src/excit.c
+35
-0
src/excit.h
src/excit.h
+4
-0
No files found.
src/excit.c
View file @
f4f4839e
#include <stdlib.h>
#include <excit.h>
#define CASE(val) case val: return #val; break;
const
char
*
excit_type_name
(
enum
excit_type_e
type
)
{
switch
(
type
)
{
CASE
(
EXCIT_RANGE
)
CASE
(
EXCIT_CONS
)
CASE
(
EXCIT_REPEAT
)
CASE
(
EXCIT_HILBERT2D
)
CASE
(
EXCIT_PRODUCT
)
CASE
(
EXCIT_SLICE
)
CASE
(
EXCIT_USER
)
CASE
(
EXCIT_TYPE_MAX
)
default:
return
NULL
;
}
}
const
char
*
excit_error_name
(
enum
excit_error_e
err
)
{
switch
(
err
)
{
CASE
(
EXCIT_SUCCESS
)
CASE
(
EXCIT_STOPIT
)
CASE
(
EXCIT_ENOMEM
)
CASE
(
EXCIT_EINVAL
)
CASE
(
EXCIT_EDOM
)
CASE
(
EXCIT_ENOTSUP
)
CASE
(
EXCIT_ERROR_MAX
)
default:
return
NULL
;
}
}
#undef CASE
/*--------------------------------------------------------------------*/
struct
slice_it_s
{
...
...
src/excit.h
View file @
f4f4839e
...
...
@@ -12,6 +12,8 @@ enum excit_type_e {
EXCIT_TYPE_MAX
};
const
char
*
excit_type_name
(
enum
excit_type_e
type
);
enum
excit_error_e
{
EXCIT_SUCCESS
,
EXCIT_STOPIT
,
...
...
@@ -22,6 +24,8 @@ enum excit_error_e {
EXCIT_ERROR_MAX
};
const
char
*
excit_error_name
(
enum
excit_error_e
err
);
struct
excit_s
{
const
struct
excit_func_table_s
*
functions
;
ssize_t
dimension
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment