diff options
| author | noname <noname@inventati.org> | 2014-04-25 18:27:26 +0400 |
|---|---|---|
| committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2014-04-26 00:03:08 +0200 |
| commit | 84f6dbffa5a26e1a2f94f844844d76f80dd6c5a0 (patch) | |
| tree | eab14a9187354665e5362bac5b5264da57d19490 | |
| parent | 2d67f99d286b7c00b298d0f0908035ca49cd4909 (diff) | |
| download | st-84f6dbffa5a26e1a2f94f844844d76f80dd6c5a0.tar.gz st-84f6dbffa5a26e1a2f94f844844d76f80dd6c5a0.zip | |
Use xwrite instead of write.
| -rw-r--r-- | st.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -452,7 +452,7 @@ static char utf8encodebyte(long, size_t); | |||
| 452 | static size_t utf8len(char *); | 452 | static size_t utf8len(char *); |
| 453 | static size_t utf8validate(long *, size_t); | 453 | static size_t utf8validate(long *, size_t); |
| 454 | 454 | ||
| 455 | static ssize_t xwrite(int, char *, size_t); | 455 | static ssize_t xwrite(int, const char *, size_t); |
| 456 | static void *xmalloc(size_t); | 456 | static void *xmalloc(size_t); |
| 457 | static void *xrealloc(void *, size_t); | 457 | static void *xrealloc(void *, size_t); |
| 458 | static char *xstrdup(char *); | 458 | static char *xstrdup(char *); |
| @@ -518,7 +518,7 @@ static Fontcache frc[16]; | |||
| 518 | static int frclen = 0; | 518 | static int frclen = 0; |
| 519 | 519 | ||
| 520 | ssize_t | 520 | ssize_t |
| 521 | xwrite(int fd, char *s, size_t len) { | 521 | xwrite(int fd, const char *s, size_t len) { |
| 522 | size_t aux = len; | 522 | size_t aux = len; |
| 523 | 523 | ||
| 524 | while(len > 0) { | 524 | while(len > 0) { |
| @@ -1270,7 +1270,7 @@ ttyread(void) { | |||
| 1270 | 1270 | ||
| 1271 | void | 1271 | void |
| 1272 | ttywrite(const char *s, size_t n) { | 1272 | ttywrite(const char *s, size_t n) { |
| 1273 | if(write(cmdfd, s, n) == -1) | 1273 | if(xwrite(cmdfd, s, n) == -1) |
| 1274 | die("write error on tty: %s\n", strerror(errno)); | 1274 | die("write error on tty: %s\n", strerror(errno)); |
| 1275 | } | 1275 | } |
| 1276 | 1276 | ||
