From aff8e204d205b5d424d2c39a5d9e004caaa1eab1 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 13 Dec 2006 14:48:36 -0700 Subject: Checkpoint new GLSL compiler back-end to produce fp/vp-style assembly instructions. --- src/mesa/shader/slang/slang_utility.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mesa/shader/slang/slang_utility.c') diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 256d52455d..314ecc8d75 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -220,3 +220,16 @@ slang_atom_pool_id(slang_atom_pool * pool, slang_atom atom) return (const char *) (atom); } + +/** + * Generate a new, unique atom with given prefix. + */ +slang_atom +slang_atom_pool_gen(slang_atom_pool * pool, const char *prefix) +{ + char name[1000]; + static int nextFree = 100; + sprintf(name, "%s%d", prefix, nextFree); + nextFree++; + return slang_atom_pool_atom(pool, name); +} -- cgit v1.2.3 From 5186ae9bbe8c630c2434c7488fbe5bffdfba46a7 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 10:12:38 -0700 Subject: remove unused slang_atom_pool_gen() --- src/mesa/shader/slang/slang_utility.c | 14 -------------- src/mesa/shader/slang/slang_utility.h | 10 ---------- 2 files changed, 24 deletions(-) (limited to 'src/mesa/shader/slang/slang_utility.c') diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 314ecc8d75..9b98a2c76c 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -219,17 +219,3 @@ slang_atom_pool_id(slang_atom_pool * pool, slang_atom atom) { return (const char *) (atom); } - - -/** - * Generate a new, unique atom with given prefix. - */ -slang_atom -slang_atom_pool_gen(slang_atom_pool * pool, const char *prefix) -{ - char name[1000]; - static int nextFree = 100; - sprintf(name, "%s%d", prefix, nextFree); - nextFree++; - return slang_atom_pool_atom(pool, name); -} diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h index c969ffcd2a..360241916f 100644 --- a/src/mesa/shader/slang/slang_utility.h +++ b/src/mesa/shader/slang/slang_utility.h @@ -25,9 +25,6 @@ #if !defined SLANG_UTILITY_H #define SLANG_UTILITY_H -#if defined __cplusplus -extern "C" { -#endif /* Compile-time assertions. If the expression is zero, try to declare an * array of size [-1] to cause compilation error. @@ -102,13 +99,6 @@ GLvoid slang_atom_pool_destruct (slang_atom_pool *); slang_atom slang_atom_pool_atom (slang_atom_pool *, const char *); const char *slang_atom_pool_id (slang_atom_pool *, slang_atom); -slang_atom -slang_atom_pool_gen(slang_atom_pool * pool, const char *prefix); - - -#ifdef __cplusplus -} -#endif #endif -- cgit v1.2.3 From aa6f4241f8d9e301e056968a1eb85bb27b7fa55a Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 17:32:45 -0700 Subject: formatting fixes --- src/mesa/shader/slang/slang_utility.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/mesa/shader/slang/slang_utility.c') diff --git a/src/mesa/shader/slang/slang_utility.c b/src/mesa/shader/slang/slang_utility.c index 9b98a2c76c..0fbfcc5840 100644 --- a/src/mesa/shader/slang/slang_utility.c +++ b/src/mesa/shader/slang/slang_utility.c @@ -31,11 +31,13 @@ #include "imports.h" #include "slang_utility.h" -char *slang_string_concat (char *dst, const char *src) +char * +slang_string_concat (char *dst, const char *src) { - return _mesa_strcpy (dst + _mesa_strlen (dst), src); + return _mesa_strcpy (dst + _mesa_strlen (dst), src); } + /* slang_string */ GLvoid @@ -156,8 +158,8 @@ slang_atom_pool_destruct (slang_atom_pool * pool) slang_alloc_free(entry->id); slang_alloc_free(entry); entry = next; - } - } + } + } } /* @@ -211,11 +213,11 @@ slang_atom_pool_atom(slang_atom_pool * pool, const char * id) return (slang_atom) (**entry).id; } -/* +/** * Return the name of a given atom. */ const char * slang_atom_pool_id(slang_atom_pool * pool, slang_atom atom) { - return (const char *) (atom); + return (const char *) (atom); } -- cgit v1.2.3