Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
st.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2d67f99
)
Use xwrite instead of write.
author
noname
<noname@inventati.org>
Fri, 25 Apr 2014 14:27:26 +0000
(18:27 +0400)
committer
Roberto E. Vargas Caballero
<k0ga@shike2.com>
Fri, 25 Apr 2014 22:03:08 +0000
(
00:03
+0200)
st.c
patch
|
blob
|
history
diff --git
a/st.c
b/st.c
index
7dd5e04
..
f91eb8d
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-452,7
+452,7
@@
static char utf8encodebyte(long, size_t);
static size_t utf8len(char *);
static size_t utf8validate(long *, size_t);
static size_t utf8len(char *);
static size_t utf8validate(long *, size_t);
-static ssize_t xwrite(int, char *, size_t);
+static ssize_t xwrite(int, const char *, size_t);
static void *xmalloc(size_t);
static void *xrealloc(void *, size_t);
static char *xstrdup(char *);
static void *xmalloc(size_t);
static void *xrealloc(void *, size_t);
static char *xstrdup(char *);
@@
-518,7
+518,7
@@
static Fontcache frc[16];
static int frclen = 0;
ssize_t
static int frclen = 0;
ssize_t
-xwrite(int fd, char *s, size_t len) {
+xwrite(int fd, const char *s, size_t len) {
size_t aux = len;
while(len > 0) {
size_t aux = len;
while(len > 0) {
@@
-1270,7
+1270,7
@@
ttyread(void) {
void
ttywrite(const char *s, size_t n) {
void
ttywrite(const char *s, size_t n) {
- if(write(cmdfd, s, n) == -1)
+ if(xwrite(cmdfd, s, n) == -1)
die("write error on tty: %s\n", strerror(errno));
}
die("write error on tty: %s\n", strerror(errno));
}