Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-04 Thread Ewald
ileNameA = ^TOpenFileNameA; Function GetSaveFileNameA(arg: POpenFileNameA): windows.bool; stdcall; external 'comdlg32' name 'GetSaveFileNameA'; === code end === -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lis

Re: [fpc-pascal] Windows programming tutorials for FPC

2018-11-03 Thread Ewald
no problem with the GUI being written for a large part in a different language, have a look at Qt (possible with Qt4pas, if you insist on using pascal for the GUI). Anyway, enough on the toolkits out there, a google search will quickly yield you a lot more than I can mention in this mail :-) -- Ew

Re: [fpc-pascal] String message methods and the self parameter

2018-01-07 Thread Ewald
e this feature was present, probably while the syntax was still "data: pointer" instead of "var data"? Anyway, I'll file a bug against the documentation in a couple of days or so. -- Ewald ___ fpc-pascal maillist

[fpc-pascal] String message methods and the self parameter

2018-01-06 Thread Ewald
t are the exact criteria: the parameter name, the parameter type, ...? 3. Can anybody explain what the part "The result of this is that it is possible to pass Self as a parameter to such a method." entails? How can it be passed with DispatchStr? 4. Can somebody give an example on h

Re: [fpc-pascal] Convert to int64 note

2017-07-14 Thread Ewald
ow what the case is there. Mostly I use the smaller types for a variety of very basic range limitations: when I declare something as a byte, its value can never be larger than 255, which can come in handy at times. Think about a lookuptable for a CRC calculation unit for example. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] named parameter

2017-05-28 Thread Ewald
; > the first two parameters are mandatory, the third is optional. > Calls to P with 2 and 3 parameters are both valid. You realize you can already do this, right? See https://www.freepascal.org/docs-html/ref/refsu64.html#x176-19800014.4.1 -- Ewald ___

Re: [fpc-pascal] [FPC-Pascal] FPC Graphics options?

2017-05-23 Thread Ewald
quot; for a list of other related switches. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] List pre-defined defines

2017-05-17 Thread Ewald
On 16/05/17 23:53, Mattias Gaertner wrote: > touch mytest > fpc -vc mytest Perhaps a one-liner: fpc -vc /dev/null ? Saves one the need to create a dummy file and remove it afterward ;-) -- Ewald ___ fpc-pascal maillist - fpc-

Re: [fpc-pascal] Correct syntax for initialized constants/variables

2017-04-27 Thread Ewald
;), (a: 17;) ); Note: this is written from memory, syntax might differ a little (but the error messages from the compiler should help you out in that case). -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.free

Re: [fpc-pascal] Docs: Type A = Integer?

2016-11-14 Thread Ewald
page is >> talking about include directive and that type definition is not >> related in >> anyway with paragraphs below or above it. > > Indeed, in SVN it is no longer there. Ah, ok. So in the next release that issue will be fixed in the online version as well then.

Re: [fpc-pascal] Docs: Type A = Integer?

2016-11-14 Thread Ewald
On 13/11/16 23:33, Mattias Gaertner wrote: > Maybe this helps: > http://www.freepascal.org/docs-html/current/ref/refse19.html Close, yet presence of that particular line in the section on the include directive is, at least for me, not yet unraveled ;-) --

[fpc-pascal] Docs: Type A = Integer?

2016-11-13 Thread Ewald
Hello, Section 1.2.40 of Programmers guide (http://www.freepascal.org/docs-html/prog/progsu40.html#x47-460001.2.40) says, somewhere in the middle: Type A = Integer; Is it supposed to be there? If so, what is it supposed to mean? -- Ewald

Re: [fpc-pascal] Incorrect Process startup

2016-11-07 Thread Ewald
tps://linux.die.net/man/2/fork https://linux.die.net/man/3/exec > I have found through experimenting: > > a pause of 100ms after running the process will fix 80% of cases. Probably because the child has exec'ed by this time, if I had to guess. -- Ewald __

Re: [fpc-pascal] GZip - Stream decompress only in memory

2016-09-04 Thread Ewald
mpressStream(InStream: TStream; OutStream: TStream): Integer; function ExtractStream(InStream: TStream; OutStream: TStream): Integer; I think this is what you are looking for. I don't know about file headers. At least it would form a good starting point. Good

Re: [fpc-pascal] A better way?

2016-04-14 Thread Ewald
e there’s no obvious name to use for the file now. Mutually exclusive classes are mutually exclusive to classes which have dependencies on one another ;-) Or am I missing something? -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepas

Re: [fpc-pascal] Mangle name in fpc-FreeBSD ?

2016-03-20 Thread Ewald
he case, then you should probably report a bug. The man page of at least linux and freeBSD indicate that it should be a pointer. However, I would like to note that on linux, using revision 32828, TLibHandle is defined as a ptrint, which is correct. -- Ewald

Re: [fpc-pascal] Mangle name in fpc-FreeBSD ?

2016-03-20 Thread Ewald
return value of LoadLibrary has the same width). In your example you used an integer. Is sizeof(Integer) = sizeof(Pointer) of your system? If for example, you are missing the upper four bytes of the pointer, the above message makes sense. -- Ewald

Re: [fpc-pascal] Mangle name in fpc-FreeBSD ?

2016-03-20 Thread Ewald
ead of "hn: TLibHandle"? I don't know if it can be assumed that this handle will always be an integer (think, for example, pointer)? Just a thought. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Mangle name in fpc-FreeBSD ?

2016-03-19 Thread Ewald
On 03/19/2016 08:53 PM, Marco van de Voort wrote: > In our previous episode, Ewald said: >>> Re-huh..., it should be a great plus if a dlerror() was implemented in fpc >>> too. >>> >>> But maybe I am missing something, maybe dlopen(), dlsym() and dlerror()

Re: [fpc-pascal] Mangle name in fpc-FreeBSD ?

2016-03-19 Thread Ewald
eAddress(...); If Y = nil Then WriteLn('Y: ', dlerror); Z:= GetProcedureAddress(...); If Z = nil Then WriteLn('Z: ', dlerror); It is really nothing more than a function call, quite similar to fpGetErrNo. > I am in the dark. Being in the dark is posi

Re: [fpc-pascal] Mangle name in fpc-FreeBSD ?

2016-03-19 Thread Ewald
r debugging purposes, just add Function dlopen(filename: PChar; flags: cint): Pointer; cdecl; external; Function dlclose(handle: Pointer): cint; cdecl; external; Function dlsym(handle: Pointer; Name: PChar): Pointer; cdecl; external; F

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Ewald
On 01/30/2016 08:22 PM, Anthony Walter wrote: > Ewald, > > Maybe you should go to the forums and enlighten everyone. I provided > the link in my last reply. You missed the point. It is not my intention to shove my opinion down anyone's throat. I do however think that reinvent

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Ewald
On 01/30/2016 08:09 PM, Anthony Walter wrote: > Ewald, > > If you read the threads on the Lazarus forums I'm not subscribed to that forum as I do not use lazarus. I use freepascal without an IDE. So by all means: enlighten me :-) > you'll see the points people are making w

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Ewald
ng a secondary set of documentation the "terrible" state won't improve, now will it? -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Pascal Lexical Diagrams

2016-01-30 Thread Ewald
will be appear > under the Free Pascal language Lexical topic: > > http://cache.getlazarus.org/images/lexical-diagrams.png What's wrong with those found in the documentation? (for example: http://www.freepascal.org/docs-html/ref/refse105.html

Re: [fpc-pascal] got SIGSEGV with objfpc dialect

2015-09-13 Thread Ewald
On 09/13/2015 03:25 PM, che fou wrote: > Atm i don't know how to report , i'll try to figure out how to Try http://bugs.freepascal.org/ -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cg

Re: [fpc-pascal] which GUI (noob)

2015-08-05 Thread Ewald
op; (although functions/procedures are terminated using `end ;` as well) Extra feature: inherent concurrency support. I don't know about classes or generics, those will probably be in an newer standard. But who needs those? -- Ewald ___ fpc-p

