slang-users mailing list

[2000 Date Index] [2000 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

getting SLang to print with "\n" newlines.



Hi I am new to slang and am having a small problems with newlines when
printing. Maybe someone can help.

Here's some code.



  
readfile()  
{

   FILE *fptr;
   
   char string[81];

   
   
   SLsmg_set_color(4);
   fptr = fopen("list.txt","r");
   while(fgets(string,80,fptr) != NULL)
     {
	
	SLsmg_write_string(string);
	SLsmg_refresh();
     }		
   getchar();
   fclose(fptr);
   
}


The file I am trying to print out is nothing but a list of words
with newlines. In a regular C program I have the strings print out 
in a list just like that which is in the file, but I can't figure out how 
to get the slang printout to do this. Any help appreciated.

Thanks


[2000 date index] [2000 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]