rev 357 - in trunk: include/prothon src

SVN User <[email protected]>
Newsgroups gmane.comp.lang.prothon.cvs
Message-ID <[email protected]>
Author: mark
Date: 2004-04-14 22:23:11 -0400 (Wed, 14 Apr 2004)
New Revision: 357

Removed:
   trunk/include/prothon/pr_arg.h
Modified:
   trunk/src/src.vcproj
Log:
added customized apr code to prothon src, still untested

Deleted: trunk/include/prothon/pr_arg.h
===================================================================
--- trunk/include/prothon/pr_arg.h	2004-04-15 01:39:21 UTC (rev 356)
+++ trunk/include/prothon/pr_arg.h	2004-04-15 02:23:11 UTC (rev 357)
@@ -1,49 +0,0 @@
-
-
-// pr_arg.h
-
-// this is used to pass a variable arg list from Prothon to apr_pr_vformatter
-// routine in apr_snprintf.c.  apr_pr_vformatter is a Prothon custom version
-// of apr_vformatter that uses a pr_arg_t list instead of a va_list.
-// a pr_arg_t list includes type information so that a type mismatch will
-// cause an exception instead of a crash.
-
-#ifndef PR_ARG_H
-#define PR_ARG_H
-
-typedef enum {
-	ARG_TYPE_END = 0,
-	ARG_TYPE_INT,
-	ARG_TYPE_FLOAT,
-	ARG_TYPE_STRING,
-	ARG_TYPE_ERROR,
-} arg_type_t;
-
-typedef union {
-	__int64		i64;
-	double		f64;
-	char*		str;
-} arg_arg_t;
-
-typedef struct {
-	arg_arg_t		arg;
-	arg_type_t		type;
-} pr_arg_t;
-
-typedef pr_arg_t* pr_arg_p;
-
-#define pr_arg_err       (ap[0].type  = ARG_TYPE_ERROR)
-#define if_prerr_rtrn  if(ap[0].type == ARG_TYPE_ERROR) return -99
-
-#define pr_arg_start(ap)	int _pr_arg_ind = 0;
-
-#define pr_arg_int(ap)    \
-	((ap)[_pr_arg_ind].type == ARG_TYPE_INT    ? ap[_pr_arg_ind++].arg.i64 : (pr_arg_err,   0) )
-#define pr_arg_float(ap)  \
-	((ap)[_pr_arg_ind].type == ARG_TYPE_FLOAT  ? ap[_pr_arg_ind++].arg.f64 : (pr_arg_err, 0.0) )
-#define pr_arg_string(ap) \
-	((ap)[_pr_arg_ind].type == ARG_TYPE_STRING ? ap[_pr_arg_ind++].arg.str : (pr_arg_err,  "") )
-
-#define pr_arg_end(ap)		((ap)[_pr_arg_ind].type == ARG_TYPE_END)
-
-#endif // #ifndef PR_ARG_H
\ No newline at end of file

Modified: trunk/src/src.vcproj
===================================================================
--- trunk/src/src.vcproj	2004-04-15 01:39:21 UTC (rev 356)
+++ trunk/src/src.vcproj	2004-04-15 02:23:11 UTC (rev 357)
@@ -188,6 +188,9 @@
 				RelativePath=".\parser_routines.c">
 			</File>
 			<File
+				RelativePath=".\pr_snprintf.c">
+			</File>
+			<File
 				RelativePath=".\prmalloc.c">
 			</File>
 			<File
@@ -228,7 +231,7 @@
 				RelativePath="parser.h">
 			</File>
 			<File
-				RelativePath="..\include\prothon\pr_arg.h">
+				RelativePath=".\pr_arg.h">
 			</File>
 			<File
 				RelativePath=".\prlist.h">
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.