Thursday, May 1, 2008

Test if standard input is capable of seeking

# include

# include “ourhdr.h”

int

main(void)

{

if(lseek (STDIN_FILENO, 0, SEEK_CUR) = = -1)

printf(“cannot seek \n”);

else

printf(“seek OF\n”);

exit (0);

}

No comments: