/*\r
* Mesa 3-D graphics library\r
- * Version: 6.3\r
+ * Version: 6.5\r
*\r
- * Copyright (C) 2005 Brian Paul All Rights Reserved.\r
+ * Copyright (C) 2005-2006 Brian Paul All Rights Reserved.\r
*\r
* Permission is hereby granted, free of charge, to any person obtaining a\r
* copy of this software and associated documentation files (the "Software"),\r
* \author Michal Krol\r
*/\r
\r
-#include "imports.h" \r
-#include "slang_compile.h"\r
+#include "imports.h"\r
#include "grammar_mesa.h"\r
+#include "slang_utility.h"\r
+#include "slang_compile.h"\r
#include "slang_preprocess.h"\r
\r
static const char *slang_version_syn =\r
{\r
char buf[1024];\r
unsigned int pos;\r
- grammar_get_last_error (buf, 1024, &pos);\r
+ grammar_get_last_error ( (unsigned char*) buf, 1024, (int*) &pos);\r
slang_info_log_error (log, buf);\r
return 0;\r
}\r
{\r
char buf[1024];\r
unsigned int pos;\r
- grammar_get_last_error (buf, 1024, &pos);\r
+ grammar_get_last_error ( (unsigned char*) buf, 1024, (int*) &pos);\r
slang_info_log_error (log, buf);\r
grammar_destroy (id);\r
return 0;\r
\r
grammar_destroy (id);\r
\r
+ /* there can be multiple #version directives - grab the last one */\r
I = prod;\r
while (I < prod + size)\r
{\r
- *version = (unsigned int) I[0] + (unsigned int) I[1] * 100;\r
- *eaten = (unsigned int) I[2] + ((unsigned int) I[3] << 8) +\r
- ((unsigned int) I[4] << 16) + ((unsigned int) I[5] << 24);\r
+ *version =\r
+ (unsigned int) I[0] +\r
+ (unsigned int) I[1] * 100;\r
+ *eaten =\r
+ ((unsigned int) I[2]) +\r
+ ((unsigned int) I[3] << 8) +\r
+ ((unsigned int) I[4] << 16) +\r
+ ((unsigned int) I[5] << 24);\r
I += 6;\r
}\r
\r