程序清单3-1 测试能否对标准输入设置偏移量
/* ============================================================================ Name : test.c Author : blank Version : Copyright : Your copyright notice Description : 程序3-1 测试标准输入能否被设置位移量 ============================================================================ */ #include <stdio.h> #include <stdlib.h> #include "ourhdr.h" int main(int argc, char *argv[]) { if (lseek(STDIN_FILENO, 0, SEEK_CUR) == -1){ printf("cannot seek\n"); } else{ printf("can OK\n"); } exit(0); }