Return number of bytes read even on a partial read
and set the rune to Runeerror for later checking (if desired).
This commit is contained in:
		| @@ -34,7 +34,8 @@ readrune(const char *file, FILE *fp, Rune *r) | ||||
| 					file, strerror(errno)); | ||||
| 				exit(1); | ||||
| 			} | ||||
| 			return 0; | ||||
| 			*r = Runeerror; | ||||
| 			return i; | ||||
| 		} | ||||
| 		buf[i++] = c; | ||||
| 		if (fullrune(buf, i)) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user