aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/faces
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/faces
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/faces')
-rw-r--r--src/cmd/faces/facedb.c20
-rw-r--r--src/cmd/faces/main.c6
-rw-r--r--src/cmd/faces/plumb.c2
-rw-r--r--src/cmd/faces/util.c1
4 files changed, 14 insertions, 15 deletions
diff --git a/src/cmd/faces/facedb.c b/src/cmd/faces/facedb.c
index a24a391a..5043aa78 100644
--- a/src/cmd/faces/facedb.c
+++ b/src/cmd/faces/facedb.c
@@ -112,7 +112,7 @@ readfile(char *s)
continue;
/*
- * if it's less than 30 seconds since we read it, or it
+ * if it's less than 30 seconds since we read it, or it
* hasn't changed, send back our copy
*/
if(time(0) - r->rdtime < 30)
@@ -215,7 +215,7 @@ tryfindpicture(char *dom, char *user, char *dir, char *dict)
{
static char buf[1024];
char *file, *p, *nextp, *q;
-
+
if((file = readfile(dict)) == nil)
return nil;
@@ -247,7 +247,7 @@ static char*
estrstrdup(char *a, char *b)
{
char *t;
-
+
t = emalloc(strlen(a)+strlen(b)+1);
strcpy(t, a);
strcat(t, b);
@@ -261,7 +261,7 @@ tryfindfiledir(char *dom, char *user, char *dir)
int fd;
int i, n;
Dir *d;
-
+
/*
* If this directory has a .machinelist, use it.
*/
@@ -279,7 +279,7 @@ tryfindfiledir(char *dom, char *user, char *dir)
return x;
}
free(dict);
-
+
/*
* If not, recurse into subdirectories.
* Ignore 48x48xN directories for now.
@@ -305,7 +305,7 @@ tryfindfiledir(char *dom, char *user, char *dir)
free(d);
}
close(fd);
-
+
/*
* Handle 48x48xN directories in the right order.
*/
@@ -398,7 +398,7 @@ freefacefile(Facefile *f)
return;
if(++nsaved > Nsave)
clearsaved();
-}
+}
static Image*
myallocimage(ulong chan)
@@ -413,7 +413,7 @@ myallocimage(ulong chan)
}
return img;
}
-
+
static Image*
readbit(int fd, ulong chan)
@@ -527,14 +527,14 @@ readface(char *fn)
mask = myallocimage(GREY1);
if(mask == nil)
goto Done;
- if(unloadimage(face, face->r, data, Facesize*Facesize) != Facesize*Facesize){
+ if(unloadimage(face, face->r, data, Facesize*Facesize) != Facesize*Facesize){
freeimage(mask);
goto Done;
}
bits = 0;
p = mdata;
for(y=0; y<Facesize; y++){
- for(x=0; x<Facesize; x++){
+ for(x=0; x<Facesize; x++){
bits <<= 1;
if(data[Facesize*y+x] != 0xFF)
bits |= 1;
diff --git a/src/cmd/faces/main.c b/src/cmd/faces/main.c
index bb36ed7c..30343c74 100644
--- a/src/cmd/faces/main.c
+++ b/src/cmd/faces/main.c
@@ -19,7 +19,7 @@ enum
Infolines = 9,
HhmmTime = 18*60*60, /* max age of face to display hh:mm time */
-
+
STACK = 32768
};
@@ -293,7 +293,7 @@ updatetimes(void)
continue;
if(((long)(now - f->time) <= HhmmTime) != f->recent)
drawface(f, i);
- }
+ }
}
void
@@ -610,7 +610,7 @@ click(int button, Mouse *m)
return;
}else{
for(i=first; i<last; i++) /* clear vwhois faces */
- if(ptinrect(p, facerect(i-first))
+ if(ptinrect(p, facerect(i-first))
&& strstr(faces[i]->str[Sshow], "/XXXvwhois")){
lockdisplay(display);
delface(i);
diff --git a/src/cmd/faces/plumb.c b/src/cmd/faces/plumb.c
index 6d82c779..b2fcfa85 100644
--- a/src/cmd/faces/plumb.c
+++ b/src/cmd/faces/plumb.c
@@ -113,7 +113,7 @@ setname(Face *f, char *sender)
static char* months[] = {
"jan", "feb", "mar", "apr",
- "may", "jun", "jul", "aug",
+ "may", "jun", "jul", "aug",
"sep", "oct", "nov", "dec"
};
diff --git a/src/cmd/faces/util.c b/src/cmd/faces/util.c
index 22f57549..5f3e7fde 100644
--- a/src/cmd/faces/util.c
+++ b/src/cmd/faces/util.c
@@ -39,4 +39,3 @@ estrdup(char *s)
}
return t;
}
-