From a60b95bc1392a01480510072e7c6662840fb8de1 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Sun, 14 Sep 2014 12:57:14 -0500 Subject: [PATCH] wmppp.app: Remove trailing whitespace. --- wmppp.app/BUGS | 14 ++++----- wmppp.app/CHANGES | 46 +++++++++++++++--------------- wmppp.app/HINTS | 18 ++++++------ wmppp.app/INSTALL | 18 ++++++------ wmppp.app/README | 18 ++++++------ wmppp.app/TODO | 2 +- wmppp.app/wmgeneral/list.c | 12 ++++---- wmppp.app/wmgeneral/list.h | 2 +- wmppp.app/wmgeneral/misc.c | 24 ++++++++-------- wmppp.app/wmgeneral/wmgeneral.c | 22 +++++++------- wmppp.app/wmppp/Makefile | 2 +- wmppp.app/wmppp/example-scripts/wmppp-chat | 6 ++-- wmppp.app/wmppp/example-scripts/wmppp-stop | 2 +- wmppp.app/wmppp/getmodemspeed.c | 2 +- wmppp.app/wmppp/wmppp.c | 42 +++++++++++++-------------- 15 files changed, 115 insertions(+), 115 deletions(-) diff --git a/wmppp.app/BUGS b/wmppp.app/BUGS index a1a4476..0463110 100644 --- a/wmppp.app/BUGS +++ b/wmppp.app/BUGS @@ -5,7 +5,7 @@ WMPPP 1.3.0 -------------------------------------------------------------- * Brand new release, WMPPP almost is completely rewritten since the last release, no 'known' bugs yet; - + WMPPP/WMiFS 1.2p1 -------------------------------------------------------------- @@ -20,26 +20,26 @@ WMPPP/WMiFS 1.2p1 one, but we're looking into this. * WMPPP: ppp0 is still hardcoded (sigh), will be fixed. * 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 some systems somehow (reported myself) :) * Special thanks to Marcelo 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 -------------------------------------------------------------- - + * The pixmap 'shift' in AfterStep's Wharf seems not to be our fault, but a bug in Wharf! - + Please notify the authors of AfterStep about this if you like to see this fixed, Wharf can't handle pixmaps that are larger than 60x60 pixels very well :( - + * Most code is yet again quite rewritten, but we think all previous annoyances are gone now ;-) diff --git a/wmppp.app/CHANGES b/wmppp.app/CHANGES index 0b7bf8e..521db0c 100644 --- a/wmppp.app/CHANGES +++ b/wmppp.app/CHANGES @@ -14,7 +14,7 @@ Version Description * Multiple ppp devices support (EXPERIMENTAL!); * getmodemspeed.c now reads /etc/ppp/connect-errors, and scans for both CARRIER and CONNECT; - + 1.2p1 * Released 980502 @@ -28,72 +28,72 @@ Version Description * Updated the WMPPP rc files, again, due to some last minute changes in the code, WMPPP's rc files where - no longer working properly. + no longer working properly. 1.2 * Released 980429 - + * Completely revamped the WMPPP & WMiFS GUI :) - + * Added 'forceleft, forcemiddle and forceright' options in WMiFS for 'real' multiuser systems, when 'force*' is detected in /etc/wmifsrc the user settings in ~/.wmifsrc are overridden (usefull for sites where users may not fiddle with pppd's options :) - + * WMPPP: Ditto, added 'force' facility here too - + * WMPPP: now correctly redisplays time when killed and restarted - + * WMPPP: timer now starts to run when the actual connection is made - + * WMPPP: added BAUD CONNECT value display - + * WMPPP: added 'getmodemspeed', a SUID proggie to read the CONNECT value from /var/log/messages - + * WMPPP: dropped the config GUI and added an .wmppprc file instead > motivation to do so: this way, WMPPP is much more platform and distribution independant :) - + * WMPPP: enhanced the status LED, yellow means dialing, green means online, red means error - + * WMPPP: added -display commandline option - + * WMPPP: added -t commandline option, default the timer will display HH:MM, -t will display MM:SS and switch to HH:MM after 60 minutes - + * WMiFS: added support for all interfaces in /proc/net/, now all interfaces are supported :) - + * WMiFS: added -display commandline option - + * WMiFS: added -w commandline option, this will draw the graph in our new 'waveform' look :) - + * WMiFS: fixed the coredump problems that occured 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 thing that can happen now is that the scripts do not execute (i.e. luser error) ;-) - + * WMiFS: when monitoring a ppp interface, bytes are used to draw the graph, otherwise packets - + * WMiFS: made the RX/TX/Status LED box identical to the one in WMPPP, the right LED is the status LED, green means interface is working, red means error (interface down, NIC broken, etc.) - -1.1 - Released 980407 + +1.1 - Released 980407 - Added WMiFS, the no button more stats version - All ppp/eth load graphs are now autoscaling - Autosensing of all active ppp/eth interfaces @@ -115,7 +115,7 @@ Version Description Bugfixes 1.0pre6 - Not released, developers release - Redesigned WMPPP's dock.app GUI + Redesigned WMPPP's dock.app GUI Added failsave Yes/No disconnect requester Some code cleaning diff --git a/wmppp.app/HINTS b/wmppp.app/HINTS index 69bbb13..4e925f5 100644 --- a/wmppp.app/HINTS +++ b/wmppp.app/HINTS @@ -14,7 +14,7 @@ the WindowMaker Dock (preferred) or the Clip. Now press the rightmouse button on WMPPP's outer edges and 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. @@ -32,7 +32,7 @@ pixel shaped icon on your desktop. 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 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. -Creating PPP dialup scripts +Creating PPP dialup scripts -------------------------------------------------------------- Since we've dropped the graphic configuration GUI, 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 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 -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. REPORT CARRIER REPORT CONNECT - + This will make chat log all connects and carriers to /etc/ppp/connect-errors, which getmodemspeed needs, 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 distribution which provide a simular non-standard ppp setup feature for setting up ppp scripts. - + See the documentation that ships with your Linux distribution 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 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 you use is /dev/cua0 or /dev/ttyS0 (depending on your Linux 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 - PPP scripts, read INSTALL > Info For Site Admins! + PPP scripts, read INSTALL > Info For Site Admins! diff --git a/wmppp.app/INSTALL b/wmppp.app/INSTALL index 04b894b..504660b 100644 --- a/wmppp.app/INSTALL +++ b/wmppp.app/INSTALL @@ -1,9 +1,9 @@ -Installation instructions for WMPPP. +Installation instructions for WMPPP. 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 to install this software for you ;-) @@ -29,28 +29,28 @@ Installation set up the paths to your ppp start, stop & restart scripts -7) % wmppp & (try 'wmppp -h &' for help) +7) % wmppp & (try 'wmppp -h &' for help) Extra Install Info For Site Administrators! -------------------------------------------------------------- For site administrators who don't want their users messing 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! -The installation will install standard rc files in $HOME +The installation will install standard rc files in $HOME and /etc/ WITHOUT the 'force' option! 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 a command, for example 'forceleft' instead of 'left'. 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 ;-) 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/. 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. diff --git a/wmppp.app/README b/wmppp.app/README index f95dcad..bf0434e 100644 --- a/wmppp.app/README +++ b/wmppp.app/README @@ -2,17 +2,17 @@ WMPPP-1.3.0 - Public release -------------------------------------------------------------- Authors...: Martijn Pieterse (pieterse@xs4all.nl) Antoine Nulle (warp@xs4all.nl) - + Note......: WMPPP has it's own mailbox, as our pop3 accounts are already way too crowded :) - + Please mail bugreports, comments, suggestions, requests and flames to: dockapps@warped.xs4all.nl - + The official WMPPP support website address: - + http://windowmaker.mezaway.org/ @@ -23,7 +23,7 @@ you some nice additional features too... * Integrated online timer; * Integrated modem RX/TX LED's; - * Integrated WMPPP status LED; + * Integrated WMPPP status LED; * Integrated autoscaling PPP transfer statistics; * Integrated CARRIER/CONNECT display; * Integrated bytes/second Speed-O-Meter; @@ -35,7 +35,7 @@ you some nice additional features too... * Several commandline options (try '-h' for help); 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... @@ -48,11 +48,11 @@ BUGS Things you don't want to know ;-) CHANGES Description of changes. TODO Things we've already planned for WMPPP. COPYING GNU General Public License Version 2. - + 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 problem as detailed! as you can. @@ -60,7 +60,7 @@ problem as detailed! as you can. Copyright -------------------------------------------------------------- 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. diff --git a/wmppp.app/TODO b/wmppp.app/TODO index 7451faa..5a15c4f 100644 --- a/wmppp.app/TODO +++ b/wmppp.app/TODO @@ -4,7 +4,7 @@ TODO list for WMPPP. * Optional LCD style GUI; * Support for multiple ISP scripts; * External configuration/information GUI?; - + Your feedback! If you have nice suggestions, ideas, whatever, that aren't on this list, feel free to mail them to: diff --git a/wmppp.app/wmgeneral/list.c b/wmppp.app/wmgeneral/list.c index be7464f..a63562f 100644 --- a/wmppp.app/wmgeneral/list.c +++ b/wmppp.app/wmgeneral/list.c @@ -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. Author: Kresten Krab Thorup Many modifications by Alfredo K. Kojima - + This file is part of GNU CC. @@ -38,7 +38,7 @@ Boston, MA 02110-1301 USA. */ /* Return a cons cell produced from (head . tail) */ -INLINE LinkedList* +INLINE LinkedList* list_cons(void* head, LinkedList* tail) { LinkedList* cell; @@ -63,7 +63,7 @@ list_length(LinkedList* list) 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 */ INLINE void* @@ -84,7 +84,7 @@ list_nth(int index, LinkedList* list) INLINE void list_remove_head(LinkedList** list) { - if (!*list) return; + if (!*list) return; if ((*list)->tail) { LinkedList* tail = (*list)->tail; /* fetch next */ @@ -116,7 +116,7 @@ INLINE LinkedList * list_remove_elem(LinkedList* list, void* elem) { LinkedList *tmp; - + if (list) { if (list->head == elem) { tmp = list->tail; diff --git a/wmppp.app/wmgeneral/list.h b/wmppp.app/wmgeneral/list.h index 4b6b86f..92c3454 100644 --- a/wmppp.app/wmgeneral/list.h +++ b/wmppp.app/wmgeneral/list.h @@ -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. Author: Kresten Krab Thorup diff --git a/wmppp.app/wmgeneral/misc.c b/wmppp.app/wmgeneral/misc.c index f86481e..1f3bb2e 100644 --- a/wmppp.app/wmgeneral/misc.c +++ b/wmppp.app/wmgeneral/misc.c @@ -1,9 +1,9 @@ /* dock.c- built-in Dock module for WindowMaker - * + * * WindowMaker window manager - * + * * Copyright (c) 1997 Alfredo K. Kojima - * + * * 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 * the Free Software Foundation; either version 2 of the License, or @@ -28,7 +28,7 @@ *---------------------------------------------------------------------- * parse_command-- * Divides a command line into a argv/argc pair. - *---------------------------------------------------------------------- + *---------------------------------------------------------------------- */ #define PRC_ALPHA 0 #define PRC_BLANK 1 @@ -64,11 +64,11 @@ next_token(char *word, char **next) t = ret = malloc(strlen(word)+1); ptr = word; - + state = 0; *t = 0; while (1) { - if (*ptr==0) + if (*ptr==0) ctype = PRC_EOS; else if (*ptr=='\\') ctype = PRC_ESCAPE; @@ -98,12 +98,12 @@ next_token(char *word, char **next) t = strdup(ret); free(ret); - + if (ctype==PRC_EOS) *next = NULL; else *next = ptr; - + return t; } @@ -118,7 +118,7 @@ parse_command(char *command, char ***argv, int *argc) line = command; do { token = next_token(line, &line); - if (token) { + if (token) { list = list_cons(token, list); } } while (token!=NULL && line!=NULL); @@ -141,15 +141,15 @@ execCommand(char *command) int argc; parse_command(command, &argv, &argc); - + if (argv==NULL) { return 0; } - + if ((pid=fork())==0) { char **args; int i; - + args = malloc(sizeof(char*)*(argc+1)); if (!args) exit(10); diff --git a/wmppp.app/wmgeneral/wmgeneral.c b/wmppp.app/wmgeneral/wmgeneral.c index c9c7446..44de5b9 100644 --- a/wmppp.app/wmgeneral/wmgeneral.c +++ b/wmppp.app/wmgeneral/wmgeneral.c @@ -14,7 +14,7 @@ --- 11/09/1998 (Martijn Pieterse, pieterse@xs4all.nl) * 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. * Changed the needed geometry string. 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), &(wmgen->mask), &(wmgen->attributes)); - + if (err != XpmSuccess) { fprintf(stderr, "Not enough free colorcells.\n"); exit(1); @@ -221,9 +221,9 @@ static int flush_expose(Window w) { \*******************************************************************************/ void RedrawWindow(void) { - + 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); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, @@ -235,9 +235,9 @@ void RedrawWindow(void) { \*******************************************************************************/ void RedrawWindowXY(int x, int y) { - + 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); flush_expose(win); XCopyArea(display, wmgen.pixmap, win, NormalGC, @@ -292,7 +292,7 @@ void createXBMfromXPM(char *xbm, char **xpm, int sx, int sy) { char zero; unsigned char bwrite; int bcount; - + 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))) { - fprintf(stderr, "%s: can't open display %s\n", + fprintf(stderr, "%s: can't open display %s\n", wname, XDisplayName(display_name)); exit(1); } @@ -402,10 +402,10 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit mysizehints.width = 64; mysizehints.height = 64; - + win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); - + iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y, 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); /* Create GC for drawing */ - + gcm = GCForeground | GCBackground | GCGraphicsExposures; gcv.foreground = fore_pix; gcv.background = back_pix; diff --git a/wmppp.app/wmppp/Makefile b/wmppp.app/wmppp/Makefile index 7f3a0aa..a424097 100644 --- a/wmppp.app/wmppp/Makefile +++ b/wmppp.app/wmppp/Makefile @@ -21,7 +21,7 @@ clean:: rm wmppp getmodemspeed install:: - + cp -f wmppp /usr/local/bin/ chmod 755 /usr/local/bin/wmppp chown root:root /usr/local/bin/wmppp diff --git a/wmppp.app/wmppp/example-scripts/wmppp-chat b/wmppp.app/wmppp/example-scripts/wmppp-chat index 2037871..1f2b25a 100644 --- a/wmppp.app/wmppp/example-scripts/wmppp-chat +++ b/wmppp.app/wmppp/example-scripts/wmppp-chat @@ -3,7 +3,7 @@ ABORT 'NO CARRIER' ABORT 'RING - NO ANSWER' REPORT CARRIER REPORT CONNECT -'' ATZ +'' ATZ OK ATDT -ogin: -word: +ogin: +word: diff --git a/wmppp.app/wmppp/example-scripts/wmppp-stop b/wmppp.app/wmppp/example-scripts/wmppp-stop index 902327c..145f293 100755 --- a/wmppp.app/wmppp/example-scripts/wmppp-stop +++ b/wmppp.app/wmppp/example-scripts/wmppp-stop @@ -15,4 +15,4 @@ if [ -r /var/run/$DEVICE.pid ]; then fi echo >/dev/console "ERROR: PPP link not active on $DEVICE" -exit 1 +exit 1 diff --git a/wmppp.app/wmppp/getmodemspeed.c b/wmppp.app/wmppp/getmodemspeed.c index 6530e6e..80e2ab1 100644 --- a/wmppp.app/wmppp/getmodemspeed.c +++ b/wmppp.app/wmppp/getmodemspeed.c @@ -4,7 +4,7 @@ int main(void) { FILE *fd; char temp[256]; - + fd = popen("tac /etc/ppp/connect-errors | grep '['CONNECT'|'CARRIER']' | head -1", "r"); while (fgets(temp, 256, fd)) { diff --git a/wmppp.app/wmppp/wmppp.c b/wmppp.app/wmppp/wmppp.c index 1f22fc2..bef2f6a 100644 --- a/wmppp.app/wmppp/wmppp.c +++ b/wmppp.app/wmppp/wmppp.c @@ -13,7 +13,7 @@ How do I create a not so solid window? How do I open a window? How do I use pixmaps? - + pppstats A program that prints the amount of data that is transferred over a ppp-line. @@ -32,25 +32,25 @@ Known Features: (or in non M$ talk, BUGS) * none known so far in this release - + ---- Thanks ---- - + CCC (Constructive Code Criticism): Marcelo E. Magallon Thanks a LOT! It takes a while to get me convinced... :) - + Minor bugs and ideas: Marc De Scheemaecker / David Mihm / Chris Soghoian / 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 :) ) - Make that numberous m8ey :) + Make that numberous m8ey :) ---- Changes: @@ -280,14 +280,14 @@ int stillonline(char *); int main(int argc, char *argv[]) { int i; - + /* Parse Command Line */ ProgName = argv[0]; if (strlen(ProgName) >= 5) ProgName += (strlen(ProgName) - 5); - + for (i=1; i= 0) + if (ioctl(ppp_h, SIOCGPPPSTATS, &req) >= 0) *cur = req.stats; } -- 2.11.4.GIT