Re: [fpc-pascal] Re: what is the FPC equivalent of Delphi's zlib unit?

2013-10-14 Thread Dennis Poon
Please help. I am using Delphi 5's zlib procedure   
CompressBuf(src,SrcLen, Dest, DestLen);
to compress data to be decompressed by FPC's paszlib unit, but I don't 
know which one of the many procedure is the right right to use?

I tried uncompress(Dest, DestLen, Src, SrcLen) but it is obviously wrong.
It is urgent. Thanks a lot in advance.

Dennis


Reinier Olislagers wrote:

On 28/07/2013 22:53, Mark Morgan Lloyd wrote:
   

Michael Van Canneyt wrote:
 

There are 3 options:

  paszlib.pas pascal implementation of libz.

  zstream.pp  stream interface, uses paszlib.

  zlib.pp  native interface to C libz library.
   

Is any one of those more natural than the rest, because e.g. it's
already used for GIF handling?
 

paszlib/zstream
http://wiki.lazarus.freepascal.org/paszlib
used for zip support in FPC (TZipper).
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


-
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3349 / Virus Database: 3209/6528 - Release Date: 07/28/13


   
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Graeme would love this, or not, I think

2013-10-14 Thread vfclists .
You couldn't make this up. Is it a joke or not?

Department of Basic Education bans Free and Open Source Software in SA
Schools and mandates programming an ancient, moribund language in
contradiction of government's own policy http://twitter.com/share


http://dkeats.com/index.php?module=blogaction=viewsinglepostid=gen21Srv8Nme0_40332_1381256759userid=7050120123

-- 
Frank Church

===
http://devblog.brahmancreations.com
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Sets as array index?

2013-10-14 Thread Jürgen Hestermann

I have a declaration like this:

type TagType   = (tag1,tag2,tag3,tag4,tag5);
TagSetType = set of TagType;

I now want to store numbers for each of the 2^n possible set settings
[tag1,tag2,tag3,tag4,tag5]
[tag1,tag2,tag3,tag4 ]
[tag1,tag2,tag3 ,tag5]
.. and so on...

so I declared this array:

type TagSetArrayType = array[0..(1 shl (ord(High(TagSetTyp))+1))-1] of  integer;

My question:
Is it possible to retrieve the corresponding array index directly from a set 
variable?
For example, if I have

var TagSet : TagSetType;
var TagArray  : TagSetArrayType;
var I : Integer;

I want to do something like this (which is not directly possible but maybe by 
some other way?):

I := TagArray[TagSet];
I := TagArray[[tag1,tag5]];
or
I := TagArray[ord(TagSet)];
I := TagArray[ord([tag1,tag5])];

I think that the compiler somehow needs to generate the bit mask for [tag1,tag5]
internally anyway so maybe it's available by some function to the programmer?


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] DOS compiler wiki page: please review

2013-10-14 Thread greim

Am 06.10.2013 22:37, schrieb Nikolay Nikolov:

On 10/05/2013 03:07 PM, greim wrote:

Hi,

writing a 8086 version of fpc is not so strange as some may think!
There are still some 80186 processors around running in embedded
systems! These architecture is certified for some applications in
industrial and avionik controll.



So my wish list:
fpc for 80186, supporting the new extended addressing and writing the
header files for RTOS (see
http://www.beck-ipc.com/en/products/rtos/index.asp) incl. a FPU
emulation !

 From what I read from the links you posted, the extended addressing
seems to be just like the regular real mode, except that segments are
spaced not 16, but 256 bytes apart, is that correct?


As far as i personally understand, yes.


If that's the case,

it should be easy to support - it's just a matter of writing the RTL for
the new OS and using the appropriate linker.


RTOS is a pimped IBM/MS-DOS. So standard functions like file i/o etc. 
are identical. Most of the DOS programs are running also on RTOS.



 FPC for i8086 produces

object files in the standard ROMF file format, they just use the
extension .o, instead of .obj. Note that FPC currently only supports the
tiny, small and medium memory models. Compact, large and huge are
planned, but not started yet. But you can try writing an RTL for RTOS
with the current memory models. In principle, it shouldn't be any harder
than porting the compiler to any new OS, where the CPU is already
supported.


Maybe its enough to modify the linker for this special 80186, without 
touching the 8086 compiler?
This was not possible for the Borland compiler, because there are no 
.obj files.


 And when I implement the compact/large/huge memory models,

the RTOS RTL will have to be adapted to support them. Most likely, the
far heap manager (which doesn't exist yet) will have to be adapted to
support the different spacing between the segments. As for FPU
emulation, it is also on my TODO list :)


First of all i will try to run a small Hallo World on the RTOS 24 bit 
machine !


Thanks

Markus




Nikolay
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC 2.6.2 for DOS/Go32V2 FP.EXE cannot run a second time

2013-10-14 Thread Marco van de Voort
In our previous episode, Sven Barth said:
  and it works. I tested only FP.EXE, not RTL units.
  It seems that the error (FP.EXE cannot run) was corrected.
  Thank you for your help.
  Expected question: when the new version 2.6.3 will be available?
 
  Hmm. I thought the next version was going to be 2.7.something?
 
 2.6.3 and 2.7.1 are development versions. The next release is likely to be
 2.6.4 somewhen in the near(?) future. After that the next release is likely
 to be 2.8.0.


To get an idea of the versioning, it is easiest to look at the picture in
the FAQ:

http://www.freepascal.org/faq.var#versions

and read the text above it.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] free pascal and game consoles

