readptr.c
来自「用C语言编的邮件系统(毕业论文)」· C语言 代码 · 共 20 行
C
20 行
#include "mail.h"/* Read a chain ptr field from anywhere in the index file: * the free list pointer, a hash table chain ptr, or an * index record chain ptr. */off_t_mail_readptr(MAIL *mail, off_t offset){ char asciiptr[PTR_SZ + 1]; if (lseek(mail->idxfd, offset, SEEK_SET) == -1) err_dump("lseek error to ptr field"); if (read(mail->idxfd, asciiptr, PTR_SZ) != PTR_SZ) err_dump("read error of ptr field"); asciiptr[PTR_SZ] = 0; /* null terminate */ return(atol(asciiptr));}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?