wmifs: Use consistent formatting style.
Format to minimize warnings and errors from checkpatch.pl in the Window Maker source tree.
This commit is contained in:
		
							parent
							
								
									6083e3f774
								
							
						
					
					
						commit
						c37f6eda98
					
				
					 5 changed files with 323 additions and 304 deletions
				
			
		| 
						 | 
					@ -38,8 +38,7 @@ Boston, MA 02111-1307, 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;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -51,12 +50,10 @@ list_cons(void* head, LinkedList* tail)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Return the length of a list, list_length(NULL) returns zero */
 | 
					/* Return the length of a list, list_length(NULL) returns zero */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INLINE int
 | 
					INLINE int list_length(LinkedList *list)
 | 
				
			||||||
list_length(LinkedList* list)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int i = 0;
 | 
						int i = 0;
 | 
				
			||||||
  while(list)
 | 
						while (list) {
 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
		i += 1;
 | 
							i += 1;
 | 
				
			||||||
		list = list->tail;
 | 
							list = list->tail;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -66,11 +63,9 @@ list_length(LinkedList* list)
 | 
				
			||||||
/* 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 *list_nth(int index, LinkedList *list)
 | 
				
			||||||
list_nth(int index, LinkedList* list)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  while(index-- != 0)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						while (index-- != 0) {
 | 
				
			||||||
		if (list->tail)
 | 
							if (list->tail)
 | 
				
			||||||
			list = list->tail;
 | 
								list = list->tail;
 | 
				
			||||||
		else
 | 
							else
 | 
				
			||||||
| 
						 | 
					@ -81,18 +76,15 @@ list_nth(int index, LinkedList* list)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Remove the element at the head by replacing it by its successor */
 | 
					/* Remove the element at the head by replacing it by its successor */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INLINE void
 | 
					INLINE void list_remove_head(LinkedList **list)
 | 
				
			||||||
list_remove_head(LinkedList** list)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  if (!*list) return;
 | 
					 | 
				
			||||||
  if ((*list)->tail)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						if (!*list)
 | 
				
			||||||
 | 
							return;
 | 
				
			||||||
 | 
						if ((*list)->tail) {
 | 
				
			||||||
		LinkedList *tail = (*list)->tail; /* fetch next */
 | 
							LinkedList *tail = (*list)->tail; /* fetch next */
 | 
				
			||||||
		*(*list) = *tail;		/* copy next to list head */
 | 
							*(*list) = *tail;		/* copy next to list head */
 | 
				
			||||||
		free(tail);			/* free next */
 | 
							free(tail);			/* free next */
 | 
				
			||||||
    }
 | 
						} else {				/* only one element in list */
 | 
				
			||||||
  else				/* only one element in list */
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
		free(*list);
 | 
							free(*list);
 | 
				
			||||||
		(*list) = 0;
 | 
							(*list) = 0;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -112,8 +104,7 @@ list_remove_elem(LinkedList** list, void* elem)
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  }*/
 | 
					  }*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INLINE LinkedList *
 | 
					INLINE LinkedList *list_remove_elem(LinkedList *list, void *elem)
 | 
				
			||||||
list_remove_elem(LinkedList* list, void* elem)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	LinkedList *tmp;
 | 
						LinkedList *tmp;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -132,11 +123,9 @@ list_remove_elem(LinkedList* list, void* elem)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Return element that has ELEM as car */
 | 
					/* Return element that has ELEM as car */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INLINE LinkedList*
 | 
					INLINE LinkedList *list_find(LinkedList *list, void *elem)
 | 
				
			||||||
