summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-01-27 21:10:31 +0000
committerNick Mathewson <nickm@torproject.org>2009-01-27 21:10:31 +0000
commit9993137cbbd9508dbf28e431e0f84d809c516128 (patch)
treeedc8689f6acbcca4d62962a20b1af2612fff3dc8 /sample
parent3065389973fcfb724981376c31a51b11b679abc0 (diff)
downloadlibevent-9993137cbbd9508dbf28e431e0f84d809c516128.tar.gz
Remove all trailing whitespace in all the source files.
svn:r1063
Diffstat (limited to 'sample')
-rw-r--r--sample/event-test.c22
-rw-r--r--sample/signal-test.c4
-rw-r--r--sample/time-test.c4
3 files changed, 15 insertions, 15 deletions
diff --git a/sample/event-test.c b/sample/event-test.c
index 2c6cb938..b4276aa9 100644
--- a/sample/event-test.c
+++ b/sample/event-test.c
@@ -42,7 +42,7 @@ fifo_read(int fd, short event, void *arg)
#ifdef WIN32
len = ReadFile((HANDLE)fd, buf, sizeof(buf) - 1, &dwBytesRead, NULL);
- // Check for end of file.
+ // Check for end of file.
if(len && dwBytesRead == 0) {
fprintf(stderr, "End Of File");
event_del(ev);
@@ -72,14 +72,14 @@ main (int argc, char **argv)
struct event evfifo;
#ifdef WIN32
HANDLE socket;
- // Open a file.
- socket = CreateFile("test.txt", // open File
- GENERIC_READ, // open for reading
- 0, // do not share
- NULL, // no security
- OPEN_EXISTING, // existing file only
- FILE_ATTRIBUTE_NORMAL, // normal file
- NULL); // no attr. template
+ // Open a file.
+ socket = CreateFile("test.txt", // open File
+ GENERIC_READ, // open for reading
+ 0, // do not share
+ NULL, // no security
+ OPEN_EXISTING, // existing file only
+ FILE_ATTRIBUTE_NORMAL, // normal file
+ NULL); // no attr. template
if(socket == INVALID_HANDLE_VALUE)
return 1;
@@ -88,7 +88,7 @@ main (int argc, char **argv)
struct stat st;
const char *fifo = "event.fifo";
int socket;
-
+
if (lstat (fifo, &st) == 0) {
if ((st.st_mode & S_IFMT) == S_IFREG) {
errno = EEXIST;
@@ -129,7 +129,7 @@ main (int argc, char **argv)
/* Add it to the active events, without a timeout */
event_add(&evfifo, NULL);
-
+
event_dispatch();
#ifdef WIN32
CloseHandle(socket);
diff --git a/sample/signal-test.c b/sample/signal-test.c
index 9a131cb5..cb464834 100644
--- a/sample/signal-test.c
+++ b/sample/signal-test.c
@@ -38,7 +38,7 @@ signal_cb(int fd, short event, void *arg)
if (called >= 2)
event_del(signal);
-
+
called++;
}
@@ -46,7 +46,7 @@ int
main (int argc, char **argv)
{
struct event signal_int;
-
+
/* Initalize the event library */
event_init();
diff --git a/sample/time-test.c b/sample/time-test.c
index 069d4f8f..faf0999d 100644
--- a/sample/time-test.c
+++ b/sample/time-test.c
@@ -50,7 +50,7 @@ main (int argc, char **argv)
{
struct event timeout;
struct timeval tv;
-
+
/* Initalize the event library */
event_init();
@@ -62,7 +62,7 @@ main (int argc, char **argv)
event_add(&timeout, &tv);
lasttime = time(NULL);
-
+
event_dispatch();
return (0);