ekg2  GIT master
Struktury danych | Funkcje | Zmienne
Dokumentacja pliku ekg.c
#include "ekg2.h"
#include <glib/gprintf.h>
#include <glib/gstdio.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <sys/resource.h>
#include <sys/select.h>
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
#include <limits.h>
#include <locale.h>
#include <pwd.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "emoticons.h"
#include "internal.h"
#include "scripts.h"
Wykres zależności załączania dla ekg.c:

Struktury danych

struct  option_callback_args
 

Funkcje

static gint ekg_autoaway_timer (gint type, gpointer data)
 
void ekg_loop ()
 
static void handle_sigusr1 ()
 
static void handle_sigusr2 ()
 
static void handle_sighup ()
 
static void handle_fatal_signal (char *message)
 
static void handle_sigabrt ()
 
static void handle_sigsegv ()
 
static char * prepare_batch_line (char *argv[], int n)
 
static int handle_stderr (int type, int fd, const char *watch, void *data)
 
void ekg_debug_handler (int level, const char *format, va_list ap)
 
static void glib_debug_handler (const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data)
 
static void glib_print_handler (const gchar *string)
 
static void glib_printerr_handler (const gchar *string)
 
gboolean set_status_callback (const gchar *optname, const gchar *optval, gpointer data, GError **error)
 
int main (int argc, char **argv)
 
void ekg_exit ()
 

Zmienne

char * config_dir
 
char * old_config_dir
 
int mesg_startup
 
static char argv0 [4096]
 
static gchar last_err_message [128] = {0}
 
pid_t speech_pid = 0
 
static int stderr_backup = -1
 
int no_mouse = 0
 
static GOptionEntry ekg_options []
 

Dokumentacja funkcji

◆ ekg_autoaway_timer()

static gint ekg_autoaway_timer ( gint  type,
gpointer  data 
)
static

ekg_autoaway_timer()

less important things which don't need to be checked every main loop iteration e.g. autoaways

executed each second.

◆ ekg_debug_handler()

void ekg_debug_handler ( int  level,
const char *  format,
va_list  ap 
)

ekg_debug_handler()

debug message [if config_debug set] coming direct from libgadu (by libgadu_debug_handler()) or by debug() or by debug_ext()
XXX, doc more. But function now is ok.

Zobacz również
debug_ext()
Błąd:
It can happen than internal string_t line will be not freed.
Parametry
level
format
ap

◆ ekg_exit()

void ekg_exit ( )

◆ ekg_loop()

void ekg_loop ( )

◆ glib_debug_handler()

static void glib_debug_handler ( const gchar *  log_domain,
GLogLevelFlags  log_level,
const gchar *  message,
gpointer  user_data 
)
static

◆ glib_print_handler()

static void glib_print_handler ( const gchar *  string)
static

◆ glib_printerr_handler()

static void glib_printerr_handler ( const gchar *  string)
static

◆ handle_fatal_signal()

static void handle_fatal_signal ( char *  message)
static

Notifies plugins, writes the message to stderr, with last_err_message.

We are only allowed to call POSIX-defined "async-signal-safe functions" here (see signal(7)), because anything else can result in a "bad thing" such as a deadlock (e.g. if the signal was a result of a malloc()/free()) or a segfault. There were cases of this happening to ekg2.

In order to avoid touching the (possibly corrupt) heap, we invoke statically stored set of abort handlers. This is the mechanism we use to notify UI and logs plugins to reset the terminal and sync their output as necessary.

◆ handle_sigabrt()

static void handle_sigabrt ( )
static

◆ handle_sighup()

static void handle_sighup ( )
static

◆ handle_sigsegv()

static void handle_sigsegv ( )
static

◆ handle_sigusr1()

static void handle_sigusr1 ( )
static

◆ handle_sigusr2()

static void handle_sigusr2 ( )
static

◆ handle_stderr()

static int handle_stderr ( int  type,
int  fd,
const char *  watch,
void *  data 
)
static

◆ main()

int main ( int  argc,
char **  argv 
)

◆ prepare_batch_line()

static char* prepare_batch_line ( char *  argv[],
int  n 
)
static

◆ set_status_callback()

gboolean set_status_callback ( const gchar *  optname,
const gchar *  optval,
gpointer  data,
GError **  error 
)

Dokumentacja zmiennych

◆ argv0

char argv0[4096]
static

◆ config_dir

char* config_dir

◆ ekg_options

GOptionEntry ekg_options[]
static

◆ last_err_message

gchar last_err_message[128] = {0}
static

◆ mesg_startup

int mesg_startup

◆ no_mouse

int no_mouse = 0

◆ old_config_dir

char* old_config_dir

◆ speech_pid

pid_t speech_pid = 0

◆ stderr_backup

int stderr_backup = -1
static