Scrap readrune(), introducing fgetrune()
Interface as proposed by cls, but internally rewritten after a few considerations. The code is much shorter and to the point, aligning itself with other standard functions. It should also be much faster, which is not bad.
This commit is contained in:
@@ -73,7 +73,7 @@ unexpand(const char *file, FILE *fp)
|
||||
size_t last = 0, col = 0, i;
|
||||
int bol = 1;
|
||||
|
||||
while (readrune(file, fp, &r)) {
|
||||
while (efgetrune(&r, fp, file)) {
|
||||
switch (r) {
|
||||
case ' ':
|
||||
if (!bol && !aflag)
|
||||
|
Reference in New Issue
Block a user