Rename variable Rune * p -> r in fgetrune()
This commit is contained in:
parent
7c578bf5b0
commit
1c462012e4
|
@ -7,13 +7,13 @@
|
||||||
#include "../utf.h"
|
#include "../utf.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
fgetrune(Rune *p, FILE *fp)
|
fgetrune(Rune *r, FILE *fp)
|
||||||
{
|
{
|
||||||
char buf[UTFmax];
|
char buf[UTFmax];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < UTFmax && (buf[i] = fgetc(fp)) != EOF && ++i ;)
|
for (i = 0; i < UTFmax && (buf[i] = fgetc(fp)) != EOF && ++i ;)
|
||||||
if (charntorune(p, buf, i) > 0)
|
if (charntorune(r, buf, i) > 0)
|
||||||
break;
|
break;
|
||||||
if (ferror(fp))
|
if (ferror(fp))
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -22,11 +22,11 @@ fgetrune(Rune *p, FILE *fp)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
efgetrune(Rune *p, FILE *fp, const char *file)
|
efgetrune(Rune *r, FILE *fp, const char *file)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if ((ret = fgetrune(p, fp)) < 0) {
|
if ((ret = fgetrune(r, fp)) < 0) {
|
||||||
fprintf(stderr, "fgetrune %s: %s\n", file, strerror(errno));
|
fprintf(stderr, "fgetrune %s: %s\n", file, strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user