wmifs: Remaining Debian patches.
This patch consists of all remaining differences between the Debian package version 1.3b1-22 and the original upstream source. They were not mentioned in the Debian changelog.
This commit is contained in:
parent
9027310f87
commit
44300ffec2
|
@ -248,7 +248,6 @@ extern char **environ;
|
||||||
/* Global Variables */
|
/* Global Variables */
|
||||||
/********************/
|
/********************/
|
||||||
|
|
||||||
char *ProgName;
|
|
||||||
char *active_interface = NULL;
|
char *active_interface = NULL;
|
||||||
int TimerDivisor=60;
|
int TimerDivisor=60;
|
||||||
int WaveForm=0;
|
int WaveForm=0;
|
||||||
|
@ -298,10 +297,6 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
/* Parse Command Line */
|
/* Parse Command Line */
|
||||||
|
|
||||||
ProgName = argv[0];
|
|
||||||
if (strlen(ProgName) >= 5)
|
|
||||||
ProgName += (strlen(ProgName) - 5);
|
|
||||||
|
|
||||||
for (i=1; i<argc; i++) {
|
for (i=1; i<argc; i++) {
|
||||||
char *arg = argv[i];
|
char *arg = argv[i];
|
||||||
|
|
||||||
|
@ -426,16 +421,18 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION);
|
if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION);
|
||||||
|
|
||||||
/* Scan throught the .rc files */
|
/* Scan throught the .rc files */
|
||||||
strcpy(temp, "/etc/wmifsrc");
|
parse_rcfile("/etc/wmifsrc", wmifs_keys);
|
||||||
parse_rcfile(temp, wmifs_keys);
|
|
||||||
|
|
||||||
p = getenv("HOME");
|
p = getenv("HOME");
|
||||||
|
if (p == NULL || *p == 0) {
|
||||||
|
fprintf(stderr, "Unknown $HOME directory, please check your environment\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
strcpy(temp, p);
|
strcpy(temp, p);
|
||||||
strcat(temp, "/.wmifsrc");
|
strcat(temp, "/.wmifsrc");
|
||||||
parse_rcfile(temp, wmifs_keys);
|
parse_rcfile(temp, wmifs_keys);
|
||||||
|
|
||||||
strcpy(temp, "/etc/wmifsrc.fixed");
|
parse_rcfile("/etc/wmifsrc.fixed", wmifs_keys);
|
||||||
parse_rcfile(temp, wmifs_keys);
|
|
||||||
|
|
||||||
openXwindow(argc, argv, wmifs_master_xpm, wmifs_mask_bits, wmifs_mask_width, wmifs_mask_height);
|
openXwindow(argc, argv, wmifs_master_xpm, wmifs_mask_bits, wmifs_mask_width, wmifs_mask_height);
|
||||||
|
|
||||||
|
@ -446,12 +443,6 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
gettimeofday(&tv2, NULL);
|
gettimeofday(&tv2, NULL);
|
||||||
nexttime = ScrollSpeed;
|
nexttime = ScrollSpeed;
|
||||||
|
|
||||||
for (i=0; i<stat_online; i++) {
|
|
||||||
get_statistics(stat_devices[i].name, &ipacket, &opacket, &istat, &ostat);
|
|
||||||
stat_devices[i].istatlast = istat;
|
|
||||||
stat_devices[i].ostatlast = ostat;
|
|
||||||
}
|
|
||||||
|
|
||||||
DrawActiveIFS(stat_devices[stat_current].name);
|
DrawActiveIFS(stat_devices[stat_current].name);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
|
@ -487,17 +478,14 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
|
|
||||||
stat_devices[i].istatlast = istat;
|
stat_devices[i].istatlast = istat;
|
||||||
stat_devices[i].ostatlast = ostat;
|
stat_devices[i].ostatlast = ostat;
|
||||||
RedrawWindow();
|
|
||||||
}
|
}
|
||||||
|
RedrawWindow();
|
||||||
|
|
||||||
if (curtime >= nexttime) {
|
if (curtime >= nexttime) {
|
||||||
nexttime=curtime+ScrollSpeed;
|
nexttime=curtime+ScrollSpeed;
|
||||||
|
|
||||||
|
DrawStats(&stat_devices[stat_current].his[0][0], 54, 40, 5, 58);
|
||||||
for (i=0; i<stat_online; i++) {
|
for (i=0; i<stat_online; i++) {
|
||||||
if (i == stat_current) {
|
|
||||||
|
|
||||||
DrawStats(&stat_devices[i].his[0][0], 54, 40, 5, 58);
|
|
||||||
}
|
|
||||||
if (stillonline(stat_devices[i].name)) {
|
if (stillonline(stat_devices[i].name)) {
|
||||||
for (j=1; j<54; j++) {
|
for (j=1; j<54; j++) {
|
||||||
stat_devices[i].his[j-1][0] = stat_devices[i].his[j][0];
|
stat_devices[i].his[j-1][0] = stat_devices[i].his[j][0];
|
||||||
|
@ -521,9 +509,7 @@ void wmifs_routine(int argc, char **argv) {
|
||||||
exit(0);
|
exit(0);
|
||||||
break;
|
break;
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
i = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y);
|
but_stat = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y);
|
||||||
|
|
||||||
but_stat = i;
|
|
||||||
break;
|
break;
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
i = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y);
|
i = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y);
|
||||||
|
@ -858,7 +844,7 @@ void DrawStats(int *his, int num, int size, int x_left, int y_bottom) {
|
||||||
int *p;
|
int *p;
|
||||||
int p0,p1,p2,p3;
|
int p0,p1,p2,p3;
|
||||||
|
|
||||||
pixels_per_byte = 1*size;
|
pixels_per_byte = size;
|
||||||
p = his;
|
p = his;
|
||||||
for (j=0; j<num; j++) {
|
for (j=0; j<num; j++) {
|
||||||
if (p[0] + p[1] > pixels_per_byte)
|
if (p[0] + p[1] > pixels_per_byte)
|
||||||
|
|
Loading…
Reference in a new issue