Introduction
Introduction Statistics Contact Development Disclaimer Help
fputrune.c - sbase - suckless unix tools
git clone git://git.suckless.org/sbase
Log
Files
Refs
README
LICENSE
---
fputrune.c (467B)
---
1 /* See LICENSE file for copyright and license details. */
2 #include <errno.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <string.h>
6
7 #include "../utf.h"
8
9 int
10 fputrune(const Rune *r, FILE *fp)
11 {
12 char buf[UTFmax];
13
14 return fwrite(buf, runetochar(buf, r), 1, fp);
15 }
16
17 int
18 efputrune(const Rune *r, FILE *fp, const char *file)
19 {
20 int ret;
21
22 if ((ret = fputrune(r, fp)) < 0) {
23 fprintf(stderr, "fputrune %s: %s\n", file, strerror(errn…
24 exit(1);
25 }
26 return ret;
27 }
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.