aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/sam/unix.c
diff options
context:
space:
mode:
authorDan Cross <cross@gajendra.net>2020-01-10 14:44:21 +0000
committerDan Cross <cross@gajendra.net>2020-01-10 14:54:30 +0000
commitfa325e9b42b0bdfb48857d1958d9fb7ceac55151 (patch)
tree81d26256d152435135bcb1ae43121979a49f5f2b /src/cmd/sam/unix.c
parent77a0a5b5194d4441c86de097f2aae297cb75e2c2 (diff)
downloadplan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.gz
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.tar.bz2
plan9port-fa325e9b42b0bdfb48857d1958d9fb7ceac55151.zip
Trivial changes: whitespace and modes.
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
Diffstat (limited to 'src/cmd/sam/unix.c')
-rw-r--r--src/cmd/sam/unix.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/cmd/sam/unix.c b/src/cmd/sam/unix.c
index a745a5bc..97f2fce8 100644
--- a/src/cmd/sam/unix.c
+++ b/src/cmd/sam/unix.c
@@ -10,7 +10,7 @@
#include "sam.h"
Rune samname[] = { '~', '~', 's', 'a', 'm', '~', '~', 0 };
-
+
static Rune l1[] = { '{', '[', '(', '<', 0253, 0};
static Rune l2[] = { '\n', 0};
static Rune l3[] = { '\'', '"', '`', 0};
@@ -85,15 +85,15 @@ getuser(void)
return user;
}
-int
-statfile(char *name, ulong *dev, uvlong *id, long *time, long *length, long *appendonly)
+int
+statfile(char *name, ulong *dev, uvlong *id, long *time, long *length, long *appendonly)
{
struct stat dirb;
if (stat(name, &dirb) == -1)
return -1;
if (dev)
- *dev = dirb.st_dev;
+ *dev = dirb.st_dev;
if (id)
*id = dirb.st_ino;
if (time)
@@ -110,11 +110,11 @@ statfd(int fd, ulong *dev, uvlong *id, long *time, long *length, long *appendonl
{
struct stat dirb;
- if (fstat(fd, &dirb) == -1)
+ if (fstat(fd, &dirb) == -1)
return -1;
if (dev)
*dev = dirb.st_dev;
- if (id)
+ if (id)
*id = dirb.st_ino;
if (time)
*time = dirb.st_mtime;
@@ -174,11 +174,11 @@ tempdisk(void)
int fd = temp_file(buf, sizeof buf);
if (fd >= 0)
remove(buf);
- return fd;
+ return fd;
}
#undef waitfor
-int
+int
samwaitfor(int pid)
{
int r;
@@ -218,5 +218,3 @@ erealloc(void *p, ulong n)
panic("realloc fails");
return p;
}
-
-