wmppp.app: Remove trailing whitespace.

This commit is contained in:
Doug Torrance 2014-09-14 12:57:14 -05:00 committed by Carlos R. Mafra
parent bf86800181
commit a60b95bc13
15 changed files with 115 additions and 115 deletions

View file

@ -5,7 +5,7 @@ WMPPP 1.3.0
-------------------------------------------------------------- --------------------------------------------------------------
* Brand new release, WMPPP almost is completely rewritten * Brand new release, WMPPP almost is completely rewritten
since the last release, no 'known' bugs yet; since the last release, no 'known' bugs yet;
WMPPP/WMiFS 1.2p1 WMPPP/WMiFS 1.2p1
-------------------------------------------------------------- --------------------------------------------------------------
@ -20,26 +20,26 @@ WMPPP/WMiFS 1.2p1
one, but we're looking into this. one, but we're looking into this.
* WMPPP: ppp0 is still hardcoded (sigh), will be fixed. * WMPPP: ppp0 is still hardcoded (sigh), will be fixed.
* WMiFS: SEGV with the dummy interface, we're looking * WMiFS: SEGV with the dummy interface, we're looking
into this (needs to be ignored like lo). into this (needs to be ignored like lo).
* WMiFS: Manages to get X CPU usage way to high on * WMiFS: Manages to get X CPU usage way to high on
some systems somehow (reported myself) :) some systems somehow (reported myself) :)
* Special thanks to Marcelo <mmagallo@efis.ucr.ac.cr> * Special thanks to Marcelo <mmagallo@efis.ucr.ac.cr>
for providing some real usefull patches for WMPPP, for providing some real usefull patches for WMPPP,
they will be in the next update for sure! they will be in the next update for sure!
WMPPP/WMiFS 1.2 WMPPP/WMiFS 1.2
-------------------------------------------------------------- --------------------------------------------------------------
* The pixmap 'shift' in AfterStep's Wharf seems * The pixmap 'shift' in AfterStep's Wharf seems
not to be our fault, but a bug in Wharf! not to be our fault, but a bug in Wharf!
Please notify the authors of AfterStep about Please notify the authors of AfterStep about
this if you like to see this fixed, Wharf can't this if you like to see this fixed, Wharf can't
handle pixmaps that are larger than 60x60 pixels handle pixmaps that are larger than 60x60 pixels
very well :( very well :(
* Most code is yet again quite rewritten, but we * Most code is yet again quite rewritten, but we
think all previous annoyances are gone now ;-) think all previous annoyances are gone now ;-)

View file

