File:  [parser3project] / parser3 / src / include / pa_globals.h
Revision 1.120: download - view: text, annotated - select for diffs - revision graph
Mon Nov 4 03:53:25 2024 UTC (20 months, 1 week ago) by moko
Branches: MAIN
CVS tags: release_3_5_1, release_3_5_0, HEAD
Copyright year updated

/** @file
	Parser: global decls.

	Copyright (c) 2001-2024 Art. Lebedev Studio (http://www.artlebedev.com)
	Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru>
*/

#ifndef PA_GLOBALS_H
#define PA_GLOBALS_H

#define IDENT_PA_GLOBALS_H "$Id: pa_globals.h,v 1.120 2024/11/04 03:53:25 moko Exp $"

#ifdef XML
#	include "libxml/tree.h"
#endif

class Request;

/// initialize global variables
void pa_globals_init();

/// finalize global variables
void pa_globals_done();

/// for lt_dlinit to be called once
void pa_dlinit();

/// hex_value[c] = hex value of c
extern short hex_value[0x100];

#ifdef XML
/// flag whether there were some xml generic errors on current thread
bool xmlHaveGenericErrors();
/// get xml generic error accumulated for current thread. WARNING: it is up to caller to free up
const char* xmlGenericErrors();
#endif

/// register request for local thread to retrive later with pa_get_request()
void pa_register_thread_request(Request&);
/// retrives request set by pa_set_request function, useful in contextless places [slow]
Request& pa_thread_request();

#endif

E-mail: