⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fseek.c

📁 mips架构的bootloader,99左右的版本 但源代码现在没人更新了
💻 C
字号:
/************************************************************* * File: lib/fseek.c * Purpose: Part of C runtime library * Author: Phil Bunce (pjb@carmel.com) * Revision History: *	970304	Start of revision history */#include <stdio.h>/**************************************************************  fseek(fp,offset,whence)*/fseek(fp,offset,whence)FILE *fp;long offset;int whence;{int n;if (whence == 1) { /* relative seek */	if (offset > 0 && offset <= fp->cnt) {		fp->cnt -= offset;		fp->ptr += offset;		return(0);		}	if (offset < 0 && offset < (fp->ptr-fp->buf)) {		fp->cnt += offset;		fp->ptr -= offset;		return(0);		}	}fp->cnt = 0;n = lseek(fp->fd,offset,whence);return(n);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -