Novic C programmer needs help

Daeshik Kim dkim at wam.umd.edu
Tue Feb 13 07:14:06 AEST 1990


In article <1153 at psc90.UUCP> pyr201 at .UUCP (d^2) writes:
>char *form (va_alist)
>  va_dcl
>{
>  va_list pvar;
>  char *fmt_string;
>  static char result[LINELEN];
>  FILE b;

	Why isn't this "File *b;" ?

>  
>  va_start (pvar);
>  fmt_string = va_arg (pvar, char*);
>
>  b._flag = _IOWRT|_IOSTRG;
>  b._ptr = result;
>  b._cnt = LINELEN;
>
>--->  _doprnt(fmt_string, pvar, &b); <---

	File b seems to be opended here.

>
>  putc('\0', &b);
>
>  va_end (pvar);
>  return (result);
>}

	Where File b is closed?

	What is this file?

	I have not seen the whole program but either '_doprnt()' does
	something wrong or file 'b' better to be closed with 'fclose()'.

	Just an opinion!
--
	Daeshik Kim	H: (301) 445-0475/2147 O: (703) 689-5878
	SCHOOL:	dkim at wam.umd.edu, dskim at eng.umd.edu, mz518 at umd5.umd.edu
	WORK:	dkim at daffy.uu.net (uunet!daffy!dkim)



More information about the Comp.lang.c mailing list