Add xgetc, xfgets, xputc and xputs.

Some declarations are modified in line with other functions in xfile.