wait, maybe i did not understand your problem.
if you mean that u wrote a text file in XP and then tried to compile it in sparc then you
might had this problem:
in Unix the enter button is one character (\n) <- new line
in windows the enter button is 2 char \r\n
try to compile and run this program to delete the \r chars
Code:
#include <stdio.h>
#include <string.h>
int main(int argc, char **argv)
{
FILE *src,*dest;
char c,name[50];
if(argc != 2 ){
fprintf(stderr,"Usage: %s <filename>\n",argv[0]);
exit(0);
}
src = fopen(argv[1],"r");
strncpy(name,argv[1],45);
strncat(name,".new",4);
dest = fopen(name,"w");
c = getc(src);
while (c != EOF)
{
if ( c != '\r') putc(c,dest);
c = getc(src);
}
fclose(src);
fclose(dest);
return 0;
}
this prog takes as argument a filename, deletes the \r chars and saves it to <filename>.new