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

📄 alias.h

📁 P2P NAP的C实现 P2P在网络应用中越来越流行
💻 H
字号:
#ifndef _NAP_ALIAS_H#define _NAP_ALIAS_H/* Copyright (c) 2000  Kevin Sullivan <nite@gis.net> * * Please refer to the COPYRIGHT file for more information. */#include <ncurses.h>struct alias_s {  unsigned char *nm;  unsigned char *args;  struct alias_s *next;};typedef struct alias_s alias_t;/* holds an assignment of variables to values */struct sets_s {  unsigned char *nm;   /* name of this variable */  char *d;             /* string value */  int t;               /* 0 if d represents a number, 1 otherwise */  long int intval;     /* numeric value of d, or 0 if not a number */  struct sets_s *next;};typedef struct sets_s sets_t;/* alias.c supplies user-defined variables. We want certain of these   variables to be hard-wired. The hard-wired variables are defined in   the following structures. They usually correspond to elements of   the info structure (defined in nap.h). */struct hardwired_s {  const char *nm;       /* name of variable */  int type;             /* 1 for read-write, 2 for password (write-only).			 0 for comment-only. */  char **strp;          /* pointer to string value (if type=1/2) */  int *intp;            /* optional pointer to int value (type 0/1/2) */  const char *comment;  /* comment for this variable in config file */};typedef struct hardwired_s hardwired_t;char *ins(char *, char *, int, int);void prt(char **);unsigned char *dovars(unsigned char *);char **form_vtoks(char *, int *);unsigned char *doalias(alias_t *, char **, int);int savealiases(char *);int loadaliases(char *);int loadsets(const char *, WINDOW *, int, int);int savesets(const char *);void printsets(WINDOW *win);void addset(const char *, const char *);void chset(const char *, const char *);sets_t *findset(const char *);char *getval(const char *);char *getrealval(const char *);char *getval_t(const char *, int *);char *getval_t_r(const char *, int *, int);void delset(const char *);long nvar(const char *);long nvar_default(const char *nm, long deflt);char *strev(char *, unsigned char, unsigned char, char *(*)());char *cmp(char *);#endif

⌨️ 快捷键说明

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