Re: [fpc-pascal] Basic Sockets in FreePascal

2015-07-26 Thread Ewald
he same as you would have in C, but all functions are prefixed `fp` (as are most other low level functions on *nix BTW). [1] http://www.freepascal.org/docs-html/rtl/sockets/index-5.html -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freep

Re: [fpc-pascal] How to use a static method as procedure variable?

2015-07-05 Thread Ewald
be careful and write a small sanity test that checks correct operation every time you use a new compiler. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-20 Thread Ewald
is available to set the environment variables[1]. Using a TProcess, try setting the `Environment` property before running it[2]. Hope it helps :-) [1] http://linux.die.net/man/3/exec [2] http://www.freepascal.org/docs-html/fcl/process/tprocess.environment.html -- Ewald __

Re: [fpc-pascal] How to get the permission f a file ?

2015-06-17 Thread Ewald
al.org/docs-html/rtl/baseunix/stat.html -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] loadlibrary() unsafe ?

2015-06-12 Thread Ewald
issue :-) I wonder if you have tried to set the environment variable `LD_LIBRARY_PATH` to contain `the_path_you_want` before you spawn the other process? See also http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html : section 3.3. -- Ewald __

Re: [fpc-pascal] Finally, exceptions and so on.

2015-05-14 Thread Ewald
Try Break Finally Whatever End; Repeat Try Continue Finally Whatever End Until True; End. ==== Code End -- Ewald ___ fpc-pascal maillist - fpc-pasc

Re: [fpc-pascal] Finally, exceptions and so on.

2015-05-14 Thread Ewald
for example)? -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Using Cairo lib on Linux without X

2015-04-07 Thread Ewald
ways links to it, but does not use X11 functionality when XOpenDisplay fails? Just an idea... I'm no expert on the matter. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] getaddrinfo

