On Wed, Dec 5, 2012 at 5:32 PM, Carl Worth <cwo...@cworth.org> wrote: > This will allow testing of disabled line-continuation on a case-by-case basis, > (with the option communicated to the preprocessor via the GL context). > --- > src/glsl/glcpp/glcpp.c | 43 +++++++++++++++++++++++++++++++++++++++++-- > 1 file changed, 41 insertions(+), 2 deletions(-) > > diff --git a/src/glsl/glcpp/glcpp.c b/src/glsl/glcpp/glcpp.c > index 79fbdac..5352703 100644 > --- a/src/glsl/glcpp/glcpp.c > +++ b/src/glsl/glcpp/glcpp.c > @@ -100,6 +100,18 @@ static void > init_fake_gl_context (struct gl_context *gl_ctx) > { > gl_ctx->API = API_OPENGL_COMPAT; > + gl_ctx->Const.DisableGLSLLineContinuations = false; > +} > + > +static void > +usage (void) > +{ > + fprintf (stderr, "Usage: glcpp [OPTIONS] [--] [<filename>]\n"); > + fprintf (stderr, "\n"); > + fprintf (stderr, "Pre-process the given filename (stdin if no > filename given).\n"); > + fprintf (stderr, "The following options are supported:\n"); > + fprintf (stderr, " --disable-line-continuations Do not > interpret lines ending with a\n"); > + fprintf (stderr, " backslash > ('\\') as a line continuation.\n");
I'd probably just make these six function calls a single one. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev