Re: [fpc-pascal] FP IDE sources

2024-03-14 Thread Guillermo Martínez Jiménez via fpc-pascal
Thanks, Karoly and Marco. I thought "packages" were libraries not applications, as there is an "utils" directory with programs. Thankyou again, Guillermo Martínez. El Wed, 13 Mar 2024 22:45:19 +0100 Marco van de Voort via fpc-pascal escribió: > Op 13-3-2024 om 21:34 schreef Karoly Balogh via

[fpc-pascal] FP IDE sources

2024-03-13 Thread Guillermo Martínez Jiménez via fpc-pascal
Hi Pascaloids, I was looking for the FP IDE sources to check how it renders the ASCII table and manage the mouse input, but I'm not able to find them. They're not in GitLab, not in the source packages, not in the download pages. Lazarus Wiki has two pages "Textmode IDE" and "Textmode IDE

Re: [fpc-pascal] Nested comments.

2024-01-22 Thread Guillermo Martínez Jiménez via fpc-pascal
El Sun, 21 Jan 2024 17:27:15 +0100 Adriaan van Os via fpc-pascal escribió: > > ($modeswitch nestedcomments-} > I didn't know about this switch. Thanks, maybe I can use it. Guillermo Martínez J. ___ fpc-pascal maillist -

Re: [fpc-pascal] Nested comments.

2024-01-22 Thread Guillermo Martínez Jiménez via fpc-pascal
El Sun, 21 Jan 2024 17:12:05 +0100 Tomas Hajny via fpc-pascal escribió: > Well, I guess that you use mode Delphi, because warning about nested > comments and even an error in your case (due to nested comment not > closed) is already issued by default. So the very simple solution is > using

[fpc-pascal] Nested comments.

2024-01-21 Thread Guillermo Martínez Jiménez via fpc-pascal
Hi Pascaloids, I'm wondering if it is possible to make FPC detect and warn (or even stop compillation when) it has detect a nested comment. That's because I'm using Vim and it closes odd comments. For example, the nex code: { This comment isn't closed. *) DoSomething (); { This is a nested

Re: [fpc-pascal] ShortString still relevant today?

2023-07-04 Thread Guillermo Martínez Jiménez via fpc-pascal
Hi, I'm not sure but I think that CPU caches (L1, L2...) have some impact on this example. Also I think PChar assignation should use string copy instead (Strings.strcopy). Not time to do my own tests right now though u_u) . Regards, Guillermo "Ñuño" Martínez El Tue, 4 Jul 2023 11:46:42 +0700

Re: [fpc-pascal] SDL2 Event Registration (and case statements)

2023-06-27 Thread Guillermo Martínez Jiménez via fpc-pascal
El Sun, 25 Jun 2023 13:42:00 -0300 Rafael Picanço via fpc-pascal escribió: > Thanks Guilhermo, You welcome. :) > > Just to clarify, I do have a limited number of events. Lets say, 2 > events. So, using the SDL_RegisterEvents function, is it possible to > define these two new events as normal

Re: [fpc-pascal] SDL2 Event Registration (and case statements)

2023-06-25 Thread Guillermo Martínez Jiménez via fpc-pascal
Hi. > The SDL2 documentation recommends you to register constants with: > > Uint32 SDL_RegisterEvents(int numevents); >numevents = the number of events to be allocated. >Returns the beginning event number, or (Uint32)-1 if there are not > enough user-defined events left. > > The

Re: [fpc-pascal] C Enum vs. Integer

2012-09-13 Thread Guillermo Martínez Jiménez
On 12 Sep 2012, at 19:11, Johann Glaser wrote: Can I translate this 1:1, i.e., define an Enum in Pascal and just ignore the compiler warnings about reused values? Or should I rather define all these types as Integer and define constants for all values? It depends on whether you need

[fpc-pascal] Re: DOSbox issues

2012-08-20 Thread Guillermo Martínez Jiménez
From: Reinier Olislagers Just for interest: are you trying out FPC for DOS for fun or do you need to create/support DOS (not Windows) programs? I think I'm trying it just for fun. Actually I was angry because my Allegro.pas wrapper doesn't work (well, version 4.4 almost do but version 5 only

[fpc-pascal] DOSbox issues

2012-08-19 Thread Guillermo Martínez Jiménez
Hello everybody, Has somebody used Free Pascal 2.6 in DOSbox? I'm having problems with the installer (text looks corrupted and it doesn't install) but I don't know if it's an issue in all DOSbox or it's because I'm using it in a 64bit Linux (Xubuntu 12.04). Greetings, Guillermo Ñuño Martínez

[fpc-pascal] Re: Runs correctly when debugging.

2012-05-10 Thread Guillermo Martínez Jiménez
No, you have to use pchar. I would also define ALLEGRO_BITMAP as an empty record, to be clear that it's an opaque type: {$packrecords c} TAllegroBitmap = record end; PAllegroBitmap = ^TAllegroBitmap; Thus: function al_load_bitmap(const filename: pchar): PAllegroBitmap; cdecl;

[fpc-pascal] Re: Runs correctly when debugging.

2012-05-08 Thread Guillermo Martínez Jiménez
From: Henry Vermaak Subject: Re: [fpc-pascal] Re: Runs correctly when debugging. It's hard to say without seeing your function/type declarations. Actually I don't call the function that raises the SIGSEGV signal, since it's an internal function. Allegro has a driver struct (RECORD) that

[fpc-pascal] Re: Runs correctly when debugging.

2012-05-07 Thread Guillermo Martínez Jiménez
Thanks, Henry, Can you give any more information about how it fails? It's a SIGSEGV. The library is the Allegro library version 5.0.6. The error is inside an internal procedure that uploads a texture to OpenGL context, and it is used by other Allegro functions (i.e. loading pictures from

[fpc-pascal] Runs correctly when debugging.

2012-05-04 Thread Guillermo Martínez Jiménez
Hello everybody, I'm working on a wrapper of a C library. I've found a bug, but I can't debug it with GDB because if I compile with -g and link with the debug version of the library it works correctly. But if I compile with -g and link with the release version of the library, I can't debug it

[fpc-pascal] Re: Weird compilation warnings

2012-03-01 Thread Guillermo Martínez Jiménez
22:53, schrieb Guillermo Martínez Jiménez: Hello, FPC is returning the Warning: cdecl’ared functions have no high parameter but I have no idea why.  The documentation just says Functions declared with the cdecl modifier do not pass an extra implicit parameter. but the affected functions don't

[fpc-pascal] Weird compilation warnings

2012-02-29 Thread Guillermo Martínez Jiménez
Hello, FPC is returning the Warning: cdecl’ared functions have no high parameter but I have no idea why. The documentation just says Functions declared with the cdecl modifier do not pass an extra implicit parameter. but the affected functions don't have any extra implicit parameter. I'm using

[fpc-pascal] Re: Is this if /else syntax wrong?

2010-07-01 Thread Guillermo Martínez Jiménez
procedure TfrmHometel.SetSplitterSizes; var  i: integer; begin  for i:=3D 0 to ComponentCount - 1 do  begin   if Components[i] is TSplitter then   begin     with TSplitter(Components[i]) do     begin      if Cursor =3D crHSplit then        Width :=3D 7      else if Cursor =3D crVSplit

[fpc-pascal] Re: Forum merger