@ -14,7 +14,7 @@ Version Description
* Multiple ppp devices support (EXPERIMENTAL!); * Multiple ppp devices support (EXPERIMENTAL!);
* getmodemspeed.c now reads /etc/ppp/connect-errors, * getmodemspeed.c now reads /etc/ppp/connect-errors,
and scans for both CARRIER and CONNECT; and scans for both CARRIER and CONNECT;
1.2p1 * Released 980502 1.2p1 * Released 980502
@ -28,72 +28,72 @@ Version Description
* Updated the WMPPP rc files, again, due to some last * Updated the WMPPP rc files, again, due to some last
minute changes in the code, WMPPP's rc files where minute changes in the code, WMPPP's rc files where
no longer working properly. no longer working properly.
1.2 * Released 980429 1.2 * Released 980429
* Completely revamped the WMPPP & WMiFS GUI :) * Completely revamped the WMPPP & WMiFS GUI :)
* Added 'forceleft, forcemiddle and forceright' * Added 'forceleft, forcemiddle and forceright'
options in WMiFS for 'real' multiuser systems, options in WMiFS for 'real' multiuser systems,
when 'force*' is detected in /etc/wmifsrc the when 'force*' is detected in /etc/wmifsrc the
user settings in ~/.wmifsrc are overridden user settings in ~/.wmifsrc are overridden
(usefull for sites where users may not fiddle (usefull for sites where users may not fiddle
with pppd's options :) with pppd's options :)
* WMPPP: Ditto, added 'force' facility here too * WMPPP: Ditto, added 'force' facility here too
* WMPPP: now correctly redisplays time when killed * WMPPP: now correctly redisplays time when killed
and restarted and restarted
* WMPPP: timer now starts to run when the actual * WMPPP: timer now starts to run when the actual
connection is made connection is made
* WMPPP: added BAUD CONNECT value display * WMPPP: added BAUD CONNECT value display
* WMPPP: added 'getmodemspeed', a SUID proggie to * WMPPP: added 'getmodemspeed', a SUID proggie to
read the CONNECT value from /var/log/messages read the CONNECT value from /var/log/messages
* WMPPP: dropped the config GUI and added an * WMPPP: dropped the config GUI and added an
.wmppprc file instead > motivation to do so: .wmppprc file instead > motivation to do so:
this way, WMPPP is much more platform and this way, WMPPP is much more platform and
distribution independant :) distribution independant :)
* WMPPP: enhanced the status LED, yellow means * WMPPP: enhanced the status LED, yellow means
dialing, green means online, red means error dialing, green means online, red means error
* WMPPP: added -display commandline option * WMPPP: added -display commandline option
* WMPPP: added -t commandline option, default * WMPPP: added -t commandline option, default
the timer will display HH:MM, -t will display the timer will display HH:MM, -t will display
MM:SS and switch to HH:MM after 60 minutes MM:SS and switch to HH:MM after 60 minutes
* WMiFS: added support for all interfaces in * WMiFS: added support for all interfaces in
/proc/net/, now all interfaces are supported :) /proc/net/, now all interfaces are supported :)
* WMiFS: added -display commandline option * WMiFS: added -display commandline option
* WMiFS: added -w commandline option, this will * WMiFS: added -w commandline option, this will
draw the graph in our new 'waveform' look :) draw the graph in our new 'waveform' look :)
* WMiFS: fixed the coredump problems that occured * WMiFS: fixed the coredump problems that occured
on some systems with or without .wmifsrc file on some systems with or without .wmifsrc file
typo's, errors, etc. in the .wmifsrc file are typo's, errors, etc. in the .wmifsrc file are
now also being ignored/rejected, the worst now also being ignored/rejected, the worst
thing that can happen now is that the scripts thing that can happen now is that the scripts
do not execute (i.e. luser error) ;-) do not execute (i.e. luser error) ;-)
* WMiFS: when monitoring a ppp interface, bytes * WMiFS: when monitoring a ppp interface, bytes
are used to draw the graph, otherwise packets are used to draw the graph, otherwise packets
* WMiFS: made the RX/TX/Status LED box identical * WMiFS: made the RX/TX/Status LED box identical
to the one in WMPPP, the right LED is the status to the one in WMPPP, the right LED is the status
LED, green means interface is working, red means LED, green means interface is working, red means
error (interface down, NIC broken, etc.) error (interface down, NIC broken, etc.)
1.1 - Released 980407
1.1 - Released 980407
- Added WMiFS, the no button more stats version - Added WMiFS, the no button more stats version
- All ppp/eth load graphs are now autoscaling - All ppp/eth load graphs are now autoscaling
- Autosensing of all active ppp/eth interfaces - Autosensing of all active ppp/eth interfaces
@ -115,7 +115,7 @@ Version Description
Bugfixes Bugfixes
1.0pre6 - Not released, developers release 1.0pre6 - Not released, developers release
Redesigned WMPPP's dock.app GUI Redesigned WMPPP's dock.app GUI
Added failsave Yes/No disconnect Added failsave Yes/No disconnect
requester requester
Some code cleaning Some code cleaning

View file

