rewind.c

来自「用C语言编的邮件系统(毕业论文)」· C语言 代码 · 共 23 行

C
23
字号
#include	"mail.h"/* Rewind the index file for mail_nextrec(). * Automatically called by mail_open(). * Must be called before first mail_nextrec(). */voidmail_rewind(MAIL *mail){	off_t	offset;	offset = (mail->nhash + 1) * PTR_SZ;		/* +1 for free list ptr */		/* We're just setting the file offset for this process		   to the start of the index records; no need to lock.		   +1 below for newline at end of hash table. */	if ( (mail->idxoff = lseek(mail->idxfd, offset+1, SEEK_SET)) == -1)		err_dump("lseek error");}

⌨️ 快捷键说明

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