Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!uflorida!gatech!gitpyr!david From: david@pyr.gatech.EDU (David Brown) Newsgroups: comp.unix.questions Subject: C/UNIX low level I/O Keywords: C, I/O, open, fopen Message-ID: <6695@pyr.gatech.EDU> Date: 1 Nov 88 21:38:18 GMT Reply-To: david@pyr.gatech.edu (David Brown) Organization: Armstrong State College, Savannah, Ga. Lines: 26 Hi, NetLanders. I've a small C/UNIX problem. I need to do a bunch of small write's to a file. I need to know the quickest way to do it. I've got a linked list of 'words' that I need written to a file in a humanly readable and understandable fashion. But it needs to take as little time as possible. For instance, the way I have it now, I use write(2). But this ay, I do a separate 'write' for every word in the list, and a 'write' for the spaces between and the newlines. Like this: while (list ~empty){ write word write space } write newline My question: is there a better way to do this? I've thought of using higher-level I/O routines like fprintf, but I think they would be less efficient. But less efficient than what I'm doing now? Thanks, David Brown ---------------------------------------------------------------------------- David Brown Armstrong State College, Savannah, Georgia uucp: ...!{akgua,allegra,amd,hplabs,uunet,seismo,ut-ngp}!gatech!gitpyr!david ARPA: david@pyr.gatech.edu