On Thu, Dec 07, 2000 at 03:29:11PM -0800, Marco DiPlacido wrote:
> i'm in the process of comparing the performance of
> mod_perl vs. C cgi's (not to be confused with apache C
> modules :) ).   how on earth do i get at the
> QUERY_STRING under C?   is there a C lib out there to
> handle parsing this string?   it's easy enough with C
> apache modules but i don't want to go there yet.
> sorry for the somewhat unrelated post.

QUERY_STRING is an environment variable, regardless of the language you're
using.  In C, you can get it using getenv(3), at least on a Unix machine.  I
wouldn't have a clue on Windows.  (In fact, I don't know if Windows even has
environment variables.)

Lots of libraries to help you do that sort of thing, or you could roll your
own.  String handling in C is rather non-fun, though, especially if you
eschew lex.  

I'd stick with something interpreted for writing CGIs.

mike

Reply via email to