www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/09/05/21:54:07

Xref: news-dnh.mv.net comp.os.msdos.djgpp:1916
Newsgroups: comp.os.msdos.djgpp
Path: news-dnh.mv.net!mv!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!nntp.sei.cmu.edu!fs7.ece.cmu.edu!cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!cfanews!cfa0!peprbv
From: peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock)
Subject: fcloseall function
Sender: news AT cfanews DOT harvard DOT edu
Reply-To: rbabcock AT cfa DOT harvard DOT edu
Organization: Smithsonian Astrophysical Observatory, Cambridge, MA, USA
Date: Tue, 5 Sep 1995 02:48:20 GMT
Lines: 17
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

Under djgpp 1.x, I implemented an approximation to the Borland
fcloseall() function which closes all open streams (except stdin,
stdout, stderr, stdaux, stdprn) by

int fcloseall(void)
   {
   int i;
   for(i=5; i<20; i++)
      {
      if(_iob[i]._file > 0)
         fclose(&_iob[i]);
      }
   return(0);
   }

Can I do something similar for version 2?  _iob is no longer defined.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019