util.c File Reference

General utility functions. More...

#include "stdinc.h"
#include "util.h"
Include dependency graph for util.c:

Go to the source code of this file.

Functions

static char toxdigit (char val)
 Convert a numerical value to a hexadecimal character.
void hex_encode (unsigned char *bin, char *hex, size_t len)
 Convert a binary buffer to a hexadecimal string. The len parameter is the length of the binary buffer. The string will not be null terminated.
char * http_escape (const char *str, const char *prepend)
 Escape a string according to HTTP/1.1. A string can be prepended as well, which won't be escaped.
static void http_unescape (char *r, char *w)
 Unescape a string according to HTTP/1.1. The conversion will be performed in place. The arguments point to the read and write offsets. In almost all cases, they must point to the same string.
char * url_escape (const char *str)
 Escape an URL when needed. If it's a local filename, file:// will be prepended.
char * url_unescape (char *str)
 Unescape an URL to a local filename where possible (file://foo -> foo).

Detailed Description

General utility functions.

Definition in file util.c.

 All Data Structures Files Functions Variables Defines
Generated on Mon Mar 15 04:45:48 2010 for herrie by  doxygen 1.6.3