Implement software ATI_fragment_shader

no error detection, slow, may not be 100% correct but a good start
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index 307736f..e258f67 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -83,6 +83,13 @@
    assert(ctx->FragmentProgram.Current);
    ctx->FragmentProgram.Current->Base.RefCount++;
 #endif
+
+#if FEATURE_ATI_fragment_shader
+   ctx->ATIFragmentShader.Enabled = GL_FALSE;
+   ctx->ATIFragmentShader.Current = (struct ati_fragment_shader *) ctx->Shared->DefaultFragmentShader;
+   assert(ctx->ATIFragmentShader.Current);
+   ctx->ATIFragmentShader.Current->Base.RefCount++;
+#endif
 }
 
 
@@ -106,6 +113,13 @@
          ctx->Driver.DeleteProgram(ctx, &(ctx->FragmentProgram.Current->Base));
    }
 #endif
+#if FEATURE_ATI_fragment_shader
+   if (ctx->ATIFragmentShader.Current) {
+      ctx->ATIFragmentShader.Current->Base.RefCount--;
+      if (ctx->ATIFragmentShader.Current->Base.RefCount <= 0)
+	ctx->Driver.DeleteProgram(ctx, &(ctx->ATIFragmentShader.Current->Base));
+   }
+#endif
    _mesa_free((void *) ctx->Program.ErrorString);
 }
 
@@ -216,6 +230,20 @@
       return NULL;
 }
 
+/**
+ * Initialize a new ATI fragment shader object.
+ */
+struct program *
+_mesa_init_ati_fragment_shader( GLcontext *ctx, struct ati_fragment_shader *prog,
+                           GLenum target, GLuint id)
+{
+   if (prog) 
+      return _mesa_init_program_struct( ctx, &prog->Base, target, id );
+   else
+      return NULL;
+}
+
+
 
 /**
  * Allocate and initialize a new fragment/vertex program object but
@@ -240,6 +268,10 @@
    case GL_FRAGMENT_PROGRAM_ARB:
       return _mesa_init_fragment_program( ctx, CALLOC_STRUCT(fragment_program),
 					  target, id );
+   case GL_FRAGMENT_SHADER_ATI:
+      return _mesa_init_ati_fragment_shader( ctx, CALLOC_STRUCT(ati_fragment_shader),
+					  target, id );
+
    default:
       _mesa_problem(ctx, "bad target in _mesa_new_program");
       return NULL;
@@ -289,6 +321,12 @@
       if (fprog->Parameters)
          _mesa_free_parameter_list(fprog->Parameters);
    }
+   else if (prog->Target == GL_FRAGMENT_SHADER_ATI) {
+      struct ati_fragment_shader *atifs = (struct ati_fragment_shader *)prog;
+      if (atifs->Instructions)
+	 _mesa_free(atifs->Instructions);
+   }
+
    _mesa_free(prog);
 }