1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
|
#ifndef http11_h
#define http11_h
/*
** Copyright 1998 - 2003 Double Precision, Inc.
** See COPYING for distribution information.
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
#if HAVE_LIBFCGI
#include <stdlib.h>
#include "fcgi_stdio.h"
#endif
/* HTTP 1.1 library */
/* Implement Accept-Language: and Content-Language: headers as follows.
**
** libdir contains one subdirectory for each support content language.
**
** softlinks are used to provide default variations of each content.
** (example: en -> en-us )
**
** subdirectory/LANGUAGE is a file with one line, containing the name of
** the directory. So, we can open en/LANGUAGE, read en-us, and send that
** back as the Content-Language:
**
** subdirectory/LOCALE is a file with one line - the corresponding locale.
** en-us/LOCALE will contain en_US, for example.
**
*/
char *http11_best_content_language(const char *libdir, const char *acc_lang);
/* acc_lang is our Accept-Language: header. Figure out the best
** content language we can use.
**
** Note - return pointer must be free()d.
*/
const char *http11_content_language(const char *libdir, const char *cont_lang);
/* Return the real content language by reading LANGUAGE */
const char *http11_content_locale(const char *libdir, const char *cont_lang);
/* Return the LOCALE */
const char *http11_content_ispelldict(const char *libdir, const char *cont_lang);
/* Return the ISPELL dictionary */
const char *http11_content_charset(const char *libdir, const char *acc_lang);
/* Return the CHARSET */
FILE *http11_open_langfile(const char *libdir, const char *acc_lang,
const char *file);
/* Open arbitrary file */
#define HTTP11_DEFAULTLANG "en"
#ifdef __cplusplus
}
#endif
#endif
|