FPC + Linux problem 
Author Message
 FPC + Linux problem

'Lo all.

I've recently been working on a project with a friend (I'm the database
management half), and I'm running into a PChar problem under Linux.

The following line;


causes an RTE216. The program is CGI, and the only error I see reported
to me is;

"Run-Time Error at 0x0000000000" (I could be wrong about the # of 0's,
but either way, it was all 0's).

I only found that it was this line by commenting out everything around
it, and when I commented out just this line, the program ran flawlessly
(of course, it didn't function, as this line is vital to the program).

Basically, what I'm trying to accomplish;

The form input is passed to stdin, where I read it via DosRead into a
PChar. (Yeah, the name threw me too, but DosRead works under OS/2 and
Linux). I then grab the form elements (by name) from the buffer with the
above line.

I'd switch to reading stdin character by character, but that gets into a
whole other world of messy {sigh}

Anyone have any idea why this doesn't work? Runs fantastically in half a
dozen other CGI apps under OS/2.

--

= Stewart Honsberger (AKA Blackdeath)
= Web: http://www.*-*-*.com/ : 3484915
= Remove 'thir{*filter*}' to reply privately

... You may be a loser for a long time before you realize it.
-!- GOPGP/2 v1.23



Mon, 19 Nov 2001 03:00:00 GMT  
 FPC + Linux problem

Quote:

> The following line;


> causes an RTE216. The program is CGI, and the only error I see reported
> to me is;

Isn't it possible that since TempS seems to be a string, that it isn't
null-terminated?

Otherwise, please post a complete example program that demonstrates the
crash, it's hard to debug something when you have only one line of code
without any declaration/initialization :)

BTW: you may also want to have a look at the unCGI unit, available on
the contributed unit page of our website (or directly by going to
<http://tfdec1.fys.kuleuven.ac.be:80/~michael/fpc-linux/cgi/>

Jonas



Tue, 20 Nov 2001 03:00:00 GMT  
 FPC + Linux problem

says...

Quote:

>'Lo all.

>I've recently been working on a project with a friend (I'm the database
>management half), and I'm running into a PChar problem under Linux.

>The following line;



   If Buf is not found in TempS then
StrPos returns nil !
   StrPas then will cause the crash because no nil test is done in that
function  !


Tue, 20 Nov 2001 03:00:00 GMT  
 FPC + Linux problem

comp.lang.Pascal.misc:

Quote:

>> causes an RTE216. The program is CGI, and the only error I see reported
>> to me is;

>Isn't it possible that since TempS seems to be a string, that it isn't
>null-terminated?

The declaration looks like;

  TempS := 'NAME' + #0;

(Copied directly from the source file, indentation included). The
declaration immediately preceeds the line above that crashes.

Quote:
>Otherwise, please post a complete example program that demonstrates the
>crash, it's hard to debug something when you have only one line of code
>without any declaration/initialization :)

Unfortunately that's not possible. I'm working on this project with a
friend, like I said, and I couldn't post the code without his prior
agreement.

Quote:
>BTW: you may also want to have a look at the unCGI unit, available on
>the contributed unit page of our website (or directly by going to
>< http://www.*-*-*.com/ :80/~michael/fpc-linux/cgi/>

unCGI? As in UNix CGI? I've already got all of the CGI related routines
I've ever needed - what's this unit offer, exactly?

--

= Stewart Honsberger (AKA Blackdeath)
= Web: http://www.*-*-*.com/ : 3484915
= Remove 'thir{*filter*}' to reply privately

... Linux: Opens up Windows, shuts up Gates.
-!- GOPGP/2 v1.23



Wed, 21 Nov 2001 03:00:00 GMT  
 FPC + Linux problem

comp.lang.pascal.misc:

Quote:

>   If Buf is not found in TempS then
>StrPos returns nil !

(Don't you mean "if TempS is not found in Buf"?).

That's a possibility. I'll look into that - thanks.

--

= Stewart Honsberger (AKA Blackdeath)
= Web: http://www.*-*-*.com/ : 3484915
= Remove 'thir{*filter*}' to reply privately

... A salesman interrupted my computer session. I gave him a cold boot.
-!- GOPGP/2 v1.23



Wed, 21 Nov 2001 03:00:00 GMT  
 FPC + Linux problem

[cut - don't know anything else to suggest except for what Pierre
mentioned]

Quote:
> >the contributed unit page of our website (or directly by going to
> ><http://tfdec1.fys.kuleuven.ac.be:80/~michael/fpc-linux/cgi/>

> unCGI? As in UNix CGI? I've already got all of the CGI related routines
> I've ever needed - what's this unit offer, exactly?

I don't know what the name stands for, but it works both under Linux
and Win32. It's only 3kb (.tar.gz) and includes the (commented) source
code. You'll be able to see what it does faster than me, because I
haven't done any cgi programming yet.

Jonas



Wed, 21 Nov 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Printing problem again FPC under linux

2. multi threading in fpc linux?

3. Linux/PPC port of FPC working

4. Writing PNG in FPC for Linux, libpng available

5. FPC linking error under Linux ... cannot find GLU

6. FPC - linux question

7. Question about FPC under linux

8. find small database for FPC linux

9. fpc and printer under linux

10. Zmodem in Linux with FPC?

11. FPC (linux) and utf-8

12. FPC charset (linux) question

 

 
Powered by phpBB® Forum Software