Orlando Llanes wrote:
I got the following error:
testpcx.pas:4: storage class specified for parameter `Close'
Can't reproduce this one with my current version, so I assume it's been fixed by now. Much has changed since the last release, and this was probably among the bug fixes made.
BTW (seeing the contents of edsys.pas and edfile.pas): GPC does support untyped files and BlockRead/BlockWrite (already since January), so there's actually no reason for you to do these workarounds you do with C files and direct libc calls. (And FillChar is build in which is internally the same as memset.)
testpcx.pas: In function `program_Testpcx': testpcx.pas:33: warning: passing arg 4 of `Pcxencode' from incompatible pointer type
I have simplified the source as much as possible while leaving the
source structure as is to reproduce the error. I'm using GPC 2.8.1 under DOS. The warning on line 33 is insignificant as far as I know, I'm passing an address, and the routine expects a pointer.
The warning is correct. You pass a pointer to EDUInt8 and the routine expects a PArray8 which is a quite different type. (Not all pointer types are the same in Pascal!) To get rid of the warning, you can use type casting.
BTW, if you recall, I got an error a long time ago about an empty
record. I found a way around that, I left the unit to keep up the source structure, but I defined everything in an include file and included it into the unit itself, now I don't have that problem anymore (I hope :}).
This bug should have been fixed in the next version, too. (I had a lot of problems with various instances of this bug, too...)
Frank
On Fri, 21 Aug 1998, Frank Heckenbach wrote:
Can't reproduce this one with my current version, so I assume it's been fixed by now. Much has changed since the last release, and this was probably among the bug fixes made.
I'll check it out.
BTW (seeing the contents of edsys.pas and edfile.pas): GPC does support untyped files and BlockRead/BlockWrite (already since January), so there's actually no reason for you to do these workarounds you do with C files and direct libc calls. (And FillChar is build in which is internally the same as memset.)
Awesome 8o~~~ (<--- Drooling with goofy eyes) I think the C workaround was not a good work-around anyway, I got weird results using them, for a text file (for example) it worked fine, but (also for example) the pcx encoder didn't properly encode a file despite using a proven algorithm.
The warning is correct. You pass a pointer to EDUInt8 and the routine expects a PArray8 which is a quite different type. (Not all pointer types are the same in Pascal!) To get rid of the warning, you can use type casting.
Oh yeah, I forgot about type-casting :} I knew the warning was part of the territory, but I didn't think of that :} I'm trying to eliminate warnings wherever possible without requiring special command-lines :)
This bug should have been fixed in the next version, too. (I had a lot of problems with various instances of this bug, too...)
Hoo-rah!
See ya! Orlando Llanes
"Meine Damen und Herren, Elvis hat soeben das Gebaeude verlassen!"
"Look out fo' flyeeng feet" O__/ a010111t@bc.seflin.org /|____. O <__. /> / \ ____________|_________ http://ourworld.compuserve.com/homepages/Monkey414