Annotation of libwww/Library/src/HTWWWStr.html, revision 2.1

2.1     ! frystyk     1: <HTML>
        !             2: <HEAD>
        !             3: <TITLE>String Handling</TITLE>
        !             4: <!-- Changed by: Henrik Frystyk Nielsen,  2-Nov-1995 -->
        !             5: </HEAD>
        !             6: <BODY>
        !             7: 
        !             8: <H1>WWW Related String Management</H1>
        !             9: 
        !            10: <PRE>
        !            11: /*
        !            12: **     (c) COPYRIGHT MIT 1995.
        !            13: **     Please first read the full copyright statement in the file COPYRIGH.
        !            14: */
        !            15: </PRE>
        !            16: 
        !            17: This module is like the <A HREF="HTString.html">generic string utility
        !            18: module</A> but it contains more Web related string utility functions.
        !            19: 
        !            20: This module is implemented by <A HREF="HTWWWStr.c">HTWWWStr.c</A>, and
        !            21: it is a part of the <A HREF="http://www.w3.org/pub/WWW/Library/"> W3C
        !            22: Reference Library</A>. <P>
        !            23: 
        !            24: <PRE>
        !            25: #ifndef HTWWWSTR_H
        !            26: #define HTWWWSTR_H
        !            27: </PRE>
        !            28: 
        !            29: <H2>Next word or quoted string</H2>
        !            30: 
        !            31: This function returns a RFC822 word separated by space, comma, or
        !            32: semi-colons. <CODE>pstr</CODE> points to a string containing a word
        !            33: separated by white white space "," ";" or "=". The word can optionally
        !            34: be quoted using <"> or "<" ">" Comments surrrounded by '(' ')' are
        !            35: filtered out. On exit, <CODE>pstr</CODE> has been moved to the first
        !            36: delimiter past the field THE STRING HAS BEEN MUTILATED by a 0
        !            37: terminator.  The function returns a pointer to the first word or NULL
        !            38: on error
        !            39: 
        !            40: <PRE>
        !            41: extern char * HTNextField (char** pstr);
        !            42: </PRE>
        !            43: 
        !            44: <H2>RFC1123 Date/Time Stamp String</H2>
        !            45: 
        !            46: Returns a pointer to a static area!
        !            47: 
        !            48: <PRE>
        !            49: extern CONST char *HTDateTimeStr (time_t *calendar, BOOL local);
        !            50: </PRE>
        !            51: 
        !            52: <H2>Date used for directory listings</H2>
        !            53: 
        !            54: <PRE>
        !            55: extern BOOL HTDateDirStr (time_t * time, char * str, int len);
        !            56: </PRE>
        !            57: 
        !            58: <H2>Timezone Offset</H2>
        !            59: 
        !            60: Calculates the offset from GMT in seconds. This is called from <A
        !            61: HREF="HTReq.html#Library">HTLibInit()</A>.
        !            62: 
        !            63: <PRE>
        !            64: extern long HTGetTimeZoneOffset (void);
        !            65: </PRE>
        !            66: 
        !            67: <H2>Parse a Date/Time String</H2>
        !            68: 
        !            69: Converts a string representation in GMT to a local representation of
        !            70: localtime <CODE>time_t</CODE>.
        !            71: 
        !            72: <PRE>
        !            73: extern time_t HTParseTime (CONST char * str);
        !            74: </PRE>
        !            75: 
        !            76: 
        !            77: <H2>Unique Message-ID String</H2>
        !            78: 
        !            79: <PRE>
        !            80: extern CONST char *HTMessageIdStr (void);
        !            81: </PRE>
        !            82: 
        !            83: <H2>Converts an Integer to a String using Prefix</H2>
        !            84: 
        !            85: In computer-world 1K is 1024 bytes and 1M is 1024K -- however,
        !            86: sprintf() still formats in base-10.  Therefore I output only until
        !            87: 999, and then start using the next unit.  This doesn't work wrong,
        !            88: it's just a feature.  The conversion is done in "str" which must be
        !            89: large enough to contain the result.
        !            90: 
        !            91: <PRE>
        !            92: extern void HTNumToStr (unsigned long n, char *str, int len);
        !            93: </PRE>
        !            94: 
        !            95: <H2>Conversion between URLs and Local File Names</H2>
        !            96: 
        !            97: These are two functions that separate the URL naming syntax from
        !            98: platform dependent file naming schemes. If you are porting the code to
        !            99: a new platform, you probably have to do some translation here.
        !           100: 
        !           101: <H3>Convert file URLs into a local representation</H3>
        !           102: 
        !           103: The URL has already been translated through the rules in get_physical
        !           104: in HTAccess.c and all we need to do now is to map the path to a local
        !           105: representation, for example if must translate '/' to the ones that
        !           106: turn the wrong way ;-) Returns local file (that must be freed by
        !           107: caller) if OK, else NULL.
        !           108: 
        !           109: <PRE>
        !           110: extern char * HTWWWToLocal (CONST char * url, CONST char * base);
        !           111: </PRE>
        !           112: 
        !           113: <H3>Convert a local file name into a URL</H3>
        !           114: 
        !           115: Generates a WWW URL name from a local file name or NULL if error.
        !           116: Returns URL (that must be freed by caller) if OK, else NULL.
        !           117: 
        !           118: <PRE>
        !           119: extern char * HTLocalToWWW (CONST char * local);
        !           120: </PRE>
        !           121: 
        !           122: <PRE>
        !           123: #endif
        !           124: </PRE>
        !           125: 
        !           126: End of declaration module
        !           127: 
        !           128: </BODY>
        !           129: </HTML>

Webmaster