Skip to content

Commit d3df4db

Browse files
author
jcf
committed
Remove lists struct from the global namespace.
git-svn-id: svn://svn.daper.net/moc/trunk@2744 910807d9-36e0-0310-a014-e9ea483e2ba4
1 parent c74878d commit d3df4db

File tree

5 files changed

+12
-13
lines changed

5 files changed

+12
-13
lines changed

interface.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
#ifndef INTERFACE_H
33
#define INTERFACE_H
44

5+
#include "lists.h"
6+
57
#ifdef __cplusplus
68
extern "C" {
79
#endif
@@ -31,9 +33,7 @@ struct file_info {
3133
int block_end;
3234
};
3335

34-
struct lists_s_strs;
35-
36-
void init_interface (const int sock, const int logging, struct lists_s_strs *args);
36+
void init_interface (const int sock, const int logging, lists_t_strs *args);
3737
void interface_loop ();
3838
void interface_end ();
3939
int user_wants_interrupt ();
@@ -47,17 +47,17 @@ void interface_fatal (const char *format, ...);
4747
#endif
4848

4949
void interface_cmdline_clear_plist (int server_sock);
50-
void interface_cmdline_append (int server_sock, struct lists_s_strs *args);
50+
void interface_cmdline_append (int server_sock, lists_t_strs *args);
5151
void interface_cmdline_play_first (int server_sock);
5252
void interface_cmdline_file_info (const int server_sock);
53-
void interface_cmdline_playit (int server_sock, struct lists_s_strs *args);
53+
void interface_cmdline_playit (int server_sock, lists_t_strs *args);
5454
void interface_cmdline_seek_by (int server_sock, const int seek_by);
5555
void interface_cmdline_jump_to_percent (int server_sock, const int percent);
5656
void interface_cmdline_jump_to (int server_sock, const int pos);
5757
void interface_cmdline_adj_volume (int server_sock, const char *arg);
5858
void interface_cmdline_set (int server_sock, char *arg, const int val);
5959
void interface_cmdline_formatted_info (const int server_sock, const char *format_str);
60-
void interface_cmdline_enqueue (int server_sock, struct lists_s_strs *args);
60+
void interface_cmdline_enqueue (int server_sock, lists_t_strs *args);
6161

6262
#ifdef __cplusplus
6363
}

lists.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "common.h"
2222
#include "lists.h"
2323

24-
struct lists_s_strs {
24+
struct lists_strs {
2525
int size; /* Number of strings on the list */
2626
int capacity; /* Number of allocated strings */
2727
char **strs;

lists.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
extern "C" {
88
#endif
99

10-
struct lists_s_strs;
11-
typedef struct lists_s_strs lists_t_strs;
10+
typedef struct lists_strs lists_t_strs;
1211
typedef int lists_t_compare (const void *, const void *);
1312

1413
/* List administration functions. */

options.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ char *options_get_symb (const char *name)
11931193
return options[i].value.str;
11941194
}
11951195

1196-
struct lists_s_strs *options_get_list (const char *name)
1196+
lists_t_strs *options_get_list (const char *name)
11971197
{
11981198
int i = find_option (name, OPTION_LIST);
11991199

options.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#ifndef OPTIONS_H
22
#define OPTIONS_H
33

4+
#include "lists.h"
5+
46
#ifdef __cplusplus
57
extern "C" {
68
#endif
@@ -16,13 +18,11 @@ enum option_type
1618
OPTION_ANY = 255
1719
};
1820

19-
struct lists_s_strs;
20-
2121
int options_get_int (const char *name);
2222
bool options_get_bool (const char *name);
2323
char *options_get_str (const char *name);
2424
char *options_get_symb (const char *name);
25-
struct lists_s_strs *options_get_list (const char *name);
25+
lists_t_strs *options_get_list (const char *name);
2626
void options_set_int (const char *name, const int value);
2727
void options_set_bool (const char *name, const bool value);
2828
void options_set_str (const char *name, const char *value);

0 commit comments

Comments
 (0)