[fpc-pascal] FPC + valgrind massif problems

2012-05-10 Thread Michalis Kamburelis
Hi, I wanted to debug where my program uses the most memory. (There are no memory leaks, but I want to optimize memory usage on some large inputs. As the code is quite large, simply guessing which part is responsible becomes quite hard :) In the past, I happily used valgrind's massif tool for

Re: [fpc-pascal] FPC + valgrind massif problems

2012-05-11 Thread Michalis Kamburelis
Sven Barth wrote: You could try whether heaptrc is of any help for you (see here: http://www.freepascal.org/docs-html/rtl/heaptrc/usage.html ). If not it might at least provide a starting point if you should decide to write a custom memory profiler. Otherwise I don't know of any FPC based memory

Re: RE : [fpc-pascal] FPC + valgrind massif problems

2012-05-11 Thread Michalis Kamburelis
Ludo Brands wrote: - Maybe there's a workaround? IOW, can someone successfully use massif with FPC programs? This is known problem not related to fpc. Run valgrind --tool=massif --run-libc-freeres=no ./trivial_alloc Fantastic, many thanks, it works like a charm now! :) Both on trivial te

[fpc-pascal] FpProfiler patch to compile with fpmake

2012-05-12 Thread Michalis Kamburelis
Hi, I'm not sure if anyone is actively watching the Mantis issues for FpProfiler, so I thought I'll mention it here: I submitted a patch to fix the compilation with fpmake from command-line. It's on http://bugs.freepascal.org/view.php?id=21991 Regards, Michalis

Re: [fpc-pascal] Re: Playing sounds with standard components

2012-06-11 Thread Michalis Kamburelis
luciano de souza wrote: I took a look in Openal examples. I need to confess that I expected something easier. Perhaps, something like: PlaySound('file.wav', 0) You need to wrap OpenAL a little to get something so simple. In my Castle Game Engine (http://castle-engine.sourceforge.net/), I hav

Re: [fpc-pascal] Re: Playing sounds with standard components

2012-06-11 Thread Michalis Kamburelis
silvioprog wrote: Nice project. :) castle_game_engine-3.0.0-src.zip = +-70MB. Most of the size comes from the examples, they contain also example 3D data files (models, animations etc.). I prefer to give people full package :) For those who want to get parts, they can always check out appr

Re: [fpc-pascal] header translation question, 64 bit problem

2012-06-17 Thread Michalis Kamburelis
Bernd wrote: (Almost) The only other small discontinuity was the PNG writer from fcl-image needs to be explicitly told Indexed:=False on 64 bit while on 32 bit this was not necessary. Indexed is false by default in FPC >= 2.6.1, see "BTW" and notes in http://bugs.freepascal.org/view.php?id=21

Re: [fpc-pascal] Brook 1.0 - A new framework for web was born

2012-12-15 Thread Michalis Kamburelis
luciano de souza wrote: Yes, there is a very nice tool. Its name is Pasdoc. Take a look here: http://sourceforge.net/projects/pasdoc/ For this project, the author has changed the source code of Pasdoc. Originally, it's compatible only with HTML 4, but the documentation was released in HTML 5.

Re: [fpc-pascal] Brook 1.0 - A new framework for web was born

2012-12-17 Thread Michalis Kamburelis
michael.vancann...@wisa.be wrote: On Sun, 16 Dec 2012, Graeme Geldenhuys wrote: On 15/12/2012 21:22, Sven Barth wrote: Maybe because the authors prefered inline comments instead of fpdoc's XML files... A shame, because the more detailed the documentation, the more it obfuscates the code. e

[fpc-pascal] [Announcement] Castle Game Engine 4.0.0 release for FPC game developers

2013-01-26 Thread Michalis Kamburelis
Hi, I would like to announce a release of Castle Game Engine 4.0.0, an open-source cross-platform 3D game engine for Object Pascal (only FPC/Lazarus): http://castle-engine.sourceforge.net/news.php?id=release-4.0.0 I'm letting myself post an announcement to lazarus and fpc-pascal mailing l

Re: [fpc-pascal] [Announcement] Castle Game Engine 4.0.0 release for FPC game developers

2013-02-04 Thread Michalis Kamburelis
Victor Matuzenko wrote: Hi, I have tried to compile it under Windows XP with «make all», and got the errors: [...] Compiling src\opengl\windows\castleglwindowsfonts.pas castleglwindowsfonts.pas(81,22) Error: Incompatible types: got "LongWord" expected "TWinCharSet" A bug slipped into the re

Re: [fpc-pascal] what happened to the "contributed units" listing?

2013-02-06 Thread Michalis Kamburelis
Michal Wallace wrote: The database of contributed pascal code seems to have disappeared: http://www.freepascal.org/contrib/db.php3 Anyone know where it went, or how to get it back? :) It's on http://www.freepascal.org/contrib/contribs.html now. But some pages may still contain old links, se

[fpc-pascal] TStream descendant to compress/decompress gzip data from another stream

2013-03-27 Thread Michalis Kamburelis
Hi, Like the subject says, I'm looking for a TStream implementation that takes another TStream and compresses/decompresses data in gzip format. I would like to read/write gzip data to a stream, any TStream (maybe TFileStream, maybe TMemoryStream, maybe a stream from the network like TSocketSt

Re: [fpc-pascal] TStream descendant to compress/decompress gzip data from another stream

2013-03-27 Thread Michalis Kamburelis
José Mejuto wrote: El 27/03/2013 19:22, Michalis Kamburelis escribió: Google found an old thread on lazarus mailing list about this ("FPC, gzip and stream") but without any solution, everything mentioned there has either the limitations of TCompressionStream/TDecompressionStrea

Re: [fpc-pascal] TStream descendant to compress/decompress gzip data from another stream

2013-03-27 Thread Michalis Kamburelis
Justin Smyth wrote: I have converted the one from fpc to its own library to do streams , can email it to you later if you wish Yes, that would be appreciated. As long as everything you send me is covered by the same license as FPC RTL (LGPL with static linking exception), so that I can use it

Re: [fpc-pascal] TStream descendant to compress/decompress gzip data from another stream

2013-03-28 Thread Michalis Kamburelis
Flávio Etrusco wrote: "Members" refer to each available section according to the flags. Re-read this whole paragraph you posted and a few following you'll realize only one "file" is allowed in a gzip file/blob. I think this confusion comes from the fact that http://www.gnu.org/software/gzip/m

[fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-15 Thread Michalis Kamburelis
Hi, I'm often reading fixed-size structures using TStream.ReadBuffer, working under the assumption that it will fail only if it's not possible to read the requested amount of bytes (that is, if the stream ended prematurely). This is actually the documented usage, see http://www.freepascal.org

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-15 Thread Michalis Kamburelis
Ewald wrote: And what with non-blocking pipes pipes? Wait for a *some* period until you get all data? It is up to the programmer to do this INHO. If you want to get partial data (instead of waiting until all requested data is available) you should just use TStream.Read instead of TStream.Read

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-16 Thread Michalis Kamburelis
Ewald wrote: The question that arises here is whether all the `ReadByte`, `ReadWord`, `WriteByte`, `WriteWord`, `WriteBuffer`, ... should also `try harder`? Same issue there: no data is returned about the actual number of bytes read. Anyway, I leave that to someone who knows the internals of thes

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-16 Thread Michalis Kamburelis
Michael Van Canneyt wrote: The above implementation should not be changed, it is Delphi compatible: TStream.ReadBuffer works on the assumption that Read will always return the amount of bytes requested if they are available. So, if you want to make changes, there is no reason why TStream.Read sh

Re: [fpc-pascal] TStream.ReadBuffer doesn't try hard enough to read the requested bytes

2013-06-16 Thread Michalis Kamburelis
Michael Van Canneyt wrote: If an implementation of Read does not return the requested data when in fact it is available, then the implementation of Read is broken. I guess it depends how do you interpret TStream.Read documentation... http://www.freepascal.org/docs-html/rtl/classes/tstream.read

Re: [fpc-pascal] ExtractFilePath and \ as pathdelim

2013-09-02 Thread Michalis Kamburelis
Mattias Gaertner wrote: Hi all, ExtractFilePath and ExtractFileDir stops at last '/','\', so it treats the normal character \ as path delimiter under Unix. Is there a RTL function that handles the \ as normal character? You can change global AllowDirectorySeparators (http://www.freepascal.o

[fpc-pascal] Unable to authenticate to update entry in "contributed units"

2008-09-13 Thread Michalis Kamburelis
Hi, I just added an entry to "contributed units" (Kambi VRML game engine). Of course, two seconds later I wanted to correct it. But I can't --- looks like I cannot authenticate. And it seems it's a bug, not my bad memory. When I input my current (both now and at the time of submitting the ent

Re: [fpc-pascal] number of cpu cores

2008-11-29 Thread Michalis Kamburelis
Florian Klaempfl wrote: > Mattias Gaertner schrieb: >> I need a default value of the number of maximum threads. >> Is there already some RTL function that can be used for that? >> >> For example if the program runs on a 2 x quad core it would be nice to >> get 8. >> Hyperthreading multipliers shoul

Re: [fpc-pascal] regex unit doesn't find matches???

2008-12-01 Thread Michalis Kamburelis
Graeme Geldenhuys wrote: > Hi, > > I'm using the following regular expression: 'foob.*r' > Calling MatchString() against each of the items in the stringlist, I > expected it to match 3 items. Instead it only matches the first item > and fails all the rest. Why??? > > > --[ source

[fpc-pascal] Workaround for #0011837 (FPC <= 2.2.2 with GTK >= 2.13)

2009-01-18 Thread Michalis Kamburelis
In case someone wonders how to workaround this bug http://mantis.freepascal.org/view.php?id=11837 (occurs with GTK >= 2.13.4, e.g. on Ubuntu 8.10 we have GTK 2.14): I found that the quick workaround that works is to pass --noinhibit-exec to ld, that is "-k--noinhibit-exec" to FPC command-line. T

Re: [fpc-pascal] How to use OpenGL 2.0 features

2009-05-10 Thread Michalis Kamburelis
Lord Satan wrote: > > Nonetheless, I don't understand why the ARB version does not work. > AFAIK it has the same entry points as the core functionality and > OpenGL versions are required to support the ARB version of functions > even if the non ARB version is in the core now. > No. OpenGL doesn'

Re: [fpc-pascal] How to use OpenGL 2.0 features

2009-05-10 Thread Michalis Kamburelis
Lord Satan wrote: > On Sun, 10 May 2009 18:46:26 +0400 dmitry boyarintsev > wrote: > >>> So it looks like I have to init all OpenGL versions from 1.2 to >>> 2.0 to make sure that all OpenGL 2.0 core functions are >>> initialized. Is this true? >> Judging from glext, it's true. > This makes no sen

Re: [fpc-pascal] How to use OpenGL 2.0 features

2009-05-10 Thread Michalis Kamburelis
Lord Satan wrote: > On Sun, 10 May 2009 23:47:07 +0200 > Lord Satan wrote: > > I uploaded the patch to the bug tracker as issue #0013687 > Looking quickly at the patch, it doesn't seem to set Result values correctly. For example, all Load_GL_version_xxx will always return true, if only the firs

Re: [fpc-pascal] Re: Link libglx library.

2009-05-14 Thread Michalis Kamburelis
Guillermo Martínez Jiménez wrote: > 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 (libg

Re: [fpc-pascal] Re: Link libglx library.

2009-05-14 Thread Michalis Kamburelis
I 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. Actually, re-reading this error message,

Re: [fpc-pascal] OpenCL

2009-12-21 Thread Michalis Kamburelis
Lourival Mendes wrote: > FPC/Lazarus. Is there a project on it? Is there some thing working on > Parallel programming on FPC? There are OpenCL bindings submitted to mantis, http://mantis.freepascal.org/view.php?id=15297, by Dmitry Boyarintsev. I didn't test them, as I don't have capable GPU (yet)

Re: [fpc-pascal] [OT] which editor - emacs?

2010-01-10 Thread Michalis Kamburelis
Hans-Peter Suter wrote: > > PS: thanks also to the other suggestions! And if somebody uses Emacs I > am still interested to hear about how it goes. Thanks again! I use Emacs most of the time to edit my Pascal (and all other :) ) code. But it has it's learning curve. And, although there are variou

Re: [fpc-pascal] Assigning class method to procedure of object via class name in delphi mode

2010-01-25 Thread Michalis Kamburelis
cobines wrote: > everything is ok. But I can also assign it using class name: > > CM.Callback := TContextMenu.ContextMenuSelect; > This is the way it's supposed to work in delphi mode, as far as I remember Delphi allows it (disclaimer: I don't have Delphi now to check, but it used to be so aro

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread Michalis Kamburelis
ik wrote: > On Sat, Feb 20, 2010 at 20:01, Jürgen Hestermann > mailto:juergen.hesterm...@gmx.de>> wrote: > > > > y := case Other of > bla : 'hello'; > foo : 'bye'; > baz : 'adius'; > end; > > > What do you gain with this

Re: [fpc-pascal] some new features to delphi prisem

2010-02-21 Thread Michalis Kamburelis
Graeme Geldenhuys wrote: > On 21 February 2010 17:00, Michalis Kamburelis > wrote: >> Which also means "less chance of mistake". For example, if you decide >> later to change "y" to "y1", you only have to change the code in one >> place, n

[fpc-pascal] fcl-passrc example program, and a couple of bugreports

2010-04-25 Thread Michalis Kamburelis
All the talk about the Pascal parser in fcl-passrc got me interested recently. I did some experiments, and I thought I mention here: 1. I added a simplest example how to use fcl-passrc to the wiki: http://wiki.freepascal.org/fcl-passrc 2. And reported a couple of bugs found in fpdoc (tested on P

Re: [fpc-pascal] playing sound files (linux and windows)

2010-06-15 Thread Michalis Kamburelis
Graeme Geldenhuys wrote: I can't find an example for loading a .wav file. [...] Any hints or sample code. The sample included in FCL 2.4.1 loads MAD, A52, OGG and ModPlug only. Google revealed a tutorial using AlutLoadWavFile(), but that is in the "unofficial utilities library", it's not part

Re: [fpc-pascal] Detecting what is the linux distro

2010-10-11 Thread Michalis Kamburelis
Marco van de Voort wrote: >> If your distro complies with the LSB standards (most popular distros >> do), then you should have a /etc/lsb-release text file that you can >> parse. > > FC11, no such file, but there is a dir lsb-release.d with the contents > You're not really supposed to be looking

Re: [fpc-pascal] Looking for SDL_opengl header

2010-12-08 Thread Michalis Kamburelis
Darius Blaszyk wrote: > Has anyone ever converted the SDL_opengl header to FPC? Couldn't find it > in the repository, but perhaps someone knows if it is part of another > project. > SDL_opengl.h is just (one of the) cross-platform ways to include OpenGL stuff in C programs. We don't need it in FP

[fpc-pascal] Code to send message from Python script to FPC's TSimpleIPCServer

2010-12-11 Thread Michalis Kamburelis
Just sharing, in case someone will find the below information useful, or worthy to add to some wiki or docs anywhere: I have here a daemon written in FPC that communicates with clients by very nice TSimpleIPCServer class (in SimpleIPC unit). Of course it's trivial to send a message to such server

[fpc-pascal] Supports() only checks declared interfaces?

2011-01-06 Thread Michalis Kamburelis
Hi, Consider the attached source code. I have a base interface (IA) and a descendant interface (IB). Class TB is declared as TB = class(TInterfacedObject, IB) end; Now I would expect that both Supports(TB, IA) Supports(TB, IB) return true. After all, TB is forced to implement methods of

Re: [fpc-pascal] Supports() only checks declared interfaces?

2011-01-06 Thread Michalis Kamburelis
Paul Ishenin wrote: > 06.01.2011 20:14, Michalis Kamburelis wrote: >> return true. After all, TB is forced to implement methods of both IA and >> IB, as IB descends from IA. But to my surprise, Supports(TB, IA) returns >> false. > This is expected behavior. It works t

[fpc-pascal] Patch to add GLX 1.4 support

2011-08-10 Thread Michalis Kamburelis
Hi, For people working with new OpenGL features: I just submitted a patch to upgrade our GLX unit to GLX 1.4, add some new GLX extensions, and add comfortable functions to check existence of a particular GLX extension/version. This allows you to easily use modern GLX "FB config" functions to initi

Re: [fpc-pascal] Group arguments from overloaded functions in fpdoc

2012-01-05 Thread Michalis Kamburelis
dhkblas...@zeelandnet.nl wrote: When you have overloaded functions, fpdoc will group them on one page. The arguments however are listed in two separate arguments sections. It would be nice to have the arguments merged in one section. I do not know how to display the arguments though (no idea what

Re: [fpc-pascal] Boolean expression short-circuit

2005-11-22 Thread Michalis Kamburelis
Kornel Kisielewicz wrote: Ok, I've been arguing over that with a friend of mine for a couple of e-mail's now... I need your help! Let me show an example first: type TFoo = class end; var Foo : TFoo; The question is, wether this is valid: if (Foo <> nil) and (Foo.inheritsFrom(TFoo)) then do_

Re: [fpc-pascal] Remote FreePascal compile service, feedback requested

2005-12-05 Thread Michalis Kamburelis
Tom Verhoeff wrote: [...] I was thinking of adding a remote FreePascal service along the following lines. You go to its web interface, browse for your source files (possibly a whole zip archive) on your local machine, enter command-line options, and let our server compile your stuff with a (sel

Re: [fpc-pascal] A simple "exception handling" question

2006-01-28 Thread Michalis Kamburelis
Bob Richards wrote: [...] According to the docs on function "Hex2Dec" in Strutils: "If S does not contain a valid hexadecimal value, an EConvertError exception will be raised." So, what profound lack of understanding am I suffering from? Anybody? There's a bug in Hex2Dec implementation --

Re: [fpc-pascal] A simple "exception handling" question

2006-01-28 Thread Michalis Kamburelis
Bob Richards wrote: Michalis Kamburelis wrote: There's a bug in Hex2Dec implementation -- it returns 0 instead of raising EConvertError. Here's a patch: Index: strutils.pp === --- strutils.pp(wersja 2298) +++ s

Re: [fpc-pascal] Better random numbers ?

2006-02-26 Thread Michalis Kamburelis
A.J. Venter wrote: Hi, I am using standard run of the mill randomize/random() calls in a program to generate random numbers, used in turn to select random data which is fed into another program. (All this just to create a multi-language enabled module structure eh) Well there is just one littl

Re: [fpc-pascal] Random numbers

2006-03-08 Thread Michalis Kamburelis
(Second send, it seems that mails from my old email address do not reach fpc lists) Antal wrote: It's not just that, but randseed is not a threadvar. This means that all your threads use the same randseed variable, so if two threads call "random" at the same time they will still get the same "

Re: [fpc-pascal] Variable arguments, different types?

2006-03-08 Thread Michalis Kamburelis
(Second send, it seems that mails from my old email address do not reach fpc lists) L505 wrote: [...] In other words you can reinvent your own writeln style procedures and pass parameters of *different types* simutaneously. I was under the impression you could only pass parameters of the same

Re: [fpc-pascal] Variable arguments, different types?

2006-03-10 Thread Michalis Kamburelis
L505 wrote: [...] In other words you can reinvent your own writeln style procedures and pass parameters of *different types* simutaneously. I was under the impression you could only pass parameters of the same type through this [] square bracket trickery. See docs: [http://www.freepascal.org/

Re: [fpc-pascal] Random numbers

2006-03-10 Thread Michalis Kamburelis
Antal wrote: It's not just that, but randseed is not a threadvar. This means that all your threads use the same randseed variable, so if two threads call "random" at the same time they will still get the same "random" number. Jonas And also generating a rand * getpid you can't really get goo

Re: [fpc-pascal] gtk-file-chooser-button

2006-06-04 Thread Michalis Kamburelis
Koenraad Lelong wrote: > Hi, > I wanted to use a gtk_file_chooser_button, but I couldn't because > gtk_file_chooser_button_new doesn't exist (v2.0.3 and svn-version). So I > added it (and some others) in gtkfilechooser.inc (see enclosed diff). Is > this the right place ? I think it should go to s

Re: [fpc-pascal] Clueless here

2006-06-29 Thread Michalis Kamburelis
Darius Blaszijk wrote: > Hi, > > I have two overloaded functions. One overloaded function just rearanges > one parameter from an array of extended to an array of ^extended and > calls the other overloaded function. The problem is however that the 2nd > function call crashes the app. I really have

Re: [fpc-pascal] macros with parameters

2006-09-19 Thread Michalis Kamburelis
Marc Santhoff wrote: > Hi, > > the docs only show examples of macros without any parameters. Is it > possible to use them? > > Can I make this work anyhow: > > {$MACRO ON} > {$define HOFFSET(rec,field) := pointer(@rec.field) - pointer(@rec)} > > type > s1_t = record > a: lon

Re: [fpc-pascal] [SYSTEM]: How detecting if run as root ?

2006-10-11 Thread Michalis Kamburelis
Pete Cervasio wrote: > On Wednesday 11 October 2006 19:37, Andrew Haines wrote: >> TOUZEAU DAVID wrote: >>> Dear >>> >>> I need to detect if the program is executed as root privileges on Linux >>> system. >>> Did somebody had developped a such function ?? >>> >>> Best regards. >> Well you can try G

Re: [fpc-pascal] Progress Bar in different widget sets

2006-11-02 Thread Michalis Kamburelis
Graeme Geldenhuys wrote: > Hi, > > GTK's progress bar has a feature where the progress bar moves left and > right repeatedly, instead of the normal from Min to Max. > > What do you call that feature and what do you actually use it for? > I know I have seen in used in Mozilla Thunderbird as well,

[fpc-pascal] Linking using "external" on Mac OS X

2007-03-28 Thread Michalis Kamburelis
Hi I experience problems linking using "external" keyword on Mac OS X. Program with declaration like procedure glVertex3f(x, y, z: Single); cdecl; external 'GL' name 'glVertex3f'; fails to compile with $ fpc external_decl.pas /usr/bin/ld: Undefined symbols: _glVertex3f Error: Error while

Re: [fpc-pascal] Linking using "external" on Mac OS X

2007-03-28 Thread Michalis Kamburelis
Thank you Jonas for detailed answer. I submitted related patch to gtkglext units at [http://www.freepascal.org/mantis/view.php?id=8585]. Michalis ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc

Re: [fpc-pascal] arm and negative float

2007-04-11 Thread Michalis Kamburelis
Henry Vermaak wrote: [...] > > 2) BoolToStr returns '0' for False and '-1' for True... > [...] That was intentional change in r5744. Changelog says * booltostr now D7 compat. so that's it... You have to pass 2nd argument "true" for BoolToStr now to get 'False' or 'True' results (or whatever you

Re: [fpc-pascal] Dynamic array as return type of functions

2007-05-23 Thread Michalis Kamburelis
Christos Chryssochoidis wrote: > Hi, > > I tried to write some function that returned a dynamic array, and > realized that this isn't allowed. Why? After all one can specify an > array of variable length as type for variables... Furthermore - if I'm > not mistaken - a dynamic array is implemented

Re: [fpc-pascal] fpc in cpp mode

2007-06-23 Thread Michalis Kamburelis
Marc Santhoff wrote: > Hi, > > is it possible to tell fpc to only replace macros in the code and > store/show the generated file? > > Like Running "cpp myfile.c > myfile.preprocessed.c"? > This doesn't answer your question, but maybe it's helpful: While developing pasdoc, I wrote a Pascal prep

Re: [fpc-pascal] ISpell / ASpell + FPC

2007-07-28 Thread Michalis Kamburelis
2007/7/22, Leonardo M. Ramé <[EMAIL PROTECTED]>: > Does anyone used/created a unit to interact with ISpell or ASpell > spellcheckers? > You can see pasdoc [http://pasdoc.sipsolutions.net/] source code, units source/component/PasDoc_Aspell.pas and source/component/PasDoc_ProcessLineTalk.pas. This

Re: [fpc-pascal] Keyboard unit under Linux

2007-10-17 Thread Michalis Kamburelis
Frank McCormick wrote: > Resending because of some changes in my results. > > > I am having a tough time using the keyboard unit under Linux. Please tell me > whats wrong with this code: > > ( var section cut out) > > Begin >InitKeyBoard; >Repeat > K:=pollKeyEvent; > if k <>0

Re: [fpc-pascal] Save image into BMP or JPEG using Free Pascal (Save screenshot of OpenGL scene)

2008-02-19 Thread Michalis Kamburelis
Jakub Marian wrote: Hello, I need to save data stored in memory into .bmp or (which would be the better variant) into .jpg file. Actually what I want to do is to save the OpenGL screen (probably using glReadPixels() function) into image. I've downloaded PasJPEG, but it doesn't seem to be working

Re: [fpc-pascal] Save image into BMP or JPEG using Free Pascal (Save screenshot of OpenGL scene)

2008-02-20 Thread Michalis Kamburelis
Marco van de Voort wrote: Jakub Marian wrote: The image format in the memory is clearly specified, as the main use of this unit is to cooperate with OpenGL (for loading images, textures, saving screenshots etc.). See TImage class comments, basically RawPixels is simply a pointer to an array o

Re: [fpc-pascal] GLext in Free Pascal does not work?

2008-02-20 Thread Michalis Kamburelis
Jakub Marian wrote: Hello, I've been trying to solve the problem with the unit GLext for some time and I am getting mad. I need to use vertex shaders written in GLSL, but I am a novice in that field so I may be doing domething wrong. I have glext in my "uses". I tried just to call glCreateProgram

Re: [fpc-pascal] GLext in Free Pascal does not work?

2008-02-20 Thread Michalis Kamburelis
Jakub Marian wrote: Well, glext_LoadExtension('GL_version_1_4') was just an example, of course that I tried Load_GL_version_2_0 and some other functions. But I get "access violation" when I try to call ANY function from glext. I would understand it if I got just false as a return value of a func

Re: [fpc-pascal]Direct writes to console buffer

2003-08-03 Thread Michalis Kamburelis
(SegB000,0)) BUT it works under many platforms - in particular, it works under Win32. For more information, look at the FPC documentation for this unit. Regards, -- Michalis Kamburelis [EMAIL PROTECTED] http://www.camelot.homedns.org/~michalis/ ___ fpc-p

Re: [fpc-pascal]Direct writes to console buffer

2003-08-03 Thread Michalis Kamburelis
Rich Pasco wrote: Michalis Kamburelis wrote: Unit Video is exactly what you are looking for - it lets you write/read characters and their attributes (text color + background + blink attribute) directly to/from a buffer in memory and then use simple UpdateScreen procedure to "flush"

Re: [fpc-pascal]More strangeness...

2003-08-30 Thread Michalis Kamburelis
e like Win32Check( WinAPICall(..) ) or Win32Check( WinAPICall(..) <> ) Hope this helps someone to simplify error handling in WinAPI programs. -- Michalis Kamburelis <[EMAIL PROTECTED]> http://www.camelot.homedns.org/~michalis/ ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal]About order of units...

2003-08-30 Thread Michalis Kamburelis
.x there's nothing to worry (however you should be aware of this if you're writing some non-testing code, that you might want to compile some day with FPC 1.1 or higher). Regards, Michalis Kamburelis <[EMAIL PROTECTED]> http://www.camelot.homedns.org/~michalis/ _

Re: [fpc-pascal]About order of units...

2003-08-31 Thread Michalis Kamburelis
uspecting that your problems are originated from some bugs in Windows unit. Regards, -- Michalis Kamburelis <[EMAIL PROTECTED]> http://www.camelot.homedns.org/~michalis/ ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal]gpm library compiled by default ?

2003-10-22 Thread Michalis Kamburelis
James Mills wrote: Hi, I noticed the other day that one of my FPC programs which does not in anyway shape or form use the gpm or any mouse libraries actually requires the gpm library to be installed. It seems the fpc 1.0.10 is compiling programs and requiring libgpm to be installed. Why is this ?

Re: [fpc-pascal]gpm library compiled by default ?

2003-10-23 Thread Michalis Kamburelis
James Mills wrote: On Thu, Oct 23, 2003 at 09:16:19AM +0200, Marco van de Voort wrote: On Wed, Oct 22, 2003 at 10:53:51PM +0200, Michalis Kamburelis wrote: Maybe you're using the Keyboard unit ? This unit uses Mouse in it's implementation, and by default unit Mouse uses Gpm unit (tha

Re: [fpc-pascal]How to load a png image

2003-12-21 Thread Michalis Kamburelis
Karim wrote: Hello I want to know, how to load a png image with freepascal ? There is a png libpng package shipped with FreePascal, but I cannot find any examples or docs. Pascal unit Libpng is just a wrapper that calls functions from libpng.so. Documentation for libpng is available at the offi

Re: [fpc-pascal]problem linking with c

2003-12-23 Thread Michalis Kamburelis
ringincv' in object file. Thanks in advance, Ciao, Dean ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Michalis Kamburelis <[EMAIL PROTECTED]> http://www.camelot.homedns.org/~michalis/ ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal]Local Ip Address

2004-02-23 Thread Michalis Kamburelis
Crabtree, Chad wrote: Hello I am having a dikens of a time getting my IP address on the machine that I am working on. I've looked in the mailing list and I found something that I've been toying with but still I cannot get the xxx.xxx.xxx.xxx style name I can only get my machine name. Here's what

Re: [fpc-pascal]Local Ip Address

2004-02-23 Thread Michalis Kamburelis
Crabtree, Chad wrote: Ok. Thank you that worked however I'd like to ask some questions. I tried to find the answer by looking at the source code however I'm confused by this code abcd:=PABCD(phe^.h_addr_list[0])^; I beleive this automaticly parses h_addr_list[0] into the record. Not sur

Re: [fpc-pascal]emacs & freepascal

2004-03-10 Thread Michalis Kamburelis
Jacobo García López de Araújo wrote: > Hi, it's my first post to the list so i want to salute everyone. > > And here is my question, i'm trying to make freepascal working under > emacs in linux debian. But i have no quote about that, i could have my > sintax colored using Options/Syntax Highlighti

Re: [fpc-pascal]Conditional compilation ELSE-IF?

2004-04-08 Thread Michalis Kamburelis
Alan Mead wrote: I have the following code in a function: {$IFDEF LINUX} Slash := '/'; {$ENDIF} {$IFDEF WIN32} Slash := '\'; {$ENDIF} Obviously, FPC supports many other platforms. Is there a better way to handle this? Use DirectorySeparator constant from Syst

Re: [fpc-pascal]Win32 API Call

2004-06-21 Thread Michalis Kamburelis
Hi You made a few mistakes translating GetCurrentHwProfile to Pascal: 1. parameter to GetCurrentHwProfile should be TProfileInfo, not PProfileInfo (using "var" parameter already forces passing HWProfile by reference) 2. result of GetCurrentHwProfile should be LongBool (4 bytes), not boolean (1

Re: [fpc-pascal]Win32 API Call

2004-06-22 Thread Michalis Kamburelis
Jim Wilson wrote: At 12:00 AM 6/22/2004, you wrote: You made a few mistakes translating GetCurrentHwProfile to Pascal: Figures it was me... :-) 1. parameter to GetCurrentHwProfile should be TProfileInfo, not PProfileInfo (using "var" parameter already forces passing HWProfile by reference) Tha

Re: [fpc-pascal]Win32 API Call

2004-06-24 Thread Michalis Kamburelis
Matt Emson wrote: ... It should be boolean. All Win32API return values which are BOOL translate as Boolean. That's not true. WinAPI uses BOOL type, it's defined in WinAPI headers as typedef int WINBOOL,*PWINBOOL,*LPWINBOOL; ... typedef WINBOOL BOOL; So BOOL is int. So it's 32-bit value on 32-

Re: [fpc-pascal]exception handling issue

2004-08-29 Thread Michalis Kamburelis
Hi Your problem is the consequence of how ReadLn(Longint) works. When you enter 'g' + Enter, ReadLn reads 'g', then ReadLn raises runtime error (this causes EInOutError exception), but Enter is still left unread (it stays in internal Input buffer). That's why the next ReadLn ("ReadLn (tmpLabel

Re: [fpc-pascal]Where is the error?

2004-08-31 Thread Michalis Kamburelis
When you compile using -S2 parameter you are compiling in objfpc mode. This mode is not exactly compatible with Delphi. In this particular case, the problem is that in objfpc mode method parameters can't have the same name as the object properties and fields (that's what "Duplicate identifier .

Re: [fpc-pascal]Any OpenGL mesh handling units?

2004-09-01 Thread Michalis Kamburelis
Joseph Hewitt wrote: Does anyone know of any mesh handling units for FreePascal? It would be nice if poses/animation were also supported. - JH. You can take a look at my programs at http://www.camelot.homedns.org/~michalis/ I have there programs to handle VRML

Re: [fpc-pascal] Explicit date from double format

2004-09-29 Thread Michalis Kamburelis
Anton Tichawa wrote: Michael Van Canneyt wrote: On Wed, 29 Sep 2004, Jilani Khaldi wrote: Hi All, Does somebody kown the algorithm to convert a date from the double format to an explicit format? Example: the function "now" givers me: 3.825956615197917E+004 I want to transform it in: year-month-

Re: [fpc-pascal] RE: Random(), Randomize, and Linux permissions

2004-09-29 Thread Michalis Kamburelis
Alan Mead wrote: ... I was hoping that the algorithms underlying the RTL.Randomize and RTL.Random would switch to using MT in fpc version 2. -Alan Reading comments in rtl/inc/system.inc FPC 1.9.x uses Mersenne Twister. Commited to CVS on 2003/10/26 by Jonas. -- Michalis _

Re: [fpc-pascal] Freepascal Game Developers

2004-12-04 Thread Michalis Kamburelis
Hi! I'm working on a 3D game in FPC since 2 years. There are still many things to do, but also many things are already done and working. I have units to - deal with OpenGL (including GLWindow, my own glut-replacement in ObjectPascal, able to work on top of GTK or XLib or WinAPI), - load and proce

Re: [fpc-pascal] Customizing tply

2004-12-09 Thread Michalis Kamburelis
Hi, I'm attaching my unit TextReader, it - implements TTextReader class (that is able to read from any TStream class using simple Readln and Eof methods) and - initializes/finalizes some variables to treat standard input/output like a TStream classes (or, only in case of standard input, like a

[fpc-pascal] Is it possible to link to SO libraries that have filename ending like '.so.0'

2005-01-05 Thread Michalis Kamburelis
Hi This problem arised with recent change to JEDI-SDL, but it seems a general problem with linking to libraries under UNIXes. Before the change, JEDI-SDL headers linked to libraries named like 'libSDL.so', using constructs that looked like (after removing preproc $ifdefs and resolving constants

Re: [fpc-pascal] Is it possible to link to SO libraries that have filename ending like '.so.0'

2005-01-05 Thread Michalis Kamburelis
Peter Vreman wrote: Hi This problem arised with recent change to JEDI-SDL, but it seems a general problem with linking to libraries under UNIXes. Before the change, JEDI-SDL headers linked to libraries named like 'libSDL.so', using constructs that looked like (after removing preproc $ifdefs and res

Re: [fpc-pascal] Is it possible to link to SO libraries that have filename ending like '.so.0'

2005-01-05 Thread Michalis Kamburelis
Pedro Lopez-Cabanillas wrote: Hi, On Wednesday 05 January 2005 16:49, Michalis Kamburelis wrote: So it seems that fpc passes to ld -lSDL-1.2, and ld looks for 'libSDL-1.2.so' (without '.0' suffix). Honestly, I don't know what one should pass to ld to tell it to

[fpc-pascal] Property with no default value

2005-04-17 Thread Michalis Kamburelis
Hi While converting some Delphi project to Lazarus I noticed that in FPC RTTI there is no way to mark a property as having *no* default value. This particular Delphi project depends on it (it relies on the fact that when saving some object to the stream, some of the properties will *always* be

Re: [fpc-pascal] FPC and GTK@: signals spreading

2005-04-21 Thread Michalis Kamburelis
Marco van de Voort wrote: The second question (is gtkentry widget in W32 release corrupted?) remains alive. GTK1 was debugged for Windows because lazarus used it at first. However Lazarus switched to plain win32 later, so I don't think GTK2 on windows is too well debugged in relation with FPC, an

Re: [fpc-pascal] FPC and GTK2: problems with GTKCombo

2005-04-23 Thread Michalis Kamburelis
Hi I found the problem: TGtkBox record layout and size is not correct for Win32 GTK 2 libraries. This causes that "PGtkCombo(c)^.entry" does not work as it should, because address of "entry" field in "TGtkCombo" is different than it should be. TGtkBox is currently defined as TGtkBox = record

Re: [fpc-pascal] gtk2 example "gtkglext"

2005-04-30 Thread Michalis Kamburelis
Bob Barry wrote: Attempt to compile current cvs failed due to directory "gtkglext" missing from fpc/packages/extra/gtk2/examples: make[6]: Leaving directory `/home/bobb/freepascal/cvs/fpc/packages/extra/gtk2/examples/plugins' make -C scribble_simple clean make[6]: Entering directory `/home/bobb/f

  1   2   >