list_find(LinkedList* list, void* elem)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  while(list)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						while (list) {
 | 
				
			||||||
		if (list->head == elem)
 | 
							if (list->head == elem)
 | 
				
			||||||
			return list;
 | 
								return list;
 | 
				
			||||||
		list = list->tail;
 | 
							list = list->tail;
 | 
				
			||||||
| 
						 | 
					@ -146,11 +135,9 @@ list_find(LinkedList* list, void* elem)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Free list (backwards recursive) */
 | 
					/* Free list (backwards recursive) */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INLINE void
 | 
					INLINE void list_free(LinkedList *list)
 | 
				
			||||||
list_free(LinkedList* list)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  if(list)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						if (list) {
 | 
				
			||||||
		list_free(list->tail);
 | 
							list_free(list->tail);
 | 
				
			||||||
		free(list);
 | 
							free(list);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					@ -158,11 +145,9 @@ list_free(LinkedList* list)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Map FUNCTION over all elements in LIST */
 | 
					/* Map FUNCTION over all elements in LIST */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INLINE void
 | 
					INLINE void list_mapcar(LinkedList *list, void(*function)(void *))
 | 
				
			||||||
list_mapcar(LinkedList* list, void(*function)(void*))
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  while(list)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						while (list) {
 | 
				
			||||||
		(*function)(list->head);
 | 
							(*function)(list->head);
 | 
				
			||||||
		list = list->tail;
 | 
							list = list->tail;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -52,7 +52,7 @@ static DFA mtable[9][6] = {
 | 
				
			||||||
	{{-1, -1}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} }, /* final state */
 | 
						{{-1, -1}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} }, /* final state */
 | 
				
			||||||
	{{6, 1}, {6, 1}, {7, 0}, {6, 1}, {5, 0}, {3, 0} },
 | 
						{{6, 1}, {6, 1}, {7, 0}, {6, 1}, {5, 0}, {3, 0} },
 | 
				
			||||||
	{{6, 1}, {6, 1}, {6, 1}, {6, 1}, {5, 0}, {6, 1} },
 | 
						{{6, 1}, {6, 1}, {6, 1}, {6, 1}, {5, 0}, {6, 1} },
 | 
				
			||||||
    {{-1,-1},{0,0},{0,0},{0,0},{0,0},{0,0}}, /* final state */
 | 
						{{-1, -1}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0} }  /* final state */
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
char*
 | 
					char*
 | 
				
			||||||
| 
						 | 
					@ -87,10 +87,9 @@ next_token(char *word, char **next)
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		state = mtable[state][ctype].nstate;
 | 
							state = mtable[state][ctype].nstate;
 | 
				
			||||||
		ptr++;
 | 
							ptr++;
 | 
				
			||||||
	if (mtable[state][0].output<0) {
 | 
							if (mtable[state][0].output < 0)
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (*ret == 0)
 | 
						if (*ret == 0)
 | 
				
			||||||
		t = NULL;
 | 
							t = NULL;
 | 
				
			||||||
| 
						 | 
					@ -118,9 +117,8 @@ 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);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	count = list_length(list);
 | 
						count = list_length(list);
 | 
				
			||||||
| 
						 | 
					@ -142,20 +140,19 @@ execCommand(char *command)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	parse_command(command, &argv, &argc);
 | 
						parse_command(command, &argv, &argc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (argv==NULL) {
 | 
						if (argv == NULL)
 | 
				
			||||||
		return 0;
 | 
							return 0;
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if ((pid=fork())==0) {
 | 
						pid = fork();
 | 
				
			||||||
 | 
						if (pid == 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);
 | 
				
			||||||
        for (i=0; i<argc; i++) {
 | 
							for (i = 0; i < argc; i++)
 | 
				
			||||||
			args[i] = argv[i];
 | 
								args[i] = argv[i];
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
		args[argc] = NULL;
 | 
							args[argc] = NULL;
 | 
				
			||||||
		execvp(argv[0], args);
 | 
							execvp(argv[0], args);
 | 
				
			||||||
		exit(10);
 | 
							exit(10);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -80,7 +80,8 @@ int CheckMouseRegion(int, int);
 | 
				
			||||||
|* read_rc_file																   *|
 | 
					|* read_rc_file																   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void parse_rcfile(const char *filename, rckeys *keys) {
 | 
					void parse_rcfile(const char *filename, rckeys *keys)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	char	*p;
 | 
						char	*p;
 | 
				
			||||||
	char	temp[128];
 | 
						char	temp[128];
 | 
				
			||||||
| 
						 | 
					@ -93,14 +94,18 @@ void parse_rcfile(const char *filename, rckeys *keys) {
 | 
				
			||||||
		while (fgets(temp, 128, fp)) {
 | 
							while (fgets(temp, 128, fp)) {
 | 
				
			||||||
			key = 0;
 | 
								key = 0;
 | 
				
			||||||
			while (key >= 0 && keys[key].label) {
 | 
								while (key >= 0 && keys[key].label) {
 | 
				
			||||||
				if ((p = strstr(temp, keys[key].label))) {
 | 
									p = strstr(temp, keys[key].label);
 | 
				
			||||||
 | 
									if (p) {
 | 
				
			||||||
					p += strlen(keys[key].label);
 | 
										p += strlen(keys[key].label);
 | 
				
			||||||
					p += strspn(p, tokens);
 | 
										p += strspn(p, tokens);
 | 
				
			||||||
					if ((i = strcspn(p, "#\n"))) p[i] = 0;
 | 
										i = strcspn(p, "#\n");
 | 
				
			||||||
 | 
										if (i)
 | 
				
			||||||
 | 
											p[i] = 0;
 | 
				
			||||||
					free(*keys[key].var);
 | 
										free(*keys[key].var);
 | 
				
			||||||
					*keys[key].var = strdup(p);
 | 
										*keys[key].var = strdup(p);
 | 
				
			||||||
					key = -1;
 | 
										key = -1;
 | 
				
			||||||
				} else key++;
 | 
									} else
 | 
				
			||||||
 | 
										key++;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		fclose(fp);
 | 
							fclose(fp);
 | 
				
			||||||
| 
						 | 
					@ -112,7 +117,8 @@ void parse_rcfile(const char *filename, rckeys *keys) {
 | 
				
			||||||
|* GetXPM																	   *|
 | 
					|* GetXPM																	   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[]) {
 | 
					static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[])
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	XWindowAttributes	attributes;
 | 
						XWindowAttributes	attributes;
 | 
				
			||||||
	int					err;
 | 
						int					err;
 | 
				
			||||||
| 
						 | 
					@ -135,7 +141,8 @@ static void GetXPM(XpmIcon *wmgen, char *pixmap_bytes[]) {
 | 
				
			||||||
|* GetColor																	   *|
 | 
					|* GetColor																	   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static Pixel GetColor(char *name) {
 | 
					static Pixel GetColor(char *name)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	XColor				color;
 | 
						XColor				color;
 | 
				
			||||||
	XWindowAttributes	attributes;
 | 
						XWindowAttributes	attributes;
 | 
				
			||||||
| 
						 | 
					@ -143,11 +150,10 @@ static Pixel GetColor(char *name) {
 | 
				
			||||||
	XGetWindowAttributes(display, Root, &attributes);
 | 
						XGetWindowAttributes(display, Root, &attributes);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	color.pixel = 0;
 | 
						color.pixel = 0;
 | 
				
			||||||
	if (!XParseColor(display, attributes.colormap, name, &color)) {
 | 
						if (!XParseColor(display, attributes.colormap, name, &color))
 | 
				
			||||||
		fprintf(stderr, "wm.app: can't parse %s.\n", name);
 | 
							fprintf(stderr, "wm.app: can't parse %s.\n", name);
 | 
				
			||||||
	} else if (!XAllocColor(display, attributes.colormap, &color)) {
 | 
						else if (!XAllocColor(display, attributes.colormap, &color))
 | 
				
			||||||
		fprintf(stderr, "wm.app: can't allocate %s.\n", name);
 | 
							fprintf(stderr, "wm.app: can't allocate %s.\n", name);
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return color.pixel;
 | 
						return color.pixel;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -155,7 +161,8 @@ static Pixel GetColor(char *name) {
 | 
				
			||||||
|* flush_expose																   *|
 | 
					|* flush_expose																   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static int flush_expose(Window w) {
 | 
					static int flush_expose(Window w)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	XEvent dummy;
 | 
						XEvent dummy;
 | 
				
			||||||
	int i = 0;
 | 
						int i = 0;
 | 
				
			||||||
| 
						 | 
					@ -170,7 +177,8 @@ static int flush_expose(Window w) {
 | 
				
			||||||
|* RedrawWindow																   *|
 | 
					|* RedrawWindow																   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void RedrawWindow(void) {
 | 
					void RedrawWindow(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	flush_expose(iconwin);
 | 
						flush_expose(iconwin);
 | 
				
			||||||
	XCopyArea(display, wmgen.pixmap, iconwin, NormalGC,
 | 
						XCopyArea(display, wmgen.pixmap, iconwin, NormalGC,
 | 
				
			||||||
| 
						 | 
					@ -184,7 +192,8 @@ void RedrawWindow(void) {
 | 
				
			||||||
|* RedrawWindowXY															   *|
 | 
					|* RedrawWindowXY															   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
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,
 | 
				
			||||||
| 
						 | 
					@ -198,7 +207,8 @@ void RedrawWindowXY(int x, int y) {
 | 
				
			||||||
|* AddMouseRegion															   *|
 | 
					|* AddMouseRegion															   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void AddMouseRegion(int index, int left, int top, int right, int bottom) {
 | 
					void AddMouseRegion(int index, int left, int top, int right, int bottom)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (index < MAX_MOUSE_REGION) {
 | 
						if (index < MAX_MOUSE_REGION) {
 | 
				
			||||||
		mouse_region[index].enable = 1;
 | 
							mouse_region[index].enable = 1;
 | 
				
			||||||
| 
						 | 
					@ -213,7 +223,8 @@ void AddMouseRegion(int index, int left, int top, int right, int bottom) {
 | 
				
			||||||
|* CheckMouseRegion															   *|
 | 
					|* CheckMouseRegion															   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int CheckMouseRegion(int x, int y) {
 | 
					int CheckMouseRegion(int x, int y)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	int		i;
 | 
						int		i;
 | 
				
			||||||
	int		found;
 | 
						int		found;
 | 
				
			||||||
| 
						 | 
					@ -228,7 +239,8 @@ int CheckMouseRegion(int x, int y) {
 | 
				
			||||||
			y >= mouse_region[i].top)
 | 
								y >= mouse_region[i].top)
 | 
				
			||||||
			found = 1;
 | 
								found = 1;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (!found) return -1;
 | 
						if (!found)
 | 
				
			||||||
 | 
							return -1;
 | 
				
			||||||
	return (i-1);
 | 
						return (i-1);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -236,7 +248,8 @@ int CheckMouseRegion(int x, int y) {
 | 
				
			||||||
|* copyXPMArea																   *|
 | 
					|* copyXPMArea																   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void copyXPMArea(int x, int y, int sx, int sy, int dx, int dy) {
 | 
					void copyXPMArea(int x, int y, int sx, int sy, int dx, int dy)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	XCopyArea(display, wmgen.pixmap, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy);
 | 
						XCopyArea(display, wmgen.pixmap, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -246,7 +259,8 @@ void copyXPMArea(int x, int y, int sx, int sy, int dx, int dy) {
 | 
				
			||||||
|* copyXBMArea																   *|
 | 
					|* copyXBMArea																   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void copyXBMArea(int x, int y, int sx, int sy, int dx, int dy) {
 | 
					void copyXBMArea(int x, int y, int sx, int sy, int dx, int dy)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	XCopyArea(display, wmgen.mask, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy);
 | 
						XCopyArea(display, wmgen.mask, wmgen.pixmap, NormalGC, x, y, sx, sy, dx, dy);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -256,7 +270,8 @@ void copyXBMArea(int x, int y, int sx, int sy, int dx, int dy) {
 | 
				
			||||||
|* setMaskXY																   *|
 | 
					|* setMaskXY																   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void setMaskXY(int x, int y) {
 | 
					void setMaskXY(int x, int y)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	 XShapeCombineMask(display, win, ShapeBounding, x, y, pixmask, ShapeSet);
 | 
						 XShapeCombineMask(display, win, ShapeBounding, x, y, pixmask, ShapeSet);
 | 
				
			||||||
	 XShapeCombineMask(display, iconwin, ShapeBounding, x, y, pixmask, ShapeSet);
 | 
						 XShapeCombineMask(display, iconwin, ShapeBounding, x, y, pixmask, ShapeSet);
 | 
				
			||||||
| 
						 | 
					@ -265,7 +280,9 @@ void setMaskXY(int x, int y) {
 | 
				
			||||||
/*******************************************************************************\
 | 
					/*******************************************************************************\
 | 
				
			||||||
|* openXwindow																   *|
 | 
					|* openXwindow																   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bits, int pixmask_width, int pixmask_height) {
 | 
					void openXwindow(int argc, char *argv[], char *pixmap_bytes[],
 | 
				
			||||||
 | 
							 char *pixmask_bits, int pixmask_width, int pixmask_height)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	unsigned int	borderwidth = 1;
 | 
						unsigned int	borderwidth = 1;
 | 
				
			||||||
	XClassHint		classHint;
 | 
						XClassHint		classHint;
 | 
				
			||||||
| 
						 | 
					@ -285,7 +302,8 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
 | 
				
			||||||
			display_name = argv[i+1];
 | 
								display_name = argv[i+1];
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!(display = XOpenDisplay(display_name))) {
 | 
						display = XOpenDisplay(display_name);
 | 
				
			||||||
 | 
						if (!display) {
 | 
				
			||||||
		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);
 | 
				
			||||||
| 
						 | 
					@ -324,8 +342,10 @@ void openXwindow(int argc, char *argv[], char *pixmap_bytes[], char *pixmask_bit
 | 
				
			||||||
	classHint.res_class = wname;
 | 
						classHint.res_class = wname;
 | 
				
			||||||
	XSetClassHint(display, win, &classHint);
 | 
						XSetClassHint(display, win, &classHint);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	XSelectInput(display, win, ButtonPressMask | ExposureMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask);
 | 
						XSelectInput(display, win,
 | 
				
			||||||
	XSelectInput(display, iconwin, ButtonPressMask | ExposureMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask);
 | 
							     ButtonPressMask | ExposureMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask);
 | 
				
			||||||
 | 
						XSelectInput(display, iconwin,
 | 
				
			||||||
 | 
							     ButtonPressMask | ExposureMask | ButtonReleaseMask | PointerMotionMask | StructureNotifyMask);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (XStringListToTextProperty(&wname, 1, &name) == 0) {
 | 
						if (XStringListToTextProperty(&wname, 1, &name) == 0) {
 | 
				
			||||||
		fprintf(stderr, "%s: can't allocate window name\n", wname);
 | 
							fprintf(stderr, "%s: can't allocate window name\n", wname);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -290,7 +290,8 @@ void get_ppp_stats(struct ppp_stats *cur);
 | 
				
			||||||
 /* Main */
 | 
					 /* Main */
 | 
				
			||||||
/********/
 | 
					/********/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main(int argc, char *argv[]) {
 | 
					int main(int argc, char *argv[])
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	int		i;
 | 
						int		i;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -368,7 +369,8 @@ int get_statistics(char *, long *, long *, long *, long *);
 | 
				
			||||||
int stillonline(char *);
 | 
					int stillonline(char *);
 | 
				
			||||||
void DrawActiveIFS(char *);
 | 
					void DrawActiveIFS(char *);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void wmifs_routine(int argc, char **argv) {
 | 
					void wmifs_routine(int argc, char **argv)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	rckeys	wmifs_keys[] = {
 | 
						rckeys	wmifs_keys[] = {
 | 
				
			||||||
		{ "left", &left_action },
 | 
							{ "left", &left_action },
 | 
				
			||||||
| 
						 | 
					@ -416,9 +418,12 @@ void wmifs_routine(int argc, char **argv) {
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (LEFT_ACTION) left_action = strdup(LEFT_ACTION);
 | 
						if (LEFT_ACTION)
 | 
				
			||||||
	if (MIDDLE_ACTION) middle_action = strdup(MIDDLE_ACTION);
 | 
							left_action = strdup(LEFT_ACTION);
 | 
				
			||||||
	if (RIGHT_ACTION) right_action = strdup(RIGHT_ACTION);
 | 
						if (MIDDLE_ACTION)
 | 
				
			||||||
 | 
							middle_action = strdup(MIDDLE_ACTION);
 | 
				
			||||||
 | 
						if (RIGHT_ACTION)
 | 
				
			||||||
 | 
							right_action = strdup(RIGHT_ACTION);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Scan throught the .rc files */
 | 
						/* Scan throught the .rc files */
 | 
				
			||||||
	parse_rcfile("/etc/wmifsrc", wmifs_keys);
 | 
						parse_rcfile("/etc/wmifsrc", wmifs_keys);
 | 
				
			||||||
| 
						 | 
					@ -459,11 +464,10 @@ void wmifs_routine(int argc, char **argv) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if (i == stat_current) {
 | 
								if (i == stat_current) {
 | 
				
			||||||
				if (!stillonline(stat_devices[i].name)) {
 | 
									if (!stillonline(stat_devices[i].name))
 | 
				
			||||||
					SetErrLED(LED_NET_POWER);
 | 
										SetErrLED(LED_NET_POWER);
 | 
				
			||||||
				} else {
 | 
									else
 | 
				
			||||||
					SetOnLED(LED_NET_POWER);
 | 
										SetOnLED(LED_NET_POWER);
 | 
				
			||||||
				}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
				if (stat_devices[i].istatlast == istat)
 | 
									if (stat_devices[i].istatlast == istat)
 | 
				
			||||||
					SetOffLED(LED_NET_RX);
 | 
										SetOffLED(LED_NET_RX);
 | 
				
			||||||
| 
						 | 
					@ -522,13 +526,13 @@ void wmifs_routine(int argc, char **argv) {
 | 
				
			||||||
						stat_online = checknetdevs();
 | 
											stat_online = checknetdevs();
 | 
				
			||||||
						stat_current = 0;
 | 
											stat_current = 0;
 | 
				
			||||||
						for (i = 0; i < stat_online; i++) {
 | 
											for (i = 0; i < stat_online; i++) {
 | 
				
			||||||
							if (!strcmp(temp, stat_devices[i].name)) {
 | 
												if (!strcmp(temp, stat_devices[i].name))
 | 
				
			||||||
								stat_current = i;
 | 
													stat_current = i;
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
						}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
						stat_current++;
 | 
											stat_current++;
 | 
				
			||||||
						if (stat_current == stat_online) stat_current = 0;
 | 
											if (stat_current == stat_online)
 | 
				
			||||||
 | 
												stat_current = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
						DrawActiveIFS(stat_devices[stat_current].name);
 | 
											DrawActiveIFS(stat_devices[stat_current].name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -567,7 +571,8 @@ void wmifs_routine(int argc, char **argv) {
 | 
				
			||||||
|* void DrawActiveIFS(char *)												   *|
 | 
					|* void DrawActiveIFS(char *)												   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void DrawActiveIFS(char *real_name) {
 | 
					void DrawActiveIFS(char *real_name)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Cijfers op: 0,65
 | 
						/* Cijfers op: 0,65
 | 
				
			||||||
	   Letters op: 0,75
 | 
						   Letters op: 0,75
 | 
				
			||||||
| 
						 | 
					@ -588,16 +593,17 @@ void DrawActiveIFS(char *real_name) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	strcpy(name, real_name);
 | 
						strcpy(name, real_name);
 | 
				
			||||||
	len = strlen(name);
 | 
						len = strlen(name);
 | 
				
			||||||
	if (len > 5)
 | 
						if (len > 5) {
 | 
				
			||||||
	{
 | 
							for (i = len-5; i < len && !(name[i] >= '0' && name[i] <= '9'); i++)
 | 
				
			||||||
		for (i=len-5; i<len && !(name[i]>='0' && name[i]<='9'); i++)  ;
 | 
								;
 | 
				
			||||||
		for (; i <= len; i++) /* '=' to get the '\0' character moved too \*/
 | 
							for (; i <= len; i++) /* '=' to get the '\0' character moved too \*/
 | 
				
			||||||
			name[i-(len-5)] = name[i];
 | 
								name[i-(len-5)] = name[i];
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	k = 5;
 | 
						k = 5;
 | 
				
			||||||
	for (i = 0; name[i]; i++) {
 | 
						for (i = 0; name[i]; i++) {
 | 
				
			||||||
		if (i == strlen(name)-1 && strlen(name) <= 4 && name[strlen(name)-1] >= '0' && name[strlen(name)-1] <= '9') {
 | 
							if (i == strlen(name)-1 && strlen(name) <= 4 && name[strlen(name)-1] >= '0' &&
 | 
				
			||||||
 | 
							    name[strlen(name)-1] <= '9') {
 | 
				
			||||||
			copyXPMArea(61, 64, 4, 9, k, 5);
 | 
								copyXPMArea(61, 64, 4, 9, k, 5);
 | 
				
			||||||
			k += 4;
 | 
								k += 4;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					@ -619,7 +625,8 @@ void DrawActiveIFS(char *real_name) {
 | 
				
			||||||
|* get_statistics															   *|
 | 
					|* get_statistics															   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int get_statistics(char *devname, long *ip, long *op, long *is, long *os) {
 | 
					int get_statistics(char *devname, long *ip, long *op, long *is, long *os)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	FILE				*fp;
 | 
						FILE				*fp;
 | 
				
			||||||
	char				temp[BUFFER_SIZE];
 | 
						char				temp[BUFFER_SIZE];
 | 
				
			||||||
| 
						 | 
					@ -629,14 +636,15 @@ int get_statistics(char *devname, long *ip, long *op, long *is, long *os) {
 | 
				
			||||||
	int					i;
 | 
						int					i;
 | 
				
			||||||
	int					found;
 | 
						int					found;
 | 
				
			||||||
	struct ppp_stats	ppp_cur, ppp_old;
 | 
						struct ppp_stats	ppp_cur, ppp_old;
 | 
				
			||||||
	static int			ppp_opened = 0;
 | 
						static int			ppp_opened;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!strncmp(devname, "ppp", 3)) {
 | 
						if (!strncmp(devname, "ppp", 3)) {
 | 
				
			||||||
		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)
 | 
								ppp_h = socket(AF_INET, SOCK_DGRAM, 0);
 | 
				
			||||||
 | 
								if (ppp_h < 0)
 | 
				
			||||||
				return -1;
 | 
									return -1;
 | 
				
			||||||
			get_ppp_stats(&ppp_cur);
 | 
								get_ppp_stats(&ppp_cur);
 | 
				
			||||||
			ppp_old = ppp_cur;
 | 
								ppp_old = ppp_cur;
 | 
				
			||||||
| 
						 | 
					@ -667,8 +675,10 @@ int get_statistics(char *devname, long *ip, long *op, long *is, long *os) {
 | 
				
			||||||
	p = strtok(temp, tokens);
 | 
						p = strtok(temp, tokens);
 | 
				
			||||||
	do {
 | 
						do {
 | 
				
			||||||
		if (!(strcmp(p, "packets"))) {
 | 
							if (!(strcmp(p, "packets"))) {
 | 
				
			||||||
			if (input == -1) input = i;
 | 
								if (input == -1)
 | 
				
			||||||
			else output = i;
 | 
									input = i;
 | 
				
			||||||
 | 
								else
 | 
				
			||||||
 | 
									output = i;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		i++;
 | 
							i++;
 | 
				
			||||||
		p = strtok(NULL, tokens);
 | 
							p = strtok(NULL, tokens);
 | 
				
			||||||
| 
						 | 
					@ -702,7 +712,8 @@ int get_statistics(char *devname, long *ip, long *op, long *is, long *os) {
 | 
				
			||||||
|* stillonline																   *|
 | 
					|* stillonline																   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int stillonline(char *ifs) {
 | 
					int stillonline(char *ifs)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	FILE	*fp;
 | 
						FILE	*fp;
 | 
				
			||||||
	char	temp[BUFFER_SIZE];
 | 
						char	temp[BUFFER_SIZE];
 | 
				
			||||||
| 
						 | 
					@ -726,7 +737,8 @@ int stillonline(char *ifs) {
 | 
				
			||||||
|* checknetdevs																   *|
 | 
					|* checknetdevs																   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int checknetdevs(void) {
 | 
					int checknetdevs(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	FILE	*fd;
 | 
						FILE	*fd;
 | 
				
			||||||
	char	temp[BUFFER_SIZE];
 | 
						char	temp[BUFFER_SIZE];
 | 
				
			||||||
| 
						 | 
					@ -737,9 +749,8 @@ int checknetdevs(void) {
 | 
				
			||||||
	char	*tokens = " :\t\n";
 | 
						char	*tokens = " :\t\n";
 | 
				
			||||||
	char	foundbuffer[MAX_STAT_DEVICES][8];
 | 
						char	foundbuffer[MAX_STAT_DEVICES][8];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (i=0; i<MAX_STAT_DEVICES; i++) {
 | 
						for (i = 0; i < MAX_STAT_DEVICES; i++)
 | 
				
			||||||
		foundbuffer[i][0] = 0;
 | 
							foundbuffer[i][0] = 0;
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* foundbuffer vullen met info uit /proc/net/dev */
 | 
						/* foundbuffer vullen met info uit /proc/net/dev */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -785,7 +796,8 @@ int checknetdevs(void) {
 | 
				
			||||||
					foundbuffer[j][0] = 0;
 | 
										foundbuffer[j][0] = 0;
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			if (!k) stat_devices[i].name[0] = 0;
 | 
								if (!k)
 | 
				
			||||||
 | 
									stat_devices[i].name[0] = 0;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -794,10 +806,9 @@ int checknetdevs(void) {
 | 
				
			||||||
		while (!stat_devices[j].name[0] && j < MAX_STAT_DEVICES)
 | 
							while (!stat_devices[j].name[0] && j < MAX_STAT_DEVICES)
 | 
				
			||||||
			j++;
 | 
								j++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (j < MAX_STAT_DEVICES && i != j) {
 | 
							if (j < MAX_STAT_DEVICES && i != j)
 | 
				
			||||||
			stat_devices[i] = stat_devices[j];
 | 
								stat_devices[i] = stat_devices[j];
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	i--;
 | 
						i--;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for (j = 0; j < MAX_STAT_DEVICES; j++) {
 | 
						for (j = 0; j < MAX_STAT_DEVICES; j++) {
 | 
				
			||||||
| 
						 | 
					@ -837,7 +848,8 @@ int checknetdevs(void) {
 | 
				
			||||||
|* DrawStats																   *|
 | 
					|* DrawStats																   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void DrawStats(int *his, int num, int size, int x_left, int y_bottom) {
 | 
					void DrawStats(int *his, int num, int size, int x_left, int y_bottom)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	int		pixels_per_byte;
 | 
						int		pixels_per_byte;
 | 
				
			||||||
	int		j, k;
 | 
						int		j, k;
 | 
				
			||||||
| 
						 | 
					@ -894,7 +906,8 @@ void DrawStats(int *his, int num, int size, int x_left, int y_bottom) {
 | 
				
			||||||
|* usage																	   *|
 | 
					|* usage																	   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void usage(void) {
 | 
					void usage(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fprintf(stderr, "\nwmifs - programming: tijno, (de)bugging & design: warpstah, webhosting: bobby\n\n");
 | 
						fprintf(stderr, "\nwmifs - programming: tijno, (de)bugging & design: warpstah, webhosting: bobby\n\n");
 | 
				
			||||||
	fprintf(stderr, "usage:\n");
 | 
						fprintf(stderr, "usage:\n");
 | 
				
			||||||
| 
						 | 
					@ -913,7 +926,8 @@ void usage(void) {
 | 
				
			||||||
|* printversion																   *|
 | 
					|* printversion																   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void printversion(void) {
 | 
					void printversion(void)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	fprintf(stderr, "%s\n", WMIFS_VERSION);
 | 
						fprintf(stderr, "%s\n", WMIFS_VERSION);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -922,7 +936,8 @@ void printversion(void) {
 | 
				
			||||||
|* get_ppp_stats															   *|
 | 
					|* get_ppp_stats															   *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void get_ppp_stats(struct ppp_stats *cur) {
 | 
					void get_ppp_stats(struct ppp_stats *cur)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	struct ifpppstatsreq    req;
 | 
						struct ifpppstatsreq    req;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -932,9 +947,8 @@ void get_ppp_stats(struct ppp_stats *cur) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	sprintf(req.ifr__name, "ppp%d", PPP_UNIT);
 | 
						sprintf(req.ifr__name, "ppp%d", PPP_UNIT);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (ioctl(ppp_h, SIOCGPPPSTATS, &req) < 0) {
 | 
						if (ioctl(ppp_h, SIOCGPPPSTATS, &req) < 0)
 | 
				
			||||||
/*		fprintf(stderr, "heyho!\n"); */
 | 
							/* fprintf(stderr, "heyho!\n") */;
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	*cur = req.stats;
 | 
						*cur = req.stats;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -965,7 +979,8 @@ void get_ppp_stats(struct ppp_stats *cur) {
 | 
				
			||||||
/*******************************************************************************\
 | 
					/*******************************************************************************\
 | 
				
			||||||
|* SetOnLED                                                                                                                                *|
 | 
					|* SetOnLED                                                                                                                                *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
void SetOnLED(int led) {
 | 
					void SetOnLED(int led)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	switch (led) {
 | 
						switch (led) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -984,7 +999,8 @@ void SetOnLED(int led) {
 | 
				
			||||||
/*******************************************************************************\
 | 
					/*******************************************************************************\
 | 
				
			||||||
|* SetOffLED                                                                                                                               *|
 | 
					|* SetOffLED                                                                                                                               *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
void SetOffLED(int led) {
 | 
					void SetOffLED(int led)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	switch (led) {
 | 
						switch (led) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1003,7 +1019,8 @@ void SetOffLED(int led) {
 | 
				
			||||||
/*******************************************************************************\
 | 
					/*******************************************************************************\
 | 
				
			||||||
|* SetErrLED                                                                                                                               *|
 | 
					|* SetErrLED                                                                                                                               *|
 | 
				
			||||||
\*******************************************************************************/
 | 
					\*******************************************************************************/
 | 
				
			||||||
void SetErrLED(int led) {
 | 
					void SetErrLED(int led)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	switch (led) {
 | 
						switch (led) {
 | 
				
			||||||
	case LED_NET_POWER:
 | 
						case LED_NET_POWER:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue