Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
See what's new at GitLab
4
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
T
time-slime
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Michael Rouse
time-slime
Commits
9952bc0c
Commit
9952bc0c
authored
Aug 20, 2018
by
Michael Rouse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Method for cleaning up after a report generation
parent
ccc7bf4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
shell/shell.c
shell/shell.c
+1
-0
timeslime.c
timeslime.c
+10
-0
timeslime.h
timeslime.h
+4
-0
No files found.
shell/shell.c
View file @
9952bc0c
...
...
@@ -185,6 +185,7 @@ static void perform_report_action(args_t args)
printf
(
"%s: %0.2f
\n
"
,
report
->
Entries
[
i
].
Date
,
report
->
Entries
[
i
].
Hours
);
}
TimeSlime_FreeReport
(
&
report
);
}
...
...
timeslime.c
View file @
9952bc0c
...
...
@@ -290,6 +290,16 @@ TIMESLIME_STATUS_t TimeSlime_GetReport(TIMESLIME_DATE_t start, TIMESLIME_DATE_t
return
TIMESLIME_OK
;
}
/* Frees memory allocated for report used in report method */
void
TimeSlime_FreeReport
(
TIMESLIME_REPORT_t
**
report
)
{
if
(
*
report
!=
NULL
)
{
free
(
*
report
);
*
report
=
NULL
;
}
}
/**
* Converts status to friendly status code (or returns SQLITE error string)
*/
...
...
timeslime.h
View file @
9952bc0c
...
...
@@ -102,10 +102,14 @@ TIMESLIME_STATUS_t TimeSlime_ClockOut(TIMESLIME_DATETIME_t time);
/* Gets the time sheet for a period of time */
TIMESLIME_STATUS_t
TimeSlime_GetReport
(
TIMESLIME_DATE_t
start
,
TIMESLIME_DATE_t
end
,
TIMESLIME_REPORT_t
**
out
);
/* Frees memory allocated for report used in report method */
void
TimeSlime_FreeReport
(
TIMESLIME_REPORT_t
**
report
);
/* Converts status to friendly error code (or returns SQLITE error string) */
char
*
TimeSlime_StatusCode
(
TIMESLIME_STATUS_t
status
);
/* Queries (Do not touch) */
#define __TS_QRY_GET_COMPLTED_CLOCK_ENTRIES "(ClockInTime IS NOT NULL AND ClockOutTime IS NOT NULL)"
#define __TS_QRY_GET_PARTIAL_CLOCK_ENTRIES "(ClockOutTime IS NULL AND ClockInTime IS NOT NULL)"
...
...
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