Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove more unused c code #1001

Merged
merged 5 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ add_library(
util/path.cpp
util/hash.cpp
util/node_data.cpp
util/node_ctype.cpp
util/util.cpp
util/util_abort.cpp
util/util_symlink.cpp
Expand Down Expand Up @@ -210,25 +209,18 @@ foreach(
ert_util_alloc_file_components
ert_util_split_path
ert_util_approx_equal
ert_util_before_after
ert_util_binary_split
ert_util_clamp
ert_util_chdir
ert_util_filename
ert_util_parent_path
ert_util_realpath
ert_util_relpath_test
ert_util_rng
ert_util_sscan_test
ert_util_strcat_test
ert_util_stringlist_test
ert_util_string_util
ert_util_strstr_int_format
ert_util_type_vector_functions
ert_util_vector_test
ert_util_datetime
ert_util_normal_path
ert_util_mkdir_p
test_area)

add_executable(${name} util/tests/${name}.cpp)
Expand Down
1 change: 0 additions & 1 deletion lib/include/ert/util/node_ctype.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ typedef enum {
CTYPE_INVALID = 100
} node_ctype;

const char *node_ctype_name(node_ctype);
#ifdef __cplusplus
}
#endif
Expand Down
12 changes: 0 additions & 12 deletions lib/include/ert/util/string_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,10 @@
extern "C" {
#endif

bool string_util_init_active_list(const char *range_string,
int_vector_type *active_list);
bool string_util_update_active_list(const char *range_string,
int_vector_type *active_list);
int_vector_type *string_util_alloc_active_list(const char *range_string);

bool string_util_init_active_mask(const char *range_string,
bool_vector_type *active_mask);
bool string_util_update_active_mask(const char *range_string,
bool_vector_type *active_mask);
bool_vector_type *string_util_alloc_active_mask(const char *range_string);

bool string_util_update_value_list(const char *range_string,
int_vector_type *value_list);
bool string_util_init_value_list(const char *range_string,
int_vector_type *value_list);
int_vector_type *string_util_alloc_value_list(const char *range_string);

#ifdef __cplusplus
Expand Down
51 changes: 0 additions & 51 deletions lib/include/ert/util/stringlist.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,76 +21,31 @@ int stringlist_select_files(stringlist_type *names, const char *path,

const char *stringlist_get_last(const stringlist_type *stringlist);
char *stringlist_pop(stringlist_type *stringlist);
void stringlist_deep_copy(stringlist_type *target, const stringlist_type *src);
stringlist_type *
stringlist_alloc_deep_copy_with_limits(const stringlist_type *src, int offset,
int num_strings);
stringlist_type *
stringlist_alloc_deep_copy_with_offset(const stringlist_type *src, int offset);
stringlist_type *stringlist_alloc_deep_copy(const stringlist_type *src);

stringlist_type *stringlist_alloc_new(void);
void stringlist_free__(void *);
void stringlist_free(stringlist_type *);
void stringlist_clear(stringlist_type *);

void stringlist_append_copy(stringlist_type *, const char *);

const char *stringlist_safe_iget(const stringlist_type *stringlist, int index);
bool stringlist_unique(const stringlist_type *stringlist);
bool stringlist_iequal(const stringlist_type *stringlist, int index,
const char *s);
const char *stringlist_iget(const stringlist_type *, int);
int stringlist_iget_as_int(const stringlist_type *stringlist, int index,
bool *valid);
double stringlist_iget_as_double(const stringlist_type *stringlist, int index,
bool *valid);
bool stringlist_iget_as_bool(const stringlist_type *stringlist, int index,
bool *valid);
char *stringlist_iget_copy(const stringlist_type *stringlist, int);
char *stringlist_alloc_joined_string(const stringlist_type *, const char *);
char *stringlist_alloc_joined_substring(const stringlist_type *s,
int start_index, int end_index,
const char *sep);
const char *stringlist_front(const stringlist_type *stringlist);
const char *stringlist_back(const stringlist_type *stringlist);

void stringlist_iset_copy(stringlist_type *, int index, const char *);
void stringlist_iset_ref(stringlist_type *, int index, const char *);
void stringlist_iset_owned_ref(stringlist_type *, int index, const char *);

void stringlist_insert_copy(stringlist_type *, int index, const char *);
void stringlist_insert_ref(stringlist_type *, int index, const char *);
void stringlist_insert_owned_ref(stringlist_type *, int index, const char *);

void stringlist_idel(stringlist_type *stringlist, int index);

int stringlist_get_size(const stringlist_type *);
void stringlist_fprintf(const stringlist_type *, const char *, FILE *);
void stringlist_fprintf_fmt(const stringlist_type *stringlist,
const stringlist_type *fmt_list, FILE *stream);

stringlist_type *stringlist_alloc_argv_copy(const char **, int);
stringlist_type *stringlist_alloc_argv_ref(const char **, int);
stringlist_type *stringlist_alloc_argv_owned_ref(const char **argv, int argc);
stringlist_type *stringlist_alloc_from_split(const char *input_string,
const char *sep);
stringlist_type *stringlist_fread_alloc(FILE *);

void stringlist_append_stringlist_copy(stringlist_type *,
const stringlist_type *);
void stringlist_insert_stringlist_copy(stringlist_type *,
const stringlist_type *, int);

bool stringlist_equal(const stringlist_type *, const stringlist_type *);
bool stringlist_contains(const stringlist_type *, const char *);
int_vector_type *stringlist_find(const stringlist_type *, const char *);
int stringlist_find_first(const stringlist_type *, const char *);
int stringlist_get_argc(const stringlist_type *);
char **stringlist_alloc_char_copy(const stringlist_type *);
char **stringlist_alloc_char_ref(const stringlist_type *stringlist);
void stringlist_fread(stringlist_type *, FILE *);
void stringlist_fwrite(const stringlist_type *, FILE *);
void stringlist_sort(stringlist_type *, string_cmp_ftype *string_cmp);
void stringlist_reverse(stringlist_type *s);
void stringlist_python_sort(stringlist_type *s, int cmp_flag);
Expand All @@ -100,12 +55,6 @@ int stringlist_select_matching(stringlist_type *names, const char *pattern);
#endif
int stringlist_select_matching_files(stringlist_type *names, const char *path,
const char *file_pattern);
int stringlist_select_matching_elements(stringlist_type *target,
const stringlist_type *src,
const char *pattern);
int stringlist_append_matching_elements(stringlist_type *target,
const stringlist_type *src,
const char *pattern);
UTIL_IS_INSTANCE_HEADER(stringlist);

#ifdef __cplusplus
Expand Down
Loading