@ -14,7 +14,7 @@ the WindowMaker Dock (preferred) or the Clip.
Now press the rightmouse button on WMPPP's outer edges and Now press the rightmouse button on WMPPP's outer edges and
select "Settings..." from the popup menu that appears. select "Settings..." from the popup menu that appears.
Enable the 'Start when WindowMaker is started' option, then Enable the 'Start when WindowMaker is started' option, then
click on the 'OK' button in the Docked Applications Panel. click on the 'OK' button in the Docked Applications Panel.
@ -32,7 +32,7 @@ pixel shaped icon on your desktop.
BTW, FVWM can swallow it too, so we've heard ;-) BTW, FVWM can swallow it too, so we've heard ;-)
Dragging WMPPP Dragging WMPPP
-------------------------------------------------------------- --------------------------------------------------------------
Be sure to drag WMPPP on it's outer edges, WMPPP is a bit Be sure to drag WMPPP on it's outer edges, WMPPP is a bit
picky due to the large gfx pixmap it keeps ;-) picky due to the large gfx pixmap it keeps ;-)
@ -59,7 +59,7 @@ succesfull connect, after those 60 seconds, the CARRIER/CONNECT
value will dissapear and the Speed-O-Meter will take it's place. value will dissapear and the Speed-O-Meter will take it's place.
Creating PPP dialup scripts Creating PPP dialup scripts
-------------------------------------------------------------- --------------------------------------------------------------
Since we've dropped the graphic configuration GUI, Since we've dropped the graphic configuration GUI,
you'll have to create some dialup scripts yourself you'll have to create some dialup scripts yourself
@ -101,15 +101,15 @@ You can define them in your ~/.wmppprc like:
stop: /home/ppp/wmppp-stop stop: /home/ppp/wmppp-stop
ifdown: /home/ppp/wmppp-restart ifdown: /home/ppp/wmppp-restart
Note: The option 'speed:' is to define the location where Note: The option 'speed:' is to define the location where
'getmodemspeed' resides, getmodemspeed is a little program 'getmodemspeed' resides, getmodemspeed is a little program
that's responsible for the WMPPP CARRIER/CONNECT display. that's responsible for the WMPPP CARRIER/CONNECT display.
You'll also need two entries in your 'chatfile' i.e. You'll also need two entries in your 'chatfile' i.e.
REPORT CARRIER REPORT CARRIER
REPORT CONNECT REPORT CONNECT
This will make chat log all connects and carriers to This will make chat log all connects and carriers to
/etc/ppp/connect-errors, which getmodemspeed needs, /etc/ppp/connect-errors, which getmodemspeed needs,
that is, if you want WMPPP to display your CARRIER that is, if you want WMPPP to display your CARRIER
@ -132,7 +132,7 @@ scripts (we don't, we assure you ;-) ) can launch the appropiate
RedHat ppp scripts, same applies to Debian and any other other RedHat ppp scripts, same applies to Debian and any other other
distribution which provide a simular non-standard ppp setup distribution which provide a simular non-standard ppp setup
feature for setting up ppp scripts. feature for setting up ppp scripts.
See the documentation that ships with your Linux distribution See the documentation that ships with your Linux distribution
for more info (if needed). for more info (if needed).
@ -145,7 +145,7 @@ WMPPP will connect just fine when run as root, but if you want
to run WMPPP as a non-root user, there are a few files and to run WMPPP as a non-root user, there are a few files and
programs to make permissions changes to. programs to make permissions changes to.
WMPPP (actually pppd) needs access to the device file your WMPPP (actually pppd) needs access to the device file your
modem is on, so if you use COM1, then the modem device file modem is on, so if you use COM1, then the modem device file
you use is /dev/cua0 or /dev/ttyS0 (depending on your Linux you use is /dev/cua0 or /dev/ttyS0 (depending on your Linux
and kernel version). and kernel version).
@ -166,4 +166,4 @@ always run as SUID root. Change the owner and SUID bit like:
-------------------------------------------------------------- --------------------------------------------------------------
Note: If you run a site where users may not fiddle with the Note: If you run a site where users may not fiddle with the
PPP scripts, read INSTALL > Info For Site Admins! PPP scripts, read INSTALL > Info For Site Admins!

View file

@ -1,9 +1,9 @@
Installation instructions for WMPPP. Installation instructions for WMPPP.
NOTE! NOTE!
-------------------------------------------------------------- --------------------------------------------------------------
Installing this program requires root privileges, ask your Installing this program requires root privileges, ask your
local system/network administrator kindly if she/he wants local system/network administrator kindly if she/he wants
to install this software for you ;-) to install this software for you ;-)
@ -29,28 +29,28 @@ Installation
set up the paths to your ppp start, set up the paths to your ppp start,
stop & restart scripts stop & restart scripts
7) % wmppp & (try 'wmppp -h &' for help) 7) % wmppp & (try 'wmppp -h &' for help)
Extra Install Info For Site Administrators! Extra Install Info For Site Administrators!
-------------------------------------------------------------- --------------------------------------------------------------
For site administrators who don't want their users messing For site administrators who don't want their users messing
up pppd's configuration files, but do want them to be able up pppd's configuration files, but do want them to be able
to make a dialup connection, a sample system.rc file is to make a dialup connection, a sample system.rc file is
included (system.wmppprc), please take a look at it! included (system.wmppprc), please take a look at it!
The installation will install standard rc files in $HOME The installation will install standard rc files in $HOME
and /etc/ WITHOUT the 'force' option! and /etc/ WITHOUT the 'force' option!
How it works: How it works:
WMPPP first scans /etc/ if there is a wmppprc present. WMPPP first scans /etc/ if there is a wmppprc present.
If true, it will scan if the keyword 'force' is trailing If true, it will scan if the keyword 'force' is trailing
a command, for example 'forceleft' instead of 'left'. a command, for example 'forceleft' instead of 'left'.
If the keywords 'force' are indeed trailing the 'normal' If the keywords 'force' are indeed trailing the 'normal'
commands, all user .wmppprc files will be ignored i.e. commands, all user .wmppprc files will be ignored i.e.
OVERRIDDEN ;-) OVERRIDDEN ;-)
If the 'force' keyword is not found in /etc/wmppprc, If the 'force' keyword is not found in /etc/wmppprc,
@ -78,5 +78,5 @@ Note 1: If "make install" fails on your system, please edit
Make install defaults to /usr/local/bin & /etc/ppp/. Make install defaults to /usr/local/bin & /etc/ppp/.
Note 2: Please DO read the HINTS, this file contains some Note 2: Please DO read the HINTS, this file contains some
very usefull tips and hints about WMPPP. very usefull tips and hints about WMPPP.

