Skip to content

Commit

Permalink
Remove deprecated code and update function names
Browse files Browse the repository at this point in the history
  • Loading branch information
horta committed Jun 20, 2024
1 parent f73ea8b commit cdbcd58
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 161 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ add_library(
$<$<BOOL:${TERMINAL_IOCTL}>:src/term_ioctl.c>
src/athr.c
src/canvas.c
src/deprecated.c
src/elapsed.c
src/logger.c
src/terminal.c
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int main() {

for (i = 0; i < 100; ++i) {
athr_sleep(50); /* some time-consuming task */
athr_consume(at, 1);
athr_eat(at, 1);
}

athr_finish(at);
Expand All @@ -57,7 +57,7 @@ int main() {

for (i = 0; i < 100; ++i) {
athr_sleep(50); /* some time-consuming task */
athr_consume(at, 1);
athr_eat(at, 1);
}

athr_finish(at);
Expand All @@ -79,7 +79,7 @@ int main() {

for (i = 0; i < 100; ++i) {
athr_sleep(50); /* some time-consuming task */
athr_consume(at, 1);
athr_eat(at, 1);
}

athr_finish(at);
Expand All @@ -101,7 +101,7 @@ int main() {

for (i = 0; i < 100; ++i) {
athr_sleep(50); /* some time-consuming task */
athr_consume(at, 1);
athr_eat(at, 1);
}

athr_finish(at);
Expand Down Expand Up @@ -134,7 +134,7 @@ make && make test && make install
It consists in two functions

```c
void athr_consume(struct athr *at, long consume);
void athr_eat(struct athr *at, uint64_t amount);
void athr_finish(struct athr *at);
```
Expand Down Expand Up @@ -172,7 +172,7 @@ struct athr *at4 = athr_create(100, .opts=ATHR_PERC, .desc="Description");
struct athr *at5 = athr_create(100, .opts=ATHR_PERC);
```

The first parameter is mandatory and specify the total volume from which we will consume through `athr_consume` calls.
The first parameter is mandatory and specify the total volume from which we will consume through `athr_eat` calls.
A `athr_finish` call then ends the process.

## Authors
Expand Down
1 change: 0 additions & 1 deletion src/athr/athr.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ extern "C" {

#include "athr/canvas.h"
#include "athr/canvas_view.h"
#include "athr/deprecated.h"
#include "athr/ema.h"
#include "athr/export.h"
#include "athr/logger.h"
Expand Down
30 changes: 0 additions & 30 deletions src/athr/deprecated.h

This file was deleted.

38 changes: 0 additions & 38 deletions src/deprecated.c

This file was deleted.

9 changes: 1 addition & 8 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ endmacro()
function(athr_add_test name)
add_executable(${name} ${name}.c)
target_link_libraries(${name} PRIVATE ATHR::athr)
if(NOT name STREQUAL "deprecated")
target_compile_options(${name} PRIVATE ${WARNING_FLAGS})
else()
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
target_compile_options(${name} PRIVATE /wd5105)
endif()
endif()
target_compile_options(${name} PRIVATE ${WARNING_FLAGS})
target_compile_features(${name} PRIVATE c_std_11)
add_test(NAME ${name} COMMAND ${name} -E environment)
inject_dll_to_please_windows(${name})
Expand All @@ -26,4 +20,3 @@ athr_add_test(example1)
athr_add_test(example2)
athr_add_test(example3)
athr_add_test(example4)
athr_add_test(deprecated)
2 changes: 1 addition & 1 deletion test/brake.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ static int brake(char const *desc, enum athr_option opt)

for (unsigned i = 0; i < 8; ++i)
{
athr_consume(&at, 1);
athr_eat(&at, 1);
}

athr_stop(&at);
Expand Down
76 changes: 0 additions & 76 deletions test/deprecated.c

This file was deleted.

0 comments on commit cdbcd58

Please sign in to comment.