2009-12-16 Thread Guillermo Martínez Jiménez
Hello. A coincidence. Today at Club Delphi (Spanish community of Delphi developers) some body commented about Pascal Served Pages, which aims to create a server that allows to use Pascal as script language in a similar way than PHP. Actually the project is 'dead' (last release date is November

[fpc-pascal] Re: BNF grammar for fpc

2009-10-16 Thread Guillermo Martínez Jiménez
From: Marco van de Voort (...) The reason is probably more because Wirthian languages traditionally use recursive descent parsers. This reminds me: there are a compiler generator named COCO/R wich has a Pascal version (Delphi actually). It generates recursive descendent parsers. ( search

[fpc-pascal] Re: Illogical automatic dereferencing

2009-10-13 Thread Guillermo Martínez Jiménez
From: J?rgen Hestermann juergen.hesterm...@gmx.de (...) but Borland created these Pascal extensions and now we cannot go back (as others say) because we need compatibility with Delphi programs and an easier (which I doubt) convertion of C header files. So noone is willing to turn back the

[fpc-pascal] New Allegro.pas release

2009-07-06 Thread Guillermo Martínez Jiménez
I've uploaded two now releases of Allegro.pas. Allegro.pas is a wrapper to use Allegro with Pascal compilers (Delphi, Free Pascal, etc). Allegro is a cross-platform library intended for use in computer games and other types of multimedia programming. The new release (4.4.0 Alpha2) fixes a bug,

[fpc-pascal] Re: New Allegro.pas release

2009-07-06 Thread Guillermo Martínez Jiménez
There are an error in my last message. The actual Allegro.pas' project website is at http://allegro-pas.sourceforge.net/ Sorry Guillermo Ñuño Martínez ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] Re: GRAPHICS HELP : PLEASE PLEASE????

2009-06-29 Thread Guillermo Martínez Jiménez
From: Zachary Marlow zachary_mar...@yahoo.com Subject: Re: [fpc-pascal] GRAPHICS HELP : PLEASE PLEASE To: FPC-Pascal users discussions fpc-pascal@lists.freepascal.org Message-ID: 491787.41572...@web35505.mail.mud.yahoo.com Content-Type: text/plain; charset=iso-8859-1 Well =

[fpc-pascal] Re: Link libglx library

2009-05-16 Thread Guillermo Martínez Jiménez
Michalis Kamburelis wrote: Note also your error message: ./exbasic: symbol lookup error: /usr/local/lib/libagl.so: undefined symbol: glXQueryExtension This says something strange, the linker for some reason is looking for glXQueryExtension inside libagl.so. What exactly is

[fpc-pascal] Re: Link libglx library.

2009-05-14 Thread Guillermo Martínez Jiménez
Jonas Maebe wrote: -klglx (note the extra l). I tried that: fpc -02 -Sh -FUlib/ -klglx /exbasic.pp -oexbasic But it returns that error: /usr/bin/ld: lglx: No such file: No such file or directory I look for a dev package for GLX (libgl1-mesa-glx-dev?) but I can't find it. Which packages

[fpc-pascal] Link libglx library.

2009-05-13 Thread Guillermo Martínez Jiménez
Hello. I'm working on a project that needs the GLX library. It compiles but when running it returns that error: ./exbasic: symbol lookup error: /usr/local/lib/libagl.so: undefined symbol: glXQueryExtension In other forum a colleague suggest that it doesn't links with the libglx.so . I'm trying

[fpc-pascal] Link libglx library.

2009-05-13 Thread Guillermo Martínez Jiménez
Hello. I'm working on a project that needs the GLX library. It compiles but when running it returns that error: ./exbasic: symbol lookup error: /usr/local/lib/libagl.so: undefined symbol: glXQueryExtension In other forum a colleague suggest that it doesn't links with the libglx.so . I'm trying

[fpc-pascal] Getmem - Move - Freemem

2009-04-26 Thread Guillermo Martínez Jiménez
Hello. I'm using I need to reserve dynamic memory to store raw binary data. I tried the next code: fSize := aObject^.size; GetMem (fData, fSize); Move (aObject^.dat, fData, fSize); Both fData and dat are untyped POINTER but the program returns an Segment violation at the Move procedure.

[fpc-pascal] Getmem - Move - Freemem

2009-04-26 Thread Guillermo Martínez Jiménez
Hello. I'm using FPC 2.2.2 on Xubuntu 8.10. I need to reserve dynamic memory to store raw binary data. I tried the next code:  fSize := aObject^.size;  GetMem (fData, fSize);  Move (aObject^.dat, fData, fSize); Both fData and dat are untyped POINTER but the program returns an Segment

[fpc-pascal] Re: How to use fpcmake

2009-04-26 Thread Guillermo Martínez Jiménez
From: Graeme Geldenhuys graemeg.li...@g... Subject: Re: [fpc-pascal] How to use fpcmake Hi Guillermo, I struggled with it as well. Henry Vermaak then created an example for me and showed how to use it. The example he did was for the fpGUI Toolkit project. I did read Vermaak's example and

[fpc-pascal] RE: Getmem - Move - Freemem

2009-04-26 Thread Guillermo Martínez Jiménez
Both are .dat and fdata are points. IOW you are moving fsize bytes from the place where the 4 byte of the pointer dat is stored to the place where the 4 bytes of the pointer fdata is stored. Since you probably move more than 4 bytes you totally corrupt what is behind fdata in memory. Try

[fpc-pascal] Allegro.pas 4.3.0 Alpha released

2009-04-16 Thread Guillermo Martínez Jiménez
This is an old note. I forgot to post it. Few days ago I released the second Alpha of Allegro.pas 4.3.0 Allegro.pas is a wrapper to allow Pascal programmers to use the Allegro game library (http://alleg.sourceforge.net/). This new version introduces support for GNU/Linux (at cost drop drop the

[fpc-pascal] Re: How to use fpcmake

2009-04-16 Thread Guillermo Martínez Jiménez
From: Graeme Geldenhuys Hi Guillermo, I struggled with it as well. Henry Vermaak then created an example for me and showed how to use it. The example he did was for the fpGUI Toolkit project. Usage: - Compile fpmake.pas as follows: fpc fpmake.pas - To find out

[fpc-pascal] RE: fpc-2.2.2.i386-win32 on XP: Can't find unit GL used by ...

2009-04-13 Thread Guillermo Martínez Jiménez
From: Dear FPC forum, I am a total novice to FPC. I am using fpc-2.2.2.i386-win32 on XP Compiling Bounce.pp I Get the message: Can't find unit GL used by bounce Please: Where do I go from here ? Thank you, I'm not sure but may be the OpenGL are optional on Windows installer as in

[fpc-pascal] How to use fpcmake

2009-04-13 Thread Guillermo Martínez Jiménez
Hi. I did read the documentation, I look for more information on the Internet and I've read some Makefile.fpc files on the FPC sources, but I can't create a Makefile.fpc file for my project. I can't understand most of the options and the project is pretty complex: it's a package that includes a

[fpc-pascal] Re: Problems linking C library on Linux (*.so *.a files)

2009-02-22 Thread Guillermo Martínez Jiménez
Right now I can load the library manually, using dynlibs unit. I'll work that way. Thanks. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Re: fpc-pascal Digest, Vol 56, Issue 21

2009-02-21 Thread Guillermo Martínez Jiménez
Hi. I've tried your suggestion about the symbol stripping and had the same result. Thanks anyway. I'll load the library manually. From: Jonas Maebe Link time error, I guess. But according to your original message, the name of the library is liballeg_unshareable.a. So you would have to use

[fpc-pascal] Re: Problems linking C library on Linux (*.so *.a files)

2009-02-13 Thread Guillermo Martínez Jiménez
Perhaps I missed it, but are you sure you declared the functions/procedure in the library you are using cdecl? That would explain a runtime error instead of linker error. I'm sure I've used cdecl to declare the procedure I'm using to test it. By the way, Allegro's developers confirm me the

[fpc-pascal] Re: Problems linking C library on Linux (*.so *.a files)

2009-02-13 Thread Guillermo Martínez Jiménez
From: Jonas Maebe Maybe the problem is that the default FPC config file enables symbol stripping. So even though the routines from the library are in your program, dynamically loaded libraries won't be able to find them since the symbol names are gone. Try compiling the program with -Xs- to

[fpc-pascal] Re: Problems linking C library on Linux (*.so *.a files)

2009-02-12 Thread Guillermo Martínez Jiménez
somebody finds another workarround, please tell me. Greetings. Guillermo Martinez. On 10 Feb 2009, at 19:30, Guillermo Martínez Jiménez wrote: I tried to link that library using {$linklib alleg_unsharable}. It linked without error but it raises the same runtime error. Then I tried deleting

[fpc-pascal] Re: Problems linking C library on Linux (*.so *.a files)

2009-02-12 Thread Guillermo Martínez Jiménez
Link time error, I guess. But according to your original message, the name of the library is liballeg_unshareable.a. So you would have to use -k liballeg_unshareable.a, not -klalleg_unshareable.a. The linker only prepends lib if you use -k-lalleg_unshareable.a (note the extra -). And if you

[fpc-pascal] Problems linking C library on Linux (*.so *.a files)

2009-02-10 Thread Guillermo Martínez Jiménez
Hello. I'm trying to link a library written in C (Allegro 4.2) on Linux. The testing program (which is minimal) links without problems but it raises a runtime error: #~/test: ./test ./test: symbol lookup error: /usr/local/lib/liballeg.so.4.2: undefined symbol: _blender_trans24 #~/test: I've

[fpc-pascal] Re: Porting linux to pascal, would it be possible ?

2008-12-05 Thread Guillermo Martínez Jiménez
Would translating/porting linux to pascal be possible ? Possible? Yes it is. Worth of...? I'm afraid not. By the way, Linux is good as it is now and Pascal isn't the best option to create an operating system. Guillermo Ñuño Martínez ___ fpc-pascal

[fpc-pascal] Re: Porting linux to pascal, would it be possible ?

2008-12-05 Thread Guillermo Martínez Jiménez
Are you sure? Yes, I am. doesn't older MacOS's versions where written in Object Pascal? Yes, it does, but as I said I think it wasn't the better options. I think the problem here (again) is not the language, it's the critical mass of users of the language. Using C for Linux was a good

[fpc-pascal] Re: Use Free Pascal on Pandora handheld game console

2008-09-29 Thread Guillermo Martínez Jiménez
From: Florian Klaempfl I've only one arm box so I can't work well on oabi and eabi. My box still runs oabi (multi boot is not possible with the Thecus). If someone offers me reliable access to a fast =500 MHz, =128 MB eabi box, some GB HD, I'll fix the needed stuff. Unfortunately I haven't

[fpc-pascal] Re: Use Free Pascal on Pandora handheld game console

2008-09-19 Thread Guillermo Martínez Jiménez
Thanks for your messages. By the way, I've read at Free Pascal's download site that there's two ARM versions for the compiler, one of them is for Linux. Pandora will use a Linux distro (www.freepascal.org/down/arm/linux.var). Does somebody use that one? Guillermo Ñuño Martínez

[fpc-pascal] Re: Use Free Pascal on Pandora handheld game console

2008-09-18 Thread Guillermo Martínez Jiménez
2008/9/16 Jonas Maebe [EMAIL PROTECTED]: On 16 Sep 2008, at 15:36, Guillermo Martínez Jiménez wrote: Did somebody planned to compile, test and release FPC for the Pandora handgeld game console? (www.openpandora.org) I've not heard of anyone wanting to this. Looking at the specs

[fpc-pascal] Use Free Pascal on Pandora handheld game console

2008-09-16 Thread Guillermo Martínez Jiménez
Hello. I was looking in the maillist archive but I didn't find an answer. Did somebody planned to compile, test and release FPC for the Pandora handgeld game console? (www.openpandora.org) I will try to buy one when it comes to be available (pre-order on September 30) so if nobody else will I

[fpc-pascal] Allegro.pas version 4.2.2 released

2008-06-24 Thread Guillermo Martínez Jiménez
A new version of Allegro.pas was released yesterday. Allegro.pas is a wrapper to allow Pascal compilers (such as Free Pascal) to use the Allegro library in games or multimedia programs. This version introduces new functions that allows to create, write and read files using the LZSS compression

[fpc-pascal] Can I store an object reference in C as void pointer?

2008-05-20 Thread Guillermo Martínez Jiménez
Hello. I'll create a library in Object Pascal. I'll compile it in a DLL/so/dynlib and want to define a public interface to be used in any language so I decided to define it as C public functions. I'll use objects so some functions of the library should return or receive object references but I'm

[fpc-pascal] Re: help: converting windows API to linux

2008-04-11 Thread Guillermo Martínez Jiménez
May be you can use the Wine library. It is a library created to help porting applications from Windows to *NIX. Visit www.winehq.org Regards. Ñuño Martínez. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

[fpc-pascal] ncurses extra package

2008-01-18 Thread Guillermo Martínez Jiménez
Hello everybody. Recently I asked myself if Free Pascal has support for ncurses and I've found it as an extra package. I've take a peek at the ncurses.pp file and I've found it uses a lot of external functions. That means this package will not compile on platforms that haven't a previous ncurses

[fpc-pascal] Re: ncurses extra package

2008-01-18 Thread Guillermo Martínez Jiménez
On Fri, 18 Jan 2008, Michael Van Canneyt wrote: CgpPbiBGcmksIDE4IEphbiAyMDA4LCBHdWlsbGVybW8gTWFydMOtbmV6IEppbcOpbmV6IHdyb3Rl OgoKPiBIZWxsbyBldmVyeWJvZHkuCj4gCj4gUmVjZW50bHkgSSBhc2tlZCBteXNlbGYgaWYgRnJl ... Er... Pardon? ___ fpc-pascal maillist -

[fpc-pascal] Librería para videojuegos Allegro .pas

2007-10-27 Thread Guillermo Martínez Jiménez
Hola gente. Además de congratularme por la existencia de esta lista de correos, os escribo para daros a conocer este proyecto en el que llevo metido desde hace ya un año. Se trata de Allegro.pas, que busca crear una envolvente para poder utilizar la librería Allegro con compiladores Pascal.