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

📄 parse.h

📁 LINUX下的收发E-MAIL的程序
💻 H
字号:
#ifndef __PARSE_H__
#define __PARSE_H__

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#undef MIN
#undef MAX
#include <stdio.h>
#include <string.h>
#include "mime.h" 
#include "pop3io.h"
#include "util.h"
typedef enum { no_arg, required_arg, optional_arg } golarg_t;
typedef struct {
   const char *name;
   golarg_t has_arg;
   int val;
} longopts_t;

char *strstrcase(char *haystack, char *needle);

#define insert_string(a, b, c)   strninsert((a), (b), (c), sizeof(a))
void strninsert (char *string, char *insertstr, unsigned int pos, size_t strmax);
#define remove_string(a, b, c)   strcut((a), (b), (c))
void strcut(char *line, unsigned int index, unsigned int numchars);

int replace_string(char *line, char *remove, char *replace);

void trim_leadspc (char *string);

void trim_tailspc (char *string);

void trim_whtspc (char *string);

void strip(char *string, char c);

unsigned int get_num_fields(char *string, char delim);

char *get_field(char *string, unsigned int field, char delim);

int parse_8bit(char *text);

char *make_8bit(unsigned char *text);

char *word_wrap(char *text, unsigned int len);

char *quote_body (char *body, char *rcpt, char *date);

#ifdef __cplusplus
}
#endif 

#endif

⌨️ 快捷键说明

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