2015-03-29 Thread Ewald
ng. As Mark suggested, perhaps a bug in the fpc implementation (fpc does not normally use lic for it's syscalls)? Try defining the function manually, using libc's equivalent and see if it produces the same result? Just a suggestion... -- Ewald

Re: [fpc-pascal] Saving and reading TBlowfish crypted text

2015-03-18 Thread Ewald
On 17 Mar 2015, at 22:32, Graeme Geldenhuys wrote: > On 2015-03-17 18:49, Ewald wrote: >> The docs state that it is called automatically upon destruction: > > Correct, and I knew that. But I was explicitly looking at the code > Antonio supplied. > [...] > This is my i

Re: [fpc-pascal] Saving and reading TBlowfish crypted text

2015-03-17 Thread Ewald
e TBlowFishStream descendants use? e.g. EBC, CBC, STR, OFB, ... (abbreviations taken from http://en.wikipedia.org/wiki/Block_cipher_mode_of_operation) It is not documented at http://www.freepascal.org/docs-html/fcl/blowfish/tblowfishencryptstream.html I think. -- Ewald ___

Re: [fpc-pascal] how to use procedure of object in C

2015-03-09 Thread Ewald
` kind of declarations (in constrast to `Class procedure XXX; static;`). I don't know how long that is going to last however (since this hidden parameter thingy is an implementation detail of the compiler I think). So I fully agree: it would be a kindness of the compiler people to confirm this

Re: [fpc-pascal] FPC embedded ? (going slightly off-topic)

2015-03-05 Thread Ewald
pping ? Stepping and microstepping can easily be implemented in the microcontroller itself, like you say. The reason you need an extra chip is the need for some power transistors arranged in a bridge configuration, something similar to the L298 or L293D, to name some popula

Re: [fpc-pascal] Cross-compile vs native

2015-01-28 Thread Ewald
On 01/28/2015 10:01 AM, Michael Schnell wrote: > On 01/27/2015 10:27 PM, Ewald wrote: >> - Without the target system, the application cannot be tested .. > This is true, only because remote debugging is not well supported. For remote debugging a target system is needed as well

Re: [fpc-pascal] Cross-compile vs native

2015-01-27 Thread Ewald
ame argument as above... Projects are identical on both platforms though (except for a few ifdefs to access OS-specific functionality). -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] OSX x86_64 make problem

2015-01-16 Thread Ewald
t/Base/fpc" Have you tried `make CPU_TARGET=x86_64 all` instead of `crossinstall`? That's how I just built the latest revision, 29488. Just a suggestion... -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fr

Re: [fpc-pascal] else and otherwise in a case statement

2014-12-11 Thread Ewald
ticed something interesting under 2.6.4 on x86 Linux. > > How can "else" be ambiguous within a case statement? If one omits the trailing semicolon (the one that's commented), the else becomes ambiguous: Case Something of Value1: ;

Re: [fpc-pascal] Question about functions returning a string

2014-12-01 Thread Ewald
nwhile, I've fixed my issue by not returning a string as a result, but as an out parameter: Function Bla: String; ... becomes ... Procedure Bla(out Result: String); This seems to work. How portable it is, I do not know, I guess time will be the

Re: [fpc-pascal] Question about functions returning a string

2014-11-30 Thread Ewald
that the other language can't do anything useful with it, my thought was that it would be possible to pass along these managed types (especially string, as it is a pointer internally) to another pascal function (a callback in my case). -- Ewald

Re: [fpc-pascal] Question about functions returning a string

2014-11-29 Thread Ewald
mov%esi,%r12d <-- second argument, %rsi 44b36b:49 89 d5 mov%rdx,%r13<-- third argument, %rdx What I forgot to mention was that this is on a x86_64 architecture, so I based myself on the table found at http://wiki.osdev.org/Call

[fpc-pascal] Question about functions returning a string

2014-11-28 Thread Ewald
anybody shed some light on this? -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Again: Use of abstract classes

2014-10-02 Thread Ewald
On 10/02/2014 05:35 PM, silvioprog wrote: > Hello, > > Someone could inform me if there is an entry in bugtracker with > references to this topic? This has already been fixed I believe. See http://lists.freepascal.org/pipermail/fpc-devel/2014-July/033930.html for more information

Re: [fpc-pascal] with statement using mulltiple objects

2014-09-16 Thread Ewald
has now evolved into is, in my opinion, off-topic. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] cthreads

2014-07-25 Thread Ewald
for this was that FPC has no dependency to libc under normal circumstances. Making cthreads the default thread manager would thus add a dependency to libc. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal

Re: [fpc-pascal] Illeagal assignment to For Loop variable in Free pascal

2014-06-17 Thread Ewald
allows assignments to for-loop counters (although I doubt it), I don't know. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Thread Safety of String

2014-06-04 Thread Ewald
C++, just QStrings. (oops, yeah, I use Qt also) Time for some nitpicking..Yay! How about: char YourString[SIZE]; It's kind of a drudgery to handle those though, so I see why you like QStrings better :-) -- Ewald ___ fpc-pascal maillist -

Re: [fpc-pascal] Java crash when fpc library CallVoidMethod in a thread.

2014-05-31 Thread Ewald
ava mechanism that allows him to `append` this checksynchronize to `the` main loop, some main-loop hook of sorts. That is IMHO the way to go for, but as my knowledge of java is rather limited, I cannot comment on the feasibility or practical details of this approach. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Java crash when fpc library CallVoidMethod in a thread.

2014-05-30 Thread Ewald
On 05/30/2014 01:15 PM, fredvs wrote: > Please read my earlier post before this one > > @ Ewald, i have try with : > > While true do > Begin > ... code ... > > CheckSynchronize; > End; > > But this does not w

Re: [fpc-pascal] Java crash when fpc library CallVoidMethod in a thread.

2014-05-30 Thread Ewald
On 30 May 2014, at 10:46, fredvs wrote: > re-@ Ewald : > >>> It *must* be called in the context of the main thread (the thread that >>> loaded the library) > > OOps, so do you mean that CheckSynchronize must be called by Java ? > So i have to add a "cus

Re: [fpc-pascal] Java crash when fpc library CallVoidMethod in a thread.

2014-05-29 Thread Ewald
p the queue that CheckSynchronize is supposed to empty. See http://www.freepascal.org/docs-html/rtl/classes/checksynchronize.html for more details on this call. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org

Re: [fpc-pascal] Create and use a wrapper class in java

2014-04-27 Thread Ewald
#x27;m not mistaking?). Your chances of getting help with some extremely simple bit of java code are a lot better that case IMHO. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Error compile library on Linux.

2014-03-26 Thread Ewald
ook me an our or so to track that one down :-) -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-14 Thread Ewald
o and fro you would be better off with a more pascalish version. The thing that comes to mind here is providing a function in your library that replaces the current memory manager with the one passed to it as an argument. This would allow you to simply return a string. -- Ewald __

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-14 Thread Ewald
; One might think at first glance that `ReturnTheAnswer^` is 42, but this is incorrect in some cases. The example here might be extremely over-simplified, but replace `a: Integer` with `mystring: String` and we're roughly at your example. -- Ewald ___

Re: [fpc-pascal] fp libraries do not like cmem ?

2014-02-13 Thread Ewald
27;t have debug info for your library this won't help you much. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] how to pass a procedure address and execute it?

2014-01-24 Thread Ewald
On 24 Jan 2014, at 22:20, waldo kitty wrote: > On 1/24/2014 3:18 PM, Ewald wrote: >> >> On 24 Jan 2014, at 21:20, waldo kitty wrote: >> >>> On 1/23/2014 2:18 PM, waldo kitty wrote: >>> >>> following up on this, how do i pass parameter

Re: [fpc-pascal] how to pass a procedure address and execute it?

2014-01-24 Thread Ewald
en calls doThis and doThat with the necessary > parameters? > Simply change the type: Type TProc = Procedure(aRecord: somerec); Then you can call whichProc (in centralControl) with your argument of choice. -- Ewald __

Re: [fpc-pascal] how to pass a procedure address and execute it?

2014-01-23 Thread Ewald
.. how? :( > First define a type to make your like easier: Type TProcType: Procedure; Next, adjust contralContol's prototype: procedure centralControl(var aValue : word; theRecord : somerec; whichProc: TProcType); And you're done:-) -- Ewald __

Re: [fpc-pascal] CPPClass Documentation?

2014-01-18 Thread Ewald
On 18 Jan 2014, at 15:22, Sven Barth wrote: > On 18.01.2014 13:45, Ewald wrote: >> Hi, >> >> This morning, I saw on fpc-devel a message titled `CPPClass`, which made >> me wonder if this keyword means what its name implies. Sadly though, >> there is not much do

Re: [fpc-pascal] CPPClass Documentation?

2014-01-18 Thread Ewald
d. Thanks for the pointer! -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] CPPClass Documentation?

2014-01-18 Thread Ewald
could shed some light on this? (Links to documentation I missed will do :-) ) -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-17 Thread Ewald
don't define THandle in your library wrapper. THandle is defined as a longint (http://www.freepascal.org/docs-html/rtl/system/thandle.html), but you need a pointer. Try putting `Type THandle = pointer;` somewhere before the first usage of this type in your library wrappe

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-17 Thread Ewald
"C" in front of the symbol). or it could be that I am completely missing something here. [for example: is the symbol `DLL_EXPORTS` defined at compile time?] -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.free

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-17 Thread Ewald
.cpp which is the windows dll > wrapper. Note one detail: it is declared there as __stdcall, not as __cdecl, so perhaps this has something to do with it? @Fred: Also note that the type HANDLE is defined there as a pointer, so [as a sanity test of sorts] sizeof(Handle {in pascal}) should

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Ewald
platform, except that you could try a similar approach as on linux (use symbol names instead of indices). OTOH it could (?) be that the the compiler inserts code to typecast PChar(1) to a string, which could result in an access violation (try `var a: string; a:= pchar(1);` to try it out ;-)

Re: [fpc-pascal] windows.GetProcAddress() vs DynLibs.GetProcAddress()

2014-01-13 Thread Ewald
] instead of the name of the function as the second argument in GetProcAddress()? Perhaps try `GetProcAddress(LibHandle, 'soundtouch_clear');` on line 54 and modify the rest in a similar fashion? Hope it helps. -- Ewald ___ fpc

Re: [fpc-pascal] MD5 decryption?

2013-12-11 Thread Ewald
for the noise. -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] MD5 decryption?

2013-12-11 Thread Ewald
though it cannot be called decryption. If I would advertise a bicycle as a car to you there would also be some confusion don't you think :-) -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] MD5 decryption?

2013-12-11 Thread Ewald
Once upon a time, silvioprog said: > 2013/12/11 Ewald mailto:ew...@yellowcouch.org>> > > Go to: http://md5decryption.com <http://md5decryption.com/> > In "Please input the MD5 hash that you would like to be decrypted:" > field, put: 7db4a8dae498d1b4686ebd1f79

Re: [fpc-pascal] MD5 decryption?

2013-12-11 Thread Ewald
Once upon a time, silvioprog said: > Hello, > > How to decrypt a MD5 in FPC?: MD5 is a hashing algorithm, not an encryption algorithm. There is more than one input for this algorithm which will generate the same hash, as opposed to a cipher.

Re: [fpc-pascal] "identifier not found" case probelm

2013-11-10 Thread Ewald
; but when i try to run it it comes up with an error saying "identifier not > found" and highlights each of the case choices .. i.e. 3: returns; > .. any help ? :( :( :( And where exactly are these functions (`returns`, `withdraw`, etc...) defined? I can't see them

Re: [fpc-pascal] Re: [Bulk] Re: Namespaces Support

2013-10-29 Thread Ewald
Once upon a time, Marcos Douglas said: > Do you (all) use prefix in Procedures and/or Functions too? ;-) Unitname.GetHandler() ? -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/

Re: [fpc-pascal] Get empty memory quickly or... an empty file

2013-09-13 Thread Ewald
Word(), ... I not, have a look at http://www.freepascal.org/docs-html/rtl/system/fillchar.html -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] synapser freezes on fopen(FDevice, 0_RDWR or 0_SYNC) on raspberry Pi

2013-07-08 Thread Ewald
etc... tcsetattr(Handle, TCSADRAIN, @Attr);// Take a look at the documentation of this call to see what constant (TCSADRAIN) you want to use. ===EOC=== Hope it helps! -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://li

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

2013-06-16 Thread Ewald
On 16 Jun 2013, at 03:18, Michalis Kamburelis wrote: > 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

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

2013-06-15 Thread Ewald
file) is reached on *blocking filedescriptors*. Note that the above is a rather sumarized explanation, but it should make the point. FYI: I've never had the problem of a `partial read` (e.g. SomeStream.Read(50) returning 36 or something) on linux, osx and windows; so perhaps you

Re: [fpc-pascal] Can someone please explain the linker to me?

2013-06-05 Thread Ewald
x27;. IIRC the part after `.so` is considered a version number (or indication thereof). The behaviour you are seeing is *probably* that the linker could not find `libcrypto.so.1.2.asdasd`, so it decides to use the one it found instead. Anyway, I don't know that much about `the lin

Re: [fpc-pascal] Placing binary data (resources) in object files?

2013-06-03 Thread Ewald
Once upon a time, Rainer Stratmann said: > For me this seems (too) complicated to do an easy thing (including some data). That, and I don't think that ld on mac os x can handle `-b` (or --format). -- Ewald ___ fpc-pascal maillist - fp

Re: [fpc-pascal] Placing binary data (resources) in object files?

2013-06-03 Thread Ewald
Once upon a time, Tomas Hajny said: > On Mon, June 3, 2013 18:09, Ewald wrote: > Well, you can obviously use tool bin2obj created with/for FPC and > distributed with FPC releases - see fpcsrc/utils/bin2obj.pp. Seriously? I should really start looking at included tools... I've got thi

Re: [fpc-pascal] Placing binary data (resources) in object files?

2013-06-03 Thread Ewald
iginal data in bytes. To read the size, just use `csize_t(@{$escapedpascalname}_size)`. Note that the above is a very quick draft (kind of a quickfix for some other project -- but is works) and thus contains errors and lacks error checking. Use at your own risk ;-) PS: Sorry about the php code there; I know it's not the php mailing list, but my buildtool happens to be written in php ;-) -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to handle External:SIGPIPE on linux

2013-06-01 Thread Ewald
On 01 Jun 2013, at 08:51, Dennis Poon wrote: > Ewald, > > Please kindly share your sample codes for both approaches. > Thanks a lot Right, here you go: *** fpSignal() *** First you declare a function which is going to handle the signal (SignalHandler in my example), then y

Re: [fpc-pascal] How to handle External:SIGPIPE on linux

2013-05-31 Thread Ewald
d some example code if you want. Or you could perhaps block this signal using pthread_sigmask (http://man7.org/linux/man-pages/man3/pthread_sigmask.3.html). I believe I have some example code of this too. -- Ewald ___ fpc-pascal maillist - fpc-

Re: [fpc-pascal] Error: Duplicate identifier "FarPointer"

2013-05-15 Thread Ewald
http://lists.freepascal.org/mailman/listinfo/fpc-pascal -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-03 Thread Ewald
ether or not the next IO operation is going to block. Now that we have established these two facts, I believe that using select before accept to check whether the latter will block is valid logic, wouldn't you say? PS: The exact details of this implementation I do not know, I haven'

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-03 Thread Ewald
On 03 May 2013, at 20:13, Marco van de Voort wrote: > In our previous episode, Ewald said: >> >> The point being that the answer to one of the OP sub-problems [the one >> quoted _partially_ above], can be to either use: >> - pthread_cancel() [overkill, I know,

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-03 Thread Ewald
Once upon a time, Zaher Dirkey said: > On Fri, May 3, 2013 at 7:22 PM, Ewald wrote: > >> "Accept" but without errors > > ​You cant, Accept give you a handle of new socket or give you an error, not > all is fatal error, just check what is it, if it a closed handle o

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-03 Thread Ewald
On 03 May 2013, at 11:30, Zaher Dirkey wrote: > > On Fri, May 3, 2013 at 12:18 PM, Ewald wrote: > That's true, but at least it returns control to you (= the programmer), so > you can close the handles manually. > > ​I am notprefer force to close any thing, that will

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-03 Thread Ewald
On 03 May 2013, at 00:15, Zaher Dirkey wrote: > > On Fri, May 3, 2013 at 12:51 AM, Ewald wrote: > pthread_cancel() > > pthread_cancel() ​ ​​ not clos​e​ the handles i though​.​ That's true, but at least it returns control to you (= the programmer), so you can close

Re: [fpc-pascal] How to close TInetServer without except?

2013-05-02 Thread Ewald
reful with this approach. Another way would be to use a non-blocking socket to accept connections... -- Ewald ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] How to detect connection status of a socket

2013-04-28 Thread Ewald
Note that even in non-blocking mode, 0 means the socket is closed. If you received no data yet, you will get -1 as a return value and errno will be set to EAgain of EWouldBlock (see the link above). Does this help or am I completely talking besides the point? -- Ewald

Re: [fpc-pascal] "Function header doesn't match" error

2013-03-31 Thread Ewald
It's that final declaration that goes wrong, but I can fix it by > moving the class back into the implementation part. FPC 2.6.2 on Linux > x86. > Just and idea: Can it be that you redefined TStringList (or boolean for that matter, but that doesn't strike me as obvious) in oneof t

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

2013-03-28 Thread Ewald
what I said earlier, but there can apparently be more than one file in a gzipped `thing`: see https://en.wikipedia.org/wiki/Gzip#File_format . It is not really all files in one container, but more like concatenating serveral of these one-file gzipped files, if you see what I mean. Anyway, I've ne

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

2013-03-28 Thread Ewald
Once upon a time, José Mejuto said: > El 28/03/2013 1:06, Ewald escribió: >> Sorry to just drop in on this quite late, but isn't gzip a >> compression algorithm and not a file format as such? gzip (the >> command line utility) only compresses one file and *doesn'

  1   2   >