From 19fb77ee7b02782b383f5ffe30854d0b36dc845e Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Fri, 22 Apr 2005 10:28:53 +0000 Subject: Cosmetic changes. --- src/mesa/shader/slang/slang_preprocess.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c index 7159db7e1e2..b1f62ded3da 100644 --- a/src/mesa/shader/slang/slang_preprocess.c +++ b/src/mesa/shader/slang/slang_preprocess.c @@ -28,9 +28,9 @@ * \author Michal Krol */ -#include "imports.h" -#include "slang_compile.h" +#include "imports.h" #include "grammar_mesa.h" +#include "slang_compile.h" #include "slang_preprocess.h" static const char *slang_version_syn = @@ -66,12 +66,18 @@ int _slang_preprocess_version (const char *text, unsigned int *version, unsigned grammar_destroy (id); + /* there can be multiple #version directives - grab the last one */ I = prod; while (I < prod + size) { - *version = (unsigned int) I[0] + (unsigned int) I[1] * 100; - *eaten = (unsigned int) I[2] + ((unsigned int) I[3] << 8) + - ((unsigned int) I[4] << 16) + ((unsigned int) I[5] << 24); + *version = + (unsigned int) I[0] + + (unsigned int) I[1] * 100; + *eaten = + ((unsigned int) I[2]) + + ((unsigned int) I[3] << 8) + + ((unsigned int) I[4] << 16) + + ((unsigned int) I[5] << 24); I += 6; } -- cgit v1.2.3