Where oh where is my directory

Perrone Ford perrone at loligo.uucp
Sat Mar 25 05:21:05 AEST 1989


Help , Althogh I wa originally developing this program
for TurboC I am interested if there is an ANSI way to
list the files in the current or another directory.  
What I am trying to accompish is to read the directory 
entries into a buffer and then print the buffer out in the
middle of a graphics routine

	In TurboC this would amount to being able to do soemthing
	like: 


#include <stdio.h>
#include <grphics.h>  /*  Maybe curses  */
main () 
{
char *listing;
listing = system("dir");
initgraph = DETECT;
initgraph(&graphdriver, &graphmode);
outtext(listing);
}



however whenever i make the system call, the screen gets trashed
whether or not i change the active or visual pages...
anyone got any good ideas?


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Perrone T. Ford                   | Bitnet : PFord at FSU.Bitnet    %
% arpa: Perrone at loligo.com.fsu.edu  |       ford at systems.fsu.edu   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



More information about the Comp.lang.c mailing list