Logo Search packages:      
Sourcecode: parser version File versions  Download package

pa_common.C File Reference

Detailed Description

Parser: commonly functions.

Copyright(c) 2001-2005 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)

BASE64 part Authors: Michael Zucchi <notzed@ximian.com> Jeffrey Stedfast <fejj@ximian.com>

Copyright 2000-2004 Ximian, Inc. (www.ximian.com)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.

Definition in file pa_common.C.

#include "pa_common.h"
#include "pa_exception.h"
#include "pa_hash.h"
#include "pa_globals.h"
#include "pa_charsets.h"
#include "pa_http.h"
#include "pa_request_charsets.h"
#include "pcre.h"

Go to the source code of this file.


struct  File_read_action_info
struct  File_write_action_info


#define _O_BINARY   0
#define _O_TEXT   0
#define FILE_STATUS_NAME   "status"


enum  EscapeState { EscapeRest, EscapeFirst, EscapeSecond, EscapeUnicode }
enum  FormatType { FormatInvalid, FormatInt, FormatUInt, FormatDouble }


int __snprintf (char *b, size_t s, const char *f,...)
int __vsnprintf (char *b, size_t s, const char *f, va_list l)
 must be last in this file
void create_dir_for_file (const String &file_spec)
Charsetdetect_charset (Charset &source_charset, const String &content_type)
Charsetdetect_charset (const char *content_type)
bool dir_exists (const String &file_spec)
bool entry_exists (const String &file_spec)
bool entry_exists (const char *fname, struct stat *afinfo)
static bool entry_readable (const String &file_spec, bool need_dir)
static void file_base64_file_action (struct stat &finfo, int f, const String &, const char *, bool, void *context)
int file_block_read (const int f, unsigned char *buffer, const size_t size)
static void file_crc32_file_action (struct stat &finfo, int f, const String &, const char *, bool, void *context)
bool file_delete (const String &file_spec, bool fail_on_problem)
bool file_executable (const String &file_spec)
const Stringfile_exist (const String &path, const String &name)
bool file_exist (const String &file_spec)
void file_move (const String &old_spec, const String &new_spec)
File_read_result file_read (Request_charsets &charsets, const String &file_spec, bool as_text, HashStringValue *params, bool fail_on_read_problem, char *buf, size_t offset, size_t count, bool transcode_text_result)
static void file_read_action (struct stat &finfo, int f, const String &file_spec, const char *, bool as_text, void *context)
bool file_read_action_under_lock (const String &file_spec, const char *action_name, File_read_action action, void *context, bool as_text, bool fail_on_read_problem)
char * file_read_text (Request_charsets &charsets, const String &file_spec, bool fail_on_read_problem, HashStringValue *params, bool transcode_result)
bool file_stat (const String &file_spec, size_t &rsize, time_t &ratime, time_t &rmtime, time_t &rctime, bool fail_on_read_problem)
void file_write (const String &file_spec, const char *data, size_t size, bool as_text, bool do_append)
static void file_write_action (int f, void *context)
bool file_write_action_under_lock (const String &file_spec, const char *action_name, File_write_action action, void *context, bool as_text, bool do_append, bool do_block, bool fail_on_lock_problem)
void fix_line_breaks (char *str, size_t &length)
const char * format (double value, char *fmt)
FormatType format_type (char *fmt)
size_t g_mime_utils_base64_decode_step (const unsigned char *in, size_t inlen, unsigned char *out, int *state, int *save)
static size_t g_mime_utils_base64_encode_close (const unsigned char *in, size_t inlen, unsigned char *out, int *state, int *save)
static size_t g_mime_utils_base64_encode_step (const unsigned char *in, size_t inlen, unsigned char *out, int *state, int *save)
int getMonthDays (int year, int month)
char * getrow (char **row_ref, char delim)
static bool isLeap (int year)
char * lsplit (char **string_ref, char delim)
char * lsplit (char *string, char delim)
void pa_base64_decode (const char *in, size_t in_size, char *&result, size_t &result_size)
char * pa_base64_encode (const String &file_spec)
char * pa_base64_encode (const char *in, size_t in_size)
const unsigned long pa_crc32 (const String &file_spec)
const unsigned long pa_crc32 (const char *in, size_t in_size)
int pa_get_valid_file_options_count (HashStringValue &options)
 these options were handled but not checked elsewhere, now check them
char * print_pcre_exec_error_text (int exec_result)
int remove_crlf (char *start, char *end)
static void rmdir (const String &file_spec, size_t pos_after)
char * rsplit (char *string, char delim)
size_t stdout_write (const void *buf, size_t size)
size_t strpos (const char *str, const char *substr)
bool StrStartFromNC (const char *str, const char *substr, bool equal)
char * unescape_chars (const char *cp, int len, Charset *charset, bool ignore_plus)


static char * base64_alphabet
const String file_status_name (FILE_STATUS_NAME)
static unsigned char gmime_base64_rank [256]
static const char *const IDENT_COMMON_C = "$Date: 2008-09-04 09:37:00 $"

Generated by  Doxygen 1.6.0   Back to index