|
From: <set...@us...> - 2006-04-16 19:55:33
|
Revision: 1282 Author: sethdill Date: 2006-04-16 12:55:28 -0700 (Sun, 16 Apr 2006) ViewCVS: http://svn.sourceforge.net/frontierkernel/?rev=1282&view=rev Log Message: ----------- Wah. VC Express whined about the mac line endings, so I had to change them to Unix or Windows. I chose unix. Modified Paths: -------------- Frontier/branches/Conversant/Common/headers/conversantverbs.h Modified: Frontier/branches/Conversant/Common/headers/conversantverbs.h =================================================================== --- Frontier/branches/Conversant/Common/headers/conversantverbs.h 2006-04-16 19:51:02 UTC (rev 1281) +++ Frontier/branches/Conversant/Common/headers/conversantverbs.h 2006-04-16 19:55:28 UTC (rev 1282) @@ -1 +1,125 @@ -/****************************************************************************** Conversant Verbs Conversant-related verbs and functions for the Frontier Kernel Created by Seth Dillingham on 12/31/04. Copyright (C) 2004, 2005, 2006 Macrobyte Resources. 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 Place, Suite 330, Boston, MA 02111-1307 USA ******************************************************************************/ #ifndef conversantinclude #define conversantinclude #define conversanterrorlist 270 #define notimplementederror 1 #define STR_textname (BIGSTRING ("\x05" "\ttext")) #define STR_rezname (BIGSTRING ("\x09" "\trezdelim")) #define STR_macroname (BIGSTRING ("\x06" "\tmacro")) #define STR_paramname (BIGSTRING ("\x06" "\tparam")) #define STR_rezdelim (BIGSTRING ("\x01" "|")) #define STR_macro (BIGSTRING ("\x05" "macro")) #define STR_ifmacro (BIGSTRING ("\x02" "if")) #define STR_elseifmacro (BIGSTRING ("\x06" "elseif")) #define STR_elsemacro (BIGSTRING ("\x04" "else")) #define STR_endifmacro (BIGSTRING ("\x05" "endif")) #define STR_conditional (BIGSTRING ("\x0b" "conditional")) #define STR_endconditional (BIGSTRING ("\x0f" "end conditional")) #define STR_name (BIGSTRING ("\x04" "name")) #define STR_type (BIGSTRING ("\x04" "type")) #define STR_condblock (BIGSTRING ("\x10" "conditionalBlock")) #define STR_macrotype (BIGSTRING ("\x09" "macroType")) #define STR_parenthetical (BIGSTRING ("\x0d" "parenthetical")) #define STR_parameterless (BIGSTRING ("\x0d" "parameterless")) #define STR_attvaluepairs (BIGSTRING ("\x13" "attributeValuePairs")) #define STR_params (BIGSTRING ("\x06" "params")) #define STR_convcompileerror (BIGSTRING ("\x39" "Error compiling string (^0). Problem seems to be here: ^1")) #define STR_nearcharacteroffset (BIGSTRING ("\x16" " (Near character #^0.)")) #define STR_badcharinmacroname (BIGSTRING ("\x26" "Illegal character found in macro name.")) #define STR_badcharinparamname (BIGSTRING ("\x26" "Illegal character found in param name.")) #define STR_badcharunquoted (BIGSTRING ("\x29" "Illegal character found in unquoted param")) #define STR_seekingparamname (BIGSTRING ("\x19" "Searching for param name.")) #define STR_endfoundseekingparamname (BIGSTRING ("\x33" "Reached end of string while seeking parameter name.")) #define STR_missingequalsign (BIGSTRING ("\x14" "Missing equals sign.")) #define STR_badparametervalue (BIGSTRING ("\x4c" "Bad parameter value. Only macros, resources, and quoted strings are allowed.")) #define STR_illegalparamstart (BIGSTRING ("\x2f" "Illegal start of param value after equals sign.")) #define STR_endfoundprocmacro (BIGSTRING ("\x2d" "Reached end of string while processing macro.")) #define STR_endfoundquoteparam (BIGSTRING ("\x37" "Reached end of string while processing quoted parameter.")) #define STR_endfoundrezparam (BIGSTRING ("\x39" "Reached end of string while processing resource parameter.")) #define STR_missingcomma (BIGSTRING ("\x26" "Missing comma between parameter values")) #define STR_extracomma (BIGSTRING ("\x11" "Found extra comma")) typedef enum tyconversanttoken { /* verbs that are processed by conversantverbs.c */ compilestringfunc, cconversantverbs } tyconversanttoken; typedef enum tyconvitemtype { /* types that are found when looking for the next macro or resource */ CONV_NOTYPE, /* no macro or resource was found */ CONV_MACRO, /* macro was found */ CONV_RESOURCE, /* resource was found */ /* types of macros */ CONV_MACROTYPE_NOPARAM, /* regular macro */ CONV_MACROTYPE_COND_IF, /* if macro */ CONV_MACROTYPE_COND_ELSE, /* else macro */ CONV_MACROTYPE_COND_ELSEIF, /* elseif macro */ CONV_MACROTYPE_COND_ENDIF, /* endif macro */ CONV_MACROTYPE_AV, /* attribute-value pairs */ CONV_MACROTYPE_PAREN /* parenthetical macros */ } tyconvitemtype; typedef struct convaddress { /* name and table of an xml item */ long tblsize; hdlhashtable ht; bigstring bs; } convaddress, *ptrconvaddress; /* function declarations */ static void extractstringfromhandle( Handle, long, long, bigstring ); static boolean conv_addrezdelim( hdlhashtable ); static boolean conv_compilemacro( hdlhashtable *, Handle, long *, long, long * ); #endif /* conversantinclude */ \ No newline at end of file +/****************************************************************************** + + Conversant Verbs + + Conversant-related verbs and functions for the Frontier Kernel + + Created by Seth Dillingham on 12/31/04. + + Copyright (C) 2004, 2005, 2006 Macrobyte Resources. + + 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 Place, Suite 330, Boston, MA 02111-1307 USA + +******************************************************************************/ + +#ifndef conversantinclude +#define conversantinclude + +#define conversanterrorlist 270 +#define notimplementederror 1 + +#define STR_textname (BIGSTRING ("\x05" "\ttext")) +#define STR_rezname (BIGSTRING ("\x09" "\trezdelim")) +#define STR_macroname (BIGSTRING ("\x06" "\tmacro")) +#define STR_paramname (BIGSTRING ("\x06" "\tparam")) + +#define STR_rezdelim (BIGSTRING ("\x01" "|")) +#define STR_macro (BIGSTRING ("\x05" "macro")) +#define STR_ifmacro (BIGSTRING ("\x02" "if")) +#define STR_elseifmacro (BIGSTRING ("\x06" "elseif")) +#define STR_elsemacro (BIGSTRING ("\x04" "else")) +#define STR_endifmacro (BIGSTRING ("\x05" "endif")) +#define STR_conditional (BIGSTRING ("\x0b" "conditional")) +#define STR_endconditional (BIGSTRING ("\x0f" "end conditional")) + +#define STR_name (BIGSTRING ("\x04" "name")) +#define STR_type (BIGSTRING ("\x04" "type")) +#define STR_condblock (BIGSTRING ("\x10" "conditionalBlock")) +#define STR_macrotype (BIGSTRING ("\x09" "macroType")) +#define STR_parenthetical (BIGSTRING ("\x0d" "parenthetical")) +#define STR_parameterless (BIGSTRING ("\x0d" "parameterless")) +#define STR_attvaluepairs (BIGSTRING ("\x13" "attributeValuePairs")) + +#define STR_params (BIGSTRING ("\x06" "params")) + +#define STR_convcompileerror (BIGSTRING ("\x39" "Error compiling string (^0). Problem seems to be here: ^1")) +#define STR_nearcharacteroffset (BIGSTRING ("\x16" " (Near character #^0.)")) +#define STR_badcharinmacroname (BIGSTRING ("\x26" "Illegal character found in macro name.")) +#define STR_badcharinparamname (BIGSTRING ("\x26" "Illegal character found in param name.")) +#define STR_badcharunquoted (BIGSTRING ("\x29" "Illegal character found in unquoted param")) +#define STR_seekingparamname (BIGSTRING ("\x19" "Searching for param name.")) +#define STR_endfoundseekingparamname (BIGSTRING ("\x33" "Reached end of string while seeking parameter name.")) +#define STR_missingequalsign (BIGSTRING ("\x14" "Missing equals sign.")) +#define STR_badparametervalue (BIGSTRING ("\x4c" "Bad parameter value. Only macros, resources, and quoted strings are allowed.")) +#define STR_illegalparamstart (BIGSTRING ("\x2f" "Illegal start of param value after equals sign.")) +#define STR_endfoundprocmacro (BIGSTRING ("\x2d" "Reached end of string while processing macro.")) +#define STR_endfoundquoteparam (BIGSTRING ("\x37" "Reached end of string while processing quoted parameter.")) +#define STR_endfoundrezparam (BIGSTRING ("\x39" "Reached end of string while processing resource parameter.")) +#define STR_missingcomma (BIGSTRING ("\x26" "Missing comma between parameter values")) +#define STR_extracomma (BIGSTRING ("\x11" "Found extra comma")) + +typedef enum tyconversanttoken { /* verbs that are processed by conversantverbs.c */ + + compilestringfunc, + + cconversantverbs + +} tyconversanttoken; + + +typedef enum tyconvitemtype { /* types that are found when looking for the next macro or resource */ + + CONV_NOTYPE, /* no macro or resource was found */ + + CONV_MACRO, /* macro was found */ + + CONV_RESOURCE, /* resource was found */ + + /* types of macros */ + + CONV_MACROTYPE_NOPARAM, /* regular macro */ + + CONV_MACROTYPE_COND_IF, /* if macro */ + + CONV_MACROTYPE_COND_ELSE, /* else macro */ + + CONV_MACROTYPE_COND_ELSEIF, /* elseif macro */ + + CONV_MACROTYPE_COND_ENDIF, /* endif macro */ + + CONV_MACROTYPE_AV, /* attribute-value pairs */ + + CONV_MACROTYPE_PAREN /* parenthetical macros */ + +} tyconvitemtype; + + +typedef struct convaddress { /* name and table of an xml item */ + + long tblsize; + + hdlhashtable ht; + + bigstring bs; + +} convaddress, *ptrconvaddress; + + +/* function declarations */ +static void extractstringfromhandle( const Handle, const long, const long, bigstring ); +static boolean conv_addrezdelim( hdlhashtable ); +static boolean conv_compilemacro( hdlhashtable *, const Handle, long *, const long, long * ); + +#endif /* conversantinclude */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |