Re: [fpc-devel] RussianlocaleinformationnotcompatiblewithFPClocalevariables

2008-07-31 Thread Ales Katona
Boian Mitov wrote / napísal(a): Generics can't implement conceptual programming. As example for conceptual programming you can perform the same algorithm on simple arrays such as char Array[ 1000 ] as you can on any STL compliant container. The integrator concept is implemented different way

Re: [fpc-devel] RussianlocaleinformationnotcompatiblewithFPClocalevariables

2008-07-31 Thread Ales Katona
Boian Mitov wrote / napísal(a): Sort for example: It can work with C type array: int a[7] = {23, 1, 33, -20, 6, 6, 9}; sort(a, a+7); or it can work with a container such as linked list: listSomething v1; sort(v1.begin(), v1.end()); With best regards, Boian Mitov

Re: [fpc-devel] RussianlocaleinformationnotcompatiblewithFPClocalevariables

2008-07-31 Thread Ales Katona
Boian Mitov wrote / napísal(a): And the same code will work both with normal array and with object implementing iterators ? I am not sure it will. How I can call your sort for a linked list container instead on array? Am I missing something or your code works with arrays only. The STL sort

Re: [fpc-devel] RussianlocaleinformationnotcompatiblewithFPClocalevariables

2008-07-31 Thread Ales Katona
Note that I'm not trying to do a who can piss further thing here. Just saying that IMHO the way C++ does this isn't exactly great. The idea behind it is nice, however apart from pure OOP approach I don't see much choice of how to do this nicely. Ales

[fpc-devel] GetAppConfigDir confusion

2008-07-29 Thread Ales Katona
It seems that currently, GetAppConfigDir performs rather incosistently. On Unix, it returns path with trailing pathdelim, on windows it returns path with random trailing path delim (depends on which branch, see code). What should it be then? Considering the importance of this function to

Re: [fpc-devel] GetAppConfigDir confusion

2008-07-29 Thread Ales Katona
Michael Van Canneyt wrote / napísal(a): On Tue, 29 Jul 2008, Ales Katona wrote: It seems that currently, GetAppConfigDir performs rather incosistently. On Unix, it returns path with trailing pathdelim, on windows it returns path with random trailing path delim (depends on which branch

Re: [fpc-devel] The usage of Include() doesn't work any more in 2.3.1

2008-07-16 Thread Ales Katona
I think this is also same in Delphi, but I agree that passing pure properties (without getter/setter) to var should possibly be reduced to warning or even hint. Ales ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] 32 and 64 bit fpc.cfg file

2008-06-25 Thread Ales Katona
Peter Vreman wrote / napísal(a): You can use: #ifdef CPU64 -Fu/usr/lib64/fpc/$fpcversion/units/$fpctarget ... #else -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget #endif Note that this won't work with /usr/local as prefix, because there's only one lib (by default) there.

Re: [fpc-devel] 32 and 64 bit fpc.cfg file

2008-06-25 Thread Ales Katona
Marco van de Voort wrote / napísal(a): What happens if you have a bunch of 32-bit and 64-bit packages then? Packages go to /usr/lib not /usr/local/lib, and /usr/lib is either symlink or the main one (depends on distro if it's 64 or 32 I guess). /usr/local is completely untouched by all

Re: [fpc-devel] 32 and 64 bit fpc.cfg file

2008-06-23 Thread Ales Katona
Joost van der Sluis wrote / napísal(a): Hi all, On Fedora 64-bit libraries are installed in /usr/lib64 and 32 bit libraries are in /usr/lib. The fedora fpc-packages also use these directories. The fpc.cfg file contains the following: # 32-bits -Fu/usr/lib/fpc/$fpcversion/units/$fpctarget

Re: [fpc-devel] 32 and 64 bit fpc.cfg file

2008-06-23 Thread Ales Katona
Oh wait sorry other way around /usr/lib64 is a symlink to /usr/lib on ubuntu, it's inverted to fedora in any case. Ales ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Summer of Code 2008

2008-03-07 Thread Ales Katona
I've got a goole mail ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] GetText's GetLanguageIDs()

2008-03-01 Thread Ales Katona
Graeme Geldenhuys wrote / napísal(a): I use getText in my game and I strip anything after 2 chars since I consider only the 2 char lang codes to be valid. Depends I guess... Ales Hi I'm working on localization for the fpGUI project. My idea is for the fpGUI toolkit to look for

Re: [fpc-devel] In FPC written FPC Debugger

2008-02-22 Thread Ales Katona
Paul Ishenin wrote / napísal(a): And we need: 1. abstraction layer to use gdb or native debugger or any other debugger 2. program interface which can satisfy fpc ide, mse ide, and lazaraus ide I agree 100% on this, unless gdb people don't accept patches at all I think this is the way to go.

Re: [fpc-devel] Threads and alot of crap continued

2006-11-08 Thread Ales Katona
On st , 2006-11-08 at 07:35 +, Vinzent Hoefler wrote: On Tuesday 07 November 2006 16:10, Ales Katona wrote: As for general use, you can't do a Timer this way. Believe me, I can. :) You can't just put a TTimer in which works in it's own thread and then calls some callback

Re: [fpc-devel] CSuspendThread/CResumeThread

2006-11-08 Thread Ales Katona
Jonas currently fpc2.1.1 doesn't compile on 2.1.1 with: rtl/units/i386-freebsd -di386 -dRELEASE ../unix/cthreads.pp cthreads.pp(252,42) Error: Incompatible type for arg no. 1: Got LongInt, expected Pointer Note: unixtypes thread_t = pointer pthreads.inc thread_t (BSD and linux) = cInt {linux is

Re: [fpc-devel] CSuspendThread/CResumeThread

2006-11-08 Thread Ales Katona
A cleaner naming of problematic parts: 1. TThreadID is defined stand-alone not as a pthread_t, should be fixed. 2. TThreadHandler (the callback for resume, suspend) has result as DWord while posix stuff (pthread_kill etc.) usualy return cInt 3. in linux I saw pthreads functions return longint, I

Re: [fpc-devel] Threads and alot of crap continued

2006-11-08 Thread Ales Katona
You can call a callback in same thread, but since you can't ensure what the callback does from your lib you can't make it threadsafe in any way. Even if you put the callback itself into a criticalsection it might eg: change some variable which was just in use by the main thread, and once the

Re: [fpc-devel] CSuspendThread/CResumeThread

2006-11-08 Thread Ales Katona
Just define an opaque type TThreadResult: TThreadResult = DWord // Windows TThreadResult = cInt // Unices I don't like this solution for several reasons: 1. What if one OS has more backends for threading available, which differ in this? 2. How are we going to handle error states on

[fpc-devel] lNet telnet

2006-11-08 Thread Ales Katona
Whoever first told me about bad input from lNet telnet example, could you please try again to see if it still persists? I did some fixes related to input and certain telnet commands recently which might fix it. Thanks (sorry I forgot who it was and deleted the mail since then) Ales

Re: [fpc-devel] Threads and alot of crap continued

2006-11-07 Thread Ales Katona
This is how lNet already works, no ? Where's the difference ? Indeed but it's only there because there's no other way, if I could just make it magicly work without CallAction I'd love to. You can't call callbacks in threads (you can but only in one thread, not between threads), and you can't

Re: [fpc-devel] Threads and alot of crap continued

2006-11-07 Thread Ales Katona
Of course, because the common concept of a timer is as asynchronous as in multi-threaded or even interrupt. You're not seriously trying to work around that simple fact, do you? Actualy I am, because lNet is single-threaded non-blocking. As for general use, you can't do a Timer this

Re: [fpc-devel] CSuspendThread/CResumeThread

2006-11-07 Thread Ales Katona
On ut , 2006-11-07 at 18:39 +0100, Jonas Maebe wrote: Hello, Does anyone see a problem with the following CSuspendThread/ CResumeThread implementations? function CSuspendThread (threadHandle : TThreadID) : dword; begin result := pthread_kill(threadHandle,SIGSTOP);

Re: [fpc-devel] Mutex!

2006-11-04 Thread Ales Katona
There's no visible mutex interface in fpc right now. ATM all non-windows platforms have semaphores in the ThreadManager but the windows ones afaik don't. I think you can simply use CriticalSection instead of mutex to achieve what you need. Ales ___

Re: [fpc-devel] About the new package manager and networking

2006-11-04 Thread Ales Katona
- lnet (Ales, will you do this or not, I was actually waiting with my implementation?) I mailed you yesterday, I get this error trying to compile fppkg: Target OS: FreeBSD/ELF for i386 Compiling fprepos.pp Fatal: Can't find unit streamcoll Seems it's either not installed with fcl or there's

Re: [fpc-devel] About the new package manager and networking

2006-11-04 Thread Ales Katona
On so , 2006-11-04 at 18:17 +0100, Marco van de Voort wrote: streamcoll My make all install on freebsd of this morning installed a unit streamcoll, so probably already fixed. I confirm, latest 2.1.1 works. ___ fpc-devel maillist -

Re: [fpc-devel] About the new package manager and networking

2006-11-04 Thread Ales Katona
Ok I tested it and I got an odd bug. When I writeln the buffer contents before writing them to the Dest stream, they are ok. But the resulting file is a garbage of xterm crap (mostly symbols) with exactly same size as the thing I downloaded (completly different data). I've no idea where to look,

Re: [fpc-devel] About the new package manager and networking

2006-11-04 Thread Ales Katona
Oh DOH thanks, it was the pointer stuff. Sometimes I wished fpc warned if you pass a pointer to untyped var. In any case pkglnet.pas is in now, I tested with the example and it worked. Only HTTP yet, but I'll do FTP ASAP. Ales ___ fpc-devel maillist

Re: [fpc-devel] About the new package manager and networking

2006-11-04 Thread Ales Katona
Wanted to ask, how should I process the URL? Should I also understand : as separator for port eg: http://www.shit.com:3030 ? Shouldn't this be parsed by some common function? Eg: procedure ParseURL(var Host, URI: string; var Port: string); This way we can save the hassle for all the backends

[fpc-devel] About the new package manager and networking

2006-11-03 Thread Ales Katona
. -- Ales Katona [EMAIL PROTECTED] signature.asc Description: Toto je digitálne podpísaná časť správy ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] About the new package manager and networking

2006-11-03 Thread Ales Katona
but am open to suggestion. Btw, do you plan to add support for concurrent downloads and compiling while downloading later? -- Ales Katona [EMAIL PROTECTED] signature.asc Description: Toto je digitálne podpísaná časť správy ___ fpc-devel maillist

Re: [fpc-devel] Threads and alot of crap

2006-10-16 Thread Ales Katona
I've implemented the semaphores stuff (with a big bad bug, btw thanks Jonas for fixing). Right now I'm thinking about how to go next. The choices I see right now are: 1. Basicly just clean the current pthreads implementation, make sure types are not redefined in baseunix/unixtypes and pthreads

Re: [fpc-devel] Threads and alot of crap

2006-10-16 Thread Ales Katona
On po , 2006-10-16 at 22:21 +0200, Daniël Mantione wrote: Op Mon, 16 Oct 2006, schreef Ales Katona: Write your ideas on the subject please. Short answer: Kick pthreads and use kernel threads. That's a nice idea but there are a few problems. Kernel threads for example in freeBSD require

[fpc-devel] Threads and alot of crap

2006-10-09 Thread Ales Katona
I've had the honor of looking at current TThread/pthreads/cthreads implementation in unix (FreeBSD to be precise) and found it extremely bad. Not to criticize, I'm here to ask for permission/toughts on adding a few standard methods to TThreadManager. I would like to add semaphore functions to

[fpc-devel] Old sockets stuff and SSockets...

2006-10-04 Thread Ales Katona
I'm currently about to fix certain issues with old sockets functions. I'm talking about Accept and Connect functions with Text parameters. These are currently only present in win32 sockets and are basicly a leftover from an old idea gone wrong. I want to remove them but if someone feels that

Re: [fpc-devel] Suggestion for change: Overly strict check

2006-10-02 Thread Ales Katona
Having same function names as parameter names per se isn't a biggy but the biggest problem is: TFirst = class protected FFirst: Integer; public property First: Integer read FFirst write FFirst; end; TTest = class(TFirst) FSomething: Integer; public procedure DoWithFirst(a, First:

Re: [fpc-devel] Suggestion for change: Overly strict check

2006-10-02 Thread Ales Katona
Ales, there is _no_ confusion here. Oh believe me there is. Especialy if you're writing just some little overriden method in a class which doesn't even have property visible anymore. You don't think about it and bang, error and a very neatly hidden one at that. It's not that I don't know what

Re: [fpc-devel] Suggestion for change: Overly strict check

2006-10-02 Thread Ales Katona
Here's the better example: TTest = class protected FField: Integer; public procedure Helper(Field: Integer); property Field: Integer read FField write FField; end; { TTest } procedure TTest.Helper(Field: Integer); begin with Self do Field:=Field;

Re: [fpc-devel] gtk1 linklib directive under FreeBSD

2006-05-18 Thread Ales Katona
On ut , 2006-05-09 at 09:35 +0200, Mattias Gaertner wrote: I heard that the gtk1 libs under FreeBSD are libglib-12.so, libgdk-12.so and libgtk-12.so. But at the moment the linklib directive for FreeBSD defines {$ifdef FreeBSD} gtkdll='gtk12'; {$linklib gtk12} without the

Re: [fpc-devel] Unix sockets for Windows

2006-05-05 Thread Ales Katona
Alexander Todorov wrote: Hello, I have an application that uses TCP sockets nut it is going to be changed with UNIX sockets. Can you point me to some easy and clean approach how to emulate UNIX sockets for Windows. The only thing I can think of is using named pipes and encapsulate the

Re: [fpc-devel] OS aware RTL proposal

2006-03-12 Thread Ales Katona
Daniël Mantione wrote: I don't like to do the abstraction at the syscall level, but one level higher, i.e. the Tstream implementation. The reason is that the operating system abstraction happens at this level: - OS abstraction wis present here. - Emulating missing system calls is often much

Re: [fpc-devel] OS aware RTL proposal

2006-03-12 Thread Ales Katona
Michael Van Canneyt wrote: How does this make it a reason ? libfprtl will always be specific to the distribution it was compiled on. If tuned, it should be tuned to that system. Just like libc or any library close to the system is. Don't try to copy a binary libc.so from a SuSE to a Fedora

Re: [fpc-devel] OS aware RTL proposal

2006-03-12 Thread Ales Katona
Daniël Mantione wrote: You can safely use the new select; it is at least present since Linux 2.2 and more likely 2.0. Daniël Hmm I'll update the RTL then. Thanks Ales ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] OS aware RTL proposal

2006-03-10 Thread Ales Katona
First: only Linux has the main problem. BSD never renumbers ABI calls, newer abi calls have a different prototype. No even BSD adds new stuff from time to time, like kqueue, altho that's older. As long as only syscall nrs change. This rarely happens. Usually something gets 64-bit, or has

Re: [fpc-devel] OS aware RTL proposal

2006-03-10 Thread Ales Katona
This is manifestly wrong: Sure, there are new syscall numbers in linux, but the old numbers still work as they always have. Proof: The current set of numbers already works since 10 years. I'm not saying you'll have the latest features with the old numbers, but that is irrelevant. Windows

Re: [fpc-devel] OS aware RTL proposal

2006-03-10 Thread Ales Katona
Tomas Hajny wrote: That's the main point, I guess. As it is now, we have to decide and either sacrifice the new features, or compatibility with slightly older platforms. My understanding is that the proposal of Ales was related to exactly this situation. If I understand it correctly, his

Re: [fpc-devel] Type definition

2006-03-04 Thread Ales Katona
Paul Davidson wrote: If there compelling reason why type definitions cannot be included in class/object definitions? Make it mode FPC to keep folks happy :) Quite often a type is defined in INTERFACE part, but only used within class/object defined in same unit. 1) This means that type is

Re: [fpc-devel] MSEide + MSEgui - FPC Wiki

2006-03-03 Thread Ales Katona
Looks like a pretty cool widgetset for lazarus to me... Hi, would the FPC team mind if we'd use the FPC Wiki to document the use of the MSEGui library and the Ide ? It is completely written in pascal, voiding the need to endlessly update bindings to gtk/qt etc :-) kind regards, Den Jean

[fpc-devel] samplecfg patch

