Path: utzoo!attcan!uunet!mmlai!burzio From: burzio@mmlai.UUCP (Tony Burzio) Newsgroups: comp.sys.hp Subject: DIRECTORY (3C) strangeness Keywords: readdir not in alphabetical order? Message-ID: <616@mmlai.UUCP> Date: 24 Nov 89 03:38:18 GMT Organization: Martin Marietta Labs, Baltimore, MD Lines: 20 System: HP-UX 6.5 B 9000/370 While trying out the C DIRECTORY(3C) routines, I noticed some very strange behavior. When you do a readdir, the files are returned in what seems to be random order. At first it appeared that they return in the order that the files are created, but new files pop up where ever. The DIR pointer is not closed until NULL is returned from readdir. Has anybody else used this code and been able to extract file names in alphabetical order? Where should I look for more info besides the HP-UX reference? On a related note, is it possible to run a sort on a tmpfile() created file? I really need the filenames in order... Thanks in advance. ********************************************************************* Tony Burzio * SNOW! On Thanksgiving? Ski time! Martin Marietta Labs * mmlai!burzio@uunet.uu.net * *********************************************************************