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

📄 htescape.h

📁 www工具包. 这是W3C官方支持的www支撑库. 其中提供通用目的的客户端的WebAPI: complete HTTP/1.1 (with caching, pipelining, PUT, POS
💻 H
字号:
/*  					W3C Sample Code Library libwww URIs!  Escape and Unescape Illegal Characters in URIs!*//***	(c) COPYRIGHT MIT 1995.**	Please first read the full copyright statement in the file COPYRIGH.*//*URLs are written only with the graphic printable characters of the US-ASCIIcoded character set. All other characters must be escaped before they canbe used in URLs. This module defines the methods required for escaping andunescaping the URLs. Internally in the Library, all URLs are escaped so thatwe never see illegal characters in the URL handled by the Library. We onlyunescape the URLs when we have to, for example while taking to the localfile system etc.This module is implemented by HTEscape.c, and itis a part of the  W3C Sample CodeLibrary.*/#ifndef HTESCAPE_H#define HTESCAPE_H/*.  Encode Unacceptable Characters using %xy.This function takes a string containing any sequence of ASCII characters,and returns a malloced string containing the same infromation but with all"unacceptable" characters represented in the form %xy wherex and y are two hex digits.*/typedef enum _HTURIEncoding {    URL_XALPHAS		= 0x1,     /* Escape all unsafe characters */    URL_XPALPHAS	= 0x2,     /* As URL_XALPHAS but allows '+' */    URL_PATH		= 0x4,     /* As URL_XPALPHAS but allows '/' */    URL_DOSFILE         = 0x8      /* As URL_URLPATH but allows ':' */} HTURIEncoding;extern char * HTEscape (const char * str, HTURIEncoding mask);/*.  Convert a single Character from Ascii Hex to Char.*/extern char HTAsciiHexToChar (char c);/*.  Decode %xy Escaped Characters.This function takes a pointer to a string in which character smay have beenencoded in %xy form, where xy is the acsii hexcode for character 16x+y. The string is converted in place, as it will nevergrow.*/extern char * HTUnEscape (char * str);/**/#endif	/* HTESCAPE_H *//*    @(#) $Id: HTEscape.html,v 2.17 1998/05/24 23:03:13 frystyk Exp $*/

⌨️ 快捷键说明

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