Ignore:
Timestamp:
Sep 23, 2008, 7:11:04 PM (13 years ago)
Author:
charles
Message:

run libT, cli, daemon, gtk through the source-code formatter "uncrustify" as promised/threatened

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/net.h

    r5957 r6795  
    2727
    2828#ifdef WIN32
    29     #include <inttypes.h>
    30     #include <winsock2.h>
    31     typedef int socklen_t;
    32     typedef uint16_t tr_port_t;
    33 #elif defined(__BEOS__)
    34     #include <sys/socket.h>
    35     #include <netinet/in.h>
    36     typedef unsigned short tr_port_t;
    37     typedef int socklen_t;
     29 #include <inttypes.h>
     30 #include <winsock2.h>
     31typedef int socklen_t;
     32typedef uint16_t tr_port_t;
     33#elif defined( __BEOS__ )
     34 #include <sys/socket.h>
     35 #include <netinet/in.h>
     36typedef unsigned short tr_port_t;
     37typedef int socklen_t;
    3838#else
    39     #include <sys/types.h>
    40     #include <sys/socket.h>
    41     #include <netinet/in.h>
    42     #include <arpa/inet.h>
    43     typedef in_port_t tr_port_t;
     39 #include <sys/types.h>
     40 #include <sys/socket.h>
     41 #include <netinet/in.h>
     42 #include <arpa/inet.h>
     43typedef in_port_t tr_port_t;
    4444#endif
    4545
    4646#ifdef WIN32
    47     #define ECONNREFUSED WSAECONNREFUSED
    48     #define ECONNRESET   WSAECONNRESET
    49     #define EHOSTUNREACH WSAEHOSTUNREACH
    50     #define EINPROGRESS  WSAEINPROGRESS
    51     #define ENOTCONN     WSAENOTCONN
    52     #define EWOULDBLOCK  WSAEWOULDBLOCK
    53     #define sockerrno WSAGetLastError( )
     47 #define ECONNREFUSED WSAECONNREFUSED
     48 #define ECONNRESET   WSAECONNRESET
     49 #define EHOSTUNREACH WSAEHOSTUNREACH
     50 #define EINPROGRESS  WSAEINPROGRESS
     51 #define ENOTCONN     WSAENOTCONN
     52 #define EWOULDBLOCK  WSAEWOULDBLOCK
     53 #define sockerrno WSAGetLastError( )
    5454#else
    55     #include <errno.h>
    56     #define sockerrno errno
     55 #include <errno.h>
     56 #define sockerrno errno
    5757#endif
    5858
     
    6363 * DNS resolution
    6464 **********************************************************************/
    65 int tr_netResolve( const char *, struct in_addr * );
     65int  tr_netResolve( const  char *,
     66                    struct in_addr * );
    6667
    6768
     
    6970 * Sockets
    7071 **********************************************************************/
    71 int  tr_netOpenTCP  ( const struct in_addr * addr, tr_port_t port, int priority );
    72 int  tr_netBindTCP  ( int port );
    73 int  tr_netAccept   ( int s, struct in_addr *, tr_port_t * );
    74 int  tr_netSetTOS   ( int s, int tos );
    75 void tr_netClose    ( int s );
     72int  tr_netOpenTCP( const struct in_addr * addr,
     73                    tr_port_t              port,
     74                    int                    priority );
    7675
    77 void tr_netNtop( const struct in_addr * addr, char * buf, int len );
     76int  tr_netBindTCP( int port );
    7877
    79 void tr_netInit ( void );
     78int  tr_netAccept( int    s,
     79                   struct in_addr *,
     80                          tr_port_t * );
     81
     82int  tr_netSetTOS( int s,
     83                   int tos );
     84
     85void tr_netClose( int s );
     86
     87void tr_netNtop( const struct in_addr * addr,
     88                 char *                 buf,
     89                 int                    len );
     90
     91void tr_netInit( void );
    8092
    8193#endif /* _TR_NET_H_ */
Note: See TracChangeset for help on using the changeset viewer.