📄 nvr.c
字号:
#include "all.h"#include "mem.h"#include "io.h"#include "ureg.h"#include "dosfs.h"static Dosfile file;static int opened;char nvrfile[128] = "plan9.nvr";static voidnvopen(void){ int s; Dosfile *fp; if(opened) return; opened = 1; s = spllo(); fp = dosopen(&dos, nvrfile, &file); splx(s); if(fp == 0) panic("can't open %s\n", nvrfile);}intnvread(int offset, void *a, int n){ int r, s; nvopen(); s = spllo(); file.offset = offset; r = dosread(&file, a, n); splx(s); return r;}intnvwrite(int offset, void *a, int n){ int r, s; nvopen(); s = spllo(); file.offset = offset; r = doswrite(&file, a, n); splx(s); return r;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -