Lines Matching refs:files

1612 struct files {  struct
1616 } files[FOPEN_MAX] ={ variable
1624 files[0].fp = stdin; in stdinit()
1625 files[1].fp = stdout; in stdinit()
1626 files[2].fp = stderr; in stdinit()
1638 if (files[i].fname && strcmp(s, files[i].fname) == 0) { in openfile()
1639 if (a == files[i].mode || (a==APPEND && files[i].mode==GT)) in openfile()
1640 return files[i].fp; in openfile()
1642 return files[i].fp; in openfile()
1648 if (files[i].fp == 0) in openfile()
1668 files[i].fname = tostring(s); in openfile()
1669 files[i].fp = fp; in openfile()
1670 files[i].mode = m; in openfile()
1680 if (fp == files[i].fp) in filename()
1681 return files[i].fname; in filename()
1695 if (files[i].fname && strcmp(x->sval, files[i].fname) == 0) { in closefile()
1696 if (ferror(files[i].fp)) in closefile()
1697 WARNING( "i/o error occurred on %s", files[i].fname ); in closefile()
1698 if (files[i].mode == '|' || files[i].mode == LE) in closefile()
1699 stat = pclose(files[i].fp); in closefile()
1701 stat = fclose(files[i].fp); in closefile()
1703 WARNING( "i/o error occurred closing %s", files[i].fname ); in closefile()
1705 xfree(files[i].fname); in closefile()
1706 files[i].fname = NULL; /* watch out for ref thru this */ in closefile()
1707 files[i].fp = NULL; in closefile()
1721 if (files[i].fp) { in closeall()
1722 if (ferror(files[i].fp)) in closeall()
1723 WARNING( "i/o error occurred on %s", files[i].fname ); in closeall()
1724 if (files[i].mode == '|' || files[i].mode == LE) in closeall()
1725 stat = pclose(files[i].fp); in closeall()
1727 stat = fclose(files[i].fp); in closeall()
1729 WARNING( "i/o error occurred while closing %s", files[i].fname ); in closeall()
1739 if (files[i].fp) in flush_all()
1740 fflush(files[i].fp); in flush_all()