Indent tweaks, cleanups
This commit is contained in:
parent
9d0e6438db
commit
9cb4561227
|
@ -1 +1 @@
|
|||
-i3 -bl -bad -nbap -sob -ncdb -di20 -nbc -lp -nce -npcs -sc -ncs -l80
|
||||
-i3 -bl -bad -nbap -sob -ncdb -di20 -nbc -lp -nce -npcs -sc -ncs -brs -l80
|
||||
|
|
115
api/epplet.c
115
api/epplet.c
|
@ -20,8 +20,7 @@
|
|||
|
||||
#define CRSR_WDTH 2
|
||||
|
||||
typedef struct epplet_window
|
||||
{
|
||||
typedef struct {
|
||||
Window win;
|
||||
int w;
|
||||
int h;
|
||||
|
@ -29,8 +28,7 @@ typedef struct epplet_window
|
|||
Pixmap bg_pmap;
|
||||
Pixmap bg_mask;
|
||||
Pixmap bg_bg;
|
||||
}
|
||||
EppWindow;
|
||||
} EppWindow;
|
||||
typedef EppWindow *Epplet_window;
|
||||
|
||||
EAPI Display *disp = NULL;
|
||||
|
@ -114,17 +112,15 @@ static Window Epplet_internal_create_window(int w, int h,
|
|||
static void remember_stuff(void *data);
|
||||
|
||||
#define MWM_HINTS_DECORATIONS (1L << 1)
|
||||
typedef struct _mwmhints
|
||||
{
|
||||
typedef struct {
|
||||
unsigned long flags;
|
||||
unsigned long functions;
|
||||
unsigned long decorations;
|
||||
long inputMode;
|
||||
unsigned long status;
|
||||
}
|
||||
MWMHints;
|
||||
struct _etimer
|
||||
{
|
||||
} MWMHints;
|
||||
|
||||
struct _etimer {
|
||||
char *name;
|
||||
void (*func)(void *data);
|
||||
void *data;
|
||||
|
@ -136,12 +132,10 @@ struct _etimer
|
|||
#define ESYNC ECommsSend("nop");free(ECommsWaitForMessage());
|
||||
|
||||
/* The structures for the config file management ... */
|
||||
typedef struct _configdict
|
||||
{
|
||||
typedef struct {
|
||||
ConfigItem *entries;
|
||||
int num_entries;
|
||||
}
|
||||
ConfigDict;
|
||||
} ConfigDict;
|
||||
|
||||
static ConfigDict *config_dict = NULL;
|
||||
|
||||
|
@ -187,13 +181,11 @@ static void Epplet_textbox_textsize(Epplet_gadget gadget, int *w,
|
|||
int Epplet_textbox_spacesize(Epplet_gadget gadget);
|
||||
static void Epplet_find_instance(const char *name);
|
||||
|
||||
typedef struct gad_general
|
||||
{
|
||||
typedef struct {
|
||||
GadType type;
|
||||
char visible;
|
||||
Epplet_window parent;
|
||||
}
|
||||
GadGeneral;
|
||||
} GadGeneral;
|
||||
|
||||
#define GADGET_GET_TYPE(gad) (((GadGeneral *) (gad))->type)
|
||||
#ifdef __GNUC__
|
||||
|
@ -222,8 +214,7 @@ GadGeneral;
|
|||
if (GADGET_GET_TYPE(gad) != (type)) return (rval);} while (0)
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
|
@ -237,11 +228,9 @@ typedef struct
|
|||
void (*func)(void *data);
|
||||
void *data;
|
||||
Pixmap pmap, mask;
|
||||
}
|
||||
GadButton;
|
||||
} GadButton;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
|
@ -254,11 +243,9 @@ typedef struct
|
|||
void (*func)(void *data);
|
||||
void *data;
|
||||
Pixmap pmap, mask;
|
||||
}
|
||||
GadTextBox;
|
||||
} GadTextBox;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
|
@ -270,20 +257,16 @@ typedef struct
|
|||
void (*func)(void *data);
|
||||
void *data;
|
||||
Pixmap pmap, mask;
|
||||
}
|
||||
GadToggleButton;
|
||||
} GadToggleButton;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
Window win_in;
|
||||
}
|
||||
GadDrawingArea;
|
||||
} GadDrawingArea;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
|
@ -295,11 +278,9 @@ typedef struct
|
|||
void (*func)(void *data);
|
||||
void *data;
|
||||
Window win_knob;
|
||||
}
|
||||
GadHSlider;
|
||||
} GadHSlider;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
|
@ -311,65 +292,52 @@ typedef struct
|
|||
void (*func)(void *data);
|
||||
void *data;
|
||||
Window win_knob;
|
||||
}
|
||||
GadVSlider;
|
||||
} GadVSlider;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
int *val;
|
||||
char dir;
|
||||
Window win_in;
|
||||
}
|
||||
GadHBar;
|
||||
} GadHBar;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
int *val;
|
||||
char dir;
|
||||
Window win_in;
|
||||
}
|
||||
GadVBar;
|
||||
} GadVBar;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
int pw, ph;
|
||||
char *image;
|
||||
}
|
||||
GadImage;
|
||||
} GadImage;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
char size;
|
||||
char *label;
|
||||
}
|
||||
GadLabel;
|
||||
} GadLabel;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
char *label;
|
||||
char *image;
|
||||
int w, h;
|
||||
void (*func)(void *data);
|
||||
void *data;
|
||||
Epplet_gadget gadget;
|
||||
}
|
||||
GadPopEntry;
|
||||
} GadPopEntry;
|
||||
|
||||
typedef struct _gadpopupbutton GadPopupButton;
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
|
@ -377,11 +345,9 @@ typedef struct
|
|||
int entry_num;
|
||||
GadPopEntry *entry;
|
||||
char changed;
|
||||
}
|
||||
GadPopup;
|
||||
} GadPopup;
|
||||
|
||||
struct _gadpopupbutton
|
||||
{
|
||||
typedef struct {
|
||||
GadGeneral general;
|
||||
int x, y, w, h;
|
||||
Window win;
|
||||
|
@ -393,7 +359,7 @@ struct _gadpopupbutton
|
|||
char popped;
|
||||
char *std;
|
||||
Pixmap pmap, mask;
|
||||
};
|
||||
} GadPopupButton;
|
||||
|
||||
#if DEBUG_EVENTS
|
||||
static int
|
||||
|
@ -1242,8 +1208,7 @@ Epplet_register_delete_event_handler(int (*func)
|
|||
}
|
||||
|
||||
void
|
||||
Epplet_register_event_handler(void (*func)
|
||||
(void *data, XEvent * ev), void *data)
|
||||
Epplet_register_event_handler(void (*func)(void *data, XEvent * ev), void *data)
|
||||
{
|
||||
event_data = data;
|
||||
event_func = func;
|
||||
|
@ -2017,7 +1982,6 @@ Epplet_del_gad(Epplet_gadget gadget)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -3572,8 +3536,7 @@ Epplet_create_popup(void)
|
|||
|
||||
void
|
||||
Epplet_add_popup_entry(Epplet_gadget gadget, const char *label,
|
||||
const char *pixmap, void (*func) (void *data),
|
||||
void *data)
|
||||
const char *pixmap, void (*func)(void *data), void *data)
|
||||
{
|
||||
Epplet_add_sized_popup_entry(gadget, label, pixmap, -1, -1, func, data);
|
||||
}
|
||||
|
@ -5647,7 +5610,6 @@ Epplet_load_config_file(const char *file)
|
|||
Epplet_add_config(s2, s3);
|
||||
}
|
||||
fclose(f);
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -5664,7 +5626,6 @@ Epplet_load_config(void)
|
|||
epplet_cfg_file = strdup(s);
|
||||
|
||||
Epplet_load_config_file(epplet_cfg_file);
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -43,20 +43,17 @@
|
|||
/****************************************************************************/
|
||||
typedef struct _etimer ETimer;
|
||||
typedef void *Epplet_gadget;
|
||||
typedef struct _rgb_buf
|
||||
{
|
||||
Imlib_Image *im;
|
||||
}
|
||||
*RGB_buf;
|
||||
|
||||
typedef struct _configitem
|
||||
{
|
||||
typedef struct {
|
||||
Imlib_Image *im;
|
||||
} *RGB_buf;
|
||||
|
||||
typedef struct {
|
||||
char *key;
|
||||
char *value;
|
||||
}
|
||||
ConfigItem;
|
||||
typedef enum gad_type
|
||||
{
|
||||
} ConfigItem;
|
||||
|
||||
typedef enum {
|
||||
E_BUTTON,
|
||||
E_DRAWINGAREA,
|
||||
E_TEXTBOX,
|
||||
|
@ -315,8 +312,7 @@ EAPI Epplet_gadget Epplet_create_image_button(const char *image, int x, int y,
|
|||
EAPI Epplet_gadget Epplet_create_textbox(const char *image,
|
||||
const char *contents, int x, int y,
|
||||
int w, int h, char size,
|
||||
void (*func) (void *data),
|
||||
void *data);
|
||||
void (*func)(void *data), void *data);
|
||||
|
||||
/* Retrieve the current contents of the textbox */
|
||||
EAPI const char *Epplet_textbox_contents(Epplet_gadget g);
|
||||
|
@ -340,14 +336,12 @@ EAPI Epplet_gadget Epplet_create_drawingarea(int x, int y, int w, int h);
|
|||
/* either side of the slider. whenever the slider changed func is called */
|
||||
EAPI Epplet_gadget Epplet_create_hslider(int x, int y, int len, int min,
|
||||
int max, int step, int jump, int *val,
|
||||
void (*func) (void *data),
|
||||
void *data);
|
||||
void (*func)(void *data), void *data);
|
||||
|
||||
/* same as horizontal slider except vertical */
|
||||
EAPI Epplet_gadget Epplet_create_vslider(int x, int y, int len, int min,
|
||||
int max, int step, int jump, int *val,
|
||||
void (*func) (void *data),
|
||||
void *data);
|
||||
void (*func)(void *data), void *data);
|
||||
|
||||
/* create a button (like normal buttons) except it toggles the value */
|
||||
/* pointed to by val between 1 and 0. func is called whenever it changes */
|
||||
|
@ -505,8 +499,7 @@ EAPI Window Epplet_create_window_config(int w, int h, const char *title,
|
|||
void *ok_data,
|
||||
void (*apply_func)(void *data),
|
||||
void *apply_data,
|
||||
void (*cancel_func) (void
|
||||
*data),
|
||||
void (*cancel_func)(void *data),
|
||||
void *cancel_data);
|
||||
|
||||
/* This is how you add gadgets to specific windows. When you create a
|
||||
|
|
|
@ -222,7 +222,6 @@ CalcEphem(date, UT, c)
|
|||
* Compute Earth-Moon distance
|
||||
*/
|
||||
c->EarthMoonDistance = R;
|
||||
|
||||
}
|
||||
|
||||
static double
|
||||
|
@ -286,7 +285,6 @@ jd(ny, nm, nd, UT)
|
|||
|
||||
JD = B + C + D + day + 1720994.5;
|
||||
return (JD);
|
||||
|
||||
}
|
||||
|
||||
static double
|
||||
|
@ -364,7 +362,6 @@ Radec_to_Cart(ra, dec, r)
|
|||
double ra, dec; /* RA and DEC */
|
||||
Vector *r; /* returns corresponding cartesian unit vector */
|
||||
{
|
||||
|
||||
/*
|
||||
* Convert ra/dec from degrees to radians
|
||||
*/
|
||||
|
@ -377,7 +374,6 @@ Radec_to_Cart(ra, dec, r)
|
|||
r->x = cos(dec) * cos(ra);
|
||||
r->y = cos(dec) * sin(ra);
|
||||
r->z = sin(dec);
|
||||
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -7,22 +7,19 @@
|
|||
#define FALSE 0
|
||||
#define TRUE 1
|
||||
|
||||
typedef struct Vector
|
||||
{
|
||||
typedef struct {
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
} Vector;
|
||||
|
||||
typedef struct Position
|
||||
{
|
||||
typedef struct {
|
||||
double x;
|
||||
double y;
|
||||
double z;
|
||||
} Position;
|
||||
|
||||
typedef struct CTrans
|
||||
{
|
||||
typedef struct {
|
||||
double UT; /* Universal Time (in decimal hours) */
|
||||
int year; /* 2 digit year */
|
||||
int month; /* 2 digit month of year */
|
||||
|
|
|
@ -276,7 +276,6 @@ apply_config(void)
|
|||
Epplet_modify_config("show_total", buff);
|
||||
display_count();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -156,7 +156,6 @@ empty_popup(void)
|
|||
Epplet_modify_multi_config("Command", command_history, num_commands);
|
||||
|
||||
Epplet_add_popup_entry(history_popup, "-Empty-", NULL, NULL, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -180,7 +179,6 @@ fill_popup(void)
|
|||
Epplet_add_popup_entry(history_popup, "-Empty-", NULL, NULL, NULL);
|
||||
|
||||
free(results);
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -29,21 +29,14 @@
|
|||
#define __BG_IMAGE "E-Mountbox-bg.png"
|
||||
#define __DEFAULT "E-Mountbox-blockdev.png"
|
||||
|
||||
static struct
|
||||
{
|
||||
static struct {
|
||||
const char *key, *value;
|
||||
} defaults[] =
|
||||
{
|
||||
{
|
||||
"BG_IMAGE", "E-Mountbox-bg.png"},
|
||||
{
|
||||
"DEFAULT", "E-Mountbox-blockdev.png"},
|
||||
{
|
||||
"EJECT_MODE", "2"},
|
||||
{
|
||||
"DO_POLL", "1"},
|
||||
{
|
||||
"POLLINTVAL", "5"}
|
||||
} defaults[] = {
|
||||
{"BG_IMAGE", "E-Mountbox-bg.png"},
|
||||
{"DEFAULT", "E-Mountbox-blockdev.png"},
|
||||
{"EJECT_MODE", "2"},
|
||||
{"DO_POLL", "1"},
|
||||
{"POLLINTVAL", "5"}
|
||||
};
|
||||
|
||||
static const char *default_types[] = {
|
||||
|
@ -53,29 +46,24 @@ static const char *default_types[] = {
|
|||
"jazz E-Mountbox-jazz.png"
|
||||
};
|
||||
|
||||
typedef enum eject_mode
|
||||
{
|
||||
typedef enum {
|
||||
NO_EJECT,
|
||||
MANUAL_EJECT,
|
||||
AUTO_EJECT
|
||||
}
|
||||
EjectMode;
|
||||
} EjectMode;
|
||||
|
||||
typedef struct _tile Tile;
|
||||
typedef struct _mountpointtype MountPointType;
|
||||
typedef struct _mode Mode;
|
||||
|
||||
struct _mode
|
||||
{
|
||||
typedef struct {
|
||||
EjectMode eject_mode;
|
||||
int do_polling;
|
||||
int polling_interval;
|
||||
int anim_mount;
|
||||
int show_buttons;
|
||||
};
|
||||
} Mode;
|
||||
|
||||
struct _mountpointtype
|
||||
{
|
||||
struct _mountpointtype {
|
||||
char *key;
|
||||
char *imagefile;
|
||||
Imlib_Image *image;
|
||||
|
@ -83,16 +71,13 @@ struct _mountpointtype
|
|||
MountPointType *prev;
|
||||
};
|
||||
|
||||
typedef struct _mountpoint
|
||||
{
|
||||
typedef struct {
|
||||
char *device;
|
||||
char *path;
|
||||
char mounted;
|
||||
}
|
||||
MountPoint;
|
||||
} MountPoint;
|
||||
|
||||
struct _tile
|
||||
{
|
||||
struct _tile {
|
||||
Imlib_Image *image;
|
||||
MountPoint *mountpoint;
|
||||
Tile *prev;
|
||||
|
@ -770,7 +755,6 @@ IsTransparent(Imlib_Image * im, int x, int y)
|
|||
static void
|
||||
SetupMounts(void)
|
||||
{
|
||||
|
||||
/* first, parse /etc/fstab to see what user-mountable mountpoints we have */
|
||||
if (!(ParseFstab()))
|
||||
{
|
||||
|
@ -969,7 +953,6 @@ static void
|
|||
ModifyMountPointType(MountPointType * mpt, const char *key,
|
||||
const char *imagefile)
|
||||
{
|
||||
|
||||
if (mpt)
|
||||
{
|
||||
if (key)
|
||||
|
|
|
@ -7,8 +7,7 @@
|
|||
Added ACPI power management support.
|
||||
*/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
char design_cap_unknown;
|
||||
char last_full_unknown;
|
||||
char rate_unknown;
|
||||
|
|
|
@ -44,8 +44,7 @@ static const int cloak_delays[] = {
|
|||
1, 2, 3, 4, 5, 10, 15, 20, 30, 60, 120
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
int fd;
|
||||
int vol_l;
|
||||
int vol_r;
|
||||
|
@ -55,15 +54,13 @@ struct
|
|||
|
||||
static Epplet_gadget lbar, rbar, standby;
|
||||
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
int cloak_anim;
|
||||
int do_cloak;
|
||||
double cloak_delay;
|
||||
double draw_interval;
|
||||
char *dir;
|
||||
}
|
||||
opt;
|
||||
} opt;
|
||||
|
||||
/* RATE is sample rate (samples/sec) */
|
||||
#define BUFS 8 /* number of audio buffers (lag compensation) */
|
||||
|
@ -441,7 +438,6 @@ standby_cb(void *data __UNUSED__)
|
|||
static void
|
||||
create_epplet_layout(void)
|
||||
{
|
||||
|
||||
Epplet_gadget_show(btn_close = Epplet_create_button(NULL, NULL,
|
||||
2, 2, 0, 0, "CLOSE",
|
||||
0, NULL, cb_close,
|
||||
|
|
|
@ -43,8 +43,7 @@ static int save_delays[] = {
|
|||
0, 1, 2, 3, 4, 5, 10, 15, 20, 30, 60, 120, 300, 600
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
int quality;
|
||||
int win;
|
||||
int beep;
|
||||
|
@ -63,8 +62,7 @@ struct
|
|||
char *file_type;
|
||||
char *script;
|
||||
char *lock_cmd;
|
||||
}
|
||||
opt;
|
||||
} opt;
|
||||
|
||||
static Window confwin = 0;
|
||||
static Epplet_gadget txt;
|
||||
|
|
|
@ -48,8 +48,7 @@ static const int shot_delays[] = {
|
|||
0, 1, 2, 3, 4, 5, 10, 15, 20, 30, 60, 120
|
||||
};
|
||||
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
int quality;
|
||||
int win;
|
||||
int beep;
|
||||
|
@ -78,8 +77,7 @@ struct
|
|||
char *ftp_temp;
|
||||
char *ftp_dir;
|
||||
char *grabber;
|
||||
}
|
||||
opt;
|
||||
} opt;
|
||||
|
||||
static Window confwin = 0;
|
||||
static Epplet_gadget txt_file_prefix;
|
||||
|
@ -506,8 +504,6 @@ apply_config(void)
|
|||
if (opt.ftp_temp)
|
||||
free(opt.ftp_temp);
|
||||
opt.ftp_temp = _Strdup(Epplet_textbox_contents(txt_ftp_temp));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -99,7 +99,6 @@ ftp_init(int passive)
|
|||
ftp_send(1, "pass");
|
||||
ftp_recv();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -37,8 +37,7 @@
|
|||
#define BEGMATCH(a, b) (!strncasecmp((a), (b), (sizeof(b) - 1)))
|
||||
#define NONULL(x) ((x) ? (x) : (""))
|
||||
|
||||
typedef struct toolbutton_struct
|
||||
{
|
||||
typedef struct {
|
||||
Epplet_gadget gad;
|
||||
char *label, *image;
|
||||
unsigned short x, y, w, h;
|
||||
|
@ -46,8 +45,7 @@ typedef struct toolbutton_struct
|
|||
char *prog;
|
||||
} toolbutton_t;
|
||||
|
||||
typedef struct tool_config_struct
|
||||
{
|
||||
typedef struct {
|
||||
Epplet_gadget cfg_tb_prog, cfg_tb_label,
|
||||
cfg_tb_image, cfg_tb_x, cfg_tb_y, cfg_tb_w, cfg_tb_h, cfg_tb_popup;
|
||||
} tool_config_t;
|
||||
|
@ -395,7 +393,6 @@ config_cb(void *data __UNUSED__)
|
|||
|
||||
for (i = 0, y = 20, x = 4; i < button_cnt; i++, y += 30, x = 4)
|
||||
{
|
||||
|
||||
cfg_gads[i].cfg_tb_prog =
|
||||
Epplet_create_textbox(NULL, buttons[i].prog, x, y, 90, 20, 2, NULL,
|
||||
NULL);
|
||||
|
|
|
@ -36,15 +36,13 @@ static char *urllist[10] =
|
|||
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
|
||||
static int num_urls = 0;
|
||||
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
char *str;
|
||||
unsigned int len;
|
||||
unsigned int pos;
|
||||
} dtext;
|
||||
|
||||
struct
|
||||
{
|
||||
struct {
|
||||
int win;
|
||||
int save_urls;
|
||||
int check_url_file;
|
||||
|
@ -56,8 +54,7 @@ struct
|
|||
char *www_command;
|
||||
char *ftp_command;
|
||||
char *get_command;
|
||||
}
|
||||
opt;
|
||||
} opt;
|
||||
|
||||
static Window confwin = 0;
|
||||
static Epplet_gadget txt_new_url_command;
|
||||
|
@ -184,8 +181,6 @@ apply_config(void)
|
|||
opt.get_command = _Strdup(Epplet_textbox_contents(txt_get_command));
|
||||
if (opt.check_url_file)
|
||||
Epplet_timer(check_url_file, NULL, 1, "URLCHECK_TIMER");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -141,7 +141,6 @@ cb_timer(void *data __UNUSED__)
|
|||
fpStat = fopen("/proc/net/wireless", "r");
|
||||
if (fpStat)
|
||||
{
|
||||
|
||||
fgets(s, sizeof(s), fpStat);
|
||||
fgets(s, sizeof(s), fpStat);
|
||||
fgets(s, sizeof(s), fpStat);
|
||||
|
|
|
@ -21,8 +21,7 @@ static Epplet_gadget vs_master, vs_pcm, vs_lin, vs_cda, b_close, b_help;
|
|||
#define debug
|
||||
#endif
|
||||
|
||||
typedef struct _MIX_CHANNEL
|
||||
{
|
||||
typedef struct {
|
||||
int id;
|
||||
int value;
|
||||
} MIX_CHANNEL;
|
||||
|
|
|
@ -317,7 +317,6 @@ printf("Diff = %f\n", 360.0*frac((D+(DLAM-DLAMS)/ARC)/TwoPi));
|
|||
return( 0.5*(1.0 - cos(D+(DLAM-DLAMS)/ARC)) );
|
||||
*/
|
||||
return (*AGE / 29.530589);
|
||||
|
||||
}
|
||||
|
||||
static double
|
||||
|
@ -397,7 +396,6 @@ NewMoon(double ax, double bx, double cx)
|
|||
int
|
||||
MiniMoon(double T, double *RA, double *DEC)
|
||||
{
|
||||
|
||||
double L0, L, LS, F, D, H, S, N, DL, CB, L_MOON, B_MOON, V, W,
|
||||
X, Y, Z, RHO;
|
||||
double cosEPS, sinEPS, P2, ARC;
|
||||
|
|
|
@ -9,7 +9,6 @@ static Epplet_gadget prog1, prog2, prog3, prog4, tog, sl1, sl2, da, im;
|
|||
static void
|
||||
cb_timer(void *data __UNUSED__)
|
||||
{
|
||||
|
||||
val3++;
|
||||
if (val3 > 100)
|
||||
val3 = 0;
|
||||
|
|
|
@ -1398,7 +1398,6 @@ draw_text(void)
|
|||
{
|
||||
for (i = y; i < (y + 19); i++)
|
||||
{
|
||||
|
||||
if (x == 1)
|
||||
c = xpm1[i - y][j];
|
||||
else if (x == 2)
|
||||
|
|
|
@ -910,7 +910,6 @@ draw_text(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
for (i = y; i < (y + 19); i++)
|
||||
{
|
||||
switch (enlighten[i - y][j])
|
||||
|
|
|
@ -427,8 +427,7 @@ mbox_folder_count(char *path, int force)
|
|||
file_mtime = 0;
|
||||
return 0;
|
||||
}
|
||||
if (!force && ((size_t) s.st_size == file_size)
|
||||
&& (s.st_mtime == file_mtime))
|
||||
if (!force && ((size_t)s.st_size == file_size) && (s.st_mtime == file_mtime))
|
||||
{
|
||||
D((" -> Mailbox unchanged.\n"));
|
||||
return 0;
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
char **
|
||||
net_get_devices(unsigned long *count)
|
||||
{
|
||||
|
||||
FILE *fp;
|
||||
char buff[256], **names = NULL, *s;
|
||||
unsigned long i;
|
||||
|
@ -81,13 +80,11 @@ net_get_devices(unsigned long *count)
|
|||
#else
|
||||
return ((char **)NULL);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
unsigned char
|
||||
net_get_bytes_inout(const char *device, double *in_bytes, double *out_bytes)
|
||||
{
|
||||
|
||||
#ifdef __sun__
|
||||
kstat_ctl_t *kc;
|
||||
kstat_t *ksp;
|
||||
|
@ -180,7 +177,6 @@ net_get_bytes_inout(const char *device, double *in_bytes, double *out_bytes)
|
|||
const char *
|
||||
net_strerror(unsigned char code)
|
||||
{
|
||||
|
||||
switch (code)
|
||||
{
|
||||
case 0:
|
||||
|
@ -210,7 +206,6 @@ net_strerror(unsigned char code)
|
|||
double
|
||||
net_get_bytes_in(const char *device)
|
||||
{
|
||||
|
||||
double in_bytes = -1.0;
|
||||
|
||||
net_get_bytes_inout(device, &in_bytes, (double *)NULL);
|
||||
|
@ -220,7 +215,6 @@ net_get_bytes_in(const char *device)
|
|||
double
|
||||
net_get_bytes_out(const char *device)
|
||||
{
|
||||
|
||||
double out_bytes = -1.0;
|
||||
|
||||
net_get_bytes_inout(device, (double *)NULL, &out_bytes);
|
||||
|
|
|
@ -22,17 +22,14 @@
|
|||
#define PROC_MEM_SIZE 6
|
||||
#define PROC_SWAP_SIZE 3
|
||||
|
||||
typedef struct _ProcInfo ProcInfo;
|
||||
|
||||
struct _ProcInfo
|
||||
{
|
||||
typedef struct {
|
||||
unsigned cpu[PROC_CPU_SIZE];
|
||||
unsigned cpu_now[PROC_CPU_SIZE];
|
||||
unsigned cpu_last[PROC_CPU_SIZE];
|
||||
|
||||
unsigned mem[PROC_MEM_SIZE];
|
||||
unsigned swap[PROC_SWAP_SIZE];
|
||||
};
|
||||
} ProcInfo;
|
||||
|
||||
void proc_read_cpu(ProcInfo *);
|
||||
void proc_read_mem(ProcInfo *);
|
||||
|
|
Loading…
Reference in New Issue