diff src/pragma.c @ 143:0ee5f65bccf9

Added pragma to allow all undefined symbols to be considered external and also added a --pragma command line option
author lost
date Thu, 29 Jan 2009 01:32:11 +0000
parents 4b37f17624a7
children 006d737756fd
line wrap: on
line diff
--- a/src/pragma.c	Wed Jan 28 06:06:05 2009 +0000
+++ b/src/pragma.c	Thu Jan 29 01:32:11 2009 +0000
@@ -76,6 +76,10 @@
 		{
 			register_error(as, cl, 1, "Unrecognized pragma");
 		}
+		if (error == 2)
+		{
+			*optr = NULL;
+		}
 		return;
 	}
 	pragma[c] = 0;
@@ -87,11 +91,23 @@
 	{
 		as -> pragmas &= ~PRAGMA_NOINDEX0TONONE;
 	}
+	else if (!strcmp(pragma, "undefextern"))
+	{
+		as -> pragmas |= PRAGMA_UNDEFEXTERN;
+	}
+	else if (!strcmp(pragma, "noundefextern"))
+	{
+		as -> pragmas &= ~PRAGMA_UNDEFEXTERN;
+	}
 	else
 	{
 		if (error)
 		{
 			register_error(as, cl, 1, "Unrecognized pragma");
+			if (error == 2)
+			{
+				*optr = NULL;
+			}
 		}
 	}
 }