View file

@ -2,17 +2,17 @@ WMPPP-1.3.0 - Public release
-------------------------------------------------------------- --------------------------------------------------------------
Authors...: Martijn Pieterse (pieterse@xs4all.nl) Authors...: Martijn Pieterse (pieterse@xs4all.nl)
Antoine Nulle (warp@xs4all.nl) Antoine Nulle (warp@xs4all.nl)
Note......: WMPPP has it's own mailbox, as our pop3 accounts Note......: WMPPP has it's own mailbox, as our pop3 accounts
are already way too crowded :) are already way too crowded :)
Please mail bugreports, comments, suggestions, Please mail bugreports, comments, suggestions,
requests and flames to: requests and flames to:
dockapps@warped.xs4all.nl dockapps@warped.xs4all.nl
The official WMPPP support website address: The official WMPPP support website address:
http://windowmaker.mezaway.org/ http://windowmaker.mezaway.org/
@ -23,7 +23,7 @@ you some nice additional features too...
* Integrated online timer; * Integrated online timer;
* Integrated modem RX/TX LED's; * Integrated modem RX/TX LED's;
* Integrated WMPPP status LED; * Integrated WMPPP status LED;
* Integrated autoscaling PPP transfer statistics; * Integrated autoscaling PPP transfer statistics;
* Integrated CARRIER/CONNECT display; * Integrated CARRIER/CONNECT display;
* Integrated bytes/second Speed-O-Meter; * Integrated bytes/second Speed-O-Meter;
@ -35,7 +35,7 @@ you some nice additional features too...
* Several commandline options (try '-h' for help); * Several commandline options (try '-h' for help);
WMPPP is being developped on DEC Alpha machines running Linux WMPPP is being developped on DEC Alpha machines running Linux
(RedHat-5.0 and RedHat-5.1), but WMPPP is also intensively (RedHat-5.0 and RedHat-5.1), but WMPPP is also intensively
tested on x86 and m68k Linux machines... tested on x86 and m68k Linux machines...
@ -48,11 +48,11 @@ BUGS Things you don't want to know ;-)
CHANGES Description of changes. CHANGES Description of changes.
TODO Things we've already planned for WMPPP. TODO Things we've already planned for WMPPP.
COPYING GNU General Public License Version 2. COPYING GNU General Public License Version 2.
Bugs Bugs
-------------------------------------------------------------- --------------------------------------------------------------
If you discover any bugs in this software, please send a If you discover any bugs in this software, please send a
bugreport to dockapps@warped.xs4all.nl and describe the bugreport to dockapps@warped.xs4all.nl and describe the
problem as detailed! as you can. problem as detailed! as you can.
@ -60,7 +60,7 @@ problem as detailed! as you can.
Copyright Copyright
-------------------------------------------------------------- --------------------------------------------------------------
WMPPP.app is copyright (c) 1997, 1998 by Martijn Pieterse and WMPPP.app is copyright (c) 1997, 1998 by Martijn Pieterse and
Antoine Nulle and licensed through the GNU General Public License. Antoine Nulle and licensed through the GNU General Public License.
Read the COPYING file for the complete GNU license. Read the COPYING file for the complete GNU license.

View file

@ -4,7 +4,7 @@ TODO list for WMPPP.
* Optional LCD style GUI; * Optional LCD style GUI;
* Support for multiple ISP scripts; * Support for multiple ISP scripts;
* External configuration/information GUI?; * External configuration/information GUI?;
Your feedback! If you have nice suggestions, ideas, whatever, Your feedback! If you have nice suggestions, ideas, whatever,
that aren't on this list, feel free to mail them to: that aren't on this list, feel free to mail them to:

