Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Show more breadcrumbs
Kun
openairinterface5G
Commits
624aba07
Commit
624aba07
authored
8 years ago
by
Cédric Roux
Browse files
Options
Downloads
Patches
Plain Diff
new function text_list_del
parent
f8733535
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common/utils/T/tracer/gui/gui.h
+1
-0
1 addition, 0 deletions
common/utils/T/tracer/gui/gui.h
common/utils/T/tracer/gui/text_list.c
+28
-0
28 additions, 0 deletions
common/utils/T/tracer/gui/text_list.c
with
29 additions
and
0 deletions
common/utils/T/tracer/gui/gui.h
+
1
−
0
View file @
624aba07
...
@@ -27,6 +27,7 @@ void xy_plot_set_points(gui *gui, widget *this,
...
@@ -27,6 +27,7 @@ void xy_plot_set_points(gui *gui, widget *this,
int
npoints
,
float
*
x
,
float
*
y
);
int
npoints
,
float
*
x
,
float
*
y
);
void
text_list_add
(
gui
*
gui
,
widget
*
this
,
const
char
*
text
,
int
position
);
void
text_list_add
(
gui
*
gui
,
widget
*
this
,
const
char
*
text
,
int
position
);
void
text_list_del
(
gui
*
gui
,
widget
*
this
,
int
position
);
void
gui_loop
(
gui
*
gui
);
void
gui_loop
(
gui
*
gui
);
...
...
This diff is collapsed.
Click to expand it.
common/utils/T/tracer/gui/text_list.c
+
28
−
0
View file @
624aba07
...
@@ -93,3 +93,31 @@ void text_list_add(gui *_gui, widget *_this, const char *text, int position)
...
@@ -93,3 +93,31 @@ void text_list_add(gui *_gui, widget *_this, const char *text, int position)
gunlock
(
g
);
gunlock
(
g
);
}
}
void
text_list_del
(
gui
*
_gui
,
widget
*
_this
,
int
position
)
{
struct
gui
*
g
=
_gui
;
struct
text_list_widget
*
this
=
_this
;
glock
(
g
);
/* TODO: useful check? */
if
(
this
->
text_count
==
0
)
goto
done
;
if
(
position
<
0
)
position
=
this
->
text_count
;
if
(
position
>
this
->
text_count
-
1
)
position
=
this
->
text_count
-
1
;
free
(
this
->
text
[
position
]);
memmove
(
this
->
text
+
position
,
this
->
text
+
position
+
1
,
(
this
->
text_count
-
1
-
position
)
*
sizeof
(
char
*
));
this
->
text_count
--
;
this
->
text
=
realloc
(
this
->
text
,
this
->
text_count
*
sizeof
(
char
*
));
if
(
this
->
text
==
NULL
)
OOM
;
send_event
(
g
,
DIRTY
,
this
->
common
.
id
);
done:
gunlock
(
g
);
}
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