📄 rot1fs.fist
字号:
%{ /* * rot1fs: shift each byte by one, which is better * than rot13 in that every byte is changed, and double-encoding is not * like decoding (as with rot13). */%}filter data;encoding_blocksize 1;encoding_type block;debug on;%%%%/* * add 1 to each byte * return the number of bytes written */introt1fs_encode_block(const char *inbuf, char *outbuf, int len, const vnode_t *vp, const vfs_t *vfsp, u_long pagenum){ unsigned char *incp = (unsigned char *) inbuf; unsigned char *outcp = (unsigned char *) outbuf; int i; for (i = 0; i < len; i++, incp++, outcp++) *outcp = *incp + 1; return len;}/* * subtract 1 from each byte * return the number of bytes written */introt1fs_decode_block(const char *inbuf, char *outbuf, int len, const vnode_t *vp, const vfs_t *vfsp, u_long pagenum){ unsigned char *incp = (unsigned char *) inbuf; unsigned char *outcp = (unsigned char *) outbuf; int i; for (i = 0; i < len; i++, incp++, outcp++) *outcp = *incp - 1; return len;}/* * Local variables: * c-basic-offset: 4 * End: */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -