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

📄 vstr.h

📁 用C实现的在LINUX系统下的聊天程序.无需登录就可以下载
💻 H
字号:
/* vstr.h - Virtual Stream                                                *//*                                                                        *//* This program is free software; you can redistribute it and/or modify   *//* it under the terms of the GNU General Public License as published by   *//* the Free Software Foundation; either version 2, or (at your option)    *//* any later version.                                                     *//*                                                                        *//* This program is distributed in the hope that it will be useful,        *//* but WITHOUT ANY WARRANTY; without even the implied warranty of         *//* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *//* GNU General Public License for more details.                           *//*                                                                        *//* You should have received a copy of the GNU General Public License      *//* along with this program; if not, write to the Free Software            *//* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA              *//* 02111-1307, USA.                                                       */#ifndef VSTR_H#define VSTR_H#include <alloc.h>typedef struct {  int max;                      /* max size of stream   */  int size;                     /* size of stream       */  char *head;                   /* head of stream       */  char *tail;                   /* tail of stream       */  char *data;                   /* data                 */} vstr_t;void vstr_init (vstr_t *vstr, int max);void vstr_map (vstr_t *vstr, void *data, int size);void vstr_free (vstr_t *vstr);void vstr_flush (vstr_t *vstr);void vstr_set (vstr_t *vstr, int head, int tail);void vstr_adv_head (vstr_t *vstr, int len);void vstr_adv_tail (vstr_t *vstr, int len);void vstr_rev_tail (vstr_t *vstr, int len);void vstr_rev_head (vstr_t *vstr, int len);void vstr_put_head (vstr_t *vstr, void *data, int size);void vstr_put_tail (vstr_t *vstr, void *data, int size);void vstr_get_head (vstr_t *vstr, void *data, int size);void vstr_get_tail (vstr_t *vstr, void *data, int size);void vstr_zero_tail (vstr_t *vstr, int len);void vstr_zero_head (vstr_t *vstr, int len);#endif /* VSTR_H */

⌨️ 快捷键说明

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