build: remove extern "C" linkage

No more C source files, no more necessity to use C-linkage.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-05-04 18:45:55 +02:00 committed by bstoeger
parent 03b910ee7f
commit b56dd13add
104 changed files with 364 additions and 577 deletions

View file

@ -42,19 +42,19 @@ struct divecomputer *get_dc(struct parser_state *state)
/*
* Add a dive into the dive_table array
*/
extern "C" void record_dive_to_table(struct dive *dive, struct dive_table *table)
void record_dive_to_table(struct dive *dive, struct dive_table *table)
{
add_to_dive_table(table, table->nr, fixup_dive(dive));
}
extern "C" void start_match(const char *type, const char *name, char *buffer)
void start_match(const char *type, const char *name, char *buffer)
{
if (verbose > 2)
printf("Matching %s '%s' (%s)\n",
type, name, buffer);
}
extern "C" void nonmatch(const char *type, const char *name, char *buffer)
void nonmatch(const char *type, const char *name, char *buffer)
{
if (verbose > 1)
printf("Unable to match %s '%s' (%s)\n",
@ -431,7 +431,7 @@ void userid_stop(struct parser_state *state)
* therefore make sure to only pass in to NULL-initialized pointers or pointers
* to owned strings
*/
extern "C" void utf8_string(const char *buffer, char **res)
void utf8_string(const char *buffer, char **res)
{
free(*res);
while (isspace(*buffer))
@ -510,7 +510,7 @@ void add_dive_site(const char *ds_name, struct dive *dive, struct parser_state *
}
}
extern "C" int atoi_n(char *ptr, unsigned int len)
int atoi_n(char *ptr, unsigned int len)
{
if (len < 10) {
char buf[10];