ELinks 0.18.0
Macros | Enumerations | Functions | Variables
overrides.c File Reference
#include "osdep/system.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/types.h>
#include "elinks.h"
#include "config/options.h"
#include "intl/libintl.h"
#include "osdep/osdep.h"
#include "osdep/win32/overrides.h"
#include "osdep/win32/vt100.h"
#include "osdep/win32/win32.h"
#include "terminal/mouse.h"
#include "terminal/terminal.h"
Include dependency graph for overrides.c:

Macros

#define WIN32_OVERRIDES_SELF
 
#define SOCK_SHIFT   1024
 
#define TRACE(m...)
 

Enumerations

enum  fd_types { FDT_FILE = 1 , FDT_SOCKET , FDT_TERMINAL , FDT_PIPE }
 

Functions

static enum fd_types what_fd_type (int *fd)
 
static int console_key_read (const KEY_EVENT_RECORD *ker, char *buf, int max)
 
static int console_read (HANDLE hnd, void *buf, int max, INPUT_RECORD *irp)
 
static int console_peek (HANDLE hnd)
 
int win32_write (int fd, const void *buf, unsigned len)
 
int win32_read (int fd, void *buf, unsigned len)
 
int win32_close (int fd)
 
int win32_ioctl (int fd, long option, int *flag)
 
int win32_socket (int pf, int type, int protocol)
 
int win32_connect (int fd, struct sockaddr *addr, int addr_len)
 
int win32_getpeername (int fd, struct sockaddr *addr, int *addr_len)
 
int win32_getsockname (int fd, struct sockaddr *addr, int *addr_len)
 
int win32_accept (int fd, struct sockaddr *addr, int *addr_len)
 
int win32_listen (int fd, int backlog)
 
int win32_bind (int fd, struct sockaddr *addr, int addr_len)
 
int win32_getsockopt (int fd, int level, int option, void *optval, int *optlen)
 
int win32_pipe (int *fds)
 
static const char * timeval_str (const struct timeval *tv)
 
static char * fd_set_str (char *buf, size_t len, const fd_set *fd, int num_fds)
 
static void select_dump (int num_fds, const fd_set *rd, const fd_set *wr, const fd_set *ex)
 
static int select_read (int fd, struct fd_set *rd)
 
static int select_one_loop (int num_fds, struct fd_set *rd, struct fd_set *wr, struct fd_set *ex)
 
int win32_select (int num_fds, struct fd_set *rd, struct fd_set *wr, struct fd_set *ex, struct timeval *tv)
 
static char * get_winsock_error (int err, char *buf, size_t len)
 
char * win32_strerror (int err)
 
int win32_send (int sockfd, const void *buf, unsigned len, int flags)
 
int win32_recv (int sockfd, void *buf, unsigned len, int flags)
 

Variables

static BOOL console_nbio = FALSE
 
static const char * keymap []
 
static const char * keymap_2 []
 

Macro Definition Documentation

◆ SOCK_SHIFT

#define SOCK_SHIFT   1024

◆ TRACE

#define TRACE (   m...)
Value:
do { \
if (cmdline_options && (get_cmd_opt_int("verbose") == 2)) \
DBG(m); \
} while (0)
struct option * cmdline_options
Definition options.c:83
#define get_cmd_opt_int(name)
Definition options.h:333

◆ WIN32_OVERRIDES_SELF

#define WIN32_OVERRIDES_SELF

Enumeration Type Documentation

◆ fd_types

enum fd_types
Enumerator
FDT_FILE 
FDT_SOCKET 
FDT_TERMINAL 
FDT_PIPE 

Function Documentation

◆ console_key_read()

static int console_key_read ( const KEY_EVENT_RECORD *  ker,
char *  buf,
int  max 
)
static

◆ console_peek()

static int console_peek ( HANDLE  hnd)
static

◆ console_read()

static int console_read ( HANDLE  hnd,
void *  buf,
int  max,
INPUT_RECORD *  irp 
)
static

◆ fd_set_str()

static char * fd_set_str ( char *  buf,
size_t  len,
const fd_set *  fd,
int  num_fds 
)
static

◆ get_winsock_error()

static char * get_winsock_error ( int  err,
char *  buf,
size_t  len 
)
static

◆ select_dump()

static void select_dump ( int  num_fds,
const fd_set *  rd,
const fd_set *  wr,
const fd_set *  ex 
)
static

◆ select_one_loop()

static int select_one_loop ( int  num_fds,
struct fd_set *  rd,
struct fd_set *  wr,
struct fd_set *  ex 
)
static

◆ select_read()

static int select_read ( int  fd,
struct fd_set *  rd 
)
static

◆ timeval_str()

static const char * timeval_str ( const struct timeval *  tv)
static

◆ what_fd_type()

static enum fd_types what_fd_type ( int *  fd)
static

◆ win32_accept()

int win32_accept ( int  fd,
struct sockaddr *  addr,
int *  addr_len 
)

◆ win32_bind()

int win32_bind ( int  fd,
struct sockaddr *  addr,
int  addr_len 
)

◆ win32_close()

int win32_close ( int  fd)

◆ win32_connect()

int win32_connect ( int  fd,
struct sockaddr *  addr,
int  addr_len 
)

◆ win32_getpeername()

int win32_getpeername ( int  fd,
struct sockaddr *  addr,
int *  addr_len 
)

◆ win32_getsockname()

int win32_getsockname ( int  fd,
struct sockaddr *  addr,
int *  addr_len 
)

◆ win32_getsockopt()

int win32_getsockopt ( int  fd,
int  level,
int  option,
void *  optval,
int *  optlen 
)

◆ win32_ioctl()

int win32_ioctl ( int  fd,
long  option,
int *  flag 
)

◆ win32_listen()

int win32_listen ( int  fd,
int  backlog 
)

◆ win32_pipe()

int win32_pipe ( int *  fds)

◆ win32_read()

int win32_read ( int  fd,
void *  buf,
unsigned  len 
)

◆ win32_recv()

int win32_recv ( int  sockfd,
void *  buf,
unsigned  len,
int  flags 
)

◆ win32_select()

int win32_select ( int  num_fds,
struct fd_set *  rd,
struct fd_set *  wr,
struct fd_set *  ex,
struct timeval *  tv 
)

◆ win32_send()

int win32_send ( int  sockfd,
const void *  buf,
unsigned  len,
int  flags 
)

◆ win32_socket()

int win32_socket ( int  pf,
int  type,
int  protocol 
)

◆ win32_strerror()

char * win32_strerror ( int  err)

◆ win32_write()

int win32_write ( int  fd,
const void *  buf,
unsigned  len 
)

Variable Documentation

◆ console_nbio

BOOL console_nbio = FALSE
static

◆ keymap

const char* keymap[]
static
Initial value:
= {
"\E[5~",
"\E[6~",
"\E[F",
"\E[H",
"\E[D",
"\E[A",
"\E[C",
"\E[B",
"",
"",
"",
"",
"\E[2~",
"\E[3~"
}

◆ keymap_2

const char* keymap_2[]
static
Initial value:
= {
"\E[11~",
"\E[12~",
"\E[13~",
"\E[14~",
"\E[15~",
"\E[17~",
"\E[18~",
"\E[19~",
"\E[20~",
"\E[21~",
"\E[23~",
"\E[24~"
}