TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Forum View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Tucker Taft <[log in to unmask]>
Reply To:
Tucker Taft <[log in to unmask]>
Date:
Thu, 9 Dec 1999 18:18:04 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (45 lines)
"Robert C. Leif, Ph.D." wrote:
>
> To: Robert I. Eachus et al.
> From: Bob Leif
>
> I previously looked at uncgi. However, I did not wish to get a C compiler
> nor learn C. My suspicion is that the C code in uncgi permits reading the
> command line with the *.exe? part of the string.

As explained in other notes, the information after the "?" an a URL
GET is squirelled away in the QUERY_STRING environment variable.
This is true no matter what language the CGI program is written in.

> ...That is why I started this
> thread. Is there an Ada compiler for Windows 98, Windows CE, or any other
> reasonable INTEL based PC which can read the output of a HTML.Form.Get?

All you need is to read the QUERY_STRING environment variable.  I presume you
could easily write your own "pragma Import" to call the Win32 function
that gets environment variables, if your favorite Ada compiler doesn't
already provide an interface to it.  For example:

    function GetEnv(Name : String) return Interfaces.C.Strings.chars_ptr;
    pragma Import(C, GetEnv, "getenv");
   ...
    use Interfaces.C.Strings;
    QS_Ptr : constant chars_ptr := GetEnv("QUERY_STRING");
   ...
    if QS_Ptr /= Null_Ptr then
        declare
            QS : constant String := Value(QS);
        begin
            ... -- use QS which is what came after "?" in URL created by GET


> ... I
> know about Post. However, one should first worry about reading the string,
> prior to the problem of its parsing.
>
> I will try Rich Conn's approach using the Microsoft Personal Web Server.
> Fortunately, I can separate the GUI based changing of my configuration file
> from the execution of my data acquisition program.

-Tucker Taft

ATOM RSS1 RSS2