From 044ad7c3987460ede48ff27afd6bdb0ca05a0432 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 4 Jul 2011 20:52:54 +0200 Subject: import at91lib from at91lib_20100901_softpack_1_9_v_1_0_svn_v15011 it's sad to see that atmel doesn't publish their svn repo or has a centralized location or even puts proper version/release info into the library itself --- .../pc-tools/CreateDemoBin/include/ScriptParse.h | 103 +++++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 utility/demo-fw/pc-tools/CreateDemoBin/include/ScriptParse.h (limited to 'utility/demo-fw/pc-tools/CreateDemoBin/include/ScriptParse.h') diff --git a/utility/demo-fw/pc-tools/CreateDemoBin/include/ScriptParse.h b/utility/demo-fw/pc-tools/CreateDemoBin/include/ScriptParse.h new file mode 100644 index 0000000..05621de --- /dev/null +++ b/utility/demo-fw/pc-tools/CreateDemoBin/include/ScriptParse.h @@ -0,0 +1,103 @@ +/* + * ScriptParse.h + * + * Created on: 2009-3-15 + * Author: Tony.Liu + */ + +#ifndef SCRIPTPARSE_H_ +#define SCRIPTPARSE_H_ + +//compile all pattern +bool CompileAllPtn(); + +//free all regex objects +void FreeAllRegex(); + +//is a space line? +bool IsSpaceLine(const char *string); + +//match slide count line and return the count +bool GetSlideCount( const char *string, unsigned int *slidenum); + +//check slide size line is correct +bool IsSlideSizeString(const char *string); + +//match slide width line and return the width +bool GetSlideWidth( const char *string, unsigned int *slidewidth); + +//match slide height line and return the height +bool GetSlideHeight( const char *string, unsigned int *slideheight); + +//Is Display Box section starting? +bool IsDispBoxSectionStart(const char *string); + +//match link top line and return link top position +bool GetDispBoxTop(const char *string, unsigned int *top); + +//match link left line and return link left position +bool GetDispBoxLeft(const char *string, unsigned int *left); + +//match link width line and return width value +bool GetDispBoxWidth(const char *string, unsigned int *width); + +//match link width line and return width value +bool GetDispBoxHeight(const char *string, unsigned int *height); + +//match hyperlink line and return link count +bool GetLinkCount(const char *string, unsigned int *linkcnt); + +//match link address line and return the address +bool GetLinkAddr(const char *string, char *link); + +//match link top line and return link top position +bool GetLinkTop(const char *string, unsigned int *top); + +//match link left line and return link left position +bool GetLinkLeft(const char *string, unsigned int *left); + +//match link width line and return width value +bool GetLinkWidth(const char *string, unsigned int *width); + +//match link width line and return width value +bool GetLinkHeight(const char *string, unsigned int *height); + +//Parse slide section of script +//Parse slide section of script +bool ParseSlideSection(const char *string, \ + unsigned int *slideindex, \ + unsigned int *slidewidth, \ + unsigned int *slideheight); + +//Parse hyperlink section of script +bool ParseLinkSection(const char *string, \ + unsigned int *linkindex, \ + char *linkstr, \ + unsigned int *linktop, \ + unsigned int *linkleft, \ + unsigned int *linkwidth, \ + unsigned int *linkheight); + +//Parse display box section of script +bool ParseDispBoxSection(const char *string, \ + unsigned int *disptop, \ + unsigned int *displeft, \ + unsigned int *dispwidth, \ + unsigned int *dispheight); + +//Parse slide properties section of script +bool ParsePropertiesSection(const char *string, \ + char *pOnInitCmds, \ + char *pOnRefreshCmds, \ + char *pOnCloseCmds); + +//Is slide section starting? +bool IsSlideSectionStart(const char *string); + +//Is hyperlink section starting? +bool IsLinkSectionStart(const char *string); + +//Is slide properties section starting? +bool IsPropertiesSectionStart(const char *string); + +#endif /* SCRIPTPARSE_H_ */ -- cgit v1.2.3