Replace SDL types by C99 standard types

Scrcpy is a C11 project. Use the C99 standard types instead of the
SDL-specific types:

    SDL_bool -> bool
    SintXX   -> intXX_t
    UintXX   -> uintXX_t
This commit is contained in:
Romain Vimont
2019-03-02 23:52:22 +01:00
parent 8655ba7197
commit dfed1b250e
40 changed files with 456 additions and 438 deletions

View File

@@ -1,8 +1,9 @@
#ifndef NET_H
#define NET_H
#include <stdbool.h>
#include <stdint.h>
#include <SDL2/SDL_platform.h>
#include <SDL2/SDL_stdinc.h>
#ifdef __WINDOWS__
# include <winsock2.h>
@@ -16,17 +17,17 @@
typedef int socket_t;
#endif
SDL_bool
bool
net_init(void);
void
net_cleanup(void);
socket_t
net_connect(Uint32 addr, Uint16 port);
net_connect(uint32_t addr, uint16_t port);
socket_t
net_listen(Uint32 addr, Uint16 port, int backlog);
net_listen(uint32_t addr, uint16_t port, int backlog);
socket_t
net_accept(socket_t server_socket);
@@ -45,10 +46,10 @@ ssize_t
net_send_all(socket_t socket, const void *buf, size_t len);
// how is SHUT_RD (read), SHUT_WR (write) or SHUT_RDWR (both)
SDL_bool
bool
net_shutdown(socket_t socket, int how);
SDL_bool
bool
net_close(socket_t socket);
#endif