diff options
author | Darkvater <Darkvater@openttd.org> | 2006-01-26 13:01:53 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2006-01-26 13:01:53 +0000 |
commit | 1be559cfb8e14a33e2aa042540a2e6b6685a9580 (patch) | |
tree | 32a23800f06df891eb2f65452f6eb17f3e1f9030 | |
parent | 7eaac72326cdfc9fd907b7d9c1911183cea79de6 (diff) | |
download | openttd-1be559cfb8e14a33e2aa042540a2e6b6685a9580.tar.xz |
(svn r3435) - Fix a warning, removed unused extern and some comments in network_gamelist.c
-rw-r--r-- | network_gamelist.c | 8 | ||||
-rw-r--r-- | network_gui.c | 7 |
2 files changed, 10 insertions, 5 deletions
diff --git a/network_gamelist.c b/network_gamelist.c index a90b50aaa..0085f0fca 100644 --- a/network_gamelist.c +++ b/network_gamelist.c @@ -12,7 +12,11 @@ extern void UpdateNetworkGameWindow(bool unselect); - +/** Add a new item to the linked gamelist. If the IP and Port match + * return the existing item instead of adding it again + * @param ip the IP-address (inet_addr) of the to-be added item + * @param port the port the server is running on + * @return a point to the newly added or already existing item */ NetworkGameList *NetworkGameListAddItem(uint32 ip, uint16 port) { NetworkGameList *item, *prev_item; @@ -38,6 +42,8 @@ NetworkGameList *NetworkGameListAddItem(uint32 ip, uint16 port) return item; } +/** Remove an item from the gamelist linked list + * @param remove pointer to the item to be removed */ void NetworkGameListRemoveItem(NetworkGameList *remove) { NetworkGameList *item, *prev_item; diff --git a/network_gui.c b/network_gui.c index dc25f5bd9..c57654563 100644 --- a/network_gui.c +++ b/network_gui.c @@ -74,11 +74,10 @@ enum { NET_PRC__SIZE_OF_ROW_COMPANY = 12, }; +/* Used in both NetworkWindow and NetworkLobby to mark the currently selected server */ static NetworkGameList *_selected_item = NULL; static int8 _selected_company_item = -1; -extern const char _openttd_revision[]; - static FiosItem *_selected_map = NULL; // to highlight slected map // called when a new server is found on the network @@ -409,11 +408,11 @@ void ShowNetworkGameWindow(void) /* Only show once */ if (_first_time_show_network_game_window) { - const char* const *srv; + char* const *srv; _first_time_show_network_game_window = false; // add all servers from the config file to our list - for (srv = _network_host_list; srv != endof(_network_host_list) && *srv != NULL; srv++) { + for (srv = &_network_host_list[0]; srv != endof(_network_host_list) && *srv != NULL; srv++) { NetworkAddServer(*srv); } } |