1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-18 07:25:54 +01:00

Change to the linux kernel coding style

for arq in `git ls-files *.c`; do
    echo $arq;
    indent -linux -l115 $arq;
    done

The different line break at 115 columns is because
I use a widescreen monitor :-)
This commit is contained in:
Carlos R. Mafra
2009-08-20 00:59:40 +02:00
parent 59fc927dc9
commit 688a56e8ab
209 changed files with 87034 additions and 98138 deletions

View File

@@ -1,8 +1,6 @@
#include "wconfig.h"
#ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
#endif
@@ -11,7 +9,6 @@
# include <sys/types.h>
#endif
#include <unistd.h>
#include <string.h>
@@ -21,32 +18,29 @@
# include <sys/select.h>
#endif
void
wusleep(unsigned int microsecs)
void wusleep(unsigned int microsecs)
{
struct timeval tv;
fd_set rd, wr, ex;
FD_ZERO(&rd);
FD_ZERO(&wr);
FD_ZERO(&ex);
tv.tv_sec = microsecs / 1000000u;
tv.tv_usec = microsecs % 1000000u;
select(1, &rd, &wr, &ex, &tv);
struct timeval tv;
fd_set rd, wr, ex;
FD_ZERO(&rd);
FD_ZERO(&wr);
FD_ZERO(&ex);
tv.tv_sec = microsecs / 1000000u;
tv.tv_usec = microsecs % 1000000u;
select(1, &rd, &wr, &ex, &tv);
}
#else /* not HAVE_SELECT */
#else /* not HAVE_SELECT */
# ifdef HAVE_POLL
void
wusleep(unsigned int microsecs)
void wusleep(unsigned int microsecs)
{
poll((struct poll *) 0, (size_t) 0, microsecs/1000);
poll((struct poll *)0, (size_t) 0, microsecs / 1000);
}
# else /* ! HAVE_POLL */
# else /* ! HAVE_POLL */
oops!
# endif /* !HAVE_POLL */
#endif /* !HAVE_SELECT */
oops !
# endif /* !HAVE_POLL */
#endif /* !HAVE_SELECT */