2006-02-08 Thread Ales Katona
This patch makes samplecfg use $fpcversion instead of hard versioning. Ales P.S: it works even with primitive /bin/sh on bsd so I guess nothing was broken Index: compiler/utils/samplecfg === --- compiler/utils/samplecfg (revision

[fpc-devel] [Fwd: Kqueue update + Sendfile support for FreeBSD]

2006-02-03 Thread Ales Katona
Try 2... ---BeginMessage--- This is an update kqueue and a sendfile support for freeBSD with example. Kqueue will run on all BSDs (I've added other syscall_nrs for it) but sendfile is specific to FreeBSD. Ales kqueue_sendfile.tar.gz Description: application/gzip ---End Message---

[fpc-devel] lNet in packages

2006-02-03 Thread Ales Katona
I was wondering if I could put lNet library (for those who don't know, go to http://members.chello.sk/ales ) into packages. What do you think? Ales ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] lNet in packages

2006-02-03 Thread Ales Katona
I'll be honest to say that I don't care much if it's in FCL or Packages/Bare or Extra but the fp is not going to happen. Names are already done and they are used, I can't rename the API. Ales ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

[fpc-devel] FreeBSD/kqueue

2006-01-31 Thread Ales Katona
These files add kqueue to the FreeBSD rtl. the new FreeBSD.pas file will need to be put in rtl/freebsd dir. I think the kqueue.inc files should be in common BSD dir as 3 out of 4 major bsds (darwin being one) now support it. demo-kqueue1.pas is a simple process watching example. Ales P.S:

Re: [fpc-devel] FreeBSD/kqueue

2006-01-31 Thread Ales Katona
peter green wrote: if 3 out of the 4 major bsds support it shouldn't it be in a generic bsd unit? It should be split into include which belong to BSD and specific OS units which belong to specific OS dirs which use those includes. Ales ___

Re: [fpc-devel] FreeBSD/kqueue

2006-01-31 Thread Ales Katona
It will force users into {$ifdefs} anyhow because older versions (especialy macosX where it's only since 10.3) won't work with it. Ales ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] using sockets on linux and win32

2006-01-26 Thread Ales Katona
Stefan Kisdaroczi wrote: Hi, im trying to use sockets in a unit which should work on linux and win32. I use the sockets unit, but for things like SOL_SOCKET, TTimeval (for setsockopt), SO_RCVTIMEO, fpgeterrno I finally had to use unix,unixtype,baseunix. This on Linux. Now I try to compile

Re: [fpc-devel] patch for unit sockets

2006-01-16 Thread Ales Katona
Marco van de Voort wrote: SocketError should be a threadvar, I think Socketerror is legacy. Use fpgeterrno (or errno) to get the error. 1.0.x had no threadsupport ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] patch for unit sockets

2006-01-16 Thread Ales Katona
I propose to make SocketError a function with hidden OS specific get-ers. This will make it threadsafe and cross-platform. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

[fpc-devel] Errors patch, c'est la vie

2006-01-06 Thread Ales Katona
Ok a bit strange topic.. this is the latest gratest version. The archive contains rtl subdir with added .inc files for platforms I'm sure of and the diff to change errors.pp. Someone who has access to other platforms will have to fill in their .inc files. Ales errors.tar.gz Description:

[fpc-devel] Errors patch AGAIN

2006-01-03 Thread Ales Katona
type'); { EMEDIUMTYPE } +{$i errors.inc} // BSD or Linux ones Function StrError(err:longint):string; Procedure PError(const s:string; Errno : longint); { This file is part of the Free Pascal run time library. Copyright (c) 2005 by Ales Katona Contains BSD

[fpc-devel] Patch for bug #4641

2005-12-29 Thread Ales Katona
This isn't exactly a patch but a changed errors.pp file. It's for all BSDs (AFAIK, it seems even darwin has errors this way) so someone from rtl maintainers needs to decide how to split errors.pp (the current one in rtl/unix is Linux specific) Ales { This file is part of the Free Pascal

Re: [fpc-devel] Benchmark for FreePascal

2005-12-22 Thread Ales Katona
Marco van de Voort wrote: (small post note in this discussion: a customer complained that his app was a lot slower (till 3 times) with D2006/FastMM. I'm still investigating, and it seems that somehow FastMM must more often copy when reallocating than the old MM for large blocks (big as in the

Re: [fpc-devel] PR: What sites to spam for 2.0.2 release?

2005-12-09 Thread Ales Katona
Don't forget to tell PGD. Why is OSNews and /. out ? Ales ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] PR advancement

2005-12-03 Thread Ales Katona
Reading FPC and Lazarus mailing lists, and I don't see such problems. And I understood the FAQ, even though IANAL. There's a text Read again. Lazarus list had a very long discussion about LCL and LGPLv2 It is therefore possible to create closed source or proprietary software using Free

Re: [fpc-devel] PR advancement

2005-12-03 Thread Ales Katona
So I fully agree to Ales that the FPC homepage needs a wow style. Despite I do like clear, simple homepages I don't think that this gives us good PR. Without offending Michael and others for their effort creating and maintaining the website, I think these pages induce the impression that FPC is

[fpc-devel] PR advancement

2005-11-23 Thread Ales Katona
I think the simplest and perhaps most important change to get better PR for both Lazarus and FPC is the web page. It needs to be more wow style. News have to be a bit propagandistic. A FAQ is IMHO required with first questions like: 1. Is Free Pascal/Lazarus really free? 2. Can I use Free

Re: [fpc-devel] PR advancement

2005-11-23 Thread Ales Katona
Michalis Kamburelis wrote: Ales Katona wrote: 1. Is Free Pascal/Lazarus really free? The freeness of FreePascal is already advertised in a lot of places, including the very name FreePascal. Current FAQ mentions (more than once) that the compiler is GPLed. I don't think there's any need

Re: [fpc-devel] Templates / Generics

2005-11-08 Thread Ales Katona
[EMAIL PROTECTED] wrote: You stated that we could know already what the delphi-syntax will be, if they add generics over two years. But we can't, since we don't know what 'pascal-styled' way they will choose. I would say that a pascal-way is adding the 'interface' keyword. Like in array's

Re: [fpc-devel] Re: Thread REVERT (Ales Katona)

2005-11-07 Thread Ales Katona
Thomas Schatzl wrote: From: Ales Katona [EMAIL PROTECTED] What about simply disabling such -Ct compiler switch (with nice error message) under Windows ? Or maybe it should do nothing under Windows ? I have no idea how -Ct works. It seems there are also report(by Pavel to be more precise

Re: [fpc-devel] Thread REVERT

2005-11-06 Thread Ales Katona
What about simply disabling such -Ct compiler switch (with nice error message) under Windows ? Or maybe it should do nothing under Windows ? Regards Boguslaw Brandys I have no idea how -Ct works. It seems there are also report(by Pavel to be more precise) that -Ct causes problems with

Re: [fpc-devel] win32 patch for threads

2005-11-05 Thread Ales Katona
Florian Klaempfl wrote: Aplied, also for wince and netware. Sorry, it seems I broke Unix and all non-stdcall-using platforms. This patch fixes that(apply after the first one) but it only {ifdefs} windows, not netware or others, so please add those as necessery. Ales Index:

[fpc-devel] Thread REVERT

2005-11-05 Thread Ales Katona
Please remove ALL of my win32 thread patches(not the stacksize ones tho). Thanks to neli, I now know that ThreadFunc is not called directly by the OS, but my ThreadMain which already IS stdcall. My bug with threads was actualy cause by a -Ct (check stack) switch which in win32 always causes a

Re: [fpc-devel] Templates / Generics Syntax

2005-11-04 Thread Ales Katona
Micha Nelissen wrote: Marc Weustink wrote: BTW, what woud be the problem with type TMySpecificClass = TGenericClass(TObject, Integer); Or: code type TGenericCollection = generic(T: TCollectionItem) class(TComponent) ...implement TCollection and use T end; TCollection =

Re: [fpc-devel] Templates / Generics Syntax

2005-11-04 Thread Ales Katona
Example: procedure MyProc(T); // generic procedure without parameters ver i: T; begin ... end; procedure MyProc(T: TClass); // non generic procedure begin end; Call MyProc(TObject); What will happen? Mattias Sky will reign fire: procedure (var T); begin // generic or not?? end;

[fpc-devel] Threads patch PS

2005-11-04 Thread Ales Katona
I forgot to mention it's against 2.0.1 ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

[fpc-devel] fpNanoSleep vs Select()

2005-10-07 Thread Ales Katona
Hello, I'd like to ask why Sleep() function in unix world uses Select() instead of fpNanoSleep()? Is there a particular reason? After a somewhat riggid discussion on the channel yesterday I came up testing threading using sleep() and nanosleep(). The difference in speed is huge. I'm prepared

[fpc-devel] Libc patch 2

2005-09-23 Thread Ales Katona
Apply after the 1st one. This patch fixes crypto function in libc unit. Ales Index: crypth.inc === --- crypth.inc (revision 1156) +++ crypth.inc (working copy) @@ -1,9 +1,9 @@ { defined earlier in unistdh.inc... -function

Re: [fpc-devel] Libc patch 2

2005-09-23 Thread Ales Katona
Ales Katona wrote: Apply after the 1st one. This patch fixes crypto function in libc unit. Ales Index: crypth.inc === --- crypth.inc (revision 1156

[fpc-devel] Sockets patch for the patch :)

2005-07-26 Thread Ales Katona
Sorry I looked at the wrong unix part (it was in ifdef cpu64) so I used int64 in windows. This patch (apply after the 1st one) changes ssize_t to cint32 as it should be on 32bit systems. Sorry again, Ales Index: sockets.pp ===

[fpc-devel] Win32 sockets patch

2005-07-25 Thread Ales Katona
There is an ugly type bug in win32 sockets.pp. This patch fixes it. ssize_t = cuint16 -- this caused a bug with fprecv/fprecvfrom and fpsend/fpsendto calls because winsock.recv[from]/winsock.send[to] calls return a longint while fprecv used an unsigned int as return value. This caused the

[fpc-devel] TFPObjectList patch

2005-06-22 Thread Ales Katona
This patch adds TFPObjectList to contnrs. It's a descendent of TFPList and uses same tricks to gain speed.(inline etc.) I've tested with bubblesort and it was 1/3 faster. P.S: I wanted to get rid of inherited calls too but FCount is private in TFPList ;( Ales Index: fcl/inc/contnrs.pp

[fpc-devel] GetText patch #2

2005-06-22 Thread Ales Katona
This patch (ment for 2.1.1) cleans some of my old unnecessery mess but more importantly adds the GetLanguageIDs() method. This way, you can see what language was/will be autodetected. Good for those special holiday occasions. Works on win32 as well as POSIX. Ales P.S: sorry, I didn't think

Re: [fpc-devel] OpenGL patch, final(I hope)

2005-06-21 Thread Ales Katona
Florian Klaempfl wrote: Ales Katona wrote: Ok this patch does the following: Removes the writeln() in case the library fails to load. If the whole library is not found, it throws an exception which tell the library name. If any method within the library is not found it throws an exception

[fpc-devel] OpenGL library loading

2005-06-20 Thread Ales Katona
I've noticed that openGL libraies are loaded in the initialization section and if the loading fails it writelns something and halts. I think this is innapropriate. I've made some changes but first I want to know your opinion. Do you think it's better to let the user load the library(via some

[fpc-devel] OpenGL patch

2005-06-20 Thread Ales Katona
Ok so here's the patch. If you feel some things should change, tell me about it. This patch adds TryLoadGL[u[t]] and GL[u[t]]IsLoaded methods and also fixes the crash on win32 if opengl is not present. (but it will still crash later, if the user doesn't check) Ales Index:

Re: [fpc-devel] Library and unit search paths under MacOSX with fpc 2.0.0?

2005-06-15 Thread Ales Katona
Your fpc.cfg file is ether not existing, in the wrong place or wrongly configured. I don't know where it should be on MacOSX but if you find it fix the -Fu entries so they point to right locations(note: $fpcversion etc. are variables, leave them as they are: for example in here:

Re: [fpc-devel] Library and unit search paths under MacOSX with fpc 2.0.0?

2005-06-15 Thread Ales Katona
Micha Nelissen wrote: On Wed, 15 Jun 2005 08:29:54 +0200 Ales Katona [EMAIL PROTECTED] wrote: Your fpc.cfg file is ether not existing, in the wrong place or wrongly configured. I don't know where it should be on MacOSX but if you find it It's not so simple, I think, because

[fpc-devel] GetText patch

2005-06-08 Thread Ales Katona
This patch makes GetText/TranslateResourceStrings(FileName) work in win32. (it didn't detect the right language under win32 before it worked only in POSIX enviroments) GetLanguageIDs is used with permission from Vincent(it's his code in lazarus) Ales Index: fcl/inc/gettext.pp

Re: [fpc-devel] Re: [fpc-l] type discussion

2005-06-02 Thread Ales Katona
Jamie McCracken wrote: Marc Weustink wrote: What is easier to read is a matter of taste. Being a pascal devel for years now, it takes time to decode a a := b := c := d := 0 line. There might be a ; inbeween which results in a complete different assignment. With such lines I've to read

Re: [fpc-devel] Re: [fpc-l] type discussion

2005-06-02 Thread Ales Katona
Marco van de Voort wrote: Also, I simply don't see the use of it. Borland Pascal's have the forward directive for those really few cases where it is annoying. Also, forward declarations mostly mean shitty code / design. Atleast in my case it does.

Re: [fpc-devel] Re: [fpc-l] type discussion

2005-06-01 Thread Ales Katona
Gerhard Scholz wrote: var x : type1, y : type2 ; x *:= y ; in my humble opinion(IMHO): := is based on the fact that A: is written normaly in math etc. where it means this is a fact about A So when someone writes A:=5; it means it's a fact that A

Re: [fpc-devel] integer, cardinal

2005-04-18 Thread Ales Katona
Vinzent Hoefler wrote / napísal (a): On Sunday 17 April 2005 10:45, Ales Katona wrote: First of all Integer should be size independent, that is, xy bits depending on the platform. I second that. Second, we should force people in a friendly way to use more readible names like: sint32

Re: [fpc-devel] integer, cardinal

2005-04-17 Thread Ales Katona
Jonas Maebe wrote / napísal (a): On 17 Apr 2005, at 09:38, Yury B. wrote: for 32-bit x86... or does 64-bit platform also uses 32-bit integers as default, so that longint would be good? JM It would break a lot of existing code if we did that. You can perfectly JM define integer to be

Re: [fpc-devel] Friend classes?

2005-03-20 Thread Ales Katona
DrDiettrich wrote / napísal (a): Ales Katona wrote: C++ requires friend only because it lacks the idea of modularity. Since all classes are apart they need some way to tell each other I can use you In pascal you simply put them into 1 unit. That's why the C++ model is better, there exists

Re: [fpc-devel] Friend classes?

2005-03-18 Thread Ales Katona
Michael Van Canneyt wrote / napísal (a): On Wed, 16 Mar 2005, DrDiettrich wrote: Michael Van Canneyt wrote: type TFriendClass = class(TNotMyClass); This is a simple descendent. Yes and no. The only purpose of this declaration is to get access to the protected members of the class, not to

Re: [fpc-devel] RE: Hint: Parameter sender not used

2005-03-12 Thread Ales Katona
Jeff Pohlmeyer wrote / napísal (a): This is not a big issue, anyway could we avoid the endless list of such similar hints compiling Lazarus and our program? I frequently find a similar annoyance with c library callbacks. For instance, most gtk functions have a user_data parameter that is

Re: [fpc-devel] Modernising Pascal

2005-02-25 Thread Ales Katona
Jan Ruzicka wrote / napísal (a): Enough guys each camp can make distinct implementation. Use this forum to discuss an interface. Let the results speak for themselves. Lets discuss test code. Lets discuss benchmark code. Instead of discussing bunch of what-ifs let's see how the implementation

[fpc-devel] fpc/fcl/image buggy

2005-02-14 Thread Ales Katona
Reading certain JPEGs results in a JPEG error. One such is http://members.chello.sk/ales/title.jpg Just try to convert it to a PNG by imgconv(also present in fpc/fcl/image) ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

[fpc-devel] XMLCfg leaking

2005-02-06 Thread Ales Katona
Try this program with a corrupted xml file(just delte part of a tag or something) Compile with -ghl and you'll get a few bytes leaked. program xmltest; {$mode objfpc}{$H+} uses SysUtils, XMLCfg; function LoadXML(var axml: TXmlConfig; const filename: string): boolean; begin writeln('Loading');

Re: [fpc-devel] FPC 1.9.6 (a.k.a. 2.0.0-RC1) is out

2005-01-04 Thread Ales Katona
Jonas Maebe wrote: On 4 jan 2005, at 15:27, peter green wrote: lazarus is essentially what completes the cloning of delphi by freepascal. I prefer to think that we're much more than just a clone of Delphi :) In fact, I've never even used Delphi in my entire life (nor really used Lazarus, for

  1   2   >