View file

@ -1,11 +1,11 @@
/* Generic single linked list to keep various information /* Generic single linked list to keep various information
Copyright (C) 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Author: Kresten Krab Thorup Author: Kresten Krab Thorup
Many modifications by Alfredo K. Kojima Many modifications by Alfredo K. Kojima
This file is part of GNU CC. This file is part of GNU CC.
@ -38,7 +38,7 @@ Boston, MA 02110-1301 USA. */
/* Return a cons cell produced from (head . tail) */ /* Return a cons cell produced from (head . tail) */
INLINE LinkedList* INLINE LinkedList*
list_cons(void* head, LinkedList* tail) list_cons(void* head, LinkedList* tail)
{ {
LinkedList* cell; LinkedList* cell;
@ -63,7 +63,7 @@ list_length(LinkedList* list)
return i; return i;
} }
/* Return the Nth element of LIST, where N count from zero. If N /* Return the Nth element of LIST, where N count from zero. If N
larger than the list length, NULL is returned */ larger than the list length, NULL is returned */
INLINE void* INLINE void*
@ -84,7 +84,7 @@ list_nth(int index, LinkedList* list)
INLINE void INLINE void
list_remove_head(LinkedList** list) list_remove_head(LinkedList** list)
{ {
if (!*list) return; if (!*list) return;
if ((*list)->tail) if ((*list)->tail)
{ {
LinkedList* tail = (*list)->tail; /* fetch next */ LinkedList* tail = (*list)->tail; /* fetch next */
@ -116,7 +116,7 @@ INLINE LinkedList *
list_remove_elem(LinkedList* list, void* elem) list_remove_elem(LinkedList* list, void* elem)
{ {
LinkedList *tmp; LinkedList *tmp;
if (list) { if (list) {
if (list->head == elem) { if (list->head == elem) {
tmp = list->tail; tmp = list->tail;

View file

@ -1,4 +1,4 @@
/* Generic single linked list to keep various information /* Generic single linked list to keep various information
Copyright (C) 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1993, 1994 Free Software Foundation, Inc.
Author: Kresten Krab Thorup Author: Kresten Krab Thorup

View file

@ -1,9 +1,9 @@
/* dock.c- built-in Dock module for WindowMaker /* dock.c- built-in Dock module for WindowMaker
* *
* WindowMaker window manager * WindowMaker window manager
* *
* Copyright (c) 1997 Alfredo K. Kojima * Copyright (c) 1997 Alfredo K. Kojima
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or * the Free Software Foundation; either version 2 of the License, or
@ -28,7 +28,7 @@
*---------------------------------------------------------------------- *----------------------------------------------------------------------
* parse_command-- * parse_command--
* Divides a command line into a argv/argc pair. * Divides a command line into a argv/argc pair.
*---------------------------------------------------------------------- *----------------------------------------------------------------------
*/ */
#define PRC_ALPHA 0 #define PRC_ALPHA 0
#define PRC_BLANK 1 #define PRC_BLANK 1
@ -64,11 +64,11 @@ next_token(char *word, char **next)
t = ret = malloc(strlen(word)+1); t = ret = malloc(strlen(word)+1);
ptr = word; ptr = word;
state = 0; state = 0;
*t = 0; *t = 0;
while (1) { while (1) {
if (*ptr==0) if (*ptr==0)
ctype = PRC_EOS; ctype = PRC_EOS;
else if (*ptr=='\\') else if (*ptr=='\\')
ctype = PRC_ESCAPE; ctype = PRC_ESCAPE;
@ -98,12 +98,12 @@ next_token(char *word, char **next)
t = strdup(ret); t = strdup(ret);
free(ret); free(ret);
if (ctype==PRC_EOS) if (ctype==PRC_EOS)
*next = NULL; *next = NULL;
else else
*next = ptr; *next = ptr;
return t; return t;
} }
@ -118,7 +118,7 @@ parse_command(char *command, char ***argv, int *argc)
line = command; line = command;
do { do {
token = next_token(line, &line); token = next_token(line, &line);
if (token) { if (token) {
list = list_cons(token, list); list = list_cons(token, list);
} }
} while (token!=NULL && line!=NULL); } while (token!=NULL && line!=NULL);
@ -141,15 +141,15 @@ execCommand(char *command)
int argc; int argc;
parse_command(command, &argv, &argc); parse_command(command, &argv, &argc);
if (argv==NULL) { if (argv==NULL) {
return 0; return 0;
} }
if ((pid=fork())==0) { if ((pid=fork())==0) {
char **args; char **args;
int i; int i;
args = malloc(sizeof(char*)*(argc+1)); args = malloc(sizeof(char*)*(argc+1));
if (!args) if (!args)
exit(10); exit(10);

View file

@ -14,7 +14,7 @@
--- ---
11/09/1998 (Martijn Pieterse, pieterse@xs4all.nl) 11/09/1998 (Martijn Pieterse, pieterse@xs4all.nl)
* Removed a bug from parse_rcfile. You could * Removed a bug from parse_rcfile. You could
not use "start" in a command if a label was not use "start" in a command if a label was
also start. also start.
* Changed the needed geometry string. * Changed the needed geometry string.
We don't use window size, and don't support We don't use window size, and don't support
@ -174,7 +174,7 @@ static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[]) {
err = XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen->pixmap), err = XpmCreatePixmapFromData(display, Root, pixmap_bytes, &(wmgen->pixmap),
&(wmgen->mask), &(wmgen->attributes)); &(wmgen->mask), &(wmgen->attributes));
if (err != XpmSuccess) { if (err != XpmSuccess) {
fprintf(stderr, "Not enough free colorcells.\n"); fprintf(stderr, "Not enough free colorcells.\n");
exit(1); exit(1);
@ -221,9 +221,9 @@ static int flush_expose(Window w) {
\*******************************************************************************/ \*******************************************************************************/
void RedrawWindow(void) { void RedrawWindow(void) {
flush_expose(iconwin); flush_expose(iconwin);
XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, XCopyArea(display, wmgen.pixmap, iconwin, NormalGC,
0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0); 0,0, wmgen.attributes.width, wmgen.attributes.height, 0,0);
flush_expose(win); flush_expose(win);
XCopyArea(display, wmgen.pixmap, win, NormalGC, XCopyArea(display, wmgen.pixmap, win, NormalGC,
@ -235,9 +235,9 @@ void RedrawWindow(void) {
\*******************************************************************************/ \*******************************************************************************/
void RedrawWindowXY(int x, int y) { void RedrawWindowXY(int x, int y) {
flush_expose(iconwin); flush_expose(iconwin);
XCopyArea(display, wmgen.pixmap, iconwin, NormalGC, XCopyArea(display, wmgen.pixmap, iconwin, NormalGC,
x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0); x,y, wmgen.attributes.width, wmgen.attributes.height, 0,0);
flush_expose(win); flush_expose(win);
XCopyArea(display, wmgen.pixmap, win, NormalGC, XCopyArea(display, wmgen.pixmap, win, NormalGC,
@ -292,7 +292,7 @@ void createXBMfromXPM(char *xbm, char **xpm, int sx, int sy) {
char zero; char zero;
unsigned char bwrite; unsigned char bwrite;
int bcount; int bcount;
sscanf(*xpm, "%d %d %d", &width, &height, &numcol); sscanf(*xpm, "%d %d %d", &width, &height, &numcol);
@ -377,7 +377,7 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
} }
if (!(display = XOpenDisplay(display_name))) { if (!(display = XOpenDisplay(display_name))) {
fprintf(stderr, "%s: can't open display %s\n", fprintf(stderr, "%s: can't open display %s\n",
wname, XDisplayName(display_name)); wname, XDisplayName(display_name));
exit(1); exit(1);
} }
@ -402,10 +402,10 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
mysizehints.width = 64; mysizehints.width = 64;
mysizehints.height = 64; mysizehints.height = 64;
win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y, win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y,
mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y, iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y,
mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix);
@ -426,7 +426,7 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
XSetWMName(display, win, &name); XSetWMName(display, win, &name);
/* Create GC for drawing */ /* Create GC for drawing */
gcm = GCForeground | GCBackground | GCGraphicsExposures; gcm = GCForeground | GCBackground | GCGraphicsExposures;
gcv.foreground = fore_pix; gcv.foreground = fore_pix;
gcv.background = back_pix; gcv.background = back_pix;

View file

@ -21,7 +21,7 @@ clean::
rm wmppp getmodemspeed rm wmppp getmodemspeed
install:: install::
cp -f wmppp /usr/local/bin/ cp -f wmppp /usr/local/bin/
chmod 755 /usr/local/bin/wmppp chmod 755 /usr/local/bin/wmppp
chown root:root /usr/local/bin/wmppp chown root:root /usr/local/bin/wmppp

View file

@ -3,7 +3,7 @@ ABORT 'NO CARRIER'
ABORT 'RING - NO ANSWER' ABORT 'RING - NO ANSWER'
REPORT CARRIER REPORT CARRIER
REPORT CONNECT REPORT CONNECT
'' ATZ '' ATZ
OK ATDT OK ATDT
ogin: ogin:
word: word:

View file

@ -15,4 +15,4 @@ if [ -r /var/run/$DEVICE.pid ]; then
fi fi
echo >/dev/console "ERROR: PPP link not active on $DEVICE" echo >/dev/console "ERROR: PPP link not active on $DEVICE"
exit 1 exit 1

View file

@ -4,7 +4,7 @@ int main(void) {
FILE *fd; FILE *fd;
char temp[256]; char temp[256];
fd = popen("tac /etc/ppp/connect-errors | grep '['CONNECT'|'CARRIER']' | head -1", "r"); fd = popen("tac /etc/ppp/connect-errors | grep '['CONNECT'|'CARRIER']' | head -1", "r");
while (fgets(temp, 256, fd)) { while (fgets(temp, 256, fd)) {

View file

@ -13,7 +13,7 @@
How do I create a not so solid window? How do I create a not so solid window?
How do I open a window? How do I open a window?
How do I use pixmaps? How do I use pixmaps?
pppstats pppstats
A program that prints the amount of data that A program that prints the amount of data that
is transferred over a ppp-line. is transferred over a ppp-line.
@ -32,25 +32,25 @@
Known Features: (or in non M$ talk, BUGS) Known Features: (or in non M$ talk, BUGS)
* none known so far in this release * none known so far in this release
---- ----
Thanks Thanks
---- ----
CCC (Constructive Code Criticism): CCC (Constructive Code Criticism):
Marcelo E. Magallon Marcelo E. Magallon
Thanks a LOT! It takes a while to get me convinced... :) Thanks a LOT! It takes a while to get me convinced... :)
Minor bugs and ideas: Minor bugs and ideas:
Marc De Scheemaecker / David Mihm / Chris Soghoian / Marc De Scheemaecker / David Mihm / Chris Soghoian /
Alessandro Usseglio Viretta Alessandro Usseglio Viretta
and ofcourse numerous ppl who send us bug reports. and ofcourse numerous ppl who send us bug reports.
(numerous? hmm.. todo: rephrase this :) ) (numerous? hmm.. todo: rephrase this :) )
Make that numberous m8ey :) Make that numberous m8ey :)
---- ----
Changes: Changes:
@ -280,14 +280,14 @@ int stillonline(char *);
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
int i; int i;
/* Parse Command Line */ /* Parse Command Line */
ProgName = argv[0]; ProgName = argv[0];
if (strlen(ProgName) >= 5) if (strlen(ProgName) >= 5)
ProgName += (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];
@ -406,7 +406,7 @@ void wmppp_routine(int argc, char **argv) {
if (STOP_ACTION) stop_action = strdup(STOP_ACTION); if (STOP_ACTION) stop_action = strdup(STOP_ACTION);
if (SPEED_ACTION) speed_action = strdup(SPEED_ACTION); if (SPEED_ACTION) speed_action = strdup(SPEED_ACTION);
if (IFDOWN_ACTION) ifdown_action = strdup(IFDOWN_ACTION); if (IFDOWN_ACTION) ifdown_action = strdup(IFDOWN_ACTION);
strcpy(temp, "/etc/wmppprc"); strcpy(temp, "/etc/wmppprc");
parse_rcfile(temp, wmppp_keys); parse_rcfile(temp, wmppp_keys);
@ -469,7 +469,7 @@ void wmppp_routine(int argc, char **argv) {
} }
/* On-line detectie! 1x per second */ /* On-line detectie! 1x per second */
if (currenttime != lasttime) { if (currenttime != lasttime) {
i = 0; i = 0;
@ -483,10 +483,10 @@ void wmppp_routine(int argc, char **argv) {
SetOnLED(LED_PPP_POWER); SetOnLED(LED_PPP_POWER);
waittime = 0; waittime = 0;
copyXPMArea(28, 95, 25, 11, 5, 48); copyXPMArea(28, 95, 25, 11, 5, 48);
if (speed_action) if (speed_action)
DrawSpeedInd(speed_action); DrawSpeedInd(speed_action);
speed_ind = currenttime + 60; speed_ind = currenttime + 60;
@ -506,7 +506,7 @@ void wmppp_routine(int argc, char **argv) {
RedrawWindow(); RedrawWindow();
} }
} }
if (waittime && waittime <= currenttime) { if (waittime && waittime <= currenttime) {
SetOffLED(LED_PPP_POWER); SetOffLED(LED_PPP_POWER);
RedrawWindow(); RedrawWindow();
@ -629,7 +629,7 @@ void wmppp_routine(int argc, char **argv) {
} }
} }
RedrawWindow(); RedrawWindow();
but_stat = -1; but_stat = -1;
break; break;
default: default:
@ -649,11 +649,11 @@ int get_statistics(char *devname, long *ip, long *op, long *is, long *os) {
struct ppp_stats ppp_cur; struct ppp_stats ppp_cur;
static int ppp_opened = 0; static int ppp_opened = 0;
if (!ppp_opened) { if (!ppp_opened) {
/* Open the ppp device. */ /* Open the ppp device. */
memset(&ppp_cur, 0, sizeof(ppp_cur)); memset(&ppp_cur, 0, sizeof(ppp_cur));
if ((ppp_h = socket(AF_INET, SOCK_DGRAM, 0)) < 0) if ((ppp_h = socket(AF_INET, SOCK_DGRAM, 0)) < 0)
return -1; return -1;
ppp_opened = 1; ppp_opened = 1;
} }
@ -709,7 +709,7 @@ void DrawTime(int i, int j) {
copyXPMArea(62, TIMER_SRC_Y, 1, 7, 6+6*2+1, TIMER_DES_Y); copyXPMArea(62, TIMER_SRC_Y, 1, 7, 6+6*2+1, TIMER_DES_Y);
else else
copyXPMArea(63, TIMER_SRC_Y, 1, 7, 6+6*2+1, TIMER_DES_Y); copyXPMArea(63, TIMER_SRC_Y, 1, 7, 6+6*2+1, TIMER_DES_Y);
copyXPMArea(TIMER_SZE_X*((i / k)%10)+1, TIMER_SRC_Y, 5, 7, 6+6*2 + 4, TIMER_DES_Y); copyXPMArea(TIMER_SZE_X*((i / k)%10)+1, TIMER_SRC_Y, 5, 7, 6+6*2 + 4, TIMER_DES_Y);
k = k /10; k = k /10;
copyXPMArea(TIMER_SZE_X*((i / k)%10)+1, TIMER_SRC_Y, 5, 7, 6+6*3 + 4, TIMER_DES_Y); copyXPMArea(TIMER_SZE_X*((i / k)%10)+1, TIMER_SRC_Y, 5, 7, 6+6*3 + 4, TIMER_DES_Y);
@ -740,7 +740,7 @@ void DrawStats(int *his, int num, int size, int x_left, int y_bottom) {
for (j=0; j<size; j++) { for (j=0; j<size; j++) {
if (j < p[0] / pixels_per_byte) if (j < p[0] / pixels_per_byte)
copyXPMArea(57+2, 85, 1, 1, k+x_left, y_bottom-j); copyXPMArea(57+2, 85, 1, 1, k+x_left, y_bottom-j);
else if (j < (p[0] + p[1]) / pixels_per_byte) else if (j < (p[0] + p[1]) / pixels_per_byte)
@ -782,7 +782,7 @@ void DrawSpeedInd(char *speed_action) {
char temp[128]; char temp[128];
fp = popen(speed_action, "r"); fp = popen(speed_action, "r");
if (fp) { if (fp) {
linespeed = 0; linespeed = 0;
@ -803,7 +803,7 @@ void DrawSpeedInd(char *speed_action) {
k -= 5; k -= 5;
copyXPMArea(50, 86, 5, 9, k, 48); copyXPMArea(50, 86, 5, 9, k, 48);
do { do {
PrintLittle(linespeed % 10, &k); PrintLittle(linespeed % 10, &k);
linespeed /= 10; linespeed /= 10;
@ -871,7 +871,7 @@ void get_ppp_stats(struct ppp_stats *cur) {
strcpy(req.ifr__name, active_interface); strcpy(req.ifr__name, active_interface);
if (ioctl(ppp_h, SIOCGPPPSTATS, &req) >= 0) if (ioctl(ppp_h, SIOCGPPPSTATS, &req) >= 0)
*cur = req.stats; *cur = req.stats;
} }