1.1 --- a/plugins/include/textparse.inc Mon Feb 12 08:28:35 2007 +0000
1.2 +++ b/plugins/include/textparse.inc Mon Feb 12 09:00:55 2007 +0000
1.3 @@ -1,4 +1,5 @@
1.4 /**
1.5 + * vim: set ts=4 :
1.6 * ===============================================================
1.7 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
1.8 * ===============================================================
1.9 @@ -26,25 +27,25 @@
1.10
1.11 enum SMCResult
1.12 {
1.13 - SMCParse_Continue, //continue parsing
1.14 - SMCParse_Halt, //stop parsing here
1.15 - SMCParse_HaltFail //stop parsing and return failure
1.16 + SMCParse_Continue, /**< Continue parsing */
1.17 + SMCParse_Halt, /**< Stop parsing here */
1.18 + SMCParse_HaltFail /**< Stop parsing and return failure */
1.19 };
1.20
1.21 enum SMCError
1.22 {
1.23 - SMCError_Okay = 0, //no error
1.24 - SMCError_StreamOpen, //stream failed to open
1.25 - SMCError_StreamError, //the stream died... somehow
1.26 - SMCError_Custom, //a custom handler threw an error
1.27 - SMCError_InvalidSection1, //a section was declared without quotes, and had extra tokens
1.28 - SMCError_InvalidSection2, //a section was declared without any header
1.29 - SMCError_InvalidSection3, //a section ending was declared with too many unknown tokens
1.30 - SMCError_InvalidSection4, //a section ending has no matching beginning
1.31 - SMCError_InvalidSection5, //a section beginning has no matching ending
1.32 - SMCError_InvalidTokens, //there were too many unidentifiable strings on one line
1.33 - SMCError_TokenOverflow, //the token buffer overflowed
1.34 - SMCError_InvalidProperty1, //a property was declared outside of any section
1.35 + SMCError_Okay = 0, /**< No error */
1.36 + SMCError_StreamOpen, /**< Stream failed to open */
1.37 + SMCError_StreamError, /**< The stream died... somehow */
1.38 + SMCError_Custom, /**< A custom handler threw an error */
1.39 + SMCError_InvalidSection1, /**< A section was declared without quotes, and had extra tokens */
1.40 + SMCError_InvalidSection2, /**< A section was declared without any header */
1.41 + SMCError_InvalidSection3, /**< A section ending was declared with too many unknown tokens */
1.42 + SMCError_InvalidSection4, /**< A section ending has no matching beginning */
1.43 + SMCError_InvalidSection5, /**< A section beginning has no matching ending */
1.44 + SMCError_InvalidTokens, /**< There were too many unidentifiable strings on one line */
1.45 + SMCError_TokenOverflow, /**< The token buffer overflowed */
1.46 + SMCError_InvalidProperty1, /**< A property was declared outside of any section */
1.47 };
1.48
1.49 /**
1.50 @@ -57,12 +58,12 @@
1.51 /**
1.52 * Parses an SMC file.
1.53 *
1.54 - * @param smc A Handle to an SMC Parse structure.
1.55 - * @param file A string containing the file path.
1.56 - * @param line An optional by reference cell to store the last line number read.
1.57 - * @param col An optional by reference cell to store the last column number read.
1.58 - * @return An SMCParseError result.
1.59 - * @error Invalid or corrupt Handle.
1.60 + * @param smc A Handle to an SMC Parse structure.
1.61 + * @param file A string containing the file path.
1.62 + * @param line An optional by reference cell to store the last line number read.
1.63 + * @param col An optional by reference cell to store the last column number read.
1.64 + * @return An SMCParseError result.
1.65 + * @error Invalid or corrupt Handle.
1.66 */
1.67 native SMCError:SMC_ParseFile(Handle:smc, const String:file[], &line=0, &col=0);
1.68
1.69 @@ -71,10 +72,10 @@
1.70 * @note SMCError_Okay returns false.
1.71 * @note SMCError_Custom (which is thrown on SMCParse_HaltFail) returns false.
1.72 *
1.73 - * @param error The SMCParseError code.
1.74 - * @param buffer A string buffer for the error (contents undefined on failure).
1.75 - * @param buf_max The maximum size of the buffer.
1.76 - * @return True on success, false otherwise.
1.77 + * @param error The SMCParseError code.
1.78 + * @param buffer A string buffer for the error (contents undefined on failure).
1.79 + * @param buf_max The maximum size of the buffer.
1.80 + * @return True on success, false otherwise.
1.81 */
1.82 native bool:SMC_GetErrorString(SMCError:error, String:buffer[], buf_max);
1.83
1.84 @@ -89,10 +90,10 @@
1.85 /**
1.86 * Sets the SMC_ParseStart function of a parse Handle.
1.87 *
1.88 - * @param smc Handle to an SMC Parse.
1.89 - * @param func SMC_ParseStart function.
1.90 + * @param smc Handle to an SMC Parse.
1.91 + * @param func SMC_ParseStart function.
1.92 * @noreturn
1.93 - * @error Invalid or corrupt Handle.
1.94 + * @error Invalid or corrupt Handle.
1.95 */
1.96 native SMC_SetParseStart(Handle:smc, SMC_ParseStart:func);
1.97
1.98 @@ -100,8 +101,8 @@
1.99 * Called when parsing is halted.
1.100 *
1.101 * @param smc The SMC Parse Handle.
1.102 - * @param halted True if abnormally halted, false otherwise.
1.103 - * @param failed True if parsing failed, false otherwise.
1.104 + * @param halted True if abnormally halted, false otherwise.
1.105 + * @param failed True if parsing failed, false otherwise.
1.106 * @noreturn
1.107 */
1.108 functag SMC_ParseEnd public(Handle:smc, bool:halted, bool:failed);
1.109 @@ -109,10 +110,10 @@
1.110 /**
1.111 * Sets the SMC_ParseEnd of a parse handle.
1.112 *
1.113 - * @param smc Handle to an SMC Parse.
1.114 - * @param func SMC_ParseEnd function.
1.115 + * @param smc Handle to an SMC Parse.
1.116 + * @param func SMC_ParseEnd function.
1.117 * @noreturn
1.118 - * @error Invalid or corrupt Handle.
1.119 + * @error Invalid or corrupt Handle.
1.120 */
1.121 native SMC_SetParseEnd(Handle:smc, SMC_ParseEnd:func);
1.122
1.123 @@ -172,8 +173,8 @@
1.124 /**
1.125 * Sets a raw line reader on an SMC parser Handle.
1.126 *
1.127 - * @param smc Handle to an SMC Parse.
1.128 - * @param func SMC_RawLine function.
1.129 + * @param smc Handle to an SMC Parse.
1.130 + * @param func SMC_RawLine function.
1.131 * @noreturn
1.132 */
1.133 native SMC_SetRawLine(Handle:smc, SMC_RawLine:func);