2013-10-14 Thread doufa isntmyname
thanks for the info ,


2013/10/9 Sven Barth pascaldra...@googlemail.com

 Am 09.10.2013 15:51, schrieb Michael Schnell:

  On 10/09/2013 03:41 PM, Sven Barth wrote:

 One needs to port FPC for these platforms. For Wii, GameCube, Nintendo
 DS and GameBoy Advance this was already done, but noone did yet start a
 PlayStation or Xbox port.

  AFAIK:

 PS3 is a multi-Core PPC architecture with propriety display hardware.
 There is a Linux port that runs on a single core but can't use the other
 cores and only uses the basic feature of the display hardware. A ppc fpc
 should be runable on that Linux, but this is is not suitable to do decent
 games.

 PS4 and XBox are X86 archs. So fpc should easily run, but the libraries
 would need to be ported to take advantage of the OS (whatever it is) and
 libraries. Again I think to do decent games you would need to use some
 propriety graphic hardware feature.

 Xbox might be more or less simple since it's API resembles somewhat the
 Windows API (though at least not officially being a Windows though it might
 be at least NT based).

 Regards,
 Sven

 __**_
 fpc-pascal maillist  -  
 fpc-pascal@lists.freepascal.**orgfpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/**mailman/listinfo/fpc-pascalhttp://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Troubles using embedded HTTP Server to serve SWF files

2013-10-14 Thread Graeme Geldenhuys
Hi,

I'm using the FPC HTTP Server component as an embedded web server in our
application. All content is generated dynamically via a CGI application.
I hit a [rather big] snag serving SWF flash content. During my
debugging, I eliminated the usage of a CGI app, and reference the SWF
file directly in the URL to see if I could get to the bottom of this issue.

The FPC web server has no problem serving plain jane (self contained
stand-alone) SWF files, but we do nothing standard here. :) Our SWF
files load external resources (shared files) located in a resources
directory.

eg:

   web_root/flash/somefile.swf
   web_root/flash/resources/res01.swf
   web_root/flash/resources/res02.swf
   web_root/flash/resources/res03.swf
   web_root/flash/resources/res04.swf

For some reason using the embedded FPC HTTP Server, the somefile.swf can
not find the resources directory, thus no res*.swf files are loaded.

Now if I use the above directory layout, and use Apache Web Server, and
tell the Web Browser to directly load the /flash/somefile.swf, then it
finds the resources directory just fine, and the flash movie is
displayed perfectly.

Doing the same test with FPC's HTTP Server, no resources are found or
loaded. I even tried creating a static .html file which then displays
the SWF file, but that doesn't work either.

Any ideas on what can be different between this test and using FPC or
Apache's Web Server? I've been battling with this problem for nearly a
week now, and the boss is breathing down my neck already! :-/

Does SWF files maybe need some special environment variable set, so it
knowns what the current directory is? I have no idea. Is there a way I
can test this? Is there a Firefox/Chrome browser plugin that could
inspect and display environment variable values, even if just a SWF file
is placed in the URL?

Any thoughts or suggestions would be greatly appreciated.


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] which procedure is used for the old zlib decompression in the paszlib unit?

2013-10-14 Thread Dennis Poon

{This is a resend since the last email did not appear on the elist}

I am using the Delphi 5's zlib procedure CompressBuf (Src, SrcLen, Dest, 
DestLen)

to compress data to be decompressed by FPC's paszlib unit
but I don't know which one of the many procedure is the right one to use.

I already tried uncompress(Dest, DestLen, Src, SrcLen) but it failed.

Please kindly help.

Dennis
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: Proposal for a XPath Namespace Resolver

2013-10-14 Thread Daniel Gaspary
On Sat, Oct 5, 2013 at 2:08 PM, Daniel Gaspary dgasp...@gmail.com wrote:
 Today the XPath Ns Resolver is marked as Experimental and is just an
 alias for TDomNode:

I have sent a patch:

http://bugs.freepascal.org/view.php?id=25183
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Graeme would love this, or not, I think

2013-10-14 Thread vfclists .
I suspect is its a trick to introduce Linux by the back door. If their
Delphi programs can easily be switched to Lazarus the software will be easy
to convert to Linux and the Mac


On 11 October 2013 20:18, vfclists . vfcli...@gmail.com wrote:

 You couldn't make this up. Is it a joke or not?

 Department of Basic Education bans Free and Open Source Software in SA
 Schools and mandates programming an ancient, moribund language in
 contradiction of government's own policy http://twitter.com/share



 http://dkeats.com/index.php?module=blogaction=viewsinglepostid=gen21Srv8Nme0_40332_1381256759userid=7050120123

 --
 Frank Church

 ===
 http://devblog.brahmancreations.com




-- 
Frank Church

===
http://devblog.brahmancreations.com
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC 2.6.2 for DOS/Go32V2 FP.EXE cannot run a second time

2013-10-14 Thread Lubomír Čabla
Sven, thank you for info.
On Wed, Oct 9, 2013 at 11:14 PM, Sven Barth pascaldra...@googlemail.comwrote:

 Am 09.10.2013 21:10 schrieb Robert Wolfe wolfe.robwo...@gmail.com:

 
  On 10/09/2013 01:59 PM, Lubomír Čabla wrote:
 
  OK, with FPC.ZIP dated 5.10.2013 I have translated successfully FP.EXE
  and it works. I tested only FP.EXE, not RTL units.
  It seems that the error (FP.EXE cannot run) was corrected.
  Thank you for your help.
  Expected question: when the new version 2.6.3 will be available?
 
 
  Hmm. I thought the next version was going to be 2.7.something?

 2.6.3 and 2.7.1 are development versions. The next release is likely to be
 2.6.4 somewhen in the near(?) future. After that the next release is likely
 to be 2.8.0.

 Regards,
 Sven

 ___
 fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
 http://lists.freepascal.org/mailman/listinfo/fpc-pascal

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Sets as array index?

2013-10-14 Thread Jürgen Hestermann

Am 2013-10-12 14:07, schrieb Jürgen Hestermann:
 I want to do something like this (which is not directly possible but maybe by 
some other way?):

 I := TagArray[TagSet];
 I := TagArray[[tag1,tag5]];
 or
 I := TagArray[ord(TagSet)];
 I := TagArray[ord([tag1,tag5])];

 I think that the compiler somehow needs to generate the bit mask for 
[tag1,tag5]
 internally anyway so maybe it's available by some function to the programmer?

First: Why does it take 3 days until my mail arrives in the list?

Second: I already found out myself how to do what I want:

I := TagArray[byte(TagSet)];
I := TagArray[byte([tag1,tag5])];

Although, when extending the set above 8 elements
I manually need to change it to

I := TagArray[word(TagSet)];
I := TagArray[word([tag1,tag5])];

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Sets as array index?

2013-10-14 Thread Sven Barth
Am 15.10.2013 07:11 schrieb Jürgen Hestermann juergen.hesterm...@gmx.de:

 Am 2013-10-12 14:07, schrieb Jürgen Hestermann:

  I want to do something like this (which is not directly possible but
maybe by some other way?):
 
  I := TagArray[TagSet];
  I := TagArray[[tag1,tag5]];
  or
  I := TagArray[ord(TagSet)];
  I := TagArray[ord([tag1,tag5])];
 
  I think that the compiler somehow needs to generate the bit mask for
[tag1,tag5]
  internally anyway so maybe it's available by some function to the
programmer?

 First: Why does it take 3 days until my mail arrives in the list?

Problems with DNS on the mailing list server.

Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal