Dillo v3.1.1-98-g318d1f14
Loading...
Searching...
No Matches
downloads.cc File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <ctype.h>
#include <math.h>
#include <time.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
#include <sys/wait.h>
#include <FL/Fl.H>
#include <FL/fl_ask.H>
#include <FL/fl_draw.H>
#include <FL/Fl_File_Chooser.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Widget.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Scroll.H>
#include <FL/Fl_Pack.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Button.H>
#include "config.h"
#include "dpiutil.h"
#include "../dpip/dpip.h"
Include dependency graph for downloads.cc:

Go to the source code of this file.

Macros

#define _MSG(...)
 
#define MSG(...)   printf("[downloads dpi]: " __VA_ARGS__)
 

Functions

static char * escape_tooltip (const char *buf, ssize_t len)
 
static void prButton_scb (Fl_Widget *, void *cb_data)
 
static void read_log_cb (int fd_in, void *data)
 
static void secs2timestr (int et, char *str)
 
static void raw_sigchld (int)
 
static void est_sigchld (void)
 
static void cleanup_cb (void *data)
 
static void update_cb (void *data)
 
static void read_req_cb (int req_fd, void *)
 
static void dlwin_esc_cb (Fl_Widget *, void *)
 
static void custLabelDraw (const Fl_Label *o, int X, int Y, int W, int H, Fl_Align align)
 
static void custLabelMeasure (const Fl_Label *o, int &W, int &H)
 
int main ()
 

Variables

sigset_t mask_sigchld
 
volatile sig_atomic_t caught_sigchld = 0
 
static class DLWin * dl_win = NULL
 

Macro Definition Documentation

◆ _MSG

#define _MSG (   ...)

Definition at line 52 of file downloads.cc.

◆ MSG

#define MSG (   ...)    printf("[downloads dpi]: " __VA_ARGS__)

Definition at line 53 of file downloads.cc.

Function Documentation

◆ cleanup_cb()

static void cleanup_cb ( void *  data)
static

Definition at line 785 of file downloads.cc.

References caught_sigchld, cleanup_cb(), and mask_sigchld.

Referenced by cleanup_cb().

◆ custLabelDraw()

static void custLabelDraw ( const Fl_Label *  o,
int  X,
int  Y,
int  W,
int  H,
Fl_Align  align 
)
static

Definition at line 1081 of file downloads.cc.

References H.

Referenced by main().

◆ custLabelMeasure()

static void custLabelMeasure ( const Fl_Label *  o,
int &  W,
int &  H 
)
static

Definition at line 1092 of file downloads.cc.

References H.

Referenced by main().

◆ dlwin_esc_cb()

static void dlwin_esc_cb ( Fl_Widget *  ,
void *   
)
static

Definition at line 914 of file downloads.cc.

References dl_win.

◆ escape_tooltip()

static char * escape_tooltip ( const char *  buf,
ssize_t  len 
)
static

Definition at line 191 of file downloads.cc.

◆ est_sigchld()

static void est_sigchld ( void  )
static

Establish SIGCHLD handler

Definition at line 767 of file downloads.cc.

References raw_sigchld().

◆ main()

int main ( void  )

Definition at line 1104 of file downloads.cc.

References custLabelDraw(), custLabelMeasure(), dl_win, and MSG.

◆ prButton_scb()

static void prButton_scb ( Fl_Widget *  ,
void *  cb_data 
)
static

Definition at line 280 of file downloads.cc.

◆ raw_sigchld()

static void raw_sigchld ( int  )
static

SIGCHLD handler

Definition at line 761 of file downloads.cc.

References caught_sigchld.

Referenced by est_sigchld().

◆ read_log_cb()

static void read_log_cb ( int  fd_in,
void *  data 
)
static

Definition at line 612 of file downloads.cc.

References dClose().

◆ read_req_cb()

static void read_req_cb ( int  req_fd,
void *   
)
static

◆ secs2timestr()

static void secs2timestr ( int  et,
char *  str 
)
static

Definition at line 675 of file downloads.cc.

◆ update_cb()

static void update_cb ( void *  data)
static

Definition at line 811 of file downloads.cc.

References dl_win, and update_cb().

Referenced by update_cb().

Variable Documentation

◆ caught_sigchld

volatile sig_atomic_t caught_sigchld = 0

Set to 1 by the SIGCHLD handler dpi_sigchld

Definition at line 218 of file downloads.cc.

Referenced by cleanup_cb(), main(), and raw_sigchld().

◆ dl_win

class DLWin* dl_win = NULL
static

Definition at line 221 of file downloads.cc.

Referenced by dlwin_esc_cb(), main(), read_req_cb(), and update_cb().

◆ mask_sigchld

sigset_t mask_sigchld

Definition at line 215 of file downloads.cc.

Referenced by cleanup_cb().